Skip to content

Commit c6c81d4

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): update via SDK Studio (#290)
1 parent b6008f2 commit c6c81d4

File tree

66 files changed

+516
-1774
lines changed

Some content is hidden

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

66 files changed

+516
-1774
lines changed

api.md

+32-65
Large diffs are not rendered by default.

src/cloudflare/resources/addressing/prefixes/prefixes.py

+19-22
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,7 @@
4343
make_request_options,
4444
)
4545
from ....types.addressing import (
46-
PrefixGetResponse,
47-
PrefixEditResponse,
48-
PrefixListResponse,
49-
PrefixCreateResponse,
46+
Prefix,
5047
PrefixDeleteResponse,
5148
prefix_edit_params,
5249
prefix_create_params,
@@ -86,7 +83,7 @@ def create(
8683
extra_query: Query | None = None,
8784
extra_body: Body | None = None,
8885
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
89-
) -> PrefixCreateResponse:
86+
) -> Prefix:
9087
"""
9188
Add a new prefix under the account.
9289
@@ -126,7 +123,7 @@ def create(
126123
timeout=timeout,
127124
post_parser=ResultWrapper._unwrapper,
128125
),
129-
cast_to=cast(Type[PrefixCreateResponse], ResultWrapper[PrefixCreateResponse]),
126+
cast_to=cast(Type[Prefix], ResultWrapper[Prefix]),
130127
)
131128

132129
def list(
@@ -139,7 +136,7 @@ def list(
139136
extra_query: Query | None = None,
140137
extra_body: Body | None = None,
141138
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
142-
) -> SyncSinglePage[PrefixListResponse]:
139+
) -> SyncSinglePage[Prefix]:
143140
"""
144141
List all prefixes owned by the account.
145142
@@ -158,11 +155,11 @@ def list(
158155
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
159156
return self._get_api_list(
160157
f"/accounts/{account_id}/addressing/prefixes",
161-
page=SyncSinglePage[PrefixListResponse],
158+
page=SyncSinglePage[Prefix],
162159
options=make_request_options(
163160
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
164161
),
165-
model=PrefixListResponse,
162+
model=Prefix,
166163
)
167164

168165
def delete(
@@ -228,7 +225,7 @@ def edit(
228225
extra_query: Query | None = None,
229226
extra_body: Body | None = None,
230227
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
231-
) -> PrefixEditResponse:
228+
) -> Prefix:
232229
"""
233230
Modify the description for a prefix owned by the account.
234231
@@ -261,7 +258,7 @@ def edit(
261258
timeout=timeout,
262259
post_parser=ResultWrapper._unwrapper,
263260
),
264-
cast_to=cast(Type[PrefixEditResponse], ResultWrapper[PrefixEditResponse]),
261+
cast_to=cast(Type[Prefix], ResultWrapper[Prefix]),
265262
)
266263

267264
def get(
@@ -275,7 +272,7 @@ def get(
275272
extra_query: Query | None = None,
276273
extra_body: Body | None = None,
277274
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
278-
) -> PrefixGetResponse:
275+
) -> Prefix:
279276
"""
280277
List a particular prefix owned by the account.
281278
@@ -305,7 +302,7 @@ def get(
305302
timeout=timeout,
306303
post_parser=ResultWrapper._unwrapper,
307304
),
308-
cast_to=cast(Type[PrefixGetResponse], ResultWrapper[PrefixGetResponse]),
305+
cast_to=cast(Type[Prefix], ResultWrapper[Prefix]),
309306
)
310307

311308

@@ -339,7 +336,7 @@ async def create(
339336
extra_query: Query | None = None,
340337
extra_body: Body | None = None,
341338
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
342-
) -> PrefixCreateResponse:
339+
) -> Prefix:
343340
"""
344341
Add a new prefix under the account.
345342
@@ -379,7 +376,7 @@ async def create(
379376
timeout=timeout,
380377
post_parser=ResultWrapper._unwrapper,
381378
),
382-
cast_to=cast(Type[PrefixCreateResponse], ResultWrapper[PrefixCreateResponse]),
379+
cast_to=cast(Type[Prefix], ResultWrapper[Prefix]),
383380
)
384381

385382
def list(
@@ -392,7 +389,7 @@ def list(
392389
extra_query: Query | None = None,
393390
extra_body: Body | None = None,
394391
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
395-
) -> AsyncPaginator[PrefixListResponse, AsyncSinglePage[PrefixListResponse]]:
392+
) -> AsyncPaginator[Prefix, AsyncSinglePage[Prefix]]:
396393
"""
397394
List all prefixes owned by the account.
398395
@@ -411,11 +408,11 @@ def list(
411408
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
412409
return self._get_api_list(
413410
f"/accounts/{account_id}/addressing/prefixes",
414-
page=AsyncSinglePage[PrefixListResponse],
411+
page=AsyncSinglePage[Prefix],
415412
options=make_request_options(
416413
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
417414
),
418-
model=PrefixListResponse,
415+
model=Prefix,
419416
)
420417

421418
async def delete(
@@ -481,7 +478,7 @@ async def edit(
481478
extra_query: Query | None = None,
482479
extra_body: Body | None = None,
483480
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
484-
) -> PrefixEditResponse:
481+
) -> Prefix:
485482
"""
486483
Modify the description for a prefix owned by the account.
487484
@@ -514,7 +511,7 @@ async def edit(
514511
timeout=timeout,
515512
post_parser=ResultWrapper._unwrapper,
516513
),
517-
cast_to=cast(Type[PrefixEditResponse], ResultWrapper[PrefixEditResponse]),
514+
cast_to=cast(Type[Prefix], ResultWrapper[Prefix]),
518515
)
519516

520517
async def get(
@@ -528,7 +525,7 @@ async def get(
528525
extra_query: Query | None = None,
529526
extra_body: Body | None = None,
530527
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
531-
) -> PrefixGetResponse:
528+
) -> Prefix:
532529
"""
533530
List a particular prefix owned by the account.
534531
@@ -558,7 +555,7 @@ async def get(
558555
timeout=timeout,
559556
post_parser=ResultWrapper._unwrapper,
560557
),
561-
cast_to=cast(Type[PrefixGetResponse], ResultWrapper[PrefixGetResponse]),
558+
cast_to=cast(Type[Prefix], ResultWrapper[Prefix]),
562559
)
563560

