Skip to content

Commit 4a19fdc

Browse files
feat(api): api update
1 parent a9d663c commit 4a19fdc

103 files changed

Lines changed: 6224 additions & 1026 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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 1781
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3ec774bdf5de1d462e90eef2ae707df91819ae8426bbd28e1968eae25f86b0a4.yml
3-
openapi_spec_hash: 494018bf95f397e1cdd863dd5c5a33a9
4-
config_hash: 11218d4e895d6852fa70acc77ad5da3d
1+
configured_endpoints: 1790
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-405704dec8d5041847ab820752a75813fe0e8ceabb72f42ba840ced58c0f8643.yml
3+
openapi_spec_hash: 56d7b6b4cd0ca89589c3e6fa53b28225
4+
config_hash: 320699f1f989d92845c2558a970acd18

api.md

Lines changed: 75 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -809,10 +809,16 @@ Methods:
809809

810810
## SmartRouting
811811

812+
Types:
813+
814+
```python
815+
from cloudflare.types.argo import SmartRoutingEditResponse, SmartRoutingGetResponse
816+
```
817+
812818
Methods:
813819

814-
- <code title="patch /zones/{zone_id}/argo/smart_routing">client.argo.smart_routing.<a href="./src/cloudflare/resources/argo/smart_routing.py">edit</a>(\*, zone_id, \*\*<a href="src/cloudflare/types/argo/smart_routing_edit_params.py">params</a>) -> object</code>
815-
- <code title="get /zones/{zone_id}/argo/smart_routing">client.argo.smart_routing.<a href="./src/cloudflare/resources/argo/smart_routing.py">get</a>(\*, zone_id) -> object</code>
820+
- <code title="patch /zones/{zone_id}/argo/smart_routing">client.argo.smart_routing.<a href="./src/cloudflare/resources/argo/smart_routing.py">edit</a>(\*, zone_id, \*\*<a href="src/cloudflare/types/argo/smart_routing_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/argo/smart_routing_edit_response.py">SmartRoutingEditResponse</a></code>
821+
- <code title="get /zones/{zone_id}/argo/smart_routing">client.argo.smart_routing.<a href="./src/cloudflare/resources/argo/smart_routing.py">get</a>(\*, zone_id) -> <a href="./src/cloudflare/types/argo/smart_routing_get_response.py">SmartRoutingGetResponse</a></code>
816822

817823
## TieredCaching
818824

@@ -2390,19 +2396,18 @@ Types:
23902396

23912397
```python
23922398
from cloudflare.types.workers.scripts import (
2393-
DeploymentCreateResponse,
2399+
Deployment,
23942400
DeploymentListResponse,
23952401
DeploymentDeleteResponse,
2396-
DeploymentGetResponse,
23972402
)
23982403
```
23992404

24002405
Methods:
24012406

2402-
- <code title="post /accounts/{account_id}/workers/scripts/{script_name}/deployments">client.workers.scripts.deployments.<a href="./src/cloudflare/resources/workers/scripts/deployments.py">create</a>(script_name, \*, account_id, \*\*<a href="src/cloudflare/types/workers/scripts/deployment_create_params.py">params</a>) -> <a href="./src/cloudflare/types/workers/scripts/deployment_create_response.py">DeploymentCreateResponse</a></code>
2407+
- <code title="post /accounts/{account_id}/workers/scripts/{script_name}/deployments">client.workers.scripts.deployments.<a href="./src/cloudflare/resources/workers/scripts/deployments.py">create</a>(script_name, \*, account_id, \*\*<a href="src/cloudflare/types/workers/scripts/deployment_create_params.py">params</a>) -> <a href="./src/cloudflare/types/workers/scripts/deployment.py">Deployment</a></code>
24032408
- <code title="get /accounts/{account_id}/workers/scripts/{script_name}/deployments">client.workers.scripts.deployments.<a href="./src/cloudflare/resources/workers/scripts/deployments.py">list</a>(script_name, \*, account_id) -> <a href="./src/cloudflare/types/workers/scripts/deployment_list_response.py">DeploymentListResponse</a></code>
24042409
- <code title="delete /accounts/{account_id}/workers/scripts/{script_name}/deployments/{deployment_id}">client.workers.scripts.deployments.<a href="./src/cloudflare/resources/workers/scripts/deployments.py">delete</a>(deployment_id, \*, account_id, script_name) -> <a href="./src/cloudflare/types/workers/scripts/deployment_delete_response.py">DeploymentDeleteResponse</a></code>
2405-
- <code title="get /accounts/{account_id}/workers/scripts/{script_name}/deployments/{deployment_id}">client.workers.scripts.deployments.<a href="./src/cloudflare/resources/workers/scripts/deployments.py">get</a>(deployment_id, \*, account_id, script_name) -> <a href="./src/cloudflare/types/workers/scripts/deployment_get_response.py">DeploymentGetResponse</a></code>
2410+
- <code title="get /accounts/{account_id}/workers/scripts/{script_name}/deployments/{deployment_id}">client.workers.scripts.deployments.<a href="./src/cloudflare/resources/workers/scripts/deployments.py">get</a>(deployment_id, \*, account_id, script_name) -> <a href="./src/cloudflare/types/workers/scripts/deployment.py">Deployment</a></code>
24062411

24072412
### Versions
24082413

@@ -2526,6 +2531,7 @@ Types:
25262531

25272532
```python
25282533
from cloudflare.types.kv import (
2534+
Any,
25292535
Namespace,
25302536
NamespaceDeleteResponse,
25312537
NamespaceBulkDeleteResponse,
@@ -2569,7 +2575,7 @@ Methods:
25692575

25702576
Methods:
25712577

2572-
- <code title="get /accounts/{account_id}/storage/kv/namespaces/{namespace_id}/metadata/{key_name}">client.kv.namespaces.metadata.<a href="./src/cloudflare/resources/kv/namespaces/metadata.py">get</a>(key_name, \*, account_id, namespace_id) -> object</code>
2578+
- <code title="get /accounts/{account_id}/storage/kv/namespaces/{namespace_id}/metadata/{key_name}">client.kv.namespaces.metadata.<a href="./src/cloudflare/resources/kv/namespaces/metadata.py">get</a>(key_name, \*, account_id, namespace_id) -> <a href="./src/cloudflare/types/kv/any.py">object</a></code>
25732579

25742580
### Values
25752581

@@ -7196,18 +7202,6 @@ Methods:
71967202

71977203
## AI
71987204

7199-
### ToMarkdown
7200-
7201-
Types:
7202-
7203-
```python
7204-
from cloudflare.types.radar.ai import ToMarkdownCreateResponse
7205-
```
7206-
7207-
Methods:
7208-
7209-
- <code title="post /accounts/{account_id}/ai/tomarkdown">client.radar.ai.to_markdown.<a href="./src/cloudflare/resources/radar/ai/to_markdown.py">create</a>(body, \*, account_id, \*\*<a href="src/cloudflare/types/radar/ai/to_markdown_create_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/ai/to_markdown_create_response.py">SyncSinglePage[ToMarkdownCreateResponse]</a></code>
7210-
72117205
### Inference
72127206

72137207
#### Summary
@@ -7241,6 +7235,24 @@ Methods:
72417235
- <code title="get /radar/ai/inference/timeseries_groups/model">client.radar.ai.inference.timeseries_groups.summary.<a href="./src/cloudflare/resources/radar/ai/inference/timeseries_groups/summary.py">model</a>(\*\*<a href="src/cloudflare/types/radar/ai/inference/timeseries_groups/summary_model_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/ai/inference/timeseries_groups/summary_model_response.py">SummaryModelResponse</a></code>
72427236
- <code title="get /radar/ai/inference/timeseries_groups/task">client.radar.ai.inference.timeseries_groups.summary.<a href="./src/cloudflare/resources/radar/ai/inference/timeseries_groups/summary.py">task</a>(\*\*<a href="src/cloudflare/types/radar/ai/inference/timeseries_groups/summary_task_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/ai/inference/timeseries_groups/summary_task_response.py">SummaryTaskResponse</a></code>
72437237

7238+
### Bots
7239+
7240+
Types:
7241+
7242+
```python
7243+
from cloudflare.types.radar.ai import (
7244+
BotSummaryResponse,
7245+
BotTimeseriesResponse,
7246+
BotTimeseriesGroupsResponse,
7247+
)
7248+
```
7249+
7250+
Methods:
7251+
7252+
- <code title="get /radar/ai/bots/summary/{dimension}">client.radar.ai.bots.<a href="./src/cloudflare/resources/radar/ai/bots.py">summary</a>(dimension, \*\*<a href="src/cloudflare/types/radar/ai/bot_summary_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/ai/bot_summary_response.py">BotSummaryResponse</a></code>
7253+
- <code title="get /radar/ai/bots/timeseries">client.radar.ai.bots.<a href="./src/cloudflare/resources/radar/ai/bots.py">timeseries</a>(\*\*<a href="src/cloudflare/types/radar/ai/bot_timeseries_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/ai/bot_timeseries_response.py">BotTimeseriesResponse</a></code>
7254+
- <code title="get /radar/ai/bots/timeseries_groups/{dimension}">client.radar.ai.bots.<a href="./src/cloudflare/resources/radar/ai/bots.py">timeseries_groups</a>(dimension, \*\*<a href="src/cloudflare/types/radar/ai/bot_timeseries_groups_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/ai/bot_timeseries_groups_response.py">BotTimeseriesGroupsResponse</a></code>
7255+
72447256
## Annotations
72457257

72467258
Types:
@@ -7403,6 +7415,50 @@ Methods:
74037415
- <code title="get /radar/bots/crawlers/summary/{dimension}">client.radar.bots.web_crawlers.<a href="./src/cloudflare/resources/radar/bots/web_crawlers.py">summary</a>(dimension, \*\*<a href="src/cloudflare/types/radar/bots/web_crawler_summary_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/bots/web_crawler_summary_response.py">WebCrawlerSummaryResponse</a></code>
74047416
- <code title="get /radar/bots/crawlers/timeseries_groups/{dimension}">client.radar.bots.web_crawlers.<a href="./src/cloudflare/resources/radar/bots/web_crawlers.py">timeseries_groups</a>(dimension, \*\*<a href="src/cloudflare/types/radar/bots/web_crawler_timeseries_groups_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/bots/web_crawler_timeseries_groups_response.py">WebCrawlerTimeseriesGroupsResponse</a></code>
74057417

7418+
## Ct
7419+
7420+
Types:
7421+
7422+
```python
7423+
from cloudflare.types.radar import (
7424+
CtSummaryResponse,
7425+
CtTimeseriesResponse,
7426+
CtTimeseriesGroupsResponse,
7427+
)
7428+
```
7429+
7430+
Methods:
7431+
7432+
- <code title="get /radar/ct/summary/{dimension}">client.radar.ct.<a href="./src/cloudflare/resources/radar/ct/ct.py">summary</a>(dimension, \*\*<a href="src/cloudflare/types/radar/ct_summary_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/ct_summary_response.py">CtSummaryResponse</a></code>
7433+
- <code title="get /radar/ct/timeseries">client.radar.ct.<a href="./src/cloudflare/resources/radar/ct/ct.py">timeseries</a>(\*\*<a href="src/cloudflare/types/radar/ct_timeseries_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/ct_timeseries_response.py">CtTimeseriesResponse</a></code>
7434+
- <code title="get /radar/ct/timeseries_groups/{dimension}">client.radar.ct.<a href="./src/cloudflare/resources/radar/ct/ct.py">timeseries_groups</a>(dimension, \*\*<a href="src/cloudflare/types/radar/ct_timeseries_groups_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/ct_timeseries_groups_response.py">CtTimeseriesGroupsResponse</a></code>
7435+
7436+
### Authorities
7437+
7438+
Types:
7439+
7440+
```python
7441+
from cloudflare.types.radar.ct import AuthorityListResponse, AuthorityGetResponse
7442+
```
7443+
7444+
Methods:
7445+
7446+
- <code title="get /radar/ct/authorities">client.radar.ct.authorities.<a href="./src/cloudflare/resources/radar/ct/authorities.py">list</a>(\*\*<a href="src/cloudflare/types/radar/ct/authority_list_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/ct/authority_list_response.py">AuthorityListResponse</a></code>
7447+
- <code title="get /radar/ct/authorities/{ca_slug}">client.radar.ct.authorities.<a href="./src/cloudflare/resources/radar/ct/authorities.py">get</a>(ca_slug, \*\*<a href="src/cloudflare/types/radar/ct/authority_get_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/ct/authority_get_response.py">AuthorityGetResponse</a></code>
7448+
7449+
### Logs
7450+
7451+
Types:
7452+
7453+
```python
7454+
from cloudflare.types.radar.ct import LogListResponse, LogGetResponse
7455+
```
7456+
7457+
Methods:
7458+
7459+
- <code title="get /radar/ct/logs">client.radar.ct.logs.<a href="./src/cloudflare/resources/radar/ct/logs.py">list</a>(\*\*<a href="src/cloudflare/types/radar/ct/log_list_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/ct/log_list_response.py">LogListResponse</a></code>
7460+
- <code title="get /radar/ct/logs/{log_slug}">client.radar.ct.logs.<a href="./src/cloudflare/resources/radar/ct/logs.py">get</a>(log_slug, \*\*<a href="src/cloudflare/types/radar/ct/log_get_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/ct/log_get_response.py">LogGetResponse</a></code>
7461+
74067462
## Datasets
74077463

74087464
Types:

src/cloudflare/resources/argo/smart_routing.py

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Type, Optional, cast
5+
from typing import Type, cast
66
from typing_extensions import Literal
77

88
import httpx
@@ -20,6 +20,8 @@
2020
from ..._wrappers import ResultWrapper
2121
from ...types.argo import smart_routing_edit_params
2222
from ..._base_client import make_request_options
23+
from ...types.argo.smart_routing_get_response import SmartRoutingGetResponse
24+
from ...types.argo.smart_routing_edit_response import SmartRoutingEditResponse
2325

2426
__all__ = ["SmartRoutingResource", "AsyncSmartRoutingResource"]
2527

@@ -55,14 +57,14 @@ def edit(
5557
extra_query: Query | None = None,
5658
extra_body: Body | None = None,
5759
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
58-
) -> object:
60+
) -> SmartRoutingEditResponse:
5961
"""
6062
Configures the value of the Argo Smart Routing enablement setting.
6163
6264
Args:
6365
zone_id: Specifies the zone associated with the API call.
6466
65-
value: Enables Argo Smart Routing.
67+
value: Specifies the enablement value of Argo Smart Routing.
6668
6769
extra_headers: Send extra headers
6870
@@ -82,9 +84,9 @@ def edit(
8284
extra_query=extra_query,
8385
extra_body=extra_body,
8486
timeout=timeout,
85-
post_parser=ResultWrapper[Optional[object]]._unwrapper,
87+
post_parser=ResultWrapper[SmartRoutingEditResponse]._unwrapper,
8688
),
87-
cast_to=cast(Type[object], ResultWrapper[object]),
89+
cast_to=cast(Type[SmartRoutingEditResponse], ResultWrapper[SmartRoutingEditResponse]),
8890
)
8991

9092
def get(
@@ -97,7 +99,7 @@ def get(
9799
extra_query: Query | None = None,
98100
extra_body: Body | None = None,
99101
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
100-
) -> object:
102+
) -> SmartRoutingGetResponse:
101103
"""
102104
Retrieves the value of Argo Smart Routing enablement setting.
103105
@@ -121,9 +123,9 @@ def get(
121123
extra_query=extra_query,
122124
extra_body=extra_body,
123125
timeout=timeout,
124-
post_parser=ResultWrapper[Optional[object]]._unwrapper,
126+
post_parser=ResultWrapper[SmartRoutingGetResponse]._unwrapper,
125127
),
126-
cast_to=cast(Type[object], ResultWrapper[object]),
128+
cast_to=cast(Type[SmartRoutingGetResponse], ResultWrapper[SmartRoutingGetResponse]),
127129
)
128130

129131

@@ -158,14 +160,14 @@ async def edit(
158160
extra_query: Query | None = None,
159161
extra_body: Body | None = None,
160162
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
161-
) -> object:
163+
) -> SmartRoutingEditResponse:
162164
"""
163165
Configures the value of the Argo Smart Routing enablement setting.
164166
165167
Args:
166168
zone_id: Specifies the zone associated with the API call.
167169
168-
value: Enables Argo Smart Routing.
170+
value: Specifies the enablement value of Argo Smart Routing.
169171
170172
extra_headers: Send extra headers
171173
@@ -185,9 +187,9 @@ async def edit(
185187
extra_query=extra_query,
186188
extra_body=extra_body,
187189
timeout=timeout,
188-
post_parser=ResultWrapper[Optional[object]]._unwrapper,
190+
post_parser=ResultWrapper[SmartRoutingEditResponse]._unwrapper,
189191
),
190-
cast_to=cast(Type[object], ResultWrapper[object]),
192+
cast_to=cast(Type[SmartRoutingEditResponse], ResultWrapper[SmartRoutingEditResponse]),
191193
)
192194

193195
async def get(
@@ -200,7 +202,7 @@ async def get(
200202
extra_query: Query | None = None,
201203
extra_body: Body | None = None,
202204
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
203-
) -> object:
205+
) -> SmartRoutingGetResponse:
204206
"""
205207
Retrieves the value of Argo Smart Routing enablement setting.
206208
@@ -224,9 +226,9 @@ async def get(
224226
extra_query=extra_query,
225227
extra_body=extra_body,
226228
timeout=timeout,
227-
post_parser=ResultWrapper[Optional[object]]._unwrapper,
229+
post_parser=ResultWrapper[SmartRoutingGetResponse]._unwrapper,
228230
),
229-
cast_to=cast(Type[object], ResultWrapper[object]),
231+
cast_to=cast(Type[SmartRoutingGetResponse], ResultWrapper[SmartRoutingGetResponse]),
230232
)
231233

232234

src/cloudflare/resources/kv/namespaces/values.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
)
2727
from ...._wrappers import ResultWrapper
2828
from ...._base_client import make_request_options
29+
from ....types.kv.any_param import AnyParam
2930
from ....types.kv.namespaces import value_update_params
3031
from ....types.kv.namespaces.value_delete_response import ValueDeleteResponse
3132
from ....types.kv.namespaces.value_update_response import ValueUpdateResponse
@@ -62,7 +63,7 @@ def update(
6263
value: str,
6364
expiration: float | NotGiven = NOT_GIVEN,
6465
expiration_ttl: float | NotGiven = NOT_GIVEN,
65-
metadata: object | NotGiven = NOT_GIVEN,
66+
metadata: AnyParam | NotGiven = NOT_GIVEN,
6667
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6768
# The extra values given here take precedence over values defined on the client or passed to this method.
6869
extra_headers: Headers | None = None,
@@ -274,7 +275,7 @@ async def update(
274275
value: str,
275276
expiration: float | NotGiven = NOT_GIVEN,
276277
expiration_ttl: float | NotGiven = NOT_GIVEN,
277-
metadata: object | NotGiven = NOT_GIVEN,
278+
metadata: AnyParam | NotGiven = NOT_GIVEN,
278279
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
279280
# The extra values given here take precedence over values defined on the client or passed to this method.
280281
extra_headers: Headers | None = None,

0 commit comments

Comments
 (0)