Skip to content

Commit 25d603f

Browse files
chore(api): update composite API spec
1 parent fc06837 commit 25d603f

267 files changed

Lines changed: 18116 additions & 6438 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: 1820
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cceecd20dfd89884f795e75b433848994bed610b79802c65104f0c70d3ada54e.yml
3-
openapi_spec_hash: c33c0e26e48c004c1781a36748d0144c
1+
configured_endpoints: 1855
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-915bb405f875913c47f1125a42f6dd7eee490896e7cf117e35b14d8cb273cfd5.yml
3+
openapi_spec_hash: 039c43ebe70cf009895dd0553d7eb929
44
config_hash: ced339c69004cc06854b37a59f5d270a

api.md

Lines changed: 259 additions & 48 deletions
Large diffs are not rendered by default.

src/cloudflare/_client.py

Lines changed: 119 additions & 38 deletions
Large diffs are not rendered by default.

src/cloudflare/resources/abuse_reports.py

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

src/cloudflare/resources/accounts/accounts.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ def update(
165165
id: str,
166166
name: str,
167167
type: Literal["standard", "enterprise"],
168+
managed_by: account_update_params.ManagedBy | Omit = omit,
168169
settings: account_update_params.Settings | Omit = omit,
169170
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
170171
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -183,6 +184,8 @@ def update(
183184
184185
name: Account name
185186
187+
managed_by: Parent container details
188+
186189
settings: Account settings
187190
188191
extra_headers: Send extra headers
@@ -202,6 +205,7 @@ def update(
202205
"id": id,
203206
"name": name,
204207
"type": type,
208+
"managed_by": managed_by,
205209
"settings": settings,
206210
},
207211
account_update_params.AccountUpdateParams,
@@ -451,6 +455,7 @@ async def update(
451455
id: str,
452456
name: str,
453457
type: Literal["standard", "enterprise"],
458+
managed_by: account_update_params.ManagedBy | Omit = omit,
454459
settings: account_update_params.Settings | Omit = omit,
455460
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
456461
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -469,6 +474,8 @@ async def update(
469474
470475
name: Account name
471476
477+
managed_by: Parent container details
478+
472479
settings: Account settings
473480
474481
extra_headers: Send extra headers
@@ -488,6 +495,7 @@ async def update(
488495
"id": id,
489496
"name": name,
490497
"type": type,
498+
"managed_by": managed_by,
491499
"settings": settings,
492500
},
493501
account_update_params.AccountUpdateParams,

src/cloudflare/resources/api_gateway/configurations.py

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22

33
from __future__ import annotations
44

5-
from typing import List, Type, Iterable, cast
6-
from typing_extensions import Literal
5+
from typing import Type, Iterable, cast
76

87
import httpx
98

10-
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
9+
from ..._types import Body, Query, Headers, NotGiven, not_given
1110
from ..._utils import maybe_transform, async_maybe_transform
1211
from ..._compat import cached_property
1312
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -19,9 +18,8 @@
1918
)
2019
from ..._wrappers import ResultWrapper
2120
from ..._base_client import make_request_options
22-
from ...types.api_gateway import configuration_get_params, configuration_update_params
21+
from ...types.api_gateway import configuration_update_params
2322
from ...types.api_gateway.configuration import Configuration
24-
from ...types.api_gateway.configuration_update_response import ConfigurationUpdateResponse
2523

2624
__all__ = ["ConfigurationsResource", "AsyncConfigurationsResource"]
2725

@@ -57,9 +55,9 @@ def update(
5755
extra_query: Query | None = None,
5856
extra_body: Body | None = None,
5957
timeout: float | httpx.Timeout | None | NotGiven = not_given,
60-
) -> ConfigurationUpdateResponse:
58+
) -> Configuration:
6159
"""
62-
Set configuration properties
60+
Update configuration properties
6361
6462
Args:
6563
zone_id: Identifier.
@@ -81,16 +79,19 @@ def update(
8179
configuration_update_params.ConfigurationUpdateParams,
8280
),
8381
options=make_request_options(
84-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
82+
extra_headers=extra_headers,
83+
extra_query=extra_query,
84+
extra_body=extra_body,
85+
timeout=timeout,
86+
post_parser=ResultWrapper[Configuration]._unwrapper,
8587
),
86-
cast_to=ConfigurationUpdateResponse,
88+
cast_to=cast(Type[Configuration], ResultWrapper[Configuration]),
8789
)
8890

8991
def get(
9092
self,
9193
*,
9294
zone_id: str,
93-
properties: List[Literal["auth_id_characteristics"]] | Omit = omit,
9495
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
9596
# The extra values given here take precedence over values defined on the client or passed to this method.
9697
extra_headers: Headers | None = None,
@@ -104,8 +105,6 @@ def get(
104105
Args:
105106
zone_id: Identifier.
106107
107-
properties: Requests information about certain properties.
108-
109108
extra_headers: Send extra headers
110109
111110
extra_query: Add additional query parameters to the request
@@ -123,7 +122,6 @@ def get(
123122
extra_query=extra_query,
124123
extra_body=extra_body,
125124
timeout=timeout,
126-
query=maybe_transform({"properties": properties}, configuration_get_params.ConfigurationGetParams),
127125
post_parser=ResultWrapper[Configuration]._unwrapper,
128126
),
129127
cast_to=cast(Type[Configuration], ResultWrapper[Configuration]),
@@ -161,9 +159,9 @@ async def update(
161159
extra_query: Query | None = None,
162160
extra_body: Body | None = None,
163161
timeout: float | httpx.Timeout | None | NotGiven = not_given,
164-
) -> ConfigurationUpdateResponse:
162+
) -> Configuration:
165163
"""
166-
Set configuration properties
164+
Update configuration properties
167165
168166
Args:
169167
zone_id: Identifier.
@@ -185,16 +183,19 @@ async def update(
185183
configuration_update_params.ConfigurationUpdateParams,
186184
),
187185
options=make_request_options(
188-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
186+
extra_headers=extra_headers,
187+
extra_query=extra_query,
188+
extra_body=extra_body,
189+
timeout=timeout,
190+
post_parser=ResultWrapper[Configuration]._unwrapper,
189191
),
190-
cast_to=ConfigurationUpdateResponse,
192+
cast_to=cast(Type[Configuration], ResultWrapper[Configuration]),
191193
)
192194

193195
async def get(
194196
self,
195197
*,
196198
zone_id: str,
197-
properties: List[Literal["auth_id_characteristics"]] | Omit = omit,
198199
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
199200
# The extra values given here take precedence over values defined on the client or passed to this method.
200201
extra_headers: Headers | None = None,
@@ -208,8 +209,6 @@ async def get(
208209
Args:
209210
zone_id: Identifier.
210211
211-
properties: Requests information about certain properties.
212-
213212
extra_headers: Send extra headers
214213
215214
extra_query: Add additional query parameters to the request
@@ -227,9 +226,6 @@ async def get(
227226
extra_query=extra_query,
228227
extra_body=extra_body,
229228
timeout=timeout,
230-
query=await async_maybe_transform(
231-
{"properties": properties}, configuration_get_params.ConfigurationGetParams
232-
),
233229
post_parser=ResultWrapper[Configuration]._unwrapper,
234230
),
235231
cast_to=cast(Type[Configuration], ResultWrapper[Configuration]),

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

Lines changed: 0 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@
9797
threat_event_create_params,
9898
threat_event_bulk_create_params,
9999
)
100-
from ....types.cloudforce_one.threat_event_get_response import ThreatEventGetResponse
101100
from ....types.cloudforce_one.threat_event_edit_response import ThreatEventEditResponse
102101
from ....types.cloudforce_one.threat_event_list_response import ThreatEventListResponse
103102
from ....types.cloudforce_one.threat_event_create_response import ThreatEventCreateResponse
@@ -458,46 +457,6 @@ def edit(
458457
cast_to=ThreatEventEditResponse,
459458
)
460459

461-
def get(
462-
self,
463-
event_id: str,
464-
*,
465-
account_id: str,
466-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
467-
# The extra values given here take precedence over values defined on the client or passed to this method.
468-
extra_headers: Headers | None = None,
469-
extra_query: Query | None = None,
470-
extra_body: Body | None = None,
471-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
472-
) -> ThreatEventGetResponse:
473-
"""
474-
Reads an event
475-
476-
Args:
477-
account_id: Account ID.
478-
479-
event_id: Event UUID.
480-
481-
extra_headers: Send extra headers
482-
483-
extra_query: Add additional query parameters to the request
484-
485-
extra_body: Add additional JSON properties to the request
486-
487-
timeout: Override the client-level default timeout for this request, in seconds
488-
"""
489-
if not account_id:
490-
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
491-
if not event_id:
492-
raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}")
493-
return self._get(
494-
f"/accounts/{account_id}/cloudforce-one/events/{event_id}",
495-
options=make_request_options(
496-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
497-
),
498-
cast_to=ThreatEventGetResponse,
499-
)
500-
501460

502461
class AsyncThreatEventsResource(AsyncAPIResource):
503462
@cached_property
@@ -850,46 +809,6 @@ async def edit(
850809
cast_to=ThreatEventEditResponse,
851810
)
852811

853-
async def get(
854-
self,
855-
event_id: str,
856-
*,
857-
account_id: str,
858-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
859-
# The extra values given here take precedence over values defined on the client or passed to this method.
860-
extra_headers: Headers | None = None,
861-
extra_query: Query | None = None,
862-
extra_body: Body | None = None,
863-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
864-
) -> ThreatEventGetResponse:
865-
"""
866-
Reads an event
867-
868-
Args:
869-
account_id: Account ID.
870-
871-
event_id: Event UUID.
872-
873-
extra_headers: Send extra headers
874-
875-
extra_query: Add additional query parameters to the request
876-
877-
extra_body: Add additional JSON properties to the request
878-
879-
timeout: Override the client-level default timeout for this request, in seconds
880-
"""
881-
if not account_id:
882-
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
883-
if not event_id:
884-
raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}")
885-
return await self._get(
886-
f"/accounts/{account_id}/cloudforce-one/events/{event_id}",
887-
options=make_request_options(
888-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
889-
),
890-
cast_to=ThreatEventGetResponse,
891-
)
892-
893812

