Skip to content

Commit 541c9fb

Browse files
chore(api): update composite API spec
1 parent fe3da6c commit 541c9fb

File tree

11 files changed

+667
-3
lines changed

11 files changed

+667
-3
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 1857
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-25948e3293c7ca8798d7722f962cf2fc566faa8880489e0746d3a16f1e02e523.yml
3-
openapi_spec_hash: 97e3f177c34640dd60815a578f1ed7bd
1+
configured_endpoints: 1859
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ff0a3f42ea21b040e9bbddbe548b9ce8ada7133f171cfec847b1757b84e6c2cd.yml
3+
openapi_spec_hash: d0ce24cbb42173ac9a438105e88a292b
44
config_hash: e16fca6aff930b2279d586d92022f7d1

api.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9345,6 +9345,7 @@ from cloudflare.types.cloudforce_one import (
93459345
ThreatEventDeleteResponse,
93469346
ThreatEventBulkCreateResponse,
93479347
ThreatEventEditResponse,
9348+
ThreatEventGetResponse,
93489349
)
93499350
```
93509351

@@ -9355,6 +9356,7 @@ Methods:
93559356
- <code title="delete /accounts/{account_id}/cloudforce-one/events/{event_id}">client.cloudforce_one.threat_events.<a href="./src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py">delete</a>(event_id, \*, account_id) -> <a href="./src/cloudflare/types/cloudforce_one/threat_event_delete_response.py">ThreatEventDeleteResponse</a></code>
93569357
- <code title="post /accounts/{account_id}/cloudforce-one/events/create/bulk">client.cloudforce_one.threat_events.<a href="./src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py">bulk_create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/cloudforce_one/threat_event_bulk_create_params.py">params</a>) -> <a href="./src/cloudflare/types/cloudforce_one/threat_event_bulk_create_response.py">ThreatEventBulkCreateResponse</a></code>
93579358
- <code title="patch /accounts/{account_id}/cloudforce-one/events/{event_id}">client.cloudforce_one.threat_events.<a href="./src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py">edit</a>(event_id, \*, account_id, \*\*<a href="src/cloudflare/types/cloudforce_one/threat_event_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/cloudforce_one/threat_event_edit_response.py">ThreatEventEditResponse</a></code>
9359+
- <code title="get /accounts/{account_id}/cloudforce-one/events/{event_id}">client.cloudforce_one.threat_events.<a href="./src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py">get</a>(event_id, \*, account_id) -> <a href="./src/cloudflare/types/cloudforce_one/threat_event_get_response.py">ThreatEventGetResponse</a></code>
93589360

93599361
### Attackers
93609362

@@ -9424,6 +9426,18 @@ Methods:
94249426
- <code title="get /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}">client.cloudforce_one.threat_events.datasets.<a href="./src/cloudflare/resources/cloudforce_one/threat_events/datasets/datasets.py">get</a>(dataset_id, \*, account_id) -> <a href="./src/cloudflare/types/cloudforce_one/threat_events/dataset_get_response.py">DatasetGetResponse</a></code>
94259427
- <code title="get /accounts/{account_id}/cloudforce-one/events/raw/{dataset_id}/{event_id}">client.cloudforce_one.threat_events.datasets.<a href="./src/cloudflare/resources/cloudforce_one/threat_events/datasets/datasets.py">raw</a>(event_id, \*, account_id, dataset_id) -> <a href="./src/cloudflare/types/cloudforce_one/threat_events/dataset_raw_response.py">DatasetRawResponse</a></code>
94269428

9429+
### IndicatorTypes
9430+
9431+
Types:
9432+
9433+
```python
9434+
from cloudflare.types.cloudforce_one.threat_events import IndicatorTypeListResponse
9435+
```
9436+
9437+
Methods:
9438+
9439+
- <code title="get /accounts/{account_id}/cloudforce-one/events/indicatorTypes">client.cloudforce_one.threat_events.indicator_types.<a href="./src/cloudflare/resources/cloudforce_one/threat_events/indicator_types.py">list</a>(\*, account_id) -> <a href="./src/cloudflare/types/cloudforce_one/threat_events/indicator_type_list_response.py">IndicatorTypeListResponse</a></code>
9440+
94279441
### Raw
94289442

94299443
Types:

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@
7272
ThreatEventsResourceWithStreamingResponse,
7373
AsyncThreatEventsResourceWithStreamingResponse,
7474
)
75+
from .indicator_types import (
76+
IndicatorTypesResource,
77+
AsyncIndicatorTypesResource,
78+
IndicatorTypesResourceWithRawResponse,
79+
AsyncIndicatorTypesResourceWithRawResponse,
80+
IndicatorTypesResourceWithStreamingResponse,
81+
AsyncIndicatorTypesResourceWithStreamingResponse,
82+
)
7583
from .target_industries import (
7684
TargetIndustriesResource,
7785
AsyncTargetIndustriesResource,
@@ -106,6 +114,12 @@
106114
"AsyncDatasetsResourceWithRawResponse",
107115
"DatasetsResourceWithStreamingResponse",
108116
"AsyncDatasetsResourceWithStreamingResponse",
117+
"IndicatorTypesResource",
118+
"AsyncIndicatorTypesResource",
119+
"IndicatorTypesResourceWithRawResponse",
120+
"AsyncIndicatorTypesResourceWithRawResponse",
121+
"IndicatorTypesResourceWithStreamingResponse",
122+
"AsyncIndicatorTypesResourceWithStreamingResponse",
109123
"RawResource",
110124
"AsyncRawResource",
111125
"RawResourceWithRawResponse",
Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
import typing_extensions
6+
7+
import httpx
8+
9+
from ...._types import Body, Query, Headers, NotGiven, not_given
10+
from ...._compat import cached_property
11+
from ...._resource import SyncAPIResource, AsyncAPIResource
12+
from ...._response import (
13+
to_raw_response_wrapper,
14+
to_streamed_response_wrapper,
15+
async_to_raw_response_wrapper,
16+
async_to_streamed_response_wrapper,
17+
)
18+
from ...._base_client import make_request_options
19+
from ....types.cloudforce_one.threat_events.indicator_type_list_response import IndicatorTypeListResponse
20+
21+
__all__ = ["IndicatorTypesResource", "AsyncIndicatorTypesResource"]
22+
23+
24+
class IndicatorTypesResource(SyncAPIResource):
25+
@cached_property
26+
def with_raw_response(self) -> IndicatorTypesResourceWithRawResponse:
27+
"""
28+
This property can be used as a prefix for any HTTP method call to return
29+
the raw response object instead of the parsed content.
30+
31+
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
32+
"""
33+
return IndicatorTypesResourceWithRawResponse(self)
34+
35+
@cached_property
36+
def with_streaming_response(self) -> IndicatorTypesResourceWithStreamingResponse:
37+
"""
38+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
39+
40+
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
41+
"""
42+
return IndicatorTypesResourceWithStreamingResponse(self)
43+
44+
@typing_extensions.deprecated("deprecated")
45+
def list(
46+
self,
47+
*,
48+
account_id: str,
49+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
50+
# The extra values given here take precedence over values defined on the client or passed to this method.
51+
extra_headers: Headers | None = None,
52+
extra_query: Query | None = None,
53+
extra_body: Body | None = None,
54+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
55+
) -> IndicatorTypeListResponse:
56+
"""This Method is deprecated.
57+
58+
Please use /events/dataset/:dataset_id/indicatorTypes
59+
instead.
60+
61+
Args:
62+
account_id: Account ID.
63+
64+
extra_headers: Send extra headers
65+
66+
extra_query: Add additional query parameters to the request
67+
68+
extra_body: Add additional JSON properties to the request
69+
70+
timeout: Override the client-level default timeout for this request, in seconds
71+
"""
72+
if not account_id:
73+
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
74+
return self._get(
75+
f"/accounts/{account_id}/cloudforce-one/events/indicatorTypes",
76+
options=make_request_options(
77+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
78+
),
79+
cast_to=IndicatorTypeListResponse,
80+
)
81+
82+
83+
class AsyncIndicatorTypesResource(AsyncAPIResource):
84+
@cached_property
85+
def with_raw_response(self) -> AsyncIndicatorTypesResourceWithRawResponse:
86+
"""
87+
This property can be used as a prefix for any HTTP method call to return
88+
the raw response object instead of the parsed content.
89+
90+
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
91+
"""
92+
return AsyncIndicatorTypesResourceWithRawResponse(self)
93+
94+
@cached_property
95+
def with_streaming_response(self) -> AsyncIndicatorTypesResourceWithStreamingResponse:
96+
"""
97+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
98+
99+
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
100+
"""
101+
return AsyncIndicatorTypesResourceWithStreamingResponse(self)
102+
103+
@typing_extensions.deprecated("deprecated")
104+
async def list(
105+
self,
106+
*,
107+
account_id: str,
108+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
109+
# The extra values given here take precedence over values defined on the client or passed to this method.
110+
extra_headers: Headers | None = None,
111+
extra_query: Query | None = None,
112+
extra_body: Body | None = None,
113+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
114+
) -> IndicatorTypeListResponse:
115+
"""This Method is deprecated.
116+
117+
Please use /events/dataset/:dataset_id/indicatorTypes
118+
instead.
119+
120+
Args:
121+
account_id: Account ID.
122+
123+
extra_headers: Send extra headers
124+
125+
extra_query: Add additional query parameters to the request
126+
127+
extra_body: Add additional JSON properties to the request
128+
129+
timeout: Override the client-level default timeout for this request, in seconds
130+
"""
131+
if not account_id:
132+
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
133+
return await self._get(
134+
f"/accounts/{account_id}/cloudforce-one/events/indicatorTypes",
135+
options=make_request_options(
136+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
137+
),
138+
cast_to=IndicatorTypeListResponse,
139+
)
140+
141+
142+
class IndicatorTypesResourceWithRawResponse:
143+
def __init__(self, indicator_types: IndicatorTypesResource) -> None:
144+
self._indicator_types = indicator_types
145+
146+
self.list = ( # pyright: ignore[reportDeprecated]
147+
to_raw_response_wrapper(
148+
indicator_types.list, # pyright: ignore[reportDeprecated],
149+
)
150+
)
151+
152+
153+
class AsyncIndicatorTypesResourceWithRawResponse:
154+
def __init__(self, indicator_types: AsyncIndicatorTypesResource) -> None:
155+
self._indicator_types = indicator_types
156+
157+
self.list = ( # pyright: ignore[reportDeprecated]
158+
async_to_raw_response_wrapper(
159+
indicator_types.list, # pyright: ignore[reportDeprecated],
160+
)
161+
)
162+
163+
164+
class IndicatorTypesResourceWithStreamingResponse:
165+
def __init__(self, indicator_types: IndicatorTypesResource) -> None:
166+
self._indicator_types = indicator_types
167+
168+
self.list = ( # pyright: ignore[reportDeprecated]
169+
to_streamed_response_wrapper(
170+
indicator_types.list, # pyright: ignore[reportDeprecated],
171+
)
172+
)
173+
174+
175+
class AsyncIndicatorTypesResourceWithStreamingResponse:
176+
def __init__(self, indicator_types: AsyncIndicatorTypesResource) -> None:
177+
self._indicator_types = indicator_types
178+
179+
self.list = ( # pyright: ignore[reportDeprecated]
180+
async_to_streamed_response_wrapper(
181+
indicator_types.list, # pyright: ignore[reportDeprecated],
182+
)
183+
)

0 commit comments

Comments
 (0)