Skip to content

Commit d1f482b

Browse files
chore(api): update composite API spec
1 parent 2431f72 commit d1f482b

6 files changed

Lines changed: 84 additions & 21 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 2106
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b6702551aa3104eca201b34bf9b1ef76f4aed1d6a03c98ea8a65e502ad4bf83e.yml
3-
openapi_spec_hash: a55221d2614876fd6882f4acb92674f9
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-46d69f5253efb7adc3082b44699bca0d1017d7e983009692acc0b9aed90695f2.yml
3+
openapi_spec_hash: 7b8620869d89f55bb1a1cbd50214118b
44
config_hash: f1f5a81a3bb6c13ea4fc78a816f5e0b6

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def create(
5959
description: Optional[str] | Omit = omit,
6060
entries: Iterable[custom_create_params.Entry] | Omit = omit,
6161
ocr_enabled: bool | Omit = omit,
62-
sensitivity_levels: Iterable[SequenceNotStr[str]] | Omit = omit,
62+
sensitivity_levels: Iterable[custom_create_params.SensitivityLevel] | Omit = omit,
6363
shared_entries: Iterable[custom_create_params.SharedEntry] | Omit = omit,
6464
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6565
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -83,7 +83,7 @@ def create(
8383
8484
description: The description of the profile.
8585
86-
sensitivity_levels: Sensitivity levels to associate with the profile as (group_id, level_id) tuples.
86+
sensitivity_levels: Sensitivity levels to associate with the profile.
8787
8888
shared_entries: Entries from other profiles (e.g. pre-defined Cloudflare profiles, or your
8989
Microsoft Information Protection profiles).
@@ -147,7 +147,7 @@ def update(
147147
description: Optional[str] | Omit = omit,
148148
entries: Optional[Iterable[custom_update_params.Entry]] | Omit = omit,
149149
ocr_enabled: bool | Omit = omit,
150-
sensitivity_levels: Optional[Iterable[SequenceNotStr[str]]] | Omit = omit,
150+
sensitivity_levels: Optional[Iterable[custom_update_params.SensitivityLevel]] | Omit = omit,
151151
shared_entries: Iterable[custom_update_params.SharedEntry] | Omit = omit,
152152
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
153153
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -345,7 +345,7 @@ async def create(
345345
description: Optional[str] | Omit = omit,
346346
entries: Iterable[custom_create_params.Entry] | Omit = omit,
347347
ocr_enabled: bool | Omit = omit,
348-
sensitivity_levels: Iterable[SequenceNotStr[str]] | Omit = omit,
348+
sensitivity_levels: Iterable[custom_create_params.SensitivityLevel] | Omit = omit,
349349
shared_entries: Iterable[custom_create_params.SharedEntry] | Omit = omit,
350350
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
351351
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -369,7 +369,7 @@ async def create(
369369
370370
description: The description of the profile.
371371
372-
sensitivity_levels: Sensitivity levels to associate with the profile as (group_id, level_id) tuples.
372+
sensitivity_levels: Sensitivity levels to associate with the profile.
373373
374374
shared_entries: Entries from other profiles (e.g. pre-defined Cloudflare profiles, or your
375375
Microsoft Information Protection profiles).
@@ -433,7 +433,7 @@ async def update(
433433
description: Optional[str] | Omit = omit,
434434
entries: Optional[Iterable[custom_update_params.Entry]] | Omit = omit,
435435
ocr_enabled: bool | Omit = omit,
436-
sensitivity_levels: Optional[Iterable[SequenceNotStr[str]]] | Omit = omit,
436+
sensitivity_levels: Optional[Iterable[custom_update_params.SensitivityLevel]] | Omit = omit,
437437
shared_entries: Iterable[custom_update_params.SharedEntry] | Omit = omit,
438438
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
439439
# The extra values given here take precedence over values defined on the client or passed to this method.

src/cloudflare/types/zero_trust/dlp/profile.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"CustomProfileEntryExactDataEntry",
2424
"CustomProfileEntryDocumentFingerprintEntry",
2525
"CustomProfileEntryWordListEntry",
26+
"CustomProfileSensitivityLevel",
2627
"CustomProfileSharedEntry",
2728
"CustomProfileSharedEntryCustomEntry",
2829
"CustomProfileSharedEntryPredefinedEntry",
@@ -199,6 +200,16 @@ class CustomProfileEntryWordListEntry(BaseModel):
199200
]
200201

201202

203+
class CustomProfileSensitivityLevel(BaseModel):
204+
"""
205+
A reference pairing a sensitivity group with a specific level within that group.
206+
"""
207+
208+
group_id: str
209+
210+
level_id: str
211+
212+
202213
class CustomProfileSharedEntryCustomEntry(BaseModel):
203214
id: str
204215

@@ -375,8 +386,8 @@ class CustomProfile(BaseModel):
375386

376387
entries: Optional[List[CustomProfileEntry]] = None
377388

378-
sensitivity_levels: Optional[List[List[str]]] = None
379-
"""Sensitivity levels associated with this profile as (group_id, level_id) tuples."""
389+
sensitivity_levels: Optional[List[CustomProfileSensitivityLevel]] = None
390+
"""Sensitivity levels associated with this profile."""
380391

381392
shared_entries: Optional[List[CustomProfileSharedEntry]] = None
382393

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

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@
99
from .pattern_param import PatternParam
1010
from ..context_awareness_param import ContextAwarenessParam
1111

12-
__all__ = ["CustomCreateParams", "Entry", "EntryDLPNewCustomEntry", "EntryDLPNewWordListEntry", "SharedEntry"]
12+
__all__ = [
13+
"CustomCreateParams",
14+
"Entry",
15+
"EntryDLPNewCustomEntry",
16+
"EntryDLPNewWordListEntry",
17+
"SensitivityLevel",
18+
"SharedEntry",
19+
]
1320

1421

1522
class CustomCreateParams(TypedDict, total=False):
@@ -43,10 +50,8 @@ class CustomCreateParams(TypedDict, total=False):
4350

4451
ocr_enabled: bool
4552

46-
sensitivity_levels: Iterable[SequenceNotStr[str]]
47-
"""
48-
Sensitivity levels to associate with the profile as (group_id, level_id) tuples.
49-
"""
53+
sensitivity_levels: Iterable[SensitivityLevel]
54+
"""Sensitivity levels to associate with the profile."""
5055

5156
shared_entries: Iterable[SharedEntry]
5257
"""Entries from other profiles (e.g.
@@ -77,6 +82,16 @@ class EntryDLPNewWordListEntry(TypedDict, total=False):
7782
Entry: TypeAlias = Union[EntryDLPNewCustomEntry, EntryDLPNewWordListEntry]
7883

7984

85+
class SensitivityLevel(TypedDict, total=False):
86+
"""
87+
A reference pairing a sensitivity group with a specific level within that group.
88+
"""
89+
90+
group_id: Required[str]
91+
92+
level_id: Required[str]
93+
94+
8095
class SharedEntry(TypedDict, total=False):
8196
enabled: Required[bool]
8297

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

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@
99
from .pattern_param import PatternParam
1010
from ..context_awareness_param import ContextAwarenessParam
1111

12-
__all__ = ["CustomUpdateParams", "Entry", "EntryDLPNewCustomEntryWithID", "EntryDLPNewCustomEntry", "SharedEntry"]
12+
__all__ = [
13+
"CustomUpdateParams",
14+
"Entry",
15+
"EntryDLPNewCustomEntryWithID",
16+
"EntryDLPNewCustomEntry",
17+
"SensitivityLevel",
18+
"SharedEntry",
19+
]
1320

1421

1522
class CustomUpdateParams(TypedDict, total=False):
@@ -52,7 +59,7 @@ class CustomUpdateParams(TypedDict, total=False):
5259

5360
ocr_enabled: bool
5461

55-
sensitivity_levels: Optional[Iterable[SequenceNotStr[str]]]
62+
sensitivity_levels: Optional[Iterable[SensitivityLevel]]
5663
"""Sensitivity levels to associate with the profile.
5764
5865
If omitted, existing associations are unchanged.
@@ -87,6 +94,16 @@ class EntryDLPNewCustomEntry(TypedDict, total=False):
8794
Entry: TypeAlias = Union[EntryDLPNewCustomEntryWithID, EntryDLPNewCustomEntry]
8895

8996

97+
class SensitivityLevel(TypedDict, total=False):
98+
"""
99+
A reference pairing a sensitivity group with a specific level within that group.
100+
"""
101+
102+
group_id: Required[str]
103+
104+
level_id: Required[str]
105+
106+
90107
class SharedEntry(TypedDict, total=False):
91108
enabled: Required[bool]
92109

tests/api_resources/zero_trust/dlp/profiles/test_custom.py

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,12 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
5252
}
5353
],
5454
ocr_enabled=True,
55-
sensitivity_levels=[["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"]],
55+
sensitivity_levels=[
56+
{
57+
"group_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
58+
"level_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
59+
}
60+
],
5661
shared_entries=[
5762
{
5863
"enabled": True,
@@ -134,7 +139,12 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
134139
}
135140
],
136141
ocr_enabled=True,
137-
sensitivity_levels=[["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"]],
142+
sensitivity_levels=[
143+
{
144+
"group_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
145+
"level_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
146+
}
147+
],
138148
shared_entries=[
139149
{
140150
"enabled": True,
@@ -325,7 +335,12 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
325335
}
326336
],
327337
ocr_enabled=True,
328-
sensitivity_levels=[["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"]],
338+
sensitivity_levels=[
339+
{
340+
"group_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
341+
"level_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
342+
}
343+
],
329344
shared_entries=[
330345
{
331346
"enabled": True,
@@ -407,7 +422,12 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
407422
}
408423
],
409424
ocr_enabled=True,
410-
sensitivity_levels=[["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"]],
425+
sensitivity_levels=[
426+
{
427+
"group_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
428+
"level_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
429+
}
430+
],
411431
shared_entries=[
412432
{
413433
"enabled": True,

0 commit comments

Comments
 (0)