Skip to content

Commit 1979faa

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): update via SDK Studio (#175)
1 parent 9f7f690 commit 1979faa

File tree

210 files changed

+4134
-614
lines changed

Some content is hidden

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

210 files changed

+4134
-614
lines changed

api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4446,7 +4446,7 @@ from cloudflare.types.stream import EmbedGetResponse
44464446

44474447
Methods:
44484448

4449-
- <code title="get /accounts/{account_id}/stream/{identifier}/embed">client.stream.embed.<a href="./src/cloudflare/resources/stream/embed.py">get</a>(identifier, \*, account_id) -> <a href="./src/cloudflare/types/stream/embed_get_response.py">object</a></code>
4449+
- <code title="get /accounts/{account_id}/stream/{identifier}/embed">client.stream.embed.<a href="./src/cloudflare/resources/stream/embed.py">get</a>(identifier, \*, account_id) -> str</code>
44504450

44514451
## Token
44524452

src/cloudflare/resources/dns/records.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ def create(
688688
self,
689689
*,
690690
zone_id: str,
691-
content: object,
691+
content: str,
692692
name: str,
693693
type: Literal["NS"],
694694
comment: str | NotGiven = NOT_GIVEN,
@@ -1958,7 +1958,7 @@ def update(
19581958
dns_record_id: str,
19591959
*,
19601960
zone_id: str,
1961-
content: object,
1961+
content: str,
19621962
name: str,
19631963
type: Literal["NS"],
19641964
comment: str | NotGiven = NOT_GIVEN,
@@ -3417,7 +3417,7 @@ def edit(
34173417
dns_record_id: str,
34183418
*,
34193419
zone_id: str,
3420-
content: object,
3420+
content: str,
34213421
name: str,
34223422
type: Literal["NS"],
34233423
comment: str | NotGiven = NOT_GIVEN,
@@ -4890,7 +4890,7 @@ async def create(
48904890
self,
48914891
*,
48924892
zone_id: str,
4893-
content: object,
4893+
content: str,
48944894
name: str,
48954895
type: Literal["NS"],
48964896
comment: str | NotGiven = NOT_GIVEN,
@@ -6160,7 +6160,7 @@ async def update(
61606160
dns_record_id: str,
61616161
*,
61626162
zone_id: str,
6163-
content: object,
6163+
content: str,
61646164
name: str,
61656165
type: Literal["NS"],
61666166
comment: str | NotGiven = NOT_GIVEN,
@@ -7619,7 +7619,7 @@ async def edit(
76197619
dns_record_id: str,
76207620
*,
76217621
zone_id: str,
7622-
content: object,
7622+
content: str,
76237623
name: str,
76247624
type: Literal["NS"],
76257625
comment: str | NotGiven = NOT_GIVEN,

src/cloudflare/resources/images/v1/keys.py

+12-4
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def with_streaming_response(self) -> KeysWithStreamingResponse:
3535

3636
def update(
3737
self,
38-
signing_key_name: object,
38+
signing_key_name: str,
3939
*,
4040
account_id: str,
4141
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -62,6 +62,8 @@ def update(
6262
"""
6363
if not account_id:
6464
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
65+
if not signing_key_name:
66+
raise ValueError(f"Expected a non-empty value for `signing_key_name` but received {signing_key_name!r}")
6567
return self._put(
6668
f"/accounts/{account_id}/images/v1/keys/{signing_key_name}",
6769
options=make_request_options(
@@ -116,7 +118,7 @@ def list(
116118

117119
def delete(
118120
self,
119-
signing_key_name: object,
121+
signing_key_name: str,
120122
*,
121123
account_id: str,
122124
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -144,6 +146,8 @@ def delete(
144146
"""
145147
if not account_id:
146148
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
149+
if not signing_key_name:
150+
raise ValueError(f"Expected a non-empty value for `signing_key_name` but received {signing_key_name!r}")
147151
return self._delete(
148152
f"/accounts/{account_id}/images/v1/keys/{signing_key_name}",
149153
options=make_request_options(
@@ -168,7 +172,7 @@ def with_streaming_response(self) -> AsyncKeysWithStreamingResponse:
168172

169173
async def update(
170174
self,
171-
signing_key_name: object,
175+
signing_key_name: str,
172176
*,
173177
account_id: str,
174178
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -195,6 +199,8 @@ async def update(
195199
"""
196200
if not account_id:
197201
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
202+
if not signing_key_name:
203+
raise ValueError(f"Expected a non-empty value for `signing_key_name` but received {signing_key_name!r}")
198204
return await self._put(
199205
f"/accounts/{account_id}/images/v1/keys/{signing_key_name}",
200206
options=make_request_options(
@@ -249,7 +255,7 @@ async def list(
249255

250256
async def delete(
251257
self,
252-
signing_key_name: object,
258+
signing_key_name: str,
253259
*,
254260
account_id: str,
255261
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -277,6 +283,8 @@ async def delete(
277283
"""
278284
if not account_id:
279285
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
286+
if not signing_key_name:
287+
raise ValueError(f"Expected a non-empty value for `signing_key_name` but received {signing_key_name!r}")
280288
return await self._delete(
281289
f"/accounts/{account_id}/images/v1/keys/{signing_key_name}",
282290
options=make_request_options(

src/cloudflare/resources/images/v1/variants.py

+20-8
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def create(
4747
self,
4848
*,
4949
account_id: str,
50-
id: object,
50+
id: str,
5151
options: variant_create_params.Options,
5252
never_require_signed_urls: bool | NotGiven = NOT_GIVEN,
5353
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -139,7 +139,7 @@ def list(
139139

140140
def delete(
141141
self,
142-
variant_id: object,
142+
variant_id: str,
143143
*,
144144
account_id: str,
145145
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -165,6 +165,8 @@ def delete(
165165
"""
166166
if not account_id:
167167
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
168+
if not variant_id:
169+
raise ValueError(f"Expected a non-empty value for `variant_id` but received {variant_id!r}")
168170
return cast(
169171
VariantDeleteResponse,
170172
self._delete(
@@ -184,7 +186,7 @@ def delete(
184186

185187
def edit(
186188
self,
187-
variant_id: object,
189+
variant_id: str,
188190
*,
189191
account_id: str,
190192
options: variant_edit_params.Options,
@@ -217,6 +219,8 @@ def edit(
217219
"""
218220
if not account_id:
219221
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
222+
if not variant_id:
223+
raise ValueError(f"Expected a non-empty value for `variant_id` but received {variant_id!r}")
220224
return self._patch(
221225
f"/accounts/{account_id}/images/v1/variants/{variant_id}",
222226
body=maybe_transform(
@@ -238,7 +242,7 @@ def edit(
238242

239243
def get(
240244
self,
241-
variant_id: object,
245+
variant_id: str,
242246
*,
243247
account_id: str,
244248
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -264,6 +268,8 @@ def get(
264268
"""
265269
if not account_id:
266270
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
271+
if not variant_id:
272+
raise ValueError(f"Expected a non-empty value for `variant_id` but received {variant_id!r}")
267273
return self._get(
268274
f"/accounts/{account_id}/images/v1/variants/{variant_id}",
269275
options=make_request_options(
@@ -290,7 +296,7 @@ async def create(
290296
self,
291297
*,
292298
account_id: str,
293-
id: object,
299+
id: str,
294300
options: variant_create_params.Options,
295301
never_require_signed_urls: bool | NotGiven = NOT_GIVEN,
296302
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -382,7 +388,7 @@ async def list(
382388

383389
async def delete(
384390
self,
385-
variant_id: object,
391+
variant_id: str,
386392
*,
387393
account_id: str,
388394
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -408,6 +414,8 @@ async def delete(
408414
"""
409415
if not account_id:
410416
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
417+
if not variant_id:
418+
raise ValueError(f"Expected a non-empty value for `variant_id` but received {variant_id!r}")
411419
return cast(
412420
VariantDeleteResponse,
413421
await self._delete(
@@ -427,7 +435,7 @@ async def delete(
427435

428436
async def edit(
429437
self,
430-
variant_id: object,
438+
variant_id: str,
431439
*,
432440
account_id: str,
433441
options: variant_edit_params.Options,
@@ -460,6 +468,8 @@ async def edit(
460468
"""
461469
if not account_id:
462470
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
471+
if not variant_id:
472+
raise ValueError(f"Expected a non-empty value for `variant_id` but received {variant_id!r}")
463473
return await self._patch(
464474
f"/accounts/{account_id}/images/v1/variants/{variant_id}",
465475
body=await async_maybe_transform(
@@ -481,7 +491,7 @@ async def edit(
481491

482492
async def get(
483493
self,
484-
variant_id: object,
494+
variant_id: str,
485495
*,
486496
account_id: str,
487497
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -507,6 +517,8 @@ async def get(
507517
"""
508518
if not account_id:
509519
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
520+
if not variant_id:
521+
raise ValueError(f"Expected a non-empty value for `variant_id` but received {variant_id!r}")
510522
return await self._get(
511523
f"/accounts/{account_id}/images/v1/variants/{variant_id}",
512524
options=make_request_options(

src/cloudflare/resources/intel/domain_history.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def get(
4141
self,
4242
*,
4343
account_id: str,
44-
domain: object | NotGiven = NOT_GIVEN,
44+
domain: str | NotGiven = NOT_GIVEN,
4545
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
4646
# The extra values given here take precedence over values defined on the client or passed to this method.
4747
extra_headers: Headers | None = None,
@@ -92,7 +92,7 @@ async def get(
9292
self,
9393
*,
9494
account_id: str,
95-
domain: object | NotGiven = NOT_GIVEN,
95+
domain: str | NotGiven = NOT_GIVEN,
9696
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
9797
# The extra values given here take precedence over values defined on the client or passed to this method.
9898
extra_headers: Headers | None = None,

src/cloudflare/resources/intel/miscategorizations.py

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

33
from __future__ import annotations
44

5-
from typing import Any, cast
5+
from typing import Any, Iterable, cast
66
from typing_extensions import Literal
77

88
import httpx
@@ -42,12 +42,12 @@ def create(
4242
self,
4343
*,
4444
account_id: str,
45-
content_adds: object | NotGiven = NOT_GIVEN,
46-
content_removes: object | NotGiven = NOT_GIVEN,
45+
content_adds: Iterable[float] | NotGiven = NOT_GIVEN,
46+
content_removes: Iterable[float] | NotGiven = NOT_GIVEN,
4747
indicator_type: Literal["domain", "ipv4", "ipv6", "url"] | NotGiven = NOT_GIVEN,
4848
ip: object | NotGiven = NOT_GIVEN,
49-
security_adds: object | NotGiven = NOT_GIVEN,
50-
security_removes: object | NotGiven = NOT_GIVEN,
49+
security_adds: Iterable[float] | NotGiven = NOT_GIVEN,
50+
security_removes: Iterable[float] | NotGiven = NOT_GIVEN,
5151
url: 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.
@@ -129,12 +129,12 @@ async def create(
129129
self,
130130
*,
131131
account_id: str,
132-
content_adds: object | NotGiven = NOT_GIVEN,
133-
content_removes: object | NotGiven = NOT_GIVEN,
132+
content_adds: Iterable[float] | NotGiven = NOT_GIVEN,
133+
content_removes: Iterable[float] | NotGiven = NOT_GIVEN,
134134
indicator_type: Literal["domain", "ipv4", "ipv6", "url"] | NotGiven = NOT_GIVEN,
135135
ip: object | NotGiven = NOT_GIVEN,
136-
security_adds: object | NotGiven = NOT_GIVEN,
137-
security_removes: object | NotGiven = NOT_GIVEN,
136+
security_adds: Iterable[float] | NotGiven = NOT_GIVEN,
137+
security_removes: Iterable[float] | NotGiven = NOT_GIVEN,
138138
url: str | NotGiven = NOT_GIVEN,
139139
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
140140
# The extra values given here take precedence over values defined on the client or passed to this method.

src/cloudflare/resources/load_balancers/previews.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def with_streaming_response(self) -> PreviewsWithStreamingResponse:
3535

3636
def get(
3737
self,
38-
preview_id: object,
38+
preview_id: str,
3939
*,
4040
account_id: str,
4141
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -61,6 +61,8 @@ def get(
6161
"""
6262
if not account_id:
6363
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
64+
if not preview_id:
65+
raise ValueError(f"Expected a non-empty value for `preview_id` but received {preview_id!r}")
6466
return self._get(
6567
f"/accounts/{account_id}/load_balancers/preview/{preview_id}",
6668
options=make_request_options(
@@ -85,7 +87,7 @@ def with_streaming_response(self) -> AsyncPreviewsWithStreamingResponse:
8587

8688
async def get(
8789
self,
88-
preview_id: object,
90+
preview_id: str,
8991
*,
9092
account_id: str,
9193
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -111,6 +113,8 @@ async def get(
111113
"""
112114
if not account_id:
113115
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
116+
if not preview_id:
117+
raise ValueError(f"Expected a non-empty value for `preview_id` but received {preview_id!r}")
114118
return await self._get(
115119
f"/accounts/{account_id}/load_balancers/preview/{preview_id}",
116120
options=make_request_options(

0 commit comments

Comments
 (0)