Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Apr 4, 2024
1 parent 25fb646 commit 256e88f
Show file tree
Hide file tree
Showing 848 changed files with 5,478 additions and 8,704 deletions.
1,137 changes: 477 additions & 660 deletions api.md

Large diffs are not rendered by default.

32 changes: 14 additions & 18 deletions src/cloudflare/resources/accounts/accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,7 @@
RolesWithStreamingResponse,
AsyncRolesWithStreamingResponse,
)
from ...types import (
AccountGetResponse,
AccountUpdateResponse,
account_list_params,
account_update_params,
)
from ...types import account_list_params, account_update_params
from .members import (
Members,
AsyncMembers,
Expand Down Expand Up @@ -48,6 +43,7 @@
AsyncPaginator,
make_request_options,
)
from ...types.shared import UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a

__all__ = ["Accounts", "AsyncAccounts"]

Expand Down Expand Up @@ -81,7 +77,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AccountUpdateResponse:
) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a:
"""
Update an existing account.
Expand All @@ -99,7 +95,7 @@ def update(
timeout: Override the client-level default timeout for this request, in seconds
"""
return cast(
AccountUpdateResponse,
UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a,
self._put(
f"/accounts/{account_id}",
body=maybe_transform(
Expand All @@ -117,7 +113,7 @@ def update(
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(
Any, ResultWrapper[AccountUpdateResponse]
Any, ResultWrapper[UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a]
), # Union types cannot be passed in as arguments in the type system
),
)
Expand Down Expand Up @@ -187,7 +183,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AccountGetResponse:
) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a:
"""
Get information about a specific account that you are a member of.
Expand All @@ -201,7 +197,7 @@ def get(
timeout: Override the client-level default timeout for this request, in seconds
"""
return cast(
AccountGetResponse,
UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a,
self._get(
f"/accounts/{account_id}",
options=make_request_options(
Expand All @@ -212,7 +208,7 @@ def get(
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(
Any, ResultWrapper[AccountGetResponse]
Any, ResultWrapper[UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a]
), # Union types cannot be passed in as arguments in the type system
),
)
Expand Down Expand Up @@ -247,7 +243,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AccountUpdateResponse:
) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a:
"""
Update an existing account.
Expand All @@ -265,7 +261,7 @@ async def update(
timeout: Override the client-level default timeout for this request, in seconds
"""
return cast(
AccountUpdateResponse,
UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a,
await self._put(
f"/accounts/{account_id}",
body=await async_maybe_transform(
Expand All @@ -283,7 +279,7 @@ async def update(
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(
Any, ResultWrapper[AccountUpdateResponse]
Any, ResultWrapper[UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a]
), # Union types cannot be passed in as arguments in the type system
),
)
Expand Down Expand Up @@ -353,7 +349,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AccountGetResponse:
) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a:
"""
Get information about a specific account that you are a member of.
Expand All @@ -367,7 +363,7 @@ async def get(
timeout: Override the client-level default timeout for this request, in seconds
"""
return cast(
AccountGetResponse,
UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a,
await self._get(
f"/accounts/{account_id}",
options=make_request_options(
Expand All @@ -378,7 +374,7 @@ async def get(
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(
Any, ResultWrapper[AccountGetResponse]
Any, ResultWrapper[UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a]
), # Union types cannot be passed in as arguments in the type system
),
)
Expand Down
15 changes: 8 additions & 7 deletions src/cloudflare/resources/accounts/roles.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
AsyncPaginator,
make_request_options,
)
from ...types.accounts import RoleGetResponse, RoleListResponse
from ...types.shared import UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a
from ...types.accounts import RoleListResponse

__all__ = ["Roles", "AsyncRoles"]

Expand Down Expand Up @@ -78,7 +79,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> RoleGetResponse:
) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a:
"""
Get information about a specific role for an account.
Expand All @@ -92,7 +93,7 @@ def get(
timeout: Override the client-level default timeout for this request, in seconds
"""
return cast(
RoleGetResponse,
UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a,
self._get(
f"/accounts/{account_id}/roles/{role_id}",
options=make_request_options(
Expand All @@ -103,7 +104,7 @@ def get(
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(
Any, ResultWrapper[RoleGetResponse]
Any, ResultWrapper[UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a]
), # Union types cannot be passed in as arguments in the type system
),
)
Expand Down Expand Up @@ -161,7 +162,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> RoleGetResponse:
) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a:
"""
Get information about a specific role for an account.
Expand All @@ -175,7 +176,7 @@ async def get(
timeout: Override the client-level default timeout for this request, in seconds
"""
return cast(
RoleGetResponse,
UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a,
await self._get(
f"/accounts/{account_id}/roles/{role_id}",
options=make_request_options(
Expand All @@ -186,7 +187,7 @@ async def get(
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(
Any, ResultWrapper[RoleGetResponse]
Any, ResultWrapper[UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a]
), # Union types cannot be passed in as arguments in the type system
),
)
Expand Down
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 UnnamedSchemaRef67bbb1ccdd42c3e2937b9fd19f791151
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[UnnamedSchemaRef67bbb1ccdd42c3e2937b9fd19f791151]:
"""
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[UnnamedSchemaRef67bbb1ccdd42c3e2937b9fd19f791151],
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[UnnamedSchemaRef67bbb1ccdd42c3e2937b9fd19f791151]
), # 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[UnnamedSchemaRef67bbb1ccdd42c3e2937b9fd19f791151]:
"""
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[UnnamedSchemaRef67bbb1ccdd42c3e2937b9fd19f791151],
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[UnnamedSchemaRef67bbb1ccdd42c3e2937b9fd19f791151]
), # 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[UnnamedSchemaRef67bbb1ccdd42c3e2937b9fd19f791151]:
"""
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[UnnamedSchemaRef67bbb1ccdd42c3e2937b9fd19f791151],
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[UnnamedSchemaRef67bbb1ccdd42c3e2937b9fd19f791151]
), # 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[UnnamedSchemaRef67bbb1ccdd42c3e2937b9fd19f791151]:
"""
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[UnnamedSchemaRef67bbb1ccdd42c3e2937b9fd19f791151],
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[UnnamedSchemaRef67bbb1ccdd42c3e2937b9fd19f791151]
), # 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 UnnamedSchemaRef67bbb1ccdd42c3e2937b9fd19f791151
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[UnnamedSchemaRef67bbb1ccdd42c3e2937b9fd19f791151]:
"""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[UnnamedSchemaRef67bbb1ccdd42c3e2937b9fd19f791151],
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[UnnamedSchemaRef67bbb1ccdd42c3e2937b9fd19f791151]
), # 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[UnnamedSchemaRef67bbb1ccdd42c3e2937b9fd19f791151]:
"""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[UnnamedSchemaRef67bbb1ccdd42c3e2937b9fd19f791151],
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[UnnamedSchemaRef67bbb1ccdd42c3e2937b9fd19f791151]
), # Union types cannot be passed in as arguments in the type system
),
)
Expand Down
Loading

0 comments on commit 256e88f

Please sign in to comment.