Skip to content

Commit 1a01a4c

Browse files
feat(api): api update
1 parent 7d95ee9 commit 1a01a4c

32 files changed

Lines changed: 123 additions & 1386 deletions

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 1783
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e408a7cdec2dae3d1a18842dcc59280c56050fb042569139aec3fe0f12e0d461.yml
3-
openapi_spec_hash: 7e210c76f5dd4c79b3e67204ad279b81
1+
configured_endpoints: 1781
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7bea25aa2ecf5263456a917858800dceeeb1b026bd91c2a8f634f29f6a82186f.yml
3+
openapi_spec_hash: 932e8170cf032407cc8f0bd756bc61bd
44
config_hash: a433f3793b734bc6fcc9d9e0c27ff8c2

api.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7241,32 +7241,6 @@ Methods:
72417241
- <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>
72427242
- <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>
72437243

7244-
### Bots
7245-
7246-
#### Summary
7247-
7248-
Types:
7249-
7250-
```python
7251-
from cloudflare.types.radar.ai.bots import SummaryUserAgentResponse
7252-
```
7253-
7254-
Methods:
7255-
7256-
- <code title="get /radar/ai/bots/summary/user_agent">client.radar.ai.bots.summary.<a href="./src/cloudflare/resources/radar/ai/bots/summary.py">user_agent</a>(\*\*<a href="src/cloudflare/types/radar/ai/bots/summary_user_agent_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/ai/bots/summary_user_agent_response.py">SummaryUserAgentResponse</a></code>
7257-
7258-
### TimeseriesGroups
7259-
7260-
Types:
7261-
7262-
```python
7263-
from cloudflare.types.radar.ai import TimeseriesGroupUserAgentResponse
7264-
```
7265-
7266-
Methods:
7267-
7268-
- <code title="get /radar/ai/bots/timeseries_groups/user_agent">client.radar.ai.timeseries_groups.<a href="./src/cloudflare/resources/radar/ai/timeseries_groups.py">user_agent</a>(\*\*<a href="src/cloudflare/types/radar/ai/timeseries_group_user_agent_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/ai/timeseries_group_user_agent_response.py">TimeseriesGroupUserAgentResponse</a></code>
7269-
72707244
## Annotations
72717245

72727246
Types:

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/r2/buckets/domains/custom.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

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

88
import httpx
@@ -57,6 +57,7 @@ def create(
5757
domain: str,
5858
enabled: bool,
5959
zone_id: str,
60+
ciphers: List[str] | NotGiven = NOT_GIVEN,
6061
min_tls: Literal["1.0", "1.1", "1.2", "1.3"] | NotGiven = NOT_GIVEN,
6162
jurisdiction: Literal["default", "eu", "fedramp"] | NotGiven = NOT_GIVEN,
6263
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -81,6 +82,9 @@ def create(
8182
8283
zone_id: Zone ID of the custom domain.
8384
85+
ciphers: An allowlist of ciphers for TLS termination. These ciphers must be in the
86+
BoringSSL format.
87+
8488
min_tls: Minimum TLS Version the custom domain will accept for incoming connections. If
8589
not set, defaults to 1.0.
8690
@@ -109,6 +113,7 @@ def create(
109113
"domain": domain,
110114
"enabled": enabled,
111115
"zone_id": zone_id,
116+
"ciphers": ciphers,
112117
"min_tls": min_tls,
113118
},
114119
custom_create_params.CustomCreateParams,
@@ -129,6 +134,7 @@ def update(
129134
*,
130135
account_id: str,
131136
bucket_name: str,
137+
ciphers: List[str] | NotGiven = NOT_GIVEN,
132138
enabled: bool | NotGiven = NOT_GIVEN,
133139
min_tls: Literal["1.0", "1.1", "1.2", "1.3"] | NotGiven = NOT_GIVEN,
134140
jurisdiction: Literal["default", "eu", "fedramp"] | NotGiven = NOT_GIVEN,
@@ -149,6 +155,9 @@ def update(
149155
150156
domain: Name of the custom domain.
151157
158+
ciphers: An allowlist of ciphers for TLS termination. These ciphers must be in the
159+
BoringSSL format.
160+
152161
enabled: Whether to enable public bucket access at the specified custom domain.
153162
154163
min_tls: Minimum TLS Version the custom domain will accept for incoming connections. If
@@ -178,6 +187,7 @@ def update(
178187
f"/accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom/{domain}",
179188
body=maybe_transform(
180189
{
190+
"ciphers": ciphers,
181191
"enabled": enabled,
182192
"min_tls": min_tls,
183193
},
@@ -385,6 +395,7 @@ async def create(
385395
domain: str,
386396
enabled: bool,
387397
zone_id: str,
398+
ciphers: List[str] | NotGiven = NOT_GIVEN,
388399
min_tls: Literal["1.0", "1.1", "1.2", "1.3"] | NotGiven = NOT_GIVEN,
389400
jurisdiction: Literal["default", "eu", "fedramp"] | NotGiven = NOT_GIVEN,
390401
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -409,6 +420,9 @@ async def create(
409420
410421
zone_id: Zone ID of the custom domain.
411422
423+
ciphers: An allowlist of ciphers for TLS termination. These ciphers must be in the
424+
BoringSSL format.
425+
412426
min_tls: Minimum TLS Version the custom domain will accept for incoming connections. If
413427
not set, defaults to 1.0.
414428
@@ -437,6 +451,7 @@ async def create(
437451
"domain": domain,
438452
"enabled": enabled,
439453
"zone_id": zone_id,
454+
"ciphers": ciphers,
440455
"min_tls": min_tls,
441456
},
442457
custom_create_params.CustomCreateParams,
@@ -457,6 +472,7 @@ async def update(
457472
*,
458473
account_id: str,
459474
bucket_name: str,
475+
ciphers: List[str] | NotGiven = NOT_GIVEN,
460476
enabled: bool | NotGiven = NOT_GIVEN,
461477
min_tls: Literal["1.0", "1.1", "1.2", "1.3"] | NotGiven = NOT_GIVEN,
462478
jurisdiction: Literal["default", "eu", "fedramp"] | NotGiven = NOT_GIVEN,
@@ -477,6 +493,9 @@ async def update(
477493
478494
domain: Name of the custom domain.
479495
496+
ciphers: An allowlist of ciphers for TLS termination. These ciphers must be in the
497+
BoringSSL format.
498+
480499
enabled: Whether to enable public bucket access at the specified custom domain.
481500
482501
min_tls: Minimum TLS Version the custom domain will accept for incoming connections. If
@@ -506,6 +525,7 @@ async def update(
506525
f"/accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom/{domain}",
507526
body=await async_maybe_transform(
508527
{
528+
"ciphers": ciphers,
509529
"enabled": enabled,
510530
"min_tls": min_tls,
511531
},

src/cloudflare/resources/radar/ai/__init__.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,6 @@
88
AIResourceWithStreamingResponse,
99
AsyncAIResourceWithStreamingResponse,
1010
)
11-
from .bots import (
12-
BotsResource,
13-
AsyncBotsResource,
14-
BotsResourceWithRawResponse,
15-
AsyncBotsResourceWithRawResponse,
16-
BotsResourceWithStreamingResponse,
17-
AsyncBotsResourceWithStreamingResponse,
18-
)
1911
from .inference import (
2012
InferenceResource,
2113
AsyncInferenceResource,
@@ -32,14 +24,6 @@
3224
ToMarkdownResourceWithStreamingResponse,
3325
AsyncToMarkdownResourceWithStreamingResponse,
3426
)
35-
from .timeseries_groups import (
36-
TimeseriesGroupsResource,
37-
AsyncTimeseriesGroupsResource,
38-
TimeseriesGroupsResourceWithRawResponse,
39-
AsyncTimeseriesGroupsResourceWithRawResponse,
40-
TimeseriesGroupsResourceWithStreamingResponse,
41-
AsyncTimeseriesGroupsResourceWithStreamingResponse,
42-
)
4327

4428
__all__ = [
4529
"ToMarkdownResource",
@@ -54,18 +38,6 @@
5438
"AsyncInferenceResourceWithRawResponse",
5539
"InferenceResourceWithStreamingResponse",
5640
"AsyncInferenceResourceWithStreamingResponse",
57-
"BotsResource",
58-
"AsyncBotsResource",
59-
"BotsResourceWithRawResponse",
60-
"AsyncBotsResourceWithRawResponse",
61-
"BotsResourceWithStreamingResponse",
62-
"AsyncBotsResourceWithStreamingResponse",
63-
"TimeseriesGroupsResource",
64-
"AsyncTimeseriesGroupsResource",
65-
"TimeseriesGroupsResourceWithRawResponse",
66-
"AsyncTimeseriesGroupsResourceWithRawResponse",
67-
"TimeseriesGroupsResourceWithStreamingResponse",
68-
"AsyncTimeseriesGroupsResourceWithStreamingResponse",
6941
"AIResource",
7042
"AsyncAIResource",
7143
"AIResourceWithRawResponse",

src/cloudflare/resources/radar/ai/ai.py

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,6 @@
22

33
from __future__ import annotations
44

5-
from .bots.bots import (
6-
BotsResource,
7-
AsyncBotsResource,
8-
BotsResourceWithRawResponse,
9-
AsyncBotsResourceWithRawResponse,
10-
BotsResourceWithStreamingResponse,
11-
AsyncBotsResourceWithStreamingResponse,
12-
)
135
from ...._compat import cached_property
146
from .to_markdown import (
157
ToMarkdownResource,
@@ -20,14 +12,6 @@
2012
AsyncToMarkdownResourceWithStreamingResponse,
2113
)
2214
from ...._resource import SyncAPIResource, AsyncAPIResource
23-
from .timeseries_groups import (
24-
TimeseriesGroupsResource,
25-
AsyncTimeseriesGroupsResource,
26-
TimeseriesGroupsResourceWithRawResponse,
27-
AsyncTimeseriesGroupsResourceWithRawResponse,
28-
TimeseriesGroupsResourceWithStreamingResponse,
29-
AsyncTimeseriesGroupsResourceWithStreamingResponse,
30-
)
3115
from .inference.inference import (
3216
InferenceResource,
3317
AsyncInferenceResource,
@@ -49,14 +33,6 @@ def to_markdown(self) -> ToMarkdownResource:
4933
def inference(self) -> InferenceResource:
5034
return InferenceResource(self._client)
5135

52-
@cached_property
53-
def bots(self) -> BotsResource:
54-
return BotsResource(self._client)
55-
56-
@cached_property
57-
def timeseries_groups(self) -> TimeseriesGroupsResource:
58-
return TimeseriesGroupsResource(self._client)
59-
6036
@cached_property
6137
def with_raw_response(self) -> AIResourceWithRawResponse:
6238
"""
@@ -86,14 +62,6 @@ def to_markdown(self) -> AsyncToMarkdownResource:
8662
def inference(self) -> AsyncInferenceResource:
8763
return AsyncInferenceResource(self._client)
8864

89-
@cached_property
90-
def bots(self) -> AsyncBotsResource:
91-
return AsyncBotsResource(self._client)
92-
93-
@cached_property
94-
def timeseries_groups(self) -> AsyncTimeseriesGroupsResource:
95-
return AsyncTimeseriesGroupsResource(self._client)
96-
9765
@cached_property
9866
def with_raw_response(self) -> AsyncAIResourceWithRawResponse:
9967
"""
@@ -126,14 +94,6 @@ def to_markdown(self) -> ToMarkdownResourceWithRawResponse:
12694
def inference(self) -> InferenceResourceWithRawResponse:
12795
return InferenceResourceWithRawResponse(self._ai.inference)
12896

129-
@cached_property
130-
def bots(self) -> BotsResourceWithRawResponse:
131-
return BotsResourceWithRawResponse(self._ai.bots)
132-
133-
@cached_property
134-
def timeseries_groups(self) -> TimeseriesGroupsResourceWithRawResponse:
135-
return TimeseriesGroupsResourceWithRawResponse(self._ai.timeseries_groups)
136-
13797

13898
class AsyncAIResourceWithRawResponse:
13999
def __init__(self, ai: AsyncAIResource) -> None:
@@ -147,14 +107,6 @@ def to_markdown(self) -> AsyncToMarkdownResourceWithRawResponse:
147107
def inference(self) -> AsyncInferenceResourceWithRawResponse:
148108
return AsyncInferenceResourceWithRawResponse(self._ai.inference)
149109

150-
@cached_property
151-
def bots(self) -> AsyncBotsResourceWithRawResponse:
152-
return AsyncBotsResourceWithRawResponse(self._ai.bots)
153-
154-
@cached_property
155-
def timeseries_groups(self) -> AsyncTimeseriesGroupsResourceWithRawResponse:
156-
return AsyncTimeseriesGroupsResourceWithRawResponse(self._ai.timeseries_groups)
157-
158110

159111
class AIResourceWithStreamingResponse:
160112
def __init__(self, ai: AIResource) -> None:
@@ -168,14 +120,6 @@ def to_markdown(self) -> ToMarkdownResourceWithStreamingResponse:
168120
def inference(self) -> InferenceResourceWithStreamingResponse:
169121
return InferenceResourceWithStreamingResponse(self._ai.inference)
170122

171-
@cached_property
172-
def bots(self) -> BotsResourceWithStreamingResponse:
173-
return BotsResourceWithStreamingResponse(self._ai.bots)
174-
175-
@cached_property
176-
def timeseries_groups(self) -> TimeseriesGroupsResourceWithStreamingResponse:
177-
return TimeseriesGroupsResourceWithStreamingResponse(self._ai.timeseries_groups)
178-
179123

180124
class AsyncAIResourceWithStreamingResponse:
181125
def __init__(self, ai: AsyncAIResource) -> None:
@@ -188,11 +132,3 @@ def to_markdown(self) -> AsyncToMarkdownResourceWithStreamingResponse:
188132
@cached_property
189133
def inference(self) -> AsyncInferenceResourceWithStreamingResponse:
190134
return AsyncInferenceResourceWithStreamingResponse(self._ai.inference)
191-
192-
@cached_property
193-
def bots(self) -> AsyncBotsResourceWithStreamingResponse:
194-
return AsyncBotsResourceWithStreamingResponse(self._ai.bots)
195-
196-
@cached_property
197-
def timeseries_groups(self) -> AsyncTimeseriesGroupsResourceWithStreamingResponse:
198-
return AsyncTimeseriesGroupsResourceWithStreamingResponse(self._ai.timeseries_groups)

0 commit comments

Comments
 (0)