Skip to content

Commit 7f435a6

Browse files
chore(api): update composite API spec
1 parent 76513bf commit 7f435a6

22 files changed

Lines changed: 383 additions & 17 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1993
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f0c3645a37032449aee08f0bfc7f373ce8ebe0bdaa2c6964b4c9328f712bbae9.yml
3-
openapi_spec_hash: ab3368c4c9aa05dff33b51f542fb7786
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0d52971b01c25a36f6fcfb4f73b19445b8fd83818763a6fd66f5616b49f6dd81.yml
3+
openapi_spec_hash: c389912f9fa531e76127e9d8a2500f22
44
config_hash: ef319a79ff462ce842b47460e889e37b

src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ def create(
196196
tags: SequenceNotStr[str] | Omit = omit,
197197
target_country: str | Omit = omit,
198198
target_industry: str | Omit = omit,
199+
uuid: str | Omit = omit,
199200
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
200201
# The extra values given here take precedence over values defined on the client or passed to this method.
201202
extra_headers: Headers | None = None,
@@ -215,6 +216,9 @@ def create(
215216
indicators: Array of indicators for this event. Supports multiple indicators per event for
216217
complex scenarios.
217218
219+
uuid: Optional UUID for the event. Only used when preserveUuid=true in bulk create.
220+
Must be a valid UUID format.
221+
218222
extra_headers: Send extra headers
219223
220224
extra_query: Add additional query parameters to the request
@@ -245,6 +249,7 @@ def create(
245249
"tags": tags,
246250
"target_country": target_country,
247251
"target_industry": target_industry,
252+
"uuid": uuid,
248253
},
249254
threat_event_create_params.ThreatEventCreateParams,
250255
),
@@ -260,6 +265,7 @@ def list(
260265
account_id: str,
261266
dataset_id: SequenceNotStr[str] | Omit = omit,
262267
force_refresh: bool | Omit = omit,
268+
format: Literal["json", "stix2"] | Omit = omit,
263269
order: Literal["asc", "desc"] | Omit = omit,
264270
order_by: str | Omit = omit,
265271
page: float | Omit = omit,
@@ -303,6 +309,7 @@ def list(
303309
{
304310
"dataset_id": dataset_id,
305311
"force_refresh": force_refresh,
312+
"format": format,
306313
"order": order,
307314
"order_by": order_by,
308315
"page": page,
@@ -365,6 +372,7 @@ def bulk_create(
365372
account_id: str,
366373
data: Iterable[threat_event_bulk_create_params.Data],
367374
dataset_id: str,
375+
preserve_uuid: bool | Omit = omit,
368376
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
369377
# The extra values given here take precedence over values defined on the client or passed to this method.
370378
extra_headers: Headers | None = None,
@@ -382,6 +390,10 @@ def bulk_create(
382390
Args:
383391
account_id: Account ID.
384392
393+
preserve_uuid: When true, use provided UUIDs from event data instead of generating new ones.
394+
Used for migration scenarios where original UUIDs must be preserved. Duplicate
395+
UUIDs will be skipped.
396+
385397
extra_headers: Send extra headers
386398
387399
extra_query: Add additional query parameters to the request
@@ -398,6 +410,7 @@ def bulk_create(
398410
{
399411
"data": data,
400412
"dataset_id": dataset_id,
413+
"preserve_uuid": preserve_uuid,
401414
},
402415
threat_event_bulk_create_params.ThreatEventBulkCreateParams,
403416
),
@@ -604,6 +617,7 @@ async def create(
604617
tags: SequenceNotStr[str] | Omit = omit,
605618
target_country: str | Omit = omit,
606619
target_industry: str | Omit = omit,
620+
uuid: str | Omit = omit,
607621
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
608622
# The extra values given here take precedence over values defined on the client or passed to this method.
609623
extra_headers: Headers | None = None,
@@ -623,6 +637,9 @@ async def create(
623637
indicators: Array of indicators for this event. Supports multiple indicators per event for
624638
complex scenarios.
625639
640+
uuid: Optional UUID for the event. Only used when preserveUuid=true in bulk create.
641+
Must be a valid UUID format.
642+
626643
extra_headers: Send extra headers
627644
628645
extra_query: Add additional query parameters to the request
@@ -653,6 +670,7 @@ async def create(
653670
"tags": tags,
654671
"target_country": target_country,
655672
"target_industry": target_industry,
673+
"uuid": uuid,
656674
},
657675
threat_event_create_params.ThreatEventCreateParams,
658676
),
@@ -668,6 +686,7 @@ async def list(
668686
account_id: str,
669687
dataset_id: SequenceNotStr[str] | Omit = omit,
670688
force_refresh: bool | Omit = omit,
689+
format: Literal["json", "stix2"] | Omit = omit,
671690
order: Literal["asc", "desc"] | Omit = omit,
672691
order_by: str | Omit = omit,
673692
page: float | Omit = omit,
@@ -711,6 +730,7 @@ async def list(
711730
{
712731
"dataset_id": dataset_id,
713732
"force_refresh": force_refresh,
733+
"format": format,
714734
"order": order,
715735
"order_by": order_by,
716736
"page": page,
@@ -773,6 +793,7 @@ async def bulk_create(
773793
account_id: str,
774794
data: Iterable[threat_event_bulk_create_params.Data],
775795
dataset_id: str,
796+
preserve_uuid: bool | Omit = omit,
776797
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
777798
# The extra values given here take precedence over values defined on the client or passed to this method.
778799
extra_headers: Headers | None = None,
@@ -790,6 +811,10 @@ async def bulk_create(
790811
Args:
791812
account_id: Account ID.
792813
814+
preserve_uuid: When true, use provided UUIDs from event data instead of generating new ones.
815+
Used for migration scenarios where original UUIDs must be preserved. Duplicate
816+
UUIDs will be skipped.
817+
793818
extra_headers: Send extra headers
794819
795820
extra_query: Add additional query parameters to the request
@@ -806,6 +831,7 @@ async def bulk_create(
806831
{
807832
"data": data,
808833
"dataset_id": dataset_id,
834+
"preserve_uuid": preserve_uuid,
809835
},
810836
threat_event_bulk_create_params.ThreatEventBulkCreateParams,
811837
),

src/cloudflare/resources/email_security/investigate/investigate.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,11 @@ def list(
160160
extra_body: Body | None = None,
161161
timeout: float | httpx.Timeout | None | NotGiven = not_given,
162162
) -> SyncV4PagePaginationArray[InvestigateListResponse]:
163-
"""
164-
Returns information for each email that matches the search parameter(s).
163+
"""Returns information for each email that matches the search parameter(s).
164+
165+
If the
166+
search takes too long, the endpoint returns 202 with a Location header pointing
167+
to a polling endpoint where results can be retrieved once ready.
165168
166169
Args:
167170
account_id: Account Identifier
@@ -374,8 +377,11 @@ def list(
374377
extra_body: Body | None = None,
375378
timeout: float | httpx.Timeout | None | NotGiven = not_given,
376379
) -> AsyncPaginator[InvestigateListResponse, AsyncV4PagePaginationArray[InvestigateListResponse]]:
377-
"""
378-
Returns information for each email that matches the search parameter(s).
380+
"""Returns information for each email that matches the search parameter(s).
381+
382+
If the
383+
search takes too long, the endpoint returns 202 with a Location header pointing
384+
to a polling endpoint where results can be retrieved once ready.
379385
380386
Args:
381387
account_id: Account Identifier

src/cloudflare/resources/r2_data_catalog/maintenance_configs.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def update(
5151
*,
5252
account_id: str,
5353
compaction: maintenance_config_update_params.Compaction | Omit = omit,
54+
snapshot_expiration: maintenance_config_update_params.SnapshotExpiration | Omit = omit,
5455
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5556
# The extra values given here take precedence over values defined on the client or passed to this method.
5657
extra_headers: Headers | None = None,
@@ -70,6 +71,8 @@ def update(
7071
7172
compaction: Updates compaction configuration (all fields optional).
7273
74+
snapshot_expiration: Updates snapshot expiration configuration (all fields optional).
75+
7376
extra_headers: Send extra headers
7477
7578
extra_query: Add additional query parameters to the request
@@ -85,7 +88,11 @@ def update(
8588
return self._post(
8689
f"/accounts/{account_id}/r2-catalog/{bucket_name}/maintenance-configs",
8790
body=maybe_transform(
88-
{"compaction": compaction}, maintenance_config_update_params.MaintenanceConfigUpdateParams
91+
{
92+
"compaction": compaction,
93+
"snapshot_expiration": snapshot_expiration,
94+
},
95+
maintenance_config_update_params.MaintenanceConfigUpdateParams,
8996
),
9097
options=make_request_options(
9198
extra_headers=extra_headers,
@@ -171,6 +178,7 @@ async def update(
171178
*,
172179
account_id: str,
173180
compaction: maintenance_config_update_params.Compaction | Omit = omit,
181+
snapshot_expiration: maintenance_config_update_params.SnapshotExpiration | Omit = omit,
174182
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
175183
# The extra values given here take precedence over values defined on the client or passed to this method.
176184
extra_headers: Headers | None = None,
@@ -190,6 +198,8 @@ async def update(
190198
191199
compaction: Updates compaction configuration (all fields optional).
192200
201+
snapshot_expiration: Updates snapshot expiration configuration (all fields optional).
202+
193203
extra_headers: Send extra headers
194204
195205
extra_query: Add additional query parameters to the request
@@ -205,7 +215,11 @@ async def update(
205215
return await self._post(
206216
f"/accounts/{account_id}/r2-catalog/{bucket_name}/maintenance-configs",
207217
body=await async_maybe_transform(
208-
{"compaction": compaction}, maintenance_config_update_params.MaintenanceConfigUpdateParams
218+
{
219+
"compaction": compaction,
220+
"snapshot_expiration": snapshot_expiration,
221+
},
222+
maintenance_config_update_params.MaintenanceConfigUpdateParams,
209223
),
210224
options=make_request_options(
211225
extra_headers=extra_headers,

src/cloudflare/resources/r2_data_catalog/namespaces/tables/maintenance_configs.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def update(
5555
bucket_name: str,
5656
namespace: str,
5757
compaction: maintenance_config_update_params.Compaction | Omit = omit,
58+
snapshot_expiration: maintenance_config_update_params.SnapshotExpiration | Omit = omit,
5859
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5960
# The extra values given here take precedence over values defined on the client or passed to this method.
6061
extra_headers: Headers | None = None,
@@ -74,6 +75,8 @@ def update(
7475
7576
compaction: Updates compaction configuration (all fields optional).
7677
78+
snapshot_expiration: Updates snapshot expiration configuration (all fields optional).
79+
7780
extra_headers: Send extra headers
7881
7982
extra_query: Add additional query parameters to the request
@@ -93,7 +96,11 @@ def update(
9396
return self._post(
9497
f"/accounts/{account_id}/r2-catalog/{bucket_name}/namespaces/{namespace}/tables/{table_name}/maintenance-configs",
9598
body=maybe_transform(
96-
{"compaction": compaction}, maintenance_config_update_params.MaintenanceConfigUpdateParams
99+
{
100+
"compaction": compaction,
101+
"snapshot_expiration": snapshot_expiration,
102+
},
103+
maintenance_config_update_params.MaintenanceConfigUpdateParams,
97104
),
98105
options=make_request_options(
99106
extra_headers=extra_headers,
@@ -187,6 +194,7 @@ async def update(
187194
bucket_name: str,
188195
namespace: str,
189196
compaction: maintenance_config_update_params.Compaction | Omit = omit,
197+
snapshot_expiration: maintenance_config_update_params.SnapshotExpiration | Omit = omit,
190198
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
191199
# The extra values given here take precedence over values defined on the client or passed to this method.
192200
extra_headers: Headers | None = None,
@@ -206,6 +214,8 @@ async def update(
206214
207215
compaction: Updates compaction configuration (all fields optional).
208216
217+
snapshot_expiration: Updates snapshot expiration configuration (all fields optional).
218+
209219
extra_headers: Send extra headers
210220
211221
extra_query: Add additional query parameters to the request
@@ -225,7 +235,11 @@ async def update(
225235
return await self._post(
226236
f"/accounts/{account_id}/r2-catalog/{bucket_name}/namespaces/{namespace}/tables/{table_name}/maintenance-configs",
227237
body=await async_maybe_transform(
228-
{"compaction": compaction}, maintenance_config_update_params.MaintenanceConfigUpdateParams
238+
{
239+
"compaction": compaction,
240+
"snapshot_expiration": snapshot_expiration,
241+
},
242+
maintenance_config_update_params.MaintenanceConfigUpdateParams,
229243
),
230244
options=make_request_options(
231245
extra_headers=extra_headers,

src/cloudflare/types/cloudforce_one/threat_event_bulk_create_params.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ class ThreatEventBulkCreateParams(TypedDict, total=False):
2020

2121
dataset_id: Required[Annotated[str, PropertyInfo(alias="datasetId")]]
2222

23+
preserve_uuid: Annotated[bool, PropertyInfo(alias="preserveUuid")]
24+
"""When true, use provided UUIDs from event data instead of generating new ones.
25+
26+
Used for migration scenarios where original UUIDs must be preserved. Duplicate
27+
UUIDs will be skipped.
28+
"""
29+
2330

2431
class DataRaw(TypedDict, total=False):
2532
data: Required[Optional[Dict[str, object]]]
@@ -73,3 +80,9 @@ class Data(TypedDict, total=False):
7380
target_country: Annotated[str, PropertyInfo(alias="targetCountry")]
7481

7582
target_industry: Annotated[str, PropertyInfo(alias="targetIndustry")]
83+
84+
uuid: str
85+
"""Optional UUID for the event.
86+
87+
Only used when preserveUuid=true in bulk create. Must be a valid UUID format.
88+
"""

src/cloudflare/types/cloudforce_one/threat_event_bulk_create_response.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ class ThreatEventBulkCreateResponse(BaseModel):
3232
queued_indicators_count: float = FieldInfo(alias="queuedIndicatorsCount")
3333
"""Number of indicators queued for async processing"""
3434

35+
skipped_events_count: float = FieldInfo(alias="skippedEventsCount")
36+
"""Number of events skipped due to duplicate UUID (only when preserveUuid=true)"""
37+
3538
create_bulk_events_request_id: Optional[str] = FieldInfo(alias="createBulkEventsRequestId", default=None)
3639
"""Correlation ID for async indicator processing"""
3740

src/cloudflare/types/cloudforce_one/threat_event_create_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ class ThreatEventCreateParams(TypedDict, total=False):
5252

5353
target_industry: Annotated[str, PropertyInfo(alias="targetIndustry")]
5454

55+
uuid: str
56+
"""Optional UUID for the event.
57+
58+
Only used when preserveUuid=true in bulk create. Must be a valid UUID format.
59+
"""
60+
5561

5662
class Raw(TypedDict, total=False):
5763
data: Required[Optional[Dict[str, object]]]

src/cloudflare/types/cloudforce_one/threat_event_list_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ class ThreatEventListParams(TypedDict, total=False):
1919

2020
force_refresh: Annotated[bool, PropertyInfo(alias="forceRefresh")]
2121

22+
format: Literal["json", "stix2"]
23+
2224
order: Literal["asc", "desc"]
2325

2426
order_by: Annotated[str, PropertyInfo(alias="orderBy")]

src/cloudflare/types/email_security/investigate/move_bulk_response.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ class MoveBulkResponse(BaseModel):
1313

1414
item_count: int
1515

16+
success: bool
17+
1618
destination: Optional[str] = None
1719

1820
message_id: Optional[str] = None

0 commit comments

Comments
 (0)