Skip to content

Commit d491639

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): update via SDK Studio (#219)
1 parent b031c41 commit d491639

File tree

81 files changed

+770
-608
lines changed

Some content is hidden

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

81 files changed

+770
-608
lines changed

api.md

+78-46
Large diffs are not rendered by default.

src/cloudflare/resources/addressing/address_maps/accounts.py

+18-14
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,12 @@
2323
from ...._base_client import (
2424
make_request_options,
2525
)
26-
from ....types.shared import UnnamedSchemaRef167
27-
from ....types.addressing.address_maps import account_delete_params, account_update_params
26+
from ....types.addressing.address_maps import (
27+
AccountDeleteResponse,
28+
AccountUpdateResponse,
29+
account_delete_params,
30+
account_update_params,
31+
)
2832

2933
__all__ = ["Accounts", "AsyncAccounts"]
3034

@@ -50,7 +54,7 @@ def update(
5054
extra_query: Query | None = None,
5155
extra_body: Body | None = None,
5256
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
53-
) -> Optional[UnnamedSchemaRef167]:
57+
) -> Optional[AccountUpdateResponse]:
5458
"""
5559
Add an account as a member of a particular address map.
5660
@@ -72,7 +76,7 @@ def update(
7276
if not address_map_id:
7377
raise ValueError(f"Expected a non-empty value for `address_map_id` but received {address_map_id!r}")
7478
return cast(
75-
Optional[UnnamedSchemaRef167],
79+
Optional[AccountUpdateResponse],
7680
self._put(
7781
f"/accounts/{account_id}/addressing/address_maps/{address_map_id}/accounts/{account_id}",
7882
body=maybe_transform(body, account_update_params.AccountUpdateParams),
@@ -84,7 +88,7 @@ def update(
8488
post_parser=ResultWrapper._unwrapper,
8589
),
8690
cast_to=cast(
87-
Any, ResultWrapper[UnnamedSchemaRef167]
91+
Any, ResultWrapper[AccountUpdateResponse]
8892
), # Union types cannot be passed in as arguments in the type system
8993
),
9094
)
@@ -101,7 +105,7 @@ def delete(
101105
extra_query: Query | None = None,
102106
extra_body: Body | None = None,
103107
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
104-
) -> Optional[UnnamedSchemaRef167]:
108+
) -> Optional[AccountDeleteResponse]:
105109
"""
106110
Remove an account as a member of a particular address map.
107111
@@ -123,7 +127,7 @@ def delete(
123127
if not address_map_id:
124128
raise ValueError(f"Expected a non-empty value for `address_map_id` but received {address_map_id!r}")
125129
return cast(
126-
Optional[UnnamedSchemaRef167],
130+
Optional[AccountDeleteResponse],
127131
self._delete(
128132
f"/accounts/{account_id}/addressing/address_maps/{address_map_id}/accounts/{account_id}",
129133
body=maybe_transform(body, account_delete_params.AccountDeleteParams),
@@ -135,7 +139,7 @@ def delete(
135139
post_parser=ResultWrapper._unwrapper,
136140
),
137141
cast_to=cast(
138-
Any, ResultWrapper[UnnamedSchemaRef167]
142+
Any, ResultWrapper[AccountDeleteResponse]
139143
), # Union types cannot be passed in as arguments in the type system
140144
),
141145
)
@@ -162,7 +166,7 @@ async def update(
162166
extra_query: Query | None = None,
163167
extra_body: Body | None = None,
164168
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
165-
) -> Optional[UnnamedSchemaRef167]:
169+
) -> Optional[AccountUpdateResponse]:
166170
"""
167171
Add an account as a member of a particular address map.
168172
@@ -184,7 +188,7 @@ async def update(
184188
if not address_map_id:
185189
raise ValueError(f"Expected a non-empty value for `address_map_id` but received {address_map_id!r}")
186190
return cast(
187-
Optional[UnnamedSchemaRef167],
191+
Optional[AccountUpdateResponse],
188192
await self._put(
189193
f"/accounts/{account_id}/addressing/address_maps/{address_map_id}/accounts/{account_id}",
190194
body=await async_maybe_transform(body, account_update_params.AccountUpdateParams),
@@ -196,7 +200,7 @@ async def update(
196200
post_parser=ResultWrapper._unwrapper,
197201
),
198202
cast_to=cast(
199-
Any, ResultWrapper[UnnamedSchemaRef167]
203+
Any, ResultWrapper[AccountUpdateResponse]
200204
), # Union types cannot be passed in as arguments in the type system
201205
),
202206
)
@@ -213,7 +217,7 @@ async def delete(
213217
extra_query: Query | None = None,
214218
extra_body: Body | None = None,
215219
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
216-
) -> Optional[UnnamedSchemaRef167]:
220+
) -> Optional[AccountDeleteResponse]:
217221
"""
218222
Remove an account as a member of a particular address map.
219223
@@ -235,7 +239,7 @@ async def delete(
235239
if not address_map_id:
236240
raise ValueError(f"Expected a non-empty value for `address_map_id` but received {address_map_id!r}")
237241
return cast(
238-
Optional[UnnamedSchemaRef167],
242+
Optional[AccountDeleteResponse],
239243
await self._delete(
240244
f"/accounts/{account_id}/addressing/address_maps/{address_map_id}/accounts/{account_id}",
241245
body=await async_maybe_transform(body, account_delete_params.AccountDeleteParams),
@@ -247,7 +251,7 @@ async def delete(
247251
post_parser=ResultWrapper._unwrapper,
248252
),
249253
cast_to=cast(
250-
Any, ResultWrapper[UnnamedSchemaRef167]
254+
Any, ResultWrapper[AccountDeleteResponse]
251255
), # Union types cannot be passed in as arguments in the type system
252256
),
253257
)

src/cloudflare/resources/addressing/address_maps/address_maps.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@
4949
AsyncPaginator,
5050
make_request_options,
5151
)
52-
from ....types.shared import UnnamedSchemaRef167
5352
from ....types.addressing import (
5453
AddressingAddressMaps,
5554
AddressMapGetResponse,
5655
AddressMapCreateResponse,
56+
AddressMapDeleteResponse,
5757
address_map_edit_params,
5858
address_map_create_params,
5959
address_map_delete_params,
@@ -185,7 +185,7 @@ def delete(
185185
extra_query: Query | None = None,
186186
extra_body: Body | None = None,
187187
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
188-
) -> Optional[UnnamedSchemaRef167]:
188+
) -> Optional[AddressMapDeleteResponse]:
189189
"""Delete a particular address map owned by the account.
190190
191191
An Address Map must be
@@ -209,7 +209,7 @@ def delete(
209209
if not address_map_id:
210210
raise ValueError(f"Expected a non-empty value for `address_map_id` but received {address_map_id!r}")
211211
return cast(
212-
Optional[UnnamedSchemaRef167],
212+
Optional[AddressMapDeleteResponse],
213213
self._delete(
214214
f"/accounts/{account_id}/addressing/address_maps/{address_map_id}",
215215
body=maybe_transform(body, address_map_delete_params.AddressMapDeleteParams),
@@ -221,7 +221,7 @@ def delete(
221221
post_parser=ResultWrapper._unwrapper,
222222
),
223223
cast_to=cast(
224-
Any, ResultWrapper[UnnamedSchemaRef167]
224+
Any, ResultWrapper[AddressMapDeleteResponse]
225225
), # Union types cannot be passed in as arguments in the type system
226226
),
227227
)
@@ -461,7 +461,7 @@ async def delete(
461461
extra_query: Query | None = None,
462462
extra_body: Body | None = None,
463463
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
464-
) -> Optional[UnnamedSchemaRef167]:
464+
) -> Optional[AddressMapDeleteResponse]:
465465
"""Delete a particular address map owned by the account.
466466
467467
An Address Map must be
@@ -485,7 +485,7 @@ async def delete(
485485
if not address_map_id:
486486
raise ValueError(f"Expected a non-empty value for `address_map_id` but received {address_map_id!r}")
487487
return cast(
488-
Optional[UnnamedSchemaRef167],
488+
Optional[AddressMapDeleteResponse],
489489
await self._delete(
490490
f"/accounts/{account_id}/addressing/address_maps/{address_map_id}",
491491
body=await async_maybe_transform(body, address_map_delete_params.AddressMapDeleteParams),
@@ -497,7 +497,7 @@ async def delete(
497497
post_parser=ResultWrapper._unwrapper,
498498
),
499499
cast_to=cast(
500-
Any, ResultWrapper[UnnamedSchemaRef167]
500+
Any, ResultWrapper[AddressMapDeleteResponse]
501501
), # Union types cannot be passed in as arguments in the type system
502502
),
503503
)

src/cloudflare/resources/addressing/address_maps/ips.py

+13-14
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
from ...._base_client import (
2424
make_request_options,
2525
)
26-
from ....types.shared import UnnamedSchemaRef167
27-
from ....types.addressing.address_maps import ip_delete_params, ip_update_params
26+
from ....types.addressing.address_maps import IPDeleteResponse, IPUpdateResponse, ip_delete_params, ip_update_params
2827

2928
__all__ = ["IPs", "AsyncIPs"]
3029

@@ -51,7 +50,7 @@ def update(
5150
extra_query: Query | None = None,
5251
extra_body: Body | None = None,
5352
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
54-
) -> Optional[UnnamedSchemaRef167]:
53+
) -> Optional[IPUpdateResponse]:
5554
"""
5655
Add an IP from a prefix owned by the account to a particular address map.
5756
@@ -77,7 +76,7 @@ def update(
7776
if not ip_address:
7877
raise ValueError(f"Expected a non-empty value for `ip_address` but received {ip_address!r}")
7978
return cast(
80-
Optional[UnnamedSchemaRef167],
79+
Optional[IPUpdateResponse],
8180
self._put(
8281
f"/accounts/{account_id}/addressing/address_maps/{address_map_id}/ips/{ip_address}",
8382
body=maybe_transform(body, ip_update_params.IPUpdateParams),
@@ -89,7 +88,7 @@ def update(
8988
post_parser=ResultWrapper._unwrapper,
9089
),
9190
cast_to=cast(
92-
Any, ResultWrapper[UnnamedSchemaRef167]
91+
Any, ResultWrapper[IPUpdateResponse]
9392
), # Union types cannot be passed in as arguments in the type system
9493
),
9594
)
@@ -107,7 +106,7 @@ def delete(
107106
extra_query: Query | None = None,
108107
extra_body: Body | None = None,
109108
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
110-
) -> Optional[UnnamedSchemaRef167]:
109+
) -> Optional[IPDeleteResponse]:
111110
"""
112111
Remove an IP from a particular address map.
113112
@@ -133,7 +132,7 @@ def delete(
133132
if not ip_address:
134133
raise ValueError(f"Expected a non-empty value for `ip_address` but received {ip_address!r}")
135134
return cast(
136-
Optional[UnnamedSchemaRef167],
135+
Optional[IPDeleteResponse],
137136
self._delete(
138137
f"/accounts/{account_id}/addressing/address_maps/{address_map_id}/ips/{ip_address}",
139138
body=maybe_transform(body, ip_delete_params.IPDeleteParams),
@@ -145,7 +144,7 @@ def delete(
145144
post_parser=ResultWrapper._unwrapper,
146145
),
147146
cast_to=cast(
148-
Any, ResultWrapper[UnnamedSchemaRef167]
147+
Any, ResultWrapper[IPDeleteResponse]
149148
), # Union types cannot be passed in as arguments in the type system
150149
),
151150
)
@@ -173,7 +172,7 @@ async def update(
173172
extra_query: Query | None = None,
174173
extra_body: Body | None = None,
175174
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
176-
) -> Optional[UnnamedSchemaRef167]:
175+
) -> Optional[IPUpdateResponse]:
177176
"""
178177
Add an IP from a prefix owned by the account to a particular address map.
179178
@@ -199,7 +198,7 @@ async def update(
199198
if not ip_address:
200199
raise ValueError(f"Expected a non-empty value for `ip_address` but received {ip_address!r}")
201200
return cast(
202-
Optional[UnnamedSchemaRef167],
201+
Optional[IPUpdateResponse],
203202
await self._put(
204203
f"/accounts/{account_id}/addressing/address_maps/{address_map_id}/ips/{ip_address}",
205204
body=await async_maybe_transform(body, ip_update_params.IPUpdateParams),
@@ -211,7 +210,7 @@ async def update(
211210
post_parser=ResultWrapper._unwrapper,
212211
),
213212
cast_to=cast(
214-
Any, ResultWrapper[UnnamedSchemaRef167]
213+
Any, ResultWrapper[IPUpdateResponse]
215214
), # Union types cannot be passed in as arguments in the type system
216215
),
217216
)
@@ -229,7 +228,7 @@ async def delete(
229228
extra_query: Query | None = None,
230229
extra_body: Body | None = None,
231230
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
232-
) -> Optional[UnnamedSchemaRef167]:
231+
) -> Optional[IPDeleteResponse]:
233232
"""
234233
Remove an IP from a particular address map.
235234
@@ -255,7 +254,7 @@ async def delete(
255254
if not ip_address:
256255
raise ValueError(f"Expected a non-empty value for `ip_address` but received {ip_address!r}")
257256
return cast(
258-
Optional[UnnamedSchemaRef167],
257+
Optional[IPDeleteResponse],
259258
await self._delete(
260259
f"/accounts/{account_id}/addressing/address_maps/{address_map_id}/ips/{ip_address}",
261260
body=await async_maybe_transform(body, ip_delete_params.IPDeleteParams),
@@ -267,7 +266,7 @@ async def delete(
267266
post_parser=ResultWrapper._unwrapper,
268267
),
269268
cast_to=cast(
270-
Any, ResultWrapper[UnnamedSchemaRef167]
269+
Any, ResultWrapper[IPDeleteResponse]
271270
), # Union types cannot be passed in as arguments in the type system
272271
),
273272
)

0 commit comments

Comments
 (0)