Skip to content

Commit d17c894

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): update via SDK Studio (#248)
1 parent eee2f14 commit d17c894

36 files changed

+334
-337
lines changed

api.md

+28-31
Large diffs are not rendered by default.

src/cloudflare/resources/zero_trust/access/bookmarks.py

+19-19
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
make_request_options,
2727
)
2828
from ....types.zero_trust.access import (
29+
Bookmark,
2930
BookmarkDeleteResponse,
30-
bookmarks,
3131
bookmark_create_params,
3232
bookmark_delete_params,
3333
bookmark_update_params,
@@ -57,7 +57,7 @@ def create(
5757
extra_query: Query | None = None,
5858
extra_body: Body | None = None,
5959
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
60-
) -> bookmarks.Bookmarks:
60+
) -> Bookmark:
6161
"""
6262
Create a new Bookmark application.
6363
@@ -86,7 +86,7 @@ def create(
8686
timeout=timeout,
8787
post_parser=ResultWrapper._unwrapper,
8888
),
89-
cast_to=cast(Type[bookmarks.Bookmarks], ResultWrapper[bookmarks.Bookmarks]),
89+
cast_to=cast(Type[Bookmark], ResultWrapper[Bookmark]),
9090
)
9191

9292
def update(
@@ -101,7 +101,7 @@ def update(
101101
extra_query: Query | None = None,
102102
extra_body: Body | None = None,
103103
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
104-
) -> bookmarks.Bookmarks:
104+
) -> Bookmark:
105105
"""
106106
Updates a configured Bookmark application.
107107
@@ -130,7 +130,7 @@ def update(
130130
timeout=timeout,
131131
post_parser=ResultWrapper._unwrapper,
132132
),
133-
cast_to=cast(Type[bookmarks.Bookmarks], ResultWrapper[bookmarks.Bookmarks]),
133+
cast_to=cast(Type[Bookmark], ResultWrapper[Bookmark]),
134134
)
135135

136136
def list(
@@ -143,7 +143,7 @@ def list(
143143
extra_query: Query | None = None,
144144
extra_body: Body | None = None,
145145
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
146-
) -> SyncSinglePage[bookmarks.Bookmarks]:
146+
) -> SyncSinglePage[Bookmark]:
147147
"""
148148
Lists Bookmark applications.
149149
@@ -160,11 +160,11 @@ def list(
160160
raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}")
161161
return self._get_api_list(
162162
f"/accounts/{identifier}/access/bookmarks",
163-
page=SyncSinglePage[bookmarks.Bookmarks],
163+
page=SyncSinglePage[Bookmark],
164164
options=make_request_options(
165165
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
166166
),
167-
model=bookmarks.Bookmarks,
167+
model=Bookmark,
168168
)
169169

170170
def delete(
@@ -222,7 +222,7 @@ def get(
222222
extra_query: Query | None = None,
223223
extra_body: Body | None = None,
224224
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
225-
) -> bookmarks.Bookmarks:
225+
) -> Bookmark:
226226
"""
227227
Fetches a single Bookmark application.
228228
@@ -250,7 +250,7 @@ def get(
250250
timeout=timeout,
251251
post_parser=ResultWrapper._unwrapper,
252252
),
253-
cast_to=cast(Type[bookmarks.Bookmarks], ResultWrapper[bookmarks.Bookmarks]),
253+
cast_to=cast(Type[Bookmark], ResultWrapper[Bookmark]),
254254
)
255255

256256

@@ -275,7 +275,7 @@ async def create(
275275
extra_query: Query | None = None,
276276
extra_body: Body | None = None,
277277
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
278-
) -> bookmarks.Bookmarks:
278+
) -> Bookmark:
279279
"""
280280
Create a new Bookmark application.
281281
@@ -304,7 +304,7 @@ async def create(
304304
timeout=timeout,
305305
post_parser=ResultWrapper._unwrapper,
306306
),
307-
cast_to=cast(Type[bookmarks.Bookmarks], ResultWrapper[bookmarks.Bookmarks]),
307+
cast_to=cast(Type[Bookmark], ResultWrapper[Bookmark]),
308308
)
309309

310310
async def update(
@@ -319,7 +319,7 @@ async def update(
319319
extra_query: Query | None = None,
320320
extra_body: Body | None = None,
321321
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
322-
) -> bookmarks.Bookmarks:
322+
) -> Bookmark:
323323
"""
324324
Updates a configured Bookmark application.
325325
@@ -348,7 +348,7 @@ async def update(
348348
timeout=timeout,
349349
post_parser=ResultWrapper._unwrapper,
350350
),
351-
cast_to=cast(Type[bookmarks.Bookmarks], ResultWrapper[bookmarks.Bookmarks]),
351+
cast_to=cast(Type[Bookmark], ResultWrapper[Bookmark]),
352352
)
353353

