Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ from cloudflare.types import (
Subscription,
SubscriptionComponent,
SubscriptionZone,
TokenValue,
)
```

Expand Down Expand Up @@ -117,7 +118,7 @@ Methods:

Methods:

- <code title="put /accounts/{account_id}/tokens/{token_id}/value">client.accounts.tokens.value.<a href="./src/cloudflare/resources/accounts/tokens/value.py">update</a>(token_id, \*, account_id, \*\*<a href="src/cloudflare/types/accounts/tokens/value_update_params.py">params</a>) -> <a href="./src/cloudflare/types/user/tokens/value.py">str</a></code>
- <code title="put /accounts/{account_id}/tokens/{token_id}/value">client.accounts.tokens.value.<a href="./src/cloudflare/resources/accounts/tokens/value.py">update</a>(token_id, \*, account_id, \*\*<a href="src/cloudflare/types/accounts/tokens/value_update_params.py">params</a>) -> <a href="./src/cloudflare/types/shared/token_value.py">str</a></code>

# OriginCACertificates

Expand Down Expand Up @@ -298,15 +299,9 @@ Methods:

### Value

Types:

```python
from cloudflare.types.user.tokens import Value
```

Methods:

- <code title="put /user/tokens/{token_id}/value">client.user.tokens.value.<a href="./src/cloudflare/resources/user/tokens/value.py">update</a>(token_id, \*\*<a href="src/cloudflare/types/user/tokens/value_update_params.py">params</a>) -> <a href="./src/cloudflare/types/user/tokens/value.py">str</a></code>
- <code title="put /user/tokens/{token_id}/value">client.user.tokens.value.<a href="./src/cloudflare/resources/user/tokens/value.py">update</a>(token_id, \*\*<a href="src/cloudflare/types/user/tokens/value_update_params.py">params</a>) -> <a href="./src/cloudflare/types/shared/token_value.py">str</a></code>

# Zones

Expand Down
6 changes: 3 additions & 3 deletions src/cloudflare/resources/accounts/tokens/value.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from ...._wrappers import ResultWrapper
from ...._base_client import make_request_options
from ....types.accounts.tokens import value_update_params
from ....types.user.tokens.value import Value
from ....types.shared.token_value import TokenValue

__all__ = ["ValueResource", "AsyncValueResource"]

Expand Down Expand Up @@ -88,7 +88,7 @@ def update(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[Optional[Value]]._unwrapper,
post_parser=ResultWrapper[Optional[TokenValue]]._unwrapper,
),
cast_to=cast(Type[str], ResultWrapper[str]),
)
Expand Down Expand Up @@ -155,7 +155,7 @@ async def update(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[Optional[Value]]._unwrapper,
post_parser=ResultWrapper[Optional[TokenValue]]._unwrapper,
),
cast_to=cast(Type[str], ResultWrapper[str]),
)
Expand Down
6 changes: 3 additions & 3 deletions src/cloudflare/resources/user/tokens/value.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from ...._wrappers import ResultWrapper
from ...._base_client import make_request_options
from ....types.user.tokens import value_update_params
from ....types.user.tokens.value import Value
from ....types.shared.token_value import TokenValue

__all__ = ["ValueResource", "AsyncValueResource"]

Expand Down Expand Up @@ -83,7 +83,7 @@ def update(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[Optional[Value]]._unwrapper,
post_parser=ResultWrapper[Optional[TokenValue]]._unwrapper,
),
cast_to=cast(Type[str], ResultWrapper[str]),
)
Expand Down Expand Up @@ -145,7 +145,7 @@ async def update(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[Optional[Value]]._unwrapper,
post_parser=ResultWrapper[Optional[TokenValue]]._unwrapper,
),
cast_to=cast(Type[str], ResultWrapper[str]),
)
Expand Down
1 change: 1 addition & 0 deletions src/cloudflare/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
ErrorData as ErrorData,
Identifier as Identifier,
Permission as Permission,
TokenValue as TokenValue,
ResponseInfo as ResponseInfo,
Subscription as Subscription,
CertificateCA as CertificateCA,
Expand Down
4 changes: 2 additions & 2 deletions src/cloudflare/types/accounts/token_create_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from ..._models import BaseModel
from ..user.policy import Policy
from ..user.cidr_list import CIDRList
from ..user.tokens.value import Value
from ..shared.token_value import TokenValue

__all__ = ["TokenCreateResponse", "Condition", "ConditionRequestIP"]

Expand Down Expand Up @@ -60,5 +60,5 @@ class TokenCreateResponse(BaseModel):
status: Optional[Literal["active", "disabled", "expired"]] = None
"""Status of the token."""

value: Optional[Value] = None
value: Optional[TokenValue] = None
"""The token value."""
1 change: 1 addition & 0 deletions src/cloudflare/types/shared/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from .error_data import ErrorData as ErrorData
from .identifier import Identifier as Identifier
from .permission import Permission as Permission
from .token_value import TokenValue as TokenValue
from .subscription import Subscription as Subscription
from .response_info import ResponseInfo as ResponseInfo
from .certificate_ca import CertificateCA as CertificateCA
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

from typing_extensions import TypeAlias

__all__ = ["Value"]
__all__ = ["TokenValue"]

Value: TypeAlias = str
TokenValue: TypeAlias = str
4 changes: 2 additions & 2 deletions src/cloudflare/types/user/token_create_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from .policy import Policy
from ..._models import BaseModel
from .cidr_list import CIDRList
from .tokens.value import Value
from ..shared.token_value import TokenValue

__all__ = ["TokenCreateResponse", "Condition", "ConditionRequestIP"]

Expand Down Expand Up @@ -60,5 +60,5 @@ class TokenCreateResponse(BaseModel):
status: Optional[Literal["active", "disabled", "expired"]] = None
"""Status of the token."""

value: Optional[Value] = None
value: Optional[TokenValue] = None
"""The token value."""
1 change: 0 additions & 1 deletion src/cloudflare/types/user/tokens/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

from __future__ import annotations

from .value import Value as Value
from .value_update_params import ValueUpdateParams as ValueUpdateParams