Skip to content

Commit f90dc3a

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): update via SDK Studio (#230)
1 parent dd6a5b7 commit f90dc3a

File tree

257 files changed

+3474
-4975
lines changed

Some content is hidden

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

257 files changed

+3474
-4975
lines changed

api.md

+136-79
Large diffs are not rendered by default.

src/cloudflare/resources/keyless_certificates.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import httpx
88

99
from ..types import (
10+
TunnelParam,
1011
KeylessCertificateHostname,
1112
UnnamedSchemaRef16aca57bde2963201c7e6e895436c1c1,
1213
keyless_certificate_edit_params,
@@ -55,7 +56,7 @@ def create(
5556
port: float,
5657
bundle_method: UnnamedSchemaRef16aca57bde2963201c7e6e895436c1c1 | NotGiven = NOT_GIVEN,
5758
name: str | NotGiven = NOT_GIVEN,
58-
tunnel: keyless_certificate_create_params.Tunnel | NotGiven = NOT_GIVEN,
59+
tunnel: TunnelParam | NotGiven = NOT_GIVEN,
5960
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6061
# The extra values given here take precedence over values defined on the client or passed to this method.
6162
extra_headers: Headers | None = None,
@@ -214,7 +215,7 @@ def edit(
214215
host: str | NotGiven = NOT_GIVEN,
215216
name: str | NotGiven = NOT_GIVEN,
216217
port: float | NotGiven = NOT_GIVEN,
217-
tunnel: keyless_certificate_edit_params.Tunnel | NotGiven = NOT_GIVEN,
218+
tunnel: TunnelParam | NotGiven = NOT_GIVEN,
218219
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
219220
# The extra values given here take precedence over values defined on the client or passed to this method.
220221
extra_headers: Headers | None = None,
@@ -344,7 +345,7 @@ async def create(
344345
port: float,
345346
bundle_method: UnnamedSchemaRef16aca57bde2963201c7e6e895436c1c1 | NotGiven = NOT_GIVEN,
346347
name: str | NotGiven = NOT_GIVEN,
347-
tunnel: keyless_certificate_create_params.Tunnel | NotGiven = NOT_GIVEN,
348+
tunnel: TunnelParam | NotGiven = NOT_GIVEN,
348349
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
349350
# The extra values given here take precedence over values defined on the client or passed to this method.
350351
extra_headers: Headers | None = None,
@@ -503,7 +504,7 @@ async def edit(
503504
host: str | NotGiven = NOT_GIVEN,
504505
name: str | NotGiven = NOT_GIVEN,
505506
port: float | NotGiven = NOT_GIVEN,
506-
tunnel: keyless_certificate_edit_params.Tunnel | NotGiven = NOT_GIVEN,
507+
tunnel: TunnelParam | NotGiven = NOT_GIVEN,
507508
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
508509
# The extra values given here take precedence over values defined on the client or passed to this method.
509510
extra_headers: Headers | None = None,

src/cloudflare/resources/magic_network_monitoring/rules/rules.py

+27-27
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
make_request_options,
3535
)
3636
from ....types.magic_network_monitoring import (
37-
MagicNetworkMonitoringRule,
37+
Rule,
3838
rule_edit_params,
3939
rule_create_params,
4040
rule_delete_params,
@@ -68,7 +68,7 @@ def create(
6868
extra_query: Query | None = None,
6969
extra_body: Body | None = None,
7070
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
71-
) -> Optional[MagicNetworkMonitoringRule]:
71+
) -> Optional[Rule]:
7272
"""Create network monitoring rules for account.
7373
7474
Currently only supports creating a
@@ -95,7 +95,7 @@ def create(
9595
timeout=timeout,
9696
post_parser=ResultWrapper._unwrapper,
9797
),
98-
cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
98+
cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
9999
)
100100

101101
def update(
@@ -109,7 +109,7 @@ def update(
109109
extra_query: Query | None = None,
110110
extra_body: Body | None = None,
111111
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
112-
) -> Optional[MagicNetworkMonitoringRule]:
112+
) -> Optional[Rule]:
113113
"""
114114
Update network monitoring rules for account.
115115
@@ -134,7 +134,7 @@ def update(
134134
timeout=timeout,
135135
post_parser=ResultWrapper._unwrapper,
136136
),
137-
cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
137+
cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
138138
)
139139

140140
def list(
@@ -147,7 +147,7 @@ def list(
147147
extra_query: Query | None = None,
148148
extra_body: Body | None = None,
149149
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
150-
) -> SyncSinglePage[Optional[MagicNetworkMonitoringRule]]:
150+
) -> SyncSinglePage[Optional[Rule]]:
151151
"""
152152
Lists network monitoring rules for account.
153153
@@ -164,11 +164,11 @@ def list(
164164
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
165165
return self._get_api_list(
166166
f"/accounts/{account_id}/mnm/rules",
167-
page=SyncSinglePage[Optional[MagicNetworkMonitoringRule]],
167+
page=SyncSinglePage[Optional[Rule]],
168168
options=make_request_options(
169169
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
170170
),
171-
model=MagicNetworkMonitoringRule,
171+
model=Rule,
172172
)
173173

174174
def delete(
@@ -183,7 +183,7 @@ def delete(
183183
extra_query: Query | None = None,
184184
extra_body: Body | None = None,
185185
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
186-
) -> Optional[MagicNetworkMonitoringRule]:
186+
) -> Optional[Rule]:
187187
"""
188188
Delete a network monitoring rule for account.
189189
@@ -210,7 +210,7 @@ def delete(
210210
timeout=timeout,
211211
post_parser=ResultWrapper._unwrapper,
212212
),
213-
cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
213+
cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
214214
)
215215

216216
def edit(
@@ -225,7 +225,7 @@ def edit(
225225
extra_query: Query | None = None,
226226
extra_body: Body | None = None,
227227
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
228-
) -> Optional[MagicNetworkMonitoringRule]:
228+
) -> Optional[Rule]:
229229
"""
230230
Update a network monitoring rule for account.
231231
@@ -252,7 +252,7 @@ def edit(
252252
timeout=timeout,
253253
post_parser=ResultWrapper._unwrapper,
254254
),
255-
cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
255+
cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
256256
)
257257

258258
def get(
@@ -266,7 +266,7 @@ def get(
266266
extra_query: Query | None = None,
267267
extra_body: Body | None = None,
268268
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
269-
) -> Optional[MagicNetworkMonitoringRule]:
269+
) -> Optional[Rule]:
270270
"""
271271
List a single network monitoring rule for account.
272272
@@ -292,7 +292,7 @@ def get(
292292
timeout=timeout,
293293
post_parser=ResultWrapper._unwrapper,
294294
),
295-
cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
295+
cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
296296
)
297297

298298

@@ -320,7 +320,7 @@ async def create(
320320
extra_query: Query | None = None,
321321
extra_body: Body | None = None,
322322
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
323-
) -> Optional[MagicNetworkMonitoringRule]:
323+
) -> Optional[Rule]:
324324
"""Create network monitoring rules for account.
325325
326326
Currently only supports creating a
@@ -347,7 +347,7 @@ async def create(
347347
timeout=timeout,
348348
post_parser=ResultWrapper._unwrapper,
349349
),
350-
cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
350+
cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
351351
)
352352

353353
async def update(
@@ -361,7 +361,7 @@ async def update(
361361
extra_query: Query | None = None,
362362
extra_body: Body | None = None,
363363
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
364-
) -> Optional[MagicNetworkMonitoringRule]:
364+
) -> Optional[Rule]:
365365
"""
366366
Update network monitoring rules for account.
367367
@@ -386,7 +386,7 @@ async def update(
386386
timeout=timeout,
387387
post_parser=ResultWrapper._unwrapper,
388388
),
389-
cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
389+
cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
390390
)
391391

