Skip to content

Commit eef643f

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): api update (#2127)
1 parent fe787a3 commit eef643f

File tree

7 files changed

+1032
-189
lines changed

7 files changed

+1032
-189
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 1397
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d7ac42a96dd2d1679005f853c1c4c29034e362c73f2d75ad004d948ad8abfb74.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-66874390672543889c6f739266ab0e815d7c6a65deb464a2c41c965b45d3e24a.yml

src/cloudflare/resources/zero_trust/dlp/profiles/custom.py

Lines changed: 208 additions & 32 deletions
Large diffs are not rendered by default.

src/cloudflare/types/zero_trust/dlp/profiles/custom_create_params.py

Lines changed: 130 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,82 +10,95 @@
1010

1111
__all__ = [
1212
"CustomCreateParams",
13-
"Profile",
14-
"ProfileEntry",
15-
"ProfileEntryDLPNewCustomEntry",
16-
"ProfileEntryDLPNewWordListEntry",
17-
"ProfileSharedEntry",
18-
"ProfileSharedEntryCustom",
19-
"ProfileSharedEntryPredefined",
20-
"ProfileSharedEntryIntegration",
21-
"ProfileSharedEntryExactData",
13+
"Variant0",
14+
"Variant0Profile",
15+
"Variant0ProfileEntry",
16+
"Variant0ProfileEntryDLPNewCustomEntry",
17+
"Variant0ProfileEntryDLPNewWordListEntry",
18+
"Variant0ProfileSharedEntry",
19+
"Variant0ProfileSharedEntryCustom",
20+
"Variant0ProfileSharedEntryPredefined",
21+
"Variant0ProfileSharedEntryIntegration",
22+
"Variant0ProfileSharedEntryExactData",
23+
"DLPNewCustomProfile",
24+
"DLPNewCustomProfileEntry",
25+
"DLPNewCustomProfileEntryDLPNewCustomEntry",
26+
"DLPNewCustomProfileEntryDLPNewWordListEntry",
27+
"DLPNewCustomProfileSharedEntry",
28+
"DLPNewCustomProfileSharedEntryCustom",
29+
"DLPNewCustomProfileSharedEntryPredefined",
30+
"DLPNewCustomProfileSharedEntryIntegration",
31+
"DLPNewCustomProfileSharedEntryExactData",
2232
]
2333

2434

25-
class CustomCreateParams(TypedDict, total=False):
35+
class Variant0(TypedDict, total=False):
2636
account_id: Required[str]
2737

28-
profiles: Required[Iterable[Profile]]
38+
profiles: Required[Iterable[Variant0Profile]]
2939

3040

31-
class ProfileEntryDLPNewCustomEntry(TypedDict, total=False):
41+
class Variant0ProfileEntryDLPNewCustomEntry(TypedDict, total=False):
3242
enabled: Required[bool]
3343

3444
name: Required[str]
3545

3646
pattern: Required[PatternParam]
3747

3848

39-
class ProfileEntryDLPNewWordListEntry(TypedDict, total=False):
49+
class Variant0ProfileEntryDLPNewWordListEntry(TypedDict, total=False):
4050
enabled: Required[bool]
4151

4252
name: Required[str]
4353

4454
words: Required[List[str]]
4555

4656

47-
ProfileEntry: TypeAlias = Union[ProfileEntryDLPNewCustomEntry, ProfileEntryDLPNewWordListEntry]
57+
Variant0ProfileEntry: TypeAlias = Union[Variant0ProfileEntryDLPNewCustomEntry, Variant0ProfileEntryDLPNewWordListEntry]
4858

4959

50-
class ProfileSharedEntryCustom(TypedDict, total=False):
60+
class Variant0ProfileSharedEntryCustom(TypedDict, total=False):
5161
enabled: Required[bool]
5262

5363
entry_id: Required[str]
5464

5565
entry_type: Required[Literal["custom"]]
5666

5767

58-
class ProfileSharedEntryPredefined(TypedDict, total=False):
68+
class Variant0ProfileSharedEntryPredefined(TypedDict, total=False):
5969
enabled: Required[bool]
6070

6171
entry_id: Required[str]
6272

6373
entry_type: Required[Literal["predefined"]]
6474

6575

66-
class ProfileSharedEntryIntegration(TypedDict, total=False):
76+
class Variant0ProfileSharedEntryIntegration(TypedDict, total=False):
6777
enabled: Required[bool]
6878

6979
entry_id: Required[str]
7080

7181
entry_type: Required[Literal["integration"]]
7282

7383

74-
class ProfileSharedEntryExactData(TypedDict, total=False):
84+
class Variant0ProfileSharedEntryExactData(TypedDict, total=False):
7585
enabled: Required[bool]
7686

7787
entry_id: Required[str]
7888

7989
entry_type: Required[Literal["exact_data"]]
8090

8191

82-
ProfileSharedEntry: TypeAlias = Union[
83-
ProfileSharedEntryCustom, ProfileSharedEntryPredefined, ProfileSharedEntryIntegration, ProfileSharedEntryExactData
92+
Variant0ProfileSharedEntry: TypeAlias = Union[
93+
Variant0ProfileSharedEntryCustom,
94+
Variant0ProfileSharedEntryPredefined,
95+
Variant0ProfileSharedEntryIntegration,
96+
Variant0ProfileSharedEntryExactData,
8497
]
8598

8699

87-
class Profile(TypedDict, total=False):
88-
entries: Required[Iterable[ProfileEntry]]
100+
class Variant0Profile(TypedDict, total=False):
101+
entries: Required[Iterable[Variant0ProfileEntry]]
89102

90103
name: Required[str]
91104

@@ -105,9 +118,103 @@ class Profile(TypedDict, total=False):
105118

106119
ocr_enabled: bool
107120

108-
shared_entries: Iterable[ProfileSharedEntry]
121+
shared_entries: Iterable[Variant0ProfileSharedEntry]
109122
"""Entries from other profiles (e.g.
110123
111124
pre-defined Cloudflare profiles, or your Microsoft Information Protection
112125
profiles).
113126
"""
127+
128+
129+
class DLPNewCustomProfile(TypedDict, total=False):
130+
account_id: Required[str]
131+
132+
entries: Required[Iterable[DLPNewCustomProfileEntry]]
133+
134+
name: Required[str]
135+
136+
allowed_match_count: int
137+
"""Related DLP policies will trigger when the match count exceeds the number set."""
138+
139+
confidence_threshold: Optional[str]
140+
141+
context_awareness: ContextAwarenessParam
142+
"""
143+
Scan the context of predefined entries to only return matches surrounded by
144+
keywords.
145+
"""
146+
147+
description: Optional[str]
148+
"""The description of the profile"""
149+
150+
ocr_enabled: bool
151+
152+
shared_entries: Iterable[DLPNewCustomProfileSharedEntry]
153+
"""Entries from other profiles (e.g.
154+
155+
pre-defined Cloudflare profiles, or your Microsoft Information Protection
156+
profiles).
157+
"""
158+
159+
160+
class DLPNewCustomProfileEntryDLPNewCustomEntry(TypedDict, total=False):
161+
enabled: Required[bool]
162+
163+
name: Required[str]
164+
165+
pattern: Required[PatternParam]
166+
167+
168+
class DLPNewCustomProfileEntryDLPNewWordListEntry(TypedDict, total=False):
169+
enabled: Required[bool]
170+
171+
name: Required[str]
172+
173+
words: Required[List[str]]
174+
175+
176+
DLPNewCustomProfileEntry: TypeAlias = Union[
177+
DLPNewCustomProfileEntryDLPNewCustomEntry, DLPNewCustomProfileEntryDLPNewWordListEntry
178+
]
179+
180+
181+
class DLPNewCustomProfileSharedEntryCustom(TypedDict, total=False):
182+
enabled: Required[bool]
183+
184+
entry_id: Required[str]
185+
186+
entry_type: Required[Literal["custom"]]
187+
188+
189+
class DLPNewCustomProfileSharedEntryPredefined(TypedDict, total=False):
190+
enabled: Required[bool]
191+
192+
entry_id: Required[str]
193+
194+
entry_type: Required[Literal["predefined"]]
195+
196+
197+
class DLPNewCustomProfileSharedEntryIntegration(TypedDict, total=False):
198+
enabled: Required[bool]
199+
200+
entry_id: Required[str]
201+
202+
entry_type: Required[Literal["integration"]]
203+
204+
205+
class DLPNewCustomProfileSharedEntryExactData(TypedDict, total=False):
206+
enabled: Required[bool]
207+
208+
entry_id: Required[str]
209+
210+
entry_type: Required[Literal["exact_data"]]
211+
212+
213+
DLPNewCustomProfileSharedEntry: TypeAlias = Union[
214+
DLPNewCustomProfileSharedEntryCustom,
215+
DLPNewCustomProfileSharedEntryPredefined,
216+
DLPNewCustomProfileSharedEntryIntegration,
217+
DLPNewCustomProfileSharedEntryExactData,
218+
]
219+
220+
CustomCreateParams: TypeAlias = Union[Variant0, DLPNewCustomProfile]

0 commit comments

Comments
 (0)