Skip to content

Commit 9cce5ac

Browse files
chore(api): update composite API spec
1 parent 2bfa20a commit 9cce5ac

29 files changed

Lines changed: 255 additions & 1411 deletions

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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
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
44
config_hash: eda5b3d9487ce675d1fadf88153b457d

api.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7149,32 +7149,6 @@ Methods:
71497149
- <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>
71507150
- <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>
71517151

7152-
### Bots
7153-
7154-
#### Summary
7155-
7156-
Types:
7157-
7158-
```python
7159-
from cloudflare.types.radar.ai.bots import SummaryUserAgentResponse
7160-
```
7161-
7162-
Methods:
7163-
7164-
- <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>
7165-
7166-
### TimeseriesGroups
7167-
7168-
Types:
7169-
7170-
```python
7171-
from cloudflare.types.radar.ai import TimeseriesGroupUserAgentResponse
7172-
```
7173-
7174-
Methods:
7175-
7176-
- <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>
7177-
71787152
## Annotations
71797153

71807154
Types:

src/cloudflare/resources/ai/ai.py

Lines changed: 80 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -875,6 +875,45 @@ 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+
878917
@required_args(
879918
["account_id", "text"],
880919
["account_id", "prompt"],
@@ -892,7 +931,7 @@ def run(
892931
model_name: str,
893932
*,
894933
account_id: str,
895-
text: str | Union[str, List[str]] | NotGiven = NOT_GIVEN,
934+
text: str | Union[str, List[str]] | List[str] | NotGiven = NOT_GIVEN,
896935
prompt: str | NotGiven = NOT_GIVEN,
897936
guidance: float | NotGiven = NOT_GIVEN,
898937
height: int | NotGiven = NOT_GIVEN,
@@ -1810,6 +1849,45 @@ async def run(
18101849
"""
18111850
...
18121851

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+
18131891
@required_args(
18141892
["account_id", "text"],
18151893
["account_id", "prompt"],
@@ -1827,7 +1905,7 @@ async def run(
18271905
model_name: str,
18281906
*,
18291907
account_id: str,
1830-
text: str | Union[str, List[str]] | NotGiven = NOT_GIVEN,
1908+
text: str | Union[str, List[str]] | List[str] | NotGiven = NOT_GIVEN,
18311909
prompt: str | NotGiven = NOT_GIVEN,
18321910
guidance: float | NotGiven = NOT_GIVEN,
18331911
height: int | NotGiven = NOT_GIVEN,

src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py

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

33
from __future__ import annotations
44

5-
from typing import List, Union, Iterable
5+
from typing import List, Union, Iterable, Optional
66
from datetime import datetime
77
from typing_extensions import Literal
88

@@ -198,7 +198,7 @@ def create(
198198
raw: threat_event_create_params.Raw,
199199
tlp: str,
200200
body_account_id: float | NotGiven = NOT_GIVEN,
201-
attacker: str | NotGiven = NOT_GIVEN,
201+
attacker: Optional[str] | NotGiven = NOT_GIVEN,
202202
attacker_country: str | NotGiven = NOT_GIVEN,
203203
dataset_id: str | NotGiven = NOT_GIVEN,
204204
indicator: str | NotGiven = NOT_GIVEN,
@@ -416,7 +416,7 @@ def edit(
416416
event_id: str,
417417
*,
418418
account_id: str,
419-
attacker: str | NotGiven = NOT_GIVEN,
419+
attacker: Optional[str] | NotGiven = NOT_GIVEN,
420420
attacker_country: str | NotGiven = NOT_GIVEN,
421421
category: str | NotGiven = NOT_GIVEN,
422422
date: Union[str, datetime] | NotGiven = NOT_GIVEN,
@@ -596,7 +596,7 @@ async def create(
596596
raw: threat_event_create_params.Raw,
597597
tlp: str,
598598
body_account_id: float | NotGiven = NOT_GIVEN,
599-
attacker: str | NotGiven = NOT_GIVEN,
599+
attacker: Optional[str] | NotGiven = NOT_GIVEN,
600600
attacker_country: str | NotGiven = NOT_GIVEN,
601601
dataset_id: str | NotGiven = NOT_GIVEN,
602602
indicator: str | NotGiven = NOT_GIVEN,
@@ -814,7 +814,7 @@ async def edit(
814814
event_id: str,
815815
*,
816816
account_id: str,
817-
attacker: str | NotGiven = NOT_GIVEN,
817+
attacker: Optional[str] | NotGiven = NOT_GIVEN,
818818
attacker_country: str | NotGiven = NOT_GIVEN,
819819
category: str | NotGiven = NOT_GIVEN,
820820
date: Union[str, datetime] | NotGiven = NOT_GIVEN,

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)

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

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)