564561

src/cloudflare/resources/keyless_certificates.py

+12-13
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import httpx
88

99
from ..types import (
10-
Hostname,
1110
TunnelParam,
1211
BundleMethod,
1312
KeylessCertificate,
@@ -64,7 +63,7 @@ def create(
6463
extra_query: Query | None = None,
6564
extra_body: Body | None = None,
6665
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
67-
) -> Hostname:
66+
) -> KeylessCertificate:
6867
"""
6968
Create Keyless SSL Configuration
7069
@@ -117,7 +116,7 @@ def create(
117116
timeout=timeout,
118117
post_parser=ResultWrapper._unwrapper,
119118
),
120-
cast_to=cast(Type[Hostname], ResultWrapper[Hostname]),
119+
cast_to=cast(Type[KeylessCertificate], ResultWrapper[KeylessCertificate]),
121120
)
122121

123122
def list(
@@ -220,7 +219,7 @@ def edit(
220219
extra_query: Query | None = None,
221220
extra_body: Body | None = None,
222221
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
223-
) -> Hostname:
222+
) -> KeylessCertificate:
224223
"""This will update attributes of a Keyless SSL.
225224
226225
Consists of one or more of the
@@ -275,7 +274,7 @@ def edit(
275274
timeout=timeout,
276275
post_parser=ResultWrapper._unwrapper,
277276
),
278-
cast_to=cast(Type[Hostname], ResultWrapper[Hostname]),
277+
cast_to=cast(Type[KeylessCertificate], ResultWrapper[KeylessCertificate]),
279278
)
280279

281280
def get(
@@ -289,7 +288,7 @@ def get(
289288
extra_query: Query | None = None,
290289
extra_body: Body | None = None,
291290
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
292-
) -> Hostname:
291+
) -> KeylessCertificate:
293292
"""
294293
Get details for one Keyless SSL configuration.
295294
@@ -321,7 +320,7 @@ def get(
321320
timeout=timeout,
322321
post_parser=ResultWrapper._unwrapper,
323322
),
324-
cast_to=cast(Type[Hostname], ResultWrapper[Hostname]),
323+
cast_to=cast(Type[KeylessCertificate], ResultWrapper[KeylessCertificate]),
325324
)
326325

327326

@@ -350,7 +349,7 @@ async def create(
350349
extra_query: Query | None = None,
351350
extra_body: Body | None = None,
352351
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
353-
) -> Hostname:
352+
) -> KeylessCertificate:
354353
"""
355354
Create Keyless SSL Configuration
356355
@@ -403,7 +402,7 @@ async def create(
403402
timeout=timeout,
404403
post_parser=ResultWrapper._unwrapper,
405404
),
406-
cast_to=cast(Type[Hostname], ResultWrapper[Hostname]),
405+
cast_to=cast(Type[KeylessCertificate], ResultWrapper[KeylessCertificate]),
407406
)
408407

409408
def list(
@@ -506,7 +505,7 @@ async def edit(
506505
extra_query: Query | None = None,
507506
extra_body: Body | None = None,
508507
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
509-
) -> Hostname:
508+
) -> KeylessCertificate:
510509
"""This will update attributes of a Keyless SSL.
511510
512511
Consists of one or more of the
@@ -561,7 +560,7 @@ async def edit(
561560
timeout=timeout,
562561
post_parser=ResultWrapper._unwrapper,
563562
),
564-
cast_to=cast(Type[Hostname], ResultWrapper[Hostname]),
563+
cast_to=cast(Type[KeylessCertificate], ResultWrapper[KeylessCertificate]),
565564
)
566565

567566
async def get(
@@ -575,7 +574,7 @@ async def get(
575574
extra_query: Query | None = None,
576575
extra_body: Body | None = None,
577576
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
578-
) -> Hostname:
577+
) -> KeylessCertificate:
579578
"""
580579
Get details for one Keyless SSL configuration.
581580
@@ -607,7 +606,7 @@ async def get(
607606
timeout=timeout,
608607
post_parser=ResultWrapper._unwrapper,
609608
),
610-
cast_to=cast(Type[Hostname], ResultWrapper[Hostname]),
609+
cast_to=cast(Type[KeylessCertificate], ResultWrapper[KeylessCertificate]),
611610
)
612611

613612

0 commit comments

Comments
 (0)