Skip to content

Commit be94ae0

Browse files
chore(api): upload OpenAPI schema from api-schemas
1 parent 40b1e48 commit be94ae0

167 files changed

Lines changed: 695 additions & 11956 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 1782
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-eb90b7fb6b9b4fdf8aa58c6f60980875a8dc855114fb2f84a4998024d7087f69.yml
3-
openapi_spec_hash: 7eabd8352835bf80892dbb494fdf3ef4
1+
configured_endpoints: 1756
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b079f080cace87a18243c586559e7307e55499171d5cbf440932ad6ee8a0d65e.yml
3+
openapi_spec_hash: 64b0ff31c81d75b8ecb141a233dad48e
44
config_hash: eda5b3d9487ce675d1fadf88153b457d

api.md

Lines changed: 20 additions & 182 deletions
Large diffs are not rendered by default.

src/cloudflare/_client.py

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
rum,
4646
ssl,
4747
argo,
48-
logs,
4948
user,
5049
web3,
5150
cache,
@@ -75,7 +74,6 @@
7574
registrar,
7675
turnstile,
7776
vectorize,
78-
workflows,
7977
addressing,
8078
ai_gateway,
8179
audit_logs,
@@ -142,7 +140,6 @@
142140
from .resources.rum.rum import RUMResource, AsyncRUMResource
143141
from .resources.ssl.ssl import SSLResource, AsyncSSLResource
144142
from .resources.argo.argo import ArgoResource, AsyncArgoResource
145-
from .resources.logs.logs import LogsResource, AsyncLogsResource
146143
from .resources.pipelines import PipelinesResource, AsyncPipelinesResource
147144
from .resources.user.user import UserResource, AsyncUserResource
148145
from .resources.web3.web3 import Web3Resource, AsyncWeb3Resource
@@ -184,7 +181,6 @@
184181
from .resources.registrar.registrar import RegistrarResource, AsyncRegistrarResource
185182
from .resources.turnstile.turnstile import TurnstileResource, AsyncTurnstileResource
186183
from .resources.vectorize.vectorize import VectorizeResource, AsyncVectorizeResource
187-
from .resources.workflows.workflows import WorkflowsResource, AsyncWorkflowsResource
188184
from .resources.keyless_certificates import KeylessCertificatesResource, AsyncKeylessCertificatesResource
189185
from .resources.addressing.addressing import AddressingResource, AsyncAddressingResource
190186
from .resources.ai_gateway.ai_gateway import AIGatewayResource, AsyncAIGatewayResource
@@ -493,12 +489,6 @@ def logpush(self) -> LogpushResource:
493489

494490
return LogpushResource(self)
495491

496-
@cached_property
497-
def logs(self) -> LogsResource:
498-
from .resources.logs import LogsResource
499-
500-
return LogsResource(self)
501-
502492
@cached_property
503493
def origin_tls_client_auth(self) -> OriginTLSClientAuthResource:
504494
from .resources.origin_tls_client_auth import OriginTLSClientAuthResource
@@ -841,12 +831,6 @@ def security_txt(self) -> SecurityTXTResource:
841831

842832
return SecurityTXTResource(self)
843833

844-
@cached_property
845-
def workflows(self) -> WorkflowsResource:
846-
from .resources.workflows import WorkflowsResource
847-
848-
return WorkflowsResource(self)
849-
850834
@cached_property
851835
def resource_sharing(self) -> ResourceSharingResource:
852836
from .resources.resource_sharing import ResourceSharingResource
@@ -1325,12 +1309,6 @@ def logpush(self) -> AsyncLogpushResource:
13251309

13261310
return AsyncLogpushResource(self)
13271311

1328-
@cached_property
1329-
def logs(self) -> AsyncLogsResource:
1330-
from .resources.logs import AsyncLogsResource
1331-
1332-
return AsyncLogsResource(self)
1333-
13341312
@cached_property
13351313
def origin_tls_client_auth(self) -> AsyncOriginTLSClientAuthResource:
13361314
from .resources.origin_tls_client_auth import AsyncOriginTLSClientAuthResource
@@ -1673,12 +1651,6 @@ def security_txt(self) -> AsyncSecurityTXTResource:
16731651

