Skip to content

Commit aa58312

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat: OpenAPI spec update via Stainless API (#107)
1 parent a0b3761 commit aa58312

28 files changed

+382
-687
lines changed

.stats.yml

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

api.md

+6-19
Original file line numberDiff line numberDiff line change
@@ -3410,18 +3410,6 @@ 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-
34253413
# Billing
34263414

34273415
## Profiles
@@ -4370,7 +4358,6 @@ Types:
43704358

43714359
```python
43724360
from cloudflare.types.alerting.v3.destinations import (
4373-
AaaPagerduty,
43744361
PagerdutyCreateResponse,
43754362
PagerdutyDeleteResponse,
43764363
PagerdutyGetResponse,
@@ -4391,11 +4378,11 @@ Types:
43914378

43924379
```python
43934380
from cloudflare.types.alerting.v3.destinations import (
4394-
AaaWebhooks,
43954381
WebhookCreateResponse,
43964382
WebhookUpdateResponse,
43974383
WebhookListResponse,
43984384
WebhookDeleteResponse,
4385+
WebhookGetResponse,
43994386
)
44004387
```
44014388

@@ -4405,31 +4392,31 @@ Methods:
44054392
- <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>
44064393
- <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>
44074394
- <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>
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>
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>
44094396

44104397
### Histories
44114398

44124399
Types:
44134400

44144401
```python
4415-
from cloudflare.types.alerting.v3 import AaaHistory
4402+
from cloudflare.types.alerting.v3 import HistoryListResponse
44164403
```
44174404

44184405
Methods:
44194406

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>
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>
44214408

44224409
### Policies
44234410

44244411
Types:
44254412

44264413
```python
44274414
from cloudflare.types.alerting.v3 import (
4428-
AaaPolicies,
44294415
PolicyCreateResponse,
44304416
PolicyUpdateResponse,
44314417
PolicyListResponse,
44324418
PolicyDeleteResponse,
4419+
PolicyGetResponse,
44334420
)
44344421
```
44354422

@@ -4439,7 +4426,7 @@ Methods:
44394426
- <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>
44404427
- <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>
44414428
- <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>
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>
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>
44434430

44444431
# D1
44454432

src/cloudflare/_client.py

-8
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ class Cloudflare(SyncAPIClient):
9191
url_normalization: resources.URLNormalization
9292
spectrum: resources.Spectrum
9393
addressing: resources.Addressing
94-
audit_logs: resources.AuditLogs
9594
billing: resources.Billing
9695
brand_protection: resources.BrandProtection
9796
diagnostics: resources.Diagnostics
@@ -244,7 +243,6 @@ def __init__(
244243
self.url_normalization = resources.URLNormalization(self)
245244
self.spectrum = resources.Spectrum(self)
246245
self.addressing = resources.Addressing(self)
247-
self.audit_logs = resources.AuditLogs(self)
248246
self.billing = resources.Billing(self)
249247
self.brand_protection = resources.BrandProtection(self)
250248
self.diagnostics = resources.Diagnostics(self)
@@ -502,7 +500,6 @@ class AsyncCloudflare(AsyncAPIClient):
502500
url_normalization: resources.AsyncURLNormalization
503501
spectrum: resources.AsyncSpectrum
504502
addressing: resources.AsyncAddressing
505-
audit_logs: resources.AsyncAuditLogs
506503
billing: resources.AsyncBilling
507504
brand_protection: resources.AsyncBrandProtection
508505
diagnostics: resources.AsyncDiagnostics
@@ -655,7 +652,6 @@ def __init__(
655652
self.url_normalization = resources.AsyncURLNormalization(self)
656653
self.spectrum = resources.AsyncSpectrum(self)
657654
self.addressing = resources.AsyncAddressing(self)
658-
self.audit_logs = resources.AsyncAuditLogs(self)
659655
self.billing = resources.AsyncBilling(self)
660656
self.brand_protection = resources.AsyncBrandProtection(self)
661657
self.diagnostics = resources.AsyncDiagnostics(self)
@@ -914,7 +910,6 @@ def __init__(self, client: Cloudflare) -> None:
914910
self.url_normalization = resources.URLNormalizationWithRawResponse(client.url_normalization)
915911
self.spectrum = resources.SpectrumWithRawResponse(client.spectrum)
916912
self.addressing = resources.AddressingWithRawResponse(client.addressing)
917-
self.audit_logs = resources.AuditLogsWithRawResponse(client.audit_logs)
918913
self.billing = resources.BillingWithRawResponse(client.billing)
919914
self.brand_protection = resources.BrandProtectionWithRawResponse(client.brand_protection)
920915
self.diagnostics = resources.DiagnosticsWithRawResponse(client.diagnostics)
@@ -1002,7 +997,6 @@ def __init__(self, client: AsyncCloudflare) -> None:
1002997
self.url_normalization = resources.AsyncURLNormalizationWithRawResponse(client.url_normalization)
1003998
self.spectrum = resources.AsyncSpectrumWithRawResponse(client.spectrum)
1004999
self.addressing = resources.AsyncAddressingWithRawResponse(client.addressing)
1005-
self.audit_logs = resources.AsyncAuditLogsWithRawResponse(client.audit_logs)
10061000
self.billing = resources.AsyncBillingWithRawResponse(client.billing)
10071001
self.brand_protection = resources.AsyncBrandProtectionWithRawResponse(client.brand_protection)
10081002
self.diagnostics = resources.AsyncDiagnosticsWithRawResponse(client.diagnostics)
@@ -1092,7 +1086,6 @@ def __init__(self, client: Cloudflare) -> None:
10921086
self.url_normalization = resources.URLNormalizationWithStreamingResponse(client.url_normalization)
10931087
self.spectrum = resources.SpectrumWithStreamingResponse(client.spectrum)
10941088
self.addressing = resources.AddressingWithStreamingResponse(client.addressing)
1095-
self.audit_logs = resources.AuditLogsWithStreamingResponse(client.audit_logs)
10961089
self.billing = resources.BillingWithStreamingResponse(client.billing)
10971090
self.brand_protection = resources.BrandProtectionWithStreamingResponse(client.brand_protection)
10981091
self.diagnostics = resources.DiagnosticsWithStreamingResponse(client.diagnostics)
@@ -1184,7 +1177,6 @@ def __init__(self, client: AsyncCloudflare) -> None:
11841177
self.url_normalization = resources.AsyncURLNormalizationWithStreamingResponse(client.url_normalization)
11851178
self.spectrum = resources.AsyncSpectrumWithStreamingResponse(client.spectrum)
11861179
self.addressing = resources.AsyncAddressingWithStreamingResponse(client.addressing)
1187-
self.audit_logs = resources.AsyncAuditLogsWithStreamingResponse(client.audit_logs)
11881180
self.billing = resources.AsyncBillingWithStreamingResponse(client.billing)
11891181
self.brand_protection = resources.AsyncBrandProtectionWithStreamingResponse(client.brand_protection)
11901182
self.diagnostics = resources.AsyncDiagnosticsWithStreamingResponse(client.diagnostics)

src/cloudflare/resources/__init__.py

-14
Original file line numberDiff line numberDiff line change
@@ -328,14 +328,6 @@
328328
AddressingWithStreamingResponse,
329329
AsyncAddressingWithStreamingResponse,
330330
)
331-
from .audit_logs import (
332-
AuditLogs,
333-
AsyncAuditLogs,
334-
AuditLogsWithRawResponse,
335-
AsyncAuditLogsWithRawResponse,
336-
AuditLogsWithStreamingResponse,
337-
AsyncAuditLogsWithStreamingResponse,
338-
)
339331
from .challenges import (
340332
Challenges,
341333
AsyncChallenges,
@@ -906,12 +898,6 @@
906898
"AsyncAddressingWithRawResponse",
907899
"AddressingWithStreamingResponse",
908900
"AsyncAddressingWithStreamingResponse",
909-
"AuditLogs",
910-
"AsyncAuditLogs",
911-
"AuditLogsWithRawResponse",
912-
"AsyncAuditLogsWithRawResponse",
913-
"AuditLogsWithStreamingResponse",
914-
"AsyncAuditLogsWithStreamingResponse",
915901
"Billing",
916902
"AsyncBilling",
917903
"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 id
181+
token_id: The token integration key
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 id
357+
token_id: The token integration key
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-
AaaWebhooks,
27+
WebhookGetResponse,
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-
) -> AaaWebhooks:
270+
) -> WebhookGetResponse:
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[AaaWebhooks], ResultWrapper[AaaWebhooks]),
300+
cast_to=cast(Type[WebhookGetResponse], ResultWrapper[WebhookGetResponse]),
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-
) -> AaaWebhooks:
535+
) -> WebhookGetResponse:
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[AaaWebhooks], ResultWrapper[AaaWebhooks]),
565+
cast_to=cast(Type[WebhookGetResponse], ResultWrapper[WebhookGetResponse]),
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 AaaHistory, history_list_params
25+
from ....types.alerting.v3 import HistoryListResponse, 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[AaaHistory]:
53+
) -> SyncV4PagePaginationArray[HistoryListResponse]:
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[AaaHistory],
85+
page=SyncV4PagePaginationArray[HistoryListResponse],
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=AaaHistory,
101+
model=HistoryListResponse,
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[AaaHistory, AsyncV4PagePaginationArray[AaaHistory]]:
128+
) -> AsyncPaginator[HistoryListResponse, AsyncV4PagePaginationArray[HistoryListResponse]]:
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[AaaHistory],
160+
page=AsyncV4PagePaginationArray[HistoryListResponse],
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=AaaHistory,
176+
model=HistoryListResponse,
177177
)
178178

179179

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

+9-5
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
make_request_options,
2626
)
2727
from ....types.alerting.v3 import (
28-
AaaPolicies,
28+
PolicyGetResponse,
2929
PolicyListResponse,
3030
PolicyCreateResponse,
3131
PolicyDeleteResponse,
@@ -100,6 +100,7 @@ def create(
100100
"secondary_dns_zone_validation_warning",
101101
"sentinel_alert",
102102
"stream_live_notifications",
103+
"traffic_anomalies_alert",
103104
"tunnel_health_event",
104105
"tunnel_update_event",
105106
"universal_ssl_event_type",
@@ -229,6 +230,7 @@ def update(
229230
"secondary_dns_zone_validation_warning",
230231
"sentinel_alert",
231232
"stream_live_notifications",
233+
"traffic_anomalies_alert",
232234
"tunnel_health_event",
233235
"tunnel_update_event",
234236
"universal_ssl_event_type",
@@ -407,7 +409,7 @@ def get(
407409
extra_query: Query | None = None,
408410
extra_body: Body | None = None,
409411
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
410-
) -> AaaPolicies:
412+
) -> PolicyGetResponse:
411413
"""
412414
Get details for a single policy.
413415
@@ -437,7 +439,7 @@ def get(
437439
timeout=timeout,
438440
post_parser=ResultWrapper._unwrapper,
439441
),
440-
cast_to=cast(Type[AaaPolicies], ResultWrapper[AaaPolicies]),
442+
cast_to=cast(Type[PolicyGetResponse], ResultWrapper[PolicyGetResponse]),
441443
)
442444

443445

@@ -504,6 +506,7 @@ async def create(
504506
"secondary_dns_zone_validation_warning",
505507
"sentinel_alert",
506508
"stream_live_notifications",
509+
"traffic_anomalies_alert",
507510
"tunnel_health_event",
508511
"tunnel_update_event",
509512
"universal_ssl_event_type",
@@ -633,6 +636,7 @@ async def update(
633636
"secondary_dns_zone_validation_warning",
634637
"sentinel_alert",
635638
"stream_live_notifications",
639+
"traffic_anomalies_alert",
636640
"tunnel_health_event",
637641
"tunnel_update_event",
638642
"universal_ssl_event_type",
@@ -811,7 +815,7 @@ async def get(
811815
extra_query: Query | None = None,
812816
extra_body: Body | None = None,
813817
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
814-
) -> AaaPolicies:
818+
) -> PolicyGetResponse:
815819
"""
816820
Get details for a single policy.
817821
@@ -841,7 +845,7 @@ async def get(
841845
timeout=timeout,
842846
post_parser=ResultWrapper._unwrapper,
843847
),
844-
cast_to=cast(Type[AaaPolicies], ResultWrapper[AaaPolicies]),
848+
cast_to=cast(Type[PolicyGetResponse], ResultWrapper[PolicyGetResponse]),
845849
)
846850

847851

0 commit comments

Comments
 (0)