Skip to content

Commit 9e133f3

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat: update via SDK Studio (#90)
1 parent ea506d7 commit 9e133f3

File tree

1,267 files changed

+11441
-56672
lines changed

Some content is hidden

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

1,267 files changed

+11441
-56672
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ client = Cloudflare(
3030
api_email=os.environ.get("CLOUDFLARE_EMAIL"),
3131
)
3232

33-
zone_create_response = client.zones.create(
33+
zones_zone = client.zones.create(
3434
account={"id": "023e105f4ecef8ad9ca31a8372d0c353"},
3535
name="example.com",
3636
type="full",
3737
)
38-
print(zone_create_response.id)
38+
print(zones_zone.id)
3939
```
4040

4141
While you can provide a `api_email` keyword argument,
@@ -59,12 +59,12 @@ client = AsyncCloudflare(
5959

6060

6161
async def main() -> None:
62-
zone_create_response = await client.zones.create(
62+
zones_zone = await client.zones.create(
6363
account={"id": "023e105f4ecef8ad9ca31a8372d0c353"},
6464
name="example.com",
6565
type="full",
6666
)
67-
print(zone_create_response.id)
67+
print(zones_zone.id)
6868

6969

7070
asyncio.run(main())

api.md

+790-1,199
Large diffs are not rendered by default.

src/cloudflare/resources/accounts/members.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
)
2929
from ...types.accounts import (
3030
AccountMember,
31-
MemberListResponse,
3231
AccountMemberWithID,
3332
MemberDeleteResponse,
33+
IamComponentsSchemasMember,
3434
member_list_params,
3535
member_create_params,
3636
member_update_params,
@@ -157,7 +157,7 @@ def list(
157157
extra_query: Query | None = None,
158158
extra_body: Body | None = None,
159159
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
160-
) -> SyncV4PagePaginationArray[MemberListResponse]:
160+
) -> SyncV4PagePaginationArray[IamComponentsSchemasMember]:
161161
"""
162162
List all members of an account.
163163
@@ -182,7 +182,7 @@ def list(
182182
"""
183183
return self._get_api_list(
184184
f"/accounts/{account_id}/members",
185-
page=SyncV4PagePaginationArray[MemberListResponse],
185+
page=SyncV4PagePaginationArray[IamComponentsSchemasMember],
186186
options=make_request_options(
187187
extra_headers=extra_headers,
188188
extra_query=extra_query,
@@ -199,7 +199,7 @@ def list(
199199
member_list_params.MemberListParams,
200200
),
201201
),
202-
model=MemberListResponse,
202+
model=IamComponentsSchemasMember,
203203
)
204204

205205
def delete(
@@ -401,7 +401,7 @@ def list(
401401
extra_query: Query | None = None,
402402
extra_body: Body | None = None,
403403
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
404-
) -> AsyncPaginator[MemberListResponse, AsyncV4PagePaginationArray[MemberListResponse]]:
404+
) -> AsyncPaginator[IamComponentsSchemasMember, AsyncV4PagePaginationArray[IamComponentsSchemasMember]]:
405405
"""
406406
List all members of an account.
407407
@@ -426,7 +426,7 @@ def list(
426426
"""
427427
return self._get_api_list(
428428
f"/accounts/{account_id}/members",
429-
page=AsyncV4PagePaginationArray[MemberListResponse],
429+
page=AsyncV4PagePaginationArray[IamComponentsSchemasMember],
430430
options=make_request_options(
431431
extra_headers=extra_headers,
432432
extra_query=extra_query,
@@ -443,7 +443,7 @@ def list(
443443
member_list_params.MemberListParams,
444444
),
445445
),
446-
model=MemberListResponse,
446+
model=IamComponentsSchemasMember,
447447
)
448448

449449
async def delete(

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
make_request_options,
4949
)
5050
from ....types.addressing import (
51+
AddressingAddressMaps,
5152
AddressMapGetResponse,
52-
AddressMapEditResponse,
5353
AddressMapListResponse,
5454
AddressMapCreateResponse,
5555
AddressMapDeleteResponse,
@@ -239,7 +239,7 @@ def edit(
239239
extra_query: Query | None = None,
240240
extra_body: Body | None = None,
241241
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
242-
) -> AddressMapEditResponse:
242+
) -> AddressingAddressMaps:
243243
"""
244244
Modify properties of an address map owned by the account.
245245
@@ -289,7 +289,7 @@ def edit(
289289
timeout=timeout,
290290
post_parser=ResultWrapper._unwrapper,
291291
),
292-
cast_to=cast(Type[AddressMapEditResponse], ResultWrapper[AddressMapEditResponse]),
292+
cast_to=cast(Type[AddressingAddressMaps], ResultWrapper[AddressingAddressMaps]),
293293
)
294294

295295
def get(
@@ -516,7 +516,7 @@ async def edit(
516516
extra_query: Query | None = None,
517517
extra_body: Body | None = None,
518518
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
519-
) -> AddressMapEditResponse:
519+
) -> AddressingAddressMaps:
520520
"""
521521
Modify properties of an address map owned by the account.
522522
@@ -566,7 +566,7 @@ async def edit(
566566
timeout=timeout,
567567
post_parser=ResultWrapper._unwrapper,
568568
),
569-
cast_to=cast(Type[AddressMapEditResponse], ResultWrapper[AddressMapEditResponse]),
569+
cast_to=cast(Type[AddressingAddressMaps], ResultWrapper[AddressingAddressMaps]),
570570
)
571571

572572
async def get(

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

+9-10
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,9 @@
2424
make_request_options,
2525
)
2626
from .....types.addressing.prefixes.bgp import (
27-
BindingGetResponse,
2827
BindingListResponse,
29-
BindingCreateResponse,
3028
BindingDeleteResponse,
29+
AddressingServiceBinding,
3130
binding_create_params,
3231
)
3332

@@ -56,7 +55,7 @@ def create(
5655
extra_query: Query | None = None,
5756
extra_body: Body | None = None,
5857
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
59-
) -> BindingCreateResponse:
58+
) -> AddressingServiceBinding:
6059
"""
6160
Creates a new Service Binding, routing traffic to IPs within the given CIDR to a
6261
service running on Cloudflare's network. **Note:** This API may only be used on
@@ -100,7 +99,7 @@ def create(
10099
timeout=timeout,
101100
post_parser=ResultWrapper._unwrapper,
102101
),
103-
cast_to=cast(Type[BindingCreateResponse], ResultWrapper[BindingCreateResponse]),
102+
cast_to=cast(Type[AddressingServiceBinding], ResultWrapper[AddressingServiceBinding]),
104103
)
105104

106105
def list(
@@ -219,7 +218,7 @@ def get(
219218
extra_query: Query | None = None,
220219
extra_body: Body | None = None,
221220
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
222-
) -> BindingGetResponse:
221+
) -> AddressingServiceBinding:
223222
"""
224223
Fetch a single Service Binding
225224
@@ -253,7 +252,7 @@ def get(
253252
timeout=timeout,
254253
post_parser=ResultWrapper._unwrapper,
255254
),
256-
cast_to=cast(Type[BindingGetResponse], ResultWrapper[BindingGetResponse]),
255+
cast_to=cast(Type[AddressingServiceBinding], ResultWrapper[AddressingServiceBinding]),
257256
)
258257

259258

@@ -279,7 +278,7 @@ async def create(
279278
extra_query: Query | None = None,
280279
extra_body: Body | None = None,
281280
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
282-
) -> BindingCreateResponse:
281+
) -> AddressingServiceBinding:
283282
"""
284283
Creates a new Service Binding, routing traffic to IPs within the given CIDR to a
285284
service running on Cloudflare's network. **Note:** This API may only be used on
@@ -323,7 +322,7 @@ async def create(
323322
timeout=timeout,
324323
post_parser=ResultWrapper._unwrapper,
325324
),
326-
cast_to=cast(Type[BindingCreateResponse], ResultWrapper[BindingCreateResponse]),
325+
cast_to=cast(Type[AddressingServiceBinding], ResultWrapper[AddressingServiceBinding]),
327326
)
328327

329328
async def list(
@@ -442,7 +441,7 @@ async def get(
442441
extra_query: Query | None = None,
443442
extra_body: Body | None = None,
444443
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
445-
) -> BindingGetResponse:
444+
) -> AddressingServiceBinding:
446445
"""
447446
Fetch a single Service Binding
448447
@@ -476,7 +475,7 @@ async def get(
476475
timeout=timeout,
477476
post_parser=ResultWrapper._unwrapper,
478477
),
479-
cast_to=cast(Type[BindingGetResponse], ResultWrapper[BindingGetResponse]),
478+
cast_to=cast(Type[AddressingServiceBinding], ResultWrapper[AddressingServiceBinding]),
480479
)
481480

482481

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

+9-14
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,7 @@
2323
from ....._base_client import (
2424
make_request_options,
2525
)
26-
from .....types.addressing.prefixes.bgp import (
27-
PrefixGetResponse,
28-
PrefixEditResponse,
29-
PrefixListResponse,
30-
prefix_edit_params,
31-
)
26+
from .....types.addressing.prefixes.bgp import PrefixListResponse, AddressingIpamBGPPrefixes, prefix_edit_params
3227

3328
__all__ = ["Prefixes", "AsyncPrefixes"]
3429

@@ -103,7 +98,7 @@ def edit(
10398
extra_query: Query | None = None,
10499
extra_body: Body | None = None,
105100
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
106-
) -> PrefixEditResponse:
101+
) -> AddressingIpamBGPPrefixes:
107102
"""
108103
Update the properties of a BGP Prefix, such as the on demand advertisement
109104
status (advertised or withdrawn).
@@ -139,7 +134,7 @@ def edit(
139134
timeout=timeout,
140135
post_parser=ResultWrapper._unwrapper,
141136
),
142-
cast_to=cast(Type[PrefixEditResponse], ResultWrapper[PrefixEditResponse]),
137+
cast_to=cast(Type[AddressingIpamBGPPrefixes], ResultWrapper[AddressingIpamBGPPrefixes]),
143138
)
144139

145140
def get(
@@ -154,7 +149,7 @@ def get(
154149
extra_query: Query | None = None,
155150
extra_body: Body | None = None,
156151
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
157-
) -> PrefixGetResponse:
152+
) -> AddressingIpamBGPPrefixes:
158153
"""
159154
Retrieve a single BGP Prefix according to its identifier
160155
@@ -188,7 +183,7 @@ def get(
188183
timeout=timeout,
189184
post_parser=ResultWrapper._unwrapper,
190185
),
191-
cast_to=cast(Type[PrefixGetResponse], ResultWrapper[PrefixGetResponse]),
186+
cast_to=cast(Type[AddressingIpamBGPPrefixes], ResultWrapper[AddressingIpamBGPPrefixes]),
192187
)
193188

194189

@@ -262,7 +257,7 @@ async def edit(
262257
extra_query: Query | None = None,
263258
extra_body: Body | None = None,
264259
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
265-
) -> PrefixEditResponse:
260+
) -> AddressingIpamBGPPrefixes:
266261
"""
267262
Update the properties of a BGP Prefix, such as the on demand advertisement
268263
status (advertised or withdrawn).
@@ -298,7 +293,7 @@ async def edit(
298293
timeout=timeout,
299294
post_parser=ResultWrapper._unwrapper,
300295
),
301-
cast_to=cast(Type[PrefixEditResponse], ResultWrapper[PrefixEditResponse]),
296+
cast_to=cast(Type[AddressingIpamBGPPrefixes], ResultWrapper[AddressingIpamBGPPrefixes]),
302297
)
303298

304299
async def get(
@@ -313,7 +308,7 @@ async def get(
313308
extra_query: Query | None = None,
314309
extra_body: Body | None = None,
315310
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
316-
) -> PrefixGetResponse:
311+
) -> AddressingIpamBGPPrefixes:
317312
"""
318313
Retrieve a single BGP Prefix according to its identifier
319314
@@ -347,7 +342,7 @@ async def get(
347342
timeout=timeout,
348343
post_parser=ResultWrapper._unwrapper,
349344
),
350-
cast_to=cast(Type[PrefixGetResponse], ResultWrapper[PrefixGetResponse]),
345+
cast_to=cast(Type[AddressingIpamBGPPrefixes], ResultWrapper[AddressingIpamBGPPrefixes]),
351346
)
352347

353348

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
)
2626
from ....types.addressing.prefixes import (
2727
DelegationListResponse,
28-
DelegationCreateResponse,
2928
DelegationDeleteResponse,
29+
AddressingIpamDelegations,
3030
delegation_create_params,
3131
)
3232

@@ -55,7 +55,7 @@ def create(
5555
extra_query: Query | None = None,
5656
extra_body: Body | None = None,
5757
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
58-
) -> DelegationCreateResponse:
58+
) -> AddressingIpamDelegations:
5959
"""
6060
Create a new account delegation for a given IP prefix.
6161
@@ -96,7 +96,7 @@ def create(
9696
timeout=timeout,
9797
post_parser=ResultWrapper._unwrapper,
9898
),
99-
cast_to=cast(Type[DelegationCreateResponse], ResultWrapper[DelegationCreateResponse]),
99+
cast_to=cast(Type[AddressingIpamDelegations], ResultWrapper[AddressingIpamDelegations]),
100100
)
101101

102102
def list(
@@ -215,7 +215,7 @@ async def create(
215215
extra_query: Query | None = None,
216216
extra_body: Body | None = None,
217217
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
218-
) -> DelegationCreateResponse:
218+
) -> AddressingIpamDelegations:
219219
"""
220220
Create a new account delegation for a given IP prefix.
221221
@@ -256,7 +256,7 @@ async def create(
256256
timeout=timeout,
257257
post_parser=ResultWrapper._unwrapper,
258258
),
259-
cast_to=cast(Type[DelegationCreateResponse], ResultWrapper[DelegationCreateResponse]),
259+
cast_to=cast(Type[AddressingIpamDelegations], ResultWrapper[AddressingIpamDelegations]),
260260
)
261261

262262
async def list(

0 commit comments

Comments
 (0)