Skip to content

Commit 9fff7a0

Browse files
feat(api): api update
1 parent f6cb2e1 commit 9fff7a0

17 files changed

Lines changed: 1426 additions & 3 deletions

.stats.yml

Lines changed: 3 additions & 3 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-6eb17c94a367941ef4fd3ad0750ea42308813e96e904d31b776ed848d849be90.yml
3-
openapi_spec_hash: 9fa312b08e4ba5659a03d7143210437f
1+
configured_endpoints: 1783
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c3722d2349434f1cf268b7f391080c3905e8b66b20a00bef2e00104a8e83f8fc.yml
3+
openapi_spec_hash: 4e221dc6dd407ab6dab265a68adf140a
44
config_hash: b5608440cfd3f75f7cfabd36fbc7cd88

api.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7247,6 +7247,32 @@ Methods:
72477247
- <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>
72487248
- <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>
72497249

7250+
### Bots
7251+
7252+
#### Summary
7253+
7254+
Types:
7255+
7256+
```python
7257+
from cloudflare.types.radar.ai.bots import SummaryUserAgentResponse
7258+
```
7259+
7260+
Methods:
7261+
7262+
- <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>
7263+
7264+
### TimeseriesGroups
7265+
7266+
Types:
7267+
7268+
```python
7269+
from cloudflare.types.radar.ai import TimeseriesGroupUserAgentResponse
7270+
```
7271+
7272+
Methods:
7273+
7274+
- <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>
7275+
72507276
## Annotations
72517277

72527278
Types:

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

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