354354
def list(
@@ -361,7 +361,7 @@ def list(
361361
extra_query: Query | None = None,
362362
extra_body: Body | None = None,
363363
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
364-
) -> AsyncPaginator[bookmarks.Bookmarks, AsyncSinglePage[bookmarks.Bookmarks]]:
364+
) -> AsyncPaginator[Bookmark, AsyncSinglePage[Bookmark]]:
365365
"""
366366
Lists Bookmark applications.
367367
@@ -378,11 +378,11 @@ def list(
378378
raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}")
379379
return self._get_api_list(
380380
f"/accounts/{identifier}/access/bookmarks",
381-
page=AsyncSinglePage[bookmarks.Bookmarks],
381+
page=AsyncSinglePage[Bookmark],
382382
options=make_request_options(
383383
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
384384
),
385-
model=bookmarks.Bookmarks,
385+
model=Bookmark,
386386
)
387387

388388
async def delete(
@@ -440,7 +440,7 @@ async def get(
440440
extra_query: Query | None = None,
441441
extra_body: Body | None = None,
442442
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
443-
) -> bookmarks.Bookmarks:
443+
) -> Bookmark:
444444
"""
445445
Fetches a single Bookmark application.
446446
@@ -468,7 +468,7 @@ async def get(
468468
timeout=timeout,
469469
post_parser=ResultWrapper._unwrapper,
470470
),
471-
cast_to=cast(Type[bookmarks.Bookmarks], ResultWrapper[bookmarks.Bookmarks]),
471+
cast_to=cast(Type[Bookmark], ResultWrapper[Bookmark]),
472472
)
473473

474474

src/cloudflare/resources/zero_trust/access/service_tokens.py

+19-19
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
make_request_options,
2727
)
2828
from ....types.zero_trust.access import (
29-
ErviceToken,
29+
ServiceToken,
3030
ServiceTokenCreateResponse,
3131
ServiceTokenRotateResponse,
3232
service_token_create_params,
@@ -132,7 +132,7 @@ def update(
132132
extra_query: Query | None = None,
133133
extra_body: Body | None = None,
134134
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
135-
) -> ErviceToken:
135+
) -> ServiceToken:
136136
"""
137137
Updates a configured service token.
138138
@@ -190,7 +190,7 @@ def update(
190190
timeout=timeout,
191191
post_parser=ResultWrapper._unwrapper,
192192
),
193-
cast_to=cast(Type[ErviceToken], ResultWrapper[ErviceToken]),
193+
cast_to=cast(Type[ServiceToken], ResultWrapper[ServiceToken]),
194194
)
195195

196196
def list(
@@ -204,7 +204,7 @@ def list(
204204
extra_query: Query | None = None,
205205
extra_body: Body | None = None,
206206
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
207-
) -> SyncSinglePage[ErviceToken]:
207+
) -> SyncSinglePage[ServiceToken]:
208208
"""
209209
Lists all service tokens.
210210
@@ -238,11 +238,11 @@ def list(
238238
account_or_zone_id = zone_id
239239
return self._get_api_list(
240240
f"/{account_or_zone}/{account_or_zone_id}/access/service_tokens",
241-
page=SyncSinglePage[ErviceToken],
241+
page=SyncSinglePage[ServiceToken],
242242
options=make_request_options(
243243
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
244244
),
245-
model=ErviceToken,
245+
model=ServiceToken,
246246
)
247247

248248
def delete(
@@ -257,7 +257,7 @@ def delete(
257257
extra_query: Query | None = None,
258258
extra_body: Body | None = None,
259259
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
260-
) -> ErviceToken:
260+
) -> ServiceToken:
261261
"""
262262
Deletes a service token.
263263
@@ -302,7 +302,7 @@ def delete(
302302
timeout=timeout,
303303
post_parser=ResultWrapper._unwrapper,
304304
),
305-
cast_to=cast(Type[ErviceToken], ResultWrapper[ErviceToken]),
305+
cast_to=cast(Type[ServiceToken], ResultWrapper[ServiceToken]),
306306
)
307307

308308
def refresh(
@@ -316,7 +316,7 @@ def refresh(
316316
extra_query: Query | None = None,
317317
extra_body: Body | None = None,
318318
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
319-
) -> ErviceToken:
319+
) -> ServiceToken:
320320
"""
321321
Refreshes the expiration of a service token.
322322
@@ -346,7 +346,7 @@ def refresh(
346346
timeout=timeout,
347347
post_parser=ResultWrapper._unwrapper,
348348
),
349-
cast_to=cast(Type[ErviceToken], ResultWrapper[ErviceToken]),
349+
cast_to=cast(Type[ServiceToken], ResultWrapper[ServiceToken]),
350350
)
351351

