Skip to content

Commit 3b3e2d5

Browse files
chore(api): update composite API spec
1 parent 8c1a679 commit 3b3e2d5

105 files changed

Lines changed: 2878 additions & 672 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: 1995
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-28b84a5db03b38290dfe7ef1de2c68feb68762d7a8f207bdbea4d39a7aeef1ea.yml
3-
openapi_spec_hash: ba6bd61621e4be20b581f4f3bf0978d3
1+
configured_endpoints: 1996
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c0d713a413cf8be82c2ba4c521c453a128f1bdc4038355f2a8176369f152c2f4.yml
3+
openapi_spec_hash: 9b9b440902b29ee45ad21b9a22c24c40
44
config_hash: d1101915de2a8b526a1fe20a9f7314ca

api.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3779,10 +3779,6 @@ Types:
37793779
from cloudflare.types.intel import IPList
37803780
```
37813781

3782-
Methods:
3783-
3784-
- <code title="get /accounts/{account_id}/intel/ip-list">client.intel.ip_lists.<a href="./src/cloudflare/resources/intel/ip_lists.py">get</a>(\*, account_id) -> <a href="./src/cloudflare/types/intel/ip_list.py">SyncSinglePage[IPList]</a></code>
3785-
37863782
## Miscategorizations
37873783

37883784
Types:
@@ -9154,6 +9150,19 @@ Methods:
91549150
- <code title="put /zones/{zone_id}/bot_management">client.bot_management.<a href="./src/cloudflare/resources/bot_management.py">update</a>(\*, zone_id, \*\*<a href="src/cloudflare/types/bot_management/bot_management_update_params.py">params</a>) -> <a href="./src/cloudflare/types/bot_management/bot_management_update_response.py">Optional[BotManagementUpdateResponse]</a></code>
91559151
- <code title="get /zones/{zone_id}/bot_management">client.bot_management.<a href="./src/cloudflare/resources/bot_management.py">get</a>(\*, zone_id) -> <a href="./src/cloudflare/types/bot_management/bot_management_get_response.py">Optional[BotManagementGetResponse]</a></code>
91569152

9153+
# Fraud
9154+
9155+
Types:
9156+
9157+
```python
9158+
from cloudflare.types.fraud import FraudSettings
9159+
```
9160+
9161+
Methods:
9162+
9163+
- <code title="put /zones/{zone_id}/fraud_detection/settings">client.fraud.<a href="./src/cloudflare/resources/fraud.py">update</a>(\*, zone_id, \*\*<a href="src/cloudflare/types/fraud/fraud_update_params.py">params</a>) -> <a href="./src/cloudflare/types/fraud/fraud_settings.py">Optional[FraudSettings]</a></code>
9164+
- <code title="get /zones/{zone_id}/fraud_detection/settings">client.fraud.<a href="./src/cloudflare/resources/fraud.py">get</a>(\*, zone_id) -> <a href="./src/cloudflare/types/fraud/fraud_settings.py">Optional[FraudSettings]</a></code>
9165+
91579166
# OriginPostQuantumEncryption
91589167

91599168
Types:

src/cloudflare/_client.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
web3,
5151
cache,
5252
calls,
53+
fraud,
5354
intel,
5455
pages,
5556
radar,
@@ -139,6 +140,7 @@
139140
from .resources.ips import IPsResource, AsyncIPsResource
140141
from .resources.ai.ai import AIResource, AsyncAIResource
141142
from .resources.d1.d1 import D1Resource, AsyncD1Resource
143+
from .resources.fraud import FraudResource, AsyncFraudResource
142144
from .resources.kv.kv import KVResource, AsyncKVResource
143145
from .resources.r2.r2 import R2Resource, AsyncR2Resource
144146
from .resources.acm.acm import ACMResource, AsyncACMResource
@@ -793,6 +795,12 @@ def bot_management(self) -> BotManagementResource:
793795

794796
return BotManagementResource(self)
795797

798+
@cached_property
799+
def fraud(self) -> FraudResource:
800+
from .resources.fraud import FraudResource
801+
802+
return FraudResource(self)
803+
796804
@cached_property
797805
def origin_post_quantum_encryption(self) -> OriginPostQuantumEncryptionResource:
798806
from .resources.origin_post_quantum_encryption import OriginPostQuantumEncryptionResource
@@ -1653,6 +1661,12 @@ def bot_management(self) -> AsyncBotManagementResource:
16531661

16541662
return AsyncBotManagementResource(self)
16551663

1664+
@cached_property
1665+
def fraud(self) -> AsyncFraudResource:
1666+
from .resources.fraud import AsyncFraudResource
1667+
1668+
return AsyncFraudResource(self)
1669+
16561670
@cached_property
16571671
def origin_post_quantum_encryption(self) -> AsyncOriginPostQuantumEncryptionResource:
16581672
from .resources.origin_post_quantum_encryption import AsyncOriginPostQuantumEncryptionResource
@@ -2441,6 +2455,12 @@ def bot_management(self) -> bot_management.BotManagementResourceWithRawResponse:
24412455

24422456
return BotManagementResourceWithRawResponse(self._client.bot_management)
24432457

2458+
@cached_property
2459+
def fraud(self) -> fraud.FraudResourceWithRawResponse:
2460+
from .resources.fraud import FraudResourceWithRawResponse
2461+
2462+
return FraudResourceWithRawResponse(self._client.fraud)
2463+
24442464
@cached_property
24452465
def origin_post_quantum_encryption(
24462466
self,
@@ -3056,6 +3076,12 @@ def bot_management(self) -> bot_management.AsyncBotManagementResourceWithRawResp
30563076

30573077
return AsyncBotManagementResourceWithRawResponse(self._client.bot_management)
30583078

3079+
@cached_property
3080+
def fraud(self) -> fraud.AsyncFraudResourceWithRawResponse:
3081+
from .resources.fraud import AsyncFraudResourceWithRawResponse
3082+
3083+
return AsyncFraudResourceWithRawResponse(self._client.fraud)
3084+
30593085
@cached_property
30603086
def origin_post_quantum_encryption(
30613087
self,
@@ -3671,6 +3697,12 @@ def bot_management(self) -> bot_management.BotManagementResourceWithStreamingRes
36713697

36723698
return BotManagementResourceWithStreamingResponse(self._client.bot_management)
36733699

3700+
@cached_property
3701+
def fraud(self) -> fraud.FraudResourceWithStreamingResponse:
3702+
from .resources.fraud import FraudResourceWithStreamingResponse
3703+
3704+
return FraudResourceWithStreamingResponse(self._client.fraud)
3705+
36743706
@cached_property
36753707
def origin_post_quantum_encryption(
36763708
self,
@@ -4290,6 +4322,12 @@ def bot_management(self) -> bot_management.AsyncBotManagementResourceWithStreami
42904322

42914323
return AsyncBotManagementResourceWithStreamingResponse(self._client.bot_management)
42924324

4325+
@cached_property
4326+
def fraud(self) -> fraud.AsyncFraudResourceWithStreamingResponse:
4327+
from .resources.fraud import AsyncFraudResourceWithStreamingResponse
4328+
4329+
return AsyncFraudResourceWithStreamingResponse(self._client.fraud)
4330+
42934331
@cached_property
42944332
def origin_post_quantum_encryption(
42954333
self,

src/cloudflare/resources/aisearch/instances/instances.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ def create(
8181
account_id: str,
8282
id: str,
8383
source: str,
84-
token_id: str,
8584
type: Literal["r2", "web-crawler"],
8685
ai_gateway_id: str | Omit = omit,
8786
aisearch_model: Literal[
@@ -117,10 +116,10 @@ def create(
117116
chunk_overlap: int | Omit = omit,
118117
chunk_size: int | Omit = omit,
119118
embedding_model: Literal[
119+
"@cf/qwen/qwen3-embedding-0.6b",
120120
"@cf/baai/bge-m3",
121121
"@cf/baai/bge-large-en-v1.5",
122122
"@cf/google/embeddinggemma-300m",
123-
"@cf/qwen/qwen3-embedding-0.6b",
124123
"google-ai-studio/gemini-embedding-001",
125124
"openai/text-embedding-3-small",
126125
"openai/text-embedding-3-large",
@@ -165,6 +164,7 @@ def create(
165164
rewrite_query: bool | Omit = omit,
166165
score_threshold: float | Omit = omit,
167166
source_params: instance_create_params.SourceParams | Omit = omit,
167+
token_id: str | Omit = omit,
168168
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
169169
# The extra values given here take precedence over values defined on the client or passed to this method.
170170
extra_headers: Headers | None = None,
@@ -194,7 +194,6 @@ def create(
194194
{
195195
"id": id,
196196
"source": source,
197-
"token_id": token_id,
198197
"type": type,
199198
"ai_gateway_id": ai_gateway_id,
200199
"aisearch_model": aisearch_model,
@@ -212,6 +211,7 @@ def create(
212211
"rewrite_query": rewrite_query,
213212
"score_threshold": score_threshold,
214213
"source_params": source_params,
214+
"token_id": token_id,
215215
},
216216
instance_create_params.InstanceCreateParams,
217217
),
@@ -267,10 +267,10 @@ def update(
267267
chunk_overlap: int | Omit = omit,
268268
chunk_size: int | Omit = omit,
269269
embedding_model: Literal[
270+
"@cf/qwen/qwen3-embedding-0.6b",
270271
"@cf/baai/bge-m3",
271272
"@cf/baai/bge-large-en-v1.5",
272273
"@cf/google/embeddinggemma-300m",
273-
"@cf/qwen/qwen3-embedding-0.6b",
274274
"google-ai-studio/gemini-embedding-001",
275275
"openai/text-embedding-3-small",
276276
"openai/text-embedding-3-large",
@@ -628,7 +628,6 @@ async def create(
628628
account_id: str,
629629
id: str,
630630
source: str,
631-
token_id: str,
632631
type: Literal["r2", "web-crawler"],
633632
ai_gateway_id: str | Omit = omit,
634633
aisearch_model: Literal[
@@ -664,10 +663,10 @@ async def create(
664663
chunk_overlap: int | Omit = omit,
665664
chunk_size: int | Omit = omit,
666665
embedding_model: Literal[
666+
"@cf/qwen/qwen3-embedding-0.6b",
667667
"@cf/baai/bge-m3",
668668
"@cf/baai/bge-large-en-v1.5",
669669
"@cf/google/embeddinggemma-300m",
670-
"@cf/qwen/qwen3-embedding-0.6b",
671670
"google-ai-studio/gemini-embedding-001",
672671
"openai/text-embedding-3-small",
673672
"openai/text-embedding-3-large",
@@ -712,6 +711,7 @@ async def create(
712711
rewrite_query: bool | Omit = omit,
713712
score_threshold: float | Omit = omit,
714713
source_params: instance_create_params.SourceParams | Omit = omit,
714+
token_id: str | Omit = omit,
715715
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
716716
# The extra values given here take precedence over values defined on the client or passed to this method.
717717
extra_headers: Headers | None = None,
@@ -741,7 +741,6 @@ async def create(
741741
{
742742
"id": id,
743743
"source": source,
744-
"token_id": token_id,
745744
"type": type,
746745
"ai_gateway_id": ai_gateway_id,
747746
"aisearch_model": aisearch_model,
@@ -759,6 +758,7 @@ async def create(
759758
"rewrite_query": rewrite_query,
760759
"score_threshold": score_threshold,
761760
"source_params": source_params,
761+
"token_id": token_id,
762762
},
763763
instance_create_params.InstanceCreateParams,
764764
),
@@ -814,10 +814,10 @@ async def update(
814814
chunk_overlap: int | Omit = omit,
815815
chunk_size: int | Omit = omit,
816816
embedding_model: Literal[
817+
"@cf/qwen/qwen3-embedding-0.6b",
817818
"@cf/baai/bge-m3",
818819
"@cf/baai/bge-large-en-v1.5",
819820
"@cf/google/embeddinggemma-300m",
820-
"@cf/qwen/qwen3-embedding-0.6b",
821821
"google-ai-studio/gemini-embedding-001",
822822
"openai/text-embedding-3-small",
823823
"openai/text-embedding-3-large",

src/cloudflare/resources/aisearch/instances/items.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def get(
116116
timeout: float | httpx.Timeout | None | NotGiven = not_given,
117117
) -> ItemGetResponse:
118118
"""
119-
Get Items.
119+
Get Item.
120120
121121
Args:
122122
id: Use your AI Search ID.
@@ -237,7 +237,7 @@ async def get(
237237
timeout: float | httpx.Timeout | None | NotGiven = not_given,
238238
) -> ItemGetResponse:
239239
"""
240-
Get Items.
240+
Get Item.
241241
242242
Args:
243243
id: Use your AI Search ID.

0 commit comments

Comments
 (0)