16741652
return AsyncSecurityTXTResource(self)
16751653

1676-
@cached_property
1677-
def workflows(self) -> AsyncWorkflowsResource:
1678-
from .resources.workflows import AsyncWorkflowsResource
1679-
1680-
return AsyncWorkflowsResource(self)
1681-
16821654
@cached_property
16831655
def resource_sharing(self) -> AsyncResourceSharingResource:
16841656
from .resources.resource_sharing import AsyncResourceSharingResource
@@ -2085,12 +2057,6 @@ def logpush(self) -> logpush.LogpushResourceWithRawResponse:
20852057

20862058
return LogpushResourceWithRawResponse(self._client.logpush)
20872059

2088-
@cached_property
2089-
def logs(self) -> logs.LogsResourceWithRawResponse:
2090-
from .resources.logs import LogsResourceWithRawResponse
2091-
2092-
return LogsResourceWithRawResponse(self._client.logs)
2093-
20942060
@cached_property
20952061
def origin_tls_client_auth(self) -> origin_tls_client_auth.OriginTLSClientAuthResourceWithRawResponse:
20962062
from .resources.origin_tls_client_auth import OriginTLSClientAuthResourceWithRawResponse
@@ -2435,12 +2401,6 @@ def security_txt(self) -> security_txt.SecurityTXTResourceWithRawResponse:
24352401

24362402
return SecurityTXTResourceWithRawResponse(self._client.security_txt)
24372403

2438-
@cached_property
2439-
def workflows(self) -> workflows.WorkflowsResourceWithRawResponse:
2440-
from .resources.workflows import WorkflowsResourceWithRawResponse
2441-
2442-
return WorkflowsResourceWithRawResponse(self._client.workflows)
2443-
24442404
@cached_property
24452405
def resource_sharing(self) -> resource_sharing.ResourceSharingResourceWithRawResponse:
24462406
from .resources.resource_sharing import ResourceSharingResourceWithRawResponse
@@ -2664,12 +2624,6 @@ def logpush(self) -> logpush.AsyncLogpushResourceWithRawResponse:
26642624

26652625
return AsyncLogpushResourceWithRawResponse(self._client.logpush)
26662626

2667-
@cached_property
2668-
def logs(self) -> logs.AsyncLogsResourceWithRawResponse:
2669-
from .resources.logs import AsyncLogsResourceWithRawResponse
2670-
2671-
return AsyncLogsResourceWithRawResponse(self._client.logs)
2672-
26732627
@cached_property
26742628
def origin_tls_client_auth(self) -> origin_tls_client_auth.AsyncOriginTLSClientAuthResourceWithRawResponse:
26752629
from .resources.origin_tls_client_auth import AsyncOriginTLSClientAuthResourceWithRawResponse
@@ -3014,12 +2968,6 @@ def security_txt(self) -> security_txt.AsyncSecurityTXTResourceWithRawResponse:
30142968

30152969
return AsyncSecurityTXTResourceWithRawResponse(self._client.security_txt)
30162970

3017-
@cached_property
3018-
def workflows(self) -> workflows.AsyncWorkflowsResourceWithRawResponse:
3019-
from .resources.workflows import AsyncWorkflowsResourceWithRawResponse
3020-
3021-
return AsyncWorkflowsResourceWithRawResponse(self._client.workflows)
3022-
30232971
@cached_property
30242972
def resource_sharing(self) -> resource_sharing.AsyncResourceSharingResourceWithRawResponse:
30252973
from .resources.resource_sharing import AsyncResourceSharingResourceWithRawResponse
@@ -3243,12 +3191,6 @@ def logpush(self) -> logpush.LogpushResourceWithStreamingResponse:
32433191

32443192
return LogpushResourceWithStreamingResponse(self._client.logpush)
32453193