352352
def rotate(
@@ -490,7 +490,7 @@ async def update(
490490
extra_query: Query | None = None,
491491
extra_body: Body | None = None,
492492
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
493-
) -> ErviceToken:
493+
) -> ServiceToken:
494494
"""
495495
Updates a configured service token.
496496
@@ -548,7 +548,7 @@ async def update(
548548
timeout=timeout,
549549
post_parser=ResultWrapper._unwrapper,
550550
),
551-
cast_to=cast(Type[ErviceToken], ResultWrapper[ErviceToken]),
551+
cast_to=cast(Type[ServiceToken], ResultWrapper[ServiceToken]),
552552
)
553553

554554
def list(
@@ -562,7 +562,7 @@ def list(
562562
extra_query: Query | None = None,
563563
extra_body: Body | None = None,
564564
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
565-
) -> AsyncPaginator[ErviceToken, AsyncSinglePage[ErviceToken]]:
565+
) -> AsyncPaginator[ServiceToken, AsyncSinglePage[ServiceToken]]:
566566
"""
567567
Lists all service tokens.
568568
@@ -596,11 +596,11 @@ def list(
596596
account_or_zone_id = zone_id
597597
return self._get_api_list(
598598
f"/{account_or_zone}/{account_or_zone_id}/access/service_tokens",
599-
page=AsyncSinglePage[ErviceToken],
599+
page=AsyncSinglePage[ServiceToken],
600600
options=make_request_options(
601601
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
602602
),
603-
model=ErviceToken,
603+
model=ServiceToken,
604604
)
605605

606606
async def delete(
@@ -615,7 +615,7 @@ async def delete(
615615
extra_query: Query | None = None,
616616
extra_body: Body | None = None,
617617
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
618-
) -> ErviceToken:
618+
) -> ServiceToken:
619619
"""
620620
Deletes a service token.
621621
@@ -660,7 +660,7 @@ async def delete(
660660
timeout=timeout,
661661
post_parser=ResultWrapper._unwrapper,
662662
),
663-
cast_to=cast(Type[ErviceToken], ResultWrapper[ErviceToken]),
663+
cast_to=cast(Type[ServiceToken], ResultWrapper[ServiceToken]),
664664
)
665665

666666
async def refresh(
@@ -674,7 +674,7 @@ async def refresh(
674674
extra_query: Query | None = None,
675675
extra_body: Body | None = None,
676676
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
677-
) -> ErviceToken:
677+
) -> ServiceToken:
678678
"""
679679
Refreshes the expiration of a service token.
680680
@@ -704,7 +704,7 @@ async def refresh(
704704
timeout=timeout,
705705
post_parser=ResultWrapper._unwrapper,
706706
),
707-
cast_to=cast(Type[ErviceToken], ResultWrapper[ErviceToken]),
707+
cast_to=cast(Type[ServiceToken], ResultWrapper[ServiceToken]),
708708
)
709709

710710
async def rotate(

0 commit comments

Comments
 (0)