2844
__all__ = [
2945
"ToMarkdownResource",
@@ -38,6 +54,18 @@
3854
"AsyncInferenceResourceWithRawResponse",
3955
"InferenceResourceWithStreamingResponse",
4056
"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",
4169
"AIResource",
4270
"AsyncAIResource",
4371
"AIResourceWithRawResponse",

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

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
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+
)
513
from ...._compat import cached_property
614
from .to_markdown import (
715
ToMarkdownResource,
@@ -12,6 +20,14 @@
1220
AsyncToMarkdownResourceWithStreamingResponse,
1321
)
1422
from ...._resource import SyncAPIResource, AsyncAPIResource
23+
from .timeseries_groups import (
24+
TimeseriesGroupsResource,
25+
AsyncTimeseriesGroupsResource,
26+
TimeseriesGroupsResourceWithRawResponse,
27+
AsyncTimeseriesGroupsResourceWithRawResponse,
28+
TimeseriesGroupsResourceWithStreamingResponse,
29+
AsyncTimeseriesGroupsResourceWithStreamingResponse,
30+
)
1531
from .inference.inference import (
1632
InferenceResource,
1733
AsyncInferenceResource,
@@ -33,6 +49,14 @@ def to_markdown(self) -> ToMarkdownResource:
3349
def inference(self) -> InferenceResource:
3450
return InferenceResource(self._client)
3551

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+
3660
@cached_property
3761
def with_raw_response(self) -> AIResourceWithRawResponse:
3862
"""
@@ -62,6 +86,14 @@ def to_markdown(self) -> AsyncToMarkdownResource:
6286
def inference(self) -> AsyncInferenceResource:
6387
return AsyncInferenceResource(self._client)
6488

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+
6597
@cached_property
6698
def with_raw_response(self) -> AsyncAIResourceWithRawResponse:
6799
"""
@@ -94,6 +126,14 @@ def to_markdown(self) -> ToMarkdownResourceWithRawResponse:
94126
def inference(self) -> InferenceResourceWithRawResponse:
95127
return InferenceResourceWithRawResponse(self._ai.inference)
96128

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+
97137

98138
class AsyncAIResourceWithRawResponse:
99139
def __init__(self, ai: AsyncAIResource) -> None:
@@ -107,6 +147,14 @@ def to_markdown(self) -> AsyncToMarkdownResourceWithRawResponse:
107147
def inference(self) -> AsyncInferenceResourceWithRawResponse:
108148
return AsyncInferenceResourceWithRawResponse(self._ai.inference)
109149

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+
110158

111159
class AIResourceWithStreamingResponse:
112160
def __init__(self, ai: AIResource) -> None:
@@ -120,6 +168,14 @@ def to_markdown(self) -> ToMarkdownResourceWithStreamingResponse:
120168
def inference(self) -> InferenceResourceWithStreamingResponse:
121169
return InferenceResourceWithStreamingResponse(self._ai.inference)
122170

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+
123179

124180
class AsyncAIResourceWithStreamingResponse:
125181
def __init__(self, ai: AsyncAIResource) -> None:
@@ -132,3 +188,11 @@ def to_markdown(self) -> AsyncToMarkdownResourceWithStreamingResponse:
132188
@cached_property
133189
def inference(self) -> AsyncInferenceResourceWithStreamingResponse:
134190
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)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from .bots import (
4+
BotsResource,
5+
AsyncBotsResource,
6+
BotsResourceWithRawResponse,
7+
AsyncBotsResourceWithRawResponse,
8+
BotsResourceWithStreamingResponse,
9+
AsyncBotsResourceWithStreamingResponse,
10+
)
11+
from .summary import (
12+
SummaryResource,
13+
AsyncSummaryResource,
14+
SummaryResourceWithRawResponse,
15+
AsyncSummaryResourceWithRawResponse,
16+
SummaryResourceWithStreamingResponse,
17+
AsyncSummaryResourceWithStreamingResponse,
18+
)
19+
20+
__all__ = [
21+
"SummaryResource",
22+
"AsyncSummaryResource",
23+
"SummaryResourceWithRawResponse",
24+
"AsyncSummaryResourceWithRawResponse",
25+
"SummaryResourceWithStreamingResponse",
26+
"AsyncSummaryResourceWithStreamingResponse",
27+
"BotsResource",
28+
"AsyncBotsResource",
29+
"BotsResourceWithRawResponse",
30+
"AsyncBotsResourceWithRawResponse",
31+
"BotsResourceWithStreamingResponse",
32+
"AsyncBotsResourceWithStreamingResponse",
33+
]
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from .summary import (
6+
SummaryResource,
7+
AsyncSummaryResource,
8+
SummaryResourceWithRawResponse,
9+
AsyncSummaryResourceWithRawResponse,
10+
SummaryResourceWithStreamingResponse,
11+
AsyncSummaryResourceWithStreamingResponse,
12+
)
13+
from ....._compat import cached_property
14+
from ....._resource import SyncAPIResource, AsyncAPIResource
15+
16+
__all__ = ["BotsResource", "AsyncBotsResource"]
17+
18+
19+
class BotsResource(SyncAPIResource):
20+
@cached_property
21+
def summary(self) -> SummaryResource:
22+
return SummaryResource(self._client)
23+
24+
@cached_property
25+
def with_raw_response(self) -> BotsResourceWithRawResponse:
26+
"""
27+
This property can be used as a prefix for any HTTP method call to return
28+
the raw response object instead of the parsed content.
29+
30+
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
31+
"""
32+
return BotsResourceWithRawResponse(self)
33+
34+
@cached_property
35+
def with_streaming_response(self) -> BotsResourceWithStreamingResponse:
36+
"""
37+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
38+
39+
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
40+
"""
41+
return BotsResourceWithStreamingResponse(self)
42+
43+
44+
class AsyncBotsResource(AsyncAPIResource):
45+
@cached_property
46+
def summary(self) -> AsyncSummaryResource:
47+
return AsyncSummaryResource(self._client)
48+
49+
@cached_property
50+
def with_raw_response(self) -> AsyncBotsResourceWithRawResponse:
51+
"""
52+
This property can be used as a prefix for any HTTP method call to return
53+
the raw response object instead of the parsed content.
54+
55+
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
56+
"""
57+
return AsyncBotsResourceWithRawResponse(self)
58+
59+
@cached_property
60+
def with_streaming_response(self) -> AsyncBotsResourceWithStreamingResponse:
61+
"""
62+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
63+
64+
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
65+
"""
66+
return AsyncBotsResourceWithStreamingResponse(self)
67+
68+
69+
class BotsResourceWithRawResponse:
70+
def __init__(self, bots: BotsResource) -> None:
71+
self._bots = bots
72+
73+
@cached_property
74+
def summary(self) -> SummaryResourceWithRawResponse:
75+
return SummaryResourceWithRawResponse(self._bots.summary)
76+
77+
78+
class AsyncBotsResourceWithRawResponse:
79+
def __init__(self, bots: AsyncBotsResource) -> None:
80+
self._bots = bots
81+
82+
@cached_property
83+
def summary(self) -> AsyncSummaryResourceWithRawResponse:
84+
return AsyncSummaryResourceWithRawResponse(self._bots.summary)
85+
86+
87+
class BotsResourceWithStreamingResponse:
88+
def __init__(self, bots: BotsResource) -> None:
89+
self._bots = bots
90+
91+
@cached_property
92+
def summary(self) -> SummaryResourceWithStreamingResponse:
93+
return SummaryResourceWithStreamingResponse(self._bots.summary)
94+
95+
96+
class AsyncBotsResourceWithStreamingResponse:
97+
def __init__(self, bots: AsyncBotsResource) -> None:
98+
self._bots = bots
99+
100+
@cached_property
101+
def summary(self) -> AsyncSummaryResourceWithStreamingResponse:
102+
return AsyncSummaryResourceWithStreamingResponse(self._bots.summary)

0 commit comments

Comments
 (0)