392392
def list(
@@ -399,7 +399,7 @@ def list(
399399
extra_query: Query | None = None,
400400
extra_body: Body | None = None,
401401
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
402-
) -> AsyncPaginator[Optional[MagicNetworkMonitoringRule], AsyncSinglePage[Optional[MagicNetworkMonitoringRule]]]:
402+
) -> AsyncPaginator[Optional[Rule], AsyncSinglePage[Optional[Rule]]]:
403403
"""
404404
Lists network monitoring rules for account.
405405
@@ -416,11 +416,11 @@ def list(
416416
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
417417
return self._get_api_list(
418418
f"/accounts/{account_id}/mnm/rules",
419-
page=AsyncSinglePage[Optional[MagicNetworkMonitoringRule]],
419+
page=AsyncSinglePage[Optional[Rule]],
420420
options=make_request_options(
421421
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
422422
),
423-
model=MagicNetworkMonitoringRule,
423+
model=Rule,
424424
)
425425

426426
async def delete(
@@ -435,7 +435,7 @@ async def delete(
435435
extra_query: Query | None = None,
436436
extra_body: Body | None = None,
437437
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
438-
) -> Optional[MagicNetworkMonitoringRule]:
438+
) -> Optional[Rule]:
439439
"""
440440
Delete a network monitoring rule for account.
441441
@@ -462,7 +462,7 @@ async def delete(
462462
timeout=timeout,
463463
post_parser=ResultWrapper._unwrapper,
464464
),
465-
cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
465+
cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
466466
)
467467

468468
async def edit(
@@ -477,7 +477,7 @@ async def edit(
477477
extra_query: Query | None = None,
478478
extra_body: Body | None = None,
479479
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
480-
) -> Optional[MagicNetworkMonitoringRule]:
480+
) -> Optional[Rule]:
481481
"""
482482
Update a network monitoring rule for account.
483483
@@ -504,7 +504,7 @@ async def edit(
504504
timeout=timeout,
505505
post_parser=ResultWrapper._unwrapper,
506506
),
507-
cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
507+
cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
508508
)
509509

510510
async def get(
@@ -518,7 +518,7 @@ async def get(
518518
extra_query: Query | None = None,
519519
extra_body: Body | None = None,
520520
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
521-
) -> Optional[MagicNetworkMonitoringRule]:
521+
) -> Optional[Rule]:
522522
"""
523523
List a single network monitoring rule for account.
524524
@@ -544,7 +544,7 @@ async def get(
544544
timeout=timeout,
545545
post_parser=ResultWrapper._unwrapper,
546546
),
547-
cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
547+
cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
548548
)
549549

