Skip to content

Commit 053f18f

Browse files
feat(api): api update
1 parent 9cce5ac commit 053f18f

194 files changed

Lines changed: 13364 additions & 947 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: 1754
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-10b3e60b93764f161c5b7a9f250787e96cce6b64f7362ac7b11010230dc94afb.yml
3-
openapi_spec_hash: 66e1a1e665b68d9f52d9a58a7b554ec6
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
44
config_hash: eda5b3d9487ce675d1fadf88153b457d

api.md

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

src/cloudflare/_client.py

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
rum,
4646
ssl,
4747
argo,
48+
logs,
4849
user,
4950
web3,
5051
cache,
@@ -74,6 +75,7 @@
7475
registrar,
7576
turnstile,
7677
vectorize,
78+
workflows,
7779
addressing,
7880
ai_gateway,
7981
audit_logs,
@@ -140,6 +142,7 @@
140142
from .resources.rum.rum import RUMResource, AsyncRUMResource
141143
from .resources.ssl.ssl import SSLResource, AsyncSSLResource
142144
from .resources.argo.argo import ArgoResource, AsyncArgoResource
145+
from .resources.logs.logs import LogsResource, AsyncLogsResource
143146
from .resources.pipelines import PipelinesResource, AsyncPipelinesResource
144147
from .resources.user.user import UserResource, AsyncUserResource
145148
from .resources.web3.web3 import Web3Resource, AsyncWeb3Resource
@@ -181,6 +184,7 @@
181184
from .resources.registrar.registrar import RegistrarResource, AsyncRegistrarResource
182185
from .resources.turnstile.turnstile import TurnstileResource, AsyncTurnstileResource
183186
from .resources.vectorize.vectorize import VectorizeResource, AsyncVectorizeResource
187+
from .resources.workflows.workflows import WorkflowsResource, AsyncWorkflowsResource
184188
from .resources.keyless_certificates import KeylessCertificatesResource, AsyncKeylessCertificatesResource
185189
from .resources.addressing.addressing import AddressingResource, AsyncAddressingResource
186190
from .resources.ai_gateway.ai_gateway import AIGatewayResource, AsyncAIGatewayResource
@@ -489,6 +493,12 @@ def logpush(self) -> LogpushResource:
489493

490494
return LogpushResource(self)
491495

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

832842
return SecurityTXTResource(self)
833843

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

13101326
return AsyncLogpushResource(self)
13111327

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

16521674
return AsyncSecurityTXTResource(self)
16531675

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

20582086
return LogpushResourceWithRawResponse(self._client.logpush)
20592087

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

24022436
return SecurityTXTResourceWithRawResponse(self._client.security_txt)
24032437

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

26252665
return AsyncLogpushResourceWithRawResponse(self._client.logpush)
26262666

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

29693015
return AsyncSecurityTXTResourceWithRawResponse(self._client.security_txt)
29703016

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

31923244
return LogpushResourceWithStreamingResponse(self._client.logpush)
31933245

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

35363594
return SecurityTXTResourceWithStreamingResponse(self._client.security_txt)
35373595

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

37613825
return AsyncLogpushResourceWithStreamingResponse(self._client.logpush)
37623826

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

41114181
return AsyncSecurityTXTResourceWithStreamingResponse(self._client.security_txt)
41124182

4183+
@cached_property
4184+
def workflows(self) -> workflows.AsyncWorkflowsResourceWithStreamingResponse:
4185+
from .resources.workflows import AsyncWorkflowsResourceWithStreamingResponse
4186+
4187+
return AsyncWorkflowsResourceWithStreamingResponse(self._client.workflows)
4188+
41134189
@cached_property
41144190
def resource_sharing(self) -> resource_sharing.AsyncResourceSharingResourceWithStreamingResponse:
41154191
from .resources.resource_sharing import AsyncResourceSharingResourceWithStreamingResponse

src/cloudflare/resources/ai/ai.py