3246-
@cached_property
3247-
def logs(self) -> logs.LogsResourceWithStreamingResponse:
3248-
from .resources.logs import LogsResourceWithStreamingResponse
3249-
3250-
return LogsResourceWithStreamingResponse(self._client.logs)
3251-
32523194
@cached_property
32533195
def origin_tls_client_auth(self) -> origin_tls_client_auth.OriginTLSClientAuthResourceWithStreamingResponse:
32543196
from .resources.origin_tls_client_auth import OriginTLSClientAuthResourceWithStreamingResponse
@@ -3593,12 +3535,6 @@ def security_txt(self) -> security_txt.SecurityTXTResourceWithStreamingResponse:
35933535

35943536
return SecurityTXTResourceWithStreamingResponse(self._client.security_txt)
35953537

3596-
@cached_property
3597-
def workflows(self) -> workflows.WorkflowsResourceWithStreamingResponse:
3598-
from .resources.workflows import WorkflowsResourceWithStreamingResponse
3599-
3600-
return WorkflowsResourceWithStreamingResponse(self._client.workflows)
3601-
36023538
@cached_property
36033539
def resource_sharing(self) -> resource_sharing.ResourceSharingResourceWithStreamingResponse:
36043540
from .resources.resource_sharing import ResourceSharingResourceWithStreamingResponse
@@ -3824,12 +3760,6 @@ def logpush(self) -> logpush.AsyncLogpushResourceWithStreamingResponse:
38243760

38253761
return AsyncLogpushResourceWithStreamingResponse(self._client.logpush)
38263762

3827-
@cached_property
3828-
def logs(self) -> logs.AsyncLogsResourceWithStreamingResponse:
3829-
from .resources.logs import AsyncLogsResourceWithStreamingResponse
3830-
3831-
return AsyncLogsResourceWithStreamingResponse(self._client.logs)
3832-
38333763
@cached_property
38343764
def origin_tls_client_auth(self) -> origin_tls_client_auth.AsyncOriginTLSClientAuthResourceWithStreamingResponse:
38353765
from .resources.origin_tls_client_auth import AsyncOriginTLSClientAuthResourceWithStreamingResponse
@@ -4180,12 +4110,6 @@ def security_txt(self) -> security_txt.AsyncSecurityTXTResourceWithStreamingResp
41804110

41814111
return AsyncSecurityTXTResourceWithStreamingResponse(self._client.security_txt)
41824112

4183-
@cached_property
4184-
def workflows(self) -> workflows.AsyncWorkflowsResourceWithStreamingResponse:
4185-
from .resources.workflows import AsyncWorkflowsResourceWithStreamingResponse
4186-
4187-
return AsyncWorkflowsResourceWithStreamingResponse(self._client.workflows)
4188-
41894113
@cached_property
41904114
def resource_sharing(self) -> resource_sharing.AsyncResourceSharingResourceWithStreamingResponse:
41914115
from .resources.resource_sharing import AsyncResourceSharingResourceWithStreamingResponse

src/cloudflare/resources/ai_gateway/ai_gateway.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ def update(
194194
log_management_strategy: Optional[Literal["STOP_INSERTING", "DELETE_OLDEST"]] | NotGiven = NOT_GIVEN,
195195
logpush: bool | NotGiven = NOT_GIVEN,
196196
logpush_public_key: Optional[str] | NotGiven = NOT_GIVEN,
197+
store_id: Optional[str] | NotGiven = NOT_GIVEN,
197198
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
198199
# The extra values given here take precedence over values defined on the client or passed to this method.
199200
extra_headers: Headers | None = None,
@@ -234,6 +235,7 @@ def update(
234235
"log_management_strategy": log_management_strategy,
235236
"logpush": logpush,
236237
"logpush_public_key": logpush_public_key,
238+
"store_id": store_id,
237239
},
238240
ai_gateway_update_params.AIGatewayUpdateParams,
239241
),
@@ -506,6 +508,7 @@ async def update(
506508
log_management_strategy: Optional[Literal["STOP_INSERTING", "DELETE_OLDEST"]] | NotGiven = NOT_GIVEN,
507509
logpush: bool | NotGiven = NOT_GIVEN,
508510
logpush_public_key: Optional[str] | NotGiven = NOT_GIVEN,
511+
store_id: Optional[str] | NotGiven = NOT_GIVEN,
509512
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
510513
# The extra values given here take precedence over values defined on the client or passed to this method.
511514
extra_headers: Headers | None = None,
@@ -546,6 +549,7 @@ async def update(
546549
"log_management_strategy": log_management_strategy,
547550
"logpush": logpush,
548551
"logpush_public_key": logpush_public_key,
552+
"store_id": store_id,
549553
},
550554
ai_gateway_update_params.AIGatewayUpdateParams,
551555
),

