Skip to content

Commit f9160a4

Browse files
chore(api): update composite API spec
1 parent 845fba2 commit f9160a4

229 files changed

Lines changed: 5762 additions & 16380 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: 1849
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fa078e98d33794f32c77256479dceb7d6b9e0ad95da89fa01474b2c1731cad3d.yml
3-
openapi_spec_hash: eb25624c59f39858b740347f8f092a1d
1+
configured_endpoints: 1814
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cceecd20dfd89884f795e75b433848994bed610b79802c65104f0c70d3ada54e.yml
3+
openapi_spec_hash: c33c0e26e48c004c1781a36748d0144c
44
config_hash: eab23d0b8fa818f1d1dc0e9e18de4266

api.md

Lines changed: 44 additions & 244 deletions
Large diffs are not rendered by default.

src/cloudflare/_client.py

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

src/cloudflare/resources/abuse_reports.py

Lines changed: 1869 additions & 0 deletions
Large diffs are not rendered by default.

src/cloudflare/resources/accounts/accounts.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ def update(
165165
id: str,
166166
name: str,
167167
type: Literal["standard", "enterprise"],
168-
managed_by: account_update_params.ManagedBy | Omit = omit,
169168
settings: account_update_params.Settings | Omit = omit,
170169
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
171170
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -184,8 +183,6 @@ def update(
184183
185184
name: Account name
186185
187-
managed_by: Parent container details
188-
189186
settings: Account settings
190187
191188
extra_headers: Send extra headers
@@ -205,7 +202,6 @@ def update(
205202
"id": id,
206203
"name": name,
207204
"type": type,
208-
"managed_by": managed_by,
209205
"settings": settings,
210206
},
211207
account_update_params.AccountUpdateParams,
@@ -455,7 +451,6 @@ async def update(
455451
id: str,
456452
name: str,
457453
type: Literal["standard", "enterprise"],
458-
managed_by: account_update_params.ManagedBy | Omit = omit,
459454
settings: account_update_params.Settings | Omit = omit,
460455
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
461456
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -474,8 +469,6 @@ async def update(
474469
475470
name: Account name
476471
477-
managed_by: Parent container details
478-
479472
settings: Account settings
480473
481474
extra_headers: Send extra headers
@@ -495,7 +488,6 @@ async def update(
495488
"id": id,
496489
"name": name,
497490
"type": type,
498-
"managed_by": managed_by,
499491
"settings": settings,
500492
},
501493
account_update_params.AccountUpdateParams,

src/cloudflare/resources/api_gateway/configurations.py

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

33
from __future__ import annotations
44

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

78
import httpx
89

9-
from ..._types import Body, Query, Headers, NotGiven, not_given
10+
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
1011
from ..._utils import maybe_transform, async_maybe_transform
1112
from ..._compat import cached_property
1213
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -18,8 +19,9 @@
1819
)
1920
from ..._wrappers import ResultWrapper
2021
from ..._base_client import make_request_options
21-
from ...types.api_gateway import configuration_update_params
22+
from ...types.api_gateway import configuration_get_params, configuration_update_params
2223
from ...types.api_gateway.configuration import Configuration
24+
from ...types.api_gateway.configuration_update_response import ConfigurationUpdateResponse
2325

2426
__all__ = ["ConfigurationsResource", "AsyncConfigurationsResource"]
2527

@@ -55,9 +57,9 @@ def update(
5557
extra_query: Query | None = None,
5658
extra_body: Body | None = None,
5759
timeout: float | httpx.Timeout | None | NotGiven = not_given,
58-
) -> Configuration:
60+
) -> ConfigurationUpdateResponse:
5961
"""
60-
Update configuration properties
62+
Set configuration properties
6163
6264
Args:
6365
zone_id: Identifier.
@@ -79,19 +81,16 @@ def update(
7981
configuration_update_params.ConfigurationUpdateParams,
8082
),
8183
options=make_request_options(
82-
extra_headers=extra_headers,
83-
extra_query=extra_query,
84-
extra_body=extra_body,
85-
timeout=timeout,
86-
post_parser=ResultWrapper[Configuration]._unwrapper,
84+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
8785
),
88-
cast_to=cast(Type[Configuration], ResultWrapper[Configuration]),
86+
cast_to=ConfigurationUpdateResponse,
8987
)
9088

9189
def get(
9290
self,
9391
*,
9492
zone_id: str,
93+
properties: List[Literal["auth_id_characteristics"]] | Omit = omit,
9594
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
9695
# The extra values given here take precedence over values defined on the client or passed to this method.
9796
extra_headers: Headers | None = None,
@@ -105,6 +104,8 @@ def get(
105104
Args:
106105
zone_id: Identifier.
107106
107+
properties: Requests information about certain properties.
108+
108109
extra_headers: Send extra headers
109110
110111
extra_query: Add additional query parameters to the request
@@ -122,6 +123,7 @@ def get(
122123
extra_query=extra_query,
123124
extra_body=extra_body,
124125
timeout=timeout,
126+
query=maybe_transform({"properties": properties}, configuration_get_params.ConfigurationGetParams),
125127
post_parser=ResultWrapper[Configuration]._unwrapper,
126128
),
127129
cast_to=cast(Type[Configuration], ResultWrapper[Configuration]),
@@ -159,9 +161,9 @@ async def update(
159161
extra_query: Query | None = None,
160162
extra_body: Body | None = None,
161163
timeout: float | httpx.Timeout | None | NotGiven = not_given,
162-
) -> Configuration:
164+
) -> ConfigurationUpdateResponse:
163165
"""
164-
Update configuration properties
166+
Set configuration properties
165167
166168
Args:
167169
zone_id: Identifier.
@@ -183,19 +185,16 @@ async def update(
183185
configuration_update_params.ConfigurationUpdateParams,
184186
),
185187
options=make_request_options(
186-
extra_headers=extra_headers,
187-
extra_query=extra_query,
188-
extra_body=extra_body,
189-
timeout=timeout,
190-
post_parser=ResultWrapper[Configuration]._unwrapper,
188+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
191189
),
192-
cast_to=cast(Type[Configuration], ResultWrapper[Configuration]),
190+
cast_to=ConfigurationUpdateResponse,
193191
)
194192

195193
async def get(
196194
self,
197195
*,
198196
zone_id: str,
197+
properties: List[Literal["auth_id_characteristics"]] | Omit = omit,
199198
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
200199
# The extra values given here take precedence over values defined on the client or passed to this method.
201200
extra_headers: Headers | None = None,
@@ -209,6 +208,8 @@ async def get(
209208
Args:
210209
zone_id: Identifier.
211210
211+
properties: Requests information about certain properties.
212+
212213
extra_headers: Send extra headers
213214
214215
extra_query: Add additional query parameters to the request
@@ -226,6 +227,9 @@ async def get(
226227
extra_query=extra_query,
227228
extra_body=extra_body,
228229
timeout=timeout,
230+
query=await async_maybe_transform(
231+
{"properties": properties}, configuration_get_params.ConfigurationGetParams
232+
),
229233
post_parser=ResultWrapper[Configuration]._unwrapper,
230234
),
231235
cast_to=cast(Type[Configuration], ResultWrapper[Configuration]),

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

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

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

461502
class AsyncThreatEventsResource(AsyncAPIResource):
462503
@cached_property
@@ -809,6 +850,46 @@ async def edit(
809850
cast_to=ThreatEventEditResponse,
810851
)
811852

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

813894
class ThreatEventsResourceWithRawResponse:
814895
def __init__(self, threat_events: ThreatEventsResource) -> None:
@@ -829,6 +910,9 @@ def __init__(self, threat_events: ThreatEventsResource) -> None:
829910
self.edit = to_raw_response_wrapper(
830911
threat_events.edit,
831912
)
913+
self.get = to_raw_response_wrapper(
914+
threat_events.get,
915+
)
832916

833917
@cached_property
834918
def attackers(self) -> AttackersResourceWithRawResponse:
@@ -886,6 +970,9 @@ def __init__(self, threat_events: AsyncThreatEventsResource) -> None:
886970
self.edit = async_to_raw_response_wrapper(
887971
threat_events.edit,
888972
)
973+
self.get = async_to_raw_response_wrapper(
974+
threat_events.get,
975+
)
889976

890977
@cached_property
891978
def attackers(self) -> AsyncAttackersResourceWithRawResponse:
@@ -943,6 +1030,9 @@ def __init__(self, threat_events: ThreatEventsResource) -> None:
9431030
self.edit = to_streamed_response_wrapper(
9441031
threat_events.edit,
9451032
)
1033+
self.get = to_streamed_response_wrapper(
1034+
threat_events.get,
1035+
)
9461036

9471037
@cached_property
9481038
def attackers(self) -> AttackersResourceWithStreamingResponse:
@@ -1000,6 +1090,9 @@ def __init__(self, threat_events: AsyncThreatEventsResource) -> None:
10001090
self.edit = async_to_streamed_response_wrapper(
10011091
threat_events.edit,
10021092
)
1093+
self.get = async_to_streamed_response_wrapper(
1094+
threat_events.get,
1095+
)
10031096

10041097
@cached_property
10051098
def attackers(self) -> AsyncAttackersResourceWithStreamingResponse:

0 commit comments

Comments
 (0)