Lines changed: 2 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -875,45 +875,6 @@ def run(
875875
"""
876876
...
877877

878-
@overload
879-
def run(
880-
self,
881-
model_name: str,
882-
*,
883-
account_id: str,
884-
image: str | NotGiven = NOT_GIVEN,
885-
text: List[str] | NotGiven = NOT_GIVEN,
886-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
887-
# The extra values given here take precedence over values defined on the client or passed to this method.
888-
extra_headers: Headers | None = None,
889-
extra_query: Query | None = None,
890-
extra_body: Body | None = None,
891-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
892-
) -> Optional[AIRunResponse]:
893-
"""
894-
This endpoint provides users with the capability to run specific AI models
895-
on-demand.
896-
897-
By submitting the required input data, users can receive real-time predictions
898-
or results generated by the chosen AI model. The endpoint supports various AI
899-
model types, ensuring flexibility and adaptability for diverse use cases.
900-
901-
Model specific inputs available in
902-
[Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/).
903-
904-
Args:
905-
image: Image in base64 encoded format.
906-
907-
extra_headers: Send extra headers
908-
909-
extra_query: Add additional query parameters to the request
910-
911-
extra_body: Add additional JSON properties to the request
912-
913-
timeout: Override the client-level default timeout for this request, in seconds
914-
"""
915-
...
916-
917878
@required_args(
918879
["account_id", "text"],
919880
["account_id", "prompt"],
@@ -931,7 +892,7 @@ def run(
931892
model_name: str,
932893
*,
933894
account_id: str,
934-
text: str | Union[str, List[str]] | List[str] | NotGiven = NOT_GIVEN,
895+
text: str | Union[str, List[str]] | NotGiven = NOT_GIVEN,
935896
prompt: str | NotGiven = NOT_GIVEN,
936897
guidance: float | NotGiven = NOT_GIVEN,
937898
height: int | NotGiven = NOT_GIVEN,
@@ -1849,45 +1810,6 @@ async def run(
18491810
"""
18501811
...
18511812

1852-
@overload
1853-
async def run(
1854-
self,
1855-
model_name: str,
1856-
*,
1857-
account_id: str,
1858-
image: str | NotGiven = NOT_GIVEN,
1859-
text: List[str] | NotGiven = NOT_GIVEN,
1860-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1861-
# The extra values given here take precedence over values defined on the client or passed to this method.
1862-
extra_headers: Headers | None = None,
1863-
extra_query: Query | None = None,
1864-
extra_body: Body | None = None,
1865-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1866-
) -> Optional[AIRunResponse]:
1867-
"""
1868-
This endpoint provides users with the capability to run specific AI models
1869-
on-demand.
1870-
1871-
By submitting the required input data, users can receive real-time predictions
1872-
or results generated by the chosen AI model. The endpoint supports various AI
1873-
model types, ensuring flexibility and adaptability for diverse use cases.
1874-
1875-
Model specific inputs available in
1876-
[Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/).
1877-
1878-
Args:
1879-
image: Image in base64 encoded format.
1880-
1881-
extra_headers: Send extra headers
1882-
1883-
extra_query: Add additional query parameters to the request
1884-
1885-
extra_body: Add additional JSON properties to the request
1886-
1887-
timeout: Override the client-level default timeout for this request, in seconds
1888-
"""
1889-
...
1890-
18911813
@required_args(
18921814
["account_id", "text"],
18931815
["account_id", "prompt"],
@@ -1905,7 +1827,7 @@ async def run(
19051827
model_name: str,
19061828
*,
19071829
account_id: str,
1908-
text: str | Union[str, List[str]] | List[str] | NotGiven = NOT_GIVEN,
1830+
text: str | Union[str, List[str]] | NotGiven = NOT_GIVEN,
19091831
prompt: str | NotGiven = NOT_GIVEN,
19101832
guidance: float | NotGiven = NOT_GIVEN,
19111833
height: int | NotGiven = NOT_GIVEN,

src/cloudflare/resources/ai_gateway/ai_gateway.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ 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,
198197
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
199198
# The extra values given here take precedence over values defined on the client or passed to this method.
200199
extra_headers: Headers | None = None,
@@ -235,7 +234,6 @@ def update(
235234
"log_management_strategy": log_management_strategy,
236235
"logpush": logpush,
237236
"logpush_public_key": logpush_public_key,
238-
"store_id": store_id,
239237
},
240238
ai_gateway_update_params.AIGatewayUpdateParams,
241239
),
@@ -508,7 +506,6 @@ async def update(
508506
log_management_strategy: Optional[Literal["STOP_INSERTING", "DELETE_OLDEST"]] | NotGiven = NOT_GIVEN,
509507
logpush: bool | NotGiven = NOT_GIVEN,
510508
logpush_public_key: Optional[str] | NotGiven = NOT_GIVEN,
511-
store_id: Optional[str] | NotGiven = NOT_GIVEN,
512509
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
513510
# The extra values given here take precedence over values defined on the client or passed to this method.
514511
extra_headers: Headers | None = None,
@@ -549,7 +546,6 @@ async def update(
549546
"log_management_strategy": log_management_strategy,
550547
"logpush": logpush,
551548
"logpush_public_key": logpush_public_key,
552-
"store_id": store_id,
553549
},
554550
ai_gateway_update_params.AIGatewayUpdateParams,
555551
),

src/cloudflare/resources/browser_rendering/json.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ 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,
8483
emulate_media_type: str | NotGiven = NOT_GIVEN,
8584
goto_options: json_create_params.GotoOptions | NotGiven = NOT_GIVEN,
8685
html: str | NotGiven = NOT_GIVEN,
@@ -154,10 +153,6 @@ def create(
154153
155154
cookies: Check [options](https://pptr.dev/api/puppeteer.page.setcookie).
156155
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-
161156
goto_options: Check [options](https://pptr.dev/api/puppeteer.gotooptions).
162157
163158
html: Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or
@@ -200,7 +195,6 @@ def create(
200195
"authenticate": authenticate,
201196
"best_attempt": best_attempt,
202197
"cookies": cookies,
203-
"custom_ai": custom_ai,
204198
"emulate_media_type": emulate_media_type,
205199
"goto_options": goto_options,
206200
"html": html,
@@ -285,7 +279,6 @@ async def create(
285279
authenticate: json_create_params.Authenticate | NotGiven = NOT_GIVEN,
286280
best_attempt: bool | NotGiven = NOT_GIVEN,
287281
cookies: Iterable[json_create_params.Cookie] | NotGiven = NOT_GIVEN,
288-
custom_ai: Iterable[json_create_params.CustomAI] | NotGiven = NOT_GIVEN,
289282
emulate_media_type: str | NotGiven = NOT_GIVEN,
290283
goto_options: json_create_params.GotoOptions | NotGiven = NOT_GIVEN,
291284
html: str | NotGiven = NOT_GIVEN,
@@ -359,10 +352,6 @@ async def create(
359352
360353
cookies: Check [options](https://pptr.dev/api/puppeteer.page.setcookie).
361354
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-
366355
goto_options: Check [options](https://pptr.dev/api/puppeteer.gotooptions).
367356
368357
html: Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or
@@ -405,7 +394,6 @@ async def create(
405394
"authenticate": authenticate,
406395
"best_attempt": best_attempt,
407396
"cookies": cookies,
408-
"custom_ai": custom_ai,
409397
"emulate_media_type": emulate_media_type,
410398
"goto_options": goto_options,
411399
"html": html,

0 commit comments

Comments
 (0)