550550

src/cloudflare/resources/magic_transit/gre_tunnels.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import httpx
88

9+
from ...types import HealthCheckParam
910
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
1011
from ..._utils import (
1112
maybe_transform,
@@ -99,7 +100,7 @@ def update(
99100
interface_address: str,
100101
name: str,
101102
description: str | NotGiven = NOT_GIVEN,
102-
health_check: gre_tunnel_update_params.HealthCheck | NotGiven = NOT_GIVEN,
103+
health_check: HealthCheckParam | NotGiven = NOT_GIVEN,
103104
mtu: int | NotGiven = NOT_GIVEN,
104105
ttl: int | NotGiven = NOT_GIVEN,
105106
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -368,7 +369,7 @@ async def update(
368369
interface_address: str,
369370
name: str,
370371
description: str | NotGiven = NOT_GIVEN,
371-
health_check: gre_tunnel_update_params.HealthCheck | NotGiven = NOT_GIVEN,
372+
health_check: HealthCheckParam | NotGiven = NOT_GIVEN,
372373
mtu: int | NotGiven = NOT_GIVEN,
373374
ttl: int | NotGiven = NOT_GIVEN,
374375
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.

src/cloudflare/resources/magic_transit/ipsec_tunnels.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import httpx
88

9+
from ...types import HealthCheckParam
910
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
1011
from ..._utils import (
1112
maybe_transform,
@@ -57,7 +58,7 @@ def create(
5758
name: str,
5859
customer_endpoint: str | NotGiven = NOT_GIVEN,
5960
description: str | NotGiven = NOT_GIVEN,
60-
health_check: ipsec_tunnel_create_params.HealthCheck | NotGiven = NOT_GIVEN,
61+
health_check: HealthCheckParam | NotGiven = NOT_GIVEN,
6162
psk: str | NotGiven = NOT_GIVEN,
6263
replay_protection: bool | NotGiven = NOT_GIVEN,
6364
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -139,7 +140,7 @@ def update(
139140
name: str,
140141
customer_endpoint: str | NotGiven = NOT_GIVEN,
141142
description: str | NotGiven = NOT_GIVEN,
142-
health_check: ipsec_tunnel_update_params.HealthCheck | NotGiven = NOT_GIVEN,
143+
health_check: HealthCheckParam | NotGiven = NOT_GIVEN,
143144
psk: str | NotGiven = NOT_GIVEN,
144145
replay_protection: bool | NotGiven = NOT_GIVEN,
145146
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -415,7 +416,7 @@ async def create(
415416
name: str,
416417
customer_endpoint: str | NotGiven = NOT_GIVEN,
417418
description: str | NotGiven = NOT_GIVEN,
418-
health_check: ipsec_tunnel_create_params.HealthCheck | NotGiven = NOT_GIVEN,
419+
health_check: HealthCheckParam | NotGiven = NOT_GIVEN,
419420
psk: str | NotGiven = NOT_GIVEN,
420421
replay_protection: bool | NotGiven = NOT_GIVEN,
421422
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -497,7 +498,7 @@ async def update(
497498
name: str,
498499
customer_endpoint: str | NotGiven = NOT_GIVEN,
499500
description: str | NotGiven = NOT_GIVEN,
500-
health_check: ipsec_tunnel_update_params.HealthCheck | NotGiven = NOT_GIVEN,
501+
health_check: HealthCheckParam | NotGiven = NOT_GIVEN,
501502
psk: str | NotGiven = NOT_GIVEN,
502503
replay_protection: bool | NotGiven = NOT_GIVEN,
503504
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.

src/cloudflare/resources/magic_transit/routes.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
make_request_options,
2525
)
2626
from ...types.magic_transit import (
27+
ScopeParam,
2728
RouteGetResponse,
2829
RouteListResponse,
2930
RouteEmptyResponse,
@@ -100,7 +101,7 @@ def update(
100101
prefix: str,
101102
priority: int,
102103
description: str | NotGiven = NOT_GIVEN,
103-
scope: route_update_params.Scope | NotGiven = NOT_GIVEN,
104+
scope: ScopeParam | NotGiven = NOT_GIVEN,
104105
weight: int | NotGiven = NOT_GIVEN,
105106
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
106107
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -398,7 +399,7 @@ async def update(
398399
prefix: str,
399400
priority: int,
400401
description: str | NotGiven = NOT_GIVEN,
401-
scope: route_update_params.Scope | NotGiven = NOT_GIVEN,
402+
scope: ScopeParam | NotGiven = NOT_GIVEN,
402403
weight: int | NotGiven = NOT_GIVEN,
403404
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
404405
# The extra values given here take precedence over values defined on the client or passed to this method.

0 commit comments

Comments
 (0)