Skip to content

Commit 7eba978

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): update via SDK Studio (#242)
1 parent 9e1e430 commit 7eba978

File tree

236 files changed

+867
-10129
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

236 files changed

+867
-10129
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
configured_endpoints: 1274
1+
configured_endpoints: 1251

api.md

+30-129
Large diffs are not rendered by default.

src/cloudflare/resources/certificate_authorities/hostname_associations.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
make_request_options,
2525
)
2626
from ...types.certificate_authorities import (
27-
HostnameAssociationItem,
27+
HostnameAssociation,
2828
HostnameAssociationGetResponse,
2929
HostnameAssociationUpdateResponse,
3030
hostname_association_get_params,
@@ -47,7 +47,7 @@ def update(
4747
self,
4848
*,
4949
zone_id: str,
50-
hostnames: List[HostnameAssociationItem] | NotGiven = NOT_GIVEN,
50+
hostnames: List[HostnameAssociation] | NotGiven = NOT_GIVEN,
5151
mtls_certificate_id: str | NotGiven = NOT_GIVEN,
5252
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5353
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -157,7 +157,7 @@ async def update(
157157
self,
158158
*,
159159
zone_id: str,
160-
hostnames: List[HostnameAssociationItem] | NotGiven = NOT_GIVEN,
160+
hostnames: List[HostnameAssociation] | NotGiven = NOT_GIVEN,
161161
mtls_certificate_id: str | NotGiven = NOT_GIVEN,
162162
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
163163
# The extra values given here take precedence over values defined on the client or passed to this method.

src/cloudflare/resources/challenges/widgets.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
from ...types.challenges import (
3030
Widget,
3131
WidgetDomain,
32-
WidgetDomainItem,
32+
WidgetListResponse,
3333
widget_list_params,
3434
widget_create_params,
3535
widget_update_params,
@@ -52,7 +52,7 @@ def create(
5252
self,
5353
*,
5454
account_id: str,
55-
domains: List[WidgetDomainItem],
55+
domains: List[WidgetDomain],
5656
mode: Literal["non-interactive", "invisible", "managed"],
5757
name: str,
5858
direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
@@ -148,7 +148,7 @@ def update(
148148
sitekey: str,
149149
*,
150150
account_id: str,
151-
domains: List[WidgetDomainItem],
151+
domains: List[WidgetDomain],
152152
mode: Literal["non-interactive", "invisible", "managed"],
153153
name: str,
154154
bot_fight_mode: bool | NotGiven = NOT_GIVEN,
@@ -232,7 +232,7 @@ def list(
232232
extra_query: Query | None = None,
233233
extra_body: Body | None = None,
234234
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
235-
) -> SyncV4PagePaginationArray[WidgetDomain]:
235+
) -> SyncV4PagePaginationArray[WidgetListResponse]:
236236
"""
237237
Lists all turnstile widgets of an account.
238238
@@ -259,7 +259,7 @@ def list(
259259
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
260260
return self._get_api_list(
261261
f"/accounts/{account_id}/challenges/widgets",
262-
page=SyncV4PagePaginationArray[WidgetDomain],
262+
page=SyncV4PagePaginationArray[WidgetListResponse],
263263
options=make_request_options(
264264
extra_headers=extra_headers,
265265
extra_query=extra_query,
@@ -275,7 +275,7 @@ def list(
275275
widget_list_params.WidgetListParams,
276276
),
277277
),
278-
model=WidgetDomain,
278+
model=WidgetListResponse,
279279
)
280280

281281
def delete(
@@ -436,7 +436,7 @@ async def create(
436436
self,
437437
*,
438438
account_id: str,
439-
domains: List[WidgetDomainItem],
439+
domains: List[WidgetDomain],
440440
mode: Literal["non-interactive", "invisible", "managed"],
441441
name: str,
442442
direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
@@ -532,7 +532,7 @@ async def update(
532532
sitekey: str,
533533
*,
534534
account_id: str,
535-
domains: List[WidgetDomainItem],
535+
domains: List[WidgetDomain],
536536
mode: Literal["non-interactive", "invisible", "managed"],
537537
name: str,
538538
bot_fight_mode: bool | NotGiven = NOT_GIVEN,
@@ -616,7 +616,7 @@ def list(
616616
extra_query: Query | None = None,
617617
extra_body: Body | None = None,
618618
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
619-
) -> AsyncPaginator[WidgetDomain, AsyncV4PagePaginationArray[WidgetDomain]]:
619+
) -> AsyncPaginator[WidgetListResponse, AsyncV4PagePaginationArray[WidgetListResponse]]:
620620
"""
621621
Lists all turnstile widgets of an account.
622622
@@ -643,7 +643,7 @@ def list(
643643
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
644644
return self._get_api_list(
645645
f"/accounts/{account_id}/challenges/widgets",
646-
page=AsyncV4PagePaginationArray[WidgetDomain],
646+
page=AsyncV4PagePaginationArray[WidgetListResponse],
647647
options=make_request_options(
648648
extra_headers=extra_headers,
649649
extra_query=extra_query,
@@ -659,7 +659,7 @@ def list(
659659
widget_list_params.WidgetListParams,
660660
),
661661
),
662-
model=WidgetDomain,
662+
model=WidgetListResponse,
663663
)
664664

665665
async def delete(

src/cloudflare/resources/cloudforce_one/requests/priority.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
)
2727
from ....types.cloudforce_one import Item, Quota
2828
from ....types.cloudforce_one.requests import (
29+
Label,
2930
Priority,
30-
LabelItem,
3131
PriorityDeleteResponse,
3232
priority_create_params,
3333
priority_update_params,
@@ -49,7 +49,7 @@ def create(
4949
self,
5050
account_identifier: str,
5151
*,
52-
labels: List[LabelItem],
52+
labels: List[Label],
5353
priority: int,
5454
requirement: str,
5555
tlp: Literal["clear", "amber", "amber-strict", "green", "red"],
@@ -110,7 +110,7 @@ def update(
110110
priority_identifer: str,
111111
*,
112112
account_identifier: str,
113-
labels: List[LabelItem],
113+
labels: List[Label],
114114
priority: int,
115115
requirement: str,
116116
tlp: Literal["clear", "amber", "amber-strict", "green", "red"],
@@ -316,7 +316,7 @@ async def create(
316316
self,
317317
account_identifier: str,
318318
*,
319-
labels: List[LabelItem],
319+
labels: List[Label],
320320
priority: int,
321321
requirement: str,
322322
tlp: Literal["clear", "amber", "amber-strict", "green", "red"],
@@ -377,7 +377,7 @@ async def update(
377377
priority_identifer: str,
378378
*,
379379
account_identifier: str,
380-
labels: List[LabelItem],
380+
labels: List[Label],
381381
priority: int,
382382
requirement: str,
383383
tlp: Literal["clear", "amber", "amber-strict", "green", "red"],

src/cloudflare/resources/cloudforce_one/requests/requests.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Any, Type, Union, cast
5+
from typing import Any, List, Type, Union, cast
66
from datetime import datetime
77
from typing_extensions import Literal
88

@@ -45,8 +45,8 @@
4545
)
4646
from ....types.cloudforce_one import (
4747
Item,
48+
List,
4849
Quota,
49-
ListItem,
5050
RequestTypes,
5151
RequestConstants,
5252
RequestDeleteResponse,
@@ -233,7 +233,7 @@ def list(
233233
extra_query: Query | None = None,
234234
extra_body: Body | None = None,
235235
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
236-
) -> SyncV4PagePaginationArray[ListItem]:
236+
) -> SyncV4PagePaginationArray[List]:
237237
"""
238238
List Requests
239239
@@ -272,7 +272,7 @@ def list(
272272
raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}")
273273
return self._get_api_list(
274274
f"/accounts/{account_identifier}/cloudforce-one/requests",
275-
page=SyncV4PagePaginationArray[ListItem],
275+
page=SyncV4PagePaginationArray[List],
276276
body=maybe_transform(
277277
{
278278
"page": page,
@@ -291,7 +291,7 @@ def list(
291291
options=make_request_options(
292292
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
293293
),
294-
model=ListItem,
294+
model=List,
295295
method="post",
296296
)
297297

@@ -681,7 +681,7 @@ def list(
681681
extra_query: Query | None = None,
682682
extra_body: Body | None = None,
683683
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
684-
) -> AsyncPaginator[ListItem, AsyncV4PagePaginationArray[ListItem]]:
684+
) -> AsyncPaginator[List, AsyncV4PagePaginationArray[List]]:
685685
"""
686686
List Requests
687687
@@ -720,7 +720,7 @@ def list(
720720
raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}")
721721
return self._get_api_list(
722722
f"/accounts/{account_identifier}/cloudforce-one/requests",
723-
page=AsyncV4PagePaginationArray[ListItem],
723+
page=AsyncV4PagePaginationArray[List],
724724
body=maybe_transform(
725725
{
726726
"page": page,
@@ -739,7 +739,7 @@ def list(
739739
options=make_request_options(
740740
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
741741
),
742-
model=ListItem,
742+
model=List,
743743
method="post",
744744
)
745745

src/cloudflare/resources/dns/firewall/firewall.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
from ...._wrappers import ResultWrapper
3131
from ....types.dns import (
3232
Firewall,
33+
FirewallIPsParam,
3334
UpstreamIPsParam,
34-
FirewallIPsItemParam,
3535
AttackMitigationParam,
3636
FirewallDeleteResponse,
3737
firewall_edit_params,
@@ -250,7 +250,7 @@ def edit(
250250
*,
251251
account_id: str,
252252
deprecate_any_requests: bool,
253-
dns_firewall_ips: List[FirewallIPsItemParam],
253+
dns_firewall_ips: List[FirewallIPsParam],
254254
ecs_fallback: bool,
255255
maximum_cache_ttl: float,
256256
minimum_cache_ttl: float,
@@ -581,7 +581,7 @@ async def edit(
581581
*,
582582
account_id: str,
583583
deprecate_any_requests: bool,
584-
dns_firewall_ips: List[FirewallIPsItemParam],
584+
dns_firewall_ips: List[FirewallIPsParam],
585585
ecs_fallback: bool,
586586
maximum_cache_ttl: float,
587587
minimum_cache_ttl: float,

0 commit comments

Comments
 (0)