Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Apr 22, 2024
1 parent f1c1451 commit 9b10753
Show file tree
Hide file tree
Showing 556 changed files with 6,601 additions and 12,031 deletions.
486 changes: 299 additions & 187 deletions api.md

Large diffs are not rendered by default.

32 changes: 14 additions & 18 deletions src/cloudflare/resources/addressing/address_maps/accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,8 @@
from ...._base_client import (
make_request_options,
)
from ....types.addressing.address_maps import (
AccountDeleteResponse,
AccountUpdateResponse,
account_delete_params,
account_update_params,
)
from ....types.shared import UnnamedSchemaRef167
from ....types.addressing.address_maps import account_delete_params, account_update_params

__all__ = ["Accounts", "AsyncAccounts"]

Expand All @@ -54,7 +50,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[AccountUpdateResponse]:
) -> Optional[UnnamedSchemaRef167]:
"""
Add an account as a member of a particular address map.
Expand All @@ -76,7 +72,7 @@ def update(
if not address_map_id:
raise ValueError(f"Expected a non-empty value for `address_map_id` but received {address_map_id!r}")
return cast(
Optional[AccountUpdateResponse],
Optional[UnnamedSchemaRef167],
self._put(
f"/accounts/{account_id}/addressing/address_maps/{address_map_id}/accounts/{account_id}",
body=maybe_transform(body, account_update_params.AccountUpdateParams),
Expand All @@ -88,7 +84,7 @@ def update(
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(
Any, ResultWrapper[AccountUpdateResponse]
Any, ResultWrapper[UnnamedSchemaRef167]
), # Union types cannot be passed in as arguments in the type system
),
)
Expand All @@ -105,7 +101,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[AccountDeleteResponse]:
) -> Optional[UnnamedSchemaRef167]:
"""
Remove an account as a member of a particular address map.
Expand All @@ -127,7 +123,7 @@ def delete(
if not address_map_id:
raise ValueError(f"Expected a non-empty value for `address_map_id` but received {address_map_id!r}")
return cast(
Optional[AccountDeleteResponse],
Optional[UnnamedSchemaRef167],
self._delete(
f"/accounts/{account_id}/addressing/address_maps/{address_map_id}/accounts/{account_id}",
body=maybe_transform(body, account_delete_params.AccountDeleteParams),
Expand All @@ -139,7 +135,7 @@ def delete(
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(
Any, ResultWrapper[AccountDeleteResponse]
Any, ResultWrapper[UnnamedSchemaRef167]
), # Union types cannot be passed in as arguments in the type system
),
)
Expand All @@ -166,7 +162,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[AccountUpdateResponse]:
) -> Optional[UnnamedSchemaRef167]:
"""
Add an account as a member of a particular address map.
Expand All @@ -188,7 +184,7 @@ async def update(
if not address_map_id:
raise ValueError(f"Expected a non-empty value for `address_map_id` but received {address_map_id!r}")
return cast(
Optional[AccountUpdateResponse],
Optional[UnnamedSchemaRef167],
await self._put(
f"/accounts/{account_id}/addressing/address_maps/{address_map_id}/accounts/{account_id}",
body=await async_maybe_transform(body, account_update_params.AccountUpdateParams),
Expand All @@ -200,7 +196,7 @@ async def update(
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(
Any, ResultWrapper[AccountUpdateResponse]
Any, ResultWrapper[UnnamedSchemaRef167]
), # Union types cannot be passed in as arguments in the type system
),
)
Expand All @@ -217,7 +213,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[AccountDeleteResponse]:
) -> Optional[UnnamedSchemaRef167]:
"""
Remove an account as a member of a particular address map.
Expand All @@ -239,7 +235,7 @@ async def delete(
if not address_map_id:
raise ValueError(f"Expected a non-empty value for `address_map_id` but received {address_map_id!r}")
return cast(
Optional[AccountDeleteResponse],
Optional[UnnamedSchemaRef167],
await self._delete(
f"/accounts/{account_id}/addressing/address_maps/{address_map_id}/accounts/{account_id}",
body=await async_maybe_transform(body, account_delete_params.AccountDeleteParams),
Expand All @@ -251,7 +247,7 @@ async def delete(
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(
Any, ResultWrapper[AccountDeleteResponse]
Any, ResultWrapper[UnnamedSchemaRef167]
), # Union types cannot be passed in as arguments in the type system
),
)
Expand Down
14 changes: 7 additions & 7 deletions src/cloudflare/resources/addressing/address_maps/address_maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@
AsyncPaginator,
make_request_options,
)
from ....types.shared import UnnamedSchemaRef167
from ....types.addressing import (
AddressingAddressMaps,
AddressMapGetResponse,
AddressMapCreateResponse,
AddressMapDeleteResponse,
address_map_edit_params,
address_map_create_params,
address_map_delete_params,
Expand Down Expand Up @@ -185,7 +185,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[AddressMapDeleteResponse]:
) -> Optional[UnnamedSchemaRef167]:
"""Delete a particular address map owned by the account.
An Address Map must be
Expand All @@ -209,7 +209,7 @@ def delete(
if not address_map_id:
raise ValueError(f"Expected a non-empty value for `address_map_id` but received {address_map_id!r}")
return cast(
Optional[AddressMapDeleteResponse],
Optional[UnnamedSchemaRef167],
self._delete(
f"/accounts/{account_id}/addressing/address_maps/{address_map_id}",
body=maybe_transform(body, address_map_delete_params.AddressMapDeleteParams),
Expand All @@ -221,7 +221,7 @@ def delete(
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(
Any, ResultWrapper[AddressMapDeleteResponse]
Any, ResultWrapper[UnnamedSchemaRef167]
), # Union types cannot be passed in as arguments in the type system
),
)
Expand Down Expand Up @@ -461,7 +461,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[AddressMapDeleteResponse]:
) -> Optional[UnnamedSchemaRef167]:
"""Delete a particular address map owned by the account.
An Address Map must be
Expand All @@ -485,7 +485,7 @@ async def delete(
if not address_map_id:
raise ValueError(f"Expected a non-empty value for `address_map_id` but received {address_map_id!r}")
return cast(
Optional[AddressMapDeleteResponse],
Optional[UnnamedSchemaRef167],
await self._delete(
f"/accounts/{account_id}/addressing/address_maps/{address_map_id}",
body=await async_maybe_transform(body, address_map_delete_params.AddressMapDeleteParams),
Expand All @@ -497,7 +497,7 @@ async def delete(
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(
Any, ResultWrapper[AddressMapDeleteResponse]
Any, ResultWrapper[UnnamedSchemaRef167]
), # Union types cannot be passed in as arguments in the type system
),
)
Expand Down
27 changes: 14 additions & 13 deletions src/cloudflare/resources/addressing/address_maps/ips.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
from ...._base_client import (
make_request_options,
)
from ....types.addressing.address_maps import IPDeleteResponse, IPUpdateResponse, ip_delete_params, ip_update_params
from ....types.shared import UnnamedSchemaRef167
from ....types.addressing.address_maps import ip_delete_params, ip_update_params

__all__ = ["IPs", "AsyncIPs"]

Expand All @@ -50,7 +51,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[IPUpdateResponse]:
) -> Optional[UnnamedSchemaRef167]:
"""
Add an IP from a prefix owned by the account to a particular address map.
Expand All @@ -76,7 +77,7 @@ def update(
if not ip_address:
raise ValueError(f"Expected a non-empty value for `ip_address` but received {ip_address!r}")
return cast(
Optional[IPUpdateResponse],
Optional[UnnamedSchemaRef167],
self._put(
f"/accounts/{account_id}/addressing/address_maps/{address_map_id}/ips/{ip_address}",
body=maybe_transform(body, ip_update_params.IPUpdateParams),
Expand All @@ -88,7 +89,7 @@ def update(
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(
Any, ResultWrapper[IPUpdateResponse]
Any, ResultWrapper[UnnamedSchemaRef167]
), # Union types cannot be passed in as arguments in the type system
),
)
Expand All @@ -106,7 +107,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[IPDeleteResponse]:
) -> Optional[UnnamedSchemaRef167]:
"""
Remove an IP from a particular address map.
Expand All @@ -132,7 +133,7 @@ def delete(
if not ip_address:
raise ValueError(f"Expected a non-empty value for `ip_address` but received {ip_address!r}")
return cast(
Optional[IPDeleteResponse],
Optional[UnnamedSchemaRef167],
self._delete(
f"/accounts/{account_id}/addressing/address_maps/{address_map_id}/ips/{ip_address}",
body=maybe_transform(body, ip_delete_params.IPDeleteParams),
Expand All @@ -144,7 +145,7 @@ def delete(
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(
Any, ResultWrapper[IPDeleteResponse]
Any, ResultWrapper[UnnamedSchemaRef167]
), # Union types cannot be passed in as arguments in the type system
),
)
Expand Down Expand Up @@ -172,7 +173,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[IPUpdateResponse]:
) -> Optional[UnnamedSchemaRef167]:
"""
Add an IP from a prefix owned by the account to a particular address map.
Expand All @@ -198,7 +199,7 @@ async def update(
if not ip_address:
raise ValueError(f"Expected a non-empty value for `ip_address` but received {ip_address!r}")
return cast(
Optional[IPUpdateResponse],
Optional[UnnamedSchemaRef167],
await self._put(
f"/accounts/{account_id}/addressing/address_maps/{address_map_id}/ips/{ip_address}",
body=await async_maybe_transform(body, ip_update_params.IPUpdateParams),
Expand All @@ -210,7 +211,7 @@ async def update(
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(
Any, ResultWrapper[IPUpdateResponse]
Any, ResultWrapper[UnnamedSchemaRef167]
), # Union types cannot be passed in as arguments in the type system
),
)
Expand All @@ -228,7 +229,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[IPDeleteResponse]:
) -> Optional[UnnamedSchemaRef167]:
"""
Remove an IP from a particular address map.
Expand All @@ -254,7 +255,7 @@ async def delete(
if not ip_address:
raise ValueError(f"Expected a non-empty value for `ip_address` but received {ip_address!r}")
return cast(
Optional[IPDeleteResponse],
Optional[UnnamedSchemaRef167],
await self._delete(
f"/accounts/{account_id}/addressing/address_maps/{address_map_id}/ips/{ip_address}",
body=await async_maybe_transform(body, ip_delete_params.IPDeleteParams),
Expand All @@ -266,7 +267,7 @@ async def delete(
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(
Any, ResultWrapper[IPDeleteResponse]
Any, ResultWrapper[UnnamedSchemaRef167]
), # Union types cannot be passed in as arguments in the type system
),
)
Expand Down
Loading

0 comments on commit 9b10753

Please sign in to comment.