src/cloudflare/resources/browser_rendering/json.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ def create(
8080
authenticate: json_create_params.Authenticate | NotGiven = NOT_GIVEN,
8181
best_attempt: bool | NotGiven = NOT_GIVEN,
8282
cookies: Iterable[json_create_params.Cookie] | NotGiven = NOT_GIVEN,
83+
custom_ai: Iterable[json_create_params.CustomAI] | NotGiven = NOT_GIVEN,
8384
emulate_media_type: str | NotGiven = NOT_GIVEN,
8485
goto_options: json_create_params.GotoOptions | NotGiven = NOT_GIVEN,
8586
html: str | NotGiven = NOT_GIVEN,
@@ -153,6 +154,10 @@ def create(
153154
154155
cookies: Check [options](https://pptr.dev/api/puppeteer.page.setcookie).
155156
157+
custom_ai: Optional list of custom AI models to use for the request. The models will be
158+
tried in the order provided, and in case a model returns an error, the next one
159+
will be used as fallback.
160+
156161
goto_options: Check [options](https://pptr.dev/api/puppeteer.gotooptions).
157162
158163
html: Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or
@@ -195,6 +200,7 @@ def create(
195200
"authenticate": authenticate,
196201
"best_attempt": best_attempt,
197202
"cookies": cookies,
203+
"custom_ai": custom_ai,
198204
"emulate_media_type": emulate_media_type,
199205
"goto_options": goto_options,
200206
"html": html,
@@ -279,6 +285,7 @@ async def create(
279285
authenticate: json_create_params.Authenticate | NotGiven = NOT_GIVEN,
280286
best_attempt: bool | NotGiven = NOT_GIVEN,
281287
cookies: Iterable[json_create_params.Cookie] | NotGiven = NOT_GIVEN,
288+
custom_ai: Iterable[json_create_params.CustomAI] | NotGiven = NOT_GIVEN,
282289
emulate_media_type: str | NotGiven = NOT_GIVEN,
283290
goto_options: json_create_params.GotoOptions | NotGiven = NOT_GIVEN,
284291
html: str | NotGiven = NOT_GIVEN,
@@ -352,6 +359,10 @@ async def create(
352359
353360
cookies: Check [options](https://pptr.dev/api/puppeteer.page.setcookie).
354361
362+
custom_ai: Optional list of custom AI models to use for the request. The models will be
363+
tried in the order provided, and in case a model returns an error, the next one
364+
will be used as fallback.
365+
355366
goto_options: Check [options](https://pptr.dev/api/puppeteer.gotooptions).
356367
357368
html: Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or
@@ -394,6 +405,7 @@ async def create(
394405
"authenticate": authenticate,
395406
"best_attempt": best_attempt,
396407
"cookies": cookies,
408+
"custom_ai": custom_ai,
397409
"emulate_media_type": emulate_media_type,
398410
"goto_options": goto_options,
399411
"html": html,

src/cloudflare/resources/durable_objects/namespaces/namespaces.py

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
AsyncObjectsResourceWithStreamingResponse,
1414
)
1515
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
16+
from ...._utils import maybe_transform
1617
from ...._compat import cached_property
1718
from ...._resource import SyncAPIResource, AsyncAPIResource
1819
from ...._response import (
@@ -21,8 +22,9 @@
2122
async_to_raw_response_wrapper,
2223
async_to_streamed_response_wrapper,
2324
)
24-
from ....pagination import SyncSinglePage, AsyncSinglePage
25+
from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
2526
from ...._base_client import AsyncPaginator, make_request_options
27+
from ....types.durable_objects import namespace_list_params
2628
from ....types.durable_objects.namespace import Namespace
2729

2830
__all__ = ["NamespacesResource", "AsyncNamespacesResource"]
@@ -56,19 +58,25 @@ def list(
5658
self,
5759
*,
5860
account_id: str,
61+
page: int | NotGiven = NOT_GIVEN,
62+
per_page: int | NotGiven = NOT_GIVEN,
5963
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6064
# The extra values given here take precedence over values defined on the client or passed to this method.
6165
extra_headers: Headers | None = None,
6266
extra_query: Query | None = None,
6367
extra_body: Body | None = None,
6468
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
65-
) -> SyncSinglePage[Namespace]:
69+
) -> SyncV4PagePaginationArray[Namespace]:
6670
"""
6771
Returns the Durable Object namespaces owned by an account.
6872
6973
Args:
7074
account_id: Identifier.
7175
76+
page: Current page.
77+
78+
per_page: Items per-page.
79+
7280
extra_headers: Send extra headers
7381
7482
extra_query: Add additional query parameters to the request
@@ -81,9 +89,19 @@ def list(
8189
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
8290
return self._get_api_list(
8391
f"/accounts/{account_id}/workers/durable_objects/namespaces",
84-
page=SyncSinglePage[Namespace],
92+
page=SyncV4PagePaginationArray[Namespace],
8593
options=make_request_options(
86-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
94+
extra_headers=extra_headers,
95+
extra_query=extra_query,
96+
extra_body=extra_body,
97+
timeout=timeout,
98+
query=maybe_transform(
99+
{
100+
"page": page,
101+
"per_page": per_page,
102+
},
103+
namespace_list_params.NamespaceListParams,
104+
),
87105
),
88106
model=Namespace,
89107
)
@@ -117,19 +135,25 @@ def list(
117135
self,
118136
*,
119137
account_id: str,
138+
page: int | NotGiven = NOT_GIVEN,
139+
per_page: int | NotGiven = NOT_GIVEN,
120140
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
121141
# The extra values given here take precedence over values defined on the client or passed to this method.
122142
extra_headers: Headers | None = None,
123143
extra_query: Query | None = None,
124144
extra_body: Body | None = None,
125145
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
126-
) -> AsyncPaginator[Namespace, AsyncSinglePage[Namespace]]:
146+
) -> AsyncPaginator[Namespace, AsyncV4PagePaginationArray[Namespace]]:
127147
"""
128148
Returns the Durable Object namespaces owned by an account.
129149
130150
Args:
131151
account_id: Identifier.
132152
153+
page: Current page.
154+
155+
per_page: Items per-page.
156+
133157
extra_headers: Send extra headers
134158
135159
extra_query: Add additional query parameters to the request
@@ -142,9 +166,19 @@ def list(
142166
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
143167
return self._get_api_list(
144168
f"/accounts/{account_id}/workers/durable_objects/namespaces",
145-
page=AsyncSinglePage[Namespace],
169+
page=AsyncV4PagePaginationArray[Namespace],
146170
options=make_request_options(
147-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
171+
extra_headers=extra_headers,
172+
extra_query=extra_query,
173+
extra_body=extra_body,
174+
timeout=timeout,
175+
query=maybe_transform(
176+
{
177+
"page": page,
178+
"per_page": per_page,
179+
},
180+
namespace_list_params.NamespaceListParams,
181+
),
148182
),
149183
model=Namespace,
150184
)

0 commit comments

Comments
 (0)