Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#240)
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 f44f877 commit dd33a93
Show file tree
Hide file tree
Showing 28 changed files with 123 additions and 191 deletions.
33 changes: 15 additions & 18 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ Types:
```python
from cloudflare.types.accounts import (
Member,
MemberRoles,
MemberWithInviteCode,
Roles,
MemberListResponse,
MemberDeleteResponse,
)
Expand Down Expand Up @@ -214,7 +214,6 @@ Types:

```python
from cloudflare.types.user.load_balancers import (
Pool,
PoolDeleteResponse,
PoolHealthResponse,
PoolPreviewResponse,
Expand All @@ -224,12 +223,12 @@ from cloudflare.types.user.load_balancers import (

Methods:

- <code title="post /user/load_balancers/pools">client.user.load_balancers.pools.<a href="./src/cloudflare/resources/user/load_balancers/pools.py">create</a>(\*\*<a href="src/cloudflare/types/user/load_balancers/pool_create_params.py">params</a>) -> <a href="./src/cloudflare/types/user/load_balancers/pool.py">Pool</a></code>
- <code title="put /user/load_balancers/pools/{pool_id}">client.user.load_balancers.pools.<a href="./src/cloudflare/resources/user/load_balancers/pools.py">update</a>(pool_id, \*\*<a href="src/cloudflare/types/user/load_balancers/pool_update_params.py">params</a>) -> <a href="./src/cloudflare/types/user/load_balancers/pool.py">Pool</a></code>
- <code title="get /user/load_balancers/pools">client.user.load_balancers.pools.<a href="./src/cloudflare/resources/user/load_balancers/pools.py">list</a>(\*\*<a href="src/cloudflare/types/user/load_balancers/pool_list_params.py">params</a>) -> <a href="./src/cloudflare/types/user/load_balancers/pool.py">SyncSinglePage[Pool]</a></code>
- <code title="post /user/load_balancers/pools">client.user.load_balancers.pools.<a href="./src/cloudflare/resources/user/load_balancers/pools.py">create</a>(\*\*<a href="src/cloudflare/types/user/load_balancers/pool_create_params.py">params</a>) -> <a href="./src/cloudflare/types/load_balancers/pool.py">Pool</a></code>
- <code title="put /user/load_balancers/pools/{pool_id}">client.user.load_balancers.pools.<a href="./src/cloudflare/resources/user/load_balancers/pools.py">update</a>(pool_id, \*\*<a href="src/cloudflare/types/user/load_balancers/pool_update_params.py">params</a>) -> <a href="./src/cloudflare/types/load_balancers/pool.py">Pool</a></code>
- <code title="get /user/load_balancers/pools">client.user.load_balancers.pools.<a href="./src/cloudflare/resources/user/load_balancers/pools.py">list</a>(\*\*<a href="src/cloudflare/types/user/load_balancers/pool_list_params.py">params</a>) -> <a href="./src/cloudflare/types/load_balancers/pool.py">SyncSinglePage[Pool]</a></code>
- <code title="delete /user/load_balancers/pools/{pool_id}">client.user.load_balancers.pools.<a href="./src/cloudflare/resources/user/load_balancers/pools.py">delete</a>(pool_id, \*\*<a href="src/cloudflare/types/user/load_balancers/pool_delete_params.py">params</a>) -> <a href="./src/cloudflare/types/user/load_balancers/pool_delete_response.py">PoolDeleteResponse</a></code>
- <code title="patch /user/load_balancers/pools/{pool_id}">client.user.load_balancers.pools.<a href="./src/cloudflare/resources/user/load_balancers/pools.py">edit</a>(pool_id, \*\*<a href="src/cloudflare/types/user/load_balancers/pool_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/user/load_balancers/pool.py">Pool</a></code>
- <code title="get /user/load_balancers/pools/{pool_id}">client.user.load_balancers.pools.<a href="./src/cloudflare/resources/user/load_balancers/pools.py">get</a>(pool_id) -> <a href="./src/cloudflare/types/user/load_balancers/pool.py">Pool</a></code>
- <code title="patch /user/load_balancers/pools/{pool_id}">client.user.load_balancers.pools.<a href="./src/cloudflare/resources/user/load_balancers/pools.py">edit</a>(pool_id, \*\*<a href="src/cloudflare/types/user/load_balancers/pool_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/load_balancers/pool.py">Pool</a></code>
- <code title="get /user/load_balancers/pools/{pool_id}">client.user.load_balancers.pools.<a href="./src/cloudflare/resources/user/load_balancers/pools.py">get</a>(pool_id) -> <a href="./src/cloudflare/types/load_balancers/pool.py">Pool</a></code>
- <code title="get /user/load_balancers/pools/{pool_id}/health">client.user.load_balancers.pools.<a href="./src/cloudflare/resources/user/load_balancers/pools.py">health</a>(pool_id) -> <a href="./src/cloudflare/types/user/load_balancers/pool_health_response.py">PoolHealthResponse</a></code>
- <code title="post /user/load_balancers/pools/{pool_id}/preview">client.user.load_balancers.pools.<a href="./src/cloudflare/resources/user/load_balancers/pools.py">preview</a>(pool_id, \*\*<a href="src/cloudflare/types/user/load_balancers/pool_preview_params.py">params</a>) -> <a href="./src/cloudflare/types/user/load_balancers/pool_preview_response.py">PoolPreviewResponse</a></code>
- <code title="get /user/load_balancers/pools/{pool_id}/references">client.user.load_balancers.pools.<a href="./src/cloudflare/resources/user/load_balancers/pools.py">references</a>(pool_id) -> <a href="./src/cloudflare/types/user/load_balancers/pool_references_response.py">Optional</a></code>
Expand Down Expand Up @@ -1173,12 +1172,12 @@ from cloudflare.types.load_balancers import Pool, PoolDeleteResponse

Methods:

- <code title="post /accounts/{account_id}/load_balancers/pools">client.load_balancers.pools.<a href="./src/cloudflare/resources/load_balancers/pools/pools.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/load_balancers/pool_create_params.py">params</a>) -> <a href="./src/cloudflare/types/user/load_balancers/pool.py">Pool</a></code>
- <code title="put /accounts/{account_id}/load_balancers/pools/{pool_id}">client.load_balancers.pools.<a href="./src/cloudflare/resources/load_balancers/pools/pools.py">update</a>(pool_id, \*, account_id, \*\*<a href="src/cloudflare/types/load_balancers/pool_update_params.py">params</a>) -> <a href="./src/cloudflare/types/user/load_balancers/pool.py">Pool</a></code>
- <code title="get /accounts/{account_id}/load_balancers/pools">client.load_balancers.pools.<a href="./src/cloudflare/resources/load_balancers/pools/pools.py">list</a>(\*, account_id, \*\*<a href="src/cloudflare/types/load_balancers/pool_list_params.py">params</a>) -> <a href="./src/cloudflare/types/user/load_balancers/pool.py">SyncSinglePage[Pool]</a></code>
- <code title="post /accounts/{account_id}/load_balancers/pools">client.load_balancers.pools.<a href="./src/cloudflare/resources/load_balancers/pools/pools.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/load_balancers/pool_create_params.py">params</a>) -> <a href="./src/cloudflare/types/load_balancers/pool.py">Pool</a></code>
- <code title="put /accounts/{account_id}/load_balancers/pools/{pool_id}">client.load_balancers.pools.<a href="./src/cloudflare/resources/load_balancers/pools/pools.py">update</a>(pool_id, \*, account_id, \*\*<a href="src/cloudflare/types/load_balancers/pool_update_params.py">params</a>) -> <a href="./src/cloudflare/types/load_balancers/pool.py">Pool</a></code>
- <code title="get /accounts/{account_id}/load_balancers/pools">client.load_balancers.pools.<a href="./src/cloudflare/resources/load_balancers/pools/pools.py">list</a>(\*, account_id, \*\*<a href="src/cloudflare/types/load_balancers/pool_list_params.py">params</a>) -> <a href="./src/cloudflare/types/load_balancers/pool.py">SyncSinglePage[Pool]</a></code>
- <code title="delete /accounts/{account_id}/load_balancers/pools/{pool_id}">client.load_balancers.pools.<a href="./src/cloudflare/resources/load_balancers/pools/pools.py">delete</a>(pool_id, \*, account_id, \*\*<a href="src/cloudflare/types/load_balancers/pool_delete_params.py">params</a>) -> <a href="./src/cloudflare/types/load_balancers/pool_delete_response.py">PoolDeleteResponse</a></code>
- <code title="patch /accounts/{account_id}/load_balancers/pools/{pool_id}">client.load_balancers.pools.<a href="./src/cloudflare/resources/load_balancers/pools/pools.py">edit</a>(pool_id, \*, account_id, \*\*<a href="src/cloudflare/types/load_balancers/pool_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/user/load_balancers/pool.py">Pool</a></code>
- <code title="get /accounts/{account_id}/load_balancers/pools/{pool_id}">client.load_balancers.pools.<a href="./src/cloudflare/resources/load_balancers/pools/pools.py">get</a>(pool_id, \*, account_id) -> <a href="./src/cloudflare/types/user/load_balancers/pool.py">Pool</a></code>
- <code title="patch /accounts/{account_id}/load_balancers/pools/{pool_id}">client.load_balancers.pools.<a href="./src/cloudflare/resources/load_balancers/pools/pools.py">edit</a>(pool_id, \*, account_id, \*\*<a href="src/cloudflare/types/load_balancers/pool_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/load_balancers/pool.py">Pool</a></code>
- <code title="get /accounts/{account_id}/load_balancers/pools/{pool_id}">client.load_balancers.pools.<a href="./src/cloudflare/resources/load_balancers/pools/pools.py">get</a>(pool_id, \*, account_id) -> <a href="./src/cloudflare/types/load_balancers/pool.py">Pool</a></code>

### Health

Expand Down Expand Up @@ -1834,10 +1833,10 @@ Types:

```python
from cloudflare.types.firewall import (
CIDRConfiguration,
Configuration,
IPConfiguration,
Lockdown,
LockdownCIDRConfiguration,
LockdownIPConfiguration,
URLsItem,
LockdownDeleteResponse,
)
Expand Down Expand Up @@ -1880,10 +1879,10 @@ Types:

```python
from cloudflare.types.firewall import (
AccessRuleCIDRConfiguration,
AccessRuleIPConfiguration,
ASNConfiguration,
CIDRConfiguration,
CountryConfiguration,
IPConfiguration,
IPV6Configuration,
AccessRuleListResponse,
AccessRuleDeleteResponse,
Expand Down Expand Up @@ -5584,8 +5583,6 @@ Types:
```python
from cloudflare.types.zero_trust.dlp import (
ContextAwareness,
CustomProfile,
PredefinedProfile,
Profile,
SkipConfiguration,
ProfileGetResponse,
Expand Down
2 changes: 1 addition & 1 deletion src/cloudflare/resources/load_balancers/pools/pools.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@
make_request_options,
)
from ....types.load_balancers import (
Pool,
PoolDeleteResponse,
pool_edit_params,
pool_list_params,
pool_create_params,
pool_delete_params,
pool_update_params,
)
from ....types.user.load_balancers import Pool

__all__ = ["Pools", "AsyncPools"]

Expand Down
2 changes: 1 addition & 1 deletion src/cloudflare/resources/user/load_balancers/pools.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
AsyncPaginator,
make_request_options,
)
from ....types.load_balancers import Pool
from ....types.user.load_balancers import (
Pool,
PoolDeleteResponse,
PoolHealthResponse,
PoolPreviewResponse,
Expand Down
2 changes: 1 addition & 1 deletion src/cloudflare/types/accounts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from __future__ import annotations

from .role import Role as Role
from .roles import Roles as Roles
from .member import Member as Member
from .member_roles import MemberRoles as MemberRoles
from .permission_grant import PermissionGrant as PermissionGrant
from .member_list_params import MemberListParams as MemberListParams
from .member_create_params import MemberCreateParams as MemberCreateParams
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

from typing import List

__all__ = ["Roles"]
__all__ = ["MemberRoles"]

Roles = List[str]
MemberRoles = List[str]
10 changes: 6 additions & 4 deletions src/cloudflare/types/firewall/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@
from .products_item import ProductsItem as ProductsItem
from .deleted_filter import DeletedFilter as DeletedFilter
from .rule_get_params import RuleGetParams as RuleGetParams
from .ip_configuration import IPConfiguration as IPConfiguration
from .rule_edit_params import RuleEditParams as RuleEditParams
from .rule_list_params import RuleListParams as RuleListParams
from .asn_configuration import ASNConfiguration as ASNConfiguration
from .cidr_configuration import CIDRConfiguration as CIDRConfiguration
from .ipv6_configuration import IPV6Configuration as IPV6Configuration
from .rule_create_params import RuleCreateParams as RuleCreateParams
from .rule_delete_params import RuleDeleteParams as RuleDeleteParams
Expand All @@ -28,18 +26,22 @@
from .ua_rule_delete_params import UARuleDeleteParams as UARuleDeleteParams
from .ua_rule_list_response import UARuleListResponse as UARuleListResponse
from .ua_rule_update_params import UARuleUpdateParams as UARuleUpdateParams
from .ip_configuration_param import IPConfigurationParam as IPConfigurationParam
from .lockdown_create_params import LockdownCreateParams as LockdownCreateParams
from .lockdown_delete_params import LockdownDeleteParams as LockdownDeleteParams
from .lockdown_update_params import LockdownUpdateParams as LockdownUpdateParams
from .access_rule_edit_params import AccessRuleEditParams as AccessRuleEditParams
from .access_rule_list_params import AccessRuleListParams as AccessRuleListParams
from .asn_configuration_param import ASNConfigurationParam as ASNConfigurationParam
from .ua_rule_delete_response import UARuleDeleteResponse as UARuleDeleteResponse
from .cidr_configuration_param import CIDRConfigurationParam as CIDRConfigurationParam
from .ipv6_configuration_param import IPV6ConfigurationParam as IPV6ConfigurationParam
from .lockdown_delete_response import LockdownDeleteResponse as LockdownDeleteResponse
from .access_rule_create_params import AccessRuleCreateParams as AccessRuleCreateParams
from .access_rule_delete_params import AccessRuleDeleteParams as AccessRuleDeleteParams
from .lockdown_ip_configuration import LockdownIPConfiguration as LockdownIPConfiguration
from .access_rule_delete_response import AccessRuleDeleteResponse as AccessRuleDeleteResponse
from .country_configuration_param import CountryConfigurationParam as CountryConfigurationParam
from .lockdown_cidr_configuration import LockdownCIDRConfiguration as LockdownCIDRConfiguration
from .access_rule_ip_configuration import AccessRuleIPConfiguration as AccessRuleIPConfiguration
from .access_rule_cidr_configuration import AccessRuleCIDRConfiguration as AccessRuleCIDRConfiguration
from .access_rule_ip_configuration_param import AccessRuleIPConfigurationParam as AccessRuleIPConfigurationParam
from .access_rule_cidr_configuration_param import AccessRuleCIDRConfigurationParam as AccessRuleCIDRConfigurationParam
24 changes: 24 additions & 0 deletions src/cloudflare/types/firewall/access_rule_cidr_configuration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Optional
from typing_extensions import Literal

from ..._models import BaseModel

__all__ = ["AccessRuleCIDRConfiguration"]


class AccessRuleCIDRConfiguration(BaseModel):
target: Optional[Literal["ip_range"]] = None
"""The configuration target.
You must set the target to `ip_range` when specifying an IP address range in the
rule.
"""

value: Optional[str] = None
"""The IP address range to match.
You can only use prefix lengths `/16` and `/24` for IPv4 ranges, and prefix
lengths `/32`, `/48`, and `/64` for IPv6 ranges.
"""
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,20 @@

from typing_extensions import Literal, TypedDict

__all__ = ["CIDRConfigurationParam"]
__all__ = ["AccessRuleCIDRConfigurationParam"]


class CIDRConfigurationParam(TypedDict, total=False):
class AccessRuleCIDRConfigurationParam(TypedDict, total=False):
target: Literal["ip_range"]
"""The configuration target.
You must set the target to `ip_range` when specifying an IP address range in the
Zone Lockdown rule.
rule.
"""

value: str
"""The IP address range to match. You can only use prefix lengths `/16` and `/24`."""
"""The IP address range to match.
You can only use prefix lengths `/16` and `/24` for IPv4 ranges, and prefix
lengths `/32`, `/48`, and `/64` for IPv6 ranges.
"""
8 changes: 4 additions & 4 deletions src/cloudflare/types/firewall/access_rule_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
from typing import Union
from typing_extensions import Literal, Required, TypedDict

from .ip_configuration_param import IPConfigurationParam
from .asn_configuration_param import ASNConfigurationParam
from .cidr_configuration_param import CIDRConfigurationParam
from .ipv6_configuration_param import IPV6ConfigurationParam
from .country_configuration_param import CountryConfigurationParam
from .access_rule_ip_configuration_param import AccessRuleIPConfigurationParam
from .access_rule_cidr_configuration_param import AccessRuleCIDRConfigurationParam

__all__ = ["AccessRuleCreateParams", "Configuration"]

Expand All @@ -34,9 +34,9 @@ class AccessRuleCreateParams(TypedDict, total=False):


Configuration = Union[
IPConfigurationParam,
AccessRuleIPConfigurationParam,
IPV6ConfigurationParam,
CIDRConfigurationParam,
AccessRuleCIDRConfigurationParam,
ASNConfigurationParam,
CountryConfigurationParam,
]
8 changes: 4 additions & 4 deletions src/cloudflare/types/firewall/access_rule_edit_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
from typing import Union
from typing_extensions import Literal, Required, TypedDict

from .ip_configuration_param import IPConfigurationParam
from .asn_configuration_param import ASNConfigurationParam
from .cidr_configuration_param import CIDRConfigurationParam
from .ipv6_configuration_param import IPV6ConfigurationParam
from .country_configuration_param import CountryConfigurationParam
from .access_rule_ip_configuration_param import AccessRuleIPConfigurationParam
from .access_rule_cidr_configuration_param import AccessRuleCIDRConfigurationParam

__all__ = ["AccessRuleEditParams", "Configuration"]

Expand All @@ -34,9 +34,9 @@ class AccessRuleEditParams(TypedDict, total=False):


Configuration = Union[
IPConfigurationParam,
AccessRuleIPConfigurationParam,
IPV6ConfigurationParam,
CIDRConfigurationParam,
AccessRuleCIDRConfigurationParam,
ASNConfigurationParam,
CountryConfigurationParam,
]
22 changes: 22 additions & 0 deletions src/cloudflare/types/firewall/access_rule_ip_configuration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Optional
from typing_extensions import Literal

from ..._models import BaseModel

__all__ = ["AccessRuleIPConfiguration"]


class AccessRuleIPConfiguration(BaseModel):
target: Optional[Literal["ip"]] = None
"""The configuration target.
You must set the target to `ip` when specifying an IP address in the rule.
"""

value: Optional[str] = None
"""The IP address to match.
This address will be compared to the IP address of incoming requests.
"""
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@

from typing_extensions import Literal, TypedDict

__all__ = ["IPConfigurationParam"]
__all__ = ["AccessRuleIPConfigurationParam"]


class IPConfigurationParam(TypedDict, total=False):
class AccessRuleIPConfigurationParam(TypedDict, total=False):
target: Literal["ip"]
"""The configuration target.
You must set the target to `ip` when specifying an IP address in the Zone
Lockdown rule.
You must set the target to `ip` when specifying an IP address in the rule.
"""

value: str
Expand Down
6 changes: 3 additions & 3 deletions src/cloudflare/types/firewall/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

from typing import Union

from .ip_configuration import IPConfiguration
from .cidr_configuration import CIDRConfiguration
from .lockdown_ip_configuration import LockdownIPConfiguration
from .lockdown_cidr_configuration import LockdownCIDRConfiguration

__all__ = ["Configuration"]

Configuration = Union[IPConfiguration, CIDRConfiguration]
Configuration = Union[LockdownIPConfiguration, LockdownCIDRConfiguration]
6 changes: 3 additions & 3 deletions src/cloudflare/types/firewall/configuration_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

from typing import Union

from .ip_configuration_param import IPConfigurationParam
from .cidr_configuration_param import CIDRConfigurationParam
from .lockdown_ip_configuration import LockdownIPConfiguration
from .lockdown_cidr_configuration import LockdownCIDRConfiguration

__all__ = ["ConfigurationParam"]

ConfigurationParam = Union[IPConfigurationParam, CIDRConfigurationParam]
ConfigurationParam = Union[LockdownIPConfiguration, LockdownCIDRConfiguration]
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

from ..._models import BaseModel

__all__ = ["CIDRConfiguration"]
__all__ = ["LockdownCIDRConfiguration"]


class CIDRConfiguration(BaseModel):
class LockdownCIDRConfiguration(BaseModel):
target: Optional[Literal["ip_range"]] = None
"""The configuration target.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

from ..._models import BaseModel

__all__ = ["IPConfiguration"]
__all__ = ["LockdownIPConfiguration"]


class IPConfiguration(BaseModel):
class LockdownIPConfiguration(BaseModel):
target: Optional[Literal["ip"]] = None
"""The configuration target.
Expand Down
Loading

0 comments on commit dd33a93

Please sign in to comment.