894813
class ThreatEventsResourceWithRawResponse:
895814
def __init__(self, threat_events: ThreatEventsResource) -> None:
@@ -910,9 +829,6 @@ def __init__(self, threat_events: ThreatEventsResource) -> None:
910829
self.edit = to_raw_response_wrapper(
911830
threat_events.edit,
912831
)
913-
self.get = to_raw_response_wrapper(
914-
threat_events.get,
915-
)
916832

917833
@cached_property
918834
def attackers(self) -> AttackersResourceWithRawResponse:
@@ -970,9 +886,6 @@ def __init__(self, threat_events: AsyncThreatEventsResource) -> None:
970886
self.edit = async_to_raw_response_wrapper(
971887
threat_events.edit,
972888
)
973-
self.get = async_to_raw_response_wrapper(
974-
threat_events.get,
975-
)
976889

977890
@cached_property
978891
def attackers(self) -> AsyncAttackersResourceWithRawResponse:
@@ -1030,9 +943,6 @@ def __init__(self, threat_events: ThreatEventsResource) -> None:
1030943
self.edit = to_streamed_response_wrapper(
1031944
threat_events.edit,
1032945
)
1033-
self.get = to_streamed_response_wrapper(
1034-
threat_events.get,
1035-
)
1036946

1037947
@cached_property
1038948
def attackers(self) -> AttackersResourceWithStreamingResponse:
@@ -1090,9 +1000,6 @@ def __init__(self, threat_events: AsyncThreatEventsResource) -> None:
10901000
self.edit = async_to_streamed_response_wrapper(
10911001
threat_events.edit,
10921002
)
1093-
self.get = async_to_streamed_response_wrapper(
1094-
threat_events.get,
1095-
)
10961003

10971004
@cached_property
10981005
def attackers(self) -> AsyncAttackersResourceWithStreamingResponse:

0 commit comments

Comments
 (0)