Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#334)
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 ebc5b11 commit 4783b91
Show file tree
Hide file tree
Showing 18 changed files with 207 additions and 91 deletions.
23 changes: 14 additions & 9 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ from cloudflare.types import (
AuditLog,
CloudflareTunnel,
ErrorData,
IamMember,
Identifier,
LoadBalancerPreview,
PaginationInfo,
Expand All @@ -13,7 +14,6 @@ from cloudflare.types import (
ResponseInfo,
Result,
Role,
User,
)
```

Expand Down Expand Up @@ -47,10 +47,10 @@ from cloudflare.types.accounts import UserWithInviteCode, MemberListResponse, Me
Methods:

- <code title="post /accounts/{account_id}/members">client.accounts.members.<a href="./src/cloudflare/resources/accounts/members.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/accounts/member_create_params.py">params</a>) -> <a href="./src/cloudflare/types/accounts/user_with_invite_code.py">UserWithInviteCode</a></code>
- <code title="put /accounts/{account_id}/members/{member_id}">client.accounts.members.<a href="./src/cloudflare/resources/accounts/members.py">update</a>(member_id, \*, account_id, \*\*<a href="src/cloudflare/types/accounts/member_update_params.py">params</a>) -> <a href="./src/cloudflare/types/shared/user.py">User</a></code>
- <code title="put /accounts/{account_id}/members/{member_id}">client.accounts.members.<a href="./src/cloudflare/resources/accounts/members.py">update</a>(member_id, \*, account_id, \*\*<a href="src/cloudflare/types/accounts/member_update_params.py">params</a>) -> <a href="./src/cloudflare/types/shared/iam_member.py">IamMember</a></code>
- <code title="get /accounts/{account_id}/members">client.accounts.members.<a href="./src/cloudflare/resources/accounts/members.py">list</a>(\*, account_id, \*\*<a href="src/cloudflare/types/accounts/member_list_params.py">params</a>) -> <a href="./src/cloudflare/types/accounts/member_list_response.py">SyncV4PagePaginationArray[MemberListResponse]</a></code>
- <code title="delete /accounts/{account_id}/members/{member_id}">client.accounts.members.<a href="./src/cloudflare/resources/accounts/members.py">delete</a>(member_id, \*, account_id, \*\*<a href="src/cloudflare/types/accounts/member_delete_params.py">params</a>) -> <a href="./src/cloudflare/types/accounts/member_delete_response.py">Optional</a></code>
- <code title="get /accounts/{account_id}/members/{member_id}">client.accounts.members.<a href="./src/cloudflare/resources/accounts/members.py">get</a>(member_id, \*, account_id) -> <a href="./src/cloudflare/types/shared/user.py">User</a></code>
- <code title="get /accounts/{account_id}/members/{member_id}">client.accounts.members.<a href="./src/cloudflare/resources/accounts/members.py">get</a>(member_id, \*, account_id) -> <a href="./src/cloudflare/types/shared/iam_member.py">IamMember</a></code>

## Roles

Expand Down Expand Up @@ -3448,14 +3448,14 @@ Methods:
Types:

```python
from cloudflare.types.images.v1 import Key
from cloudflare.types.images.v1 import Key, KeyUpdateResponse, KeyListResponse, KeyDeleteResponse
```

Methods:

- <code title="put /accounts/{account_id}/images/v1/keys/{signing_key_name}">client.images.v1.keys.<a href="./src/cloudflare/resources/images/v1/keys.py">update</a>(signing_key_name, \*, account_id) -> <a href="./src/cloudflare/types/images/v1/key.py">Key</a></code>
- <code title="get /accounts/{account_id}/images/v1/keys">client.images.v1.keys.<a href="./src/cloudflare/resources/images/v1/keys.py">list</a>(\*, account_id) -> <a href="./src/cloudflare/types/images/v1/key.py">Key</a></code>
- <code title="delete /accounts/{account_id}/images/v1/keys/{signing_key_name}">client.images.v1.keys.<a href="./src/cloudflare/resources/images/v1/keys.py">delete</a>(signing_key_name, \*, account_id) -> <a href="./src/cloudflare/types/images/v1/key.py">Key</a></code>
- <code title="put /accounts/{account_id}/images/v1/keys/{signing_key_name}">client.images.v1.keys.<a href="./src/cloudflare/resources/images/v1/keys.py">update</a>(signing_key_name, \*, account_id) -> <a href="./src/cloudflare/types/images/v1/key_update_response.py">KeyUpdateResponse</a></code>
- <code title="get /accounts/{account_id}/images/v1/keys">client.images.v1.keys.<a href="./src/cloudflare/resources/images/v1/keys.py">list</a>(\*, account_id) -> <a href="./src/cloudflare/types/images/v1/key_list_response.py">KeyListResponse</a></code>
- <code title="delete /accounts/{account_id}/images/v1/keys/{signing_key_name}">client.images.v1.keys.<a href="./src/cloudflare/resources/images/v1/keys.py">delete</a>(signing_key_name, \*, account_id) -> <a href="./src/cloudflare/types/images/v1/key_delete_response.py">KeyDeleteResponse</a></code>

### Stats

Expand Down Expand Up @@ -5368,7 +5368,12 @@ Methods:
Types:

```python
from cloudflare.types.zero_trust import DeviceExperienceMonitor, NetworkPath, Percentiles
from cloudflare.types.zero_trust import (
DeviceExperienceMonitor,
NetworkPath,
NetworkPathResponse,
Percentiles,
)
```

### Colos
Expand Down Expand Up @@ -5481,7 +5486,7 @@ from cloudflare.types.zero_trust.dex import Traceroute, TracerouteTestPercentile
Methods:

- <code title="get /accounts/{account_id}/dex/traceroute-tests/{test_id}">client.zero_trust.dex.traceroute_tests.<a href="./src/cloudflare/resources/zero_trust/dex/traceroute_tests.py">get</a>(test_id, \*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dex/traceroute_test_get_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dex/traceroute.py">Optional</a></code>
- <code title="get /accounts/{account_id}/dex/traceroute-tests/{test_id}/network-path">client.zero_trust.dex.traceroute_tests.<a href="./src/cloudflare/resources/zero_trust/dex/traceroute_tests.py">network_path</a>(test_id, \*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dex/traceroute_test_network_path_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/network_path.py">Optional</a></code>
- <code title="get /accounts/{account_id}/dex/traceroute-tests/{test_id}/network-path">client.zero_trust.dex.traceroute_tests.<a href="./src/cloudflare/resources/zero_trust/dex/traceroute_tests.py">network_path</a>(test_id, \*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dex/traceroute_test_network_path_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/network_path_response.py">Optional</a></code>
- <code title="get /accounts/{account_id}/dex/traceroute-tests/{test_id}/percentiles">client.zero_trust.dex.traceroute_tests.<a href="./src/cloudflare/resources/zero_trust/dex/traceroute_tests.py">percentiles</a>(test_id, \*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dex/traceroute_test_percentiles_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dex/traceroute_test_percentiles_response.py">Optional</a></code>

## Tunnels
Expand Down
18 changes: 9 additions & 9 deletions src/cloudflare/resources/accounts/members.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
AsyncPaginator,
make_request_options,
)
from ...types.shared import User
from ...types.shared import IamMember
from ...types.accounts import (
MemberListResponse,
UserWithInviteCode,
Expand Down Expand Up @@ -111,7 +111,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> User:
) -> IamMember:
"""
Modify an account member.
Expand Down Expand Up @@ -140,7 +140,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[User], ResultWrapper[User]),
cast_to=cast(Type[IamMember], ResultWrapper[IamMember]),
)

def list(
Expand Down Expand Up @@ -256,7 +256,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> User:
) -> IamMember:
"""
Get information about a specific member of an account.
Expand All @@ -282,7 +282,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[User], ResultWrapper[User]),
cast_to=cast(Type[IamMember], ResultWrapper[IamMember]),
)


Expand Down Expand Up @@ -357,7 +357,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> User:
) -> IamMember:
"""
Modify an account member.
Expand Down Expand Up @@ -386,7 +386,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[User], ResultWrapper[User]),
cast_to=cast(Type[IamMember], ResultWrapper[IamMember]),
)

def list(
Expand Down Expand Up @@ -502,7 +502,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> User:
) -> IamMember:
"""
Get information about a specific member of an account.
Expand All @@ -528,7 +528,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[User], ResultWrapper[User]),
cast_to=cast(Type[IamMember], ResultWrapper[IamMember]),
)


Expand Down
26 changes: 13 additions & 13 deletions src/cloudflare/resources/images/v1/keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from ...._base_client import (
make_request_options,
)
from ....types.images.v1 import Key
from ....types.images.v1 import KeyListResponse, KeyDeleteResponse, KeyUpdateResponse

__all__ = ["Keys", "AsyncKeys"]

Expand All @@ -44,7 +44,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Key:
) -> KeyUpdateResponse:
"""Create a new signing key with specified name.
Returns all keys available.
Expand Down Expand Up @@ -73,7 +73,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Key], ResultWrapper[Key]),
cast_to=cast(Type[KeyUpdateResponse], ResultWrapper[KeyUpdateResponse]),
)

def list(
Expand All @@ -86,7 +86,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Key:
) -> KeyListResponse:
"""Lists your signing keys.
These can be found on your Cloudflare Images dashboard.
Expand All @@ -113,7 +113,7 @@ def list(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Key], ResultWrapper[Key]),
cast_to=cast(Type[KeyListResponse], ResultWrapper[KeyListResponse]),
)

def delete(
Expand All @@ -127,7 +127,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Key:
) -> KeyDeleteResponse:
"""Delete signing key with specified name.
Returns all keys available. When last
Expand Down Expand Up @@ -157,7 +157,7 @@ def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Key], ResultWrapper[Key]),
cast_to=cast(Type[KeyDeleteResponse], ResultWrapper[KeyDeleteResponse]),
)


Expand All @@ -181,7 +181,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Key:
) -> KeyUpdateResponse:
"""Create a new signing key with specified name.
Returns all keys available.
Expand Down Expand Up @@ -210,7 +210,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Key], ResultWrapper[Key]),
cast_to=cast(Type[KeyUpdateResponse], ResultWrapper[KeyUpdateResponse]),
)

async def list(
Expand All @@ -223,7 +223,7 @@ async def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Key:
) -> KeyListResponse:
"""Lists your signing keys.
These can be found on your Cloudflare Images dashboard.
Expand All @@ -250,7 +250,7 @@ async def list(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Key], ResultWrapper[Key]),
cast_to=cast(Type[KeyListResponse], ResultWrapper[KeyListResponse]),
)

async def delete(
Expand All @@ -264,7 +264,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Key:
) -> KeyDeleteResponse:
"""Delete signing key with specified name.
Returns all keys available. When last
Expand Down Expand Up @@ -294,7 +294,7 @@ async def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Key], ResultWrapper[Key]),
cast_to=cast(Type[KeyDeleteResponse], ResultWrapper[KeyDeleteResponse]),
)


Expand Down
10 changes: 5 additions & 5 deletions src/cloudflare/resources/zero_trust/dex/traceroute_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from ...._base_client import (
make_request_options,
)
from ....types.zero_trust import NetworkPath
from ....types.zero_trust import NetworkPathResponse
from ....types.zero_trust.dex import (
Traceroute,
TracerouteTestPercentilesResponse,
Expand Down Expand Up @@ -130,7 +130,7 @@ def network_path(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[NetworkPath]:
) -> Optional[NetworkPathResponse]:
"""
Get a breakdown of metrics by hop for individual traceroute test runs
Expand Down Expand Up @@ -175,7 +175,7 @@ def network_path(
),
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Optional[NetworkPath]], ResultWrapper[NetworkPath]),
cast_to=cast(Type[Optional[NetworkPathResponse]], ResultWrapper[NetworkPathResponse]),
)

def percentiles(
Expand Down Expand Up @@ -341,7 +341,7 @@ async def network_path(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[NetworkPath]:
) -> Optional[NetworkPathResponse]:
"""
Get a breakdown of metrics by hop for individual traceroute test runs
Expand Down Expand Up @@ -386,7 +386,7 @@ async def network_path(
),
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Optional[NetworkPath]], ResultWrapper[NetworkPath]),
cast_to=cast(Type[Optional[NetworkPathResponse]], ResultWrapper[NetworkPathResponse]),
)

async def percentiles(
Expand Down
2 changes: 1 addition & 1 deletion src/cloudflare/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

from .shared import (
Role as Role,
User as User,
Result as Result,
AuditLog as AuditLog,
ErrorData as ErrorData,
IamMember as IamMember,
Identifier as Identifier,
Permission as Permission,
ResponseInfo as ResponseInfo,
Expand Down
3 changes: 3 additions & 0 deletions src/cloudflare/types/images/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
from .key import Key as Key
from .stat import Stat as Stat
from .variant import Variant as Variant
from .key_list_response import KeyListResponse as KeyListResponse
from .key_delete_response import KeyDeleteResponse as KeyDeleteResponse
from .key_update_response import KeyUpdateResponse as KeyUpdateResponse
from .variant_edit_params import VariantEditParams as VariantEditParams
from .variant_get_response import VariantGetResponse as VariantGetResponse
from .variant_create_params import VariantCreateParams as VariantCreateParams
Expand Down
8 changes: 6 additions & 2 deletions src/cloudflare/types/images/v1/key.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Optional
from typing import Optional

from ...._models import BaseModel

__all__ = ["Key"]


class Key(BaseModel):
keys: Optional[List[Key]] = None
name: Optional[str] = None
"""Key name."""

value: Optional[str] = None
"""Key value."""
12 changes: 12 additions & 0 deletions src/cloudflare/types/images/v1/key_delete_response.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Optional

from .key import Key
from ...._models import BaseModel

__all__ = ["KeyDeleteResponse"]


class KeyDeleteResponse(BaseModel):
keys: Optional[List[Key]] = None
12 changes: 12 additions & 0 deletions src/cloudflare/types/images/v1/key_list_response.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Optional

from .key import Key
from ...._models import BaseModel

__all__ = ["KeyListResponse"]


class KeyListResponse(BaseModel):
keys: Optional[List[Key]] = None
12 changes: 12 additions & 0 deletions src/cloudflare/types/images/v1/key_update_response.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Optional

from .key import Key
from ...._models import BaseModel

__all__ = ["KeyUpdateResponse"]


class KeyUpdateResponse(BaseModel):
keys: Optional[List[Key]] = None
Loading

0 comments on commit 4783b91

Please sign in to comment.