Skip to content

Commit 85c5226

Browse files
feat: OpenAPI spec update via Stainless API (#103)
1 parent b33bb69 commit 85c5226

28 files changed

+687
-382
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
configured_endpoints: 1255
1+
configured_endpoints: 1256

api.md

+19-6
Original file line numberDiff line numberDiff line change
@@ -3410,6 +3410,18 @@ Methods:
34103410
- <code title="get /accounts/{account_id}/addressing/prefixes/{prefix_id}/delegations">client.addressing.prefixes.delegations.<a href="./src/cloudflare/resources/addressing/prefixes/delegations.py">list</a>(prefix_id, \*, account_id) -> <a href="./src/cloudflare/types/addressing/prefixes/delegation_list_response.py">Optional</a></code>
34113411
- <code title="delete /accounts/{account_id}/addressing/prefixes/{prefix_id}/delegations/{delegation_id}">client.addressing.prefixes.delegations.<a href="./src/cloudflare/resources/addressing/prefixes/delegations.py">delete</a>(delegation_id, \*, account_id, prefix_id) -> <a href="./src/cloudflare/types/addressing/prefixes/delegation_delete_response.py">DelegationDeleteResponse</a></code>
34123412

3413+
# AuditLogs
3414+
3415+
Types:
3416+
3417+
```python
3418+
from cloudflare.types import AuditLogListResponse
3419+
```
3420+
3421+
Methods:
3422+
3423+
- <code title="get /accounts/{account_identifier}/audit_logs">client.audit_logs.<a href="./src/cloudflare/resources/audit_logs.py">list</a>(account_identifier, \*\*<a href="src/cloudflare/types/audit_log_list_params.py">params</a>) -> <a href="./src/cloudflare/types/audit_log_list_response.py">SyncV4PagePaginationArray[AuditLogListResponse]</a></code>
3424+
34133425
# Billing
34143426

34153427
## Profiles
@@ -4358,6 +4370,7 @@ Types:
43584370

43594371
```python
43604372
from cloudflare.types.alerting.v3.destinations import (
4373+
AaaPagerduty,
43614374
PagerdutyCreateResponse,
43624375
PagerdutyDeleteResponse,
43634376
PagerdutyGetResponse,
@@ -4378,11 +4391,11 @@ Types:
43784391

43794392
```python
43804393
from cloudflare.types.alerting.v3.destinations import (
4394+
AaaWebhooks,
43814395
WebhookCreateResponse,
43824396
WebhookUpdateResponse,
43834397
WebhookListResponse,
43844398
WebhookDeleteResponse,
4385-
WebhookGetResponse,
43864399
)
43874400
```
43884401

@@ -4392,31 +4405,31 @@ Methods:
43924405
- <code title="put /accounts/{account_id}/alerting/v3/destinations/webhooks/{webhook_id}">client.alerting.v3.destinations.webhooks.<a href="./src/cloudflare/resources/alerting/v3/destinations/webhooks.py">update</a>(webhook_id, \*, account_id, \*\*<a href="src/cloudflare/types/alerting/v3/destinations/webhook_update_params.py">params</a>) -> <a href="./src/cloudflare/types/alerting/v3/destinations/webhook_update_response.py">WebhookUpdateResponse</a></code>
43934406
- <code title="get /accounts/{account_id}/alerting/v3/destinations/webhooks">client.alerting.v3.destinations.webhooks.<a href="./src/cloudflare/resources/alerting/v3/destinations/webhooks.py">list</a>(\*, account_id) -> <a href="./src/cloudflare/types/alerting/v3/destinations/webhook_list_response.py">Optional</a></code>
43944407
- <code title="delete /accounts/{account_id}/alerting/v3/destinations/webhooks/{webhook_id}">client.alerting.v3.destinations.webhooks.<a href="./src/cloudflare/resources/alerting/v3/destinations/webhooks.py">delete</a>(webhook_id, \*, account_id) -> <a href="./src/cloudflare/types/alerting/v3/destinations/webhook_delete_response.py">Optional</a></code>
4395-
- <code title="get /accounts/{account_id}/alerting/v3/destinations/webhooks/{webhook_id}">client.alerting.v3.destinations.webhooks.<a href="./src/cloudflare/resources/alerting/v3/destinations/webhooks.py">get</a>(webhook_id, \*, account_id) -> <a href="./src/cloudflare/types/alerting/v3/destinations/webhook_get_response.py">WebhookGetResponse</a></code>
4408+
- <code title="get /accounts/{account_id}/alerting/v3/destinations/webhooks/{webhook_id}">client.alerting.v3.destinations.webhooks.<a href="./src/cloudflare/resources/alerting/v3/destinations/webhooks.py">get</a>(webhook_id, \*, account_id) -> <a href="./src/cloudflare/types/alerting/v3/destinations/aaa_webhooks.py">AaaWebhooks</a></code>
43964409

43974410
### Histories
43984411

43994412
Types:
44004413

44014414
```python
4402-
from cloudflare.types.alerting.v3 import HistoryListResponse
4415+
from cloudflare.types.alerting.v3 import AaaHistory
44034416
```
44044417

44054418
Methods:
44064419

4407-
- <code title="get /accounts/{account_id}/alerting/v3/history">client.alerting.v3.histories.<a href="./src/cloudflare/resources/alerting/v3/histories.py">list</a>(\*, account_id, \*\*<a href="src/cloudflare/types/alerting/v3/history_list_params.py">params</a>) -> <a href="./src/cloudflare/types/alerting/v3/history_list_response.py">SyncV4PagePaginationArray[HistoryListResponse]</a></code>
4420+
- <code title="get /accounts/{account_id}/alerting/v3/history">client.alerting.v3.histories.<a href="./src/cloudflare/resources/alerting/v3/histories.py">list</a>(\*, account_id, \*\*<a href="src/cloudflare/types/alerting/v3/history_list_params.py">params</a>) -> <a href="./src/cloudflare/types/alerting/v3/aaa_history.py">SyncV4PagePaginationArray[AaaHistory]</a></code>
44084421

44094422
### Policies
44104423

44114424
Types:
44124425

44134426
```python
44144427
from cloudflare.types.alerting.v3 import (
4428+
AaaPolicies,
44154429
PolicyCreateResponse,
44164430
PolicyUpdateResponse,
44174431
PolicyListResponse,
44184432
PolicyDeleteResponse,
4419-
PolicyGetResponse,
44204433
)
44214434
```
44224435

@@ -4426,7 +4439,7 @@ Methods:
44264439
- <code title="put /accounts/{account_id}/alerting/v3/policies/{policy_id}">client.alerting.v3.policies.<a href="./src/cloudflare/resources/alerting/v3/policies.py">update</a>(policy_id, \*, account_id, \*\*<a href="src/cloudflare/types/alerting/v3/policy_update_params.py">params</a>) -> <a href="./src/cloudflare/types/alerting/v3/policy_update_response.py">PolicyUpdateResponse</a></code>
44274440
- <code title="get /accounts/{account_id}/alerting/v3/policies">client.alerting.v3.policies.<a href="./src/cloudflare/resources/alerting/v3/policies.py">list</a>(\*, account_id) -> <a href="./src/cloudflare/types/alerting/v3/policy_list_response.py">Optional</a></code>
44284441
- <code title="delete /accounts/{account_id}/alerting/v3/policies/{policy_id}">client.alerting.v3.policies.<a href="./src/cloudflare/resources/alerting/v3/policies.py">delete</a>(policy_id, \*, account_id) -> <a href="./src/cloudflare/types/alerting/v3/policy_delete_response.py">Optional</a></code>
4429-
- <code title="get /accounts/{account_id}/alerting/v3/policies/{policy_id}">client.alerting.v3.policies.<a href="./src/cloudflare/resources/alerting/v3/policies.py">get</a>(policy_id, \*, account_id) -> <a href="./src/cloudflare/types/alerting/v3/policy_get_response.py">PolicyGetResponse</a></code>
4442+
- <code title="get /accounts/{account_id}/alerting/v3/policies/{policy_id}">client.alerting.v3.policies.<a href="./src/cloudflare/resources/alerting/v3/policies.py">get</a>(policy_id, \*, account_id) -> <a href="./src/cloudflare/types/alerting/v3/aaa_policies.py">AaaPolicies</a></code>
44304443

44314444
# D1
44324445

src/cloudflare/_client.py

+8
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ class Cloudflare(SyncAPIClient):
9191
url_normalization: resources.URLNormalization
9292
spectrum: resources.Spectrum
9393
addressing: resources.Addressing
94+
audit_logs: resources.AuditLogs
9495
billing: resources.Billing
9596
brand_protection: resources.BrandProtection
9697
diagnostics: resources.Diagnostics
@@ -243,6 +244,7 @@ def __init__(
243244
self.url_normalization = resources.URLNormalization(self)
244245
self.spectrum = resources.Spectrum(self)
245246
self.addressing = resources.Addressing(self)
247+
self.audit_logs = resources.AuditLogs(self)
246248
self.billing = resources.Billing(self)
247249
self.brand_protection = resources.BrandProtection(self)
248250
self.diagnostics = resources.Diagnostics(self)
@@ -500,6 +502,7 @@ class AsyncCloudflare(AsyncAPIClient):
500502
url_normalization: resources.AsyncURLNormalization
501503
spectrum: resources.AsyncSpectrum
502504
addressing: resources.AsyncAddressing
505+
audit_logs: resources.AsyncAuditLogs
503506
billing: resources.AsyncBilling
504507
brand_protection: resources.AsyncBrandProtection
505508
diagnostics: resources.AsyncDiagnostics
@@ -652,6 +655,7 @@ def __init__(
652655
self.url_normalization = resources.AsyncURLNormalization(self)
653656
self.spectrum = resources.AsyncSpectrum(self)
654657
self.addressing = resources.AsyncAddressing(self)
658+
self.audit_logs = resources.AsyncAuditLogs(self)
655659
self.billing = resources.AsyncBilling(self)
656660
self.brand_protection = resources.AsyncBrandProtection(self)
657661
self.diagnostics = resources.AsyncDiagnostics(self)
@@ -910,6 +914,7 @@ def __init__(self, client: Cloudflare) -> None:
910914
self.url_normalization = resources.URLNormalizationWithRawResponse(client.url_normalization)
911915
self.spectrum = resources.SpectrumWithRawResponse(client.spectrum)
912916
self.addressing = resources.AddressingWithRawResponse(client.addressing)
917+
self.audit_logs = resources.AuditLogsWithRawResponse(client.audit_logs)
913918
self.billing = resources.BillingWithRawResponse(client.billing)
914919
self.brand_protection = resources.BrandProtectionWithRawResponse(client.brand_protection)
915920
self.diagnostics = resources.DiagnosticsWithRawResponse(client.diagnostics)
@@ -997,6 +1002,7 @@ def __init__(self, client: AsyncCloudflare) -> None:
9971002
self.url_normalization = resources.AsyncURLNormalizationWithRawResponse(client.url_normalization)
9981003
self.spectrum = resources.AsyncSpectrumWithRawResponse(client.spectrum)
9991004
self.addressing = resources.AsyncAddressingWithRawResponse(client.addressing)
1005+
self.audit_logs = resources.AsyncAuditLogsWithRawResponse(client.audit_logs)
10001006
self.billing = resources.AsyncBillingWithRawResponse(client.billing)
10011007
self.brand_protection = resources.AsyncBrandProtectionWithRawResponse(client.brand_protection)
10021008
self.diagnostics = resources.AsyncDiagnosticsWithRawResponse(client.diagnostics)
@@ -1086,6 +1092,7 @@ def __init__(self, client: Cloudflare) -> None:
10861092
self.url_normalization = resources.URLNormalizationWithStreamingResponse(client.url_normalization)
10871093
self.spectrum = resources.SpectrumWithStreamingResponse(client.spectrum)
10881094
self.addressing = resources.AddressingWithStreamingResponse(client.addressing)
1095+
self.audit_logs = resources.AuditLogsWithStreamingResponse(client.audit_logs)
10891096
self.billing = resources.BillingWithStreamingResponse(client.billing)
10901097
self.brand_protection = resources.BrandProtectionWithStreamingResponse(client.brand_protection)
10911098
self.diagnostics = resources.DiagnosticsWithStreamingResponse(client.diagnostics)
@@ -1177,6 +1184,7 @@ def __init__(self, client: AsyncCloudflare) -> None:
11771184
self.url_normalization = resources.AsyncURLNormalizationWithStreamingResponse(client.url_normalization)
11781185
self.spectrum = resources.AsyncSpectrumWithStreamingResponse(client.spectrum)
11791186
self.addressing = resources.AsyncAddressingWithStreamingResponse(client.addressing)
1187+
self.audit_logs = resources.AsyncAuditLogsWithStreamingResponse(client.audit_logs)
11801188
self.billing = resources.AsyncBillingWithStreamingResponse(client.billing)
11811189
self.brand_protection = resources.AsyncBrandProtectionWithStreamingResponse(client.brand_protection)
11821190
self.diagnostics = resources.AsyncDiagnosticsWithStreamingResponse(client.diagnostics)

src/cloudflare/resources/__init__.py

+14
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,14 @@
328328
AddressingWithStreamingResponse,
329329
AsyncAddressingWithStreamingResponse,
330330
)
331+
from .audit_logs import (
332+
AuditLogs,
333+
AsyncAuditLogs,
334+
AuditLogsWithRawResponse,
335+
AsyncAuditLogsWithRawResponse,
336+
AuditLogsWithStreamingResponse,
337+
AsyncAuditLogsWithStreamingResponse,
338+
)
331339
from .challenges import (
332340
Challenges,
333341
AsyncChallenges,
@@ -898,6 +906,12 @@
898906
"AsyncAddressingWithRawResponse",
899907
"AddressingWithStreamingResponse",
900908
"AsyncAddressingWithStreamingResponse",
909+
"AuditLogs",
910+
"AsyncAuditLogs",
911+
"AuditLogsWithRawResponse",
912+
"AsyncAuditLogsWithRawResponse",
913+
"AuditLogsWithStreamingResponse",
914+
"AsyncAuditLogsWithStreamingResponse",
901915
"Billing",
902916
"AsyncBilling",
903917
"BillingWithRawResponse",

src/cloudflare/resources/alerting/v3/destinations/pagerduty.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def link(
178178
Args:
179179
account_id: The account id
180180
181-
token_id: The token integration key
181+
token_id: The token id
182182
183183
extra_headers: Send extra headers
184184
@@ -354,7 +354,7 @@ async def link(
354354
Args:
355355
account_id: The account id
356356
357-
token_id: The token integration key
357+
token_id: The token id
358358
359359
extra_headers: Send extra headers
360360

src/cloudflare/resources/alerting/v3/destinations/webhooks.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
make_request_options,
2525
)
2626
from .....types.alerting.v3.destinations import (
27-
WebhookGetResponse,
27+
AaaWebhooks,
2828
WebhookListResponse,
2929
WebhookCreateResponse,
3030
WebhookDeleteResponse,
@@ -267,7 +267,7 @@ def get(
267267
extra_query: Query | None = None,
268268
extra_body: Body | None = None,
269269
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
270-
) -> WebhookGetResponse:
270+
) -> AaaWebhooks:
271271
"""
272272
Get details for a single webhooks destination.
273273
@@ -297,7 +297,7 @@ def get(
297297
timeout=timeout,
298298
post_parser=ResultWrapper._unwrapper,
299299
),
300-
cast_to=cast(Type[WebhookGetResponse], ResultWrapper[WebhookGetResponse]),
300+
cast_to=cast(Type[AaaWebhooks], ResultWrapper[AaaWebhooks]),
301301
)
302302

303303

@@ -532,7 +532,7 @@ async def get(
532532
extra_query: Query | None = None,
533533
extra_body: Body | None = None,
534534
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
535-
) -> WebhookGetResponse:
535+
) -> AaaWebhooks:
536536
"""
537537
Get details for a single webhooks destination.
538538
@@ -562,7 +562,7 @@ async def get(
562562
timeout=timeout,
563563
post_parser=ResultWrapper._unwrapper,
564564
),
565-
cast_to=cast(Type[WebhookGetResponse], ResultWrapper[WebhookGetResponse]),
565+
cast_to=cast(Type[AaaWebhooks], ResultWrapper[AaaWebhooks]),
566566
)
567567

568568

src/cloudflare/resources/alerting/v3/histories.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
AsyncPaginator,
2323
make_request_options,
2424
)
25-
from ....types.alerting.v3 import HistoryListResponse, history_list_params
25+
from ....types.alerting.v3 import AaaHistory, history_list_params
2626

2727
__all__ = ["Histories", "AsyncHistories"]
2828

@@ -50,7 +50,7 @@ def list(
5050
extra_query: Query | None = None,
5151
extra_body: Body | None = None,
5252
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
53-
) -> SyncV4PagePaginationArray[HistoryListResponse]:
53+
) -> SyncV4PagePaginationArray[AaaHistory]:
5454
"""Gets a list of history records for notifications sent to an account.
5555
5656
The records
@@ -82,7 +82,7 @@ def list(
8282
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
8383
return self._get_api_list(
8484
f"/accounts/{account_id}/alerting/v3/history",
85-
page=SyncV4PagePaginationArray[HistoryListResponse],
85+
page=SyncV4PagePaginationArray[AaaHistory],
8686
options=make_request_options(
8787
extra_headers=extra_headers,
8888
extra_query=extra_query,
@@ -98,7 +98,7 @@ def list(
9898
history_list_params.HistoryListParams,
9999
),
100100
),
101-
model=HistoryListResponse,
101+
model=AaaHistory,
102102
)
103103

104104

@@ -125,7 +125,7 @@ def list(
125125
extra_query: Query | None = None,
126126
extra_body: Body | None = None,
127127
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
128-
) -> AsyncPaginator[HistoryListResponse, AsyncV4PagePaginationArray[HistoryListResponse]]:
128+
) -> AsyncPaginator[AaaHistory, AsyncV4PagePaginationArray[AaaHistory]]:
129129
"""Gets a list of history records for notifications sent to an account.
130130
131131
The records
@@ -157,7 +157,7 @@ def list(
157157
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
158158
return self._get_api_list(
159159
f"/accounts/{account_id}/alerting/v3/history",
160-
page=AsyncV4PagePaginationArray[HistoryListResponse],
160+
page=AsyncV4PagePaginationArray[AaaHistory],
161161
options=make_request_options(
162162
extra_headers=extra_headers,
163163
extra_query=extra_query,
@@ -173,7 +173,7 @@ def list(
173173
history_list_params.HistoryListParams,
174174
),
175175
),
176-
model=HistoryListResponse,
176+
model=AaaHistory,
177177
)
178178

179179

src/cloudflare/resources/alerting/v3/policies.py

+5-9
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
make_request_options,
2626
)
2727
from ....types.alerting.v3 import (
28-
PolicyGetResponse,
28+
AaaPolicies,
2929
PolicyListResponse,
3030
PolicyCreateResponse,
3131
PolicyDeleteResponse,
@@ -100,7 +100,6 @@ def create(
100100
"secondary_dns_zone_validation_warning",
101101
"sentinel_alert",
102102
"stream_live_notifications",
103-
"traffic_anomalies_alert",
104103
"tunnel_health_event",
105104
"tunnel_update_event",
106105
"universal_ssl_event_type",
@@ -230,7 +229,6 @@ def update(
230229
"secondary_dns_zone_validation_warning",
231230
"sentinel_alert",
232231
"stream_live_notifications",
233-
"traffic_anomalies_alert",
234232
"tunnel_health_event",
235233
"tunnel_update_event",
236234
"universal_ssl_event_type",
@@ -409,7 +407,7 @@ def get(
409407
extra_query: Query | None = None,
410408
extra_body: Body | None = None,
411409
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
412-
) -> PolicyGetResponse:
410+
) -> AaaPolicies:
413411
"""
414412
Get details for a single policy.
415413
@@ -439,7 +437,7 @@ def get(
439437
timeout=timeout,
440438
post_parser=ResultWrapper._unwrapper,
441439
),
442-
cast_to=cast(Type[PolicyGetResponse], ResultWrapper[PolicyGetResponse]),
440+
cast_to=cast(Type[AaaPolicies], ResultWrapper[AaaPolicies]),
443441
)
444442

445443

@@ -506,7 +504,6 @@ async def create(
506504
"secondary_dns_zone_validation_warning",
507505
"sentinel_alert",
508506
"stream_live_notifications",
509-
"traffic_anomalies_alert",
510507
"tunnel_health_event",
511508
"tunnel_update_event",
512509
"universal_ssl_event_type",
@@ -636,7 +633,6 @@ async def update(
636633
"secondary_dns_zone_validation_warning",
637634
"sentinel_alert",
638635
"stream_live_notifications",
639-
"traffic_anomalies_alert",
640636
"tunnel_health_event",
641637
"tunnel_update_event",
642638
"universal_ssl_event_type",
@@ -815,7 +811,7 @@ async def get(
815811
extra_query: Query | None = None,
816812
extra_body: Body | None = None,
817813
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
818-
) -> PolicyGetResponse:
814+
) -> AaaPolicies:
819815
"""
820816
Get details for a single policy.
821817
@@ -845,7 +841,7 @@ async def get(
845841
timeout=timeout,
846842
post_parser=ResultWrapper._unwrapper,
847843
),
848-
cast_to=cast(Type[PolicyGetResponse], ResultWrapper[PolicyGetResponse]),
844+
cast_to=cast(Type[AaaPolicies], ResultWrapper[AaaPolicies]),
849845
)
850846

851847

0 commit comments

Comments
 (0)