diff --git a/api.md b/api.md
index 1bba8b0f518b..2205f3e56331 100644
--- a/api.md
+++ b/api.md
@@ -1347,7 +1347,7 @@ Methods:
Types:
```python
-from cloudflare.types.ssl import CertificatePackListResponse, CertificatePackEditResponse
+from cloudflare.types.ssl import HostItem, CertificatePackListResponse, CertificatePackEditResponse
```
Methods:
@@ -1490,7 +1490,7 @@ Methods:
Types:
```python
-from cloudflare.types import RatePlan, RatePlanGetResponse
+from cloudflare.types import Component, RatePlan, RatePlanGetResponse
```
Methods:
@@ -2049,6 +2049,7 @@ Types:
from cloudflare.types import (
KeylessCertificate,
KeylessCertificateHostname,
+ Tunnel,
UnnamedSchemaRefA91f0bd72ee433f010eecfdc94ccf298,
)
```
@@ -2274,7 +2275,15 @@ Methods:
Types:
```python
-from cloudflare.types import ZonesPagerule, PageruleListResponse, PageruleDeleteResponse
+from cloudflare.types import (
+ ActionItem,
+ PageRule,
+ Route,
+ TargesItem,
+ URLTarget,
+ PageruleListResponse,
+ PageruleDeleteResponse,
+)
```
Methods:
@@ -2303,7 +2312,13 @@ Methods:
Types:
```python
-from cloudflare.types import RateLimit, RateLimitListResponse, RateLimitDeleteResponse
+from cloudflare.types import (
+ Action,
+ MethodsItem,
+ RateLimit,
+ RateLimitListResponse,
+ RateLimitDeleteResponse,
+)
```
Methods:
@@ -2627,6 +2642,25 @@ Methods:
# Workers
+Types:
+
+```python
+from cloudflare.types import (
+ Binding,
+ D1Binding,
+ DispatchNamespaceBinding,
+ DurableObjectBinding,
+ KVNamespaceBinding,
+ MigrationStep,
+ MTLSCERTBinding,
+ PlacementConfiguration,
+ R2Binding,
+ ServiceBinding,
+ SingleStepMigration,
+ SteppedMigration,
+)
+```
+
## AI
Types:
@@ -2644,13 +2678,13 @@ Methods:
Types:
```python
-from cloudflare.types.workers import WorkersScript
+from cloudflare.types.workers import Script, Setting, SettingsItem
```
Methods:
-- client.workers.scripts.update(script_name, \*, account_id, \*\*params) -> WorkersScript
-- client.workers.scripts.list(\*, account_id) -> SyncSinglePage[WorkersScript]
+- client.workers.scripts.update(script_name, \*, account_id, \*\*params) -> Script
+- client.workers.scripts.list(\*, account_id) -> SyncSinglePage[Script]
- client.workers.scripts.delete(script_name, \*, account_id, \*\*params) -> None
- client.workers.scripts.get(script_name, \*, account_id) -> BinaryAPIResponse
@@ -2688,7 +2722,12 @@ Methods:
Types:
```python
-from cloudflare.types.workers.scripts import TailCreateResponse, TailGetResponse
+from cloudflare.types.workers.scripts import (
+ ConsumerScript,
+ ConsumerScriptItem,
+ TailCreateResponse,
+ TailGetResponse,
+)
```
Methods:
@@ -2714,7 +2753,7 @@ Methods:
Methods:
-- client.workers.scripts.content.update(script_name, \*, account_id, \*\*params) -> WorkersScript
+- client.workers.scripts.content.update(script_name, \*, account_id, \*\*params) -> Script
### ContentV2
@@ -2724,16 +2763,10 @@ Methods:
### Settings
-Types:
-
-```python
-from cloudflare.types.workers.scripts import SettingEditResponse, SettingGetResponse
-```
-
Methods:
-- client.workers.scripts.settings.edit(script_name, \*, account_id, \*\*params) -> SettingEditResponse
-- client.workers.scripts.settings.get(script_name, \*, account_id) -> SettingGetResponse
+- client.workers.scripts.settings.edit(script_name, \*, account_id, \*\*params) -> SettingsItem
+- client.workers.scripts.settings.get(script_name, \*, account_id) -> SettingsItem
### Deployments
@@ -2894,21 +2927,15 @@ Methods:
Methods:
-- client.workers.services.environments.content.update(environment_name, \*, account_id, service_name, \*\*params) -> WorkersScript
+- client.workers.services.environments.content.update(environment_name, \*, account_id, service_name, \*\*params) -> Script
- client.workers.services.environments.content.get(environment_name, \*, account_id, service_name) -> BinaryAPIResponse
#### Settings
-Types:
-
-```python
-from cloudflare.types.workers.services.environments import SettingEditResponse, SettingGetResponse
-```
-
Methods:
-- client.workers.services.environments.settings.edit(environment_name, \*, account_id, service_name, \*\*params) -> SettingEditResponse
-- client.workers.services.environments.settings.get(environment_name, \*, account_id, service_name) -> SettingGetResponse
+- client.workers.services.environments.settings.edit(environment_name, \*, account_id, service_name, \*\*params) -> SettingsItem
+- client.workers.services.environments.settings.get(environment_name, \*, account_id, service_name) -> SettingsItem
# KV
@@ -3061,7 +3088,12 @@ Methods:
Types:
```python
-from cloudflare.types import ManagedHeaderListResponse, ManagedHeaderEditResponse
+from cloudflare.types import (
+ RequestListItem,
+ RequestModel,
+ ManagedHeaderListResponse,
+ ManagedHeaderEditResponse,
+)
```
Methods:
@@ -3231,6 +3263,12 @@ Methods:
# Spectrum
+Types:
+
+```python
+from cloudflare.types import DNS, EdgeIPs, OriginDNS, OriginPort
+```
+
## Analytics
### Aggregates
@@ -3249,6 +3287,12 @@ Methods:
### Events
+Types:
+
+```python
+from cloudflare.types.spectrum.analytics import DimensionItem
+```
+
#### Bytimes
Methods:
@@ -3808,6 +3852,7 @@ Types:
```python
from cloudflare.types import (
+ HealthCheck,
UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39,
UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5,
)
@@ -3859,6 +3904,7 @@ Types:
```python
from cloudflare.types.magic_transit import (
+ PSKMetadata,
IPSECTunnelCreateResponse,
IPSECTunnelUpdateResponse,
IPSECTunnelListResponse,
@@ -3883,6 +3929,9 @@ Types:
```python
from cloudflare.types.magic_transit import (
+ ColoNamesItem,
+ ColoRegionsItem,
+ Scope,
RouteCreateResponse,
RouteUpdateResponse,
RouteListResponse,
@@ -3907,6 +3956,8 @@ Types:
```python
from cloudflare.types.magic_transit import (
+ Site,
+ SiteLocation,
SiteCreateResponse,
SiteUpdateResponse,
SiteListResponse,
@@ -3929,6 +3980,9 @@ Types:
```python
from cloudflare.types.magic_transit.sites import (
+ ACL,
+ ACLConfiguration,
+ Subnet,
UnnamedSchemaRef87fa9e5fe9f6b8d607be1df57340d916,
ACLCreateResponse,
ACLUpdateResponse,
@@ -3952,6 +4006,12 @@ Types:
```python
from cloudflare.types.magic_transit.sites import (
+ DHCPRelay,
+ DHCPServer,
+ LAN,
+ Nat,
+ RoutedSubnet,
+ StaticAddressing,
LANCreateResponse,
LANUpdateResponse,
LANListResponse,
@@ -3974,6 +4034,8 @@ Types:
```python
from cloudflare.types.magic_transit.sites import (
+ StaticAddressing,
+ WAN,
WANCreateResponse,
WANUpdateResponse,
WANListResponse,
@@ -4023,19 +4085,19 @@ Types:
```python
from cloudflare.types.magic_network_monitoring import (
- MagicNetworkMonitoringRule,
+ Rule,
UnnamedSchemaRef99ba74ba6027c3c87ca03d4e81cfc16d,
)
```
Methods:
-- client.magic_network_monitoring.rules.create(\*, account_id, \*\*params) -> Optional
-- client.magic_network_monitoring.rules.update(\*, account_id, \*\*params) -> Optional
-- client.magic_network_monitoring.rules.list(\*, account_id) -> SyncSinglePage[Optional]
-- client.magic_network_monitoring.rules.delete(rule_id, \*, account_id, \*\*params) -> Optional
-- client.magic_network_monitoring.rules.edit(rule_id, \*, account_id, \*\*params) -> Optional
-- client.magic_network_monitoring.rules.get(rule_id, \*, account_id) -> Optional
+- client.magic_network_monitoring.rules.create(\*, account_id, \*\*params) -> Optional
+- client.magic_network_monitoring.rules.update(\*, account_id, \*\*params) -> Optional
+- client.magic_network_monitoring.rules.list(\*, account_id) -> SyncSinglePage[Optional]
+- client.magic_network_monitoring.rules.delete(rule_id, \*, account_id, \*\*params) -> Optional
+- client.magic_network_monitoring.rules.edit(rule_id, \*, account_id, \*\*params) -> Optional
+- client.magic_network_monitoring.rules.get(rule_id, \*, account_id) -> Optional
### Advertisements
@@ -4084,8 +4146,9 @@ Types:
```python
from cloudflare.types.pages import (
- PagesDeployments,
- PagesProjects,
+ Deployment,
+ Project,
+ Stage,
ProjectDeleteResponse,
ProjectPurgeBuildCacheResponse,
)
@@ -4094,10 +4157,10 @@ from cloudflare.types.pages import (
Methods:
- client.pages.projects.create(\*, account_id, \*\*params) -> Optional
-- client.pages.projects.list(\*, account_id) -> SyncSinglePage[PagesDeployments]
+- client.pages.projects.list(\*, account_id) -> SyncSinglePage[Deployment]
- client.pages.projects.delete(project_name, \*, account_id, \*\*params) -> object
- client.pages.projects.edit(project_name, \*, account_id, \*\*params) -> Optional
-- client.pages.projects.get(project_name, \*, account_id) -> PagesProjects
+- client.pages.projects.get(project_name, \*, account_id) -> Project
- client.pages.projects.purge_build_cache(project_name, \*, account_id) -> object
### Deployments
@@ -4110,12 +4173,12 @@ from cloudflare.types.pages.projects import DeploymentDeleteResponse
Methods:
-- client.pages.projects.deployments.create(project_name, \*, account_id, \*\*params) -> PagesDeployments
-- client.pages.projects.deployments.list(project_name, \*, account_id, \*\*params) -> SyncSinglePage[PagesDeployments]
+- client.pages.projects.deployments.create(project_name, \*, account_id, \*\*params) -> Deployment
+- client.pages.projects.deployments.list(project_name, \*, account_id, \*\*params) -> SyncSinglePage[Deployment]
- client.pages.projects.deployments.delete(deployment_id, \*, account_id, project_name, \*\*params) -> object
-- client.pages.projects.deployments.get(deployment_id, \*, account_id, project_name) -> PagesDeployments
-- client.pages.projects.deployments.retry(deployment_id, \*, account_id, project_name, \*\*params) -> PagesDeployments
-- client.pages.projects.deployments.rollback(deployment_id, \*, account_id, project_name, \*\*params) -> PagesDeployments
+- client.pages.projects.deployments.get(deployment_id, \*, account_id, project_name) -> Deployment
+- client.pages.projects.deployments.retry(deployment_id, \*, account_id, project_name, \*\*params) -> Deployment
+- client.pages.projects.deployments.rollback(deployment_id, \*, account_id, project_name, \*\*params) -> Deployment
#### History
@@ -4146,7 +4209,7 @@ Methods:
Types:
```python
-from cloudflare.types import PCAPCreateResponse, PCAPListResponse, PCAPGetResponse
+from cloudflare.types import Filter, PCAP, PCAPCreateResponse, PCAPListResponse, PCAPGetResponse
```
Methods:
@@ -4183,7 +4246,7 @@ Methods:
Types:
```python
-from cloudflare.types.registrar import RegistrarDomains, DomainListResponse
+from cloudflare.types.registrar import Domain, DomainListResponse
```
Methods:
@@ -4214,7 +4277,9 @@ Types:
```python
from cloudflare.types.rules import (
+ Hostname,
ListsList,
+ Redirect,
UnnamedSchemaRefE706d5e8367564544e2991af82ebb07a,
ListDeleteResponse,
)
@@ -4291,7 +4356,7 @@ Methods:
Types:
```python
-from cloudflare.types import StreamVideos
+from cloudflare.types import AllowedOriginsItem, StreamVideos
```
Methods:
@@ -4691,7 +4756,7 @@ from cloudflare.types.workers_for_platforms.dispatch.namespaces import (
Methods:
-- client.workers_for_platforms.dispatch.namespaces.scripts.update(script_name, \*, account_id, dispatch_namespace, \*\*params) -> WorkersScript
+- client.workers_for_platforms.dispatch.namespaces.scripts.update(script_name, \*, account_id, dispatch_namespace, \*\*params) -> Script
- client.workers_for_platforms.dispatch.namespaces.scripts.delete(script_name, \*, account_id, dispatch_namespace, \*\*params) -> None
- client.workers_for_platforms.dispatch.namespaces.scripts.get(script_name, \*, account_id, dispatch_namespace) -> WorkersForPlatformsNamespaceScript
@@ -4699,36 +4764,21 @@ Methods:
Methods:
-- client.workers_for_platforms.dispatch.namespaces.scripts.content.update(script_name, \*, account_id, dispatch_namespace, \*\*params) -> WorkersScript
+- client.workers_for_platforms.dispatch.namespaces.scripts.content.update(script_name, \*, account_id, dispatch_namespace, \*\*params) -> Script
- client.workers_for_platforms.dispatch.namespaces.scripts.content.get(script_name, \*, account_id, dispatch_namespace) -> BinaryAPIResponse
##### Settings
-Types:
-
-```python
-from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts import (
- SettingEditResponse,
- SettingGetResponse,
-)
-```
-
Methods:
-- client.workers_for_platforms.dispatch.namespaces.scripts.settings.edit(script_name, \*, account_id, dispatch_namespace, \*\*params) -> SettingEditResponse
-- client.workers_for_platforms.dispatch.namespaces.scripts.settings.get(script_name, \*, account_id, dispatch_namespace) -> SettingGetResponse
+- client.workers_for_platforms.dispatch.namespaces.scripts.settings.edit(script_name, \*, account_id, dispatch_namespace, \*\*params) -> SettingsItem
+- client.workers_for_platforms.dispatch.namespaces.scripts.settings.get(script_name, \*, account_id, dispatch_namespace) -> SettingsItem
##### Bindings
-Types:
-
-```python
-from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts import BindingGetResponse
-```
-
Methods:
-- client.workers_for_platforms.dispatch.namespaces.scripts.bindings.get(script_name, \*, account_id, dispatch_namespace) -> BindingGetResponse
+- client.workers_for_platforms.dispatch.namespaces.scripts.bindings.get(script_name, \*, account_id, dispatch_namespace) -> Binding
# ZeroTrust
@@ -5468,18 +5518,19 @@ Types:
```python
from cloudflare.types.zero_trust import (
- TunnelArgoTunnel,
+ Tunnel,
UnnamedSchemaRefA9c0e0a8cc5fd0e244f41ea806cd954a,
+ WARPConnectorTunnel,
)
```
Methods:
-- client.zero_trust.tunnels.create(\*, account_id, \*\*params) -> TunnelArgoTunnel
+- client.zero_trust.tunnels.create(\*, account_id, \*\*params) -> Tunnel
- client.zero_trust.tunnels.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[UnnamedSchemaRef413ab4522f0bb93f63444799121fe2f8]
-- client.zero_trust.tunnels.delete(tunnel_id, \*, account_id, \*\*params) -> TunnelArgoTunnel
+- client.zero_trust.tunnels.delete(tunnel_id, \*, account_id, \*\*params) -> Tunnel
- client.zero_trust.tunnels.edit(tunnel_id, \*, account_id, \*\*params) -> UnnamedSchemaRef413ab4522f0bb93f63444799121fe2f8
-- client.zero_trust.tunnels.get(tunnel_id, \*, account_id) -> TunnelArgoTunnel
+- client.zero_trust.tunnels.get(tunnel_id, \*, account_id) -> Tunnel
### Configurations
@@ -5554,29 +5605,29 @@ Methods:
Types:
```python
-from cloudflare.types.zero_trust.dlp import DLPDataset, DLPDatasetArray, DLPDatasetCreation
+from cloudflare.types.zero_trust.dlp import Dataset, DatasetArray, DatasetCreation
```
Methods:
-- client.zero_trust.dlp.datasets.create(\*, account_id, \*\*params) -> Optional
-- client.zero_trust.dlp.datasets.update(dataset_id, \*, account_id, \*\*params) -> Optional
-- client.zero_trust.dlp.datasets.list(\*, account_id) -> SyncSinglePage[DLPDataset]
+- client.zero_trust.dlp.datasets.create(\*, account_id, \*\*params) -> Optional
+- client.zero_trust.dlp.datasets.update(dataset_id, \*, account_id, \*\*params) -> Optional
+- client.zero_trust.dlp.datasets.list(\*, account_id) -> SyncSinglePage[Dataset]
- client.zero_trust.dlp.datasets.delete(dataset_id, \*, account_id) -> None
-- client.zero_trust.dlp.datasets.get(dataset_id, \*, account_id) -> Optional
+- client.zero_trust.dlp.datasets.get(dataset_id, \*, account_id) -> Optional
#### Upload
Types:
```python
-from cloudflare.types.zero_trust.dlp.datasets import DLPDatasetNewVersion
+from cloudflare.types.zero_trust.dlp.datasets import NewVersion
```
Methods:
-- client.zero_trust.dlp.datasets.upload.create(dataset_id, \*, account_id) -> Optional
-- client.zero_trust.dlp.datasets.upload.edit(version, \*, account_id, dataset_id, \*\*params) -> Optional
+- client.zero_trust.dlp.datasets.upload.create(dataset_id, \*, account_id) -> Optional
+- client.zero_trust.dlp.datasets.upload.edit(version, \*, account_id, dataset_id, \*\*params) -> Optional
### Patterns
@@ -7140,7 +7191,13 @@ Methods:
Types:
```python
-from cloudflare.types import ObservatorySchedule, ObservatoryTrend, SpeedDeleteResponse
+from cloudflare.types import (
+ LabeledRegion,
+ LighthouseReport,
+ ObservatorySchedule,
+ ObservatoryTrend,
+ SpeedDeleteResponse,
+)
```
Methods:
diff --git a/src/cloudflare/resources/keyless_certificates.py b/src/cloudflare/resources/keyless_certificates.py
index fff5cfc7d07b..700a9dc23a60 100644
--- a/src/cloudflare/resources/keyless_certificates.py
+++ b/src/cloudflare/resources/keyless_certificates.py
@@ -7,6 +7,7 @@
import httpx
from ..types import (
+ TunnelParam,
KeylessCertificateHostname,
UnnamedSchemaRef16aca57bde2963201c7e6e895436c1c1,
keyless_certificate_edit_params,
@@ -55,7 +56,7 @@ def create(
port: float,
bundle_method: UnnamedSchemaRef16aca57bde2963201c7e6e895436c1c1 | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
- tunnel: keyless_certificate_create_params.Tunnel | NotGiven = NOT_GIVEN,
+ tunnel: TunnelParam | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -214,7 +215,7 @@ def edit(
host: str | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
port: float | NotGiven = NOT_GIVEN,
- tunnel: keyless_certificate_edit_params.Tunnel | NotGiven = NOT_GIVEN,
+ tunnel: TunnelParam | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -344,7 +345,7 @@ async def create(
port: float,
bundle_method: UnnamedSchemaRef16aca57bde2963201c7e6e895436c1c1 | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
- tunnel: keyless_certificate_create_params.Tunnel | NotGiven = NOT_GIVEN,
+ tunnel: TunnelParam | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -503,7 +504,7 @@ async def edit(
host: str | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
port: float | NotGiven = NOT_GIVEN,
- tunnel: keyless_certificate_edit_params.Tunnel | NotGiven = NOT_GIVEN,
+ tunnel: TunnelParam | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
diff --git a/src/cloudflare/resources/magic_network_monitoring/rules/rules.py b/src/cloudflare/resources/magic_network_monitoring/rules/rules.py
index 7759a7b2f196..eeb21a86e679 100644
--- a/src/cloudflare/resources/magic_network_monitoring/rules/rules.py
+++ b/src/cloudflare/resources/magic_network_monitoring/rules/rules.py
@@ -34,7 +34,7 @@
make_request_options,
)
from ....types.magic_network_monitoring import (
- MagicNetworkMonitoringRule,
+ Rule,
rule_edit_params,
rule_create_params,
rule_delete_params,
@@ -68,7 +68,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[MagicNetworkMonitoringRule]:
+ ) -> Optional[Rule]:
"""Create network monitoring rules for account.
Currently only supports creating a
@@ -95,7 +95,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
+ cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
)
def update(
@@ -109,7 +109,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[MagicNetworkMonitoringRule]:
+ ) -> Optional[Rule]:
"""
Update network monitoring rules for account.
@@ -134,7 +134,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
+ cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
)
def list(
@@ -147,7 +147,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SyncSinglePage[Optional[MagicNetworkMonitoringRule]]:
+ ) -> SyncSinglePage[Optional[Rule]]:
"""
Lists network monitoring rules for account.
@@ -164,11 +164,11 @@ def list(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._get_api_list(
f"/accounts/{account_id}/mnm/rules",
- page=SyncSinglePage[Optional[MagicNetworkMonitoringRule]],
+ page=SyncSinglePage[Optional[Rule]],
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- model=MagicNetworkMonitoringRule,
+ model=Rule,
)
def delete(
@@ -183,7 +183,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[MagicNetworkMonitoringRule]:
+ ) -> Optional[Rule]:
"""
Delete a network monitoring rule for account.
@@ -210,7 +210,7 @@ def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
+ cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
)
def edit(
@@ -225,7 +225,7 @@ def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[MagicNetworkMonitoringRule]:
+ ) -> Optional[Rule]:
"""
Update a network monitoring rule for account.
@@ -252,7 +252,7 @@ def edit(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
+ cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
)
def get(
@@ -266,7 +266,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[MagicNetworkMonitoringRule]:
+ ) -> Optional[Rule]:
"""
List a single network monitoring rule for account.
@@ -292,7 +292,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
+ cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
)
@@ -320,7 +320,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[MagicNetworkMonitoringRule]:
+ ) -> Optional[Rule]:
"""Create network monitoring rules for account.
Currently only supports creating a
@@ -347,7 +347,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
+ cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
)
async def update(
@@ -361,7 +361,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[MagicNetworkMonitoringRule]:
+ ) -> Optional[Rule]:
"""
Update network monitoring rules for account.
@@ -386,7 +386,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
+ cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
)
def list(
@@ -399,7 +399,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> AsyncPaginator[Optional[MagicNetworkMonitoringRule], AsyncSinglePage[Optional[MagicNetworkMonitoringRule]]]:
+ ) -> AsyncPaginator[Optional[Rule], AsyncSinglePage[Optional[Rule]]]:
"""
Lists network monitoring rules for account.
@@ -416,11 +416,11 @@ def list(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._get_api_list(
f"/accounts/{account_id}/mnm/rules",
- page=AsyncSinglePage[Optional[MagicNetworkMonitoringRule]],
+ page=AsyncSinglePage[Optional[Rule]],
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- model=MagicNetworkMonitoringRule,
+ model=Rule,
)
async def delete(
@@ -435,7 +435,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[MagicNetworkMonitoringRule]:
+ ) -> Optional[Rule]:
"""
Delete a network monitoring rule for account.
@@ -462,7 +462,7 @@ async def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
+ cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
)
async def edit(
@@ -477,7 +477,7 @@ async def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[MagicNetworkMonitoringRule]:
+ ) -> Optional[Rule]:
"""
Update a network monitoring rule for account.
@@ -504,7 +504,7 @@ async def edit(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
+ cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
)
async def get(
@@ -518,7 +518,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[MagicNetworkMonitoringRule]:
+ ) -> Optional[Rule]:
"""
List a single network monitoring rule for account.
@@ -544,7 +544,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
+ cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
)
diff --git a/src/cloudflare/resources/magic_transit/gre_tunnels.py b/src/cloudflare/resources/magic_transit/gre_tunnels.py
index 5909b7c3639d..fba8e5530409 100644
--- a/src/cloudflare/resources/magic_transit/gre_tunnels.py
+++ b/src/cloudflare/resources/magic_transit/gre_tunnels.py
@@ -6,6 +6,7 @@
import httpx
+from ...types import HealthCheckParam
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._utils import (
maybe_transform,
@@ -99,7 +100,7 @@ def update(
interface_address: str,
name: str,
description: str | NotGiven = NOT_GIVEN,
- health_check: gre_tunnel_update_params.HealthCheck | NotGiven = NOT_GIVEN,
+ health_check: HealthCheckParam | NotGiven = NOT_GIVEN,
mtu: int | NotGiven = NOT_GIVEN,
ttl: int | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -368,7 +369,7 @@ async def update(
interface_address: str,
name: str,
description: str | NotGiven = NOT_GIVEN,
- health_check: gre_tunnel_update_params.HealthCheck | NotGiven = NOT_GIVEN,
+ health_check: HealthCheckParam | NotGiven = NOT_GIVEN,
mtu: int | NotGiven = NOT_GIVEN,
ttl: int | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
diff --git a/src/cloudflare/resources/magic_transit/ipsec_tunnels.py b/src/cloudflare/resources/magic_transit/ipsec_tunnels.py
index e45eb5066991..ea120195b61e 100644
--- a/src/cloudflare/resources/magic_transit/ipsec_tunnels.py
+++ b/src/cloudflare/resources/magic_transit/ipsec_tunnels.py
@@ -6,6 +6,7 @@
import httpx
+from ...types import HealthCheckParam
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._utils import (
maybe_transform,
@@ -57,7 +58,7 @@ def create(
name: str,
customer_endpoint: str | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
- health_check: ipsec_tunnel_create_params.HealthCheck | NotGiven = NOT_GIVEN,
+ health_check: HealthCheckParam | NotGiven = NOT_GIVEN,
psk: str | NotGiven = NOT_GIVEN,
replay_protection: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -139,7 +140,7 @@ def update(
name: str,
customer_endpoint: str | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
- health_check: ipsec_tunnel_update_params.HealthCheck | NotGiven = NOT_GIVEN,
+ health_check: HealthCheckParam | NotGiven = NOT_GIVEN,
psk: str | NotGiven = NOT_GIVEN,
replay_protection: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -415,7 +416,7 @@ async def create(
name: str,
customer_endpoint: str | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
- health_check: ipsec_tunnel_create_params.HealthCheck | NotGiven = NOT_GIVEN,
+ health_check: HealthCheckParam | NotGiven = NOT_GIVEN,
psk: str | NotGiven = NOT_GIVEN,
replay_protection: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -497,7 +498,7 @@ async def update(
name: str,
customer_endpoint: str | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
- health_check: ipsec_tunnel_update_params.HealthCheck | NotGiven = NOT_GIVEN,
+ health_check: HealthCheckParam | NotGiven = NOT_GIVEN,
psk: str | NotGiven = NOT_GIVEN,
replay_protection: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
diff --git a/src/cloudflare/resources/magic_transit/routes.py b/src/cloudflare/resources/magic_transit/routes.py
index 038d12aaa2db..dc32a6e4cc43 100644
--- a/src/cloudflare/resources/magic_transit/routes.py
+++ b/src/cloudflare/resources/magic_transit/routes.py
@@ -24,6 +24,7 @@
make_request_options,
)
from ...types.magic_transit import (
+ ScopeParam,
RouteGetResponse,
RouteListResponse,
RouteEmptyResponse,
@@ -100,7 +101,7 @@ def update(
prefix: str,
priority: int,
description: str | NotGiven = NOT_GIVEN,
- scope: route_update_params.Scope | NotGiven = NOT_GIVEN,
+ scope: ScopeParam | NotGiven = NOT_GIVEN,
weight: int | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -398,7 +399,7 @@ async def update(
prefix: str,
priority: int,
description: str | NotGiven = NOT_GIVEN,
- scope: route_update_params.Scope | NotGiven = NOT_GIVEN,
+ scope: ScopeParam | NotGiven = NOT_GIVEN,
weight: int | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
diff --git a/src/cloudflare/resources/managed_headers.py b/src/cloudflare/resources/managed_headers.py
index 4c5a186cc516..ae715f2683f9 100644
--- a/src/cloudflare/resources/managed_headers.py
+++ b/src/cloudflare/resources/managed_headers.py
@@ -6,7 +6,12 @@
import httpx
-from ..types import ManagedHeaderEditResponse, ManagedHeaderListResponse, managed_header_edit_params
+from ..types import (
+ RequestListItemParam,
+ ManagedHeaderEditResponse,
+ ManagedHeaderListResponse,
+ managed_header_edit_params,
+)
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._utils import (
maybe_transform,
@@ -75,8 +80,8 @@ def edit(
self,
*,
zone_id: str,
- managed_request_headers: Iterable[managed_header_edit_params.ManagedRequestHeader],
- managed_response_headers: Iterable[managed_header_edit_params.ManagedResponseHeader],
+ managed_request_headers: Iterable[RequestListItemParam],
+ managed_response_headers: Iterable[RequestListItemParam],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -164,8 +169,8 @@ async def edit(
self,
*,
zone_id: str,
- managed_request_headers: Iterable[managed_header_edit_params.ManagedRequestHeader],
- managed_response_headers: Iterable[managed_header_edit_params.ManagedResponseHeader],
+ managed_request_headers: Iterable[RequestListItemParam],
+ managed_response_headers: Iterable[RequestListItemParam],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
diff --git a/src/cloudflare/resources/pagerules/pagerules.py b/src/cloudflare/resources/pagerules/pagerules.py
index 49c561cc922b..41b9955c1901 100644
--- a/src/cloudflare/resources/pagerules/pagerules.py
+++ b/src/cloudflare/resources/pagerules/pagerules.py
@@ -8,6 +8,8 @@
import httpx
from ...types import (
+ ActionItemParam,
+ TargesItemParam,
PageruleListResponse,
PageruleDeleteResponse,
pagerule_edit_params,
@@ -63,8 +65,8 @@ def create(
self,
*,
zone_id: str,
- actions: Iterable[pagerule_create_params.Action],
- targets: Iterable[pagerule_create_params.Target],
+ actions: Iterable[ActionItemParam],
+ targets: Iterable[TargesItemParam],
priority: int | NotGiven = NOT_GIVEN,
status: Literal["active", "disabled"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -134,8 +136,8 @@ def update(
pagerule_id: str,
*,
zone_id: str,
- actions: Iterable[pagerule_update_params.Action],
- targets: Iterable[pagerule_update_params.Target],
+ actions: Iterable[ActionItemParam],
+ targets: Iterable[TargesItemParam],
priority: int | NotGiven = NOT_GIVEN,
status: Literal["active", "disabled"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -318,10 +320,10 @@ def edit(
pagerule_id: str,
*,
zone_id: str,
- actions: Iterable[pagerule_edit_params.Action] | NotGiven = NOT_GIVEN,
+ actions: Iterable[ActionItemParam] | NotGiven = NOT_GIVEN,
priority: int | NotGiven = NOT_GIVEN,
status: Literal["active", "disabled"] | NotGiven = NOT_GIVEN,
- targets: Iterable[pagerule_edit_params.Target] | NotGiven = NOT_GIVEN,
+ targets: Iterable[TargesItemParam] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -455,8 +457,8 @@ async def create(
self,
*,
zone_id: str,
- actions: Iterable[pagerule_create_params.Action],
- targets: Iterable[pagerule_create_params.Target],
+ actions: Iterable[ActionItemParam],
+ targets: Iterable[TargesItemParam],
priority: int | NotGiven = NOT_GIVEN,
status: Literal["active", "disabled"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -526,8 +528,8 @@ async def update(
pagerule_id: str,
*,
zone_id: str,
- actions: Iterable[pagerule_update_params.Action],
- targets: Iterable[pagerule_update_params.Target],
+ actions: Iterable[ActionItemParam],
+ targets: Iterable[TargesItemParam],
priority: int | NotGiven = NOT_GIVEN,
status: Literal["active", "disabled"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -710,10 +712,10 @@ async def edit(
pagerule_id: str,
*,
zone_id: str,
- actions: Iterable[pagerule_edit_params.Action] | NotGiven = NOT_GIVEN,
+ actions: Iterable[ActionItemParam] | NotGiven = NOT_GIVEN,
priority: int | NotGiven = NOT_GIVEN,
status: Literal["active", "disabled"] | NotGiven = NOT_GIVEN,
- targets: Iterable[pagerule_edit_params.Target] | NotGiven = NOT_GIVEN,
+ targets: Iterable[TargesItemParam] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
diff --git a/src/cloudflare/resources/pages/projects/deployments/deployments.py b/src/cloudflare/resources/pages/projects/deployments/deployments.py
index de40cf9792f3..51622d5756e9 100644
--- a/src/cloudflare/resources/pages/projects/deployments/deployments.py
+++ b/src/cloudflare/resources/pages/projects/deployments/deployments.py
@@ -30,7 +30,7 @@
)
from ....._wrappers import ResultWrapper
from .....pagination import SyncSinglePage, AsyncSinglePage
-from .....types.pages import PagesDeployments
+from .....types.pages import Deployment
from .history.history import History, AsyncHistory
from ....._base_client import (
AsyncPaginator,
@@ -72,7 +72,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> PagesDeployments:
+ ) -> Deployment:
"""Start a new deployment from production.
The repository and account must have
@@ -108,7 +108,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[PagesDeployments], ResultWrapper[PagesDeployments]),
+ cast_to=cast(Type[Deployment], ResultWrapper[Deployment]),
)
def list(
@@ -123,7 +123,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SyncSinglePage[PagesDeployments]:
+ ) -> SyncSinglePage[Deployment]:
"""
Fetch a list of project deployments.
@@ -148,7 +148,7 @@ def list(
raise ValueError(f"Expected a non-empty value for `project_name` but received {project_name!r}")
return self._get_api_list(
f"/accounts/{account_id}/pages/projects/{project_name}/deployments",
- page=SyncSinglePage[PagesDeployments],
+ page=SyncSinglePage[Deployment],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -156,7 +156,7 @@ def list(
timeout=timeout,
query=maybe_transform({"env": env}, deployment_list_params.DeploymentListParams),
),
- model=PagesDeployments,
+ model=Deployment,
)
def delete(
@@ -218,7 +218,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> PagesDeployments:
+ ) -> Deployment:
"""
Fetch information about a deployment.
@@ -252,7 +252,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[PagesDeployments], ResultWrapper[PagesDeployments]),
+ cast_to=cast(Type[Deployment], ResultWrapper[Deployment]),
)
def retry(
@@ -268,7 +268,7 @@ def retry(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> PagesDeployments:
+ ) -> Deployment:
"""
Retry a previous deployment.
@@ -303,7 +303,7 @@ def retry(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[PagesDeployments], ResultWrapper[PagesDeployments]),
+ cast_to=cast(Type[Deployment], ResultWrapper[Deployment]),
)
def rollback(
@@ -319,7 +319,7 @@ def rollback(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> PagesDeployments:
+ ) -> Deployment:
"""Rollback the production deployment to a previous deployment.
You can only
@@ -356,7 +356,7 @@ def rollback(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[PagesDeployments], ResultWrapper[PagesDeployments]),
+ cast_to=cast(Type[Deployment], ResultWrapper[Deployment]),
)
@@ -385,7 +385,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> PagesDeployments:
+ ) -> Deployment:
"""Start a new deployment from production.
The repository and account must have
@@ -421,7 +421,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[PagesDeployments], ResultWrapper[PagesDeployments]),
+ cast_to=cast(Type[Deployment], ResultWrapper[Deployment]),
)
def list(
@@ -436,7 +436,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> AsyncPaginator[PagesDeployments, AsyncSinglePage[PagesDeployments]]:
+ ) -> AsyncPaginator[Deployment, AsyncSinglePage[Deployment]]:
"""
Fetch a list of project deployments.
@@ -461,7 +461,7 @@ def list(
raise ValueError(f"Expected a non-empty value for `project_name` but received {project_name!r}")
return self._get_api_list(
f"/accounts/{account_id}/pages/projects/{project_name}/deployments",
- page=AsyncSinglePage[PagesDeployments],
+ page=AsyncSinglePage[Deployment],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -469,7 +469,7 @@ def list(
timeout=timeout,
query=maybe_transform({"env": env}, deployment_list_params.DeploymentListParams),
),
- model=PagesDeployments,
+ model=Deployment,
)
async def delete(
@@ -531,7 +531,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> PagesDeployments:
+ ) -> Deployment:
"""
Fetch information about a deployment.
@@ -565,7 +565,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[PagesDeployments], ResultWrapper[PagesDeployments]),
+ cast_to=cast(Type[Deployment], ResultWrapper[Deployment]),
)
async def retry(
@@ -581,7 +581,7 @@ async def retry(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> PagesDeployments:
+ ) -> Deployment:
"""
Retry a previous deployment.
@@ -616,7 +616,7 @@ async def retry(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[PagesDeployments], ResultWrapper[PagesDeployments]),
+ cast_to=cast(Type[Deployment], ResultWrapper[Deployment]),
)
async def rollback(
@@ -632,7 +632,7 @@ async def rollback(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> PagesDeployments:
+ ) -> Deployment:
"""Rollback the production deployment to a previous deployment.
You can only
@@ -669,7 +669,7 @@ async def rollback(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[PagesDeployments], ResultWrapper[PagesDeployments]),
+ cast_to=cast(Type[Deployment], ResultWrapper[Deployment]),
)
diff --git a/src/cloudflare/resources/pages/projects/projects.py b/src/cloudflare/resources/pages/projects/projects.py
index 73d50575d288..eac82c21d31b 100644
--- a/src/cloudflare/resources/pages/projects/projects.py
+++ b/src/cloudflare/resources/pages/projects/projects.py
@@ -38,9 +38,9 @@
from ...._wrappers import ResultWrapper
from ....pagination import SyncSinglePage, AsyncSinglePage
from ....types.pages import (
- PagesProjects,
- PagesDeployments,
- PagesDeploymentsParam,
+ Project,
+ Deployment,
+ DeploymentParam,
project_edit_params,
project_create_params,
project_delete_params,
@@ -77,9 +77,9 @@ def create(
*,
account_id: str,
build_config: project_create_params.BuildConfig | NotGiven = NOT_GIVEN,
- canonical_deployment: PagesDeploymentsParam | NotGiven = NOT_GIVEN,
+ canonical_deployment: DeploymentParam | NotGiven = NOT_GIVEN,
deployment_configs: project_create_params.DeploymentConfigs | NotGiven = NOT_GIVEN,
- latest_deployment: PagesDeploymentsParam | NotGiven = NOT_GIVEN,
+ latest_deployment: DeploymentParam | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
production_branch: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -151,7 +151,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SyncSinglePage[PagesDeployments]:
+ ) -> SyncSinglePage[Deployment]:
"""
Fetch a list of all user projects.
@@ -170,11 +170,11 @@ def list(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._get_api_list(
f"/accounts/{account_id}/pages/projects",
- page=SyncSinglePage[PagesDeployments],
+ page=SyncSinglePage[Deployment],
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- model=PagesDeployments,
+ model=Deployment,
)
def delete(
@@ -283,7 +283,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> PagesProjects:
+ ) -> Project:
"""
Fetch a project by name.
@@ -313,7 +313,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[PagesProjects], ResultWrapper[PagesProjects]),
+ cast_to=cast(Type[Project], ResultWrapper[Project]),
)
def purge_build_cache(
@@ -379,9 +379,9 @@ async def create(
*,
account_id: str,
build_config: project_create_params.BuildConfig | NotGiven = NOT_GIVEN,
- canonical_deployment: PagesDeploymentsParam | NotGiven = NOT_GIVEN,
+ canonical_deployment: DeploymentParam | NotGiven = NOT_GIVEN,
deployment_configs: project_create_params.DeploymentConfigs | NotGiven = NOT_GIVEN,
- latest_deployment: PagesDeploymentsParam | NotGiven = NOT_GIVEN,
+ latest_deployment: DeploymentParam | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
production_branch: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -453,7 +453,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> AsyncPaginator[PagesDeployments, AsyncSinglePage[PagesDeployments]]:
+ ) -> AsyncPaginator[Deployment, AsyncSinglePage[Deployment]]:
"""
Fetch a list of all user projects.
@@ -472,11 +472,11 @@ def list(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._get_api_list(
f"/accounts/{account_id}/pages/projects",
- page=AsyncSinglePage[PagesDeployments],
+ page=AsyncSinglePage[Deployment],
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- model=PagesDeployments,
+ model=Deployment,
)
async def delete(
@@ -585,7 +585,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> PagesProjects:
+ ) -> Project:
"""
Fetch a project by name.
@@ -615,7 +615,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[PagesProjects], ResultWrapper[PagesProjects]),
+ cast_to=cast(Type[Project], ResultWrapper[Project]),
)
async def purge_build_cache(
diff --git a/src/cloudflare/resources/pcaps/pcaps.py b/src/cloudflare/resources/pcaps/pcaps.py
index 2afd4a28fae0..2f0220300359 100644
--- a/src/cloudflare/resources/pcaps/pcaps.py
+++ b/src/cloudflare/resources/pcaps/pcaps.py
@@ -7,7 +7,13 @@
import httpx
-from ...types import PCAPGetResponse, PCAPListResponse, PCAPCreateResponse, pcap_create_params
+from ...types import (
+ FilterParam,
+ PCAPGetResponse,
+ PCAPListResponse,
+ PCAPCreateResponse,
+ pcap_create_params,
+)
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._utils import (
required_args,
@@ -74,7 +80,7 @@ def create(
system: Literal["magic-transit"],
time_limit: float,
type: Literal["simple", "full"],
- filter_v1: pcap_create_params.MagicVisibilityPCAPsRequestSimpleFilterV1 | NotGiven = NOT_GIVEN,
+ filter_v1: FilterParam | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -120,7 +126,7 @@ def create(
time_limit: float,
type: Literal["simple", "full"],
byte_limit: float | NotGiven = NOT_GIVEN,
- filter_v1: pcap_create_params.MagicVisibilityPCAPsRequestFullFilterV1 | NotGiven = NOT_GIVEN,
+ filter_v1: FilterParam | NotGiven = NOT_GIVEN,
packet_limit: float | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -177,7 +183,7 @@ def create(
system: Literal["magic-transit"],
time_limit: float,
type: Literal["simple", "full"],
- filter_v1: pcap_create_params.MagicVisibilityPCAPsRequestSimpleFilterV1 | NotGiven = NOT_GIVEN,
+ filter_v1: FilterParam | NotGiven = NOT_GIVEN,
colo_name: str | NotGiven = NOT_GIVEN,
destination_conf: str | NotGiven = NOT_GIVEN,
byte_limit: float | NotGiven = NOT_GIVEN,
@@ -332,7 +338,7 @@ async def create(
system: Literal["magic-transit"],
time_limit: float,
type: Literal["simple", "full"],
- filter_v1: pcap_create_params.MagicVisibilityPCAPsRequestSimpleFilterV1 | NotGiven = NOT_GIVEN,
+ filter_v1: FilterParam | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -378,7 +384,7 @@ async def create(
time_limit: float,
type: Literal["simple", "full"],
byte_limit: float | NotGiven = NOT_GIVEN,
- filter_v1: pcap_create_params.MagicVisibilityPCAPsRequestFullFilterV1 | NotGiven = NOT_GIVEN,
+ filter_v1: FilterParam | NotGiven = NOT_GIVEN,
packet_limit: float | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -435,7 +441,7 @@ async def create(
system: Literal["magic-transit"],
time_limit: float,
type: Literal["simple", "full"],
- filter_v1: pcap_create_params.MagicVisibilityPCAPsRequestSimpleFilterV1 | NotGiven = NOT_GIVEN,
+ filter_v1: FilterParam | NotGiven = NOT_GIVEN,
colo_name: str | NotGiven = NOT_GIVEN,
destination_conf: str | NotGiven = NOT_GIVEN,
byte_limit: float | NotGiven = NOT_GIVEN,
diff --git a/src/cloudflare/resources/spectrum/analytics/events/bytimes.py b/src/cloudflare/resources/spectrum/analytics/events/bytimes.py
index 860660030df8..3f0f8dce3387 100644
--- a/src/cloudflare/resources/spectrum/analytics/events/bytimes.py
+++ b/src/cloudflare/resources/spectrum/analytics/events/bytimes.py
@@ -26,7 +26,7 @@
make_request_options,
)
from .....types.shared import UnnamedSchemaRef8d6a37a1e4190f86652802244d29525f
-from .....types.spectrum.analytics.events import bytime_get_params
+from .....types.spectrum.analytics.events import DimensionItem, bytime_get_params
__all__ = ["Bytimes", "AsyncBytimes"]
@@ -44,7 +44,7 @@ def get(
self,
zone: str,
*,
- dimensions: List[Literal["event", "appID", "coloName", "ipVersion"]] | NotGiven = NOT_GIVEN,
+ dimensions: List[DimensionItem] | NotGiven = NOT_GIVEN,
filters: str | NotGiven = NOT_GIVEN,
metrics: List[
Literal[
@@ -173,7 +173,7 @@ async def get(
self,
zone: str,
*,
- dimensions: List[Literal["event", "appID", "coloName", "ipVersion"]] | NotGiven = NOT_GIVEN,
+ dimensions: List[DimensionItem] | NotGiven = NOT_GIVEN,
filters: str | NotGiven = NOT_GIVEN,
metrics: List[
Literal[
diff --git a/src/cloudflare/resources/spectrum/analytics/events/summaries.py b/src/cloudflare/resources/spectrum/analytics/events/summaries.py
index a5b71faa07be..f06c7fb1a9da 100644
--- a/src/cloudflare/resources/spectrum/analytics/events/summaries.py
+++ b/src/cloudflare/resources/spectrum/analytics/events/summaries.py
@@ -26,7 +26,7 @@
make_request_options,
)
from .....types.shared import UnnamedSchemaRef8d6a37a1e4190f86652802244d29525f
-from .....types.spectrum.analytics.events import summary_get_params
+from .....types.spectrum.analytics.events import DimensionItem, summary_get_params
__all__ = ["Summaries", "AsyncSummaries"]
@@ -44,7 +44,7 @@ def get(
self,
zone: str,
*,
- dimensions: List[Literal["event", "appID", "coloName", "ipVersion"]] | NotGiven = NOT_GIVEN,
+ dimensions: List[DimensionItem] | NotGiven = NOT_GIVEN,
filters: str | NotGiven = NOT_GIVEN,
metrics: List[
Literal[
@@ -168,7 +168,7 @@ async def get(
self,
zone: str,
*,
- dimensions: List[Literal["event", "appID", "coloName", "ipVersion"]] | NotGiven = NOT_GIVEN,
+ dimensions: List[DimensionItem] | NotGiven = NOT_GIVEN,
filters: str | NotGiven = NOT_GIVEN,
metrics: List[
Literal[
diff --git a/src/cloudflare/resources/spectrum/apps.py b/src/cloudflare/resources/spectrum/apps.py
index 43ea1d377055..811415fd0ad7 100644
--- a/src/cloudflare/resources/spectrum/apps.py
+++ b/src/cloudflare/resources/spectrum/apps.py
@@ -2,11 +2,17 @@
from __future__ import annotations
-from typing import Any, Type, Union, Optional, cast
+from typing import Any, Type, Optional, cast
from typing_extensions import Literal
import httpx
+from ...types import (
+ DNSParam,
+ EdgeIPsParam,
+ OriginDNSParam,
+ OriginPortParam,
+)
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._utils import (
maybe_transform,
@@ -53,12 +59,12 @@ def create(
self,
zone: str,
*,
- dns: app_create_params.DNS,
- origin_dns: app_create_params.OriginDNS,
- origin_port: Union[int, str],
+ dns: DNSParam,
+ origin_dns: OriginDNSParam,
+ origin_port: OriginPortParam,
protocol: str,
argo_smart_routing: bool | NotGiven = NOT_GIVEN,
- edge_ips: app_create_params.EdgeIPs | NotGiven = NOT_GIVEN,
+ edge_ips: EdgeIPsParam | NotGiven = NOT_GIVEN,
ip_firewall: bool | NotGiven = NOT_GIVEN,
proxy_protocol: Literal["off", "v1", "v2", "simple"] | NotGiven = NOT_GIVEN,
tls: Literal["off", "flexible", "full", "strict"] | NotGiven = NOT_GIVEN,
@@ -153,12 +159,12 @@ def update(
app_id: str,
*,
zone: str,
- dns: app_update_params.DNS,
- origin_dns: app_update_params.OriginDNS,
- origin_port: Union[int, str],
+ dns: DNSParam,
+ origin_dns: OriginDNSParam,
+ origin_port: OriginPortParam,
protocol: str,
argo_smart_routing: bool | NotGiven = NOT_GIVEN,
- edge_ips: app_update_params.EdgeIPs | NotGiven = NOT_GIVEN,
+ edge_ips: EdgeIPsParam | NotGiven = NOT_GIVEN,
ip_firewall: bool | NotGiven = NOT_GIVEN,
proxy_protocol: Literal["off", "v1", "v2", "simple"] | NotGiven = NOT_GIVEN,
tls: Literal["off", "flexible", "full", "strict"] | NotGiven = NOT_GIVEN,
@@ -423,12 +429,12 @@ async def create(
self,
zone: str,
*,
- dns: app_create_params.DNS,
- origin_dns: app_create_params.OriginDNS,
- origin_port: Union[int, str],
+ dns: DNSParam,
+ origin_dns: OriginDNSParam,
+ origin_port: OriginPortParam,
protocol: str,
argo_smart_routing: bool | NotGiven = NOT_GIVEN,
- edge_ips: app_create_params.EdgeIPs | NotGiven = NOT_GIVEN,
+ edge_ips: EdgeIPsParam | NotGiven = NOT_GIVEN,
ip_firewall: bool | NotGiven = NOT_GIVEN,
proxy_protocol: Literal["off", "v1", "v2", "simple"] | NotGiven = NOT_GIVEN,
tls: Literal["off", "flexible", "full", "strict"] | NotGiven = NOT_GIVEN,
@@ -523,12 +529,12 @@ async def update(
app_id: str,
*,
zone: str,
- dns: app_update_params.DNS,
- origin_dns: app_update_params.OriginDNS,
- origin_port: Union[int, str],
+ dns: DNSParam,
+ origin_dns: OriginDNSParam,
+ origin_port: OriginPortParam,
protocol: str,
argo_smart_routing: bool | NotGiven = NOT_GIVEN,
- edge_ips: app_update_params.EdgeIPs | NotGiven = NOT_GIVEN,
+ edge_ips: EdgeIPsParam | NotGiven = NOT_GIVEN,
ip_firewall: bool | NotGiven = NOT_GIVEN,
proxy_protocol: Literal["off", "v1", "v2", "simple"] | NotGiven = NOT_GIVEN,
tls: Literal["off", "flexible", "full", "strict"] | NotGiven = NOT_GIVEN,
diff --git a/src/cloudflare/resources/ssl/certificate_packs/order.py b/src/cloudflare/resources/ssl/certificate_packs/order.py
index cf95650eeae0..0631601c4f2b 100644
--- a/src/cloudflare/resources/ssl/certificate_packs/order.py
+++ b/src/cloudflare/resources/ssl/certificate_packs/order.py
@@ -24,7 +24,7 @@
from ...._base_client import (
make_request_options,
)
-from ....types.ssl.certificate_packs import OrderCreateResponse, order_create_params
+from ....types.ssl.certificate_packs import HostItem, OrderCreateResponse, order_create_params
__all__ = ["Order", "AsyncOrder"]
@@ -43,7 +43,7 @@ def create(
*,
zone_id: str,
certificate_authority: Literal["google", "lets_encrypt"],
- hosts: List[str],
+ hosts: List[HostItem],
type: Literal["advanced"],
validation_method: Literal["txt", "http", "email"],
validity_days: Literal[14, 30, 90, 365],
@@ -125,7 +125,7 @@ async def create(
*,
zone_id: str,
certificate_authority: Literal["google", "lets_encrypt"],
- hosts: List[str],
+ hosts: List[HostItem],
type: Literal["advanced"],
validation_method: Literal["txt", "http", "email"],
validity_days: Literal[14, 30, 90, 365],
diff --git a/src/cloudflare/resources/stream/clip.py b/src/cloudflare/resources/stream/clip.py
index 25449822e06f..ab85d544cfa7 100644
--- a/src/cloudflare/resources/stream/clip.py
+++ b/src/cloudflare/resources/stream/clip.py
@@ -23,7 +23,7 @@
from ..._base_client import (
make_request_options,
)
-from ...types.stream import StreamClipping, clip_create_params
+from ...types.stream import StreamClipping, AllowedOriginsItem, clip_create_params
__all__ = ["Clip", "AsyncClip"]
@@ -44,7 +44,7 @@ def create(
clipped_from_video_uid: str,
end_time_seconds: int,
start_time_seconds: int,
- allowed_origins: List[str] | NotGiven = NOT_GIVEN,
+ allowed_origins: List[AllowedOriginsItem] | NotGiven = NOT_GIVEN,
creator: str | NotGiven = NOT_GIVEN,
max_duration_seconds: int | NotGiven = NOT_GIVEN,
require_signed_urls: bool | NotGiven = NOT_GIVEN,
@@ -141,7 +141,7 @@ async def create(
clipped_from_video_uid: str,
end_time_seconds: int,
start_time_seconds: int,
- allowed_origins: List[str] | NotGiven = NOT_GIVEN,
+ allowed_origins: List[AllowedOriginsItem] | NotGiven = NOT_GIVEN,
creator: str | NotGiven = NOT_GIVEN,
max_duration_seconds: int | NotGiven = NOT_GIVEN,
require_signed_urls: bool | NotGiven = NOT_GIVEN,
diff --git a/src/cloudflare/resources/stream/copy.py b/src/cloudflare/resources/stream/copy.py
index 753e294a2685..c94eb3e7f751 100644
--- a/src/cloudflare/resources/stream/copy.py
+++ b/src/cloudflare/resources/stream/copy.py
@@ -25,7 +25,7 @@
from ..._base_client import (
make_request_options,
)
-from ...types.stream import copy_create_params
+from ...types.stream import AllowedOriginsItem, copy_create_params
__all__ = ["Copy", "AsyncCopy"]
@@ -44,7 +44,7 @@ def create(
*,
account_id: str,
url: str,
- allowed_origins: List[str] | NotGiven = NOT_GIVEN,
+ allowed_origins: List[AllowedOriginsItem] | NotGiven = NOT_GIVEN,
creator: str | NotGiven = NOT_GIVEN,
meta: object | NotGiven = NOT_GIVEN,
require_signed_urls: bool | NotGiven = NOT_GIVEN,
@@ -139,7 +139,7 @@ async def create(
*,
account_id: str,
url: str,
- allowed_origins: List[str] | NotGiven = NOT_GIVEN,
+ allowed_origins: List[AllowedOriginsItem] | NotGiven = NOT_GIVEN,
creator: str | NotGiven = NOT_GIVEN,
meta: object | NotGiven = NOT_GIVEN,
require_signed_urls: bool | NotGiven = NOT_GIVEN,
diff --git a/src/cloudflare/resources/stream/direct_upload.py b/src/cloudflare/resources/stream/direct_upload.py
index bc679e10de63..db7d2e013a95 100644
--- a/src/cloudflare/resources/stream/direct_upload.py
+++ b/src/cloudflare/resources/stream/direct_upload.py
@@ -24,7 +24,7 @@
from ..._base_client import (
make_request_options,
)
-from ...types.stream import DirectUploadCreateResponse, direct_upload_create_params
+from ...types.stream import AllowedOriginsItem, DirectUploadCreateResponse, direct_upload_create_params
__all__ = ["DirectUpload", "AsyncDirectUpload"]
@@ -43,7 +43,7 @@ def create(
*,
account_id: str,
max_duration_seconds: int,
- allowed_origins: List[str] | NotGiven = NOT_GIVEN,
+ allowed_origins: List[AllowedOriginsItem] | NotGiven = NOT_GIVEN,
creator: str | NotGiven = NOT_GIVEN,
expiry: Union[str, datetime] | NotGiven = NOT_GIVEN,
meta: object | NotGiven = NOT_GIVEN,
@@ -143,7 +143,7 @@ async def create(
*,
account_id: str,
max_duration_seconds: int,
- allowed_origins: List[str] | NotGiven = NOT_GIVEN,
+ allowed_origins: List[AllowedOriginsItem] | NotGiven = NOT_GIVEN,
creator: str | NotGiven = NOT_GIVEN,
expiry: Union[str, datetime] | NotGiven = NOT_GIVEN,
meta: object | NotGiven = NOT_GIVEN,
diff --git a/src/cloudflare/resources/workers/scripts/content.py b/src/cloudflare/resources/workers/scripts/content.py
index d3dc5be982cf..d104e21090a6 100644
--- a/src/cloudflare/resources/workers/scripts/content.py
+++ b/src/cloudflare/resources/workers/scripts/content.py
@@ -26,7 +26,7 @@
from ...._base_client import (
make_request_options,
)
-from ....types.workers import WorkersScript
+from ....types.workers import Script
from ....types.workers.scripts import content_update_params
__all__ = ["Content", "AsyncContent"]
@@ -54,7 +54,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WorkersScript:
+ ) -> Script:
"""
Put script content without touching config or metadata
@@ -106,7 +106,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[WorkersScript], ResultWrapper[WorkersScript]),
+ cast_to=cast(Type[Script], ResultWrapper[Script]),
)
@@ -132,7 +132,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WorkersScript:
+ ) -> Script:
"""
Put script content without touching config or metadata
@@ -184,7 +184,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[WorkersScript], ResultWrapper[WorkersScript]),
+ cast_to=cast(Type[Script], ResultWrapper[Script]),
)
diff --git a/src/cloudflare/resources/workers/scripts/scripts.py b/src/cloudflare/resources/workers/scripts/scripts.py
index 8541229f8231..f0aacc83a14b 100644
--- a/src/cloudflare/resources/workers/scripts/scripts.py
+++ b/src/cloudflare/resources/workers/scripts/scripts.py
@@ -106,7 +106,7 @@
AsyncPaginator,
make_request_options,
)
-from ....types.workers import WorkersScript, script_delete_params, script_update_params
+from ....types.workers import Script, script_delete_params, script_update_params
from .versions.versions import Versions, AsyncVersions
__all__ = ["Scripts", "AsyncScripts"]
@@ -172,7 +172,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WorkersScript:
+ ) -> Script:
"""
Upload a worker module.
@@ -215,7 +215,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WorkersScript:
+ ) -> Script:
"""
Upload a worker module.
@@ -257,7 +257,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WorkersScript:
+ ) -> Script:
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not script_name:
@@ -280,7 +280,7 @@ def update(
query=maybe_transform({"rollback_to": rollback_to}, script_update_params.ScriptUpdateParams),
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[WorkersScript], ResultWrapper[WorkersScript]),
+ cast_to=cast(Type[Script], ResultWrapper[Script]),
)
def list(
@@ -293,7 +293,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SyncSinglePage[WorkersScript]:
+ ) -> SyncSinglePage[Script]:
"""
Fetch a list of uploaded workers.
@@ -312,11 +312,11 @@ def list(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._get_api_list(
f"/accounts/{account_id}/workers/scripts",
- page=SyncSinglePage[WorkersScript],
+ page=SyncSinglePage[Script],
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- model=WorkersScript,
+ model=Script,
)
def delete(
@@ -476,7 +476,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WorkersScript:
+ ) -> Script:
"""
Upload a worker module.
@@ -519,7 +519,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WorkersScript:
+ ) -> Script:
"""
Upload a worker module.
@@ -561,7 +561,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WorkersScript:
+ ) -> Script:
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not script_name:
@@ -586,7 +586,7 @@ async def update(
),
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[WorkersScript], ResultWrapper[WorkersScript]),
+ cast_to=cast(Type[Script], ResultWrapper[Script]),
)
def list(
@@ -599,7 +599,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> AsyncPaginator[WorkersScript, AsyncSinglePage[WorkersScript]]:
+ ) -> AsyncPaginator[Script, AsyncSinglePage[Script]]:
"""
Fetch a list of uploaded workers.
@@ -618,11 +618,11 @@ def list(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._get_api_list(
f"/accounts/{account_id}/workers/scripts",
- page=AsyncSinglePage[WorkersScript],
+ page=AsyncSinglePage[Script],
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- model=WorkersScript,
+ model=Script,
)
async def delete(
diff --git a/src/cloudflare/resources/workers/scripts/settings.py b/src/cloudflare/resources/workers/scripts/settings.py
index ab9ae6ddb17b..60858c133a90 100644
--- a/src/cloudflare/resources/workers/scripts/settings.py
+++ b/src/cloudflare/resources/workers/scripts/settings.py
@@ -23,7 +23,8 @@
from ...._base_client import (
make_request_options,
)
-from ....types.workers.scripts import SettingGetResponse, SettingEditResponse, setting_edit_params
+from ....types.workers import SettingsItem
+from ....types.workers.scripts import ConsumerScriptParam, setting_edit_params
__all__ = ["Settings", "AsyncSettings"]
@@ -43,14 +44,14 @@ def edit(
*,
account_id: str,
logpush: bool | NotGiven = NOT_GIVEN,
- tail_consumers: Iterable[setting_edit_params.TailConsumer] | NotGiven = NOT_GIVEN,
+ tail_consumers: Iterable[ConsumerScriptParam] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SettingEditResponse:
+ ) -> SettingsItem:
"""
Patch script-level settings when using
[Worker Versions](https://developers.cloudflare.com/api/operations/worker-versions-list-versions).
@@ -93,7 +94,7 @@ def edit(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[SettingEditResponse], ResultWrapper[SettingEditResponse]),
+ cast_to=cast(Type[SettingsItem], ResultWrapper[SettingsItem]),
)
def get(
@@ -107,7 +108,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SettingGetResponse:
+ ) -> SettingsItem:
"""
Get script-level settings when using
[Worker Versions](https://developers.cloudflare.com/api/operations/worker-versions-list-versions).
@@ -139,7 +140,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[SettingGetResponse], ResultWrapper[SettingGetResponse]),
+ cast_to=cast(Type[SettingsItem], ResultWrapper[SettingsItem]),
)
@@ -158,14 +159,14 @@ async def edit(
*,
account_id: str,
logpush: bool | NotGiven = NOT_GIVEN,
- tail_consumers: Iterable[setting_edit_params.TailConsumer] | NotGiven = NOT_GIVEN,
+ tail_consumers: Iterable[ConsumerScriptParam] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SettingEditResponse:
+ ) -> SettingsItem:
"""
Patch script-level settings when using
[Worker Versions](https://developers.cloudflare.com/api/operations/worker-versions-list-versions).
@@ -208,7 +209,7 @@ async def edit(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[SettingEditResponse], ResultWrapper[SettingEditResponse]),
+ cast_to=cast(Type[SettingsItem], ResultWrapper[SettingsItem]),
)
async def get(
@@ -222,7 +223,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SettingGetResponse:
+ ) -> SettingsItem:
"""
Get script-level settings when using
[Worker Versions](https://developers.cloudflare.com/api/operations/worker-versions-list-versions).
@@ -254,7 +255,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[SettingGetResponse], ResultWrapper[SettingGetResponse]),
+ cast_to=cast(Type[SettingsItem], ResultWrapper[SettingsItem]),
)
diff --git a/src/cloudflare/resources/workers/services/environments/content.py b/src/cloudflare/resources/workers/services/environments/content.py
index f245ad77133c..bfbbdd5204a4 100644
--- a/src/cloudflare/resources/workers/services/environments/content.py
+++ b/src/cloudflare/resources/workers/services/environments/content.py
@@ -34,7 +34,7 @@
from ....._base_client import (
make_request_options,
)
-from .....types.workers import WorkersScript
+from .....types.workers import Script
from .....types.workers.services.environments import content_update_params
__all__ = ["Content", "AsyncContent"]
@@ -63,7 +63,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WorkersScript:
+ ) -> Script:
"""
Put script content from a worker with an environment
@@ -119,7 +119,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[WorkersScript], ResultWrapper[WorkersScript]),
+ cast_to=cast(Type[Script], ResultWrapper[Script]),
)
def get(
@@ -192,7 +192,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WorkersScript:
+ ) -> Script:
"""
Put script content from a worker with an environment
@@ -248,7 +248,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[WorkersScript], ResultWrapper[WorkersScript]),
+ cast_to=cast(Type[Script], ResultWrapper[Script]),
)
async def get(
diff --git a/src/cloudflare/resources/workers/services/environments/settings.py b/src/cloudflare/resources/workers/services/environments/settings.py
index 67b5845501ed..b529f86c4f0a 100644
--- a/src/cloudflare/resources/workers/services/environments/settings.py
+++ b/src/cloudflare/resources/workers/services/environments/settings.py
@@ -25,7 +25,8 @@
from ....._base_client import (
make_request_options,
)
-from .....types.workers.services.environments import SettingGetResponse, SettingEditResponse, setting_edit_params
+from .....types.workers import SettingsItem, SettingsItemParam
+from .....types.workers.services.environments import setting_edit_params
__all__ = ["Settings", "AsyncSettings"]
@@ -47,7 +48,7 @@ def edit(
service_name: str,
errors: Iterable[shared_params.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72],
messages: Iterable[shared_params.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72],
- result: setting_edit_params.Result,
+ result: SettingsItemParam,
success: Literal[True],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -55,7 +56,7 @@ def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SettingEditResponse:
+ ) -> SettingsItem:
"""
Patch script metadata, such as bindings
@@ -100,7 +101,7 @@ def edit(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[SettingEditResponse], ResultWrapper[SettingEditResponse]),
+ cast_to=cast(Type[SettingsItem], ResultWrapper[SettingsItem]),
)
def get(
@@ -115,7 +116,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SettingGetResponse:
+ ) -> SettingsItem:
"""
Get script settings from a worker with an environment
@@ -149,7 +150,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[SettingGetResponse], ResultWrapper[SettingGetResponse]),
+ cast_to=cast(Type[SettingsItem], ResultWrapper[SettingsItem]),
)
@@ -170,7 +171,7 @@ async def edit(
service_name: str,
errors: Iterable[shared_params.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72],
messages: Iterable[shared_params.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72],
- result: setting_edit_params.Result,
+ result: SettingsItemParam,
success: Literal[True],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -178,7 +179,7 @@ async def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SettingEditResponse:
+ ) -> SettingsItem:
"""
Patch script metadata, such as bindings
@@ -223,7 +224,7 @@ async def edit(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[SettingEditResponse], ResultWrapper[SettingEditResponse]),
+ cast_to=cast(Type[SettingsItem], ResultWrapper[SettingsItem]),
)
async def get(
@@ -238,7 +239,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SettingGetResponse:
+ ) -> SettingsItem:
"""
Get script settings from a worker with an environment
@@ -272,7 +273,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[SettingGetResponse], ResultWrapper[SettingGetResponse]),
+ cast_to=cast(Type[SettingsItem], ResultWrapper[SettingsItem]),
)
diff --git a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/bindings.py b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/bindings.py
index 02756b35d560..3dac5a7055d8 100644
--- a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/bindings.py
+++ b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/bindings.py
@@ -6,6 +6,7 @@
import httpx
+from ......types import Binding
from ......_types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ......_compat import cached_property
from ......_resource import SyncAPIResource, AsyncAPIResource
@@ -18,7 +19,6 @@
from ......_base_client import (
make_request_options,
)
-from ......types.workers_for_platforms.dispatch.namespaces.scripts import BindingGetResponse
__all__ = ["Bindings", "AsyncBindings"]
@@ -44,7 +44,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> BindingGetResponse:
+ ) -> Binding:
"""
Fetch script bindings from a script uploaded to a Workers for Platforms
namespace.
@@ -71,15 +71,13 @@ def get(
if not script_name:
raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}")
return cast(
- BindingGetResponse,
+ Binding,
self._get(
f"/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/bindings",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=cast(
- Any, BindingGetResponse
- ), # Union types cannot be passed in as arguments in the type system
+ cast_to=cast(Any, Binding), # Union types cannot be passed in as arguments in the type system
),
)
@@ -105,7 +103,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> BindingGetResponse:
+ ) -> Binding:
"""
Fetch script bindings from a script uploaded to a Workers for Platforms
namespace.
@@ -132,15 +130,13 @@ async def get(
if not script_name:
raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}")
return cast(
- BindingGetResponse,
+ Binding,
await self._get(
f"/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/bindings",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=cast(
- Any, BindingGetResponse
- ), # Union types cannot be passed in as arguments in the type system
+ cast_to=cast(Any, Binding), # Union types cannot be passed in as arguments in the type system
),
)
diff --git a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content.py b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content.py
index 829146a78d9b..51702f522cd3 100644
--- a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content.py
+++ b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content.py
@@ -34,7 +34,7 @@
from ......_base_client import (
make_request_options,
)
-from ......types.workers import WorkersScript
+from ......types.workers import Script
from ......types.workers_for_platforms.dispatch.namespaces.scripts import content_update_params
__all__ = ["Content", "AsyncContent"]
@@ -63,7 +63,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WorkersScript:
+ ) -> Script:
"""
Put script content for a script uploaded to a Workers for Platforms namespace.
@@ -119,7 +119,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[WorkersScript], ResultWrapper[WorkersScript]),
+ cast_to=cast(Type[Script], ResultWrapper[Script]),
)
def get(
@@ -193,7 +193,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WorkersScript:
+ ) -> Script:
"""
Put script content for a script uploaded to a Workers for Platforms namespace.
@@ -249,7 +249,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[WorkersScript], ResultWrapper[WorkersScript]),
+ cast_to=cast(Type[Script], ResultWrapper[Script]),
)
async def get(
diff --git a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/scripts.py b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/scripts.py
index 989245d09574..b2155fc68fec 100644
--- a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/scripts.py
+++ b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/scripts.py
@@ -48,7 +48,7 @@
from ......_base_client import (
make_request_options,
)
-from ......types.workers import WorkersScript
+from ......types.workers import Script
from ......types.workers_for_platforms.dispatch.namespaces import (
WorkersForPlatformsNamespaceScript,
script_delete_params,
@@ -94,7 +94,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WorkersScript:
+ ) -> Script:
"""
Upload a worker module to a Workers for Platforms namespace.
@@ -135,7 +135,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WorkersScript:
+ ) -> Script:
"""
Upload a worker module to a Workers for Platforms namespace.
@@ -175,7 +175,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WorkersScript:
+ ) -> Script:
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not dispatch_namespace:
@@ -199,7 +199,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[WorkersScript], ResultWrapper[WorkersScript]),
+ cast_to=cast(Type[Script], ResultWrapper[Script]),
)
def delete(
@@ -347,7 +347,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WorkersScript:
+ ) -> Script:
"""
Upload a worker module to a Workers for Platforms namespace.
@@ -388,7 +388,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WorkersScript:
+ ) -> Script:
"""
Upload a worker module to a Workers for Platforms namespace.
@@ -428,7 +428,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WorkersScript:
+ ) -> Script:
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not dispatch_namespace:
@@ -452,7 +452,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[WorkersScript], ResultWrapper[WorkersScript]),
+ cast_to=cast(Type[Script], ResultWrapper[Script]),
)
async def delete(
diff --git a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/settings.py b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/settings.py
index 3475078e2847..9fa6a59d8c07 100644
--- a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/settings.py
+++ b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/settings.py
@@ -25,11 +25,8 @@
from ......_base_client import (
make_request_options,
)
-from ......types.workers_for_platforms.dispatch.namespaces.scripts import (
- SettingGetResponse,
- SettingEditResponse,
- setting_edit_params,
-)
+from ......types.workers import SettingsItem, SettingsItemParam
+from ......types.workers_for_platforms.dispatch.namespaces.scripts import setting_edit_params
__all__ = ["Settings", "AsyncSettings"]
@@ -51,7 +48,7 @@ def edit(
dispatch_namespace: str,
errors: Iterable[shared_params.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72],
messages: Iterable[shared_params.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72],
- result: setting_edit_params.Result,
+ result: SettingsItemParam,
success: Literal[True],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -59,7 +56,7 @@ def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SettingEditResponse:
+ ) -> SettingsItem:
"""
Patch script metadata, such as bindings
@@ -104,7 +101,7 @@ def edit(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[SettingEditResponse], ResultWrapper[SettingEditResponse]),
+ cast_to=cast(Type[SettingsItem], ResultWrapper[SettingsItem]),
)
def get(
@@ -119,7 +116,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SettingGetResponse:
+ ) -> SettingsItem:
"""
Get script settings from a script uploaded to a Workers for Platforms namespace.
@@ -153,7 +150,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[SettingGetResponse], ResultWrapper[SettingGetResponse]),
+ cast_to=cast(Type[SettingsItem], ResultWrapper[SettingsItem]),
)
@@ -174,7 +171,7 @@ async def edit(
dispatch_namespace: str,
errors: Iterable[shared_params.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72],
messages: Iterable[shared_params.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72],
- result: setting_edit_params.Result,
+ result: SettingsItemParam,
success: Literal[True],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -182,7 +179,7 @@ async def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SettingEditResponse:
+ ) -> SettingsItem:
"""
Patch script metadata, such as bindings
@@ -227,7 +224,7 @@ async def edit(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[SettingEditResponse], ResultWrapper[SettingEditResponse]),
+ cast_to=cast(Type[SettingsItem], ResultWrapper[SettingsItem]),
)
async def get(
@@ -242,7 +239,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SettingGetResponse:
+ ) -> SettingsItem:
"""
Get script settings from a script uploaded to a Workers for Platforms namespace.
@@ -276,7 +273,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[SettingGetResponse], ResultWrapper[SettingGetResponse]),
+ cast_to=cast(Type[SettingsItem], ResultWrapper[SettingsItem]),
)
diff --git a/src/cloudflare/resources/zero_trust/dlp/datasets/datasets.py b/src/cloudflare/resources/zero_trust/dlp/datasets/datasets.py
index edb57507ffe1..227b0c4ecf48 100644
--- a/src/cloudflare/resources/zero_trust/dlp/datasets/datasets.py
+++ b/src/cloudflare/resources/zero_trust/dlp/datasets/datasets.py
@@ -33,7 +33,7 @@
AsyncPaginator,
make_request_options,
)
-from .....types.zero_trust.dlp import DLPDataset, DLPDatasetCreation, dataset_create_params, dataset_update_params
+from .....types.zero_trust.dlp import Dataset, DatasetCreation, dataset_create_params, dataset_update_params
__all__ = ["Datasets", "AsyncDatasets"]
@@ -64,7 +64,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[DLPDatasetCreation]:
+ ) -> Optional[DatasetCreation]:
"""
Create a new dataset.
@@ -101,7 +101,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[DLPDatasetCreation]], ResultWrapper[DLPDatasetCreation]),
+ cast_to=cast(Type[Optional[DatasetCreation]], ResultWrapper[DatasetCreation]),
)
def update(
@@ -117,7 +117,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[DLPDataset]:
+ ) -> Optional[Dataset]:
"""
Update details about a dataset.
@@ -150,7 +150,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[DLPDataset]], ResultWrapper[DLPDataset]),
+ cast_to=cast(Type[Optional[Dataset]], ResultWrapper[Dataset]),
)
def list(
@@ -163,7 +163,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SyncSinglePage[DLPDataset]:
+ ) -> SyncSinglePage[Dataset]:
"""
Fetch all datasets with information about available versions.
@@ -180,11 +180,11 @@ def list(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._get_api_list(
f"/accounts/{account_id}/dlp/datasets",
- page=SyncSinglePage[DLPDataset],
+ page=SyncSinglePage[Dataset],
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- model=DLPDataset,
+ model=Dataset,
)
def delete(
@@ -237,7 +237,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[DLPDataset]:
+ ) -> Optional[Dataset]:
"""
Fetch a specific dataset with information about available versions.
@@ -263,7 +263,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[DLPDataset]], ResultWrapper[DLPDataset]),
+ cast_to=cast(Type[Optional[Dataset]], ResultWrapper[Dataset]),
)
@@ -293,7 +293,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[DLPDatasetCreation]:
+ ) -> Optional[DatasetCreation]:
"""
Create a new dataset.
@@ -330,7 +330,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[DLPDatasetCreation]], ResultWrapper[DLPDatasetCreation]),
+ cast_to=cast(Type[Optional[DatasetCreation]], ResultWrapper[DatasetCreation]),
)
async def update(
@@ -346,7 +346,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[DLPDataset]:
+ ) -> Optional[Dataset]:
"""
Update details about a dataset.
@@ -379,7 +379,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[DLPDataset]], ResultWrapper[DLPDataset]),
+ cast_to=cast(Type[Optional[Dataset]], ResultWrapper[Dataset]),
)
def list(
@@ -392,7 +392,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> AsyncPaginator[DLPDataset, AsyncSinglePage[DLPDataset]]:
+ ) -> AsyncPaginator[Dataset, AsyncSinglePage[Dataset]]:
"""
Fetch all datasets with information about available versions.
@@ -409,11 +409,11 @@ def list(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._get_api_list(
f"/accounts/{account_id}/dlp/datasets",
- page=AsyncSinglePage[DLPDataset],
+ page=AsyncSinglePage[Dataset],
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- model=DLPDataset,
+ model=Dataset,
)
async def delete(
@@ -466,7 +466,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[DLPDataset]:
+ ) -> Optional[Dataset]:
"""
Fetch a specific dataset with information about available versions.
@@ -492,7 +492,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[DLPDataset]], ResultWrapper[DLPDataset]),
+ cast_to=cast(Type[Optional[Dataset]], ResultWrapper[Dataset]),
)
diff --git a/src/cloudflare/resources/zero_trust/dlp/datasets/upload.py b/src/cloudflare/resources/zero_trust/dlp/datasets/upload.py
index e1b056229ffb..45733717b14c 100644
--- a/src/cloudflare/resources/zero_trust/dlp/datasets/upload.py
+++ b/src/cloudflare/resources/zero_trust/dlp/datasets/upload.py
@@ -23,8 +23,8 @@
from ....._base_client import (
make_request_options,
)
-from .....types.zero_trust.dlp import DLPDataset
-from .....types.zero_trust.dlp.datasets import DLPDatasetNewVersion, upload_edit_params
+from .....types.zero_trust.dlp import Dataset
+from .....types.zero_trust.dlp.datasets import NewVersion, upload_edit_params
__all__ = ["Upload", "AsyncUpload"]
@@ -49,7 +49,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[DLPDatasetNewVersion]:
+ ) -> Optional[NewVersion]:
"""
Prepare to upload a new version of a dataset.
@@ -75,7 +75,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[DLPDatasetNewVersion]], ResultWrapper[DLPDatasetNewVersion]),
+ cast_to=cast(Type[Optional[NewVersion]], ResultWrapper[NewVersion]),
)
def edit(
@@ -91,7 +91,7 @@ def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[DLPDataset]:
+ ) -> Optional[Dataset]:
"""
Upload a new version of a dataset.
@@ -118,7 +118,7 @@ def edit(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[DLPDataset]], ResultWrapper[DLPDataset]),
+ cast_to=cast(Type[Optional[Dataset]], ResultWrapper[Dataset]),
)
@@ -142,7 +142,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[DLPDatasetNewVersion]:
+ ) -> Optional[NewVersion]:
"""
Prepare to upload a new version of a dataset.
@@ -168,7 +168,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[DLPDatasetNewVersion]], ResultWrapper[DLPDatasetNewVersion]),
+ cast_to=cast(Type[Optional[NewVersion]], ResultWrapper[NewVersion]),
)
async def edit(
@@ -184,7 +184,7 @@ async def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[DLPDataset]:
+ ) -> Optional[Dataset]:
"""
Upload a new version of a dataset.
@@ -211,7 +211,7 @@ async def edit(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[DLPDataset]], ResultWrapper[DLPDataset]),
+ cast_to=cast(Type[Optional[Dataset]], ResultWrapper[Dataset]),
)
diff --git a/src/cloudflare/resources/zero_trust/tunnels/tunnels.py b/src/cloudflare/resources/zero_trust/tunnels/tunnels.py
index c460b4934d7a..ee0452b2c897 100644
--- a/src/cloudflare/resources/zero_trust/tunnels/tunnels.py
+++ b/src/cloudflare/resources/zero_trust/tunnels/tunnels.py
@@ -68,7 +68,7 @@
)
from ....types.shared import UnnamedSchemaRef413ab4522f0bb93f63444799121fe2f8
from ....types.zero_trust import (
- TunnelArgoTunnel,
+ Tunnel,
tunnel_edit_params,
tunnel_list_params,
tunnel_create_params,
@@ -119,7 +119,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> TunnelArgoTunnel:
+ ) -> Tunnel:
"""
Creates a new Argo Tunnel in an account.
@@ -157,7 +157,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[TunnelArgoTunnel], ResultWrapper[TunnelArgoTunnel]),
+ cast_to=cast(Type[Tunnel], ResultWrapper[Tunnel]),
)
def list(
@@ -256,7 +256,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> TunnelArgoTunnel:
+ ) -> Tunnel:
"""
Deletes an Argo Tunnel from an account.
@@ -287,7 +287,7 @@ def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[TunnelArgoTunnel], ResultWrapper[TunnelArgoTunnel]),
+ cast_to=cast(Type[Tunnel], ResultWrapper[Tunnel]),
)
def edit(
@@ -364,7 +364,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> TunnelArgoTunnel:
+ ) -> Tunnel:
"""
Fetches a single Argo Tunnel.
@@ -394,7 +394,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[TunnelArgoTunnel], ResultWrapper[TunnelArgoTunnel]),
+ cast_to=cast(Type[Tunnel], ResultWrapper[Tunnel]),
)
@@ -439,7 +439,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> TunnelArgoTunnel:
+ ) -> Tunnel:
"""
Creates a new Argo Tunnel in an account.
@@ -477,7 +477,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[TunnelArgoTunnel], ResultWrapper[TunnelArgoTunnel]),
+ cast_to=cast(Type[Tunnel], ResultWrapper[Tunnel]),
)
def list(
@@ -579,7 +579,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> TunnelArgoTunnel:
+ ) -> Tunnel:
"""
Deletes an Argo Tunnel from an account.
@@ -610,7 +610,7 @@ async def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[TunnelArgoTunnel], ResultWrapper[TunnelArgoTunnel]),
+ cast_to=cast(Type[Tunnel], ResultWrapper[Tunnel]),
)
async def edit(
@@ -687,7 +687,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> TunnelArgoTunnel:
+ ) -> Tunnel:
"""
Fetches a single Argo Tunnel.
@@ -717,7 +717,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[TunnelArgoTunnel], ResultWrapper[TunnelArgoTunnel]),
+ cast_to=cast(Type[Tunnel], ResultWrapper[Tunnel]),
)
diff --git a/src/cloudflare/types/__init__.py b/src/cloudflare/types/__init__.py
index f56685f4e615..e43ad70ffddc 100644
--- a/src/cloudflare/types/__init__.py
+++ b/src/cloudflare/types/__init__.py
@@ -2,10 +2,14 @@
from __future__ import annotations
+from .dns import DNS as DNS
from .ips import IPs as IPs
from .ssl import SSL as SSL
+from .pcap import PCAP as PCAP
from .zone import Zone as Zone
+from .action import Action as Action
from .dnssec import DNSSEC as DNSSEC
+from .filter import Filter as Filter
from .header import Header as Header
from .origin import Origin as Origin
from .shared import (
@@ -36,53 +40,83 @@
UnnamedSchemaRefEe1e79edcb234d14c4dd266880f2fd24 as UnnamedSchemaRefEe1e79edcb234d14c4dd266880f2fd24,
UnnamedSchemaRefFb1dc8bb871d835b75bd0c2f50bd8572 as UnnamedSchemaRefFb1dc8bb871d835b75bd0c2f50bd8572,
)
+from .tunnel import Tunnel as Tunnel
from .account import Account as Account
+from .binding import Binding as Binding
from .ruleset import Ruleset as Ruleset
from .snippet import Snippet as Snippet
+from .edge_ips import EdgeIPs as EdgeIPs
from .log_rule import LogRule as LogRule
from .calls_app import CallsApp as CallsApp
+from .component import Component as Component
+from .dns_param import DNSParam as DNSParam
from .host_item import HostItem as HostItem
+from .page_rule import PageRule as PageRule
from .skip_rule import SkipRule as SkipRule
from .block_rule import BlockRule as BlockRule
+from .d1_binding import D1Binding as D1Binding
from .membership import Membership as Membership
+from .origin_dns import OriginDNS as OriginDNS
+from .r2_binding import R2Binding as R2Binding
from .rules_item import RulesItem as RulesItem
+from .url_target import URLTarget as URLTarget
+from .action_item import ActionItem as ActionItem
from .healthcheck import Healthcheck as Healthcheck
from .jdcloud_ips import JDCloudIPs as JDCloudIPs
from .origin_item import OriginItem as OriginItem
+from .origin_port import OriginPort as OriginPort
+from .action_param import ActionParam as ActionParam
from .check_region import CheckRegion as CheckRegion
from .execute_rule import ExecuteRule as ExecuteRule
+from .filter_param import FilterParam as FilterParam
from .header_param import HeaderParam as HeaderParam
+from .health_check import HealthCheck as HealthCheck
+from .methods_item import MethodsItem as MethodsItem
from .origin_param import OriginParam as OriginParam
from .request_rule import RequestRule as RequestRule
+from .tunnel_param import TunnelParam as TunnelParam
from .waiting_room import WaitingRoom as WaitingRoom
from .load_balancer import LoadBalancer as LoadBalancer
from .load_shedding import LoadShedding as LoadShedding
from .stream_videos import StreamVideos as StreamVideos
+from .edge_ips_param import EdgeIPsParam as EdgeIPsParam
from .email_settings import EmailSettings as EmailSettings
from .filter_options import FilterOptions as FilterOptions
from .ip_list_params import IPListParams as IPListParams
+from .labeled_region import LabeledRegion as LabeledRegion
from .log_rule_param import LogRuleParam as LogRuleParam
-from .zones_pagerule import ZonesPagerule as ZonesPagerule
+from .migration_step import MigrationStep as MigrationStep
from .firewall_filter import FirewallFilter as FirewallFilter
from .origin_steering import OriginSteering as OriginSteering
from .random_steering import RandomSteering as RandomSteering
+from .service_binding import ServiceBinding as ServiceBinding
from .skip_rule_param import SkipRuleParam as SkipRuleParam
from .adaptive_routing import AdaptiveRouting as AdaptiveRouting
from .block_rule_param import BlockRuleParam as BlockRuleParam
+from .d1_binding_param import D1BindingParam as D1BindingParam
from .geo_restrictions import GeoRestrictions as GeoRestrictions
from .ip_list_response import IPListResponse as IPListResponse
from .mtls_certificate import MTLSCertificate as MTLSCertificate
+from .origin_dns_param import OriginDNSParam as OriginDNSParam
+from .r2_binding_param import R2BindingParam as R2BindingParam
from .rules_item_param import RulesItemParam as RulesItemParam
from .user_edit_params import UserEditParams as UserEditParams
from .zone_edit_params import ZoneEditParams as ZoneEditParams
from .zone_list_params import ZoneListParams as ZoneListParams
+from .action_item_param import ActionItemParam as ActionItemParam
from .check_region_item import CheckRegionItem as CheckRegionItem
from .cookie_attributes import CookieAttributes as CookieAttributes
from .custom_nameserver import CustomNameserver as CustomNameserver
+from .lighthouse_report import LighthouseReport as LighthouseReport
from .location_strategy import LocationStrategy as LocationStrategy
+from .mtls_cert_binding import MTLSCERTBinding as MTLSCERTBinding
from .observatory_trend import ObservatoryTrend as ObservatoryTrend
from .origin_item_param import OriginItemParam as OriginItemParam
+from .origin_port_param import OriginPortParam as OriginPortParam
from .pcap_get_response import PCAPGetResponse as PCAPGetResponse
+from .request_list_item import RequestListItem as RequestListItem
+from .stepped_migration import SteppedMigration as SteppedMigration
+from .targes_item_param import TargesItemParam as TargesItemParam
from .tcp_configuration import TcpConfiguration as TcpConfiguration
from .cache_purge_params import CachePurgeParams as CachePurgeParams
from .call_create_params import CallCreateParams as CallCreateParams
@@ -93,6 +127,7 @@
from .dnssec_edit_params import DNSSECEditParams as DNSSECEditParams
from .execute_rule_param import ExecuteRuleParam as ExecuteRuleParam
from .filter_list_params import FilterListParams as FilterListParams
+from .health_check_param import HealthCheckParam as HealthCheckParam
from .http_configuration import HTTPConfiguration as HTTPConfiguration
from .pcap_create_params import PCAPCreateParams as PCAPCreateParams
from .pcap_list_response import PCAPListResponse as PCAPListResponse
@@ -110,12 +145,15 @@
from .queue_list_response import QueueListResponse as QueueListResponse
from .queue_update_params import QueueUpdateParams as QueueUpdateParams
from .speed_delete_params import SpeedDeleteParams as SpeedDeleteParams
+from .allowed_origins_item import AllowedOriginsItem as AllowedOriginsItem
from .cache_purge_response import CachePurgeResponse as CachePurgeResponse
from .dnssec_delete_params import DNSSECDeleteParams as DNSSECDeleteParams
from .filter_create_params import FilterCreateParams as FilterCreateParams
from .filter_delete_params import FilterDeleteParams as FilterDeleteParams
from .filter_options_param import FilterOptionsParam as FilterOptionsParam
from .filter_update_params import FilterUpdateParams as FilterUpdateParams
+from .kv_namespace_binding import KVNamespaceBinding as KVNamespaceBinding
+from .migration_step_param import MigrationStepParam as MigrationStepParam
from .observatory_schedule import ObservatorySchedule as ObservatorySchedule
from .pagerule_edit_params import PageruleEditParams as PageruleEditParams
from .pagerule_list_params import PageruleListParams as PageruleListParams
@@ -134,10 +172,13 @@
from .random_steering_param import RandomSteeringParam as RandomSteeringParam
from .ruleset_create_params import RulesetCreateParams as RulesetCreateParams
from .ruleset_update_params import RulesetUpdateParams as RulesetUpdateParams
+from .service_binding_param import ServiceBindingParam as ServiceBindingParam
+from .single_step_migration import SingleStepMigration as SingleStepMigration
from .snippet_update_params import SnippetUpdateParams as SnippetUpdateParams
from .speed_delete_response import SpeedDeleteResponse as SpeedDeleteResponse
from .adaptive_routing_param import AdaptiveRoutingParam as AdaptiveRoutingParam
from .additional_routes_item import AdditionalRoutesItem as AdditionalRoutesItem
+from .durable_object_binding import DurableObjectBinding as DurableObjectBinding
from .filter_create_response import FilterCreateResponse as FilterCreateResponse
from .geo_restrictions_param import GeoRestrictionsParam as GeoRestrictionsParam
from .membership_list_params import MembershipListParams as MembershipListParams
@@ -153,9 +194,13 @@
from .healthcheck_edit_params import HealthcheckEditParams as HealthcheckEditParams
from .intel_phishing_url_info import IntelPhishingURLInfo as IntelPhishingURLInfo
from .location_strategy_param import LocationStrategyParam as LocationStrategyParam
+from .mtls_cert_binding_param import MTLSCERTBindingParam as MTLSCERTBindingParam
from .mtls_certificate_update import MTLSCertificateUpdate as MTLSCertificateUpdate
+from .placement_configuration import PlacementConfiguration as PlacementConfiguration
+from .request_list_item_param import RequestListItemParam as RequestListItemParam
from .ruleset_create_response import RulesetCreateResponse as RulesetCreateResponse
from .ruleset_update_response import RulesetUpdateResponse as RulesetUpdateResponse
+from .stepped_migration_param import SteppedMigrationParam as SteppedMigrationParam
from .tcp_configuration_param import TcpConfigurationParam as TcpConfigurationParam
from .url_scanner_scan_params import URLScannerScanParams as URLScannerScanParams
from .http_configuration_param import HTTPConfigurationParam as HTTPConfigurationParam
@@ -176,6 +221,8 @@
from .page_shield_update_params import PageShieldUpdateParams as PageShieldUpdateParams
from .speed_schedule_get_params import SpeedScheduleGetParams as SpeedScheduleGetParams
from .url_scanner_scan_response import URLScannerScanResponse as URLScannerScanResponse
+from .dispatch_namespace_binding import DispatchNamespaceBinding as DispatchNamespaceBinding
+from .kv_namespace_binding_param import KVNamespaceBindingParam as KVNamespaceBindingParam
from .managed_header_edit_params import ManagedHeaderEditParams as ManagedHeaderEditParams
from .membership_delete_response import MembershipDeleteResponse as MembershipDeleteResponse
from .rate_limit_delete_response import RateLimitDeleteResponse as RateLimitDeleteResponse
@@ -199,10 +246,12 @@
from .load_balancer_update_params import LoadBalancerUpdateParams as LoadBalancerUpdateParams
from .page_shield_update_response import PageShieldUpdateResponse as PageShieldUpdateResponse
from .session_affinity_attributes import SessionAffinityAttributes as SessionAffinityAttributes
+from .single_step_migration_param import SingleStepMigrationParam as SingleStepMigrationParam
from .additional_routes_item_param import AdditionalRoutesItemParam as AdditionalRoutesItemParam
from .bot_fight_mode_configuration import BotFightModeConfiguration as BotFightModeConfiguration
from .bot_management_update_params import BotManagementUpdateParams as BotManagementUpdateParams
from .custom_hostname_get_response import CustomHostnameGetResponse as CustomHostnameGetResponse
+from .durable_object_binding_param import DurableObjectBindingParam as DurableObjectBindingParam
from .email_routing_disable_params import EmailRoutingDisableParams as EmailRoutingDisableParams
from .keyless_certificate_hostname import KeylessCertificateHostname as KeylessCertificateHostname
from .managed_header_edit_response import ManagedHeaderEditResponse as ManagedHeaderEditResponse
@@ -216,6 +265,7 @@
from .custom_hostname_edit_response import CustomHostnameEditResponse as CustomHostnameEditResponse
from .custom_hostname_list_response import CustomHostnameListResponse as CustomHostnameListResponse
from .load_balancer_delete_response import LoadBalancerDeleteResponse as LoadBalancerDeleteResponse
+from .placement_configuration_param import PlacementConfigurationParam as PlacementConfigurationParam
from .warp_connector_token_response import WARPConnectorTokenResponse as WARPConnectorTokenResponse
from .bot_management_update_response import BotManagementUpdateResponse as BotManagementUpdateResponse
from .brand_protection_submit_params import BrandProtectionSubmitParams as BrandProtectionSubmitParams
@@ -236,6 +286,7 @@
from .client_certificate_create_params import ClientCertificateCreateParams as ClientCertificateCreateParams
from .custom_certificate_create_params import CustomCertificateCreateParams as CustomCertificateCreateParams
from .custom_certificate_delete_params import CustomCertificateDeleteParams as CustomCertificateDeleteParams
+from .dispatch_namespace_binding_param import DispatchNamespaceBindingParam as DispatchNamespaceBindingParam
from .custom_nameserver_verify_response import CustomNameserverVerifyResponse as CustomNameserverVerifyResponse
from .keyless_certificate_create_params import KeylessCertificateCreateParams as KeylessCertificateCreateParams
from .keyless_certificate_delete_params import KeylessCertificateDeleteParams as KeylessCertificateDeleteParams
diff --git a/src/cloudflare/types/action.py b/src/cloudflare/types/action.py
new file mode 100644
index 000000000000..4379bc4630ba
--- /dev/null
+++ b/src/cloudflare/types/action.py
@@ -0,0 +1,45 @@
+# 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__ = ["Action", "Response"]
+
+
+class Response(BaseModel):
+ body: Optional[str] = None
+ """The response body to return.
+
+ The value must conform to the configured content type.
+ """
+
+ content_type: Optional[str] = None
+ """The content type of the body.
+
+ Must be one of the following: `text/plain`, `text/xml`, or `application/json`.
+ """
+
+
+class Action(BaseModel):
+ mode: Optional[Literal["simulate", "ban", "challenge", "js_challenge", "managed_challenge"]] = None
+ """The action to perform."""
+
+ response: Optional[Response] = None
+ """A custom content type and reponse to return when the threshold is exceeded.
+
+ The custom response configured in this object will override the custom error for
+ the zone. This object is optional. Notes: If you omit this object, Cloudflare
+ will use the default HTML error page. If "mode" is "challenge",
+ "managed_challenge", or "js_challenge", Cloudflare will use the zone challenge
+ pages and you should not provide the "response" object.
+ """
+
+ timeout: Optional[float] = None
+ """The time in seconds during which Cloudflare will perform the mitigation action.
+
+ Must be an integer value greater than or equal to the period. Notes: If "mode"
+ is "challenge", "managed_challenge", or "js_challenge", Cloudflare will use the
+ zone's Challenge Passage time and you should not provide this value.
+ """
diff --git a/src/cloudflare/types/action_item.py b/src/cloudflare/types/action_item.py
new file mode 100644
index 000000000000..b780d0e68ec2
--- /dev/null
+++ b/src/cloudflare/types/action_item.py
@@ -0,0 +1,30 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from datetime import datetime
+from typing_extensions import Literal
+
+from .._models import BaseModel
+
+__all__ = ["ActionItem", "Value"]
+
+
+class Value(BaseModel):
+ type: Optional[Literal["temporary", "permanent"]] = None
+ """The response type for the URL redirect."""
+
+ url: Optional[str] = None
+ """
+ The URL to redirect the request to. Notes: ${num} refers to the position of '\\**'
+ in the constraint value.
+ """
+
+
+class ActionItem(BaseModel):
+ modified_on: Optional[datetime] = None
+ """The timestamp of when the override was last modified."""
+
+ name: Optional[Literal["forward_url"]] = None
+ """The type of route."""
+
+ value: Optional[Value] = None
diff --git a/src/cloudflare/types/action_item_param.py b/src/cloudflare/types/action_item_param.py
new file mode 100644
index 000000000000..bc8039cd4fa4
--- /dev/null
+++ b/src/cloudflare/types/action_item_param.py
@@ -0,0 +1,25 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, TypedDict
+
+__all__ = ["ActionItemParam", "Value"]
+
+
+class Value(TypedDict, total=False):
+ type: Literal["temporary", "permanent"]
+ """The response type for the URL redirect."""
+
+ url: str
+ """
+ The URL to redirect the request to. Notes: ${num} refers to the position of '\\**'
+ in the constraint value.
+ """
+
+
+class ActionItemParam(TypedDict, total=False):
+ name: Literal["forward_url"]
+ """The type of route."""
+
+ value: Value
diff --git a/src/cloudflare/types/action_param.py b/src/cloudflare/types/action_param.py
new file mode 100644
index 000000000000..4f585b7105d3
--- /dev/null
+++ b/src/cloudflare/types/action_param.py
@@ -0,0 +1,44 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, TypedDict
+
+__all__ = ["ActionParam", "Response"]
+
+
+class Response(TypedDict, total=False):
+ body: str
+ """The response body to return.
+
+ The value must conform to the configured content type.
+ """
+
+ content_type: str
+ """The content type of the body.
+
+ Must be one of the following: `text/plain`, `text/xml`, or `application/json`.
+ """
+
+
+class ActionParam(TypedDict, total=False):
+ mode: Literal["simulate", "ban", "challenge", "js_challenge", "managed_challenge"]
+ """The action to perform."""
+
+ response: Response
+ """A custom content type and reponse to return when the threshold is exceeded.
+
+ The custom response configured in this object will override the custom error for
+ the zone. This object is optional. Notes: If you omit this object, Cloudflare
+ will use the default HTML error page. If "mode" is "challenge",
+ "managed_challenge", or "js_challenge", Cloudflare will use the zone challenge
+ pages and you should not provide the "response" object.
+ """
+
+ timeout: float
+ """The time in seconds during which Cloudflare will perform the mitigation action.
+
+ Must be an integer value greater than or equal to the period. Notes: If "mode"
+ is "challenge", "managed_challenge", or "js_challenge", Cloudflare will use the
+ zone's Challenge Passage time and you should not provide this value.
+ """
diff --git a/src/cloudflare/types/allowed_origins_item.py b/src/cloudflare/types/allowed_origins_item.py
new file mode 100644
index 000000000000..3fd719211f67
--- /dev/null
+++ b/src/cloudflare/types/allowed_origins_item.py
@@ -0,0 +1,6 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+
+__all__ = ["AllowedOriginsItem"]
+
+AllowedOriginsItem = str
diff --git a/src/cloudflare/types/binding.py b/src/cloudflare/types/binding.py
new file mode 100644
index 000000000000..6e36418fde30
--- /dev/null
+++ b/src/cloudflare/types/binding.py
@@ -0,0 +1,38 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Union
+from typing_extensions import Literal
+
+from .._models import BaseModel
+from .d1_binding import D1Binding
+from .r2_binding import R2Binding
+from .service_binding import ServiceBinding
+from .mtls_cert_binding import MTLSCERTBinding
+from .kv_namespace_binding import KVNamespaceBinding
+from .durable_object_binding import DurableObjectBinding
+from .dispatch_namespace_binding import DispatchNamespaceBinding
+
+__all__ = ["Binding", "WorkersQueueBinding"]
+
+
+class WorkersQueueBinding(BaseModel):
+ name: str
+ """A JavaScript variable name for the binding."""
+
+ queue_name: str
+ """Name of the Queue to bind to"""
+
+ type: Literal["queue"]
+ """The class of resource that the binding provides."""
+
+
+Binding = Union[
+ KVNamespaceBinding,
+ ServiceBinding,
+ DurableObjectBinding,
+ R2Binding,
+ WorkersQueueBinding,
+ D1Binding,
+ DispatchNamespaceBinding,
+ MTLSCERTBinding,
+]
diff --git a/src/cloudflare/types/component.py b/src/cloudflare/types/component.py
new file mode 100644
index 000000000000..2c2a62b851e8
--- /dev/null
+++ b/src/cloudflare/types/component.py
@@ -0,0 +1,19 @@
+# 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__ = ["Component"]
+
+
+class Component(BaseModel):
+ default: Optional[float] = None
+ """The default amount allocated."""
+
+ name: Optional[Literal["zones", "page_rules", "dedicated_certificates", "dedicated_certificates_custom"]] = None
+ """The unique component."""
+
+ unit_price: Optional[float] = None
+ """The unit price of the addon."""
diff --git a/src/cloudflare/types/d1_binding.py b/src/cloudflare/types/d1_binding.py
new file mode 100644
index 000000000000..a72f11c25b41
--- /dev/null
+++ b/src/cloudflare/types/d1_binding.py
@@ -0,0 +1,21 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal
+
+from .._models import BaseModel
+
+__all__ = ["D1Binding"]
+
+
+class D1Binding(BaseModel):
+ id: str
+ """ID of the D1 database to bind to"""
+
+ binding: str
+ """A JavaScript variable name for the binding."""
+
+ name: str
+ """The name of the D1 database associated with the 'id' provided."""
+
+ type: Literal["d1"]
+ """The class of resource that the binding provides."""
diff --git a/src/cloudflare/types/d1_binding_param.py b/src/cloudflare/types/d1_binding_param.py
new file mode 100644
index 000000000000..74face1628f6
--- /dev/null
+++ b/src/cloudflare/types/d1_binding_param.py
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, Required, TypedDict
+
+__all__ = ["D1BindingParam"]
+
+
+class D1BindingParam(TypedDict, total=False):
+ id: Required[str]
+ """ID of the D1 database to bind to"""
+
+ name: Required[str]
+ """The name of the D1 database associated with the 'id' provided."""
+
+ type: Required[Literal["d1"]]
+ """The class of resource that the binding provides."""
diff --git a/src/cloudflare/types/dispatch_namespace_binding.py b/src/cloudflare/types/dispatch_namespace_binding.py
new file mode 100644
index 000000000000..30a308cb0f88
--- /dev/null
+++ b/src/cloudflare/types/dispatch_namespace_binding.py
@@ -0,0 +1,41 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from typing_extensions import Literal
+
+from .._models import BaseModel
+
+__all__ = ["DispatchNamespaceBinding", "Outbound", "OutboundWorker"]
+
+
+class OutboundWorker(BaseModel):
+ environment: Optional[str] = None
+ """Environment of the outbound worker"""
+
+ service: Optional[str] = None
+ """Name of the outbound worker"""
+
+
+class Outbound(BaseModel):
+ params: Optional[List[str]] = None
+ """
+ Pass information from the Dispatch Worker to the Outbound Worker through the
+ parameters
+ """
+
+ worker: Optional[OutboundWorker] = None
+ """Outbound worker"""
+
+
+class DispatchNamespaceBinding(BaseModel):
+ name: str
+ """A JavaScript variable name for the binding."""
+
+ namespace: str
+ """Namespace to bind to"""
+
+ type: Literal["dispatch_namespace"]
+ """The class of resource that the binding provides."""
+
+ outbound: Optional[Outbound] = None
+ """Outbound worker"""
diff --git a/src/cloudflare/types/dispatch_namespace_binding_param.py b/src/cloudflare/types/dispatch_namespace_binding_param.py
new file mode 100644
index 000000000000..584c5d86e155
--- /dev/null
+++ b/src/cloudflare/types/dispatch_namespace_binding_param.py
@@ -0,0 +1,38 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List
+from typing_extensions import Literal, Required, TypedDict
+
+__all__ = ["DispatchNamespaceBindingParam", "Outbound", "OutboundWorker"]
+
+
+class OutboundWorker(TypedDict, total=False):
+ environment: str
+ """Environment of the outbound worker"""
+
+ service: str
+ """Name of the outbound worker"""
+
+
+class Outbound(TypedDict, total=False):
+ params: List[str]
+ """
+ Pass information from the Dispatch Worker to the Outbound Worker through the
+ parameters
+ """
+
+ worker: OutboundWorker
+ """Outbound worker"""
+
+
+class DispatchNamespaceBindingParam(TypedDict, total=False):
+ namespace: Required[str]
+ """Namespace to bind to"""
+
+ type: Required[Literal["dispatch_namespace"]]
+ """The class of resource that the binding provides."""
+
+ outbound: Outbound
+ """Outbound worker"""
diff --git a/src/cloudflare/types/dns.py b/src/cloudflare/types/dns.py
new file mode 100644
index 000000000000..1c92ac31799d
--- /dev/null
+++ b/src/cloudflare/types/dns.py
@@ -0,0 +1,16 @@
+# 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__ = ["DNS"]
+
+
+class DNS(BaseModel):
+ name: Optional[str] = None
+ """The name of the DNS record associated with the application."""
+
+ type: Optional[Literal["CNAME", "ADDRESS"]] = None
+ """The type of DNS record associated with the application."""
diff --git a/src/cloudflare/types/dns_param.py b/src/cloudflare/types/dns_param.py
new file mode 100644
index 000000000000..ef8fdee11b50
--- /dev/null
+++ b/src/cloudflare/types/dns_param.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, TypedDict
+
+__all__ = ["DNSParam"]
+
+
+class DNSParam(TypedDict, total=False):
+ name: str
+ """The name of the DNS record associated with the application."""
+
+ type: Literal["CNAME", "ADDRESS"]
+ """The type of DNS record associated with the application."""
diff --git a/src/cloudflare/types/durable_object_binding.py b/src/cloudflare/types/durable_object_binding.py
new file mode 100644
index 000000000000..18ef1e02c4ac
--- /dev/null
+++ b/src/cloudflare/types/durable_object_binding.py
@@ -0,0 +1,30 @@
+# 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__ = ["DurableObjectBinding"]
+
+
+class DurableObjectBinding(BaseModel):
+ class_name: str
+ """The exported class name of the Durable Object"""
+
+ name: str
+ """A JavaScript variable name for the binding."""
+
+ type: Literal["durable_object_namespace"]
+ """The class of resource that the binding provides."""
+
+ environment: Optional[str] = None
+ """The environment of the script_name to bind to"""
+
+ namespace_id: Optional[str] = None
+ """Namespace identifier tag."""
+
+ script_name: Optional[str] = None
+ """
+ The script where the Durable Object is defined, if it is external to this Worker
+ """
diff --git a/src/cloudflare/types/durable_object_binding_param.py b/src/cloudflare/types/durable_object_binding_param.py
new file mode 100644
index 000000000000..6c00bbd63a95
--- /dev/null
+++ b/src/cloudflare/types/durable_object_binding_param.py
@@ -0,0 +1,23 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, Required, TypedDict
+
+__all__ = ["DurableObjectBindingParam"]
+
+
+class DurableObjectBindingParam(TypedDict, total=False):
+ class_name: Required[str]
+ """The exported class name of the Durable Object"""
+
+ type: Required[Literal["durable_object_namespace"]]
+ """The class of resource that the binding provides."""
+
+ environment: str
+ """The environment of the script_name to bind to"""
+
+ script_name: str
+ """
+ The script where the Durable Object is defined, if it is external to this Worker
+ """
diff --git a/src/cloudflare/types/edge_ips.py b/src/cloudflare/types/edge_ips.py
new file mode 100644
index 000000000000..d2d43ac78575
--- /dev/null
+++ b/src/cloudflare/types/edge_ips.py
@@ -0,0 +1,38 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Union, Optional
+from typing_extensions import Literal
+
+from .._models import BaseModel
+
+__all__ = ["EdgeIPs", "EyeballIPs", "CustomerOwnedIPs"]
+
+
+class EyeballIPs(BaseModel):
+ connectivity: Optional[Literal["all", "ipv4", "ipv6"]] = None
+ """The IP versions supported for inbound connections on Spectrum anycast IPs."""
+
+ type: Optional[Literal["dynamic"]] = None
+ """The type of edge IP configuration specified.
+
+ Dynamically allocated edge IPs use Spectrum anycast IPs in accordance with the
+ connectivity you specify. Only valid with CNAME DNS names.
+ """
+
+
+class CustomerOwnedIPs(BaseModel):
+ ips: Optional[List[str]] = None
+ """
+ The array of customer owned IPs we broadcast via anycast for this hostname and
+ application.
+ """
+
+ type: Optional[Literal["static"]] = None
+ """The type of edge IP configuration specified.
+
+ Statically allocated edge IPs use customer IPs in accordance with the ips array
+ you specify. Only valid with ADDRESS DNS names.
+ """
+
+
+EdgeIPs = Union[EyeballIPs, CustomerOwnedIPs]
diff --git a/src/cloudflare/types/edge_ips_param.py b/src/cloudflare/types/edge_ips_param.py
new file mode 100644
index 000000000000..54e00328eea8
--- /dev/null
+++ b/src/cloudflare/types/edge_ips_param.py
@@ -0,0 +1,38 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Union
+from typing_extensions import Literal, TypedDict
+
+__all__ = ["EdgeIPsParam", "EyeballIPs", "CustomerOwnedIPs"]
+
+
+class EyeballIPs(TypedDict, total=False):
+ connectivity: Literal["all", "ipv4", "ipv6"]
+ """The IP versions supported for inbound connections on Spectrum anycast IPs."""
+
+ type: Literal["dynamic"]
+ """The type of edge IP configuration specified.
+
+ Dynamically allocated edge IPs use Spectrum anycast IPs in accordance with the
+ connectivity you specify. Only valid with CNAME DNS names.
+ """
+
+
+class CustomerOwnedIPs(TypedDict, total=False):
+ ips: List[str]
+ """
+ The array of customer owned IPs we broadcast via anycast for this hostname and
+ application.
+ """
+
+ type: Literal["static"]
+ """The type of edge IP configuration specified.
+
+ Statically allocated edge IPs use customer IPs in accordance with the ips array
+ you specify. Only valid with ADDRESS DNS names.
+ """
+
+
+EdgeIPsParam = Union[EyeballIPs, CustomerOwnedIPs]
diff --git a/src/cloudflare/types/filter.py b/src/cloudflare/types/filter.py
new file mode 100644
index 000000000000..88f65c57b43b
--- /dev/null
+++ b/src/cloudflare/types/filter.py
@@ -0,0 +1,24 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from .._models import BaseModel
+
+__all__ = ["Filter"]
+
+
+class Filter(BaseModel):
+ destination_address: Optional[str] = None
+ """The destination IP address of the packet."""
+
+ destination_port: Optional[float] = None
+ """The destination port of the packet."""
+
+ protocol: Optional[float] = None
+ """The protocol number of the packet."""
+
+ source_address: Optional[str] = None
+ """The source IP address of the packet."""
+
+ source_port: Optional[float] = None
+ """The source port of the packet."""
diff --git a/src/cloudflare/types/filter_param.py b/src/cloudflare/types/filter_param.py
new file mode 100644
index 000000000000..ffe7eb3d7a73
--- /dev/null
+++ b/src/cloudflare/types/filter_param.py
@@ -0,0 +1,24 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import TypedDict
+
+__all__ = ["FilterParam"]
+
+
+class FilterParam(TypedDict, total=False):
+ destination_address: str
+ """The destination IP address of the packet."""
+
+ destination_port: float
+ """The destination port of the packet."""
+
+ protocol: float
+ """The protocol number of the packet."""
+
+ source_address: str
+ """The source IP address of the packet."""
+
+ source_port: float
+ """The source port of the packet."""
diff --git a/src/cloudflare/types/health_check.py b/src/cloudflare/types/health_check.py
new file mode 100644
index 000000000000..1e423a87a529
--- /dev/null
+++ b/src/cloudflare/types/health_check.py
@@ -0,0 +1,41 @@
+# 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
+from .unnamed_schema_ref_3b1a76a5e4a139b72ed7d93834773d39 import UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39
+from .unnamed_schema_ref_eebdc868ce7f7ae92e23438caa84e7b5 import UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5
+
+__all__ = ["HealthCheck"]
+
+
+class HealthCheck(BaseModel):
+ direction: Optional[Literal["unidirectional", "bidirectional"]] = None
+ """The direction of the flow of the healthcheck.
+
+ Either unidirectional, where the probe comes to you via the tunnel and the
+ result comes back to Cloudflare via the open Internet, or bidirectional where
+ both the probe and result come and go via the tunnel. Note in the case of
+ bidirecitonal healthchecks, the target field in health_check is ignored as the
+ interface_address is used to send traffic into the tunnel.
+ """
+
+ enabled: Optional[bool] = None
+ """Determines whether to run healthchecks for a tunnel."""
+
+ rate: Optional[UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5] = None
+ """How frequent the health check is run. The default value is `mid`."""
+
+ target: Optional[str] = None
+ """The destination address in a request type health check.
+
+ After the healthcheck is decapsulated at the customer end of the tunnel, the
+ ICMP echo will be forwarded to this address. This field defaults to
+ `customer_gre_endpoint address`. This field is ignored for bidirectional
+ healthchecks as the interface_address (not assigned to the Cloudflare side of
+ the tunnel) is used as the target.
+ """
+
+ type: Optional[UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39] = None
+ """The type of healthcheck to run, reply or request. The default value is `reply`."""
diff --git a/src/cloudflare/types/health_check_param.py b/src/cloudflare/types/health_check_param.py
new file mode 100644
index 000000000000..2d19d8b03660
--- /dev/null
+++ b/src/cloudflare/types/health_check_param.py
@@ -0,0 +1,41 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, TypedDict
+
+from .unnamed_schema_ref_3b1a76a5e4a139b72ed7d93834773d39 import UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39
+from .unnamed_schema_ref_eebdc868ce7f7ae92e23438caa84e7b5 import UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5
+
+__all__ = ["HealthCheckParam"]
+
+
+class HealthCheckParam(TypedDict, total=False):
+ direction: Literal["unidirectional", "bidirectional"]
+ """The direction of the flow of the healthcheck.
+
+ Either unidirectional, where the probe comes to you via the tunnel and the
+ result comes back to Cloudflare via the open Internet, or bidirectional where
+ both the probe and result come and go via the tunnel. Note in the case of
+ bidirecitonal healthchecks, the target field in health_check is ignored as the
+ interface_address is used to send traffic into the tunnel.
+ """
+
+ enabled: bool
+ """Determines whether to run healthchecks for a tunnel."""
+
+ rate: UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5
+ """How frequent the health check is run. The default value is `mid`."""
+
+ target: str
+ """The destination address in a request type health check.
+
+ After the healthcheck is decapsulated at the customer end of the tunnel, the
+ ICMP echo will be forwarded to this address. This field defaults to
+ `customer_gre_endpoint address`. This field is ignored for bidirectional
+ healthchecks as the interface_address (not assigned to the Cloudflare side of
+ the tunnel) is used as the target.
+ """
+
+ type: UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39
+ """The type of healthcheck to run, reply or request. The default value is `reply`."""
diff --git a/src/cloudflare/types/keyless_certificate_create_params.py b/src/cloudflare/types/keyless_certificate_create_params.py
index 4cd7991dd354..b937dbdb6833 100644
--- a/src/cloudflare/types/keyless_certificate_create_params.py
+++ b/src/cloudflare/types/keyless_certificate_create_params.py
@@ -4,9 +4,10 @@
from typing_extensions import Required, TypedDict
+from .tunnel_param import TunnelParam
from .unnamed_schema_ref_16aca57bde2963201c7e6e895436c1c1 import UnnamedSchemaRef16aca57bde2963201c7e6e895436c1c1
-__all__ = ["KeylessCertificateCreateParams", "Tunnel"]
+__all__ = ["KeylessCertificateCreateParams"]
class KeylessCertificateCreateParams(TypedDict, total=False):
@@ -36,13 +37,5 @@ class KeylessCertificateCreateParams(TypedDict, total=False):
name: str
"""The keyless SSL name."""
- tunnel: Tunnel
+ tunnel: TunnelParam
"""Configuration for using Keyless SSL through a Cloudflare Tunnel"""
-
-
-class Tunnel(TypedDict, total=False):
- private_ip: Required[str]
- """Private IP of the Key Server Host"""
-
- vnet_id: Required[str]
- """Cloudflare Tunnel Virtual Network ID"""
diff --git a/src/cloudflare/types/keyless_certificate_edit_params.py b/src/cloudflare/types/keyless_certificate_edit_params.py
index e32432a5b555..1aba961af6a7 100644
--- a/src/cloudflare/types/keyless_certificate_edit_params.py
+++ b/src/cloudflare/types/keyless_certificate_edit_params.py
@@ -4,7 +4,9 @@
from typing_extensions import Required, TypedDict
-__all__ = ["KeylessCertificateEditParams", "Tunnel"]
+from .tunnel_param import TunnelParam
+
+__all__ = ["KeylessCertificateEditParams"]
class KeylessCertificateEditParams(TypedDict, total=False):
@@ -26,13 +28,5 @@ class KeylessCertificateEditParams(TypedDict, total=False):
Keyless SSL server.
"""
- tunnel: Tunnel
+ tunnel: TunnelParam
"""Configuration for using Keyless SSL through a Cloudflare Tunnel"""
-
-
-class Tunnel(TypedDict, total=False):
- private_ip: Required[str]
- """Private IP of the Key Server Host"""
-
- vnet_id: Required[str]
- """Cloudflare Tunnel Virtual Network ID"""
diff --git a/src/cloudflare/types/keyless_certificate_hostname.py b/src/cloudflare/types/keyless_certificate_hostname.py
index 588c0e76e5a9..98c5a77f1701 100644
--- a/src/cloudflare/types/keyless_certificate_hostname.py
+++ b/src/cloudflare/types/keyless_certificate_hostname.py
@@ -4,17 +4,10 @@
from datetime import datetime
from typing_extensions import Literal
+from .tunnel import Tunnel
from .._models import BaseModel
-__all__ = ["KeylessCertificateHostname", "Tunnel"]
-
-
-class Tunnel(BaseModel):
- private_ip: str
- """Private IP of the Key Server Host"""
-
- vnet_id: str
- """Cloudflare Tunnel Virtual Network ID"""
+__all__ = ["KeylessCertificateHostname"]
class KeylessCertificateHostname(BaseModel):
diff --git a/src/cloudflare/types/kv_namespace_binding.py b/src/cloudflare/types/kv_namespace_binding.py
new file mode 100644
index 000000000000..f2bfffc18562
--- /dev/null
+++ b/src/cloudflare/types/kv_namespace_binding.py
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal
+
+from .._models import BaseModel
+
+__all__ = ["KVNamespaceBinding"]
+
+
+class KVNamespaceBinding(BaseModel):
+ name: str
+ """A JavaScript variable name for the binding."""
+
+ namespace_id: str
+ """Namespace identifier tag."""
+
+ type: Literal["kv_namespace"]
+ """The class of resource that the binding provides."""
diff --git a/src/cloudflare/types/kv_namespace_binding_param.py b/src/cloudflare/types/kv_namespace_binding_param.py
new file mode 100644
index 000000000000..7dc97bab2a6f
--- /dev/null
+++ b/src/cloudflare/types/kv_namespace_binding_param.py
@@ -0,0 +1,12 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, Required, TypedDict
+
+__all__ = ["KVNamespaceBindingParam"]
+
+
+class KVNamespaceBindingParam(TypedDict, total=False):
+ type: Required[Literal["kv_namespace"]]
+ """The class of resource that the binding provides."""
diff --git a/src/cloudflare/types/labeled_region.py b/src/cloudflare/types/labeled_region.py
new file mode 100644
index 000000000000..158c53125870
--- /dev/null
+++ b/src/cloudflare/types/labeled_region.py
@@ -0,0 +1,39 @@
+# 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__ = ["LabeledRegion"]
+
+
+class LabeledRegion(BaseModel):
+ label: Optional[str] = None
+
+ value: Optional[
+ Literal[
+ "asia-east1",
+ "asia-northeast1",
+ "asia-northeast2",
+ "asia-south1",
+ "asia-southeast1",
+ "australia-southeast1",
+ "europe-north1",
+ "europe-southwest1",
+ "europe-west1",
+ "europe-west2",
+ "europe-west3",
+ "europe-west4",
+ "europe-west8",
+ "europe-west9",
+ "me-west1",
+ "southamerica-east1",
+ "us-central1",
+ "us-east1",
+ "us-east4",
+ "us-south1",
+ "us-west1",
+ ]
+ ] = None
+ """A test region."""
diff --git a/src/cloudflare/types/lighthouse_report.py b/src/cloudflare/types/lighthouse_report.py
new file mode 100644
index 000000000000..94b739d7cfe3
--- /dev/null
+++ b/src/cloudflare/types/lighthouse_report.py
@@ -0,0 +1,58 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from typing_extensions import Literal
+
+from pydantic import Field as FieldInfo
+
+from .._models import BaseModel
+
+__all__ = ["LighthouseReport", "Error"]
+
+
+class Error(BaseModel):
+ code: Optional[Literal["NOT_REACHABLE", "DNS_FAILURE", "NOT_HTML", "LIGHTHOUSE_TIMEOUT", "UNKNOWN"]] = None
+ """The error code of the Lighthouse result."""
+
+ detail: Optional[str] = None
+ """Detailed error message."""
+
+ final_displayed_url: Optional[str] = FieldInfo(alias="finalDisplayedUrl", default=None)
+ """The final URL displayed to the user."""
+
+
+class LighthouseReport(BaseModel):
+ cls: Optional[float] = None
+ """Cumulative Layout Shift."""
+
+ device_type: Optional[Literal["DESKTOP", "MOBILE"]] = FieldInfo(alias="deviceType", default=None)
+ """The type of device."""
+
+ error: Optional[Error] = None
+
+ fcp: Optional[float] = None
+ """First Contentful Paint."""
+
+ json_report_url: Optional[str] = FieldInfo(alias="jsonReportUrl", default=None)
+ """The URL to the full Lighthouse JSON report."""
+
+ lcp: Optional[float] = None
+ """Largest Contentful Paint."""
+
+ performance_score: Optional[float] = FieldInfo(alias="performanceScore", default=None)
+ """The Lighthouse performance score."""
+
+ si: Optional[float] = None
+ """Speed Index."""
+
+ state: Optional[Literal["RUNNING", "COMPLETE", "FAILED"]] = None
+ """The state of the Lighthouse report."""
+
+ tbt: Optional[float] = None
+ """Total Blocking Time."""
+
+ ttfb: Optional[float] = None
+ """Time To First Byte."""
+
+ tti: Optional[float] = None
+ """Time To Interactive."""
diff --git a/src/cloudflare/types/magic_network_monitoring/__init__.py b/src/cloudflare/types/magic_network_monitoring/__init__.py
index a9f64b1287a0..7bbc46e326e9 100644
--- a/src/cloudflare/types/magic_network_monitoring/__init__.py
+++ b/src/cloudflare/types/magic_network_monitoring/__init__.py
@@ -2,6 +2,8 @@
from __future__ import annotations
+from .rule import Rule as Rule
+from .rule_param import RuleParam as RuleParam
from .rule_edit_params import RuleEditParams as RuleEditParams
from .config_edit_params import ConfigEditParams as ConfigEditParams
from .rule_create_params import RuleCreateParams as RuleCreateParams
@@ -10,5 +12,4 @@
from .config_create_params import ConfigCreateParams as ConfigCreateParams
from .config_delete_params import ConfigDeleteParams as ConfigDeleteParams
from .config_update_params import ConfigUpdateParams as ConfigUpdateParams
-from .magic_network_monitoring_rule import MagicNetworkMonitoringRule as MagicNetworkMonitoringRule
from .magic_network_monitoring_config import MagicNetworkMonitoringConfig as MagicNetworkMonitoringConfig
diff --git a/src/cloudflare/types/magic_network_monitoring/magic_network_monitoring_rule.py b/src/cloudflare/types/magic_network_monitoring/rule.py
similarity index 94%
rename from src/cloudflare/types/magic_network_monitoring/magic_network_monitoring_rule.py
rename to src/cloudflare/types/magic_network_monitoring/rule.py
index 8421ef7df0d6..088f05f2dd71 100644
--- a/src/cloudflare/types/magic_network_monitoring/magic_network_monitoring_rule.py
+++ b/src/cloudflare/types/magic_network_monitoring/rule.py
@@ -4,10 +4,10 @@
from ..._models import BaseModel
-__all__ = ["MagicNetworkMonitoringRule"]
+__all__ = ["Rule"]
-class MagicNetworkMonitoringRule(BaseModel):
+class Rule(BaseModel):
automatic_advertisement: Optional[bool] = None
"""
Toggle on if you would like Cloudflare to automatically advertise the IP
diff --git a/src/cloudflare/types/magic_network_monitoring/rule_param.py b/src/cloudflare/types/magic_network_monitoring/rule_param.py
new file mode 100644
index 000000000000..d79e022c340f
--- /dev/null
+++ b/src/cloudflare/types/magic_network_monitoring/rule_param.py
@@ -0,0 +1,52 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Optional
+from typing_extensions import Required, TypedDict
+
+__all__ = ["RuleParam"]
+
+
+class RuleParam(TypedDict, total=False):
+ automatic_advertisement: Required[Optional[bool]]
+ """
+ Toggle on if you would like Cloudflare to automatically advertise the IP
+ Prefixes within the rule via Magic Transit when the rule is triggered. Only
+ available for users of Magic Transit.
+ """
+
+ duration: Required[str]
+ """
+ The amount of time that the rule threshold must be exceeded to send an alert
+ notification. The final value must be equivalent to one of the following 8
+ values ["1m","5m","10m","15m","20m","30m","45m","60m"]. The format is
+ AhBmCsDmsEusFns where A, B, C, D, E and F durations are optional; however at
+ least one unit must be provided.
+ """
+
+ name: Required[str]
+ """The name of the rule.
+
+ Must be unique. Supports characters A-Z, a-z, 0-9, underscore (\\__), dash (-),
+ period (.), and tilde (~). You can’t have a space in the rule name. Max 256
+ characters.
+ """
+
+ prefixes: Required[List[str]]
+
+ id: str
+
+ bandwidth_threshold: float
+ """The number of bits per second for the rule.
+
+ When this value is exceeded for the set duration, an alert notification is sent.
+ Minimum of 1 and no maximum.
+ """
+
+ packet_threshold: float
+ """The number of packets per second for the rule.
+
+ When this value is exceeded for the set duration, an alert notification is sent.
+ Minimum of 1 and no maximum.
+ """
diff --git a/src/cloudflare/types/magic_transit/__init__.py b/src/cloudflare/types/magic_transit/__init__.py
index dfcdd13f9afd..90983657a6f7 100644
--- a/src/cloudflare/types/magic_transit/__init__.py
+++ b/src/cloudflare/types/magic_transit/__init__.py
@@ -2,7 +2,14 @@
from __future__ import annotations
+from .site import Site as Site
+from .scope import Scope as Scope
+from .scope_param import ScopeParam as ScopeParam
+from .psk_metadata import PSKMetadata as PSKMetadata
+from .site_location import SiteLocation as SiteLocation
+from .colo_names_item import ColoNamesItem as ColoNamesItem
from .site_list_params import SiteListParams as SiteListParams
+from .colo_regions_item import ColoRegionsItem as ColoRegionsItem
from .site_get_response import SiteGetResponse as SiteGetResponse
from .route_empty_params import RouteEmptyParams as RouteEmptyParams
from .route_get_response import RouteGetResponse as RouteGetResponse
@@ -14,6 +21,7 @@
from .route_delete_params import RouteDeleteParams as RouteDeleteParams
from .route_list_response import RouteListResponse as RouteListResponse
from .route_update_params import RouteUpdateParams as RouteUpdateParams
+from .site_location_param import SiteLocationParam as SiteLocationParam
from .route_empty_response import RouteEmptyResponse as RouteEmptyResponse
from .site_create_response import SiteCreateResponse as SiteCreateResponse
from .site_delete_response import SiteDeleteResponse as SiteDeleteResponse
diff --git a/src/cloudflare/types/magic_transit/colo_names_item.py b/src/cloudflare/types/magic_transit/colo_names_item.py
new file mode 100644
index 000000000000..274c403afb8b
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/colo_names_item.py
@@ -0,0 +1,6 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+
+__all__ = ["ColoNamesItem"]
+
+ColoNamesItem = str
diff --git a/src/cloudflare/types/magic_transit/colo_regions_item.py b/src/cloudflare/types/magic_transit/colo_regions_item.py
new file mode 100644
index 000000000000..e3d69f9d86e5
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/colo_regions_item.py
@@ -0,0 +1,6 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+
+__all__ = ["ColoRegionsItem"]
+
+ColoRegionsItem = str
diff --git a/src/cloudflare/types/magic_transit/gre_tunnel_create_response.py b/src/cloudflare/types/magic_transit/gre_tunnel_create_response.py
index 8763a3e6c8a0..460560e34881 100644
--- a/src/cloudflare/types/magic_transit/gre_tunnel_create_response.py
+++ b/src/cloudflare/types/magic_transit/gre_tunnel_create_response.py
@@ -2,44 +2,11 @@
from typing import List, Optional
from datetime import datetime
-from typing_extensions import Literal
from ..._models import BaseModel
-from ..unnamed_schema_ref_3b1a76a5e4a139b72ed7d93834773d39 import UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39
-from ..unnamed_schema_ref_eebdc868ce7f7ae92e23438caa84e7b5 import UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5
+from ..health_check import HealthCheck
-__all__ = ["GRETunnelCreateResponse", "GRETunnel", "GRETunnelHealthCheck"]
-
-
-class GRETunnelHealthCheck(BaseModel):
- direction: Optional[Literal["unidirectional", "bidirectional"]] = None
- """The direction of the flow of the healthcheck.
-
- Either unidirectional, where the probe comes to you via the tunnel and the
- result comes back to Cloudflare via the open Internet, or bidirectional where
- both the probe and result come and go via the tunnel. Note in the case of
- bidirecitonal healthchecks, the target field in health_check is ignored as the
- interface_address is used to send traffic into the tunnel.
- """
-
- enabled: Optional[bool] = None
- """Determines whether to run healthchecks for a tunnel."""
-
- rate: Optional[UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5] = None
- """How frequent the health check is run. The default value is `mid`."""
-
- target: Optional[str] = None
- """The destination address in a request type health check.
-
- After the healthcheck is decapsulated at the customer end of the tunnel, the
- ICMP echo will be forwarded to this address. This field defaults to
- `customer_gre_endpoint address`. This field is ignored for bidirectional
- healthchecks as the interface_address (not assigned to the Cloudflare side of
- the tunnel) is used as the target.
- """
-
- type: Optional[UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39] = None
- """The type of healthcheck to run, reply or request. The default value is `reply`."""
+__all__ = ["GRETunnelCreateResponse", "GRETunnel"]
class GRETunnel(BaseModel):
@@ -72,7 +39,7 @@ class GRETunnel(BaseModel):
description: Optional[str] = None
"""An optional description of the GRE tunnel."""
- health_check: Optional[GRETunnelHealthCheck] = None
+ health_check: Optional[HealthCheck] = None
modified_on: Optional[datetime] = None
"""The date and time the tunnel was last modified."""
diff --git a/src/cloudflare/types/magic_transit/gre_tunnel_list_response.py b/src/cloudflare/types/magic_transit/gre_tunnel_list_response.py
index 7172e8d94a3b..989c38fc7d98 100644
--- a/src/cloudflare/types/magic_transit/gre_tunnel_list_response.py
+++ b/src/cloudflare/types/magic_transit/gre_tunnel_list_response.py
@@ -2,44 +2,11 @@
from typing import List, Optional
from datetime import datetime
-from typing_extensions import Literal
from ..._models import BaseModel
-from ..unnamed_schema_ref_3b1a76a5e4a139b72ed7d93834773d39 import UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39
-from ..unnamed_schema_ref_eebdc868ce7f7ae92e23438caa84e7b5 import UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5
+from ..health_check import HealthCheck
-__all__ = ["GRETunnelListResponse", "GRETunnel", "GRETunnelHealthCheck"]
-
-
-class GRETunnelHealthCheck(BaseModel):
- direction: Optional[Literal["unidirectional", "bidirectional"]] = None
- """The direction of the flow of the healthcheck.
-
- Either unidirectional, where the probe comes to you via the tunnel and the
- result comes back to Cloudflare via the open Internet, or bidirectional where
- both the probe and result come and go via the tunnel. Note in the case of
- bidirecitonal healthchecks, the target field in health_check is ignored as the
- interface_address is used to send traffic into the tunnel.
- """
-
- enabled: Optional[bool] = None
- """Determines whether to run healthchecks for a tunnel."""
-
- rate: Optional[UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5] = None
- """How frequent the health check is run. The default value is `mid`."""
-
- target: Optional[str] = None
- """The destination address in a request type health check.
-
- After the healthcheck is decapsulated at the customer end of the tunnel, the
- ICMP echo will be forwarded to this address. This field defaults to
- `customer_gre_endpoint address`. This field is ignored for bidirectional
- healthchecks as the interface_address (not assigned to the Cloudflare side of
- the tunnel) is used as the target.
- """
-
- type: Optional[UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39] = None
- """The type of healthcheck to run, reply or request. The default value is `reply`."""
+__all__ = ["GRETunnelListResponse", "GRETunnel"]
class GRETunnel(BaseModel):
@@ -72,7 +39,7 @@ class GRETunnel(BaseModel):
description: Optional[str] = None
"""An optional description of the GRE tunnel."""
- health_check: Optional[GRETunnelHealthCheck] = None
+ health_check: Optional[HealthCheck] = None
modified_on: Optional[datetime] = None
"""The date and time the tunnel was last modified."""
diff --git a/src/cloudflare/types/magic_transit/gre_tunnel_update_params.py b/src/cloudflare/types/magic_transit/gre_tunnel_update_params.py
index 53d2790dace6..fa4fdee6ad98 100644
--- a/src/cloudflare/types/magic_transit/gre_tunnel_update_params.py
+++ b/src/cloudflare/types/magic_transit/gre_tunnel_update_params.py
@@ -2,12 +2,11 @@
from __future__ import annotations
-from typing_extensions import Literal, Required, TypedDict
+from typing_extensions import Required, TypedDict
-from ..unnamed_schema_ref_3b1a76a5e4a139b72ed7d93834773d39 import UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39
-from ..unnamed_schema_ref_eebdc868ce7f7ae92e23438caa84e7b5 import UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5
+from ..health_check_param import HealthCheckParam
-__all__ = ["GRETunnelUpdateParams", "HealthCheck"]
+__all__ = ["GRETunnelUpdateParams"]
class GRETunnelUpdateParams(TypedDict, total=False):
@@ -37,7 +36,7 @@ class GRETunnelUpdateParams(TypedDict, total=False):
description: str
"""An optional description of the GRE tunnel."""
- health_check: HealthCheck
+ health_check: HealthCheckParam
mtu: int
"""Maximum Transmission Unit (MTU) in bytes for the GRE tunnel.
@@ -47,34 +46,3 @@ class GRETunnelUpdateParams(TypedDict, total=False):
ttl: int
"""Time To Live (TTL) in number of hops of the GRE tunnel."""
-
-
-class HealthCheck(TypedDict, total=False):
- direction: Literal["unidirectional", "bidirectional"]
- """The direction of the flow of the healthcheck.
-
- Either unidirectional, where the probe comes to you via the tunnel and the
- result comes back to Cloudflare via the open Internet, or bidirectional where
- both the probe and result come and go via the tunnel. Note in the case of
- bidirecitonal healthchecks, the target field in health_check is ignored as the
- interface_address is used to send traffic into the tunnel.
- """
-
- enabled: bool
- """Determines whether to run healthchecks for a tunnel."""
-
- rate: UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5
- """How frequent the health check is run. The default value is `mid`."""
-
- target: str
- """The destination address in a request type health check.
-
- After the healthcheck is decapsulated at the customer end of the tunnel, the
- ICMP echo will be forwarded to this address. This field defaults to
- `customer_gre_endpoint address`. This field is ignored for bidirectional
- healthchecks as the interface_address (not assigned to the Cloudflare side of
- the tunnel) is used as the target.
- """
-
- type: UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39
- """The type of healthcheck to run, reply or request. The default value is `reply`."""
diff --git a/src/cloudflare/types/magic_transit/ipsec_tunnel_create_params.py b/src/cloudflare/types/magic_transit/ipsec_tunnel_create_params.py
index 80db663c7a79..43e1350e98ec 100644
--- a/src/cloudflare/types/magic_transit/ipsec_tunnel_create_params.py
+++ b/src/cloudflare/types/magic_transit/ipsec_tunnel_create_params.py
@@ -2,12 +2,11 @@
from __future__ import annotations
-from typing_extensions import Literal, Required, TypedDict
+from typing_extensions import Required, TypedDict
-from ..unnamed_schema_ref_3b1a76a5e4a139b72ed7d93834773d39 import UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39
-from ..unnamed_schema_ref_eebdc868ce7f7ae92e23438caa84e7b5 import UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5
+from ..health_check_param import HealthCheckParam
-__all__ = ["IPSECTunnelCreateParams", "HealthCheck"]
+__all__ = ["IPSECTunnelCreateParams"]
class IPSECTunnelCreateParams(TypedDict, total=False):
@@ -36,7 +35,7 @@ class IPSECTunnelCreateParams(TypedDict, total=False):
description: str
"""An optional description forthe IPsec tunnel."""
- health_check: HealthCheck
+ health_check: HealthCheckParam
psk: str
"""A randomly generated or provided string for use in the IPsec tunnel."""
@@ -46,34 +45,3 @@ class IPSECTunnelCreateParams(TypedDict, total=False):
If `true`, then IPsec replay protection will be supported in the
Cloudflare-to-customer direction.
"""
-
-
-class HealthCheck(TypedDict, total=False):
- direction: Literal["unidirectional", "bidirectional"]
- """The direction of the flow of the healthcheck.
-
- Either unidirectional, where the probe comes to you via the tunnel and the
- result comes back to Cloudflare via the open Internet, or bidirectional where
- both the probe and result come and go via the tunnel. Note in the case of
- bidirecitonal healthchecks, the target field in health_check is ignored as the
- interface_address is used to send traffic into the tunnel.
- """
-
- enabled: bool
- """Determines whether to run healthchecks for a tunnel."""
-
- rate: UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5
- """How frequent the health check is run. The default value is `mid`."""
-
- target: str
- """The destination address in a request type health check.
-
- After the healthcheck is decapsulated at the customer end of the tunnel, the
- ICMP echo will be forwarded to this address. This field defaults to
- `customer_gre_endpoint address`. This field is ignored for bidirectional
- healthchecks as the interface_address (not assigned to the Cloudflare side of
- the tunnel) is used as the target.
- """
-
- type: UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39
- """The type of healthcheck to run, reply or request. The default value is `reply`."""
diff --git a/src/cloudflare/types/magic_transit/ipsec_tunnel_create_response.py b/src/cloudflare/types/magic_transit/ipsec_tunnel_create_response.py
index 3179e68e181f..e96b02106098 100644
--- a/src/cloudflare/types/magic_transit/ipsec_tunnel_create_response.py
+++ b/src/cloudflare/types/magic_transit/ipsec_tunnel_create_response.py
@@ -4,15 +4,11 @@
from datetime import datetime
from ..._models import BaseModel
+from .psk_metadata import PSKMetadata
from ..unnamed_schema_ref_3b1a76a5e4a139b72ed7d93834773d39 import UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39
from ..unnamed_schema_ref_eebdc868ce7f7ae92e23438caa84e7b5 import UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5
-__all__ = ["IPSECTunnelCreateResponse", "IPSECTunnel", "IPSECTunnelPSKMetadata", "IPSECTunnelTunnelHealthCheck"]
-
-
-class IPSECTunnelPSKMetadata(BaseModel):
- last_generated_on: Optional[datetime] = None
- """The date and time the tunnel was last modified."""
+__all__ = ["IPSECTunnelCreateResponse", "IPSECTunnel", "IPSECTunnelTunnelHealthCheck"]
class IPSECTunnelTunnelHealthCheck(BaseModel):
@@ -72,7 +68,7 @@ class IPSECTunnel(BaseModel):
modified_on: Optional[datetime] = None
"""The date and time the tunnel was last modified."""
- psk_metadata: Optional[IPSECTunnelPSKMetadata] = None
+ psk_metadata: Optional[PSKMetadata] = None
"""The PSK metadata that includes when the PSK was generated."""
replay_protection: Optional[bool] = None
diff --git a/src/cloudflare/types/magic_transit/ipsec_tunnel_list_response.py b/src/cloudflare/types/magic_transit/ipsec_tunnel_list_response.py
index edba81b05d8f..c61842742c94 100644
--- a/src/cloudflare/types/magic_transit/ipsec_tunnel_list_response.py
+++ b/src/cloudflare/types/magic_transit/ipsec_tunnel_list_response.py
@@ -4,15 +4,11 @@
from datetime import datetime
from ..._models import BaseModel
+from .psk_metadata import PSKMetadata
from ..unnamed_schema_ref_3b1a76a5e4a139b72ed7d93834773d39 import UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39
from ..unnamed_schema_ref_eebdc868ce7f7ae92e23438caa84e7b5 import UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5
-__all__ = ["IPSECTunnelListResponse", "IPSECTunnel", "IPSECTunnelPSKMetadata", "IPSECTunnelTunnelHealthCheck"]
-
-
-class IPSECTunnelPSKMetadata(BaseModel):
- last_generated_on: Optional[datetime] = None
- """The date and time the tunnel was last modified."""
+__all__ = ["IPSECTunnelListResponse", "IPSECTunnel", "IPSECTunnelTunnelHealthCheck"]
class IPSECTunnelTunnelHealthCheck(BaseModel):
@@ -72,7 +68,7 @@ class IPSECTunnel(BaseModel):
modified_on: Optional[datetime] = None
"""The date and time the tunnel was last modified."""
- psk_metadata: Optional[IPSECTunnelPSKMetadata] = None
+ psk_metadata: Optional[PSKMetadata] = None
"""The PSK metadata that includes when the PSK was generated."""
replay_protection: Optional[bool] = None
diff --git a/src/cloudflare/types/magic_transit/ipsec_tunnel_psk_generate_response.py b/src/cloudflare/types/magic_transit/ipsec_tunnel_psk_generate_response.py
index 260b879fecc8..9c4438b14567 100644
--- a/src/cloudflare/types/magic_transit/ipsec_tunnel_psk_generate_response.py
+++ b/src/cloudflare/types/magic_transit/ipsec_tunnel_psk_generate_response.py
@@ -1,16 +1,11 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Optional
-from datetime import datetime
from ..._models import BaseModel
+from .psk_metadata import PSKMetadata
-__all__ = ["IPSECTunnelPSKGenerateResponse", "PSKMetadata"]
-
-
-class PSKMetadata(BaseModel):
- last_generated_on: Optional[datetime] = None
- """The date and time the tunnel was last modified."""
+__all__ = ["IPSECTunnelPSKGenerateResponse"]
class IPSECTunnelPSKGenerateResponse(BaseModel):
diff --git a/src/cloudflare/types/magic_transit/ipsec_tunnel_update_params.py b/src/cloudflare/types/magic_transit/ipsec_tunnel_update_params.py
index d7910561121e..b4ee87953207 100644
--- a/src/cloudflare/types/magic_transit/ipsec_tunnel_update_params.py
+++ b/src/cloudflare/types/magic_transit/ipsec_tunnel_update_params.py
@@ -2,12 +2,11 @@
from __future__ import annotations
-from typing_extensions import Literal, Required, TypedDict
+from typing_extensions import Required, TypedDict
-from ..unnamed_schema_ref_3b1a76a5e4a139b72ed7d93834773d39 import UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39
-from ..unnamed_schema_ref_eebdc868ce7f7ae92e23438caa84e7b5 import UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5
+from ..health_check_param import HealthCheckParam
-__all__ = ["IPSECTunnelUpdateParams", "HealthCheck"]
+__all__ = ["IPSECTunnelUpdateParams"]
class IPSECTunnelUpdateParams(TypedDict, total=False):
@@ -36,7 +35,7 @@ class IPSECTunnelUpdateParams(TypedDict, total=False):
description: str
"""An optional description forthe IPsec tunnel."""
- health_check: HealthCheck
+ health_check: HealthCheckParam
psk: str
"""A randomly generated or provided string for use in the IPsec tunnel."""
@@ -46,34 +45,3 @@ class IPSECTunnelUpdateParams(TypedDict, total=False):
If `true`, then IPsec replay protection will be supported in the
Cloudflare-to-customer direction.
"""
-
-
-class HealthCheck(TypedDict, total=False):
- direction: Literal["unidirectional", "bidirectional"]
- """The direction of the flow of the healthcheck.
-
- Either unidirectional, where the probe comes to you via the tunnel and the
- result comes back to Cloudflare via the open Internet, or bidirectional where
- both the probe and result come and go via the tunnel. Note in the case of
- bidirecitonal healthchecks, the target field in health_check is ignored as the
- interface_address is used to send traffic into the tunnel.
- """
-
- enabled: bool
- """Determines whether to run healthchecks for a tunnel."""
-
- rate: UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5
- """How frequent the health check is run. The default value is `mid`."""
-
- target: str
- """The destination address in a request type health check.
-
- After the healthcheck is decapsulated at the customer end of the tunnel, the
- ICMP echo will be forwarded to this address. This field defaults to
- `customer_gre_endpoint address`. This field is ignored for bidirectional
- healthchecks as the interface_address (not assigned to the Cloudflare side of
- the tunnel) is used as the target.
- """
-
- type: UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39
- """The type of healthcheck to run, reply or request. The default value is `reply`."""
diff --git a/src/cloudflare/types/magic_transit/psk_metadata.py b/src/cloudflare/types/magic_transit/psk_metadata.py
new file mode 100644
index 000000000000..db1b57d2b5df
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/psk_metadata.py
@@ -0,0 +1,13 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from datetime import datetime
+
+from ..._models import BaseModel
+
+__all__ = ["PSKMetadata"]
+
+
+class PSKMetadata(BaseModel):
+ last_generated_on: Optional[datetime] = None
+ """The date and time the tunnel was last modified."""
diff --git a/src/cloudflare/types/magic_transit/route_create_response.py b/src/cloudflare/types/magic_transit/route_create_response.py
index 2d511d6402a4..c8b0dd589041 100644
--- a/src/cloudflare/types/magic_transit/route_create_response.py
+++ b/src/cloudflare/types/magic_transit/route_create_response.py
@@ -3,17 +3,10 @@
from typing import List, Optional
from datetime import datetime
+from .scope import Scope
from ..._models import BaseModel
-__all__ = ["RouteCreateResponse", "Route", "RouteScope"]
-
-
-class RouteScope(BaseModel):
- colo_names: Optional[List[str]] = None
- """List of colo names for the ECMP scope."""
-
- colo_regions: Optional[List[str]] = None
- """List of colo regions for the ECMP scope."""
+__all__ = ["RouteCreateResponse", "Route"]
class Route(BaseModel):
@@ -38,7 +31,7 @@ class Route(BaseModel):
modified_on: Optional[datetime] = None
"""When the route was last modified."""
- scope: Optional[RouteScope] = None
+ scope: Optional[Scope] = None
"""Used only for ECMP routes."""
weight: Optional[int] = None
diff --git a/src/cloudflare/types/magic_transit/route_list_response.py b/src/cloudflare/types/magic_transit/route_list_response.py
index 339f0fb5194a..5e19e5ba48a4 100644
--- a/src/cloudflare/types/magic_transit/route_list_response.py
+++ b/src/cloudflare/types/magic_transit/route_list_response.py
@@ -3,17 +3,10 @@
from typing import List, Optional
from datetime import datetime
+from .scope import Scope
from ..._models import BaseModel
-__all__ = ["RouteListResponse", "Route", "RouteScope"]
-
-
-class RouteScope(BaseModel):
- colo_names: Optional[List[str]] = None
- """List of colo names for the ECMP scope."""
-
- colo_regions: Optional[List[str]] = None
- """List of colo regions for the ECMP scope."""
+__all__ = ["RouteListResponse", "Route"]
class Route(BaseModel):
@@ -38,7 +31,7 @@ class Route(BaseModel):
modified_on: Optional[datetime] = None
"""When the route was last modified."""
- scope: Optional[RouteScope] = None
+ scope: Optional[Scope] = None
"""Used only for ECMP routes."""
weight: Optional[int] = None
diff --git a/src/cloudflare/types/magic_transit/route_update_params.py b/src/cloudflare/types/magic_transit/route_update_params.py
index 8c608ddbe470..14d10ad42c0b 100644
--- a/src/cloudflare/types/magic_transit/route_update_params.py
+++ b/src/cloudflare/types/magic_transit/route_update_params.py
@@ -2,10 +2,11 @@
from __future__ import annotations
-from typing import List
from typing_extensions import Required, TypedDict
-__all__ = ["RouteUpdateParams", "Scope"]
+from .scope_param import ScopeParam
+
+__all__ = ["RouteUpdateParams"]
class RouteUpdateParams(TypedDict, total=False):
@@ -24,16 +25,8 @@ class RouteUpdateParams(TypedDict, total=False):
description: str
"""An optional human provided description of the static route."""
- scope: Scope
+ scope: ScopeParam
"""Used only for ECMP routes."""
weight: int
"""Optional weight of the ECMP scope - if provided."""
-
-
-class Scope(TypedDict, total=False):
- colo_names: List[str]
- """List of colo names for the ECMP scope."""
-
- colo_regions: List[str]
- """List of colo regions for the ECMP scope."""
diff --git a/src/cloudflare/types/magic_transit/scope.py b/src/cloudflare/types/magic_transit/scope.py
new file mode 100644
index 000000000000..69284135b601
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/scope.py
@@ -0,0 +1,17 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+
+from ..._models import BaseModel
+from .colo_names_item import ColoNamesItem
+from .colo_regions_item import ColoRegionsItem
+
+__all__ = ["Scope"]
+
+
+class Scope(BaseModel):
+ colo_names: Optional[List[ColoNamesItem]] = None
+ """List of colo names for the ECMP scope."""
+
+ colo_regions: Optional[List[ColoRegionsItem]] = None
+ """List of colo regions for the ECMP scope."""
diff --git a/src/cloudflare/types/magic_transit/scope_param.py b/src/cloudflare/types/magic_transit/scope_param.py
new file mode 100644
index 000000000000..4f359cd969da
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/scope_param.py
@@ -0,0 +1,19 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List
+from typing_extensions import TypedDict
+
+from .colo_names_item import ColoNamesItem
+from .colo_regions_item import ColoRegionsItem
+
+__all__ = ["ScopeParam"]
+
+
+class ScopeParam(TypedDict, total=False):
+ colo_names: List[ColoNamesItem]
+ """List of colo names for the ECMP scope."""
+
+ colo_regions: List[ColoRegionsItem]
+ """List of colo regions for the ECMP scope."""
diff --git a/src/cloudflare/types/magic_transit/site.py b/src/cloudflare/types/magic_transit/site.py
new file mode 100644
index 000000000000..41ffe01ee98a
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/site.py
@@ -0,0 +1,34 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from ..._models import BaseModel
+from .site_location import SiteLocation
+
+__all__ = ["Site"]
+
+
+class Site(BaseModel):
+ id: Optional[str] = None
+ """Identifier"""
+
+ connector_id: Optional[str] = None
+ """Magic WAN Connector identifier tag."""
+
+ description: Optional[str] = None
+
+ ha_mode: Optional[bool] = None
+ """Site high availability mode.
+
+ If set to true, the site can have two connectors and runs in high availability
+ mode.
+ """
+
+ location: Optional[SiteLocation] = None
+ """Location of site in latitude and longitude."""
+
+ name: Optional[str] = None
+ """The name of the site."""
+
+ secondary_connector_id: Optional[str] = None
+ """Magic WAN Connector identifier tag. Used when high availability mode is on."""
diff --git a/src/cloudflare/types/magic_transit/site_create_params.py b/src/cloudflare/types/magic_transit/site_create_params.py
index 1e17d1bf4671..45142eff085b 100644
--- a/src/cloudflare/types/magic_transit/site_create_params.py
+++ b/src/cloudflare/types/magic_transit/site_create_params.py
@@ -4,7 +4,9 @@
from typing_extensions import Required, TypedDict
-__all__ = ["SiteCreateParams", "Site", "SiteLocation"]
+from .site_location_param import SiteLocationParam
+
+__all__ = ["SiteCreateParams", "Site"]
class SiteCreateParams(TypedDict, total=False):
@@ -14,14 +16,6 @@ class SiteCreateParams(TypedDict, total=False):
site: Site
-class SiteLocation(TypedDict, total=False):
- lat: str
- """Latitude"""
-
- lon: str
- """Longitude"""
-
-
class Site(TypedDict, total=False):
name: Required[str]
"""The name of the site."""
@@ -38,7 +32,7 @@ class Site(TypedDict, total=False):
mode.
"""
- location: SiteLocation
+ location: SiteLocationParam
"""Location of site in latitude and longitude."""
secondary_connector_id: str
diff --git a/src/cloudflare/types/magic_transit/site_create_response.py b/src/cloudflare/types/magic_transit/site_create_response.py
index 7c275f45d483..55e109409b1f 100644
--- a/src/cloudflare/types/magic_transit/site_create_response.py
+++ b/src/cloudflare/types/magic_transit/site_create_response.py
@@ -2,43 +2,10 @@
from typing import Optional
+from .site import Site
from ..._models import BaseModel
-__all__ = ["SiteCreateResponse", "Site", "SiteLocation"]
-
-
-class SiteLocation(BaseModel):
- lat: Optional[str] = None
- """Latitude"""
-
- lon: Optional[str] = None
- """Longitude"""
-
-
-class Site(BaseModel):
- id: Optional[str] = None
- """Identifier"""
-
- connector_id: Optional[str] = None
- """Magic WAN Connector identifier tag."""
-
- description: Optional[str] = None
-
- ha_mode: Optional[bool] = None
- """Site high availability mode.
-
- If set to true, the site can have two connectors and runs in high availability
- mode.
- """
-
- location: Optional[SiteLocation] = None
- """Location of site in latitude and longitude."""
-
- name: Optional[str] = None
- """The name of the site."""
-
- secondary_connector_id: Optional[str] = None
- """Magic WAN Connector identifier tag. Used when high availability mode is on."""
+__all__ = ["SiteCreateResponse"]
class SiteCreateResponse(BaseModel):
diff --git a/src/cloudflare/types/magic_transit/site_delete_response.py b/src/cloudflare/types/magic_transit/site_delete_response.py
index 3cbaf98bbd84..b602d7591eaf 100644
--- a/src/cloudflare/types/magic_transit/site_delete_response.py
+++ b/src/cloudflare/types/magic_transit/site_delete_response.py
@@ -2,46 +2,13 @@
from typing import Optional
+from .site import Site
from ..._models import BaseModel
-__all__ = ["SiteDeleteResponse", "DeletedSite", "DeletedSiteLocation"]
-
-
-class DeletedSiteLocation(BaseModel):
- lat: Optional[str] = None
- """Latitude"""
-
- lon: Optional[str] = None
- """Longitude"""
-
-
-class DeletedSite(BaseModel):
- id: Optional[str] = None
- """Identifier"""
-
- connector_id: Optional[str] = None
- """Magic WAN Connector identifier tag."""
-
- description: Optional[str] = None
-
- ha_mode: Optional[bool] = None
- """Site high availability mode.
-
- If set to true, the site can have two connectors and runs in high availability
- mode.
- """
-
- location: Optional[DeletedSiteLocation] = None
- """Location of site in latitude and longitude."""
-
- name: Optional[str] = None
- """The name of the site."""
-
- secondary_connector_id: Optional[str] = None
- """Magic WAN Connector identifier tag. Used when high availability mode is on."""
+__all__ = ["SiteDeleteResponse"]
class SiteDeleteResponse(BaseModel):
deleted: Optional[bool] = None
- deleted_site: Optional[DeletedSite] = None
+ deleted_site: Optional[Site] = None
diff --git a/src/cloudflare/types/magic_transit/site_get_response.py b/src/cloudflare/types/magic_transit/site_get_response.py
index 561ac051c3e2..fae4bb9bc839 100644
--- a/src/cloudflare/types/magic_transit/site_get_response.py
+++ b/src/cloudflare/types/magic_transit/site_get_response.py
@@ -2,43 +2,10 @@
from typing import Optional
+from .site import Site
from ..._models import BaseModel
-__all__ = ["SiteGetResponse", "Site", "SiteLocation"]
-
-
-class SiteLocation(BaseModel):
- lat: Optional[str] = None
- """Latitude"""
-
- lon: Optional[str] = None
- """Longitude"""
-
-
-class Site(BaseModel):
- id: Optional[str] = None
- """Identifier"""
-
- connector_id: Optional[str] = None
- """Magic WAN Connector identifier tag."""
-
- description: Optional[str] = None
-
- ha_mode: Optional[bool] = None
- """Site high availability mode.
-
- If set to true, the site can have two connectors and runs in high availability
- mode.
- """
-
- location: Optional[SiteLocation] = None
- """Location of site in latitude and longitude."""
-
- name: Optional[str] = None
- """The name of the site."""
-
- secondary_connector_id: Optional[str] = None
- """Magic WAN Connector identifier tag. Used when high availability mode is on."""
+__all__ = ["SiteGetResponse"]
class SiteGetResponse(BaseModel):
diff --git a/src/cloudflare/types/magic_transit/site_list_response.py b/src/cloudflare/types/magic_transit/site_list_response.py
index 35c166fbe063..97d6db7246fa 100644
--- a/src/cloudflare/types/magic_transit/site_list_response.py
+++ b/src/cloudflare/types/magic_transit/site_list_response.py
@@ -2,43 +2,10 @@
from typing import List, Optional
+from .site import Site
from ..._models import BaseModel
-__all__ = ["SiteListResponse", "Site", "SiteLocation"]
-
-
-class SiteLocation(BaseModel):
- lat: Optional[str] = None
- """Latitude"""
-
- lon: Optional[str] = None
- """Longitude"""
-
-
-class Site(BaseModel):
- id: Optional[str] = None
- """Identifier"""
-
- connector_id: Optional[str] = None
- """Magic WAN Connector identifier tag."""
-
- description: Optional[str] = None
-
- ha_mode: Optional[bool] = None
- """Site high availability mode.
-
- If set to true, the site can have two connectors and runs in high availability
- mode.
- """
-
- location: Optional[SiteLocation] = None
- """Location of site in latitude and longitude."""
-
- name: Optional[str] = None
- """The name of the site."""
-
- secondary_connector_id: Optional[str] = None
- """Magic WAN Connector identifier tag. Used when high availability mode is on."""
+__all__ = ["SiteListResponse"]
class SiteListResponse(BaseModel):
diff --git a/src/cloudflare/types/magic_transit/site_location.py b/src/cloudflare/types/magic_transit/site_location.py
new file mode 100644
index 000000000000..6cf9417b1d57
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/site_location.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from ..._models import BaseModel
+
+__all__ = ["SiteLocation"]
+
+
+class SiteLocation(BaseModel):
+ lat: Optional[str] = None
+ """Latitude"""
+
+ lon: Optional[str] = None
+ """Longitude"""
diff --git a/src/cloudflare/types/magic_transit/site_location_param.py b/src/cloudflare/types/magic_transit/site_location_param.py
new file mode 100644
index 000000000000..ee126d180a6c
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/site_location_param.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import TypedDict
+
+__all__ = ["SiteLocationParam"]
+
+
+class SiteLocationParam(TypedDict, total=False):
+ lat: str
+ """Latitude"""
+
+ lon: str
+ """Longitude"""
diff --git a/src/cloudflare/types/magic_transit/site_update_params.py b/src/cloudflare/types/magic_transit/site_update_params.py
index 74c96c227de7..9d4dd3209686 100644
--- a/src/cloudflare/types/magic_transit/site_update_params.py
+++ b/src/cloudflare/types/magic_transit/site_update_params.py
@@ -4,7 +4,9 @@
from typing_extensions import Required, TypedDict
-__all__ = ["SiteUpdateParams", "Site", "SiteLocation"]
+from .site_location_param import SiteLocationParam
+
+__all__ = ["SiteUpdateParams", "Site"]
class SiteUpdateParams(TypedDict, total=False):
@@ -14,21 +16,13 @@ class SiteUpdateParams(TypedDict, total=False):
site: Site
-class SiteLocation(TypedDict, total=False):
- lat: str
- """Latitude"""
-
- lon: str
- """Longitude"""
-
-
class Site(TypedDict, total=False):
connector_id: str
"""Magic WAN Connector identifier tag."""
description: str
- location: SiteLocation
+ location: SiteLocationParam
"""Location of site in latitude and longitude."""
name: str
diff --git a/src/cloudflare/types/magic_transit/site_update_response.py b/src/cloudflare/types/magic_transit/site_update_response.py
index 421808a4a06a..caf438d0f773 100644
--- a/src/cloudflare/types/magic_transit/site_update_response.py
+++ b/src/cloudflare/types/magic_transit/site_update_response.py
@@ -2,43 +2,10 @@
from typing import Optional
+from .site import Site
from ..._models import BaseModel
-__all__ = ["SiteUpdateResponse", "Site", "SiteLocation"]
-
-
-class SiteLocation(BaseModel):
- lat: Optional[str] = None
- """Latitude"""
-
- lon: Optional[str] = None
- """Longitude"""
-
-
-class Site(BaseModel):
- id: Optional[str] = None
- """Identifier"""
-
- connector_id: Optional[str] = None
- """Magic WAN Connector identifier tag."""
-
- description: Optional[str] = None
-
- ha_mode: Optional[bool] = None
- """Site high availability mode.
-
- If set to true, the site can have two connectors and runs in high availability
- mode.
- """
-
- location: Optional[SiteLocation] = None
- """Location of site in latitude and longitude."""
-
- name: Optional[str] = None
- """The name of the site."""
-
- secondary_connector_id: Optional[str] = None
- """Magic WAN Connector identifier tag. Used when high availability mode is on."""
+__all__ = ["SiteUpdateResponse"]
class SiteUpdateResponse(BaseModel):
diff --git a/src/cloudflare/types/magic_transit/sites/__init__.py b/src/cloudflare/types/magic_transit/sites/__init__.py
index 0d2729d98a66..b6662da7fe00 100644
--- a/src/cloudflare/types/magic_transit/sites/__init__.py
+++ b/src/cloudflare/types/magic_transit/sites/__init__.py
@@ -2,17 +2,31 @@
from __future__ import annotations
+from .acl import ACL as ACL
+from .lan import LAN as LAN
+from .nat import Nat as Nat
+from .wan import WAN as WAN
+from .subnet import Subnet as Subnet
+from .nat_param import NatParam as NatParam
+from .dhcp_relay import DHCPRelay as DHCPRelay
+from .dhcp_server import DHCPServer as DHCPServer
+from .subnet_param import SubnetParam as SubnetParam
+from .routed_subnet import RoutedSubnet as RoutedSubnet
from .acl_get_response import ACLGetResponse as ACLGetResponse
+from .dhcp_relay_param import DHCPRelayParam as DHCPRelayParam
from .lan_get_response import LANGetResponse as LANGetResponse
from .wan_get_response import WANGetResponse as WANGetResponse
+from .acl_configuration import ACLConfiguration as ACLConfiguration
from .acl_create_params import ACLCreateParams as ACLCreateParams
from .acl_delete_params import ACLDeleteParams as ACLDeleteParams
from .acl_list_response import ACLListResponse as ACLListResponse
from .acl_update_params import ACLUpdateParams as ACLUpdateParams
+from .dhcp_server_param import DHCPServerParam as DHCPServerParam
from .lan_create_params import LANCreateParams as LANCreateParams
from .lan_delete_params import LANDeleteParams as LANDeleteParams
from .lan_list_response import LANListResponse as LANListResponse
from .lan_update_params import LANUpdateParams as LANUpdateParams
+from .static_addressing import StaticAddressing as StaticAddressing
from .wan_create_params import WANCreateParams as WANCreateParams
from .wan_delete_params import WANDeleteParams as WANDeleteParams
from .wan_list_response import WANListResponse as WANListResponse
@@ -23,9 +37,12 @@
from .lan_create_response import LANCreateResponse as LANCreateResponse
from .lan_delete_response import LANDeleteResponse as LANDeleteResponse
from .lan_update_response import LANUpdateResponse as LANUpdateResponse
+from .routed_subnet_param import RoutedSubnetParam as RoutedSubnetParam
from .wan_create_response import WANCreateResponse as WANCreateResponse
from .wan_delete_response import WANDeleteResponse as WANDeleteResponse
from .wan_update_response import WANUpdateResponse as WANUpdateResponse
+from .acl_configuration_param import ACLConfigurationParam as ACLConfigurationParam
+from .static_addressing_param import StaticAddressingParam as StaticAddressingParam
from .unnamed_schema_ref_87fa9e5fe9f6b8d607be1df57340d916 import (
UnnamedSchemaRef87fa9e5fe9f6b8d607be1df57340d916 as UnnamedSchemaRef87fa9e5fe9f6b8d607be1df57340d916,
)
diff --git a/src/cloudflare/types/magic_transit/sites/acl.py b/src/cloudflare/types/magic_transit/sites/acl.py
new file mode 100644
index 000000000000..4c678220ffc0
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/sites/acl.py
@@ -0,0 +1,34 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+
+from ...._models import BaseModel
+from .acl_configuration import ACLConfiguration
+from .unnamed_schema_ref_87fa9e5fe9f6b8d607be1df57340d916 import UnnamedSchemaRef87fa9e5fe9f6b8d607be1df57340d916
+
+__all__ = ["ACL"]
+
+
+class ACL(BaseModel):
+ id: Optional[str] = None
+ """Identifier"""
+
+ description: Optional[str] = None
+ """Description for the ACL."""
+
+ forward_locally: Optional[bool] = None
+ """The desired forwarding action for this ACL policy.
+
+ If set to "false", the policy will forward traffic to Cloudflare. If set to
+ "true", the policy will forward traffic locally on the Magic WAN Connector. If
+ not included in request, will default to false.
+ """
+
+ lan_1: Optional[ACLConfiguration] = None
+
+ lan_2: Optional[ACLConfiguration] = None
+
+ name: Optional[str] = None
+ """The name of the ACL."""
+
+ protocols: Optional[List[UnnamedSchemaRef87fa9e5fe9f6b8d607be1df57340d916]] = None
diff --git a/src/cloudflare/types/magic_transit/sites/acl_configuration.py b/src/cloudflare/types/magic_transit/sites/acl_configuration.py
new file mode 100644
index 000000000000..6c934b500b55
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/sites/acl_configuration.py
@@ -0,0 +1,29 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+
+from .subnet import Subnet
+from ...._models import BaseModel
+
+__all__ = ["ACLConfiguration"]
+
+
+class ACLConfiguration(BaseModel):
+ lan_id: str
+ """The identifier for the LAN you want to create an ACL policy with."""
+
+ lan_name: Optional[str] = None
+ """The name of the LAN based on the provided lan_id."""
+
+ ports: Optional[List[int]] = None
+ """Array of ports on the provided LAN that will be included in the ACL.
+
+ If no ports are provided, communication on any port on this LAN is allowed.
+ """
+
+ subnets: Optional[List[Subnet]] = None
+ """Array of subnet IPs within the LAN that will be included in the ACL.
+
+ If no subnets are provided, communication on any subnets on this LAN are
+ allowed.
+ """
diff --git a/src/cloudflare/types/magic_transit/sites/acl_configuration_param.py b/src/cloudflare/types/magic_transit/sites/acl_configuration_param.py
new file mode 100644
index 000000000000..918fe9e26286
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/sites/acl_configuration_param.py
@@ -0,0 +1,31 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Iterable
+from typing_extensions import Required, TypedDict
+
+from .subnet_param import SubnetParam
+
+__all__ = ["ACLConfigurationParam"]
+
+
+class ACLConfigurationParam(TypedDict, total=False):
+ lan_id: Required[str]
+ """The identifier for the LAN you want to create an ACL policy with."""
+
+ lan_name: str
+ """The name of the LAN based on the provided lan_id."""
+
+ ports: Iterable[int]
+ """Array of ports on the provided LAN that will be included in the ACL.
+
+ If no ports are provided, communication on any port on this LAN is allowed.
+ """
+
+ subnets: List[SubnetParam]
+ """Array of subnet IPs within the LAN that will be included in the ACL.
+
+ If no subnets are provided, communication on any subnets on this LAN are
+ allowed.
+ """
diff --git a/src/cloudflare/types/magic_transit/sites/acl_create_params.py b/src/cloudflare/types/magic_transit/sites/acl_create_params.py
index 15bba0db03e5..44ce0d3e5861 100644
--- a/src/cloudflare/types/magic_transit/sites/acl_create_params.py
+++ b/src/cloudflare/types/magic_transit/sites/acl_create_params.py
@@ -2,12 +2,13 @@
from __future__ import annotations
-from typing import List, Union, Iterable
+from typing import List
from typing_extensions import Required, TypedDict
+from .acl_configuration_param import ACLConfigurationParam
from .unnamed_schema_ref_87fa9e5fe9f6b8d607be1df57340d916 import UnnamedSchemaRef87fa9e5fe9f6b8d607be1df57340d916
-__all__ = ["ACLCreateParams", "ACL", "ACLLAN1", "ACLLAN2"]
+__all__ = ["ACLCreateParams", "ACL"]
class ACLCreateParams(TypedDict, total=False):
@@ -17,52 +18,10 @@ class ACLCreateParams(TypedDict, total=False):
acl: ACL
-class ACLLAN1(TypedDict, total=False):
- lan_id: Required[str]
- """The identifier for the LAN you want to create an ACL policy with."""
-
- lan_name: str
- """The name of the LAN based on the provided lan_id."""
-
- ports: Iterable[int]
- """Array of ports on the provided LAN that will be included in the ACL.
-
- If no ports are provided, communication on any port on this LAN is allowed.
- """
-
- subnets: List[Union[str, str]]
- """Array of subnet IPs within the LAN that will be included in the ACL.
-
- If no subnets are provided, communication on any subnets on this LAN are
- allowed.
- """
-
-
-class ACLLAN2(TypedDict, total=False):
- lan_id: Required[str]
- """The identifier for the LAN you want to create an ACL policy with."""
-
- lan_name: str
- """The name of the LAN based on the provided lan_id."""
-
- ports: Iterable[int]
- """Array of ports on the provided LAN that will be included in the ACL.
-
- If no ports are provided, communication on any port on this LAN is allowed.
- """
-
- subnets: List[Union[str, str]]
- """Array of subnet IPs within the LAN that will be included in the ACL.
-
- If no subnets are provided, communication on any subnets on this LAN are
- allowed.
- """
-
-
class ACL(TypedDict, total=False):
- lan_1: Required[ACLLAN1]
+ lan_1: Required[ACLConfigurationParam]
- lan_2: Required[ACLLAN2]
+ lan_2: Required[ACLConfigurationParam]
name: Required[str]
"""The name of the ACL."""
diff --git a/src/cloudflare/types/magic_transit/sites/acl_create_response.py b/src/cloudflare/types/magic_transit/sites/acl_create_response.py
index 9e3f0f0ee579..f189c818561b 100644
--- a/src/cloudflare/types/magic_transit/sites/acl_create_response.py
+++ b/src/cloudflare/types/magic_transit/sites/acl_create_response.py
@@ -1,78 +1,11 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Union, Optional
+from typing import List, Optional
+from .acl import ACL
from ...._models import BaseModel
-from .unnamed_schema_ref_87fa9e5fe9f6b8d607be1df57340d916 import UnnamedSchemaRef87fa9e5fe9f6b8d607be1df57340d916
-__all__ = ["ACLCreateResponse", "ACL", "ACLLAN1", "ACLLAN2"]
-
-
-class ACLLAN1(BaseModel):
- lan_id: str
- """The identifier for the LAN you want to create an ACL policy with."""
-
- lan_name: Optional[str] = None
- """The name of the LAN based on the provided lan_id."""
-
- ports: Optional[List[int]] = None
- """Array of ports on the provided LAN that will be included in the ACL.
-
- If no ports are provided, communication on any port on this LAN is allowed.
- """
-
- subnets: Optional[List[Union[str, str]]] = None
- """Array of subnet IPs within the LAN that will be included in the ACL.
-
- If no subnets are provided, communication on any subnets on this LAN are
- allowed.
- """
-
-
-class ACLLAN2(BaseModel):
- lan_id: str
- """The identifier for the LAN you want to create an ACL policy with."""
-
- lan_name: Optional[str] = None
- """The name of the LAN based on the provided lan_id."""
-
- ports: Optional[List[int]] = None
- """Array of ports on the provided LAN that will be included in the ACL.
-
- If no ports are provided, communication on any port on this LAN is allowed.
- """
-
- subnets: Optional[List[Union[str, str]]] = None
- """Array of subnet IPs within the LAN that will be included in the ACL.
-
- If no subnets are provided, communication on any subnets on this LAN are
- allowed.
- """
-
-
-class ACL(BaseModel):
- id: Optional[str] = None
- """Identifier"""
-
- description: Optional[str] = None
- """Description for the ACL."""
-
- forward_locally: Optional[bool] = None
- """The desired forwarding action for this ACL policy.
-
- If set to "false", the policy will forward traffic to Cloudflare. If set to
- "true", the policy will forward traffic locally on the Magic WAN Connector. If
- not included in request, will default to false.
- """
-
- lan_1: Optional[ACLLAN1] = None
-
- lan_2: Optional[ACLLAN2] = None
-
- name: Optional[str] = None
- """The name of the ACL."""
-
- protocols: Optional[List[UnnamedSchemaRef87fa9e5fe9f6b8d607be1df57340d916]] = None
+__all__ = ["ACLCreateResponse"]
class ACLCreateResponse(BaseModel):
diff --git a/src/cloudflare/types/magic_transit/sites/acl_delete_response.py b/src/cloudflare/types/magic_transit/sites/acl_delete_response.py
index 18e3c1dbe684..b1c32352183f 100644
--- a/src/cloudflare/types/magic_transit/sites/acl_delete_response.py
+++ b/src/cloudflare/types/magic_transit/sites/acl_delete_response.py
@@ -1,82 +1,15 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Union, Optional
+from typing import Optional
+from .acl import ACL
from ...._models import BaseModel
-from .unnamed_schema_ref_87fa9e5fe9f6b8d607be1df57340d916 import UnnamedSchemaRef87fa9e5fe9f6b8d607be1df57340d916
-__all__ = ["ACLDeleteResponse", "DeletedACL", "DeletedACLLAN1", "DeletedACLLAN2"]
-
-
-class DeletedACLLAN1(BaseModel):
- lan_id: str
- """The identifier for the LAN you want to create an ACL policy with."""
-
- lan_name: Optional[str] = None
- """The name of the LAN based on the provided lan_id."""
-
- ports: Optional[List[int]] = None
- """Array of ports on the provided LAN that will be included in the ACL.
-
- If no ports are provided, communication on any port on this LAN is allowed.
- """
-
- subnets: Optional[List[Union[str, str]]] = None
- """Array of subnet IPs within the LAN that will be included in the ACL.
-
- If no subnets are provided, communication on any subnets on this LAN are
- allowed.
- """
-
-
-class DeletedACLLAN2(BaseModel):
- lan_id: str
- """The identifier for the LAN you want to create an ACL policy with."""
-
- lan_name: Optional[str] = None
- """The name of the LAN based on the provided lan_id."""
-
- ports: Optional[List[int]] = None
- """Array of ports on the provided LAN that will be included in the ACL.
-
- If no ports are provided, communication on any port on this LAN is allowed.
- """
-
- subnets: Optional[List[Union[str, str]]] = None
- """Array of subnet IPs within the LAN that will be included in the ACL.
-
- If no subnets are provided, communication on any subnets on this LAN are
- allowed.
- """
-
-
-class DeletedACL(BaseModel):
- id: Optional[str] = None
- """Identifier"""
-
- description: Optional[str] = None
- """Description for the ACL."""
-
- forward_locally: Optional[bool] = None
- """The desired forwarding action for this ACL policy.
-
- If set to "false", the policy will forward traffic to Cloudflare. If set to
- "true", the policy will forward traffic locally on the Magic WAN Connector. If
- not included in request, will default to false.
- """
-
- lan_1: Optional[DeletedACLLAN1] = None
-
- lan_2: Optional[DeletedACLLAN2] = None
-
- name: Optional[str] = None
- """The name of the ACL."""
-
- protocols: Optional[List[UnnamedSchemaRef87fa9e5fe9f6b8d607be1df57340d916]] = None
+__all__ = ["ACLDeleteResponse"]
class ACLDeleteResponse(BaseModel):
deleted: Optional[bool] = None
- deleted_acl: Optional[DeletedACL] = None
+ deleted_acl: Optional[ACL] = None
"""Bidirectional ACL policy for network traffic within a site."""
diff --git a/src/cloudflare/types/magic_transit/sites/acl_get_response.py b/src/cloudflare/types/magic_transit/sites/acl_get_response.py
index 6b7a269d9686..b6e0ab4afacb 100644
--- a/src/cloudflare/types/magic_transit/sites/acl_get_response.py
+++ b/src/cloudflare/types/magic_transit/sites/acl_get_response.py
@@ -1,78 +1,11 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Union, Optional
+from typing import Optional
+from .acl import ACL
from ...._models import BaseModel
-from .unnamed_schema_ref_87fa9e5fe9f6b8d607be1df57340d916 import UnnamedSchemaRef87fa9e5fe9f6b8d607be1df57340d916
-__all__ = ["ACLGetResponse", "ACL", "ACLLAN1", "ACLLAN2"]
-
-
-class ACLLAN1(BaseModel):
- lan_id: str
- """The identifier for the LAN you want to create an ACL policy with."""
-
- lan_name: Optional[str] = None
- """The name of the LAN based on the provided lan_id."""
-
- ports: Optional[List[int]] = None
- """Array of ports on the provided LAN that will be included in the ACL.
-
- If no ports are provided, communication on any port on this LAN is allowed.
- """
-
- subnets: Optional[List[Union[str, str]]] = None
- """Array of subnet IPs within the LAN that will be included in the ACL.
-
- If no subnets are provided, communication on any subnets on this LAN are
- allowed.
- """
-
-
-class ACLLAN2(BaseModel):
- lan_id: str
- """The identifier for the LAN you want to create an ACL policy with."""
-
- lan_name: Optional[str] = None
- """The name of the LAN based on the provided lan_id."""
-
- ports: Optional[List[int]] = None
- """Array of ports on the provided LAN that will be included in the ACL.
-
- If no ports are provided, communication on any port on this LAN is allowed.
- """
-
- subnets: Optional[List[Union[str, str]]] = None
- """Array of subnet IPs within the LAN that will be included in the ACL.
-
- If no subnets are provided, communication on any subnets on this LAN are
- allowed.
- """
-
-
-class ACL(BaseModel):
- id: Optional[str] = None
- """Identifier"""
-
- description: Optional[str] = None
- """Description for the ACL."""
-
- forward_locally: Optional[bool] = None
- """The desired forwarding action for this ACL policy.
-
- If set to "false", the policy will forward traffic to Cloudflare. If set to
- "true", the policy will forward traffic locally on the Magic WAN Connector. If
- not included in request, will default to false.
- """
-
- lan_1: Optional[ACLLAN1] = None
-
- lan_2: Optional[ACLLAN2] = None
-
- name: Optional[str] = None
- """The name of the ACL."""
-
- protocols: Optional[List[UnnamedSchemaRef87fa9e5fe9f6b8d607be1df57340d916]] = None
+__all__ = ["ACLGetResponse"]
class ACLGetResponse(BaseModel):
diff --git a/src/cloudflare/types/magic_transit/sites/acl_list_response.py b/src/cloudflare/types/magic_transit/sites/acl_list_response.py
index aa5dc03d407f..28d1a4eabe7b 100644
--- a/src/cloudflare/types/magic_transit/sites/acl_list_response.py
+++ b/src/cloudflare/types/magic_transit/sites/acl_list_response.py
@@ -1,78 +1,11 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Union, Optional
+from typing import List, Optional
+from .acl import ACL
from ...._models import BaseModel
-from .unnamed_schema_ref_87fa9e5fe9f6b8d607be1df57340d916 import UnnamedSchemaRef87fa9e5fe9f6b8d607be1df57340d916
-__all__ = ["ACLListResponse", "ACL", "ACLLAN1", "ACLLAN2"]
-
-
-class ACLLAN1(BaseModel):
- lan_id: str
- """The identifier for the LAN you want to create an ACL policy with."""
-
- lan_name: Optional[str] = None
- """The name of the LAN based on the provided lan_id."""
-
- ports: Optional[List[int]] = None
- """Array of ports on the provided LAN that will be included in the ACL.
-
- If no ports are provided, communication on any port on this LAN is allowed.
- """
-
- subnets: Optional[List[Union[str, str]]] = None
- """Array of subnet IPs within the LAN that will be included in the ACL.
-
- If no subnets are provided, communication on any subnets on this LAN are
- allowed.
- """
-
-
-class ACLLAN2(BaseModel):
- lan_id: str
- """The identifier for the LAN you want to create an ACL policy with."""
-
- lan_name: Optional[str] = None
- """The name of the LAN based on the provided lan_id."""
-
- ports: Optional[List[int]] = None
- """Array of ports on the provided LAN that will be included in the ACL.
-
- If no ports are provided, communication on any port on this LAN is allowed.
- """
-
- subnets: Optional[List[Union[str, str]]] = None
- """Array of subnet IPs within the LAN that will be included in the ACL.
-
- If no subnets are provided, communication on any subnets on this LAN are
- allowed.
- """
-
-
-class ACL(BaseModel):
- id: Optional[str] = None
- """Identifier"""
-
- description: Optional[str] = None
- """Description for the ACL."""
-
- forward_locally: Optional[bool] = None
- """The desired forwarding action for this ACL policy.
-
- If set to "false", the policy will forward traffic to Cloudflare. If set to
- "true", the policy will forward traffic locally on the Magic WAN Connector. If
- not included in request, will default to false.
- """
-
- lan_1: Optional[ACLLAN1] = None
-
- lan_2: Optional[ACLLAN2] = None
-
- name: Optional[str] = None
- """The name of the ACL."""
-
- protocols: Optional[List[UnnamedSchemaRef87fa9e5fe9f6b8d607be1df57340d916]] = None
+__all__ = ["ACLListResponse"]
class ACLListResponse(BaseModel):
diff --git a/src/cloudflare/types/magic_transit/sites/acl_update_params.py b/src/cloudflare/types/magic_transit/sites/acl_update_params.py
index 082a1165eb63..3cc5d19192a6 100644
--- a/src/cloudflare/types/magic_transit/sites/acl_update_params.py
+++ b/src/cloudflare/types/magic_transit/sites/acl_update_params.py
@@ -2,12 +2,13 @@
from __future__ import annotations
-from typing import List, Union, Iterable
+from typing import List
from typing_extensions import Required, TypedDict
+from .acl_configuration_param import ACLConfigurationParam
from .unnamed_schema_ref_87fa9e5fe9f6b8d607be1df57340d916 import UnnamedSchemaRef87fa9e5fe9f6b8d607be1df57340d916
-__all__ = ["ACLUpdateParams", "ACL", "ACLLAN1", "ACLLAN2"]
+__all__ = ["ACLUpdateParams", "ACL"]
class ACLUpdateParams(TypedDict, total=False):
@@ -20,48 +21,6 @@ class ACLUpdateParams(TypedDict, total=False):
acl: ACL
-class ACLLAN1(TypedDict, total=False):
- lan_id: Required[str]
- """The identifier for the LAN you want to create an ACL policy with."""
-
- lan_name: str
- """The name of the LAN based on the provided lan_id."""
-
- ports: Iterable[int]
- """Array of ports on the provided LAN that will be included in the ACL.
-
- If no ports are provided, communication on any port on this LAN is allowed.
- """
-
- subnets: List[Union[str, str]]
- """Array of subnet IPs within the LAN that will be included in the ACL.
-
- If no subnets are provided, communication on any subnets on this LAN are
- allowed.
- """
-
-
-class ACLLAN2(TypedDict, total=False):
- lan_id: Required[str]
- """The identifier for the LAN you want to create an ACL policy with."""
-
- lan_name: str
- """The name of the LAN based on the provided lan_id."""
-
- ports: Iterable[int]
- """Array of ports on the provided LAN that will be included in the ACL.
-
- If no ports are provided, communication on any port on this LAN is allowed.
- """
-
- subnets: List[Union[str, str]]
- """Array of subnet IPs within the LAN that will be included in the ACL.
-
- If no subnets are provided, communication on any subnets on this LAN are
- allowed.
- """
-
-
class ACL(TypedDict, total=False):
description: str
"""Description for the ACL."""
@@ -74,9 +33,9 @@ class ACL(TypedDict, total=False):
not included in request, will default to false.
"""
- lan_1: ACLLAN1
+ lan_1: ACLConfigurationParam
- lan_2: ACLLAN2
+ lan_2: ACLConfigurationParam
name: str
"""The name of the ACL."""
diff --git a/src/cloudflare/types/magic_transit/sites/acl_update_response.py b/src/cloudflare/types/magic_transit/sites/acl_update_response.py
index e3cbf6ce91f6..34d4f1a71024 100644
--- a/src/cloudflare/types/magic_transit/sites/acl_update_response.py
+++ b/src/cloudflare/types/magic_transit/sites/acl_update_response.py
@@ -1,78 +1,11 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Union, Optional
+from typing import Optional
+from .acl import ACL
from ...._models import BaseModel
-from .unnamed_schema_ref_87fa9e5fe9f6b8d607be1df57340d916 import UnnamedSchemaRef87fa9e5fe9f6b8d607be1df57340d916
-__all__ = ["ACLUpdateResponse", "ACL", "ACLLAN1", "ACLLAN2"]
-
-
-class ACLLAN1(BaseModel):
- lan_id: str
- """The identifier for the LAN you want to create an ACL policy with."""
-
- lan_name: Optional[str] = None
- """The name of the LAN based on the provided lan_id."""
-
- ports: Optional[List[int]] = None
- """Array of ports on the provided LAN that will be included in the ACL.
-
- If no ports are provided, communication on any port on this LAN is allowed.
- """
-
- subnets: Optional[List[Union[str, str]]] = None
- """Array of subnet IPs within the LAN that will be included in the ACL.
-
- If no subnets are provided, communication on any subnets on this LAN are
- allowed.
- """
-
-
-class ACLLAN2(BaseModel):
- lan_id: str
- """The identifier for the LAN you want to create an ACL policy with."""
-
- lan_name: Optional[str] = None
- """The name of the LAN based on the provided lan_id."""
-
- ports: Optional[List[int]] = None
- """Array of ports on the provided LAN that will be included in the ACL.
-
- If no ports are provided, communication on any port on this LAN is allowed.
- """
-
- subnets: Optional[List[Union[str, str]]] = None
- """Array of subnet IPs within the LAN that will be included in the ACL.
-
- If no subnets are provided, communication on any subnets on this LAN are
- allowed.
- """
-
-
-class ACL(BaseModel):
- id: Optional[str] = None
- """Identifier"""
-
- description: Optional[str] = None
- """Description for the ACL."""
-
- forward_locally: Optional[bool] = None
- """The desired forwarding action for this ACL policy.
-
- If set to "false", the policy will forward traffic to Cloudflare. If set to
- "true", the policy will forward traffic locally on the Magic WAN Connector. If
- not included in request, will default to false.
- """
-
- lan_1: Optional[ACLLAN1] = None
-
- lan_2: Optional[ACLLAN2] = None
-
- name: Optional[str] = None
- """The name of the ACL."""
-
- protocols: Optional[List[UnnamedSchemaRef87fa9e5fe9f6b8d607be1df57340d916]] = None
+__all__ = ["ACLUpdateResponse"]
class ACLUpdateResponse(BaseModel):
diff --git a/src/cloudflare/types/magic_transit/sites/dhcp_relay.py b/src/cloudflare/types/magic_transit/sites/dhcp_relay.py
new file mode 100644
index 000000000000..573ae4e9a643
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/sites/dhcp_relay.py
@@ -0,0 +1,12 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+
+from ...._models import BaseModel
+
+__all__ = ["DHCPRelay"]
+
+
+class DHCPRelay(BaseModel):
+ server_addresses: Optional[List[str]] = None
+ """List of DHCP server IPs."""
diff --git a/src/cloudflare/types/magic_transit/sites/dhcp_relay_param.py b/src/cloudflare/types/magic_transit/sites/dhcp_relay_param.py
new file mode 100644
index 000000000000..d683a3210281
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/sites/dhcp_relay_param.py
@@ -0,0 +1,13 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List
+from typing_extensions import TypedDict
+
+__all__ = ["DHCPRelayParam"]
+
+
+class DHCPRelayParam(TypedDict, total=False):
+ server_addresses: List[str]
+ """List of DHCP server IPs."""
diff --git a/src/cloudflare/types/magic_transit/sites/dhcp_server.py b/src/cloudflare/types/magic_transit/sites/dhcp_server.py
new file mode 100644
index 000000000000..2afdcdc65dd7
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/sites/dhcp_server.py
@@ -0,0 +1,21 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Optional
+
+from ...._models import BaseModel
+
+__all__ = ["DHCPServer"]
+
+
+class DHCPServer(BaseModel):
+ dhcp_pool_end: Optional[str] = None
+ """A valid IPv4 address."""
+
+ dhcp_pool_start: Optional[str] = None
+ """A valid IPv4 address."""
+
+ dns_server: Optional[str] = None
+ """A valid IPv4 address."""
+
+ reservations: Optional[Dict[str, str]] = None
+ """Mapping of MAC addresses to IP addresses"""
diff --git a/src/cloudflare/types/magic_transit/sites/dhcp_server_param.py b/src/cloudflare/types/magic_transit/sites/dhcp_server_param.py
new file mode 100644
index 000000000000..85bfb2f77458
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/sites/dhcp_server_param.py
@@ -0,0 +1,22 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict
+from typing_extensions import TypedDict
+
+__all__ = ["DHCPServerParam"]
+
+
+class DHCPServerParam(TypedDict, total=False):
+ dhcp_pool_end: str
+ """A valid IPv4 address."""
+
+ dhcp_pool_start: str
+ """A valid IPv4 address."""
+
+ dns_server: str
+ """A valid IPv4 address."""
+
+ reservations: Dict[str, str]
+ """Mapping of MAC addresses to IP addresses"""
diff --git a/src/cloudflare/types/magic_transit/sites/lan.py b/src/cloudflare/types/magic_transit/sites/lan.py
new file mode 100644
index 000000000000..fab939f93622
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/sites/lan.py
@@ -0,0 +1,42 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+
+from .nat import Nat
+from ...._models import BaseModel
+from .routed_subnet import RoutedSubnet
+from .static_addressing import StaticAddressing
+
+__all__ = ["LAN"]
+
+
+class LAN(BaseModel):
+ id: Optional[str] = None
+ """Identifier"""
+
+ description: Optional[str] = None
+
+ ha_link: Optional[bool] = None
+ """mark true to use this LAN for HA probing.
+
+ only works for site with HA turned on. only one LAN can be set as the ha_link.
+ """
+
+ nat: Optional[Nat] = None
+
+ physport: Optional[int] = None
+
+ routed_subnets: Optional[List[RoutedSubnet]] = None
+
+ site_id: Optional[str] = None
+ """Identifier"""
+
+ static_addressing: Optional[StaticAddressing] = None
+ """
+ If the site is not configured in high availability mode, this configuration is
+ optional (if omitted, use DHCP). However, if in high availability mode,
+ static_address is required along with secondary and virtual address.
+ """
+
+ vlan_tag: Optional[int] = None
+ """VLAN port number."""
diff --git a/src/cloudflare/types/magic_transit/sites/lan_create_params.py b/src/cloudflare/types/magic_transit/sites/lan_create_params.py
index c9db9d7c6679..36e6cbb128ba 100644
--- a/src/cloudflare/types/magic_transit/sites/lan_create_params.py
+++ b/src/cloudflare/types/magic_transit/sites/lan_create_params.py
@@ -2,19 +2,14 @@
from __future__ import annotations
-from typing import Dict, List, Iterable
+from typing import Iterable
from typing_extensions import Required, TypedDict
-__all__ = [
- "LANCreateParams",
- "LAN",
- "LANNat",
- "LANRoutedSubnet",
- "LANRoutedSubnetNat",
- "LANStaticAddressing",
- "LANStaticAddressingDHCPRelay",
- "LANStaticAddressingDHCPServer",
-]
+from .nat_param import NatParam
+from .routed_subnet_param import RoutedSubnetParam
+from .static_addressing_param import StaticAddressingParam
+
+__all__ = ["LANCreateParams", "LAN"]
class LANCreateParams(TypedDict, total=False):
@@ -24,60 +19,6 @@ class LANCreateParams(TypedDict, total=False):
lan: LAN
-class LANNat(TypedDict, total=False):
- static_prefix: str
- """A valid CIDR notation representing an IP range."""
-
-
-class LANRoutedSubnetNat(TypedDict, total=False):
- static_prefix: str
- """A valid CIDR notation representing an IP range."""
-
-
-class LANRoutedSubnet(TypedDict, total=False):
- next_hop: Required[str]
- """A valid IPv4 address."""
-
- prefix: Required[str]
- """A valid CIDR notation representing an IP range."""
-
- nat: LANRoutedSubnetNat
-
-
-class LANStaticAddressingDHCPRelay(TypedDict, total=False):
- server_addresses: List[str]
- """List of DHCP server IPs."""
-
-
-class LANStaticAddressingDHCPServer(TypedDict, total=False):
- dhcp_pool_end: str
- """A valid IPv4 address."""
-
- dhcp_pool_start: str
- """A valid IPv4 address."""
-
- dns_server: str
- """A valid IPv4 address."""
-
- reservations: Dict[str, str]
- """Mapping of MAC addresses to IP addresses"""
-
-
-class LANStaticAddressing(TypedDict, total=False):
- address: Required[str]
- """A valid CIDR notation representing an IP range."""
-
- dhcp_relay: LANStaticAddressingDHCPRelay
-
- dhcp_server: LANStaticAddressingDHCPServer
-
- secondary_address: str
- """A valid CIDR notation representing an IP range."""
-
- virtual_address: str
- """A valid CIDR notation representing an IP range."""
-
-
class LAN(TypedDict, total=False):
physport: Required[int]
@@ -92,11 +33,11 @@ class LAN(TypedDict, total=False):
only works for site with HA turned on. only one LAN can be set as the ha_link.
"""
- nat: LANNat
+ nat: NatParam
- routed_subnets: Iterable[LANRoutedSubnet]
+ routed_subnets: Iterable[RoutedSubnetParam]
- static_addressing: LANStaticAddressing
+ static_addressing: StaticAddressingParam
"""
If the site is not configured in high availability mode, this configuration is
optional (if omitted, use DHCP). However, if in high availability mode,
diff --git a/src/cloudflare/types/magic_transit/sites/lan_create_response.py b/src/cloudflare/types/magic_transit/sites/lan_create_response.py
index 38cc8a9a4faa..3f52c9517715 100644
--- a/src/cloudflare/types/magic_transit/sites/lan_create_response.py
+++ b/src/cloudflare/types/magic_transit/sites/lan_create_response.py
@@ -1,105 +1,11 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Optional
+from typing import List, Optional
+from .lan import LAN
from ...._models import BaseModel
-__all__ = [
- "LANCreateResponse",
- "LAN",
- "LANNat",
- "LANRoutedSubnet",
- "LANRoutedSubnetNat",
- "LANStaticAddressing",
- "LANStaticAddressingDHCPRelay",
- "LANStaticAddressingDHCPServer",
-]
-
-
-class LANNat(BaseModel):
- static_prefix: Optional[str] = None
- """A valid CIDR notation representing an IP range."""
-
-
-class LANRoutedSubnetNat(BaseModel):
- static_prefix: Optional[str] = None
- """A valid CIDR notation representing an IP range."""
-
-
-class LANRoutedSubnet(BaseModel):
- next_hop: str
- """A valid IPv4 address."""
-
- prefix: str
- """A valid CIDR notation representing an IP range."""
-
- nat: Optional[LANRoutedSubnetNat] = None
-
-
-class LANStaticAddressingDHCPRelay(BaseModel):
- server_addresses: Optional[List[str]] = None
- """List of DHCP server IPs."""
-
-
-class LANStaticAddressingDHCPServer(BaseModel):
- dhcp_pool_end: Optional[str] = None
- """A valid IPv4 address."""
-
- dhcp_pool_start: Optional[str] = None
- """A valid IPv4 address."""
-
- dns_server: Optional[str] = None
- """A valid IPv4 address."""
-
- reservations: Optional[Dict[str, str]] = None
- """Mapping of MAC addresses to IP addresses"""
-
-
-class LANStaticAddressing(BaseModel):
- address: str
- """A valid CIDR notation representing an IP range."""
-
- dhcp_relay: Optional[LANStaticAddressingDHCPRelay] = None
-
- dhcp_server: Optional[LANStaticAddressingDHCPServer] = None
-
- secondary_address: Optional[str] = None
- """A valid CIDR notation representing an IP range."""
-
- virtual_address: Optional[str] = None
- """A valid CIDR notation representing an IP range."""
-
-
-class LAN(BaseModel):
- id: Optional[str] = None
- """Identifier"""
-
- description: Optional[str] = None
-
- ha_link: Optional[bool] = None
- """mark true to use this LAN for HA probing.
-
- only works for site with HA turned on. only one LAN can be set as the ha_link.
- """
-
- nat: Optional[LANNat] = None
-
- physport: Optional[int] = None
-
- routed_subnets: Optional[List[LANRoutedSubnet]] = None
-
- site_id: Optional[str] = None
- """Identifier"""
-
- static_addressing: Optional[LANStaticAddressing] = None
- """
- If the site is not configured in high availability mode, this configuration is
- optional (if omitted, use DHCP). However, if in high availability mode,
- static_address is required along with secondary and virtual address.
- """
-
- vlan_tag: Optional[int] = None
- """VLAN port number."""
+__all__ = ["LANCreateResponse"]
class LANCreateResponse(BaseModel):
diff --git a/src/cloudflare/types/magic_transit/sites/lan_delete_response.py b/src/cloudflare/types/magic_transit/sites/lan_delete_response.py
index 7dabd6b21162..99c8d6363054 100644
--- a/src/cloudflare/types/magic_transit/sites/lan_delete_response.py
+++ b/src/cloudflare/types/magic_transit/sites/lan_delete_response.py
@@ -1,108 +1,14 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Optional
+from typing import Optional
+from .lan import LAN
from ...._models import BaseModel
-__all__ = [
- "LANDeleteResponse",
- "DeletedLAN",
- "DeletedLANNat",
- "DeletedLANRoutedSubnet",
- "DeletedLANRoutedSubnetNat",
- "DeletedLANStaticAddressing",
- "DeletedLANStaticAddressingDHCPRelay",
- "DeletedLANStaticAddressingDHCPServer",
-]
-
-
-class DeletedLANNat(BaseModel):
- static_prefix: Optional[str] = None
- """A valid CIDR notation representing an IP range."""
-
-
-class DeletedLANRoutedSubnetNat(BaseModel):
- static_prefix: Optional[str] = None
- """A valid CIDR notation representing an IP range."""
-
-
-class DeletedLANRoutedSubnet(BaseModel):
- next_hop: str
- """A valid IPv4 address."""
-
- prefix: str
- """A valid CIDR notation representing an IP range."""
-
- nat: Optional[DeletedLANRoutedSubnetNat] = None
-
-
-class DeletedLANStaticAddressingDHCPRelay(BaseModel):
- server_addresses: Optional[List[str]] = None
- """List of DHCP server IPs."""
-
-
-class DeletedLANStaticAddressingDHCPServer(BaseModel):
- dhcp_pool_end: Optional[str] = None
- """A valid IPv4 address."""
-
- dhcp_pool_start: Optional[str] = None
- """A valid IPv4 address."""
-
- dns_server: Optional[str] = None
- """A valid IPv4 address."""
-
- reservations: Optional[Dict[str, str]] = None
- """Mapping of MAC addresses to IP addresses"""
-
-
-class DeletedLANStaticAddressing(BaseModel):
- address: str
- """A valid CIDR notation representing an IP range."""
-
- dhcp_relay: Optional[DeletedLANStaticAddressingDHCPRelay] = None
-
- dhcp_server: Optional[DeletedLANStaticAddressingDHCPServer] = None
-
- secondary_address: Optional[str] = None
- """A valid CIDR notation representing an IP range."""
-
- virtual_address: Optional[str] = None
- """A valid CIDR notation representing an IP range."""
-
-
-class DeletedLAN(BaseModel):
- id: Optional[str] = None
- """Identifier"""
-
- description: Optional[str] = None
-
- ha_link: Optional[bool] = None
- """mark true to use this LAN for HA probing.
-
- only works for site with HA turned on. only one LAN can be set as the ha_link.
- """
-
- nat: Optional[DeletedLANNat] = None
-
- physport: Optional[int] = None
-
- routed_subnets: Optional[List[DeletedLANRoutedSubnet]] = None
-
- site_id: Optional[str] = None
- """Identifier"""
-
- static_addressing: Optional[DeletedLANStaticAddressing] = None
- """
- If the site is not configured in high availability mode, this configuration is
- optional (if omitted, use DHCP). However, if in high availability mode,
- static_address is required along with secondary and virtual address.
- """
-
- vlan_tag: Optional[int] = None
- """VLAN port number."""
+__all__ = ["LANDeleteResponse"]
class LANDeleteResponse(BaseModel):
deleted: Optional[bool] = None
- deleted_lan: Optional[DeletedLAN] = None
+ deleted_lan: Optional[LAN] = None
diff --git a/src/cloudflare/types/magic_transit/sites/lan_get_response.py b/src/cloudflare/types/magic_transit/sites/lan_get_response.py
index 38f897fee516..d8fcc33573d1 100644
--- a/src/cloudflare/types/magic_transit/sites/lan_get_response.py
+++ b/src/cloudflare/types/magic_transit/sites/lan_get_response.py
@@ -1,105 +1,11 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Optional
+from typing import Optional
+from .lan import LAN
from ...._models import BaseModel
-__all__ = [
- "LANGetResponse",
- "LAN",
- "LANNat",
- "LANRoutedSubnet",
- "LANRoutedSubnetNat",
- "LANStaticAddressing",
- "LANStaticAddressingDHCPRelay",
- "LANStaticAddressingDHCPServer",
-]
-
-
-class LANNat(BaseModel):
- static_prefix: Optional[str] = None
- """A valid CIDR notation representing an IP range."""
-
-
-class LANRoutedSubnetNat(BaseModel):
- static_prefix: Optional[str] = None
- """A valid CIDR notation representing an IP range."""
-
-
-class LANRoutedSubnet(BaseModel):
- next_hop: str
- """A valid IPv4 address."""
-
- prefix: str
- """A valid CIDR notation representing an IP range."""
-
- nat: Optional[LANRoutedSubnetNat] = None
-
-
-class LANStaticAddressingDHCPRelay(BaseModel):
- server_addresses: Optional[List[str]] = None
- """List of DHCP server IPs."""
-
-
-class LANStaticAddressingDHCPServer(BaseModel):
- dhcp_pool_end: Optional[str] = None
- """A valid IPv4 address."""
-
- dhcp_pool_start: Optional[str] = None
- """A valid IPv4 address."""
-
- dns_server: Optional[str] = None
- """A valid IPv4 address."""
-
- reservations: Optional[Dict[str, str]] = None
- """Mapping of MAC addresses to IP addresses"""
-
-
-class LANStaticAddressing(BaseModel):
- address: str
- """A valid CIDR notation representing an IP range."""
-
- dhcp_relay: Optional[LANStaticAddressingDHCPRelay] = None
-
- dhcp_server: Optional[LANStaticAddressingDHCPServer] = None
-
- secondary_address: Optional[str] = None
- """A valid CIDR notation representing an IP range."""
-
- virtual_address: Optional[str] = None
- """A valid CIDR notation representing an IP range."""
-
-
-class LAN(BaseModel):
- id: Optional[str] = None
- """Identifier"""
-
- description: Optional[str] = None
-
- ha_link: Optional[bool] = None
- """mark true to use this LAN for HA probing.
-
- only works for site with HA turned on. only one LAN can be set as the ha_link.
- """
-
- nat: Optional[LANNat] = None
-
- physport: Optional[int] = None
-
- routed_subnets: Optional[List[LANRoutedSubnet]] = None
-
- site_id: Optional[str] = None
- """Identifier"""
-
- static_addressing: Optional[LANStaticAddressing] = None
- """
- If the site is not configured in high availability mode, this configuration is
- optional (if omitted, use DHCP). However, if in high availability mode,
- static_address is required along with secondary and virtual address.
- """
-
- vlan_tag: Optional[int] = None
- """VLAN port number."""
+__all__ = ["LANGetResponse"]
class LANGetResponse(BaseModel):
diff --git a/src/cloudflare/types/magic_transit/sites/lan_list_response.py b/src/cloudflare/types/magic_transit/sites/lan_list_response.py
index 4332ce3fcd97..9d839b066e95 100644
--- a/src/cloudflare/types/magic_transit/sites/lan_list_response.py
+++ b/src/cloudflare/types/magic_transit/sites/lan_list_response.py
@@ -1,105 +1,11 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Optional
+from typing import List, Optional
+from .lan import LAN
from ...._models import BaseModel
-__all__ = [
- "LANListResponse",
- "LAN",
- "LANNat",
- "LANRoutedSubnet",
- "LANRoutedSubnetNat",
- "LANStaticAddressing",
- "LANStaticAddressingDHCPRelay",
- "LANStaticAddressingDHCPServer",
-]
-
-
-class LANNat(BaseModel):
- static_prefix: Optional[str] = None
- """A valid CIDR notation representing an IP range."""
-
-
-class LANRoutedSubnetNat(BaseModel):
- static_prefix: Optional[str] = None
- """A valid CIDR notation representing an IP range."""
-
-
-class LANRoutedSubnet(BaseModel):
- next_hop: str
- """A valid IPv4 address."""
-
- prefix: str
- """A valid CIDR notation representing an IP range."""
-
- nat: Optional[LANRoutedSubnetNat] = None
-
-
-class LANStaticAddressingDHCPRelay(BaseModel):
- server_addresses: Optional[List[str]] = None
- """List of DHCP server IPs."""
-
-
-class LANStaticAddressingDHCPServer(BaseModel):
- dhcp_pool_end: Optional[str] = None
- """A valid IPv4 address."""
-
- dhcp_pool_start: Optional[str] = None
- """A valid IPv4 address."""
-
- dns_server: Optional[str] = None
- """A valid IPv4 address."""
-
- reservations: Optional[Dict[str, str]] = None
- """Mapping of MAC addresses to IP addresses"""
-
-
-class LANStaticAddressing(BaseModel):
- address: str
- """A valid CIDR notation representing an IP range."""
-
- dhcp_relay: Optional[LANStaticAddressingDHCPRelay] = None
-
- dhcp_server: Optional[LANStaticAddressingDHCPServer] = None
-
- secondary_address: Optional[str] = None
- """A valid CIDR notation representing an IP range."""
-
- virtual_address: Optional[str] = None
- """A valid CIDR notation representing an IP range."""
-
-
-class LAN(BaseModel):
- id: Optional[str] = None
- """Identifier"""
-
- description: Optional[str] = None
-
- ha_link: Optional[bool] = None
- """mark true to use this LAN for HA probing.
-
- only works for site with HA turned on. only one LAN can be set as the ha_link.
- """
-
- nat: Optional[LANNat] = None
-
- physport: Optional[int] = None
-
- routed_subnets: Optional[List[LANRoutedSubnet]] = None
-
- site_id: Optional[str] = None
- """Identifier"""
-
- static_addressing: Optional[LANStaticAddressing] = None
- """
- If the site is not configured in high availability mode, this configuration is
- optional (if omitted, use DHCP). However, if in high availability mode,
- static_address is required along with secondary and virtual address.
- """
-
- vlan_tag: Optional[int] = None
- """VLAN port number."""
+__all__ = ["LANListResponse"]
class LANListResponse(BaseModel):
diff --git a/src/cloudflare/types/magic_transit/sites/lan_update_params.py b/src/cloudflare/types/magic_transit/sites/lan_update_params.py
index 674ae2856b92..87ec85ac0858 100644
--- a/src/cloudflare/types/magic_transit/sites/lan_update_params.py
+++ b/src/cloudflare/types/magic_transit/sites/lan_update_params.py
@@ -2,19 +2,14 @@
from __future__ import annotations
-from typing import Dict, List, Iterable
+from typing import Iterable
from typing_extensions import Required, TypedDict
-__all__ = [
- "LANUpdateParams",
- "LAN",
- "LANNat",
- "LANRoutedSubnet",
- "LANRoutedSubnetNat",
- "LANStaticAddressing",
- "LANStaticAddressingDHCPRelay",
- "LANStaticAddressingDHCPServer",
-]
+from .nat_param import NatParam
+from .routed_subnet_param import RoutedSubnetParam
+from .static_addressing_param import StaticAddressingParam
+
+__all__ = ["LANUpdateParams", "LAN"]
class LANUpdateParams(TypedDict, total=False):
@@ -27,70 +22,16 @@ class LANUpdateParams(TypedDict, total=False):
lan: LAN
-class LANNat(TypedDict, total=False):
- static_prefix: str
- """A valid CIDR notation representing an IP range."""
-
-
-class LANRoutedSubnetNat(TypedDict, total=False):
- static_prefix: str
- """A valid CIDR notation representing an IP range."""
-
-
-class LANRoutedSubnet(TypedDict, total=False):
- next_hop: Required[str]
- """A valid IPv4 address."""
-
- prefix: Required[str]
- """A valid CIDR notation representing an IP range."""
-
- nat: LANRoutedSubnetNat
-
-
-class LANStaticAddressingDHCPRelay(TypedDict, total=False):
- server_addresses: List[str]
- """List of DHCP server IPs."""
-
-
-class LANStaticAddressingDHCPServer(TypedDict, total=False):
- dhcp_pool_end: str
- """A valid IPv4 address."""
-
- dhcp_pool_start: str
- """A valid IPv4 address."""
-
- dns_server: str
- """A valid IPv4 address."""
-
- reservations: Dict[str, str]
- """Mapping of MAC addresses to IP addresses"""
-
-
-class LANStaticAddressing(TypedDict, total=False):
- address: Required[str]
- """A valid CIDR notation representing an IP range."""
-
- dhcp_relay: LANStaticAddressingDHCPRelay
-
- dhcp_server: LANStaticAddressingDHCPServer
-
- secondary_address: str
- """A valid CIDR notation representing an IP range."""
-
- virtual_address: str
- """A valid CIDR notation representing an IP range."""
-
-
class LAN(TypedDict, total=False):
description: str
- nat: LANNat
+ nat: NatParam
physport: int
- routed_subnets: Iterable[LANRoutedSubnet]
+ routed_subnets: Iterable[RoutedSubnetParam]
- static_addressing: LANStaticAddressing
+ static_addressing: StaticAddressingParam
"""
If the site is not configured in high availability mode, this configuration is
optional (if omitted, use DHCP). However, if in high availability mode,
diff --git a/src/cloudflare/types/magic_transit/sites/lan_update_response.py b/src/cloudflare/types/magic_transit/sites/lan_update_response.py
index 58547b503a42..3e40d93453fc 100644
--- a/src/cloudflare/types/magic_transit/sites/lan_update_response.py
+++ b/src/cloudflare/types/magic_transit/sites/lan_update_response.py
@@ -1,105 +1,11 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Optional
+from typing import Optional
+from .lan import LAN
from ...._models import BaseModel
-__all__ = [
- "LANUpdateResponse",
- "LAN",
- "LANNat",
- "LANRoutedSubnet",
- "LANRoutedSubnetNat",
- "LANStaticAddressing",
- "LANStaticAddressingDHCPRelay",
- "LANStaticAddressingDHCPServer",
-]
-
-
-class LANNat(BaseModel):
- static_prefix: Optional[str] = None
- """A valid CIDR notation representing an IP range."""
-
-
-class LANRoutedSubnetNat(BaseModel):
- static_prefix: Optional[str] = None
- """A valid CIDR notation representing an IP range."""
-
-
-class LANRoutedSubnet(BaseModel):
- next_hop: str
- """A valid IPv4 address."""
-
- prefix: str
- """A valid CIDR notation representing an IP range."""
-
- nat: Optional[LANRoutedSubnetNat] = None
-
-
-class LANStaticAddressingDHCPRelay(BaseModel):
- server_addresses: Optional[List[str]] = None
- """List of DHCP server IPs."""
-
-
-class LANStaticAddressingDHCPServer(BaseModel):
- dhcp_pool_end: Optional[str] = None
- """A valid IPv4 address."""
-
- dhcp_pool_start: Optional[str] = None
- """A valid IPv4 address."""
-
- dns_server: Optional[str] = None
- """A valid IPv4 address."""
-
- reservations: Optional[Dict[str, str]] = None
- """Mapping of MAC addresses to IP addresses"""
-
-
-class LANStaticAddressing(BaseModel):
- address: str
- """A valid CIDR notation representing an IP range."""
-
- dhcp_relay: Optional[LANStaticAddressingDHCPRelay] = None
-
- dhcp_server: Optional[LANStaticAddressingDHCPServer] = None
-
- secondary_address: Optional[str] = None
- """A valid CIDR notation representing an IP range."""
-
- virtual_address: Optional[str] = None
- """A valid CIDR notation representing an IP range."""
-
-
-class LAN(BaseModel):
- id: Optional[str] = None
- """Identifier"""
-
- description: Optional[str] = None
-
- ha_link: Optional[bool] = None
- """mark true to use this LAN for HA probing.
-
- only works for site with HA turned on. only one LAN can be set as the ha_link.
- """
-
- nat: Optional[LANNat] = None
-
- physport: Optional[int] = None
-
- routed_subnets: Optional[List[LANRoutedSubnet]] = None
-
- site_id: Optional[str] = None
- """Identifier"""
-
- static_addressing: Optional[LANStaticAddressing] = None
- """
- If the site is not configured in high availability mode, this configuration is
- optional (if omitted, use DHCP). However, if in high availability mode,
- static_address is required along with secondary and virtual address.
- """
-
- vlan_tag: Optional[int] = None
- """VLAN port number."""
+__all__ = ["LANUpdateResponse"]
class LANUpdateResponse(BaseModel):
diff --git a/src/cloudflare/types/magic_transit/sites/nat.py b/src/cloudflare/types/magic_transit/sites/nat.py
new file mode 100644
index 000000000000..740ebff9f75f
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/sites/nat.py
@@ -0,0 +1,12 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from ...._models import BaseModel
+
+__all__ = ["Nat"]
+
+
+class Nat(BaseModel):
+ static_prefix: Optional[str] = None
+ """A valid CIDR notation representing an IP range."""
diff --git a/src/cloudflare/types/magic_transit/sites/nat_param.py b/src/cloudflare/types/magic_transit/sites/nat_param.py
new file mode 100644
index 000000000000..91087923480a
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/sites/nat_param.py
@@ -0,0 +1,12 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import TypedDict
+
+__all__ = ["NatParam"]
+
+
+class NatParam(TypedDict, total=False):
+ static_prefix: str
+ """A valid CIDR notation representing an IP range."""
diff --git a/src/cloudflare/types/magic_transit/sites/routed_subnet.py b/src/cloudflare/types/magic_transit/sites/routed_subnet.py
new file mode 100644
index 000000000000..65d73d051999
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/sites/routed_subnet.py
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from .nat import Nat
+from ...._models import BaseModel
+
+__all__ = ["RoutedSubnet"]
+
+
+class RoutedSubnet(BaseModel):
+ next_hop: str
+ """A valid IPv4 address."""
+
+ prefix: str
+ """A valid CIDR notation representing an IP range."""
+
+ nat: Optional[Nat] = None
diff --git a/src/cloudflare/types/magic_transit/sites/routed_subnet_param.py b/src/cloudflare/types/magic_transit/sites/routed_subnet_param.py
new file mode 100644
index 000000000000..b5c00117564e
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/sites/routed_subnet_param.py
@@ -0,0 +1,19 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+from .nat_param import NatParam
+
+__all__ = ["RoutedSubnetParam"]
+
+
+class RoutedSubnetParam(TypedDict, total=False):
+ next_hop: Required[str]
+ """A valid IPv4 address."""
+
+ prefix: Required[str]
+ """A valid CIDR notation representing an IP range."""
+
+ nat: NatParam
diff --git a/src/cloudflare/types/magic_transit/sites/static_addressing.py b/src/cloudflare/types/magic_transit/sites/static_addressing.py
new file mode 100644
index 000000000000..7844247f4d97
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/sites/static_addressing.py
@@ -0,0 +1,24 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from ...._models import BaseModel
+from .dhcp_relay import DHCPRelay
+from .dhcp_server import DHCPServer
+
+__all__ = ["StaticAddressing"]
+
+
+class StaticAddressing(BaseModel):
+ address: str
+ """A valid CIDR notation representing an IP range."""
+
+ dhcp_relay: Optional[DHCPRelay] = None
+
+ dhcp_server: Optional[DHCPServer] = None
+
+ secondary_address: Optional[str] = None
+ """A valid CIDR notation representing an IP range."""
+
+ virtual_address: Optional[str] = None
+ """A valid CIDR notation representing an IP range."""
diff --git a/src/cloudflare/types/magic_transit/sites/static_addressing_param.py b/src/cloudflare/types/magic_transit/sites/static_addressing_param.py
new file mode 100644
index 000000000000..05f1265253b4
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/sites/static_addressing_param.py
@@ -0,0 +1,25 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+from .dhcp_relay_param import DHCPRelayParam
+from .dhcp_server_param import DHCPServerParam
+
+__all__ = ["StaticAddressingParam"]
+
+
+class StaticAddressingParam(TypedDict, total=False):
+ address: Required[str]
+ """A valid CIDR notation representing an IP range."""
+
+ dhcp_relay: DHCPRelayParam
+
+ dhcp_server: DHCPServerParam
+
+ secondary_address: str
+ """A valid CIDR notation representing an IP range."""
+
+ virtual_address: str
+ """A valid CIDR notation representing an IP range."""
diff --git a/src/cloudflare/types/magic_transit/sites/subnet.py b/src/cloudflare/types/magic_transit/sites/subnet.py
new file mode 100644
index 000000000000..4644c7a7ea32
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/sites/subnet.py
@@ -0,0 +1,7 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Union
+
+__all__ = ["Subnet"]
+
+Subnet = Union[str, str]
diff --git a/src/cloudflare/types/magic_transit/sites/subnet_param.py b/src/cloudflare/types/magic_transit/sites/subnet_param.py
new file mode 100644
index 000000000000..4e27c261a8bf
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/sites/subnet_param.py
@@ -0,0 +1,9 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Union
+
+__all__ = ["SubnetParam"]
+
+SubnetParam = Union[str, str]
diff --git a/src/cloudflare/types/magic_transit/sites/wan.py b/src/cloudflare/types/magic_transit/sites/wan.py
new file mode 100644
index 000000000000..325f0783ea40
--- /dev/null
+++ b/src/cloudflare/types/magic_transit/sites/wan.py
@@ -0,0 +1,32 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from ...._models import BaseModel
+from .static_addressing import StaticAddressing
+
+__all__ = ["WAN"]
+
+
+class WAN(BaseModel):
+ id: Optional[str] = None
+ """Identifier"""
+
+ description: Optional[str] = None
+
+ physport: Optional[int] = None
+
+ priority: Optional[int] = None
+ """Priority of WAN for traffic loadbalancing."""
+
+ site_id: Optional[str] = None
+ """Identifier"""
+
+ static_addressing: Optional[StaticAddressing] = None
+ """(optional) if omitted, use DHCP.
+
+ Submit secondary_address when site is in high availability mode.
+ """
+
+ vlan_tag: Optional[int] = None
+ """VLAN port number."""
diff --git a/src/cloudflare/types/magic_transit/sites/wan_create_params.py b/src/cloudflare/types/magic_transit/sites/wan_create_params.py
index c5da185af640..1c0f6b095f11 100644
--- a/src/cloudflare/types/magic_transit/sites/wan_create_params.py
+++ b/src/cloudflare/types/magic_transit/sites/wan_create_params.py
@@ -4,7 +4,9 @@
from typing_extensions import Required, TypedDict
-__all__ = ["WANCreateParams", "WAN", "WANStaticAddressing"]
+from .static_addressing_param import StaticAddressingParam
+
+__all__ = ["WANCreateParams", "WAN"]
class WANCreateParams(TypedDict, total=False):
@@ -14,17 +16,6 @@ class WANCreateParams(TypedDict, total=False):
wan: WAN
-class WANStaticAddressing(TypedDict, total=False):
- address: Required[str]
- """A valid CIDR notation representing an IP range."""
-
- gateway_address: Required[str]
- """A valid IPv4 address."""
-
- secondary_address: str
- """A valid CIDR notation representing an IP range."""
-
-
class WAN(TypedDict, total=False):
physport: Required[int]
@@ -35,7 +26,7 @@ class WAN(TypedDict, total=False):
priority: int
- static_addressing: WANStaticAddressing
+ static_addressing: StaticAddressingParam
"""(optional) if omitted, use DHCP.
Submit secondary_address when site is in high availability mode.
diff --git a/src/cloudflare/types/magic_transit/sites/wan_create_response.py b/src/cloudflare/types/magic_transit/sites/wan_create_response.py
index 926aad321d10..bc4c93c30241 100644
--- a/src/cloudflare/types/magic_transit/sites/wan_create_response.py
+++ b/src/cloudflare/types/magic_transit/sites/wan_create_response.py
@@ -2,44 +2,10 @@
from typing import List, Optional
+from .wan import WAN
from ...._models import BaseModel
-__all__ = ["WANCreateResponse", "WAN", "WANStaticAddressing"]
-
-
-class WANStaticAddressing(BaseModel):
- address: str
- """A valid CIDR notation representing an IP range."""
-
- gateway_address: str
- """A valid IPv4 address."""
-
- secondary_address: Optional[str] = None
- """A valid CIDR notation representing an IP range."""
-
-
-class WAN(BaseModel):
- id: Optional[str] = None
- """Identifier"""
-
- description: Optional[str] = None
-
- physport: Optional[int] = None
-
- priority: Optional[int] = None
- """Priority of WAN for traffic loadbalancing."""
-
- site_id: Optional[str] = None
- """Identifier"""
-
- static_addressing: Optional[WANStaticAddressing] = None
- """(optional) if omitted, use DHCP.
-
- Submit secondary_address when site is in high availability mode.
- """
-
- vlan_tag: Optional[int] = None
- """VLAN port number."""
+__all__ = ["WANCreateResponse"]
class WANCreateResponse(BaseModel):
diff --git a/src/cloudflare/types/magic_transit/sites/wan_delete_response.py b/src/cloudflare/types/magic_transit/sites/wan_delete_response.py
index 09cecd3e64cd..0b99cd41c3f2 100644
--- a/src/cloudflare/types/magic_transit/sites/wan_delete_response.py
+++ b/src/cloudflare/types/magic_transit/sites/wan_delete_response.py
@@ -2,47 +2,13 @@
from typing import Optional
+from .wan import WAN
from ...._models import BaseModel
-__all__ = ["WANDeleteResponse", "DeletedWAN", "DeletedWANStaticAddressing"]
-
-
-class DeletedWANStaticAddressing(BaseModel):
- address: str
- """A valid CIDR notation representing an IP range."""
-
- gateway_address: str
- """A valid IPv4 address."""
-
- secondary_address: Optional[str] = None
- """A valid CIDR notation representing an IP range."""
-
-
-class DeletedWAN(BaseModel):
- id: Optional[str] = None
- """Identifier"""
-
- description: Optional[str] = None
-
- physport: Optional[int] = None
-
- priority: Optional[int] = None
- """Priority of WAN for traffic loadbalancing."""
-
- site_id: Optional[str] = None
- """Identifier"""
-
- static_addressing: Optional[DeletedWANStaticAddressing] = None
- """(optional) if omitted, use DHCP.
-
- Submit secondary_address when site is in high availability mode.
- """
-
- vlan_tag: Optional[int] = None
- """VLAN port number."""
+__all__ = ["WANDeleteResponse"]
class WANDeleteResponse(BaseModel):
deleted: Optional[bool] = None
- deleted_wan: Optional[DeletedWAN] = None
+ deleted_wan: Optional[WAN] = None
diff --git a/src/cloudflare/types/magic_transit/sites/wan_get_response.py b/src/cloudflare/types/magic_transit/sites/wan_get_response.py
index a7910b039fb4..f87bac75af15 100644
--- a/src/cloudflare/types/magic_transit/sites/wan_get_response.py
+++ b/src/cloudflare/types/magic_transit/sites/wan_get_response.py
@@ -2,44 +2,10 @@
from typing import Optional
+from .wan import WAN
from ...._models import BaseModel
-__all__ = ["WANGetResponse", "WAN", "WANStaticAddressing"]
-
-
-class WANStaticAddressing(BaseModel):
- address: str
- """A valid CIDR notation representing an IP range."""
-
- gateway_address: str
- """A valid IPv4 address."""
-
- secondary_address: Optional[str] = None
- """A valid CIDR notation representing an IP range."""
-
-
-class WAN(BaseModel):
- id: Optional[str] = None
- """Identifier"""
-
- description: Optional[str] = None
-
- physport: Optional[int] = None
-
- priority: Optional[int] = None
- """Priority of WAN for traffic loadbalancing."""
-
- site_id: Optional[str] = None
- """Identifier"""
-
- static_addressing: Optional[WANStaticAddressing] = None
- """(optional) if omitted, use DHCP.
-
- Submit secondary_address when site is in high availability mode.
- """
-
- vlan_tag: Optional[int] = None
- """VLAN port number."""
+__all__ = ["WANGetResponse"]
class WANGetResponse(BaseModel):
diff --git a/src/cloudflare/types/magic_transit/sites/wan_list_response.py b/src/cloudflare/types/magic_transit/sites/wan_list_response.py
index 943c52cf24d3..94d7deb35b76 100644
--- a/src/cloudflare/types/magic_transit/sites/wan_list_response.py
+++ b/src/cloudflare/types/magic_transit/sites/wan_list_response.py
@@ -2,44 +2,10 @@
from typing import List, Optional
+from .wan import WAN
from ...._models import BaseModel
-__all__ = ["WANListResponse", "WAN", "WANStaticAddressing"]
-
-
-class WANStaticAddressing(BaseModel):
- address: str
- """A valid CIDR notation representing an IP range."""
-
- gateway_address: str
- """A valid IPv4 address."""
-
- secondary_address: Optional[str] = None
- """A valid CIDR notation representing an IP range."""
-
-
-class WAN(BaseModel):
- id: Optional[str] = None
- """Identifier"""
-
- description: Optional[str] = None
-
- physport: Optional[int] = None
-
- priority: Optional[int] = None
- """Priority of WAN for traffic loadbalancing."""
-
- site_id: Optional[str] = None
- """Identifier"""
-
- static_addressing: Optional[WANStaticAddressing] = None
- """(optional) if omitted, use DHCP.
-
- Submit secondary_address when site is in high availability mode.
- """
-
- vlan_tag: Optional[int] = None
- """VLAN port number."""
+__all__ = ["WANListResponse"]
class WANListResponse(BaseModel):
diff --git a/src/cloudflare/types/magic_transit/sites/wan_update_params.py b/src/cloudflare/types/magic_transit/sites/wan_update_params.py
index 9bf85565d652..9599e185066c 100644
--- a/src/cloudflare/types/magic_transit/sites/wan_update_params.py
+++ b/src/cloudflare/types/magic_transit/sites/wan_update_params.py
@@ -4,7 +4,9 @@
from typing_extensions import Required, TypedDict
-__all__ = ["WANUpdateParams", "WAN", "WANStaticAddressing"]
+from .static_addressing_param import StaticAddressingParam
+
+__all__ = ["WANUpdateParams", "WAN"]
class WANUpdateParams(TypedDict, total=False):
@@ -17,17 +19,6 @@ class WANUpdateParams(TypedDict, total=False):
wan: WAN
-class WANStaticAddressing(TypedDict, total=False):
- address: Required[str]
- """A valid CIDR notation representing an IP range."""
-
- gateway_address: Required[str]
- """A valid IPv4 address."""
-
- secondary_address: str
- """A valid CIDR notation representing an IP range."""
-
-
class WAN(TypedDict, total=False):
description: str
@@ -35,7 +26,7 @@ class WAN(TypedDict, total=False):
priority: int
- static_addressing: WANStaticAddressing
+ static_addressing: StaticAddressingParam
"""(optional) if omitted, use DHCP.
Submit secondary_address when site is in high availability mode.
diff --git a/src/cloudflare/types/magic_transit/sites/wan_update_response.py b/src/cloudflare/types/magic_transit/sites/wan_update_response.py
index 958bc745108e..d151da49b399 100644
--- a/src/cloudflare/types/magic_transit/sites/wan_update_response.py
+++ b/src/cloudflare/types/magic_transit/sites/wan_update_response.py
@@ -2,44 +2,10 @@
from typing import Optional
+from .wan import WAN
from ...._models import BaseModel
-__all__ = ["WANUpdateResponse", "WAN", "WANStaticAddressing"]
-
-
-class WANStaticAddressing(BaseModel):
- address: str
- """A valid CIDR notation representing an IP range."""
-
- gateway_address: str
- """A valid IPv4 address."""
-
- secondary_address: Optional[str] = None
- """A valid CIDR notation representing an IP range."""
-
-
-class WAN(BaseModel):
- id: Optional[str] = None
- """Identifier"""
-
- description: Optional[str] = None
-
- physport: Optional[int] = None
-
- priority: Optional[int] = None
- """Priority of WAN for traffic loadbalancing."""
-
- site_id: Optional[str] = None
- """Identifier"""
-
- static_addressing: Optional[WANStaticAddressing] = None
- """(optional) if omitted, use DHCP.
-
- Submit secondary_address when site is in high availability mode.
- """
-
- vlan_tag: Optional[int] = None
- """VLAN port number."""
+__all__ = ["WANUpdateResponse"]
class WANUpdateResponse(BaseModel):
diff --git a/src/cloudflare/types/managed_header_edit_params.py b/src/cloudflare/types/managed_header_edit_params.py
index ae6d8747bdda..1b9cd2311936 100644
--- a/src/cloudflare/types/managed_header_edit_params.py
+++ b/src/cloudflare/types/managed_header_edit_params.py
@@ -5,29 +5,15 @@
from typing import Iterable
from typing_extensions import Required, TypedDict
-__all__ = ["ManagedHeaderEditParams", "ManagedRequestHeader", "ManagedResponseHeader"]
+from .request_list_item_param import RequestListItemParam
+
+__all__ = ["ManagedHeaderEditParams"]
class ManagedHeaderEditParams(TypedDict, total=False):
zone_id: Required[str]
"""Identifier"""
- managed_request_headers: Required[Iterable[ManagedRequestHeader]]
-
- managed_response_headers: Required[Iterable[ManagedResponseHeader]]
-
-
-class ManagedRequestHeader(TypedDict, total=False):
- id: str
- """Human-readable identifier of the Managed Transform."""
-
- enabled: bool
- """When true, the Managed Transform is enabled."""
-
-
-class ManagedResponseHeader(TypedDict, total=False):
- id: str
- """Human-readable identifier of the Managed Transform."""
+ managed_request_headers: Required[Iterable[RequestListItemParam]]
- enabled: bool
- """When true, the Managed Transform is enabled."""
+ managed_response_headers: Required[Iterable[RequestListItemParam]]
diff --git a/src/cloudflare/types/managed_header_list_response.py b/src/cloudflare/types/managed_header_list_response.py
index 5db5cb8a28e7..d8208593f408 100644
--- a/src/cloudflare/types/managed_header_list_response.py
+++ b/src/cloudflare/types/managed_header_list_response.py
@@ -3,27 +3,12 @@
from typing import List, Optional
from .._models import BaseModel
+from .request_list_item import RequestListItem
-__all__ = ["ManagedHeaderListResponse", "ManagedRequestHeader", "ManagedResponseHeader"]
-
-
-class ManagedRequestHeader(BaseModel):
- id: Optional[str] = None
- """Human-readable identifier of the Managed Transform."""
-
- enabled: Optional[bool] = None
- """When true, the Managed Transform is enabled."""
-
-
-class ManagedResponseHeader(BaseModel):
- id: Optional[str] = None
- """Human-readable identifier of the Managed Transform."""
-
- enabled: Optional[bool] = None
- """When true, the Managed Transform is enabled."""
+__all__ = ["ManagedHeaderListResponse"]
class ManagedHeaderListResponse(BaseModel):
- managed_request_headers: Optional[List[ManagedRequestHeader]] = None
+ managed_request_headers: Optional[List[RequestListItem]] = None
- managed_response_headers: Optional[List[ManagedResponseHeader]] = None
+ managed_response_headers: Optional[List[RequestListItem]] = None
diff --git a/src/cloudflare/types/methods_item.py b/src/cloudflare/types/methods_item.py
new file mode 100644
index 000000000000..95a428b9935b
--- /dev/null
+++ b/src/cloudflare/types/methods_item.py
@@ -0,0 +1,7 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal
+
+__all__ = ["MethodsItem"]
+
+MethodsItem = Literal["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "_ALL_"]
diff --git a/src/cloudflare/types/migration_step.py b/src/cloudflare/types/migration_step.py
new file mode 100644
index 000000000000..24ba3dbed16b
--- /dev/null
+++ b/src/cloudflare/types/migration_step.py
@@ -0,0 +1,40 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+
+from pydantic import Field as FieldInfo
+
+from .._models import BaseModel
+
+__all__ = ["MigrationStep", "RenamedClass", "TransferredClass"]
+
+
+class RenamedClass(BaseModel):
+ from_: Optional[str] = FieldInfo(alias="from", default=None)
+
+ to: Optional[str] = None
+
+
+class TransferredClass(BaseModel):
+ from_: Optional[str] = FieldInfo(alias="from", default=None)
+
+ from_script: Optional[str] = None
+
+ to: Optional[str] = None
+
+
+class MigrationStep(BaseModel):
+ deleted_classes: Optional[List[str]] = None
+ """A list of classes to delete Durable Object namespaces from."""
+
+ new_classes: Optional[List[str]] = None
+ """A list of classes to create Durable Object namespaces from."""
+
+ renamed_classes: Optional[List[RenamedClass]] = None
+ """A list of classes with Durable Object namespaces that were renamed."""
+
+ transferred_classes: Optional[List[TransferredClass]] = None
+ """
+ A list of transfers for Durable Object namespaces from a different Worker and
+ class to a class defined in this Worker.
+ """
diff --git a/src/cloudflare/types/migration_step_param.py b/src/cloudflare/types/migration_step_param.py
new file mode 100644
index 000000000000..87c80f048fcd
--- /dev/null
+++ b/src/cloudflare/types/migration_step_param.py
@@ -0,0 +1,52 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Iterable
+from typing_extensions import TypedDict
+
+__all__ = ["MigrationStepParam", "RenamedClass", "TransferredClass"]
+
+_RenamedClassReservedKeywords = TypedDict(
+ "_RenamedClassReservedKeywords",
+ {
+ "from": str,
+ },
+ total=False,
+)
+
+
+class RenamedClass(_RenamedClassReservedKeywords, total=False):
+ to: str
+
+
+_TransferredClassReservedKeywords = TypedDict(
+ "_TransferredClassReservedKeywords",
+ {
+ "from": str,
+ },
+ total=False,
+)
+
+
+class TransferredClass(_TransferredClassReservedKeywords, total=False):
+ from_script: str
+
+ to: str
+
+
+class MigrationStepParam(TypedDict, total=False):
+ deleted_classes: List[str]
+ """A list of classes to delete Durable Object namespaces from."""
+
+ new_classes: List[str]
+ """A list of classes to create Durable Object namespaces from."""
+
+ renamed_classes: Iterable[RenamedClass]
+ """A list of classes with Durable Object namespaces that were renamed."""
+
+ transferred_classes: Iterable[TransferredClass]
+ """
+ A list of transfers for Durable Object namespaces from a different Worker and
+ class to a class defined in this Worker.
+ """
diff --git a/src/cloudflare/types/mtls_cert_binding.py b/src/cloudflare/types/mtls_cert_binding.py
new file mode 100644
index 000000000000..36e81683b36c
--- /dev/null
+++ b/src/cloudflare/types/mtls_cert_binding.py
@@ -0,0 +1,21 @@
+# 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__ = ["MTLSCERTBinding"]
+
+
+class MTLSCERTBinding(BaseModel):
+ certificate: object
+
+ name: str
+ """A JavaScript variable name for the binding."""
+
+ type: Literal["mtls_certificate"]
+ """The class of resource that the binding provides."""
+
+ certificate_id: Optional[str] = None
+ """ID of the certificate to bind to"""
diff --git a/src/cloudflare/types/mtls_cert_binding_param.py b/src/cloudflare/types/mtls_cert_binding_param.py
new file mode 100644
index 000000000000..e6d8c865b55b
--- /dev/null
+++ b/src/cloudflare/types/mtls_cert_binding_param.py
@@ -0,0 +1,17 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, Required, TypedDict
+
+__all__ = ["MTLSCERTBindingParam"]
+
+
+class MTLSCERTBindingParam(TypedDict, total=False):
+ certificate: Required[object]
+
+ type: Required[Literal["mtls_certificate"]]
+ """The class of resource that the binding provides."""
+
+ certificate_id: str
+ """ID of the certificate to bind to"""
diff --git a/src/cloudflare/types/origin_dns.py b/src/cloudflare/types/origin_dns.py
new file mode 100644
index 000000000000..23bedbfd5c4d
--- /dev/null
+++ b/src/cloudflare/types/origin_dns.py
@@ -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__ = ["OriginDNS"]
+
+
+class OriginDNS(BaseModel):
+ name: Optional[str] = None
+ """The name of the DNS record associated with the origin."""
+
+ ttl: Optional[int] = None
+ """The TTL of our resolution of your DNS record in seconds."""
+
+ type: Optional[Literal["", "A", "AAAA", "SRV"]] = None
+ """The type of DNS record associated with the origin.
+
+ "" is used to specify a combination of A/AAAA records.
+ """
diff --git a/src/cloudflare/types/origin_dns_param.py b/src/cloudflare/types/origin_dns_param.py
new file mode 100644
index 000000000000..7549c967f1ba
--- /dev/null
+++ b/src/cloudflare/types/origin_dns_param.py
@@ -0,0 +1,21 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, TypedDict
+
+__all__ = ["OriginDNSParam"]
+
+
+class OriginDNSParam(TypedDict, total=False):
+ name: str
+ """The name of the DNS record associated with the origin."""
+
+ ttl: int
+ """The TTL of our resolution of your DNS record in seconds."""
+
+ type: Literal["", "A", "AAAA", "SRV"]
+ """The type of DNS record associated with the origin.
+
+ "" is used to specify a combination of A/AAAA records.
+ """
diff --git a/src/cloudflare/types/origin_port.py b/src/cloudflare/types/origin_port.py
new file mode 100644
index 000000000000..8079b9b34796
--- /dev/null
+++ b/src/cloudflare/types/origin_port.py
@@ -0,0 +1,7 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Union
+
+__all__ = ["OriginPort"]
+
+OriginPort = Union[int, str]
diff --git a/src/cloudflare/types/origin_port_param.py b/src/cloudflare/types/origin_port_param.py
new file mode 100644
index 000000000000..ce64ccbc3d11
--- /dev/null
+++ b/src/cloudflare/types/origin_port_param.py
@@ -0,0 +1,9 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Union
+
+__all__ = ["OriginPortParam"]
+
+OriginPortParam = Union[int, str]
diff --git a/src/cloudflare/types/page_rule.py b/src/cloudflare/types/page_rule.py
new file mode 100644
index 000000000000..73c526972661
--- /dev/null
+++ b/src/cloudflare/types/page_rule.py
@@ -0,0 +1,43 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+from datetime import datetime
+from typing_extensions import Literal
+
+from .route import Route
+from .._models import BaseModel
+from .url_target import URLTarget
+
+__all__ = ["PageRule"]
+
+
+class PageRule(BaseModel):
+ id: str
+ """Identifier"""
+
+ actions: List[Route]
+ """The set of actions to perform if the targets of this rule match the request.
+
+ Actions can redirect to another URL or override settings, but not both.
+ """
+
+ created_on: datetime
+ """The timestamp of when the Page Rule was created."""
+
+ modified_on: datetime
+ """The timestamp of when the Page Rule was last modified."""
+
+ priority: int
+ """
+ The priority of the rule, used to define which Page Rule is processed over
+ another. A higher number indicates a higher priority. For example, if you have a
+ catch-all Page Rule (rule A: `/images/*`) but want a more specific Page Rule to
+ take precedence (rule B: `/images/special/*`), specify a higher priority for
+ rule B so it overrides rule A.
+ """
+
+ status: Literal["active", "disabled"]
+ """The status of the Page Rule."""
+
+ targets: List[URLTarget]
+ """The rule targets to evaluate on each request."""
diff --git a/src/cloudflare/types/pagerule_create_params.py b/src/cloudflare/types/pagerule_create_params.py
index 869df2ac2b61..3a98784ee565 100644
--- a/src/cloudflare/types/pagerule_create_params.py
+++ b/src/cloudflare/types/pagerule_create_params.py
@@ -5,20 +5,23 @@
from typing import Iterable
from typing_extensions import Literal, Required, TypedDict
-__all__ = ["PageruleCreateParams", "Action", "ActionValue", "Target", "TargetConstraint"]
+from .action_item_param import ActionItemParam
+from .targes_item_param import TargesItemParam
+
+__all__ = ["PageruleCreateParams"]
class PageruleCreateParams(TypedDict, total=False):
zone_id: Required[str]
"""Identifier"""
- actions: Required[Iterable[Action]]
+ actions: Required[Iterable[ActionItemParam]]
"""The set of actions to perform if the targets of this rule match the request.
Actions can redirect to another URL or override settings, but not both.
"""
- targets: Required[Iterable[Target]]
+ targets: Required[Iterable[TargesItemParam]]
"""The rule targets to evaluate on each request."""
priority: int
@@ -32,42 +35,3 @@ class PageruleCreateParams(TypedDict, total=False):
status: Literal["active", "disabled"]
"""The status of the Page Rule."""
-
-
-class ActionValue(TypedDict, total=False):
- type: Literal["temporary", "permanent"]
- """The response type for the URL redirect."""
-
- url: str
- """
- The URL to redirect the request to. Notes: ${num} refers to the position of '\\**'
- in the constraint value.
- """
-
-
-class Action(TypedDict, total=False):
- name: Literal["forward_url"]
- """The type of route."""
-
- value: ActionValue
-
-
-class TargetConstraint(TypedDict, total=False):
- operator: Required[Literal["matches", "contains", "equals", "not_equal", "not_contain"]]
- """
- The matches operator can use asterisks and pipes as wildcard and 'or' operators.
- """
-
- value: Required[str]
- """The URL pattern to match against the current request.
-
- The pattern may contain up to four asterisks ('\\**') as placeholders.
- """
-
-
-class Target(TypedDict, total=False):
- constraint: Required[TargetConstraint]
- """String constraint."""
-
- target: Required[Literal["url"]]
- """A target based on the URL of the request."""
diff --git a/src/cloudflare/types/pagerule_edit_params.py b/src/cloudflare/types/pagerule_edit_params.py
index 94d7d4777aaf..ea47589eed2c 100644
--- a/src/cloudflare/types/pagerule_edit_params.py
+++ b/src/cloudflare/types/pagerule_edit_params.py
@@ -5,14 +5,17 @@
from typing import Iterable
from typing_extensions import Literal, Required, TypedDict
-__all__ = ["PageruleEditParams", "Action", "ActionValue", "Target", "TargetConstraint"]
+from .action_item_param import ActionItemParam
+from .targes_item_param import TargesItemParam
+
+__all__ = ["PageruleEditParams"]
class PageruleEditParams(TypedDict, total=False):
zone_id: Required[str]
"""Identifier"""
- actions: Iterable[Action]
+ actions: Iterable[ActionItemParam]
"""The set of actions to perform if the targets of this rule match the request.
Actions can redirect to another URL or override settings, but not both.
@@ -30,44 +33,5 @@ class PageruleEditParams(TypedDict, total=False):
status: Literal["active", "disabled"]
"""The status of the Page Rule."""
- targets: Iterable[Target]
+ targets: Iterable[TargesItemParam]
"""The rule targets to evaluate on each request."""
-
-
-class ActionValue(TypedDict, total=False):
- type: Literal["temporary", "permanent"]
- """The response type for the URL redirect."""
-
- url: str
- """
- The URL to redirect the request to. Notes: ${num} refers to the position of '\\**'
- in the constraint value.
- """
-
-
-class Action(TypedDict, total=False):
- name: Literal["forward_url"]
- """The type of route."""
-
- value: ActionValue
-
-
-class TargetConstraint(TypedDict, total=False):
- operator: Required[Literal["matches", "contains", "equals", "not_equal", "not_contain"]]
- """
- The matches operator can use asterisks and pipes as wildcard and 'or' operators.
- """
-
- value: Required[str]
- """The URL pattern to match against the current request.
-
- The pattern may contain up to four asterisks ('\\**') as placeholders.
- """
-
-
-class Target(TypedDict, total=False):
- constraint: Required[TargetConstraint]
- """String constraint."""
-
- target: Required[Literal["url"]]
- """A target based on the URL of the request."""
diff --git a/src/cloudflare/types/pagerule_list_response.py b/src/cloudflare/types/pagerule_list_response.py
index f4d462fc10e9..1b111a722d61 100644
--- a/src/cloudflare/types/pagerule_list_response.py
+++ b/src/cloudflare/types/pagerule_list_response.py
@@ -2,8 +2,8 @@
from typing import List
-from .zones_pagerule import ZonesPagerule
+from .page_rule import PageRule
__all__ = ["PageruleListResponse"]
-PageruleListResponse = List[ZonesPagerule]
+PageruleListResponse = List[PageRule]
diff --git a/src/cloudflare/types/pagerule_update_params.py b/src/cloudflare/types/pagerule_update_params.py
index 9572324f8abc..3c3826b82934 100644
--- a/src/cloudflare/types/pagerule_update_params.py
+++ b/src/cloudflare/types/pagerule_update_params.py
@@ -5,20 +5,23 @@
from typing import Iterable
from typing_extensions import Literal, Required, TypedDict
-__all__ = ["PageruleUpdateParams", "Action", "ActionValue", "Target", "TargetConstraint"]
+from .action_item_param import ActionItemParam
+from .targes_item_param import TargesItemParam
+
+__all__ = ["PageruleUpdateParams"]
class PageruleUpdateParams(TypedDict, total=False):
zone_id: Required[str]
"""Identifier"""
- actions: Required[Iterable[Action]]
+ actions: Required[Iterable[ActionItemParam]]
"""The set of actions to perform if the targets of this rule match the request.
Actions can redirect to another URL or override settings, but not both.
"""
- targets: Required[Iterable[Target]]
+ targets: Required[Iterable[TargesItemParam]]
"""The rule targets to evaluate on each request."""
priority: int
@@ -32,42 +35,3 @@ class PageruleUpdateParams(TypedDict, total=False):
status: Literal["active", "disabled"]
"""The status of the Page Rule."""
-
-
-class ActionValue(TypedDict, total=False):
- type: Literal["temporary", "permanent"]
- """The response type for the URL redirect."""
-
- url: str
- """
- The URL to redirect the request to. Notes: ${num} refers to the position of '\\**'
- in the constraint value.
- """
-
-
-class Action(TypedDict, total=False):
- name: Literal["forward_url"]
- """The type of route."""
-
- value: ActionValue
-
-
-class TargetConstraint(TypedDict, total=False):
- operator: Required[Literal["matches", "contains", "equals", "not_equal", "not_contain"]]
- """
- The matches operator can use asterisks and pipes as wildcard and 'or' operators.
- """
-
- value: Required[str]
- """The URL pattern to match against the current request.
-
- The pattern may contain up to four asterisks ('\\**') as placeholders.
- """
-
-
-class Target(TypedDict, total=False):
- constraint: Required[TargetConstraint]
- """String constraint."""
-
- target: Required[Literal["url"]]
- """A target based on the URL of the request."""
diff --git a/src/cloudflare/types/pages/__init__.py b/src/cloudflare/types/pages/__init__.py
index 320be8f66ea6..5041509fcb55 100644
--- a/src/cloudflare/types/pages/__init__.py
+++ b/src/cloudflare/types/pages/__init__.py
@@ -2,9 +2,11 @@
from __future__ import annotations
-from .pages_projects import PagesProjects as PagesProjects
-from .pages_deployments import PagesDeployments as PagesDeployments
+from .stage import Stage as Stage
+from .project import Project as Project
+from .deployment import Deployment as Deployment
+from .stage_param import StageParam as StageParam
+from .deployment_param import DeploymentParam as DeploymentParam
from .project_edit_params import ProjectEditParams as ProjectEditParams
from .project_create_params import ProjectCreateParams as ProjectCreateParams
from .project_delete_params import ProjectDeleteParams as ProjectDeleteParams
-from .pages_deployments_param import PagesDeploymentsParam as PagesDeploymentsParam
diff --git a/src/cloudflare/types/pages/pages_deployments.py b/src/cloudflare/types/pages/deployment.py
similarity index 81%
rename from src/cloudflare/types/pages/pages_deployments.py
rename to src/cloudflare/types/pages/deployment.py
index d96d48d7e818..fcd5acbf94e8 100644
--- a/src/cloudflare/types/pages/pages_deployments.py
+++ b/src/cloudflare/types/pages/deployment.py
@@ -3,9 +3,10 @@
from typing import List, Optional
from datetime import datetime
+from .stage import Stage
from ..._models import BaseModel
-__all__ = ["PagesDeployments", "DeploymentTrigger", "DeploymentTriggerMetadata", "Stage"]
+__all__ = ["Deployment", "DeploymentTrigger", "DeploymentTriggerMetadata"]
class DeploymentTriggerMetadata(BaseModel):
@@ -27,21 +28,7 @@ class DeploymentTrigger(BaseModel):
"""What caused the deployment."""
-class Stage(BaseModel):
- ended_on: Optional[datetime] = None
- """When the stage ended."""
-
- name: Optional[str] = None
- """The current build stage."""
-
- started_on: Optional[datetime] = None
- """When the stage started."""
-
- status: Optional[str] = None
- """State of the current stage."""
-
-
-class PagesDeployments(BaseModel):
+class Deployment(BaseModel):
id: Optional[str] = None
"""Id of the deployment."""
diff --git a/src/cloudflare/types/pages/pages_deployments_param.py b/src/cloudflare/types/pages/deployment_param.py
similarity index 66%
rename from src/cloudflare/types/pages/pages_deployments_param.py
rename to src/cloudflare/types/pages/deployment_param.py
index 1a57dd71abd7..4d265602dc28 100644
--- a/src/cloudflare/types/pages/pages_deployments_param.py
+++ b/src/cloudflare/types/pages/deployment_param.py
@@ -4,8 +4,8 @@
from typing_extensions import TypedDict
-__all__ = ["PagesDeploymentsParam"]
+__all__ = ["DeploymentParam"]
-class PagesDeploymentsParam(TypedDict, total=False):
+class DeploymentParam(TypedDict, total=False):
pass
diff --git a/src/cloudflare/types/pages/pages_projects.py b/src/cloudflare/types/pages/project.py
similarity index 98%
rename from src/cloudflare/types/pages/pages_projects.py
rename to src/cloudflare/types/pages/project.py
index bbdeb24b7e79..b4bd6af53960 100644
--- a/src/cloudflare/types/pages/pages_projects.py
+++ b/src/cloudflare/types/pages/project.py
@@ -7,10 +7,10 @@
from pydantic import Field as FieldInfo
from ..._models import BaseModel
-from .pages_deployments import PagesDeployments
+from .deployment import Deployment
__all__ = [
- "PagesProjects",
+ "Project",
"BuildConfig",
"DeploymentConfigs",
"DeploymentConfigsPreview",
@@ -494,14 +494,14 @@ class DeploymentConfigs(BaseModel):
"""Configs for production deploys."""
-class PagesProjects(BaseModel):
+class Project(BaseModel):
id: Optional[str] = None
"""Id of the project."""
build_config: Optional[BuildConfig] = None
"""Configs for the project build process."""
- canonical_deployment: Optional[PagesDeployments] = None
+ canonical_deployment: Optional[Deployment] = None
created_on: Optional[datetime] = None
"""When the project was created."""
@@ -512,7 +512,7 @@ class PagesProjects(BaseModel):
domains: Optional[List[object]] = None
"""A list of associated custom domains for the project."""
- latest_deployment: Optional[PagesDeployments] = None
+ latest_deployment: Optional[Deployment] = None
name: Optional[str] = None
"""Name of the project."""
diff --git a/src/cloudflare/types/pages/project_create_params.py b/src/cloudflare/types/pages/project_create_params.py
index 2963483f6622..8951be5327a3 100644
--- a/src/cloudflare/types/pages/project_create_params.py
+++ b/src/cloudflare/types/pages/project_create_params.py
@@ -6,7 +6,7 @@
from typing_extensions import Literal, Required, Annotated, TypedDict
from ..._utils import PropertyInfo
-from .pages_deployments_param import PagesDeploymentsParam
+from .deployment_param import DeploymentParam
__all__ = [
"ProjectCreateParams",
@@ -76,12 +76,12 @@ class ProjectCreateParams(TypedDict, total=False):
build_config: BuildConfig
"""Configs for the project build process."""
- canonical_deployment: PagesDeploymentsParam
+ canonical_deployment: DeploymentParam
deployment_configs: DeploymentConfigs
"""Configs for deployments in a project."""
- latest_deployment: PagesDeploymentsParam
+ latest_deployment: DeploymentParam
name: str
"""Name of the project."""
diff --git a/src/cloudflare/types/pages/stage.py b/src/cloudflare/types/pages/stage.py
new file mode 100644
index 000000000000..cd33c72ebe59
--- /dev/null
+++ b/src/cloudflare/types/pages/stage.py
@@ -0,0 +1,22 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from datetime import datetime
+
+from ..._models import BaseModel
+
+__all__ = ["Stage"]
+
+
+class Stage(BaseModel):
+ ended_on: Optional[datetime] = None
+ """When the stage ended."""
+
+ name: Optional[str] = None
+ """The current build stage."""
+
+ started_on: Optional[datetime] = None
+ """When the stage started."""
+
+ status: Optional[str] = None
+ """State of the current stage."""
diff --git a/src/cloudflare/types/pages/stage_param.py b/src/cloudflare/types/pages/stage_param.py
new file mode 100644
index 000000000000..c7fef7d063aa
--- /dev/null
+++ b/src/cloudflare/types/pages/stage_param.py
@@ -0,0 +1,12 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import TypedDict
+
+__all__ = ["StageParam"]
+
+
+class StageParam(TypedDict, total=False):
+ name: str
+ """The current build stage."""
diff --git a/src/cloudflare/types/pcap.py b/src/cloudflare/types/pcap.py
new file mode 100644
index 000000000000..f2867bb3729d
--- /dev/null
+++ b/src/cloudflare/types/pcap.py
@@ -0,0 +1,62 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from typing_extensions import Literal
+
+from .filter import Filter
+from .._models import BaseModel
+
+__all__ = ["PCAP"]
+
+
+class PCAP(BaseModel):
+ id: Optional[str] = None
+ """The ID for the packet capture."""
+
+ byte_limit: Optional[float] = None
+ """The maximum number of bytes to capture.
+
+ This field only applies to `full` packet captures.
+ """
+
+ colo_name: Optional[str] = None
+ """The name of the data center used for the packet capture.
+
+ This can be a specific colo (ord02) or a multi-colo name (ORD). This field only
+ applies to `full` packet captures.
+ """
+
+ destination_conf: Optional[str] = None
+ """The full URI for the bucket. This field only applies to `full` packet captures."""
+
+ error_message: Optional[str] = None
+ """An error message that describes why the packet capture failed.
+
+ This field only applies to `full` packet captures.
+ """
+
+ filter_v1: Optional[Filter] = None
+ """The packet capture filter. When this field is empty, all packets are captured."""
+
+ status: Optional[
+ Literal[
+ "unknown", "success", "pending", "running", "conversion_pending", "conversion_running", "complete", "failed"
+ ]
+ ] = None
+ """The status of the packet capture request."""
+
+ submitted: Optional[str] = None
+ """The RFC 3339 timestamp when the packet capture was created."""
+
+ system: Optional[Literal["magic-transit"]] = None
+ """The system used to collect packet captures."""
+
+ time_limit: Optional[float] = None
+ """The packet capture duration in seconds."""
+
+ type: Optional[Literal["simple", "full"]] = None
+ """The type of packet capture.
+
+ `Simple` captures sampled packets, and `full` captures entire payloads and
+ non-sampled packets.
+ """
diff --git a/src/cloudflare/types/pcap_create_params.py b/src/cloudflare/types/pcap_create_params.py
index cedbeb11578c..c5e8847a5e8f 100644
--- a/src/cloudflare/types/pcap_create_params.py
+++ b/src/cloudflare/types/pcap_create_params.py
@@ -5,13 +5,9 @@
from typing import Union
from typing_extensions import Literal, Required, TypedDict
-__all__ = [
- "PCAPCreateParams",
- "MagicVisibilityPCAPsRequestSimple",
- "MagicVisibilityPCAPsRequestSimpleFilterV1",
- "MagicVisibilityPCAPsRequestFull",
- "MagicVisibilityPCAPsRequestFullFilterV1",
-]
+from .filter_param import FilterParam
+
+__all__ = ["PCAPCreateParams", "MagicVisibilityPCAPsRequestSimple", "MagicVisibilityPCAPsRequestFull"]
class MagicVisibilityPCAPsRequestSimple(TypedDict, total=False):
@@ -34,27 +30,10 @@ class MagicVisibilityPCAPsRequestSimple(TypedDict, total=False):
non-sampled packets.
"""
- filter_v1: MagicVisibilityPCAPsRequestSimpleFilterV1
+ filter_v1: FilterParam
"""The packet capture filter. When this field is empty, all packets are captured."""
-class MagicVisibilityPCAPsRequestSimpleFilterV1(TypedDict, total=False):
- destination_address: str
- """The destination IP address of the packet."""
-
- destination_port: float
- """The destination port of the packet."""
-
- protocol: float
- """The protocol number of the packet."""
-
- source_address: str
- """The source IP address of the packet."""
-
- source_port: float
- """The source port of the packet."""
-
-
class MagicVisibilityPCAPsRequestFull(TypedDict, total=False):
account_id: Required[str]
"""Identifier"""
@@ -88,28 +67,11 @@ class MagicVisibilityPCAPsRequestFull(TypedDict, total=False):
This field only applies to `full` packet captures.
"""
- filter_v1: MagicVisibilityPCAPsRequestFullFilterV1
+ filter_v1: FilterParam
"""The packet capture filter. When this field is empty, all packets are captured."""
packet_limit: float
"""The limit of packets contained in a packet capture."""
-class MagicVisibilityPCAPsRequestFullFilterV1(TypedDict, total=False):
- destination_address: str
- """The destination IP address of the packet."""
-
- destination_port: float
- """The destination port of the packet."""
-
- protocol: float
- """The protocol number of the packet."""
-
- source_address: str
- """The source IP address of the packet."""
-
- source_port: float
- """The source port of the packet."""
-
-
PCAPCreateParams = Union[MagicVisibilityPCAPsRequestSimple, MagicVisibilityPCAPsRequestFull]
diff --git a/src/cloudflare/types/pcap_create_response.py b/src/cloudflare/types/pcap_create_response.py
index 4aa10aaf09e6..f36ae654a871 100644
--- a/src/cloudflare/types/pcap_create_response.py
+++ b/src/cloudflare/types/pcap_create_response.py
@@ -3,109 +3,18 @@
from typing import Union, Optional
from typing_extensions import Literal
+from .pcap import PCAP
+from .filter import Filter
from .._models import BaseModel
-__all__ = [
- "PCAPCreateResponse",
- "MagicVisibilityPCAPsResponseSimple",
- "MagicVisibilityPCAPsResponseSimpleFilterV1",
- "MagicVisibilityPCAPsResponseFull",
- "MagicVisibilityPCAPsResponseFullFilterV1",
-]
-
-
-class MagicVisibilityPCAPsResponseSimpleFilterV1(BaseModel):
- destination_address: Optional[str] = None
- """The destination IP address of the packet."""
-
- destination_port: Optional[float] = None
- """The destination port of the packet."""
-
- protocol: Optional[float] = None
- """The protocol number of the packet."""
-
- source_address: Optional[str] = None
- """The source IP address of the packet."""
-
- source_port: Optional[float] = None
- """The source port of the packet."""
+__all__ = ["PCAPCreateResponse", "MagicVisibilityPCAPsResponseSimple"]
class MagicVisibilityPCAPsResponseSimple(BaseModel):
id: Optional[str] = None
"""The ID for the packet capture."""
- filter_v1: Optional[MagicVisibilityPCAPsResponseSimpleFilterV1] = None
- """The packet capture filter. When this field is empty, all packets are captured."""
-
- status: Optional[
- Literal[
- "unknown", "success", "pending", "running", "conversion_pending", "conversion_running", "complete", "failed"
- ]
- ] = None
- """The status of the packet capture request."""
-
- submitted: Optional[str] = None
- """The RFC 3339 timestamp when the packet capture was created."""
-
- system: Optional[Literal["magic-transit"]] = None
- """The system used to collect packet captures."""
-
- time_limit: Optional[float] = None
- """The packet capture duration in seconds."""
-
- type: Optional[Literal["simple", "full"]] = None
- """The type of packet capture.
-
- `Simple` captures sampled packets, and `full` captures entire payloads and
- non-sampled packets.
- """
-
-
-class MagicVisibilityPCAPsResponseFullFilterV1(BaseModel):
- destination_address: Optional[str] = None
- """The destination IP address of the packet."""
-
- destination_port: Optional[float] = None
- """The destination port of the packet."""
-
- protocol: Optional[float] = None
- """The protocol number of the packet."""
-
- source_address: Optional[str] = None
- """The source IP address of the packet."""
-
- source_port: Optional[float] = None
- """The source port of the packet."""
-
-
-class MagicVisibilityPCAPsResponseFull(BaseModel):
- id: Optional[str] = None
- """The ID for the packet capture."""
-
- byte_limit: Optional[float] = None
- """The maximum number of bytes to capture.
-
- This field only applies to `full` packet captures.
- """
-
- colo_name: Optional[str] = None
- """The name of the data center used for the packet capture.
-
- This can be a specific colo (ord02) or a multi-colo name (ORD). This field only
- applies to `full` packet captures.
- """
-
- destination_conf: Optional[str] = None
- """The full URI for the bucket. This field only applies to `full` packet captures."""
-
- error_message: Optional[str] = None
- """An error message that describes why the packet capture failed.
-
- This field only applies to `full` packet captures.
- """
-
- filter_v1: Optional[MagicVisibilityPCAPsResponseFullFilterV1] = None
+ filter_v1: Optional[Filter] = None
"""The packet capture filter. When this field is empty, all packets are captured."""
status: Optional[
@@ -132,4 +41,4 @@ class MagicVisibilityPCAPsResponseFull(BaseModel):
"""
-PCAPCreateResponse = Union[MagicVisibilityPCAPsResponseSimple, MagicVisibilityPCAPsResponseFull]
+PCAPCreateResponse = Union[MagicVisibilityPCAPsResponseSimple, PCAP]
diff --git a/src/cloudflare/types/pcap_get_response.py b/src/cloudflare/types/pcap_get_response.py
index 1f663f6308e7..5ec77aa18401 100644
--- a/src/cloudflare/types/pcap_get_response.py
+++ b/src/cloudflare/types/pcap_get_response.py
@@ -3,109 +3,18 @@
from typing import Union, Optional
from typing_extensions import Literal
+from .pcap import PCAP
+from .filter import Filter
from .._models import BaseModel
-__all__ = [
- "PCAPGetResponse",
- "MagicVisibilityPCAPsResponseSimple",
- "MagicVisibilityPCAPsResponseSimpleFilterV1",
- "MagicVisibilityPCAPsResponseFull",
- "MagicVisibilityPCAPsResponseFullFilterV1",
-]
-
-
-class MagicVisibilityPCAPsResponseSimpleFilterV1(BaseModel):
- destination_address: Optional[str] = None
- """The destination IP address of the packet."""
-
- destination_port: Optional[float] = None
- """The destination port of the packet."""
-
- protocol: Optional[float] = None
- """The protocol number of the packet."""
-
- source_address: Optional[str] = None
- """The source IP address of the packet."""
-
- source_port: Optional[float] = None
- """The source port of the packet."""
+__all__ = ["PCAPGetResponse", "MagicVisibilityPCAPsResponseSimple"]
class MagicVisibilityPCAPsResponseSimple(BaseModel):
id: Optional[str] = None
"""The ID for the packet capture."""
- filter_v1: Optional[MagicVisibilityPCAPsResponseSimpleFilterV1] = None
- """The packet capture filter. When this field is empty, all packets are captured."""
-
- status: Optional[
- Literal[
- "unknown", "success", "pending", "running", "conversion_pending", "conversion_running", "complete", "failed"
- ]
- ] = None
- """The status of the packet capture request."""
-
- submitted: Optional[str] = None
- """The RFC 3339 timestamp when the packet capture was created."""
-
- system: Optional[Literal["magic-transit"]] = None
- """The system used to collect packet captures."""
-
- time_limit: Optional[float] = None
- """The packet capture duration in seconds."""
-
- type: Optional[Literal["simple", "full"]] = None
- """The type of packet capture.
-
- `Simple` captures sampled packets, and `full` captures entire payloads and
- non-sampled packets.
- """
-
-
-class MagicVisibilityPCAPsResponseFullFilterV1(BaseModel):
- destination_address: Optional[str] = None
- """The destination IP address of the packet."""
-
- destination_port: Optional[float] = None
- """The destination port of the packet."""
-
- protocol: Optional[float] = None
- """The protocol number of the packet."""
-
- source_address: Optional[str] = None
- """The source IP address of the packet."""
-
- source_port: Optional[float] = None
- """The source port of the packet."""
-
-
-class MagicVisibilityPCAPsResponseFull(BaseModel):
- id: Optional[str] = None
- """The ID for the packet capture."""
-
- byte_limit: Optional[float] = None
- """The maximum number of bytes to capture.
-
- This field only applies to `full` packet captures.
- """
-
- colo_name: Optional[str] = None
- """The name of the data center used for the packet capture.
-
- This can be a specific colo (ord02) or a multi-colo name (ORD). This field only
- applies to `full` packet captures.
- """
-
- destination_conf: Optional[str] = None
- """The full URI for the bucket. This field only applies to `full` packet captures."""
-
- error_message: Optional[str] = None
- """An error message that describes why the packet capture failed.
-
- This field only applies to `full` packet captures.
- """
-
- filter_v1: Optional[MagicVisibilityPCAPsResponseFullFilterV1] = None
+ filter_v1: Optional[Filter] = None
"""The packet capture filter. When this field is empty, all packets are captured."""
status: Optional[
@@ -132,4 +41,4 @@ class MagicVisibilityPCAPsResponseFull(BaseModel):
"""
-PCAPGetResponse = Union[MagicVisibilityPCAPsResponseSimple, MagicVisibilityPCAPsResponseFull]
+PCAPGetResponse = Union[MagicVisibilityPCAPsResponseSimple, PCAP]
diff --git a/src/cloudflare/types/pcap_list_response.py b/src/cloudflare/types/pcap_list_response.py
index ef6ac672c558..631aa3e47e33 100644
--- a/src/cloudflare/types/pcap_list_response.py
+++ b/src/cloudflare/types/pcap_list_response.py
@@ -3,109 +3,18 @@
from typing import Union, Optional
from typing_extensions import Literal
+from .pcap import PCAP
+from .filter import Filter
from .._models import BaseModel
-__all__ = [
- "PCAPListResponse",
- "MagicVisibilityPCAPsResponseSimple",
- "MagicVisibilityPCAPsResponseSimpleFilterV1",
- "MagicVisibilityPCAPsResponseFull",
- "MagicVisibilityPCAPsResponseFullFilterV1",
-]
-
-
-class MagicVisibilityPCAPsResponseSimpleFilterV1(BaseModel):
- destination_address: Optional[str] = None
- """The destination IP address of the packet."""
-
- destination_port: Optional[float] = None
- """The destination port of the packet."""
-
- protocol: Optional[float] = None
- """The protocol number of the packet."""
-
- source_address: Optional[str] = None
- """The source IP address of the packet."""
-
- source_port: Optional[float] = None
- """The source port of the packet."""
+__all__ = ["PCAPListResponse", "MagicVisibilityPCAPsResponseSimple"]
class MagicVisibilityPCAPsResponseSimple(BaseModel):
id: Optional[str] = None
"""The ID for the packet capture."""
- filter_v1: Optional[MagicVisibilityPCAPsResponseSimpleFilterV1] = None
- """The packet capture filter. When this field is empty, all packets are captured."""
-
- status: Optional[
- Literal[
- "unknown", "success", "pending", "running", "conversion_pending", "conversion_running", "complete", "failed"
- ]
- ] = None
- """The status of the packet capture request."""
-
- submitted: Optional[str] = None
- """The RFC 3339 timestamp when the packet capture was created."""
-
- system: Optional[Literal["magic-transit"]] = None
- """The system used to collect packet captures."""
-
- time_limit: Optional[float] = None
- """The packet capture duration in seconds."""
-
- type: Optional[Literal["simple", "full"]] = None
- """The type of packet capture.
-
- `Simple` captures sampled packets, and `full` captures entire payloads and
- non-sampled packets.
- """
-
-
-class MagicVisibilityPCAPsResponseFullFilterV1(BaseModel):
- destination_address: Optional[str] = None
- """The destination IP address of the packet."""
-
- destination_port: Optional[float] = None
- """The destination port of the packet."""
-
- protocol: Optional[float] = None
- """The protocol number of the packet."""
-
- source_address: Optional[str] = None
- """The source IP address of the packet."""
-
- source_port: Optional[float] = None
- """The source port of the packet."""
-
-
-class MagicVisibilityPCAPsResponseFull(BaseModel):
- id: Optional[str] = None
- """The ID for the packet capture."""
-
- byte_limit: Optional[float] = None
- """The maximum number of bytes to capture.
-
- This field only applies to `full` packet captures.
- """
-
- colo_name: Optional[str] = None
- """The name of the data center used for the packet capture.
-
- This can be a specific colo (ord02) or a multi-colo name (ORD). This field only
- applies to `full` packet captures.
- """
-
- destination_conf: Optional[str] = None
- """The full URI for the bucket. This field only applies to `full` packet captures."""
-
- error_message: Optional[str] = None
- """An error message that describes why the packet capture failed.
-
- This field only applies to `full` packet captures.
- """
-
- filter_v1: Optional[MagicVisibilityPCAPsResponseFullFilterV1] = None
+ filter_v1: Optional[Filter] = None
"""The packet capture filter. When this field is empty, all packets are captured."""
status: Optional[
@@ -132,4 +41,4 @@ class MagicVisibilityPCAPsResponseFull(BaseModel):
"""
-PCAPListResponse = Union[MagicVisibilityPCAPsResponseSimple, MagicVisibilityPCAPsResponseFull]
+PCAPListResponse = Union[MagicVisibilityPCAPsResponseSimple, PCAP]
diff --git a/src/cloudflare/types/placement_configuration.py b/src/cloudflare/types/placement_configuration.py
new file mode 100644
index 000000000000..13def2d7f056
--- /dev/null
+++ b/src/cloudflare/types/placement_configuration.py
@@ -0,0 +1,17 @@
+# 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__ = ["PlacementConfiguration"]
+
+
+class PlacementConfiguration(BaseModel):
+ mode: Optional[Literal["smart"]] = None
+ """
+ Enables
+ [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
+ Only `"smart"` is currently supported
+ """
diff --git a/src/cloudflare/types/placement_configuration_param.py b/src/cloudflare/types/placement_configuration_param.py
new file mode 100644
index 000000000000..f6ef4c070fd1
--- /dev/null
+++ b/src/cloudflare/types/placement_configuration_param.py
@@ -0,0 +1,16 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, TypedDict
+
+__all__ = ["PlacementConfigurationParam"]
+
+
+class PlacementConfigurationParam(TypedDict, total=False):
+ mode: Literal["smart"]
+ """
+ Enables
+ [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
+ Only `"smart"` is currently supported
+ """
diff --git a/src/cloudflare/types/r2_binding.py b/src/cloudflare/types/r2_binding.py
new file mode 100644
index 000000000000..79eb32f82fb9
--- /dev/null
+++ b/src/cloudflare/types/r2_binding.py
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal
+
+from .._models import BaseModel
+
+__all__ = ["R2Binding"]
+
+
+class R2Binding(BaseModel):
+ bucket_name: str
+ """R2 bucket to bind to"""
+
+ name: str
+ """A JavaScript variable name for the binding."""
+
+ type: Literal["r2_bucket"]
+ """The class of resource that the binding provides."""
diff --git a/src/cloudflare/types/r2_binding_param.py b/src/cloudflare/types/r2_binding_param.py
new file mode 100644
index 000000000000..559667ded100
--- /dev/null
+++ b/src/cloudflare/types/r2_binding_param.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, Required, TypedDict
+
+__all__ = ["R2BindingParam"]
+
+
+class R2BindingParam(TypedDict, total=False):
+ bucket_name: Required[str]
+ """R2 bucket to bind to"""
+
+ type: Required[Literal["r2_bucket"]]
+ """The class of resource that the binding provides."""
diff --git a/src/cloudflare/types/rate_limit_list_response.py b/src/cloudflare/types/rate_limit_list_response.py
index c1a4bb3d143c..95d8559f6cf5 100644
--- a/src/cloudflare/types/rate_limit_list_response.py
+++ b/src/cloudflare/types/rate_limit_list_response.py
@@ -3,55 +3,11 @@
from typing import List, Optional
from typing_extensions import Literal
+from .action import Action
from .._models import BaseModel
+from .methods_item import MethodsItem
-__all__ = [
- "RateLimitListResponse",
- "Action",
- "ActionResponse",
- "Bypass",
- "Match",
- "MatchHeader",
- "MatchRequest",
- "MatchResponse",
-]
-
-
-class ActionResponse(BaseModel):
- body: Optional[str] = None
- """The response body to return.
-
- The value must conform to the configured content type.
- """
-
- content_type: Optional[str] = None
- """The content type of the body.
-
- Must be one of the following: `text/plain`, `text/xml`, or `application/json`.
- """
-
-
-class Action(BaseModel):
- mode: Optional[Literal["simulate", "ban", "challenge", "js_challenge", "managed_challenge"]] = None
- """The action to perform."""
-
- response: Optional[ActionResponse] = None
- """A custom content type and reponse to return when the threshold is exceeded.
-
- The custom response configured in this object will override the custom error for
- the zone. This object is optional. Notes: If you omit this object, Cloudflare
- will use the default HTML error page. If "mode" is "challenge",
- "managed_challenge", or "js_challenge", Cloudflare will use the zone challenge
- pages and you should not provide the "response" object.
- """
-
- timeout: Optional[float] = None
- """The time in seconds during which Cloudflare will perform the mitigation action.
-
- Must be an integer value greater than or equal to the period. Notes: If "mode"
- is "challenge", "managed_challenge", or "js_challenge", Cloudflare will use the
- zone's Challenge Passage time and you should not provide this value.
- """
+__all__ = ["RateLimitListResponse", "Bypass", "Match", "MatchHeader", "MatchRequest", "MatchResponse"]
class Bypass(BaseModel):
@@ -73,7 +29,7 @@ class MatchHeader(BaseModel):
class MatchRequest(BaseModel):
- methods: Optional[List[Literal["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "_ALL_"]]] = None
+ methods: Optional[List[MethodsItem]] = None
"""The HTTP methods to match.
You can specify a subset (for example, `['POST','PUT']`) or all methods
diff --git a/src/cloudflare/types/rate_plan_get_response.py b/src/cloudflare/types/rate_plan_get_response.py
index ff3291e8eeb4..d39850cbeac3 100644
--- a/src/cloudflare/types/rate_plan_get_response.py
+++ b/src/cloudflare/types/rate_plan_get_response.py
@@ -4,26 +4,16 @@
from typing_extensions import Literal
from .._models import BaseModel
+from .component import Component
-__all__ = ["RatePlanGetResponse", "RatePlanGetResponseItem", "RatePlanGetResponseItemComponent"]
-
-
-class RatePlanGetResponseItemComponent(BaseModel):
- default: Optional[float] = None
- """The default amount allocated."""
-
- name: Optional[Literal["zones", "page_rules", "dedicated_certificates", "dedicated_certificates_custom"]] = None
- """The unique component."""
-
- unit_price: Optional[float] = None
- """The unit price of the addon."""
+__all__ = ["RatePlanGetResponse", "RatePlanGetResponseItem"]
class RatePlanGetResponseItem(BaseModel):
id: Optional[str] = None
"""Plan identifier tag."""
- components: Optional[List[RatePlanGetResponseItemComponent]] = None
+ components: Optional[List[Component]] = None
"""Array of available components values for the plan."""
currency: Optional[str] = None
diff --git a/src/cloudflare/types/request_list_item.py b/src/cloudflare/types/request_list_item.py
new file mode 100644
index 000000000000..213f2cb5d0dc
--- /dev/null
+++ b/src/cloudflare/types/request_list_item.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from .._models import BaseModel
+
+__all__ = ["RequestListItem"]
+
+
+class RequestListItem(BaseModel):
+ id: Optional[str] = None
+ """Human-readable identifier of the Managed Transform."""
+
+ enabled: Optional[bool] = None
+ """When true, the Managed Transform is enabled."""
diff --git a/src/cloudflare/types/request_list_item_param.py b/src/cloudflare/types/request_list_item_param.py
new file mode 100644
index 000000000000..8d43e49158f8
--- /dev/null
+++ b/src/cloudflare/types/request_list_item_param.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import TypedDict
+
+__all__ = ["RequestListItemParam"]
+
+
+class RequestListItemParam(TypedDict, total=False):
+ id: str
+ """Human-readable identifier of the Managed Transform."""
+
+ enabled: bool
+ """When true, the Managed Transform is enabled."""
diff --git a/src/cloudflare/types/rules/__init__.py b/src/cloudflare/types/rules/__init__.py
index c48c165fa3ee..24f42f87715b 100644
--- a/src/cloudflare/types/rules/__init__.py
+++ b/src/cloudflare/types/rules/__init__.py
@@ -2,7 +2,11 @@
from __future__ import annotations
+from .hostname import Hostname as Hostname
+from .redirect import Redirect as Redirect
from .lists_list import ListsList as ListsList
+from .hostname_param import HostnameParam as HostnameParam
+from .redirect_param import RedirectParam as RedirectParam
from .list_create_params import ListCreateParams as ListCreateParams
from .list_delete_params import ListDeleteParams as ListDeleteParams
from .list_update_params import ListUpdateParams as ListUpdateParams
diff --git a/src/cloudflare/types/rules/hostname.py b/src/cloudflare/types/rules/hostname.py
new file mode 100644
index 000000000000..32d7ce459a92
--- /dev/null
+++ b/src/cloudflare/types/rules/hostname.py
@@ -0,0 +1,9 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from ..._models import BaseModel
+
+__all__ = ["Hostname"]
+
+
+class Hostname(BaseModel):
+ url_hostname: str
diff --git a/src/cloudflare/types/rules/hostname_param.py b/src/cloudflare/types/rules/hostname_param.py
new file mode 100644
index 000000000000..280651700b2f
--- /dev/null
+++ b/src/cloudflare/types/rules/hostname_param.py
@@ -0,0 +1,11 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["HostnameParam"]
+
+
+class HostnameParam(TypedDict, total=False):
+ url_hostname: Required[str]
diff --git a/src/cloudflare/types/rules/lists/item_create_params.py b/src/cloudflare/types/rules/lists/item_create_params.py
index bf7e7e8f9933..8db16c19fcf6 100644
--- a/src/cloudflare/types/rules/lists/item_create_params.py
+++ b/src/cloudflare/types/rules/lists/item_create_params.py
@@ -3,9 +3,12 @@
from __future__ import annotations
from typing import Iterable
-from typing_extensions import Literal, Required, TypedDict
+from typing_extensions import Required, TypedDict
-__all__ = ["ItemCreateParams", "Body", "BodyHostname", "BodyRedirect"]
+from ..hostname_param import HostnameParam
+from ..redirect_param import RedirectParam
+
+__all__ = ["ItemCreateParams", "Body"]
class ItemCreateParams(TypedDict, total=False):
@@ -15,26 +18,6 @@ class ItemCreateParams(TypedDict, total=False):
body: Required[Iterable[Body]]
-class BodyHostname(TypedDict, total=False):
- url_hostname: Required[str]
-
-
-class BodyRedirect(TypedDict, total=False):
- source_url: Required[str]
-
- target_url: Required[str]
-
- include_subdomains: bool
-
- preserve_path_suffix: bool
-
- preserve_query_string: bool
-
- status_code: Literal[301, 302, 307, 308]
-
- subpath_matching: bool
-
-
class Body(TypedDict, total=False):
asn: int
"""A non-negative 32 bit integer"""
@@ -42,7 +25,7 @@ class Body(TypedDict, total=False):
comment: str
"""An informative summary of the list item."""
- hostname: BodyHostname
+ hostname: HostnameParam
"""
Valid characters for hostnames are ASCII(7) letters from a to z, the digits from
0 to 9, wildcards (\\**), and the hyphen (-).
@@ -54,5 +37,5 @@ class Body(TypedDict, total=False):
IPv6 CIDRs are limited to a maximum of /64.
"""
- redirect: BodyRedirect
+ redirect: RedirectParam
"""The definition of the redirect."""
diff --git a/src/cloudflare/types/rules/lists/item_get_response.py b/src/cloudflare/types/rules/lists/item_get_response.py
index c977176959ea..8d3a3426193f 100644
--- a/src/cloudflare/types/rules/lists/item_get_response.py
+++ b/src/cloudflare/types/rules/lists/item_get_response.py
@@ -1,31 +1,10 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Union, Optional
-from typing_extensions import Literal
+from typing import Union
-from ...._models import BaseModel
+from ..hostname import Hostname
+from ..redirect import Redirect
-__all__ = ["ItemGetResponse", "ListsItemRedirect", "ListsItemHostname"]
+__all__ = ["ItemGetResponse"]
-
-class ListsItemRedirect(BaseModel):
- source_url: str
-
- target_url: str
-
- include_subdomains: Optional[bool] = None
-
- preserve_path_suffix: Optional[bool] = None
-
- preserve_query_string: Optional[bool] = None
-
- status_code: Optional[Literal[301, 302, 307, 308]] = None
-
- subpath_matching: Optional[bool] = None
-
-
-class ListsItemHostname(BaseModel):
- url_hostname: str
-
-
-ItemGetResponse = Union[str, ListsItemRedirect, ListsItemHostname, int, None]
+ItemGetResponse = Union[str, Redirect, Hostname, int, None]
diff --git a/src/cloudflare/types/rules/lists/item_update_params.py b/src/cloudflare/types/rules/lists/item_update_params.py
index dcf6f7fd954b..eeec3b2a70d4 100644
--- a/src/cloudflare/types/rules/lists/item_update_params.py
+++ b/src/cloudflare/types/rules/lists/item_update_params.py
@@ -3,9 +3,12 @@
from __future__ import annotations
from typing import Iterable
-from typing_extensions import Literal, Required, TypedDict
+from typing_extensions import Required, TypedDict
-__all__ = ["ItemUpdateParams", "Body", "BodyHostname", "BodyRedirect"]
+from ..hostname_param import HostnameParam
+from ..redirect_param import RedirectParam
+
+__all__ = ["ItemUpdateParams", "Body"]
class ItemUpdateParams(TypedDict, total=False):
@@ -15,26 +18,6 @@ class ItemUpdateParams(TypedDict, total=False):
body: Required[Iterable[Body]]
-class BodyHostname(TypedDict, total=False):
- url_hostname: Required[str]
-
-
-class BodyRedirect(TypedDict, total=False):
- source_url: Required[str]
-
- target_url: Required[str]
-
- include_subdomains: bool
-
- preserve_path_suffix: bool
-
- preserve_query_string: bool
-
- status_code: Literal[301, 302, 307, 308]
-
- subpath_matching: bool
-
-
class Body(TypedDict, total=False):
asn: int
"""A non-negative 32 bit integer"""
@@ -42,7 +25,7 @@ class Body(TypedDict, total=False):
comment: str
"""An informative summary of the list item."""
- hostname: BodyHostname
+ hostname: HostnameParam
"""
Valid characters for hostnames are ASCII(7) letters from a to z, the digits from
0 to 9, wildcards (\\**), and the hyphen (-).
@@ -54,5 +37,5 @@ class Body(TypedDict, total=False):
IPv6 CIDRs are limited to a maximum of /64.
"""
- redirect: BodyRedirect
+ redirect: RedirectParam
"""The definition of the redirect."""
diff --git a/src/cloudflare/types/rules/redirect.py b/src/cloudflare/types/rules/redirect.py
new file mode 100644
index 000000000000..e52def9115bf
--- /dev/null
+++ b/src/cloudflare/types/rules/redirect.py
@@ -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__ = ["Redirect"]
+
+
+class Redirect(BaseModel):
+ source_url: str
+
+ target_url: str
+
+ include_subdomains: Optional[bool] = None
+
+ preserve_path_suffix: Optional[bool] = None
+
+ preserve_query_string: Optional[bool] = None
+
+ status_code: Optional[Literal[301, 302, 307, 308]] = None
+
+ subpath_matching: Optional[bool] = None
diff --git a/src/cloudflare/types/rules/redirect_param.py b/src/cloudflare/types/rules/redirect_param.py
new file mode 100644
index 000000000000..570fd1d90f7e
--- /dev/null
+++ b/src/cloudflare/types/rules/redirect_param.py
@@ -0,0 +1,23 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, Required, TypedDict
+
+__all__ = ["RedirectParam"]
+
+
+class RedirectParam(TypedDict, total=False):
+ source_url: Required[str]
+
+ target_url: Required[str]
+
+ include_subdomains: bool
+
+ preserve_path_suffix: bool
+
+ preserve_query_string: bool
+
+ status_code: Literal[301, 302, 307, 308]
+
+ subpath_matching: bool
diff --git a/src/cloudflare/types/service_binding.py b/src/cloudflare/types/service_binding.py
new file mode 100644
index 000000000000..ace4c814cb58
--- /dev/null
+++ b/src/cloudflare/types/service_binding.py
@@ -0,0 +1,21 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal
+
+from .._models import BaseModel
+
+__all__ = ["ServiceBinding"]
+
+
+class ServiceBinding(BaseModel):
+ environment: str
+ """Optional environment if the Worker utilizes one."""
+
+ name: str
+ """A JavaScript variable name for the binding."""
+
+ service: str
+ """Name of Worker to bind to"""
+
+ type: Literal["service"]
+ """The class of resource that the binding provides."""
diff --git a/src/cloudflare/types/service_binding_param.py b/src/cloudflare/types/service_binding_param.py
new file mode 100644
index 000000000000..52ecb3350759
--- /dev/null
+++ b/src/cloudflare/types/service_binding_param.py
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, Required, TypedDict
+
+__all__ = ["ServiceBindingParam"]
+
+
+class ServiceBindingParam(TypedDict, total=False):
+ environment: Required[str]
+ """Optional environment if the Worker utilizes one."""
+
+ service: Required[str]
+ """Name of Worker to bind to"""
+
+ type: Required[Literal["service"]]
+ """The class of resource that the binding provides."""
diff --git a/src/cloudflare/types/shared/unnamed_schema_ref_33f2e3917f3fe46ad98af0acbb1d9a19.py b/src/cloudflare/types/shared/unnamed_schema_ref_33f2e3917f3fe46ad98af0acbb1d9a19.py
index cf2899cec228..5af22b0a31d9 100644
--- a/src/cloudflare/types/shared/unnamed_schema_ref_33f2e3917f3fe46ad98af0acbb1d9a19.py
+++ b/src/cloudflare/types/shared/unnamed_schema_ref_33f2e3917f3fe46ad98af0acbb1d9a19.py
@@ -5,14 +5,9 @@
from typing_extensions import Literal
from ..._models import BaseModel
+from ..zero_trust import WARPConnectorTunnel
-__all__ = [
- "UnnamedSchemaRef33f2e3917f3fe46ad98af0acbb1d9a19",
- "TunnelCfdTunnel",
- "TunnelCfdTunnelConnection",
- "TunnelWARPConnectorTunnel",
- "TunnelWARPConnectorTunnelConnection",
-]
+__all__ = ["UnnamedSchemaRef33f2e3917f3fe46ad98af0acbb1d9a19", "TunnelCfdTunnel", "TunnelCfdTunnelConnection"]
class TunnelCfdTunnelConnection(BaseModel):
@@ -102,85 +97,4 @@ class TunnelCfdTunnel(BaseModel):
"""The type of tunnel."""
-class TunnelWARPConnectorTunnelConnection(BaseModel):
- id: Optional[str] = None
- """UUID of the Cloudflare Tunnel connection."""
-
- client_id: Optional[object] = None
- """UUID of the cloudflared instance."""
-
- client_version: Optional[str] = None
- """The cloudflared version used to establish this connection."""
-
- colo_name: Optional[str] = None
- """The Cloudflare data center used for this connection."""
-
- is_pending_reconnect: Optional[bool] = None
- """
- Cloudflare continues to track connections for several minutes after they
- disconnect. This is an optimization to improve latency and reliability of
- reconnecting. If `true`, the connection has disconnected but is still being
- tracked. If `false`, the connection is actively serving traffic.
- """
-
- opened_at: Optional[datetime] = None
- """Timestamp of when the connection was established."""
-
- origin_ip: Optional[str] = None
- """The public IP address of the host running cloudflared."""
-
- uuid: Optional[str] = None
- """UUID of the Cloudflare Tunnel connection."""
-
-
-class TunnelWARPConnectorTunnel(BaseModel):
- id: Optional[str] = None
- """UUID of the tunnel."""
-
- account_tag: Optional[str] = None
- """Cloudflare account ID"""
-
- connections: Optional[List[TunnelWARPConnectorTunnelConnection]] = None
- """The Cloudflare Tunnel connections between your origin and Cloudflare's edge."""
-
- conns_active_at: Optional[datetime] = None
- """
- Timestamp of when the tunnel established at least one connection to Cloudflare's
- edge. If `null`, the tunnel is inactive.
- """
-
- conns_inactive_at: Optional[datetime] = None
- """
- Timestamp of when the tunnel became inactive (no connections to Cloudflare's
- edge). If `null`, the tunnel is active.
- """
-
- created_at: Optional[datetime] = None
- """Timestamp of when the tunnel was created."""
-
- deleted_at: Optional[datetime] = None
- """Timestamp of when the tunnel was deleted.
-
- If `null`, the tunnel has not been deleted.
- """
-
- metadata: Optional[object] = None
- """Metadata associated with the tunnel."""
-
- name: Optional[str] = None
- """A user-friendly name for the tunnel."""
-
- status: Optional[str] = None
- """The status of the tunnel.
-
- Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is
- active and able to serve traffic but in an unhealthy state), `healthy` (tunnel
- is active and able to serve traffic), or `down` (tunnel can not serve traffic as
- it has no connections to the Cloudflare Edge).
- """
-
- tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "ip_sec", "gre", "cni"]] = None
- """The type of tunnel."""
-
-
-UnnamedSchemaRef33f2e3917f3fe46ad98af0acbb1d9a19 = Union[TunnelCfdTunnel, TunnelWARPConnectorTunnel]
+UnnamedSchemaRef33f2e3917f3fe46ad98af0acbb1d9a19 = Union[TunnelCfdTunnel, WARPConnectorTunnel]
diff --git a/src/cloudflare/types/shared/unnamed_schema_ref_413ab4522f0bb93f63444799121fe2f8.py b/src/cloudflare/types/shared/unnamed_schema_ref_413ab4522f0bb93f63444799121fe2f8.py
index c1b54bea3405..38fee2e630f2 100644
--- a/src/cloudflare/types/shared/unnamed_schema_ref_413ab4522f0bb93f63444799121fe2f8.py
+++ b/src/cloudflare/types/shared/unnamed_schema_ref_413ab4522f0bb93f63444799121fe2f8.py
@@ -5,14 +5,9 @@
from typing_extensions import Literal
from ..._models import BaseModel
+from ..zero_trust import WARPConnectorTunnel
-__all__ = [
- "UnnamedSchemaRef413ab4522f0bb93f63444799121fe2f8",
- "TunnelCfdTunnel",
- "TunnelCfdTunnelConnection",
- "TunnelWARPConnectorTunnel",
- "TunnelWARPConnectorTunnelConnection",
-]
+__all__ = ["UnnamedSchemaRef413ab4522f0bb93f63444799121fe2f8", "TunnelCfdTunnel", "TunnelCfdTunnelConnection"]
class TunnelCfdTunnelConnection(BaseModel):
@@ -102,85 +97,4 @@ class TunnelCfdTunnel(BaseModel):
"""The type of tunnel."""
-class TunnelWARPConnectorTunnelConnection(BaseModel):
- id: Optional[str] = None
- """UUID of the Cloudflare Tunnel connection."""
-
- client_id: Optional[object] = None
- """UUID of the cloudflared instance."""
-
- client_version: Optional[str] = None
- """The cloudflared version used to establish this connection."""
-
- colo_name: Optional[str] = None
- """The Cloudflare data center used for this connection."""
-
- is_pending_reconnect: Optional[bool] = None
- """
- Cloudflare continues to track connections for several minutes after they
- disconnect. This is an optimization to improve latency and reliability of
- reconnecting. If `true`, the connection has disconnected but is still being
- tracked. If `false`, the connection is actively serving traffic.
- """
-
- opened_at: Optional[datetime] = None
- """Timestamp of when the connection was established."""
-
- origin_ip: Optional[str] = None
- """The public IP address of the host running cloudflared."""
-
- uuid: Optional[str] = None
- """UUID of the Cloudflare Tunnel connection."""
-
-
-class TunnelWARPConnectorTunnel(BaseModel):
- id: Optional[str] = None
- """UUID of the tunnel."""
-
- account_tag: Optional[str] = None
- """Cloudflare account ID"""
-
- connections: Optional[List[TunnelWARPConnectorTunnelConnection]] = None
- """The Cloudflare Tunnel connections between your origin and Cloudflare's edge."""
-
- conns_active_at: Optional[datetime] = None
- """
- Timestamp of when the tunnel established at least one connection to Cloudflare's
- edge. If `null`, the tunnel is inactive.
- """
-
- conns_inactive_at: Optional[datetime] = None
- """
- Timestamp of when the tunnel became inactive (no connections to Cloudflare's
- edge). If `null`, the tunnel is active.
- """
-
- created_at: Optional[datetime] = None
- """Timestamp of when the tunnel was created."""
-
- deleted_at: Optional[datetime] = None
- """Timestamp of when the tunnel was deleted.
-
- If `null`, the tunnel has not been deleted.
- """
-
- metadata: Optional[object] = None
- """Metadata associated with the tunnel."""
-
- name: Optional[str] = None
- """A user-friendly name for the tunnel."""
-
- status: Optional[str] = None
- """The status of the tunnel.
-
- Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is
- active and able to serve traffic but in an unhealthy state), `healthy` (tunnel
- is active and able to serve traffic), or `down` (tunnel can not serve traffic as
- it has no connections to the Cloudflare Edge).
- """
-
- tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "ip_sec", "gre", "cni"]] = None
- """The type of tunnel."""
-
-
-UnnamedSchemaRef413ab4522f0bb93f63444799121fe2f8 = Union[TunnelCfdTunnel, TunnelWARPConnectorTunnel]
+UnnamedSchemaRef413ab4522f0bb93f63444799121fe2f8 = Union[TunnelCfdTunnel, WARPConnectorTunnel]
diff --git a/src/cloudflare/types/single_step_migration.py b/src/cloudflare/types/single_step_migration.py
new file mode 100644
index 000000000000..615d51a49052
--- /dev/null
+++ b/src/cloudflare/types/single_step_migration.py
@@ -0,0 +1,49 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+
+from pydantic import Field as FieldInfo
+
+from .._models import BaseModel
+
+__all__ = ["SingleStepMigration", "RenamedClass", "TransferredClass"]
+
+
+class RenamedClass(BaseModel):
+ from_: Optional[str] = FieldInfo(alias="from", default=None)
+
+ to: Optional[str] = None
+
+
+class TransferredClass(BaseModel):
+ from_: Optional[str] = FieldInfo(alias="from", default=None)
+
+ from_script: Optional[str] = None
+
+ to: Optional[str] = None
+
+
+class SingleStepMigration(BaseModel):
+ deleted_classes: Optional[List[str]] = None
+ """A list of classes to delete Durable Object namespaces from."""
+
+ new_classes: Optional[List[str]] = None
+ """A list of classes to create Durable Object namespaces from."""
+
+ new_tag: Optional[str] = None
+ """Tag to set as the latest migration tag."""
+
+ old_tag: Optional[str] = None
+ """Tag used to verify against the latest migration tag for this Worker.
+
+ If they don't match, the upload is rejected.
+ """
+
+ renamed_classes: Optional[List[RenamedClass]] = None
+ """A list of classes with Durable Object namespaces that were renamed."""
+
+ transferred_classes: Optional[List[TransferredClass]] = None
+ """
+ A list of transfers for Durable Object namespaces from a different Worker and
+ class to a class defined in this Worker.
+ """
diff --git a/src/cloudflare/types/single_step_migration_param.py b/src/cloudflare/types/single_step_migration_param.py
new file mode 100644
index 000000000000..0c831efe8af1
--- /dev/null
+++ b/src/cloudflare/types/single_step_migration_param.py
@@ -0,0 +1,61 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Iterable
+from typing_extensions import TypedDict
+
+__all__ = ["SingleStepMigrationParam", "RenamedClass", "TransferredClass"]
+
+_RenamedClassReservedKeywords = TypedDict(
+ "_RenamedClassReservedKeywords",
+ {
+ "from": str,
+ },
+ total=False,
+)
+
+
+class RenamedClass(_RenamedClassReservedKeywords, total=False):
+ to: str
+
+
+_TransferredClassReservedKeywords = TypedDict(
+ "_TransferredClassReservedKeywords",
+ {
+ "from": str,
+ },
+ total=False,
+)
+
+
+class TransferredClass(_TransferredClassReservedKeywords, total=False):
+ from_script: str
+
+ to: str
+
+
+class SingleStepMigrationParam(TypedDict, total=False):
+ deleted_classes: List[str]
+ """A list of classes to delete Durable Object namespaces from."""
+
+ new_classes: List[str]
+ """A list of classes to create Durable Object namespaces from."""
+
+ new_tag: str
+ """Tag to set as the latest migration tag."""
+
+ old_tag: str
+ """Tag used to verify against the latest migration tag for this Worker.
+
+ If they don't match, the upload is rejected.
+ """
+
+ renamed_classes: Iterable[RenamedClass]
+ """A list of classes with Durable Object namespaces that were renamed."""
+
+ transferred_classes: Iterable[TransferredClass]
+ """
+ A list of transfers for Durable Object namespaces from a different Worker and
+ class to a class defined in this Worker.
+ """
diff --git a/src/cloudflare/types/spectrum/analytics/__init__.py b/src/cloudflare/types/spectrum/analytics/__init__.py
index f8ee8b14b1c9..7ac5b6175bea 100644
--- a/src/cloudflare/types/spectrum/analytics/__init__.py
+++ b/src/cloudflare/types/spectrum/analytics/__init__.py
@@ -1,3 +1,5 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
+
+from .dimension_item import DimensionItem as DimensionItem
diff --git a/src/cloudflare/types/spectrum/analytics/dimension_item.py b/src/cloudflare/types/spectrum/analytics/dimension_item.py
new file mode 100644
index 000000000000..6cb07f429cff
--- /dev/null
+++ b/src/cloudflare/types/spectrum/analytics/dimension_item.py
@@ -0,0 +1,7 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal
+
+__all__ = ["DimensionItem"]
+
+DimensionItem = Literal["event", "appID", "coloName", "ipVersion"]
diff --git a/src/cloudflare/types/spectrum/analytics/events/bytime_get_params.py b/src/cloudflare/types/spectrum/analytics/events/bytime_get_params.py
index ce7f3f2b47cf..c0d49bf304a9 100644
--- a/src/cloudflare/types/spectrum/analytics/events/bytime_get_params.py
+++ b/src/cloudflare/types/spectrum/analytics/events/bytime_get_params.py
@@ -7,12 +7,13 @@
from typing_extensions import Literal, Annotated, TypedDict
from ....._utils import PropertyInfo
+from .dimension_item import DimensionItem
__all__ = ["BytimeGetParams"]
class BytimeGetParams(TypedDict, total=False):
- dimensions: List[Literal["event", "appID", "coloName", "ipVersion"]]
+ dimensions: List[DimensionItem]
"""Can be used to break down the data by given attributes. Options are:
| Dimension | Name | Example |
diff --git a/src/cloudflare/types/spectrum/analytics/events/summary_get_params.py b/src/cloudflare/types/spectrum/analytics/events/summary_get_params.py
index 6785b9371095..38eb79aaf854 100644
--- a/src/cloudflare/types/spectrum/analytics/events/summary_get_params.py
+++ b/src/cloudflare/types/spectrum/analytics/events/summary_get_params.py
@@ -7,12 +7,13 @@
from typing_extensions import Literal, Annotated, TypedDict
from ....._utils import PropertyInfo
+from .dimension_item import DimensionItem
__all__ = ["SummaryGetParams"]
class SummaryGetParams(TypedDict, total=False):
- dimensions: List[Literal["event", "appID", "coloName", "ipVersion"]]
+ dimensions: List[DimensionItem]
"""Can be used to break down the data by given attributes. Options are:
| Dimension | Name | Example |
diff --git a/src/cloudflare/types/spectrum/app_create_params.py b/src/cloudflare/types/spectrum/app_create_params.py
index 2e9794fa965b..876ec375f28a 100644
--- a/src/cloudflare/types/spectrum/app_create_params.py
+++ b/src/cloudflare/types/spectrum/app_create_params.py
@@ -2,20 +2,24 @@
from __future__ import annotations
-from typing import List, Union
from typing_extensions import Literal, Required, TypedDict
-__all__ = ["AppCreateParams", "DNS", "OriginDNS", "EdgeIPs", "EdgeIPsEyeballIPs", "EdgeIPsCustomerOwnedIPs"]
+from ..dns_param import DNSParam
+from ..edge_ips_param import EdgeIPsParam
+from ..origin_dns_param import OriginDNSParam
+from ..origin_port_param import OriginPortParam
+
+__all__ = ["AppCreateParams"]
class AppCreateParams(TypedDict, total=False):
- dns: Required[DNS]
+ dns: Required[DNSParam]
"""The name and type of DNS record for the Spectrum application."""
- origin_dns: Required[OriginDNS]
+ origin_dns: Required[OriginDNSParam]
"""The name and type of DNS record for the Spectrum application."""
- origin_port: Required[Union[int, str]]
+ origin_port: Required[OriginPortParam]
"""The destination port at the origin.
Only specified in conjunction with origin_dns. May use an integer to specify a
@@ -38,7 +42,7 @@ class AppCreateParams(TypedDict, total=False):
applications with traffic_type set to "direct".
"""
- edge_ips: EdgeIPs
+ edge_ips: EdgeIPsParam
"""The anycast edge IP configuration for the hostname of this application."""
ip_firewall: bool
@@ -67,55 +71,3 @@ class AppCreateParams(TypedDict, total=False):
"https", Spectrum will apply Cloudflare's HTTP/HTTPS features as it sends
traffic to your origin, and the application type matches this property exactly.
"""
-
-
-class DNS(TypedDict, total=False):
- name: str
- """The name of the DNS record associated with the application."""
-
- type: Literal["CNAME", "ADDRESS"]
- """The type of DNS record associated with the application."""
-
-
-class OriginDNS(TypedDict, total=False):
- name: str
- """The name of the DNS record associated with the origin."""
-
- ttl: int
- """The TTL of our resolution of your DNS record in seconds."""
-
- type: Literal["", "A", "AAAA", "SRV"]
- """The type of DNS record associated with the origin.
-
- "" is used to specify a combination of A/AAAA records.
- """
-
-
-class EdgeIPsEyeballIPs(TypedDict, total=False):
- connectivity: Literal["all", "ipv4", "ipv6"]
- """The IP versions supported for inbound connections on Spectrum anycast IPs."""
-
- type: Literal["dynamic"]
- """The type of edge IP configuration specified.
-
- Dynamically allocated edge IPs use Spectrum anycast IPs in accordance with the
- connectivity you specify. Only valid with CNAME DNS names.
- """
-
-
-class EdgeIPsCustomerOwnedIPs(TypedDict, total=False):
- ips: List[str]
- """
- The array of customer owned IPs we broadcast via anycast for this hostname and
- application.
- """
-
- type: Literal["static"]
- """The type of edge IP configuration specified.
-
- Statically allocated edge IPs use customer IPs in accordance with the ips array
- you specify. Only valid with ADDRESS DNS names.
- """
-
-
-EdgeIPs = Union[EdgeIPsEyeballIPs, EdgeIPsCustomerOwnedIPs]
diff --git a/src/cloudflare/types/spectrum/app_create_response.py b/src/cloudflare/types/spectrum/app_create_response.py
index 04087a8e63df..b9d057a88918 100644
--- a/src/cloudflare/types/spectrum/app_create_response.py
+++ b/src/cloudflare/types/spectrum/app_create_response.py
@@ -1,64 +1,16 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Union, Optional
+from typing import Optional
from datetime import datetime
from typing_extensions import Literal
+from ..dns import DNS
from ..._models import BaseModel
+from ..edge_ips import EdgeIPs
+from ..origin_dns import OriginDNS
+from ..origin_port import OriginPort
-__all__ = ["AppCreateResponse", "DNS", "EdgeIPs", "EdgeIPsEyeballIPs", "EdgeIPsCustomerOwnedIPs", "OriginDNS"]
-
-
-class DNS(BaseModel):
- name: Optional[str] = None
- """The name of the DNS record associated with the application."""
-
- type: Optional[Literal["CNAME", "ADDRESS"]] = None
- """The type of DNS record associated with the application."""
-
-
-class EdgeIPsEyeballIPs(BaseModel):
- connectivity: Optional[Literal["all", "ipv4", "ipv6"]] = None
- """The IP versions supported for inbound connections on Spectrum anycast IPs."""
-
- type: Optional[Literal["dynamic"]] = None
- """The type of edge IP configuration specified.
-
- Dynamically allocated edge IPs use Spectrum anycast IPs in accordance with the
- connectivity you specify. Only valid with CNAME DNS names.
- """
-
-
-class EdgeIPsCustomerOwnedIPs(BaseModel):
- ips: Optional[List[str]] = None
- """
- The array of customer owned IPs we broadcast via anycast for this hostname and
- application.
- """
-
- type: Optional[Literal["static"]] = None
- """The type of edge IP configuration specified.
-
- Statically allocated edge IPs use customer IPs in accordance with the ips array
- you specify. Only valid with ADDRESS DNS names.
- """
-
-
-EdgeIPs = Union[EdgeIPsEyeballIPs, EdgeIPsCustomerOwnedIPs]
-
-
-class OriginDNS(BaseModel):
- name: Optional[str] = None
- """The name of the DNS record associated with the origin."""
-
- ttl: Optional[int] = None
- """The TTL of our resolution of your DNS record in seconds."""
-
- type: Optional[Literal["", "A", "AAAA", "SRV"]] = None
- """The type of DNS record associated with the origin.
-
- "" is used to specify a combination of A/AAAA records.
- """
+__all__ = ["AppCreateResponse"]
class AppCreateResponse(BaseModel):
@@ -92,7 +44,7 @@ class AppCreateResponse(BaseModel):
origin_dns: Optional[OriginDNS] = None
"""The name and type of DNS record for the Spectrum application."""
- origin_port: Union[int, str, None] = None
+ origin_port: Optional[OriginPort] = None
"""The destination port at the origin.
Only specified in conjunction with origin_dns. May use an integer to specify a
diff --git a/src/cloudflare/types/spectrum/app_update_params.py b/src/cloudflare/types/spectrum/app_update_params.py
index 7ac95ea46a77..ef1325a41f12 100644
--- a/src/cloudflare/types/spectrum/app_update_params.py
+++ b/src/cloudflare/types/spectrum/app_update_params.py
@@ -2,23 +2,27 @@
from __future__ import annotations
-from typing import List, Union
from typing_extensions import Literal, Required, TypedDict
-__all__ = ["AppUpdateParams", "DNS", "OriginDNS", "EdgeIPs", "EdgeIPsEyeballIPs", "EdgeIPsCustomerOwnedIPs"]
+from ..dns_param import DNSParam
+from ..edge_ips_param import EdgeIPsParam
+from ..origin_dns_param import OriginDNSParam
+from ..origin_port_param import OriginPortParam
+
+__all__ = ["AppUpdateParams"]
class AppUpdateParams(TypedDict, total=False):
zone: Required[str]
"""Identifier"""
- dns: Required[DNS]
+ dns: Required[DNSParam]
"""The name and type of DNS record for the Spectrum application."""
- origin_dns: Required[OriginDNS]
+ origin_dns: Required[OriginDNSParam]
"""The name and type of DNS record for the Spectrum application."""
- origin_port: Required[Union[int, str]]
+ origin_port: Required[OriginPortParam]
"""The destination port at the origin.
Only specified in conjunction with origin_dns. May use an integer to specify a
@@ -41,7 +45,7 @@ class AppUpdateParams(TypedDict, total=False):
applications with traffic_type set to "direct".
"""
- edge_ips: EdgeIPs
+ edge_ips: EdgeIPsParam
"""The anycast edge IP configuration for the hostname of this application."""
ip_firewall: bool
@@ -70,55 +74,3 @@ class AppUpdateParams(TypedDict, total=False):
"https", Spectrum will apply Cloudflare's HTTP/HTTPS features as it sends
traffic to your origin, and the application type matches this property exactly.
"""
-
-
-class DNS(TypedDict, total=False):
- name: str
- """The name of the DNS record associated with the application."""
-
- type: Literal["CNAME", "ADDRESS"]
- """The type of DNS record associated with the application."""
-
-
-class OriginDNS(TypedDict, total=False):
- name: str
- """The name of the DNS record associated with the origin."""
-
- ttl: int
- """The TTL of our resolution of your DNS record in seconds."""
-
- type: Literal["", "A", "AAAA", "SRV"]
- """The type of DNS record associated with the origin.
-
- "" is used to specify a combination of A/AAAA records.
- """
-
-
-class EdgeIPsEyeballIPs(TypedDict, total=False):
- connectivity: Literal["all", "ipv4", "ipv6"]
- """The IP versions supported for inbound connections on Spectrum anycast IPs."""
-
- type: Literal["dynamic"]
- """The type of edge IP configuration specified.
-
- Dynamically allocated edge IPs use Spectrum anycast IPs in accordance with the
- connectivity you specify. Only valid with CNAME DNS names.
- """
-
-
-class EdgeIPsCustomerOwnedIPs(TypedDict, total=False):
- ips: List[str]
- """
- The array of customer owned IPs we broadcast via anycast for this hostname and
- application.
- """
-
- type: Literal["static"]
- """The type of edge IP configuration specified.
-
- Statically allocated edge IPs use customer IPs in accordance with the ips array
- you specify. Only valid with ADDRESS DNS names.
- """
-
-
-EdgeIPs = Union[EdgeIPsEyeballIPs, EdgeIPsCustomerOwnedIPs]
diff --git a/src/cloudflare/types/spectrum/app_update_response.py b/src/cloudflare/types/spectrum/app_update_response.py
index 6a337f26b922..413fb2450b55 100644
--- a/src/cloudflare/types/spectrum/app_update_response.py
+++ b/src/cloudflare/types/spectrum/app_update_response.py
@@ -1,64 +1,16 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Union, Optional
+from typing import Optional
from datetime import datetime
from typing_extensions import Literal
+from ..dns import DNS
from ..._models import BaseModel
+from ..edge_ips import EdgeIPs
+from ..origin_dns import OriginDNS
+from ..origin_port import OriginPort
-__all__ = ["AppUpdateResponse", "DNS", "EdgeIPs", "EdgeIPsEyeballIPs", "EdgeIPsCustomerOwnedIPs", "OriginDNS"]
-
-
-class DNS(BaseModel):
- name: Optional[str] = None
- """The name of the DNS record associated with the application."""
-
- type: Optional[Literal["CNAME", "ADDRESS"]] = None
- """The type of DNS record associated with the application."""
-
-
-class EdgeIPsEyeballIPs(BaseModel):
- connectivity: Optional[Literal["all", "ipv4", "ipv6"]] = None
- """The IP versions supported for inbound connections on Spectrum anycast IPs."""
-
- type: Optional[Literal["dynamic"]] = None
- """The type of edge IP configuration specified.
-
- Dynamically allocated edge IPs use Spectrum anycast IPs in accordance with the
- connectivity you specify. Only valid with CNAME DNS names.
- """
-
-
-class EdgeIPsCustomerOwnedIPs(BaseModel):
- ips: Optional[List[str]] = None
- """
- The array of customer owned IPs we broadcast via anycast for this hostname and
- application.
- """
-
- type: Optional[Literal["static"]] = None
- """The type of edge IP configuration specified.
-
- Statically allocated edge IPs use customer IPs in accordance with the ips array
- you specify. Only valid with ADDRESS DNS names.
- """
-
-
-EdgeIPs = Union[EdgeIPsEyeballIPs, EdgeIPsCustomerOwnedIPs]
-
-
-class OriginDNS(BaseModel):
- name: Optional[str] = None
- """The name of the DNS record associated with the origin."""
-
- ttl: Optional[int] = None
- """The TTL of our resolution of your DNS record in seconds."""
-
- type: Optional[Literal["", "A", "AAAA", "SRV"]] = None
- """The type of DNS record associated with the origin.
-
- "" is used to specify a combination of A/AAAA records.
- """
+__all__ = ["AppUpdateResponse"]
class AppUpdateResponse(BaseModel):
@@ -92,7 +44,7 @@ class AppUpdateResponse(BaseModel):
origin_dns: Optional[OriginDNS] = None
"""The name and type of DNS record for the Spectrum application."""
- origin_port: Union[int, str, None] = None
+ origin_port: Optional[OriginPort] = None
"""The destination port at the origin.
Only specified in conjunction with origin_dns. May use an integer to specify a
diff --git a/src/cloudflare/types/speed/observatory_availabilities.py b/src/cloudflare/types/speed/observatory_availabilities.py
index 8f30451b1536..ed4bb6458916 100644
--- a/src/cloudflare/types/speed/observatory_availabilities.py
+++ b/src/cloudflare/types/speed/observatory_availabilities.py
@@ -1,13 +1,13 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Dict, List, Optional
-from typing_extensions import Literal
from pydantic import Field as FieldInfo
from ..._models import BaseModel
+from ..labeled_region import LabeledRegion
-__all__ = ["ObservatoryAvailabilities", "Quota", "Region"]
+__all__ = ["ObservatoryAvailabilities", "Quota"]
class Quota(BaseModel):
@@ -27,40 +27,9 @@ class Quota(BaseModel):
"""The number of schedules available per plan."""
-class Region(BaseModel):
- label: Optional[str] = None
-
- value: Optional[
- Literal[
- "asia-east1",
- "asia-northeast1",
- "asia-northeast2",
- "asia-south1",
- "asia-southeast1",
- "australia-southeast1",
- "europe-north1",
- "europe-southwest1",
- "europe-west1",
- "europe-west2",
- "europe-west3",
- "europe-west4",
- "europe-west8",
- "europe-west9",
- "me-west1",
- "southamerica-east1",
- "us-central1",
- "us-east1",
- "us-east4",
- "us-south1",
- "us-west1",
- ]
- ] = None
- """A test region."""
-
-
class ObservatoryAvailabilities(BaseModel):
quota: Optional[Quota] = None
- regions: Optional[List[Region]] = None
+ regions: Optional[List[LabeledRegion]] = None
regions_per_plan: Optional[object] = FieldInfo(alias="regionsPerPlan", default=None)
diff --git a/src/cloudflare/types/speed/observatory_page_test.py b/src/cloudflare/types/speed/observatory_page_test.py
index e766a5fa9faf..e85b2570eda8 100644
--- a/src/cloudflare/types/speed/observatory_page_test.py
+++ b/src/cloudflare/types/speed/observatory_page_test.py
@@ -7,135 +7,10 @@
from pydantic import Field as FieldInfo
from ..._models import BaseModel
+from ..labeled_region import LabeledRegion
+from ..lighthouse_report import LighthouseReport
-__all__ = ["ObservatoryPageTest", "DesktopReport", "DesktopReportError", "MobileReport", "MobileReportError", "Region"]
-
-
-class DesktopReportError(BaseModel):
- code: Optional[Literal["NOT_REACHABLE", "DNS_FAILURE", "NOT_HTML", "LIGHTHOUSE_TIMEOUT", "UNKNOWN"]] = None
- """The error code of the Lighthouse result."""
-
- detail: Optional[str] = None
- """Detailed error message."""
-
- final_displayed_url: Optional[str] = FieldInfo(alias="finalDisplayedUrl", default=None)
- """The final URL displayed to the user."""
-
-
-class DesktopReport(BaseModel):
- cls: Optional[float] = None
- """Cumulative Layout Shift."""
-
- device_type: Optional[Literal["DESKTOP", "MOBILE"]] = FieldInfo(alias="deviceType", default=None)
- """The type of device."""
-
- error: Optional[DesktopReportError] = None
-
- fcp: Optional[float] = None
- """First Contentful Paint."""
-
- json_report_url: Optional[str] = FieldInfo(alias="jsonReportUrl", default=None)
- """The URL to the full Lighthouse JSON report."""
-
- lcp: Optional[float] = None
- """Largest Contentful Paint."""
-
- performance_score: Optional[float] = FieldInfo(alias="performanceScore", default=None)
- """The Lighthouse performance score."""
-
- si: Optional[float] = None
- """Speed Index."""
-
- state: Optional[Literal["RUNNING", "COMPLETE", "FAILED"]] = None
- """The state of the Lighthouse report."""
-
- tbt: Optional[float] = None
- """Total Blocking Time."""
-
- ttfb: Optional[float] = None
- """Time To First Byte."""
-
- tti: Optional[float] = None
- """Time To Interactive."""
-
-
-class MobileReportError(BaseModel):
- code: Optional[Literal["NOT_REACHABLE", "DNS_FAILURE", "NOT_HTML", "LIGHTHOUSE_TIMEOUT", "UNKNOWN"]] = None
- """The error code of the Lighthouse result."""
-
- detail: Optional[str] = None
- """Detailed error message."""
-
- final_displayed_url: Optional[str] = FieldInfo(alias="finalDisplayedUrl", default=None)
- """The final URL displayed to the user."""
-
-
-class MobileReport(BaseModel):
- cls: Optional[float] = None
- """Cumulative Layout Shift."""
-
- device_type: Optional[Literal["DESKTOP", "MOBILE"]] = FieldInfo(alias="deviceType", default=None)
- """The type of device."""
-
- error: Optional[MobileReportError] = None
-
- fcp: Optional[float] = None
- """First Contentful Paint."""
-
- json_report_url: Optional[str] = FieldInfo(alias="jsonReportUrl", default=None)
- """The URL to the full Lighthouse JSON report."""
-
- lcp: Optional[float] = None
- """Largest Contentful Paint."""
-
- performance_score: Optional[float] = FieldInfo(alias="performanceScore", default=None)
- """The Lighthouse performance score."""
-
- si: Optional[float] = None
- """Speed Index."""
-
- state: Optional[Literal["RUNNING", "COMPLETE", "FAILED"]] = None
- """The state of the Lighthouse report."""
-
- tbt: Optional[float] = None
- """Total Blocking Time."""
-
- ttfb: Optional[float] = None
- """Time To First Byte."""
-
- tti: Optional[float] = None
- """Time To Interactive."""
-
-
-class Region(BaseModel):
- label: Optional[str] = None
-
- value: Optional[
- Literal[
- "asia-east1",
- "asia-northeast1",
- "asia-northeast2",
- "asia-south1",
- "asia-southeast1",
- "australia-southeast1",
- "europe-north1",
- "europe-southwest1",
- "europe-west1",
- "europe-west2",
- "europe-west3",
- "europe-west4",
- "europe-west8",
- "europe-west9",
- "me-west1",
- "southamerica-east1",
- "us-central1",
- "us-east1",
- "us-east4",
- "us-south1",
- "us-west1",
- ]
- ] = None
- """A test region."""
+__all__ = ["ObservatoryPageTest"]
class ObservatoryPageTest(BaseModel):
@@ -144,13 +19,13 @@ class ObservatoryPageTest(BaseModel):
date: Optional[datetime] = None
- desktop_report: Optional[DesktopReport] = FieldInfo(alias="desktopReport", default=None)
+ desktop_report: Optional[LighthouseReport] = FieldInfo(alias="desktopReport", default=None)
"""The Lighthouse report."""
- mobile_report: Optional[MobileReport] = FieldInfo(alias="mobileReport", default=None)
+ mobile_report: Optional[LighthouseReport] = FieldInfo(alias="mobileReport", default=None)
"""The Lighthouse report."""
- region: Optional[Region] = None
+ region: Optional[LabeledRegion] = None
"""A test region with a label."""
schedule_frequency: Optional[Literal["DAILY", "WEEKLY"]] = FieldInfo(alias="scheduleFrequency", default=None)
diff --git a/src/cloudflare/types/speed/page_list_response.py b/src/cloudflare/types/speed/page_list_response.py
index a8d40729f35d..955aad40bd36 100644
--- a/src/cloudflare/types/speed/page_list_response.py
+++ b/src/cloudflare/types/speed/page_list_response.py
@@ -6,44 +6,14 @@
from pydantic import Field as FieldInfo
from ..._models import BaseModel
+from ..labeled_region import LabeledRegion
from .observatory_page_test import ObservatoryPageTest
-__all__ = ["PageListResponse", "Region"]
-
-
-class Region(BaseModel):
- label: Optional[str] = None
-
- value: Optional[
- Literal[
- "asia-east1",
- "asia-northeast1",
- "asia-northeast2",
- "asia-south1",
- "asia-southeast1",
- "australia-southeast1",
- "europe-north1",
- "europe-southwest1",
- "europe-west1",
- "europe-west2",
- "europe-west3",
- "europe-west4",
- "europe-west8",
- "europe-west9",
- "me-west1",
- "southamerica-east1",
- "us-central1",
- "us-east1",
- "us-east4",
- "us-south1",
- "us-west1",
- ]
- ] = None
- """A test region."""
+__all__ = ["PageListResponse"]
class PageListResponse(BaseModel):
- region: Optional[Region] = None
+ region: Optional[LabeledRegion] = None
"""A test region with a label."""
schedule_frequency: Optional[Literal["DAILY", "WEEKLY"]] = FieldInfo(alias="scheduleFrequency", default=None)
diff --git a/src/cloudflare/types/ssl/__init__.py b/src/cloudflare/types/ssl/__init__.py
index ac44ec8d0ea9..fdb511a75244 100644
--- a/src/cloudflare/types/ssl/__init__.py
+++ b/src/cloudflare/types/ssl/__init__.py
@@ -2,6 +2,7 @@
from __future__ import annotations
+from .host_item import HostItem as HostItem
from .analyze_create_params import AnalyzeCreateParams as AnalyzeCreateParams
from .verification_get_params import VerificationGetParams as VerificationGetParams
from .tls_verification_setting import TLSVerificationSetting as TLSVerificationSetting
diff --git a/src/cloudflare/types/ssl/certificate_pack_edit_response.py b/src/cloudflare/types/ssl/certificate_pack_edit_response.py
index fc7c617ae08f..1c484d2fa2ea 100644
--- a/src/cloudflare/types/ssl/certificate_pack_edit_response.py
+++ b/src/cloudflare/types/ssl/certificate_pack_edit_response.py
@@ -4,6 +4,7 @@
from typing_extensions import Literal
from ..._models import BaseModel
+from .host_item import HostItem
__all__ = ["CertificatePackEditResponse"]
@@ -25,7 +26,7 @@ class CertificatePackEditResponse(BaseModel):
This will add sni.cloudflaressl.com as the Common Name if set true.
"""
- hosts: Optional[List[str]] = None
+ hosts: Optional[List[HostItem]] = None
"""Comma separated list of valid host names for the certificate packs.
Must contain the zone apex, may not contain more than 50 hosts, and may not be
diff --git a/src/cloudflare/types/ssl/certificate_packs/order_create_params.py b/src/cloudflare/types/ssl/certificate_packs/order_create_params.py
index 64d25fae31ca..9cd543e4a7dd 100644
--- a/src/cloudflare/types/ssl/certificate_packs/order_create_params.py
+++ b/src/cloudflare/types/ssl/certificate_packs/order_create_params.py
@@ -5,6 +5,8 @@
from typing import List
from typing_extensions import Literal, Required, TypedDict
+from .host_item import HostItem
+
__all__ = ["OrderCreateParams"]
@@ -19,7 +21,7 @@ class OrderCreateParams(TypedDict, total=False):
[see this page for more details.](https://developers.cloudflare.com/ssl/reference/certificate-authorities)
"""
- hosts: Required[List[str]]
+ hosts: Required[List[HostItem]]
"""Comma separated list of valid host names for the certificate packs.
Must contain the zone apex, may not contain more than 50 hosts, and may not be
diff --git a/src/cloudflare/types/ssl/certificate_packs/order_create_response.py b/src/cloudflare/types/ssl/certificate_packs/order_create_response.py
index c7b71c73ed52..92d34995c69e 100644
--- a/src/cloudflare/types/ssl/certificate_packs/order_create_response.py
+++ b/src/cloudflare/types/ssl/certificate_packs/order_create_response.py
@@ -3,6 +3,7 @@
from typing import List, Optional
from typing_extensions import Literal
+from .host_item import HostItem
from ...._models import BaseModel
__all__ = ["OrderCreateResponse"]
@@ -25,7 +26,7 @@ class OrderCreateResponse(BaseModel):
This will add sni.cloudflaressl.com as the Common Name if set true.
"""
- hosts: Optional[List[str]] = None
+ hosts: Optional[List[HostItem]] = None
"""Comma separated list of valid host names for the certificate packs.
Must contain the zone apex, may not contain more than 50 hosts, and may not be
diff --git a/src/cloudflare/types/ssl/host_item.py b/src/cloudflare/types/ssl/host_item.py
new file mode 100644
index 000000000000..c6a0a188002c
--- /dev/null
+++ b/src/cloudflare/types/ssl/host_item.py
@@ -0,0 +1,6 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+
+__all__ = ["HostItem"]
+
+HostItem = str
diff --git a/src/cloudflare/types/stepped_migration.py b/src/cloudflare/types/stepped_migration.py
new file mode 100644
index 000000000000..f89090e3e660
--- /dev/null
+++ b/src/cloudflare/types/stepped_migration.py
@@ -0,0 +1,22 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+
+from .._models import BaseModel
+from .migration_step import MigrationStep
+
+__all__ = ["SteppedMigration"]
+
+
+class SteppedMigration(BaseModel):
+ new_tag: Optional[str] = None
+ """Tag to set as the latest migration tag."""
+
+ old_tag: Optional[str] = None
+ """Tag used to verify against the latest migration tag for this Worker.
+
+ If they don't match, the upload is rejected.
+ """
+
+ steps: Optional[List[MigrationStep]] = None
+ """Migrations to apply in order."""
diff --git a/src/cloudflare/types/stepped_migration_param.py b/src/cloudflare/types/stepped_migration_param.py
new file mode 100644
index 000000000000..2465041142b5
--- /dev/null
+++ b/src/cloudflare/types/stepped_migration_param.py
@@ -0,0 +1,24 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Iterable
+from typing_extensions import TypedDict
+
+from .migration_step_param import MigrationStepParam
+
+__all__ = ["SteppedMigrationParam"]
+
+
+class SteppedMigrationParam(TypedDict, total=False):
+ new_tag: str
+ """Tag to set as the latest migration tag."""
+
+ old_tag: str
+ """Tag used to verify against the latest migration tag for this Worker.
+
+ If they don't match, the upload is rejected.
+ """
+
+ steps: Iterable[MigrationStepParam]
+ """Migrations to apply in order."""
diff --git a/src/cloudflare/types/stream/clip_create_params.py b/src/cloudflare/types/stream/clip_create_params.py
index 8c46a1595464..7a257d658740 100644
--- a/src/cloudflare/types/stream/clip_create_params.py
+++ b/src/cloudflare/types/stream/clip_create_params.py
@@ -6,6 +6,7 @@
from typing_extensions import Required, Annotated, TypedDict
from ..._utils import PropertyInfo
+from .allowed_origins_item import AllowedOriginsItem
__all__ = ["ClipCreateParams", "Watermark"]
@@ -23,7 +24,7 @@ class ClipCreateParams(TypedDict, total=False):
start_time_seconds: Required[Annotated[int, PropertyInfo(alias="startTimeSeconds")]]
"""Specifies the start time for the video clip in seconds."""
- allowed_origins: Annotated[List[str], PropertyInfo(alias="allowedOrigins")]
+ allowed_origins: Annotated[List[AllowedOriginsItem], PropertyInfo(alias="allowedOrigins")]
"""Lists the origins allowed to display the video.
Enter allowed origin domains in an array and use `*` for wildcard subdomains.
diff --git a/src/cloudflare/types/stream/copy_create_params.py b/src/cloudflare/types/stream/copy_create_params.py
index 46c6d4afa858..36438c8d2061 100644
--- a/src/cloudflare/types/stream/copy_create_params.py
+++ b/src/cloudflare/types/stream/copy_create_params.py
@@ -7,6 +7,7 @@
from typing_extensions import Required, Annotated, TypedDict
from ..._utils import PropertyInfo
+from .allowed_origins_item import AllowedOriginsItem
__all__ = ["CopyCreateParams", "Watermark"]
@@ -23,7 +24,7 @@ class CopyCreateParams(TypedDict, total=False):
with a `content-range` header that includes the size of the file.
"""
- allowed_origins: Annotated[List[str], PropertyInfo(alias="allowedOrigins")]
+ allowed_origins: Annotated[List[AllowedOriginsItem], PropertyInfo(alias="allowedOrigins")]
"""Lists the origins allowed to display the video.
Enter allowed origin domains in an array and use `*` for wildcard subdomains.
diff --git a/src/cloudflare/types/stream/direct_upload_create_params.py b/src/cloudflare/types/stream/direct_upload_create_params.py
index e853d136d6fe..e486b394e1b6 100644
--- a/src/cloudflare/types/stream/direct_upload_create_params.py
+++ b/src/cloudflare/types/stream/direct_upload_create_params.py
@@ -7,6 +7,7 @@
from typing_extensions import Required, Annotated, TypedDict
from ..._utils import PropertyInfo
+from .allowed_origins_item import AllowedOriginsItem
__all__ = ["DirectUploadCreateParams", "Watermark"]
@@ -23,7 +24,7 @@ class DirectUploadCreateParams(TypedDict, total=False):
means the value is unknown.
"""
- allowed_origins: Annotated[List[str], PropertyInfo(alias="allowedOrigins")]
+ allowed_origins: Annotated[List[AllowedOriginsItem], PropertyInfo(alias="allowedOrigins")]
"""Lists the origins allowed to display the video.
Enter allowed origin domains in an array and use `*` for wildcard subdomains.
diff --git a/src/cloudflare/types/stream/stream_clipping.py b/src/cloudflare/types/stream/stream_clipping.py
index 99af9383d1db..f91915ca2d35 100644
--- a/src/cloudflare/types/stream/stream_clipping.py
+++ b/src/cloudflare/types/stream/stream_clipping.py
@@ -7,6 +7,7 @@
from pydantic import Field as FieldInfo
from ..._models import BaseModel
+from .allowed_origins_item import AllowedOriginsItem
__all__ = ["StreamClipping", "Playback", "Watermark"]
@@ -25,7 +26,7 @@ class Watermark(BaseModel):
class StreamClipping(BaseModel):
- allowed_origins: Optional[List[str]] = FieldInfo(alias="allowedOrigins", default=None)
+ allowed_origins: Optional[List[AllowedOriginsItem]] = FieldInfo(alias="allowedOrigins", default=None)
"""Lists the origins allowed to display the video.
Enter allowed origin domains in an array and use `*` for wildcard subdomains.
diff --git a/src/cloudflare/types/targes_item_param.py b/src/cloudflare/types/targes_item_param.py
new file mode 100644
index 000000000000..fba6edc5019e
--- /dev/null
+++ b/src/cloudflare/types/targes_item_param.py
@@ -0,0 +1,28 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, Required, TypedDict
+
+__all__ = ["TargesItemParam", "Constraint"]
+
+
+class Constraint(TypedDict, total=False):
+ operator: Required[Literal["matches", "contains", "equals", "not_equal", "not_contain"]]
+ """
+ The matches operator can use asterisks and pipes as wildcard and 'or' operators.
+ """
+
+ value: Required[str]
+ """The URL pattern to match against the current request.
+
+ The pattern may contain up to four asterisks ('\\**') as placeholders.
+ """
+
+
+class TargesItemParam(TypedDict, total=False):
+ constraint: Required[Constraint]
+ """String constraint."""
+
+ target: Required[Literal["url"]]
+ """A target based on the URL of the request."""
diff --git a/src/cloudflare/types/tunnel.py b/src/cloudflare/types/tunnel.py
new file mode 100644
index 000000000000..d04374323151
--- /dev/null
+++ b/src/cloudflare/types/tunnel.py
@@ -0,0 +1,13 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from .._models import BaseModel
+
+__all__ = ["Tunnel"]
+
+
+class Tunnel(BaseModel):
+ private_ip: str
+ """Private IP of the Key Server Host"""
+
+ vnet_id: str
+ """Cloudflare Tunnel Virtual Network ID"""
diff --git a/src/cloudflare/types/tunnel_param.py b/src/cloudflare/types/tunnel_param.py
new file mode 100644
index 000000000000..c6ebab906b62
--- /dev/null
+++ b/src/cloudflare/types/tunnel_param.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["TunnelParam"]
+
+
+class TunnelParam(TypedDict, total=False):
+ private_ip: Required[str]
+ """Private IP of the Key Server Host"""
+
+ vnet_id: Required[str]
+ """Cloudflare Tunnel Virtual Network ID"""
diff --git a/src/cloudflare/types/url_target.py b/src/cloudflare/types/url_target.py
new file mode 100644
index 000000000000..9b60c83f2a96
--- /dev/null
+++ b/src/cloudflare/types/url_target.py
@@ -0,0 +1,29 @@
+# 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__ = ["URLTarget", "Constraint"]
+
+
+class Constraint(BaseModel):
+ operator: Literal["matches", "contains", "equals", "not_equal", "not_contain"]
+ """
+ The matches operator can use asterisks and pipes as wildcard and 'or' operators.
+ """
+
+ value: str
+ """The URL pattern to match against the current request.
+
+ The pattern may contain up to four asterisks ('\\**') as placeholders.
+ """
+
+
+class URLTarget(BaseModel):
+ constraint: Optional[Constraint] = None
+ """String constraint."""
+
+ target: Optional[Literal["url"]] = None
+ """A target based on the URL of the request."""
diff --git a/src/cloudflare/types/workers/__init__.py b/src/cloudflare/types/workers/__init__.py
index 2acc1f5d3d60..94b18cb6c488 100644
--- a/src/cloudflare/types/workers/__init__.py
+++ b/src/cloudflare/types/workers/__init__.py
@@ -2,16 +2,19 @@
from __future__ import annotations
+from .script import Script as Script
+from .setting import Setting as Setting
from .ai_run_params import AIRunParams as AIRunParams
+from .settings_item import SettingsItem as SettingsItem
from .workers_route import WorkersRoute as WorkersRoute
from .workers_domain import WorkersDomain as WorkersDomain
from .workers_filter import WorkersFilter as WorkersFilter
-from .workers_script import WorkersScript as WorkersScript
from .ai_run_response import AIRunResponse as AIRunResponse
from .domain_list_params import DomainListParams as DomainListParams
from .route_create_params import RouteCreateParams as RouteCreateParams
from .route_delete_params import RouteDeleteParams as RouteDeleteParams
from .route_update_params import RouteUpdateParams as RouteUpdateParams
+from .settings_item_param import SettingsItemParam as SettingsItemParam
from .domain_delete_params import DomainDeleteParams as DomainDeleteParams
from .domain_update_params import DomainUpdateParams as DomainUpdateParams
from .filter_create_params import FilterCreateParams as FilterCreateParams
diff --git a/src/cloudflare/types/workers/workers_script.py b/src/cloudflare/types/workers/script.py
similarity index 71%
rename from src/cloudflare/types/workers/workers_script.py
rename to src/cloudflare/types/workers/script.py
index 808d0e390a91..38b5900c4b9b 100644
--- a/src/cloudflare/types/workers/workers_script.py
+++ b/src/cloudflare/types/workers/script.py
@@ -3,23 +3,13 @@
from typing import List, Optional
from datetime import datetime
+from .scripts import ConsumerScript
from ..._models import BaseModel
-__all__ = ["WorkersScript", "TailConsumer"]
+__all__ = ["Script"]
-class TailConsumer(BaseModel):
- service: str
- """Name of Worker that is to be the consumer."""
-
- environment: Optional[str] = None
- """Optional environment if the Worker utilizes one."""
-
- namespace: Optional[str] = None
- """Optional dispatch namespace the script belongs to."""
-
-
-class WorkersScript(BaseModel):
+class Script(BaseModel):
id: Optional[str] = None
"""The id of the script in the Workers system. Usually the script name."""
@@ -41,7 +31,7 @@ class WorkersScript(BaseModel):
placement_mode: Optional[str] = None
"""Specifies the placement mode for the Worker (e.g. 'smart')."""
- tail_consumers: Optional[List[TailConsumer]] = None
+ tail_consumers: Optional[List[ConsumerScript]] = None
"""List of Workers that will consume logs from the attached Worker."""
usage_model: Optional[str] = None
diff --git a/src/cloudflare/types/workers/script_update_params.py b/src/cloudflare/types/workers/script_update_params.py
index f5d078c31e20..502f9da812e9 100644
--- a/src/cloudflare/types/workers/script_update_params.py
+++ b/src/cloudflare/types/workers/script_update_params.py
@@ -5,25 +5,14 @@
from typing import List, Union, Iterable
from typing_extensions import Literal, Required, Annotated, TypedDict
+from .scripts import ConsumerScriptParam
from ..._types import FileTypes
from ..._utils import PropertyInfo
+from ..stepped_migration_param import SteppedMigrationParam
+from ..single_step_migration_param import SingleStepMigrationParam
+from ..placement_configuration_param import PlacementConfigurationParam
-__all__ = [
- "ScriptUpdateParams",
- "Variant0",
- "Variant0Metadata",
- "Variant0MetadataMigrations",
- "Variant0MetadataMigrationsWorkersSingleStepMigrations",
- "Variant0MetadataMigrationsWorkersSingleStepMigrationsRenamedClass",
- "Variant0MetadataMigrationsWorkersSingleStepMigrationsTransferredClass",
- "Variant0MetadataMigrationsWorkersSteppedMigrations",
- "Variant0MetadataMigrationsWorkersSteppedMigrationsStep",
- "Variant0MetadataMigrationsWorkersSteppedMigrationsStepRenamedClass",
- "Variant0MetadataMigrationsWorkersSteppedMigrationsStepTransferredClass",
- "Variant0MetadataPlacement",
- "Variant0MetadataTailConsumer",
- "Variant1",
-]
+__all__ = ["ScriptUpdateParams", "Variant0", "Variant0Metadata", "Variant0MetadataMigrations", "Variant1"]
class Variant0(TypedDict, total=False):
@@ -50,150 +39,7 @@ class Variant0(TypedDict, total=False):
"""JSON encoded metadata about the uploaded parts and Worker configuration."""
-_Variant0MetadataMigrationsWorkersSingleStepMigrationsRenamedClassReservedKeywords = TypedDict(
- "_Variant0MetadataMigrationsWorkersSingleStepMigrationsRenamedClassReservedKeywords",
- {
- "from": str,
- },
- total=False,
-)
-
-
-class Variant0MetadataMigrationsWorkersSingleStepMigrationsRenamedClass(
- _Variant0MetadataMigrationsWorkersSingleStepMigrationsRenamedClassReservedKeywords, total=False
-):
- to: str
-
-
-_Variant0MetadataMigrationsWorkersSingleStepMigrationsTransferredClassReservedKeywords = TypedDict(
- "_Variant0MetadataMigrationsWorkersSingleStepMigrationsTransferredClassReservedKeywords",
- {
- "from": str,
- },
- total=False,
-)
-
-
-class Variant0MetadataMigrationsWorkersSingleStepMigrationsTransferredClass(
- _Variant0MetadataMigrationsWorkersSingleStepMigrationsTransferredClassReservedKeywords, total=False
-):
- from_script: str
-
- to: str
-
-
-class Variant0MetadataMigrationsWorkersSingleStepMigrations(TypedDict, total=False):
- deleted_classes: List[str]
- """A list of classes to delete Durable Object namespaces from."""
-
- new_classes: List[str]
- """A list of classes to create Durable Object namespaces from."""
-
- new_tag: str
- """Tag to set as the latest migration tag."""
-
- old_tag: str
- """Tag used to verify against the latest migration tag for this Worker.
-
- If they don't match, the upload is rejected.
- """
-
- renamed_classes: Iterable[Variant0MetadataMigrationsWorkersSingleStepMigrationsRenamedClass]
- """A list of classes with Durable Object namespaces that were renamed."""
-
- transferred_classes: Iterable[Variant0MetadataMigrationsWorkersSingleStepMigrationsTransferredClass]
- """
- A list of transfers for Durable Object namespaces from a different Worker and
- class to a class defined in this Worker.
- """
-
-
-_Variant0MetadataMigrationsWorkersSteppedMigrationsStepRenamedClassReservedKeywords = TypedDict(
- "_Variant0MetadataMigrationsWorkersSteppedMigrationsStepRenamedClassReservedKeywords",
- {
- "from": str,
- },
- total=False,
-)
-
-
-class Variant0MetadataMigrationsWorkersSteppedMigrationsStepRenamedClass(
- _Variant0MetadataMigrationsWorkersSteppedMigrationsStepRenamedClassReservedKeywords, total=False
-):
- to: str
-
-
-_Variant0MetadataMigrationsWorkersSteppedMigrationsStepTransferredClassReservedKeywords = TypedDict(
- "_Variant0MetadataMigrationsWorkersSteppedMigrationsStepTransferredClassReservedKeywords",
- {
- "from": str,
- },
- total=False,
-)
-
-
-class Variant0MetadataMigrationsWorkersSteppedMigrationsStepTransferredClass(
- _Variant0MetadataMigrationsWorkersSteppedMigrationsStepTransferredClassReservedKeywords, total=False
-):
- from_script: str
-
- to: str
-
-
-class Variant0MetadataMigrationsWorkersSteppedMigrationsStep(TypedDict, total=False):
- deleted_classes: List[str]
- """A list of classes to delete Durable Object namespaces from."""
-
- new_classes: List[str]
- """A list of classes to create Durable Object namespaces from."""
-
- renamed_classes: Iterable[Variant0MetadataMigrationsWorkersSteppedMigrationsStepRenamedClass]
- """A list of classes with Durable Object namespaces that were renamed."""
-
- transferred_classes: Iterable[Variant0MetadataMigrationsWorkersSteppedMigrationsStepTransferredClass]
- """
- A list of transfers for Durable Object namespaces from a different Worker and
- class to a class defined in this Worker.
- """
-
-
-class Variant0MetadataMigrationsWorkersSteppedMigrations(TypedDict, total=False):
- new_tag: str
- """Tag to set as the latest migration tag."""
-
- old_tag: str
- """Tag used to verify against the latest migration tag for this Worker.
-
- If they don't match, the upload is rejected.
- """
-
- steps: Iterable[Variant0MetadataMigrationsWorkersSteppedMigrationsStep]
- """Migrations to apply in order."""
-
-
-Variant0MetadataMigrations = Union[
- Variant0MetadataMigrationsWorkersSingleStepMigrations, Variant0MetadataMigrationsWorkersSteppedMigrations
-]
-
-
-class Variant0MetadataPlacement(TypedDict, total=False):
- mode: Literal["smart"]
- """
- Enables
- [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
- Only `"smart"` is currently supported
- """
-
-
-class Variant0MetadataTailConsumer(TypedDict, total=False):
- service: Required[str]
- """Name of Worker that is to be the consumer."""
-
- environment: str
- """Optional environment if the Worker utilizes one."""
-
- namespace: str
- """Optional dispatch namespace the script belongs to."""
+Variant0MetadataMigrations = Union[SingleStepMigrationParam, SteppedMigrationParam]
class Variant0Metadata(TypedDict, total=False):
@@ -236,12 +82,12 @@ class Variant0Metadata(TypedDict, total=False):
migrations: Variant0MetadataMigrations
"""Migrations to apply for Durable Objects associated with this Worker."""
- placement: Variant0MetadataPlacement
+ placement: PlacementConfigurationParam
tags: List[str]
"""List of strings to use as tags for this Worker"""
- tail_consumers: Iterable[Variant0MetadataTailConsumer]
+ tail_consumers: Iterable[ConsumerScriptParam]
"""List of Workers that will consume logs from the attached Worker."""
usage_model: Literal["bundled", "unbound"]
diff --git a/src/cloudflare/types/workers/scripts/__init__.py b/src/cloudflare/types/workers/scripts/__init__.py
index 8f93dbe0a2c0..ea8837be4907 100644
--- a/src/cloudflare/types/workers/scripts/__init__.py
+++ b/src/cloudflare/types/workers/scripts/__init__.py
@@ -2,18 +2,18 @@
from __future__ import annotations
+from .consumer_script import ConsumerScript as ConsumerScript
from .workers_binding import WorkersBinding as WorkersBinding
from .tail_get_response import TailGetResponse as TailGetResponse
from .tail_create_params import TailCreateParams as TailCreateParams
from .tail_delete_params import TailDeleteParams as TailDeleteParams
from .setting_edit_params import SettingEditParams as SettingEditParams
from .binding_get_response import BindingGetResponse as BindingGetResponse
-from .setting_get_response import SettingGetResponse as SettingGetResponse
from .tail_create_response import TailCreateResponse as TailCreateResponse
from .version_get_response import VersionGetResponse as VersionGetResponse
+from .consumer_script_param import ConsumerScriptParam as ConsumerScriptParam
from .content_update_params import ContentUpdateParams as ContentUpdateParams
from .schedule_get_response import ScheduleGetResponse as ScheduleGetResponse
-from .setting_edit_response import SettingEditResponse as SettingEditResponse
from .version_create_params import VersionCreateParams as VersionCreateParams
from .version_list_response import VersionListResponse as VersionListResponse
from .schedule_update_params import ScheduleUpdateParams as ScheduleUpdateParams
diff --git a/src/cloudflare/types/workers/scripts/setting_get_response.py b/src/cloudflare/types/workers/scripts/consumer_script.py
similarity index 51%
rename from src/cloudflare/types/workers/scripts/setting_get_response.py
rename to src/cloudflare/types/workers/scripts/consumer_script.py
index 2228a7d6d911..6d933e952fc3 100644
--- a/src/cloudflare/types/workers/scripts/setting_get_response.py
+++ b/src/cloudflare/types/workers/scripts/consumer_script.py
@@ -1,13 +1,13 @@
# 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__ = ["SettingGetResponse", "TailConsumer"]
+__all__ = ["ConsumerScript"]
-class TailConsumer(BaseModel):
+class ConsumerScript(BaseModel):
service: str
"""Name of Worker that is to be the consumer."""
@@ -16,11 +16,3 @@ class TailConsumer(BaseModel):
namespace: Optional[str] = None
"""Optional dispatch namespace the script belongs to."""
-
-
-class SettingGetResponse(BaseModel):
- logpush: Optional[bool] = None
- """Whether Logpush is turned on for the Worker."""
-
- tail_consumers: Optional[List[TailConsumer]] = None
- """List of Workers that will consume logs from the attached Worker."""
diff --git a/src/cloudflare/types/workers/scripts/consumer_script_param.py b/src/cloudflare/types/workers/scripts/consumer_script_param.py
new file mode 100644
index 000000000000..2d7996c8449b
--- /dev/null
+++ b/src/cloudflare/types/workers/scripts/consumer_script_param.py
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["ConsumerScriptParam"]
+
+
+class ConsumerScriptParam(TypedDict, total=False):
+ service: Required[str]
+ """Name of Worker that is to be the consumer."""
+
+ environment: str
+ """Optional environment if the Worker utilizes one."""
+
+ namespace: str
+ """Optional dispatch namespace the script belongs to."""
diff --git a/src/cloudflare/types/workers/scripts/setting_edit_params.py b/src/cloudflare/types/workers/scripts/setting_edit_params.py
index 58a8cb9b9f9e..760ce3ac2260 100644
--- a/src/cloudflare/types/workers/scripts/setting_edit_params.py
+++ b/src/cloudflare/types/workers/scripts/setting_edit_params.py
@@ -5,7 +5,9 @@
from typing import Iterable
from typing_extensions import Required, TypedDict
-__all__ = ["SettingEditParams", "TailConsumer"]
+from .consumer_script_param import ConsumerScriptParam
+
+__all__ = ["SettingEditParams"]
class SettingEditParams(TypedDict, total=False):
@@ -15,16 +17,5 @@ class SettingEditParams(TypedDict, total=False):
logpush: bool
"""Whether Logpush is turned on for the Worker."""
- tail_consumers: Iterable[TailConsumer]
+ tail_consumers: Iterable[ConsumerScriptParam]
"""List of Workers that will consume logs from the attached Worker."""
-
-
-class TailConsumer(TypedDict, total=False):
- service: Required[str]
- """Name of Worker that is to be the consumer."""
-
- environment: str
- """Optional environment if the Worker utilizes one."""
-
- namespace: str
- """Optional dispatch namespace the script belongs to."""
diff --git a/src/cloudflare/types/workers/scripts/setting_edit_response.py b/src/cloudflare/types/workers/scripts/setting_edit_response.py
deleted file mode 100644
index c19e997f2ea7..000000000000
--- a/src/cloudflare/types/workers/scripts/setting_edit_response.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List, Optional
-
-from ...._models import BaseModel
-
-__all__ = ["SettingEditResponse", "TailConsumer"]
-
-
-class TailConsumer(BaseModel):
- service: str
- """Name of Worker that is to be the consumer."""
-
- environment: Optional[str] = None
- """Optional environment if the Worker utilizes one."""
-
- namespace: Optional[str] = None
- """Optional dispatch namespace the script belongs to."""
-
-
-class SettingEditResponse(BaseModel):
- logpush: Optional[bool] = None
- """Whether Logpush is turned on for the Worker."""
-
- tail_consumers: Optional[List[TailConsumer]] = None
- """List of Workers that will consume logs from the attached Worker."""
diff --git a/src/cloudflare/types/workers/scripts/versions/binding_item.py b/src/cloudflare/types/workers/scripts/versions/binding_item.py
index b51babbfa7ea..905238e9cf3a 100644
--- a/src/cloudflare/types/workers/scripts/versions/binding_item.py
+++ b/src/cloudflare/types/workers/scripts/versions/binding_item.py
@@ -1,81 +1,18 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Union, Optional
+from typing import Union
from typing_extensions import Literal
from ....._models import BaseModel
+from ....d1_binding import D1Binding
+from ....r2_binding import R2Binding
+from ....service_binding import ServiceBinding
+from ....mtls_cert_binding import MTLSCERTBinding
+from ....kv_namespace_binding import KVNamespaceBinding
+from ....durable_object_binding import DurableObjectBinding
+from ....dispatch_namespace_binding import DispatchNamespaceBinding
-__all__ = [
- "BindingItem",
- "WorkersKVNamespaceBinding",
- "WorkersServiceBinding",
- "WorkersDoBinding",
- "WorkersR2Binding",
- "WorkersQueueBinding",
- "WorkersD1Binding",
- "WorkersDispatchNamespaceBinding",
- "WorkersDispatchNamespaceBindingOutbound",
- "WorkersDispatchNamespaceBindingOutboundWorker",
- "WorkersMTLSCERTBinding",
-]
-
-
-class WorkersKVNamespaceBinding(BaseModel):
- name: str
- """A JavaScript variable name for the binding."""
-
- namespace_id: str
- """Namespace identifier tag."""
-
- type: Literal["kv_namespace"]
- """The class of resource that the binding provides."""
-
-
-class WorkersServiceBinding(BaseModel):
- environment: str
- """Optional environment if the Worker utilizes one."""
-
- name: str
- """A JavaScript variable name for the binding."""
-
- service: str
- """Name of Worker to bind to"""
-
- type: Literal["service"]
- """The class of resource that the binding provides."""
-
-
-class WorkersDoBinding(BaseModel):
- class_name: str
- """The exported class name of the Durable Object"""
-
- name: str
- """A JavaScript variable name for the binding."""
-
- type: Literal["durable_object_namespace"]
- """The class of resource that the binding provides."""
-
- environment: Optional[str] = None
- """The environment of the script_name to bind to"""
-
- namespace_id: Optional[str] = None
- """Namespace identifier tag."""
-
- script_name: Optional[str] = None
- """
- The script where the Durable Object is defined, if it is external to this Worker
- """
-
-
-class WorkersR2Binding(BaseModel):
- bucket_name: str
- """R2 bucket to bind to"""
-
- name: str
- """A JavaScript variable name for the binding."""
-
- type: Literal["r2_bucket"]
- """The class of resource that the binding provides."""
+__all__ = ["BindingItem", "WorkersQueueBinding"]
class WorkersQueueBinding(BaseModel):
@@ -89,73 +26,13 @@ class WorkersQueueBinding(BaseModel):
"""The class of resource that the binding provides."""
-class WorkersD1Binding(BaseModel):
- id: str
- """ID of the D1 database to bind to"""
-
- binding: str
- """A JavaScript variable name for the binding."""
-
- name: str
- """The name of the D1 database associated with the 'id' provided."""
-
- type: Literal["d1"]
- """The class of resource that the binding provides."""
-
-
-class WorkersDispatchNamespaceBindingOutboundWorker(BaseModel):
- environment: Optional[str] = None
- """Environment of the outbound worker"""
-
- service: Optional[str] = None
- """Name of the outbound worker"""
-
-
-class WorkersDispatchNamespaceBindingOutbound(BaseModel):
- params: Optional[List[str]] = None
- """
- Pass information from the Dispatch Worker to the Outbound Worker through the
- parameters
- """
-
- worker: Optional[WorkersDispatchNamespaceBindingOutboundWorker] = None
- """Outbound worker"""
-
-
-class WorkersDispatchNamespaceBinding(BaseModel):
- name: str
- """A JavaScript variable name for the binding."""
-
- namespace: str
- """Namespace to bind to"""
-
- type: Literal["dispatch_namespace"]
- """The class of resource that the binding provides."""
-
- outbound: Optional[WorkersDispatchNamespaceBindingOutbound] = None
- """Outbound worker"""
-
-
-class WorkersMTLSCERTBinding(BaseModel):
- certificate: object
-
- name: str
- """A JavaScript variable name for the binding."""
-
- type: Literal["mtls_certificate"]
- """The class of resource that the binding provides."""
-
- certificate_id: Optional[str] = None
- """ID of the certificate to bind to"""
-
-
BindingItem = Union[
- WorkersKVNamespaceBinding,
- WorkersServiceBinding,
- WorkersDoBinding,
- WorkersR2Binding,
+ KVNamespaceBinding,
+ ServiceBinding,
+ DurableObjectBinding,
+ R2Binding,
WorkersQueueBinding,
- WorkersD1Binding,
- WorkersDispatchNamespaceBinding,
- WorkersMTLSCERTBinding,
+ D1Binding,
+ DispatchNamespaceBinding,
+ MTLSCERTBinding,
]
diff --git a/src/cloudflare/types/workers/scripts/versions/binding_item_param.py b/src/cloudflare/types/workers/scripts/versions/binding_item_param.py
index f62a9d00b1e9..04fab12ce133 100644
--- a/src/cloudflare/types/workers/scripts/versions/binding_item_param.py
+++ b/src/cloudflare/types/workers/scripts/versions/binding_item_param.py
@@ -2,62 +2,18 @@
from __future__ import annotations
-from typing import List, Union
+from typing import Union
from typing_extensions import Literal, Required, TypedDict
-__all__ = [
- "BindingItemParam",
- "WorkersKVNamespaceBinding",
- "WorkersServiceBinding",
- "WorkersDoBinding",
- "WorkersR2Binding",
- "WorkersQueueBinding",
- "WorkersD1Binding",
- "WorkersDispatchNamespaceBinding",
- "WorkersDispatchNamespaceBindingOutbound",
- "WorkersDispatchNamespaceBindingOutboundWorker",
- "WorkersMTLSCERTBinding",
-]
-
-
-class WorkersKVNamespaceBinding(TypedDict, total=False):
- type: Required[Literal["kv_namespace"]]
- """The class of resource that the binding provides."""
-
-
-class WorkersServiceBinding(TypedDict, total=False):
- environment: Required[str]
- """Optional environment if the Worker utilizes one."""
-
- service: Required[str]
- """Name of Worker to bind to"""
-
- type: Required[Literal["service"]]
- """The class of resource that the binding provides."""
-
+from ....d1_binding_param import D1BindingParam
+from ....r2_binding_param import R2BindingParam
+from ....service_binding_param import ServiceBindingParam
+from ....mtls_cert_binding_param import MTLSCERTBindingParam
+from ....kv_namespace_binding_param import KVNamespaceBindingParam
+from ....durable_object_binding_param import DurableObjectBindingParam
+from ....dispatch_namespace_binding_param import DispatchNamespaceBindingParam
-class WorkersDoBinding(TypedDict, total=False):
- class_name: Required[str]
- """The exported class name of the Durable Object"""
-
- type: Required[Literal["durable_object_namespace"]]
- """The class of resource that the binding provides."""
-
- environment: str
- """The environment of the script_name to bind to"""
-
- script_name: str
- """
- The script where the Durable Object is defined, if it is external to this Worker
- """
-
-
-class WorkersR2Binding(TypedDict, total=False):
- bucket_name: Required[str]
- """R2 bucket to bind to"""
-
- type: Required[Literal["r2_bucket"]]
- """The class of resource that the binding provides."""
+__all__ = ["BindingItemParam", "WorkersQueueBinding"]
class WorkersQueueBinding(TypedDict, total=False):
@@ -68,64 +24,13 @@ class WorkersQueueBinding(TypedDict, total=False):
"""The class of resource that the binding provides."""
-class WorkersD1Binding(TypedDict, total=False):
- id: Required[str]
- """ID of the D1 database to bind to"""
-
- name: Required[str]
- """The name of the D1 database associated with the 'id' provided."""
-
- type: Required[Literal["d1"]]
- """The class of resource that the binding provides."""
-
-
-class WorkersDispatchNamespaceBindingOutboundWorker(TypedDict, total=False):
- environment: str
- """Environment of the outbound worker"""
-
- service: str
- """Name of the outbound worker"""
-
-
-class WorkersDispatchNamespaceBindingOutbound(TypedDict, total=False):
- params: List[str]
- """
- Pass information from the Dispatch Worker to the Outbound Worker through the
- parameters
- """
-
- worker: WorkersDispatchNamespaceBindingOutboundWorker
- """Outbound worker"""
-
-
-class WorkersDispatchNamespaceBinding(TypedDict, total=False):
- namespace: Required[str]
- """Namespace to bind to"""
-
- type: Required[Literal["dispatch_namespace"]]
- """The class of resource that the binding provides."""
-
- outbound: WorkersDispatchNamespaceBindingOutbound
- """Outbound worker"""
-
-
-class WorkersMTLSCERTBinding(TypedDict, total=False):
- certificate: Required[object]
-
- type: Required[Literal["mtls_certificate"]]
- """The class of resource that the binding provides."""
-
- certificate_id: str
- """ID of the certificate to bind to"""
-
-
BindingItemParam = Union[
- WorkersKVNamespaceBinding,
- WorkersServiceBinding,
- WorkersDoBinding,
- WorkersR2Binding,
+ KVNamespaceBindingParam,
+ ServiceBindingParam,
+ DurableObjectBindingParam,
+ R2BindingParam,
WorkersQueueBinding,
- WorkersD1Binding,
- WorkersDispatchNamespaceBinding,
- WorkersMTLSCERTBinding,
+ D1BindingParam,
+ DispatchNamespaceBindingParam,
+ MTLSCERTBindingParam,
]
diff --git a/src/cloudflare/types/workers/scripts/versions/settings_item.py b/src/cloudflare/types/workers/scripts/versions/settings_item.py
index 847043a9d8f1..3cd27f6803a4 100644
--- a/src/cloudflare/types/workers/scripts/versions/settings_item.py
+++ b/src/cloudflare/types/workers/scripts/versions/settings_item.py
@@ -1,135 +1,18 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Union, Optional
-from typing_extensions import Literal
-
-from pydantic import Field as FieldInfo
from ....._models import BaseModel
-from .binding_item import BindingItem
+from ....binding_item import BindingItem
+from ..consumer_script import ConsumerScript
+from ....stepped_migration import SteppedMigration
+from ....single_step_migration import SingleStepMigration
from .compatibility_flags_item import CompatibilityFlagsItem
+from ....placement_configuration import PlacementConfiguration
-__all__ = [
- "SettingsItem",
- "Migrations",
- "MigrationsWorkersSingleStepMigrations",
- "MigrationsWorkersSingleStepMigrationsRenamedClass",
- "MigrationsWorkersSingleStepMigrationsTransferredClass",
- "MigrationsWorkersSteppedMigrations",
- "MigrationsWorkersSteppedMigrationsStep",
- "MigrationsWorkersSteppedMigrationsStepRenamedClass",
- "MigrationsWorkersSteppedMigrationsStepTransferredClass",
- "Placement",
- "TailConsumer",
-]
-
-
-class MigrationsWorkersSingleStepMigrationsRenamedClass(BaseModel):
- from_: Optional[str] = FieldInfo(alias="from", default=None)
-
- to: Optional[str] = None
-
-
-class MigrationsWorkersSingleStepMigrationsTransferredClass(BaseModel):
- from_: Optional[str] = FieldInfo(alias="from", default=None)
-
- from_script: Optional[str] = None
-
- to: Optional[str] = None
-
-
-class MigrationsWorkersSingleStepMigrations(BaseModel):
- deleted_classes: Optional[List[str]] = None
- """A list of classes to delete Durable Object namespaces from."""
-
- new_classes: Optional[List[str]] = None
- """A list of classes to create Durable Object namespaces from."""
-
- new_tag: Optional[str] = None
- """Tag to set as the latest migration tag."""
-
- old_tag: Optional[str] = None
- """Tag used to verify against the latest migration tag for this Worker.
-
- If they don't match, the upload is rejected.
- """
-
- renamed_classes: Optional[List[MigrationsWorkersSingleStepMigrationsRenamedClass]] = None
- """A list of classes with Durable Object namespaces that were renamed."""
-
- transferred_classes: Optional[List[MigrationsWorkersSingleStepMigrationsTransferredClass]] = None
- """
- A list of transfers for Durable Object namespaces from a different Worker and
- class to a class defined in this Worker.
- """
-
-
-class MigrationsWorkersSteppedMigrationsStepRenamedClass(BaseModel):
- from_: Optional[str] = FieldInfo(alias="from", default=None)
-
- to: Optional[str] = None
-
-
-class MigrationsWorkersSteppedMigrationsStepTransferredClass(BaseModel):
- from_: Optional[str] = FieldInfo(alias="from", default=None)
-
- from_script: Optional[str] = None
-
- to: Optional[str] = None
-
-
-class MigrationsWorkersSteppedMigrationsStep(BaseModel):
- deleted_classes: Optional[List[str]] = None
- """A list of classes to delete Durable Object namespaces from."""
-
- new_classes: Optional[List[str]] = None
- """A list of classes to create Durable Object namespaces from."""
-
- renamed_classes: Optional[List[MigrationsWorkersSteppedMigrationsStepRenamedClass]] = None
- """A list of classes with Durable Object namespaces that were renamed."""
-
- transferred_classes: Optional[List[MigrationsWorkersSteppedMigrationsStepTransferredClass]] = None
- """
- A list of transfers for Durable Object namespaces from a different Worker and
- class to a class defined in this Worker.
- """
-
-
-class MigrationsWorkersSteppedMigrations(BaseModel):
- new_tag: Optional[str] = None
- """Tag to set as the latest migration tag."""
-
- old_tag: Optional[str] = None
- """Tag used to verify against the latest migration tag for this Worker.
-
- If they don't match, the upload is rejected.
- """
-
- steps: Optional[List[MigrationsWorkersSteppedMigrationsStep]] = None
- """Migrations to apply in order."""
-
-
-Migrations = Union[MigrationsWorkersSingleStepMigrations, MigrationsWorkersSteppedMigrations]
-
-
-class Placement(BaseModel):
- mode: Optional[Literal["smart"]] = None
- """
- Enables
- [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
- Only `"smart"` is currently supported
- """
-
-
-class TailConsumer(BaseModel):
- service: str
- """Name of Worker that is to be the consumer."""
-
- environment: Optional[str] = None
- """Optional environment if the Worker utilizes one."""
+__all__ = ["SettingsItem", "Migrations"]
- namespace: Optional[str] = None
- """Optional dispatch namespace the script belongs to."""
+Migrations = Union[SingleStepMigration, SteppedMigration]
class SettingsItem(BaseModel):
@@ -148,12 +31,12 @@ class SettingsItem(BaseModel):
migrations: Optional[Migrations] = None
"""Migrations to apply for Durable Objects associated with this Worker."""
- placement: Optional[Placement] = None
+ placement: Optional[PlacementConfiguration] = None
tags: Optional[List[str]] = None
"""Tags to help you manage your Workers"""
- tail_consumers: Optional[List[TailConsumer]] = None
+ tail_consumers: Optional[List[ConsumerScript]] = None
"""List of Workers that will consume logs from the attached Worker."""
usage_model: Optional[str] = None
diff --git a/src/cloudflare/types/workers/scripts/versions/settings_item_param.py b/src/cloudflare/types/workers/scripts/versions/settings_item_param.py
index 2d4cd9d11aab..caed910ec0dd 100644
--- a/src/cloudflare/types/workers/scripts/versions/settings_item_param.py
+++ b/src/cloudflare/types/workers/scripts/versions/settings_item_param.py
@@ -3,167 +3,18 @@
from __future__ import annotations
from typing import List, Union, Iterable
-from typing_extensions import Literal, Required, TypedDict
+from typing_extensions import TypedDict
-from .binding_item_param import BindingItemParam
+from ....binding_item_param import BindingItemParam
+from ..consumer_script_param import ConsumerScriptParam
from .compatibility_flags_item import CompatibilityFlagsItem
+from ....stepped_migration_param import SteppedMigrationParam
+from ....single_step_migration_param import SingleStepMigrationParam
+from ....placement_configuration_param import PlacementConfigurationParam
-__all__ = [
- "SettingsItemParam",
- "Migrations",
- "MigrationsWorkersSingleStepMigrations",
- "MigrationsWorkersSingleStepMigrationsRenamedClass",
- "MigrationsWorkersSingleStepMigrationsTransferredClass",
- "MigrationsWorkersSteppedMigrations",
- "MigrationsWorkersSteppedMigrationsStep",
- "MigrationsWorkersSteppedMigrationsStepRenamedClass",
- "MigrationsWorkersSteppedMigrationsStepTransferredClass",
- "Placement",
- "TailConsumer",
-]
+__all__ = ["SettingsItemParam", "Migrations"]
-_MigrationsWorkersSingleStepMigrationsRenamedClassReservedKeywords = TypedDict(
- "_MigrationsWorkersSingleStepMigrationsRenamedClassReservedKeywords",
- {
- "from": str,
- },
- total=False,
-)
-
-
-class MigrationsWorkersSingleStepMigrationsRenamedClass(
- _MigrationsWorkersSingleStepMigrationsRenamedClassReservedKeywords, total=False
-):
- to: str
-
-
-_MigrationsWorkersSingleStepMigrationsTransferredClassReservedKeywords = TypedDict(
- "_MigrationsWorkersSingleStepMigrationsTransferredClassReservedKeywords",
- {
- "from": str,
- },
- total=False,
-)
-
-
-class MigrationsWorkersSingleStepMigrationsTransferredClass(
- _MigrationsWorkersSingleStepMigrationsTransferredClassReservedKeywords, total=False
-):
- from_script: str
-
- to: str
-
-
-class MigrationsWorkersSingleStepMigrations(TypedDict, total=False):
- deleted_classes: List[str]
- """A list of classes to delete Durable Object namespaces from."""
-
- new_classes: List[str]
- """A list of classes to create Durable Object namespaces from."""
-
- new_tag: str
- """Tag to set as the latest migration tag."""
-
- old_tag: str
- """Tag used to verify against the latest migration tag for this Worker.
-
- If they don't match, the upload is rejected.
- """
-
- renamed_classes: Iterable[MigrationsWorkersSingleStepMigrationsRenamedClass]
- """A list of classes with Durable Object namespaces that were renamed."""
-
- transferred_classes: Iterable[MigrationsWorkersSingleStepMigrationsTransferredClass]
- """
- A list of transfers for Durable Object namespaces from a different Worker and
- class to a class defined in this Worker.
- """
-
-
-_MigrationsWorkersSteppedMigrationsStepRenamedClassReservedKeywords = TypedDict(
- "_MigrationsWorkersSteppedMigrationsStepRenamedClassReservedKeywords",
- {
- "from": str,
- },
- total=False,
-)
-
-
-class MigrationsWorkersSteppedMigrationsStepRenamedClass(
- _MigrationsWorkersSteppedMigrationsStepRenamedClassReservedKeywords, total=False
-):
- to: str
-
-
-_MigrationsWorkersSteppedMigrationsStepTransferredClassReservedKeywords = TypedDict(
- "_MigrationsWorkersSteppedMigrationsStepTransferredClassReservedKeywords",
- {
- "from": str,
- },
- total=False,
-)
-
-
-class MigrationsWorkersSteppedMigrationsStepTransferredClass(
- _MigrationsWorkersSteppedMigrationsStepTransferredClassReservedKeywords, total=False
-):
- from_script: str
-
- to: str
-
-
-class MigrationsWorkersSteppedMigrationsStep(TypedDict, total=False):
- deleted_classes: List[str]
- """A list of classes to delete Durable Object namespaces from."""
-
- new_classes: List[str]
- """A list of classes to create Durable Object namespaces from."""
-
- renamed_classes: Iterable[MigrationsWorkersSteppedMigrationsStepRenamedClass]
- """A list of classes with Durable Object namespaces that were renamed."""
-
- transferred_classes: Iterable[MigrationsWorkersSteppedMigrationsStepTransferredClass]
- """
- A list of transfers for Durable Object namespaces from a different Worker and
- class to a class defined in this Worker.
- """
-
-
-class MigrationsWorkersSteppedMigrations(TypedDict, total=False):
- new_tag: str
- """Tag to set as the latest migration tag."""
-
- old_tag: str
- """Tag used to verify against the latest migration tag for this Worker.
-
- If they don't match, the upload is rejected.
- """
-
- steps: Iterable[MigrationsWorkersSteppedMigrationsStep]
- """Migrations to apply in order."""
-
-
-Migrations = Union[MigrationsWorkersSingleStepMigrations, MigrationsWorkersSteppedMigrations]
-
-
-class Placement(TypedDict, total=False):
- mode: Literal["smart"]
- """
- Enables
- [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
- Only `"smart"` is currently supported
- """
-
-
-class TailConsumer(TypedDict, total=False):
- service: Required[str]
- """Name of Worker that is to be the consumer."""
-
- environment: str
- """Optional environment if the Worker utilizes one."""
-
- namespace: str
- """Optional dispatch namespace the script belongs to."""
+Migrations = Union[SingleStepMigrationParam, SteppedMigrationParam]
class SettingsItemParam(TypedDict, total=False):
@@ -182,12 +33,12 @@ class SettingsItemParam(TypedDict, total=False):
migrations: Migrations
"""Migrations to apply for Durable Objects associated with this Worker."""
- placement: Placement
+ placement: PlacementConfigurationParam
tags: List[str]
"""Tags to help you manage your Workers"""
- tail_consumers: Iterable[TailConsumer]
+ tail_consumers: Iterable[ConsumerScriptParam]
"""List of Workers that will consume logs from the attached Worker."""
usage_model: str
diff --git a/src/cloudflare/types/workers/scripts/workers_binding.py b/src/cloudflare/types/workers/scripts/workers_binding.py
index f14b3ffbd686..b0806ef017f5 100644
--- a/src/cloudflare/types/workers/scripts/workers_binding.py
+++ b/src/cloudflare/types/workers/scripts/workers_binding.py
@@ -4,19 +4,9 @@
from typing_extensions import Literal
from ...._models import BaseModel
+from ...kv_namespace_binding import KVNamespaceBinding
-__all__ = ["WorkersBinding", "WorkersKVNamespaceBinding", "WorkersWasmModuleBinding"]
-
-
-class WorkersKVNamespaceBinding(BaseModel):
- name: str
- """A JavaScript variable name for the binding."""
-
- namespace_id: str
- """Namespace identifier tag."""
-
- type: Literal["kv_namespace"]
- """The class of resource that the binding provides."""
+__all__ = ["WorkersBinding", "WorkersWasmModuleBinding"]
class WorkersWasmModuleBinding(BaseModel):
@@ -27,4 +17,4 @@ class WorkersWasmModuleBinding(BaseModel):
"""The class of resource that the binding provides."""
-WorkersBinding = Union[WorkersKVNamespaceBinding, WorkersWasmModuleBinding]
+WorkersBinding = Union[KVNamespaceBinding, WorkersWasmModuleBinding]
diff --git a/src/cloudflare/types/workers/services/environments/__init__.py b/src/cloudflare/types/workers/services/environments/__init__.py
index ae528cab93f1..5b2d8619a666 100644
--- a/src/cloudflare/types/workers/services/environments/__init__.py
+++ b/src/cloudflare/types/workers/services/environments/__init__.py
@@ -3,6 +3,4 @@
from __future__ import annotations
from .setting_edit_params import SettingEditParams as SettingEditParams
-from .setting_get_response import SettingGetResponse as SettingGetResponse
from .content_update_params import ContentUpdateParams as ContentUpdateParams
-from .setting_edit_response import SettingEditResponse as SettingEditResponse
diff --git a/src/cloudflare/types/workers/services/environments/setting_edit_params.py b/src/cloudflare/types/workers/services/environments/setting_edit_params.py
index 8f035c83de59..1628be6dd65d 100644
--- a/src/cloudflare/types/workers/services/environments/setting_edit_params.py
+++ b/src/cloudflare/types/workers/services/environments/setting_edit_params.py
@@ -6,8 +6,9 @@
from typing_extensions import Literal, Required, TypedDict
from .....types import shared_params
+from ...settings_item_param import SettingsItemParam
-__all__ = ["SettingEditParams", "Result", "ResultTailConsumer"]
+__all__ = ["SettingEditParams"]
class SettingEditParams(TypedDict, total=False):
@@ -21,26 +22,7 @@ class SettingEditParams(TypedDict, total=False):
messages: Required[Iterable[shared_params.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72]]
- result: Required[Result]
+ result: Required[SettingsItemParam]
success: Required[Literal[True]]
"""Whether the API call was successful"""
-
-
-class ResultTailConsumer(TypedDict, total=False):
- service: Required[str]
- """Name of Worker that is to be the consumer."""
-
- environment: str
- """Optional environment if the Worker utilizes one."""
-
- namespace: str
- """Optional dispatch namespace the script belongs to."""
-
-
-class Result(TypedDict, total=False):
- logpush: bool
- """Whether Logpush is turned on for the Worker."""
-
- tail_consumers: Iterable[ResultTailConsumer]
- """List of Workers that will consume logs from the attached Worker."""
diff --git a/src/cloudflare/types/workers/services/environments/setting_edit_response.py b/src/cloudflare/types/workers/services/environments/setting_edit_response.py
deleted file mode 100644
index bdfc4f904ce0..000000000000
--- a/src/cloudflare/types/workers/services/environments/setting_edit_response.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List, Optional
-
-from ....._models import BaseModel
-
-__all__ = ["SettingEditResponse", "TailConsumer"]
-
-
-class TailConsumer(BaseModel):
- service: str
- """Name of Worker that is to be the consumer."""
-
- environment: Optional[str] = None
- """Optional environment if the Worker utilizes one."""
-
- namespace: Optional[str] = None
- """Optional dispatch namespace the script belongs to."""
-
-
-class SettingEditResponse(BaseModel):
- logpush: Optional[bool] = None
- """Whether Logpush is turned on for the Worker."""
-
- tail_consumers: Optional[List[TailConsumer]] = None
- """List of Workers that will consume logs from the attached Worker."""
diff --git a/src/cloudflare/types/workers/services/environments/setting_get_response.py b/src/cloudflare/types/workers/services/environments/setting_get_response.py
deleted file mode 100644
index 14289dd0daf9..000000000000
--- a/src/cloudflare/types/workers/services/environments/setting_get_response.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List, Optional
-
-from ....._models import BaseModel
-
-__all__ = ["SettingGetResponse", "TailConsumer"]
-
-
-class TailConsumer(BaseModel):
- service: str
- """Name of Worker that is to be the consumer."""
-
- environment: Optional[str] = None
- """Optional environment if the Worker utilizes one."""
-
- namespace: Optional[str] = None
- """Optional dispatch namespace the script belongs to."""
-
-
-class SettingGetResponse(BaseModel):
- logpush: Optional[bool] = None
- """Whether Logpush is turned on for the Worker."""
-
- tail_consumers: Optional[List[TailConsumer]] = None
- """List of Workers that will consume logs from the attached Worker."""
diff --git a/src/cloudflare/types/workers/setting.py b/src/cloudflare/types/workers/setting.py
new file mode 100644
index 000000000000..b0c7a0ce0f57
--- /dev/null
+++ b/src/cloudflare/types/workers/setting.py
@@ -0,0 +1,21 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+from typing_extensions import Literal
+
+from ..shared import UnnamedSchemaRef3248f24329456e19dfa042fff9986f72
+from ..._models import BaseModel
+from .settings_item import SettingsItem
+
+__all__ = ["Setting"]
+
+
+class Setting(BaseModel):
+ errors: List[UnnamedSchemaRef3248f24329456e19dfa042fff9986f72]
+
+ messages: List[UnnamedSchemaRef3248f24329456e19dfa042fff9986f72]
+
+ result: SettingsItem
+
+ success: Literal[True]
+ """Whether the API call was successful"""
diff --git a/src/cloudflare/types/workers/settings_item.py b/src/cloudflare/types/workers/settings_item.py
new file mode 100644
index 000000000000..f798b9de67ed
--- /dev/null
+++ b/src/cloudflare/types/workers/settings_item.py
@@ -0,0 +1,16 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+
+from .scripts import ConsumerScript
+from ..._models import BaseModel
+
+__all__ = ["SettingsItem"]
+
+
+class SettingsItem(BaseModel):
+ logpush: Optional[bool] = None
+ """Whether Logpush is turned on for the Worker."""
+
+ tail_consumers: Optional[List[ConsumerScript]] = None
+ """List of Workers that will consume logs from the attached Worker."""
diff --git a/src/cloudflare/types/workers/settings_item_param.py b/src/cloudflare/types/workers/settings_item_param.py
new file mode 100644
index 000000000000..87d82fc1842b
--- /dev/null
+++ b/src/cloudflare/types/workers/settings_item_param.py
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Iterable
+from typing_extensions import TypedDict
+
+from .scripts import ConsumerScriptParam
+
+__all__ = ["SettingsItemParam"]
+
+
+class SettingsItemParam(TypedDict, total=False):
+ logpush: bool
+ """Whether Logpush is turned on for the Worker."""
+
+ tail_consumers: Iterable[ConsumerScriptParam]
+ """List of Workers that will consume logs from the attached Worker."""
diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_params.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_params.py
index a01173165589..4d37d169a81f 100644
--- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_params.py
+++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_params.py
@@ -7,23 +7,12 @@
from ....._types import FileTypes
from ....._utils import PropertyInfo
+from ....workers.scripts import ConsumerScriptParam
+from ....stepped_migration_param import SteppedMigrationParam
+from ....single_step_migration_param import SingleStepMigrationParam
+from ....placement_configuration_param import PlacementConfigurationParam
-__all__ = [
- "ScriptUpdateParams",
- "Variant0",
- "Variant0Metadata",
- "Variant0MetadataMigrations",
- "Variant0MetadataMigrationsWorkersSingleStepMigrations",
- "Variant0MetadataMigrationsWorkersSingleStepMigrationsRenamedClass",
- "Variant0MetadataMigrationsWorkersSingleStepMigrationsTransferredClass",
- "Variant0MetadataMigrationsWorkersSteppedMigrations",
- "Variant0MetadataMigrationsWorkersSteppedMigrationsStep",
- "Variant0MetadataMigrationsWorkersSteppedMigrationsStepRenamedClass",
- "Variant0MetadataMigrationsWorkersSteppedMigrationsStepTransferredClass",
- "Variant0MetadataPlacement",
- "Variant0MetadataTailConsumer",
- "Variant1",
-]
+__all__ = ["ScriptUpdateParams", "Variant0", "Variant0Metadata", "Variant0MetadataMigrations", "Variant1"]
class Variant0(TypedDict, total=False):
@@ -45,150 +34,7 @@ class Variant0(TypedDict, total=False):
"""JSON encoded metadata about the uploaded parts and Worker configuration."""
-_Variant0MetadataMigrationsWorkersSingleStepMigrationsRenamedClassReservedKeywords = TypedDict(
- "_Variant0MetadataMigrationsWorkersSingleStepMigrationsRenamedClassReservedKeywords",
- {
- "from": str,
- },
- total=False,
-)
-
-
-class Variant0MetadataMigrationsWorkersSingleStepMigrationsRenamedClass(
- _Variant0MetadataMigrationsWorkersSingleStepMigrationsRenamedClassReservedKeywords, total=False
-):
- to: str
-
-
-_Variant0MetadataMigrationsWorkersSingleStepMigrationsTransferredClassReservedKeywords = TypedDict(
- "_Variant0MetadataMigrationsWorkersSingleStepMigrationsTransferredClassReservedKeywords",
- {
- "from": str,
- },
- total=False,
-)
-
-
-class Variant0MetadataMigrationsWorkersSingleStepMigrationsTransferredClass(
- _Variant0MetadataMigrationsWorkersSingleStepMigrationsTransferredClassReservedKeywords, total=False
-):
- from_script: str
-
- to: str
-
-
-class Variant0MetadataMigrationsWorkersSingleStepMigrations(TypedDict, total=False):
- deleted_classes: List[str]
- """A list of classes to delete Durable Object namespaces from."""
-
- new_classes: List[str]
- """A list of classes to create Durable Object namespaces from."""
-
- new_tag: str
- """Tag to set as the latest migration tag."""
-
- old_tag: str
- """Tag used to verify against the latest migration tag for this Worker.
-
- If they don't match, the upload is rejected.
- """
-
- renamed_classes: Iterable[Variant0MetadataMigrationsWorkersSingleStepMigrationsRenamedClass]
- """A list of classes with Durable Object namespaces that were renamed."""
-
- transferred_classes: Iterable[Variant0MetadataMigrationsWorkersSingleStepMigrationsTransferredClass]
- """
- A list of transfers for Durable Object namespaces from a different Worker and
- class to a class defined in this Worker.
- """
-
-
-_Variant0MetadataMigrationsWorkersSteppedMigrationsStepRenamedClassReservedKeywords = TypedDict(
- "_Variant0MetadataMigrationsWorkersSteppedMigrationsStepRenamedClassReservedKeywords",
- {
- "from": str,
- },
- total=False,
-)
-
-
-class Variant0MetadataMigrationsWorkersSteppedMigrationsStepRenamedClass(
- _Variant0MetadataMigrationsWorkersSteppedMigrationsStepRenamedClassReservedKeywords, total=False
-):
- to: str
-
-
-_Variant0MetadataMigrationsWorkersSteppedMigrationsStepTransferredClassReservedKeywords = TypedDict(
- "_Variant0MetadataMigrationsWorkersSteppedMigrationsStepTransferredClassReservedKeywords",
- {
- "from": str,
- },
- total=False,
-)
-
-
-class Variant0MetadataMigrationsWorkersSteppedMigrationsStepTransferredClass(
- _Variant0MetadataMigrationsWorkersSteppedMigrationsStepTransferredClassReservedKeywords, total=False
-):
- from_script: str
-
- to: str
-
-
-class Variant0MetadataMigrationsWorkersSteppedMigrationsStep(TypedDict, total=False):
- deleted_classes: List[str]
- """A list of classes to delete Durable Object namespaces from."""
-
- new_classes: List[str]
- """A list of classes to create Durable Object namespaces from."""
-
- renamed_classes: Iterable[Variant0MetadataMigrationsWorkersSteppedMigrationsStepRenamedClass]
- """A list of classes with Durable Object namespaces that were renamed."""
-
- transferred_classes: Iterable[Variant0MetadataMigrationsWorkersSteppedMigrationsStepTransferredClass]
- """
- A list of transfers for Durable Object namespaces from a different Worker and
- class to a class defined in this Worker.
- """
-
-
-class Variant0MetadataMigrationsWorkersSteppedMigrations(TypedDict, total=False):
- new_tag: str
- """Tag to set as the latest migration tag."""
-
- old_tag: str
- """Tag used to verify against the latest migration tag for this Worker.
-
- If they don't match, the upload is rejected.
- """
-
- steps: Iterable[Variant0MetadataMigrationsWorkersSteppedMigrationsStep]
- """Migrations to apply in order."""
-
-
-Variant0MetadataMigrations = Union[
- Variant0MetadataMigrationsWorkersSingleStepMigrations, Variant0MetadataMigrationsWorkersSteppedMigrations
-]
-
-
-class Variant0MetadataPlacement(TypedDict, total=False):
- mode: Literal["smart"]
- """
- Enables
- [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
- Only `"smart"` is currently supported
- """
-
-
-class Variant0MetadataTailConsumer(TypedDict, total=False):
- service: Required[str]
- """Name of Worker that is to be the consumer."""
-
- environment: str
- """Optional environment if the Worker utilizes one."""
-
- namespace: str
- """Optional dispatch namespace the script belongs to."""
+Variant0MetadataMigrations = Union[SingleStepMigrationParam, SteppedMigrationParam]
class Variant0Metadata(TypedDict, total=False):
@@ -231,12 +77,12 @@ class Variant0Metadata(TypedDict, total=False):
migrations: Variant0MetadataMigrations
"""Migrations to apply for Durable Objects associated with this Worker."""
- placement: Variant0MetadataPlacement
+ placement: PlacementConfigurationParam
tags: List[str]
"""List of strings to use as tags for this Worker"""
- tail_consumers: Iterable[Variant0MetadataTailConsumer]
+ tail_consumers: Iterable[ConsumerScriptParam]
"""List of Workers that will consume logs from the attached Worker."""
usage_model: Literal["bundled", "unbound"]
diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/__init__.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/__init__.py
index f02cfa2e6315..5b2d8619a666 100644
--- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/__init__.py
+++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/__init__.py
@@ -3,7 +3,4 @@
from __future__ import annotations
from .setting_edit_params import SettingEditParams as SettingEditParams
-from .binding_get_response import BindingGetResponse as BindingGetResponse
-from .setting_get_response import SettingGetResponse as SettingGetResponse
from .content_update_params import ContentUpdateParams as ContentUpdateParams
-from .setting_edit_response import SettingEditResponse as SettingEditResponse
diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/binding_get_response.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/binding_get_response.py
deleted file mode 100644
index 48f3241f21c2..000000000000
--- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/binding_get_response.py
+++ /dev/null
@@ -1,161 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List, Union, Optional
-from typing_extensions import Literal
-
-from ......_models import BaseModel
-
-__all__ = [
- "BindingGetResponse",
- "WorkersKVNamespaceBinding",
- "WorkersServiceBinding",
- "WorkersDoBinding",
- "WorkersR2Binding",
- "WorkersQueueBinding",
- "WorkersD1Binding",
- "WorkersDispatchNamespaceBinding",
- "WorkersDispatchNamespaceBindingOutbound",
- "WorkersDispatchNamespaceBindingOutboundWorker",
- "WorkersMTLSCERTBinding",
-]
-
-
-class WorkersKVNamespaceBinding(BaseModel):
- name: str
- """A JavaScript variable name for the binding."""
-
- namespace_id: str
- """Namespace identifier tag."""
-
- type: Literal["kv_namespace"]
- """The class of resource that the binding provides."""
-
-
-class WorkersServiceBinding(BaseModel):
- environment: str
- """Optional environment if the Worker utilizes one."""
-
- name: str
- """A JavaScript variable name for the binding."""
-
- service: str
- """Name of Worker to bind to"""
-
- type: Literal["service"]
- """The class of resource that the binding provides."""
-
-
-class WorkersDoBinding(BaseModel):
- class_name: str
- """The exported class name of the Durable Object"""
-
- name: str
- """A JavaScript variable name for the binding."""
-
- type: Literal["durable_object_namespace"]
- """The class of resource that the binding provides."""
-
- environment: Optional[str] = None
- """The environment of the script_name to bind to"""
-
- namespace_id: Optional[str] = None
- """Namespace identifier tag."""
-
- script_name: Optional[str] = None
- """
- The script where the Durable Object is defined, if it is external to this Worker
- """
-
-
-class WorkersR2Binding(BaseModel):
- bucket_name: str
- """R2 bucket to bind to"""
-
- name: str
- """A JavaScript variable name for the binding."""
-
- type: Literal["r2_bucket"]
- """The class of resource that the binding provides."""
-
-
-class WorkersQueueBinding(BaseModel):
- name: str
- """A JavaScript variable name for the binding."""
-
- queue_name: str
- """Name of the Queue to bind to"""
-
- type: Literal["queue"]
- """The class of resource that the binding provides."""
-
-
-class WorkersD1Binding(BaseModel):
- id: str
- """ID of the D1 database to bind to"""
-
- binding: str
- """A JavaScript variable name for the binding."""
-
- name: str
- """The name of the D1 database associated with the 'id' provided."""
-
- type: Literal["d1"]
- """The class of resource that the binding provides."""
-
-
-class WorkersDispatchNamespaceBindingOutboundWorker(BaseModel):
- environment: Optional[str] = None
- """Environment of the outbound worker"""
-
- service: Optional[str] = None
- """Name of the outbound worker"""
-
-
-class WorkersDispatchNamespaceBindingOutbound(BaseModel):
- params: Optional[List[str]] = None
- """
- Pass information from the Dispatch Worker to the Outbound Worker through the
- parameters
- """
-
- worker: Optional[WorkersDispatchNamespaceBindingOutboundWorker] = None
- """Outbound worker"""
-
-
-class WorkersDispatchNamespaceBinding(BaseModel):
- name: str
- """A JavaScript variable name for the binding."""
-
- namespace: str
- """Namespace to bind to"""
-
- type: Literal["dispatch_namespace"]
- """The class of resource that the binding provides."""
-
- outbound: Optional[WorkersDispatchNamespaceBindingOutbound] = None
- """Outbound worker"""
-
-
-class WorkersMTLSCERTBinding(BaseModel):
- certificate: object
-
- name: str
- """A JavaScript variable name for the binding."""
-
- type: Literal["mtls_certificate"]
- """The class of resource that the binding provides."""
-
- certificate_id: Optional[str] = None
- """ID of the certificate to bind to"""
-
-
-BindingGetResponse = Union[
- WorkersKVNamespaceBinding,
- WorkersServiceBinding,
- WorkersDoBinding,
- WorkersR2Binding,
- WorkersQueueBinding,
- WorkersD1Binding,
- WorkersDispatchNamespaceBinding,
- WorkersMTLSCERTBinding,
-]
diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_edit_params.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_edit_params.py
index 7a62e788b162..d666b2f39e6e 100644
--- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_edit_params.py
+++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_edit_params.py
@@ -6,8 +6,9 @@
from typing_extensions import Literal, Required, TypedDict
from ......types import shared_params
+from .....workers import SettingsItemParam
-__all__ = ["SettingEditParams", "Result", "ResultTailConsumer"]
+__all__ = ["SettingEditParams"]
class SettingEditParams(TypedDict, total=False):
@@ -21,26 +22,7 @@ class SettingEditParams(TypedDict, total=False):
messages: Required[Iterable[shared_params.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72]]
- result: Required[Result]
+ result: Required[SettingsItemParam]
success: Required[Literal[True]]
"""Whether the API call was successful"""
-
-
-class ResultTailConsumer(TypedDict, total=False):
- service: Required[str]
- """Name of Worker that is to be the consumer."""
-
- environment: str
- """Optional environment if the Worker utilizes one."""
-
- namespace: str
- """Optional dispatch namespace the script belongs to."""
-
-
-class Result(TypedDict, total=False):
- logpush: bool
- """Whether Logpush is turned on for the Worker."""
-
- tail_consumers: Iterable[ResultTailConsumer]
- """List of Workers that will consume logs from the attached Worker."""
diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_edit_response.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_edit_response.py
deleted file mode 100644
index 6142374a92a1..000000000000
--- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_edit_response.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List, Optional
-
-from ......_models import BaseModel
-
-__all__ = ["SettingEditResponse", "TailConsumer"]
-
-
-class TailConsumer(BaseModel):
- service: str
- """Name of Worker that is to be the consumer."""
-
- environment: Optional[str] = None
- """Optional environment if the Worker utilizes one."""
-
- namespace: Optional[str] = None
- """Optional dispatch namespace the script belongs to."""
-
-
-class SettingEditResponse(BaseModel):
- logpush: Optional[bool] = None
- """Whether Logpush is turned on for the Worker."""
-
- tail_consumers: Optional[List[TailConsumer]] = None
- """List of Workers that will consume logs from the attached Worker."""
diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_get_response.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_get_response.py
deleted file mode 100644
index ee471cc0e594..000000000000
--- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_get_response.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List, Optional
-
-from ......_models import BaseModel
-
-__all__ = ["SettingGetResponse", "TailConsumer"]
-
-
-class TailConsumer(BaseModel):
- service: str
- """Name of Worker that is to be the consumer."""
-
- environment: Optional[str] = None
- """Optional environment if the Worker utilizes one."""
-
- namespace: Optional[str] = None
- """Optional dispatch namespace the script belongs to."""
-
-
-class SettingGetResponse(BaseModel):
- logpush: Optional[bool] = None
- """Whether Logpush is turned on for the Worker."""
-
- tail_consumers: Optional[List[TailConsumer]] = None
- """List of Workers that will consume logs from the attached Worker."""
diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/workers_for_platforms_namespace_script.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/workers_for_platforms_namespace_script.py
index 0b9fcd580161..b4e82c3da6be 100644
--- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/workers_for_platforms_namespace_script.py
+++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/workers_for_platforms_namespace_script.py
@@ -3,7 +3,7 @@
from typing import Optional
from datetime import datetime
-from ....workers import WorkersScript
+from ....workers import Script
from ....._models import BaseModel
__all__ = ["WorkersForPlatformsNamespaceScript"]
@@ -19,4 +19,4 @@ class WorkersForPlatformsNamespaceScript(BaseModel):
modified_on: Optional[datetime] = None
"""When the script was last modified."""
- script: Optional[WorkersScript] = None
+ script: Optional[Script] = None
diff --git a/src/cloudflare/types/zero_trust/__init__.py b/src/cloudflare/types/zero_trust/__init__.py
index e23a2a38e9bf..bcfce07560e9 100644
--- a/src/cloudflare/types/zero_trust/__init__.py
+++ b/src/cloudflare/types/zero_trust/__init__.py
@@ -3,6 +3,7 @@
from __future__ import annotations
from .rule import Rule as Rule
+from .tunnel import Tunnel as Tunnel
from .ip_rule import IPRule as IPRule
from .azure_ad import AzureAd as AzureAd
from .email_rule import EmailRule as EmailRule
@@ -14,6 +15,7 @@
from .include_item import IncludeItem as IncludeItem
from .ip_list_rule import IPListRule as IPListRule
from .login_design import LoginDesign as LoginDesign
+from .tunnel_param import TunnelParam as TunnelParam
from .everyone_rule import EveryoneRule as EveryoneRule
from .ip_rule_param import IPRuleParam as IPRuleParam
from .email_list_rule import EmailListRule as EmailListRule
@@ -33,7 +35,6 @@
from .login_design_param import LoginDesignParam as LoginDesignParam
from .seat_edit_response import SeatEditResponse as SeatEditResponse
from .service_token_rule import ServiceTokenRule as ServiceTokenRule
-from .tunnel_argo_tunnel import TunnelArgoTunnel as TunnelArgoTunnel
from .tunnel_edit_params import TunnelEditParams as TunnelEditParams
from .tunnel_list_params import TunnelListParams as TunnelListParams
from .zero_trust_devices import ZeroTrustDevices as ZeroTrustDevices
@@ -46,6 +47,7 @@
from .gateway_list_response import GatewayListResponse as GatewayListResponse
from .okta_group_rule_param import OktaGroupRuleParam as OktaGroupRuleParam
from .saml_group_rule_param import SamlGroupRuleParam as SamlGroupRuleParam
+from .warp_connector_tunnel import WARPConnectorTunnel as WARPConnectorTunnel
from .azure_group_rule_param import AzureGroupRuleParam as AzureGroupRuleParam
from .certificate_rule_param import CertificateRuleParam as CertificateRuleParam
from .gateway_create_response import GatewayCreateResponse as GatewayCreateResponse
diff --git a/src/cloudflare/types/zero_trust/dlp/__init__.py b/src/cloudflare/types/zero_trust/dlp/__init__.py
index ba9f8a041fe0..7665c6baccc2 100644
--- a/src/cloudflare/types/zero_trust/dlp/__init__.py
+++ b/src/cloudflare/types/zero_trust/dlp/__init__.py
@@ -2,12 +2,12 @@
from __future__ import annotations
-from .dlp_dataset import DLPDataset as DLPDataset
+from .dataset import Dataset as Dataset
from .dlp_profile import DLPProfile as DLPProfile
+from .dataset_array import DatasetArray as DatasetArray
+from .dataset_creation import DatasetCreation as DatasetCreation
from .context_awareness import ContextAwareness as ContextAwareness
-from .dlp_dataset_array import DLPDatasetArray as DLPDatasetArray
from .skip_configuration import SkipConfiguration as SkipConfiguration
-from .dlp_dataset_creation import DLPDatasetCreation as DLPDatasetCreation
from .profile_get_response import ProfileGetResponse as ProfileGetResponse
from .dataset_create_params import DatasetCreateParams as DatasetCreateParams
from .dataset_update_params import DatasetUpdateParams as DatasetUpdateParams
diff --git a/src/cloudflare/types/zero_trust/dlp/dlp_dataset.py b/src/cloudflare/types/zero_trust/dlp/dataset.py
similarity index 90%
rename from src/cloudflare/types/zero_trust/dlp/dlp_dataset.py
rename to src/cloudflare/types/zero_trust/dlp/dataset.py
index cae217205125..6654f6111af3 100644
--- a/src/cloudflare/types/zero_trust/dlp/dlp_dataset.py
+++ b/src/cloudflare/types/zero_trust/dlp/dataset.py
@@ -6,7 +6,7 @@
from ...._models import BaseModel
-__all__ = ["DLPDataset", "Upload"]
+__all__ = ["Dataset", "Upload"]
class Upload(BaseModel):
@@ -17,7 +17,7 @@ class Upload(BaseModel):
version: int
-class DLPDataset(BaseModel):
+class Dataset(BaseModel):
id: str
created_at: datetime
diff --git a/src/cloudflare/types/zero_trust/dlp/dlp_dataset_array.py b/src/cloudflare/types/zero_trust/dlp/dataset_array.py
similarity index 53%
rename from src/cloudflare/types/zero_trust/dlp/dlp_dataset_array.py
rename to src/cloudflare/types/zero_trust/dlp/dataset_array.py
index c68abb112e58..c3ea24b0c36f 100644
--- a/src/cloudflare/types/zero_trust/dlp/dlp_dataset_array.py
+++ b/src/cloudflare/types/zero_trust/dlp/dataset_array.py
@@ -2,8 +2,8 @@
from typing import List
-from .dlp_dataset import DLPDataset
+from .dataset import Dataset
-__all__ = ["DLPDatasetArray"]
+__all__ = ["DatasetArray"]
-DLPDatasetArray = List[DLPDataset]
+DatasetArray = List[Dataset]
diff --git a/src/cloudflare/types/zero_trust/dlp/dlp_dataset_creation.py b/src/cloudflare/types/zero_trust/dlp/dataset_creation.py
similarity index 75%
rename from src/cloudflare/types/zero_trust/dlp/dlp_dataset_creation.py
rename to src/cloudflare/types/zero_trust/dlp/dataset_creation.py
index 6dfdaa3ddb23..c27598ed1171 100644
--- a/src/cloudflare/types/zero_trust/dlp/dlp_dataset_creation.py
+++ b/src/cloudflare/types/zero_trust/dlp/dataset_creation.py
@@ -2,14 +2,14 @@
from typing import Optional
+from .dataset import Dataset
from ...._models import BaseModel
-from .dlp_dataset import DLPDataset
-__all__ = ["DLPDatasetCreation"]
+__all__ = ["DatasetCreation"]
-class DLPDatasetCreation(BaseModel):
- dataset: DLPDataset
+class DatasetCreation(BaseModel):
+ dataset: Dataset
max_cells: int
diff --git a/src/cloudflare/types/zero_trust/dlp/datasets/__init__.py b/src/cloudflare/types/zero_trust/dlp/datasets/__init__.py
index 9c6d0381c544..05b90b2cbb85 100644
--- a/src/cloudflare/types/zero_trust/dlp/datasets/__init__.py
+++ b/src/cloudflare/types/zero_trust/dlp/datasets/__init__.py
@@ -2,5 +2,5 @@
from __future__ import annotations
+from .new_version import NewVersion as NewVersion
from .upload_edit_params import UploadEditParams as UploadEditParams
-from .dlp_dataset_new_version import DLPDatasetNewVersion as DLPDatasetNewVersion
diff --git a/src/cloudflare/types/zero_trust/dlp/datasets/dlp_dataset_new_version.py b/src/cloudflare/types/zero_trust/dlp/datasets/new_version.py
similarity index 75%
rename from src/cloudflare/types/zero_trust/dlp/datasets/dlp_dataset_new_version.py
rename to src/cloudflare/types/zero_trust/dlp/datasets/new_version.py
index 78a4a4b98c30..fb8411a8ccea 100644
--- a/src/cloudflare/types/zero_trust/dlp/datasets/dlp_dataset_new_version.py
+++ b/src/cloudflare/types/zero_trust/dlp/datasets/new_version.py
@@ -4,10 +4,10 @@
from ....._models import BaseModel
-__all__ = ["DLPDatasetNewVersion"]
+__all__ = ["NewVersion"]
-class DLPDatasetNewVersion(BaseModel):
+class NewVersion(BaseModel):
max_cells: int
version: int
diff --git a/src/cloudflare/types/zero_trust/tunnel_argo_tunnel.py b/src/cloudflare/types/zero_trust/tunnel.py
similarity index 93%
rename from src/cloudflare/types/zero_trust/tunnel_argo_tunnel.py
rename to src/cloudflare/types/zero_trust/tunnel.py
index 30d85bd4589b..3293d3e5eabe 100644
--- a/src/cloudflare/types/zero_trust/tunnel_argo_tunnel.py
+++ b/src/cloudflare/types/zero_trust/tunnel.py
@@ -5,7 +5,7 @@
from ..._models import BaseModel
-__all__ = ["TunnelArgoTunnel", "Connection"]
+__all__ = ["Tunnel", "Connection"]
class Connection(BaseModel):
@@ -24,7 +24,7 @@ class Connection(BaseModel):
"""UUID of the Cloudflare Tunnel connection."""
-class TunnelArgoTunnel(BaseModel):
+class Tunnel(BaseModel):
id: str
"""UUID of the tunnel."""
diff --git a/src/cloudflare/types/zero_trust/tunnel_param.py b/src/cloudflare/types/zero_trust/tunnel_param.py
new file mode 100644
index 000000000000..bca3336c2c24
--- /dev/null
+++ b/src/cloudflare/types/zero_trust/tunnel_param.py
@@ -0,0 +1,41 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Union, Iterable
+from datetime import datetime
+from typing_extensions import Required, Annotated, TypedDict
+
+from ..._utils import PropertyInfo
+
+__all__ = ["TunnelParam", "Connection"]
+
+
+class Connection(TypedDict, total=False):
+ colo_name: str
+ """The Cloudflare data center used for this connection."""
+
+ is_pending_reconnect: bool
+ """
+ Cloudflare continues to track connections for several minutes after they
+ disconnect. This is an optimization to improve latency and reliability of
+ reconnecting. If `true`, the connection has disconnected but is still being
+ tracked. If `false`, the connection is actively serving traffic.
+ """
+
+
+class TunnelParam(TypedDict, total=False):
+ connections: Required[Iterable[Connection]]
+ """The tunnel connections between your origin and Cloudflare's edge."""
+
+ created_at: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
+ """Timestamp of when the tunnel was created."""
+
+ name: Required[str]
+ """A user-friendly name for the tunnel."""
+
+ deleted_at: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
+ """Timestamp of when the tunnel was deleted.
+
+ If `null`, the tunnel has not been deleted.
+ """
diff --git a/src/cloudflare/types/zero_trust/warp_connector_tunnel.py b/src/cloudflare/types/zero_trust/warp_connector_tunnel.py
new file mode 100644
index 000000000000..8ba61e6d86c1
--- /dev/null
+++ b/src/cloudflare/types/zero_trust/warp_connector_tunnel.py
@@ -0,0 +1,90 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from datetime import datetime
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+
+__all__ = ["WARPConnectorTunnel", "Connection"]
+
+
+class Connection(BaseModel):
+ id: Optional[str] = None
+ """UUID of the Cloudflare Tunnel connection."""
+
+ client_id: Optional[object] = None
+ """UUID of the cloudflared instance."""
+
+ client_version: Optional[str] = None
+ """The cloudflared version used to establish this connection."""
+
+ colo_name: Optional[str] = None
+ """The Cloudflare data center used for this connection."""
+
+ is_pending_reconnect: Optional[bool] = None
+ """
+ Cloudflare continues to track connections for several minutes after they
+ disconnect. This is an optimization to improve latency and reliability of
+ reconnecting. If `true`, the connection has disconnected but is still being
+ tracked. If `false`, the connection is actively serving traffic.
+ """
+
+ opened_at: Optional[datetime] = None
+ """Timestamp of when the connection was established."""
+
+ origin_ip: Optional[str] = None
+ """The public IP address of the host running cloudflared."""
+
+ uuid: Optional[str] = None
+ """UUID of the Cloudflare Tunnel connection."""
+
+
+class WARPConnectorTunnel(BaseModel):
+ id: Optional[str] = None
+ """UUID of the tunnel."""
+
+ account_tag: Optional[str] = None
+ """Cloudflare account ID"""
+
+ connections: Optional[List[Connection]] = None
+ """The Cloudflare Tunnel connections between your origin and Cloudflare's edge."""
+
+ conns_active_at: Optional[datetime] = None
+ """
+ Timestamp of when the tunnel established at least one connection to Cloudflare's
+ edge. If `null`, the tunnel is inactive.
+ """
+
+ conns_inactive_at: Optional[datetime] = None
+ """
+ Timestamp of when the tunnel became inactive (no connections to Cloudflare's
+ edge). If `null`, the tunnel is active.
+ """
+
+ created_at: Optional[datetime] = None
+ """Timestamp of when the tunnel was created."""
+
+ deleted_at: Optional[datetime] = None
+ """Timestamp of when the tunnel was deleted.
+
+ If `null`, the tunnel has not been deleted.
+ """
+
+ metadata: Optional[object] = None
+ """Metadata associated with the tunnel."""
+
+ name: Optional[str] = None
+ """A user-friendly name for the tunnel."""
+
+ status: Optional[str] = None
+ """The status of the tunnel.
+
+ Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is
+ active and able to serve traffic but in an unhealthy state), `healthy` (tunnel
+ is active and able to serve traffic), or `down` (tunnel can not serve traffic as
+ it has no connections to the Cloudflare Edge).
+ """
+
+ tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "ip_sec", "gre", "cni"]] = None
+ """The type of tunnel."""
diff --git a/src/cloudflare/types/zones_pagerule.py b/src/cloudflare/types/zones_pagerule.py
deleted file mode 100644
index 2a6f1eb0d649..000000000000
--- a/src/cloudflare/types/zones_pagerule.py
+++ /dev/null
@@ -1,83 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List, Optional
-from datetime import datetime
-from typing_extensions import Literal
-
-from .._models import BaseModel
-
-__all__ = ["ZonesPagerule", "Action", "ActionValue", "Target", "TargetConstraint"]
-
-
-class ActionValue(BaseModel):
- type: Optional[Literal["temporary", "permanent"]] = None
- """The response type for the URL redirect."""
-
- url: Optional[str] = None
- """
- The URL to redirect the request to. Notes: ${num} refers to the position of '\\**'
- in the constraint value.
- """
-
-
-class Action(BaseModel):
- modified_on: Optional[datetime] = None
- """The timestamp of when the override was last modified."""
-
- name: Optional[Literal["forward_url"]] = None
- """The type of route."""
-
- value: Optional[ActionValue] = None
-
-
-class TargetConstraint(BaseModel):
- operator: Literal["matches", "contains", "equals", "not_equal", "not_contain"]
- """
- The matches operator can use asterisks and pipes as wildcard and 'or' operators.
- """
-
- value: str
- """The URL pattern to match against the current request.
-
- The pattern may contain up to four asterisks ('\\**') as placeholders.
- """
-
-
-class Target(BaseModel):
- constraint: TargetConstraint
- """String constraint."""
-
- target: Literal["url"]
- """A target based on the URL of the request."""
-
-
-class ZonesPagerule(BaseModel):
- id: str
- """Identifier"""
-
- actions: List[Action]
- """The set of actions to perform if the targets of this rule match the request.
-
- Actions can redirect to another URL or override settings, but not both.
- """
-
- created_on: datetime
- """The timestamp of when the Page Rule was created."""
-
- modified_on: datetime
- """The timestamp of when the Page Rule was last modified."""
-
- priority: int
- """
- The priority of the rule, used to define which Page Rule is processed over
- another. A higher number indicates a higher priority. For example, if you have a
- catch-all Page Rule (rule A: `/images/*`) but want a more specific Page Rule to
- take precedence (rule B: `/images/special/*`), specify a higher priority for
- rule B so it overrides rule A.
- """
-
- status: Literal["active", "disabled"]
- """The status of the Page Rule."""
-
- targets: List[Target]
- """The rule targets to evaluate on each request."""
diff --git a/tests/api_resources/magic_network_monitoring/test_rules.py b/tests/api_resources/magic_network_monitoring/test_rules.py
index 2d5ba5032842..05abf88db38c 100644
--- a/tests/api_resources/magic_network_monitoring/test_rules.py
+++ b/tests/api_resources/magic_network_monitoring/test_rules.py
@@ -11,7 +11,7 @@
from tests.utils import assert_matches_type
from cloudflare.pagination import SyncSinglePage, AsyncSinglePage
from cloudflare.types.magic_network_monitoring import (
- MagicNetworkMonitoringRule,
+ Rule,
)
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -27,7 +27,7 @@ def test_method_create(self, client: Cloudflare) -> None:
account_id="6f91088a406011ed95aed352566e8d4c",
body={},
)
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -40,7 +40,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -53,7 +53,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -73,7 +73,7 @@ def test_method_update(self, client: Cloudflare) -> None:
account_id="6f91088a406011ed95aed352566e8d4c",
body={},
)
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -86,7 +86,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -99,7 +99,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -118,7 +118,7 @@ def test_method_list(self, client: Cloudflare) -> None:
rule = client.magic_network_monitoring.rules.list(
account_id="6f91088a406011ed95aed352566e8d4c",
)
- assert_matches_type(SyncSinglePage[Optional[MagicNetworkMonitoringRule]], rule, path=["response"])
+ assert_matches_type(SyncSinglePage[Optional[Rule]], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -130,7 +130,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(SyncSinglePage[Optional[MagicNetworkMonitoringRule]], rule, path=["response"])
+ assert_matches_type(SyncSinglePage[Optional[Rule]], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -142,7 +142,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(SyncSinglePage[Optional[MagicNetworkMonitoringRule]], rule, path=["response"])
+ assert_matches_type(SyncSinglePage[Optional[Rule]], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -162,7 +162,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
account_id="6f91088a406011ed95aed352566e8d4c",
body={},
)
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -176,7 +176,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -190,7 +190,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -219,7 +219,7 @@ def test_method_edit(self, client: Cloudflare) -> None:
account_id="6f91088a406011ed95aed352566e8d4c",
body={},
)
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -233,7 +233,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -247,7 +247,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -275,7 +275,7 @@ def test_method_get(self, client: Cloudflare) -> None:
"2890e6fa406311ed9b5a23f70f6fb8cf",
account_id="6f91088a406011ed95aed352566e8d4c",
)
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -288,7 +288,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -301,7 +301,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -331,7 +331,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
account_id="6f91088a406011ed95aed352566e8d4c",
body={},
)
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -344,7 +344,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -357,7 +357,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -377,7 +377,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
account_id="6f91088a406011ed95aed352566e8d4c",
body={},
)
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -390,7 +390,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -403,7 +403,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -422,7 +422,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
rule = await async_client.magic_network_monitoring.rules.list(
account_id="6f91088a406011ed95aed352566e8d4c",
)
- assert_matches_type(AsyncSinglePage[Optional[MagicNetworkMonitoringRule]], rule, path=["response"])
+ assert_matches_type(AsyncSinglePage[Optional[Rule]], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -434,7 +434,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(AsyncSinglePage[Optional[MagicNetworkMonitoringRule]], rule, path=["response"])
+ assert_matches_type(AsyncSinglePage[Optional[Rule]], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -446,7 +446,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(AsyncSinglePage[Optional[MagicNetworkMonitoringRule]], rule, path=["response"])
+ assert_matches_type(AsyncSinglePage[Optional[Rule]], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -466,7 +466,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
account_id="6f91088a406011ed95aed352566e8d4c",
body={},
)
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -480,7 +480,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -494,7 +494,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -523,7 +523,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
account_id="6f91088a406011ed95aed352566e8d4c",
body={},
)
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -537,7 +537,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -551,7 +551,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -579,7 +579,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
"2890e6fa406311ed9b5a23f70f6fb8cf",
account_id="6f91088a406011ed95aed352566e8d4c",
)
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -592,7 +592,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -605,7 +605,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
+ assert_matches_type(Optional[Rule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/pages/projects/test_deployments.py b/tests/api_resources/pages/projects/test_deployments.py
index a824f3a38b73..75764f1a1e4a 100644
--- a/tests/api_resources/pages/projects/test_deployments.py
+++ b/tests/api_resources/pages/projects/test_deployments.py
@@ -10,7 +10,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
from cloudflare.pagination import SyncSinglePage, AsyncSinglePage
-from cloudflare.types.pages import PagesDeployments
+from cloudflare.types.pages import Deployment
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -25,7 +25,7 @@ def test_method_create(self, client: Cloudflare) -> None:
"this-is-my-project-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(PagesDeployments, deployment, path=["response"])
+ assert_matches_type(Deployment, deployment, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -35,7 +35,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
branch="staging",
)
- assert_matches_type(PagesDeployments, deployment, path=["response"])
+ assert_matches_type(Deployment, deployment, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -48,7 +48,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = response.parse()
- assert_matches_type(PagesDeployments, deployment, path=["response"])
+ assert_matches_type(Deployment, deployment, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -61,7 +61,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = response.parse()
- assert_matches_type(PagesDeployments, deployment, path=["response"])
+ assert_matches_type(Deployment, deployment, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -87,7 +87,7 @@ def test_method_list(self, client: Cloudflare) -> None:
"this-is-my-project-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(SyncSinglePage[PagesDeployments], deployment, path=["response"])
+ assert_matches_type(SyncSinglePage[Deployment], deployment, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -97,7 +97,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
env="preview",
)
- assert_matches_type(SyncSinglePage[PagesDeployments], deployment, path=["response"])
+ assert_matches_type(SyncSinglePage[Deployment], deployment, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -110,7 +110,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = response.parse()
- assert_matches_type(SyncSinglePage[PagesDeployments], deployment, path=["response"])
+ assert_matches_type(SyncSinglePage[Deployment], deployment, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -123,7 +123,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = response.parse()
- assert_matches_type(SyncSinglePage[PagesDeployments], deployment, path=["response"])
+ assert_matches_type(SyncSinglePage[Deployment], deployment, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -220,7 +220,7 @@ def test_method_get(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
project_name="this-is-my-project-01",
)
- assert_matches_type(PagesDeployments, deployment, path=["response"])
+ assert_matches_type(Deployment, deployment, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -234,7 +234,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = response.parse()
- assert_matches_type(PagesDeployments, deployment, path=["response"])
+ assert_matches_type(Deployment, deployment, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -248,7 +248,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = response.parse()
- assert_matches_type(PagesDeployments, deployment, path=["response"])
+ assert_matches_type(Deployment, deployment, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -285,7 +285,7 @@ def test_method_retry(self, client: Cloudflare) -> None:
project_name="this-is-my-project-01",
body={},
)
- assert_matches_type(PagesDeployments, deployment, path=["response"])
+ assert_matches_type(Deployment, deployment, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -300,7 +300,7 @@ def test_raw_response_retry(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = response.parse()
- assert_matches_type(PagesDeployments, deployment, path=["response"])
+ assert_matches_type(Deployment, deployment, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -315,7 +315,7 @@ def test_streaming_response_retry(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = response.parse()
- assert_matches_type(PagesDeployments, deployment, path=["response"])
+ assert_matches_type(Deployment, deployment, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -355,7 +355,7 @@ def test_method_rollback(self, client: Cloudflare) -> None:
project_name="this-is-my-project-01",
body={},
)
- assert_matches_type(PagesDeployments, deployment, path=["response"])
+ assert_matches_type(Deployment, deployment, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -370,7 +370,7 @@ def test_raw_response_rollback(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = response.parse()
- assert_matches_type(PagesDeployments, deployment, path=["response"])
+ assert_matches_type(Deployment, deployment, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -385,7 +385,7 @@ def test_streaming_response_rollback(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = response.parse()
- assert_matches_type(PagesDeployments, deployment, path=["response"])
+ assert_matches_type(Deployment, deployment, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -427,7 +427,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
"this-is-my-project-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(PagesDeployments, deployment, path=["response"])
+ assert_matches_type(Deployment, deployment, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -437,7 +437,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
account_id="023e105f4ecef8ad9ca31a8372d0c353",
branch="staging",
)
- assert_matches_type(PagesDeployments, deployment, path=["response"])
+ assert_matches_type(Deployment, deployment, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -450,7 +450,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = await response.parse()
- assert_matches_type(PagesDeployments, deployment, path=["response"])
+ assert_matches_type(Deployment, deployment, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -463,7 +463,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = await response.parse()
- assert_matches_type(PagesDeployments, deployment, path=["response"])
+ assert_matches_type(Deployment, deployment, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -489,7 +489,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
"this-is-my-project-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(AsyncSinglePage[PagesDeployments], deployment, path=["response"])
+ assert_matches_type(AsyncSinglePage[Deployment], deployment, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -499,7 +499,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
account_id="023e105f4ecef8ad9ca31a8372d0c353",
env="preview",
)
- assert_matches_type(AsyncSinglePage[PagesDeployments], deployment, path=["response"])
+ assert_matches_type(AsyncSinglePage[Deployment], deployment, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -512,7 +512,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = await response.parse()
- assert_matches_type(AsyncSinglePage[PagesDeployments], deployment, path=["response"])
+ assert_matches_type(AsyncSinglePage[Deployment], deployment, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -525,7 +525,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = await response.parse()
- assert_matches_type(AsyncSinglePage[PagesDeployments], deployment, path=["response"])
+ assert_matches_type(AsyncSinglePage[Deployment], deployment, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -622,7 +622,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
project_name="this-is-my-project-01",
)
- assert_matches_type(PagesDeployments, deployment, path=["response"])
+ assert_matches_type(Deployment, deployment, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -636,7 +636,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = await response.parse()
- assert_matches_type(PagesDeployments, deployment, path=["response"])
+ assert_matches_type(Deployment, deployment, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -650,7 +650,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = await response.parse()
- assert_matches_type(PagesDeployments, deployment, path=["response"])
+ assert_matches_type(Deployment, deployment, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -687,7 +687,7 @@ async def test_method_retry(self, async_client: AsyncCloudflare) -> None:
project_name="this-is-my-project-01",
body={},
)
- assert_matches_type(PagesDeployments, deployment, path=["response"])
+ assert_matches_type(Deployment, deployment, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -702,7 +702,7 @@ async def test_raw_response_retry(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = await response.parse()
- assert_matches_type(PagesDeployments, deployment, path=["response"])
+ assert_matches_type(Deployment, deployment, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -717,7 +717,7 @@ async def test_streaming_response_retry(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = await response.parse()
- assert_matches_type(PagesDeployments, deployment, path=["response"])
+ assert_matches_type(Deployment, deployment, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -757,7 +757,7 @@ async def test_method_rollback(self, async_client: AsyncCloudflare) -> None:
project_name="this-is-my-project-01",
body={},
)
- assert_matches_type(PagesDeployments, deployment, path=["response"])
+ assert_matches_type(Deployment, deployment, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -772,7 +772,7 @@ async def test_raw_response_rollback(self, async_client: AsyncCloudflare) -> Non
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = await response.parse()
- assert_matches_type(PagesDeployments, deployment, path=["response"])
+ assert_matches_type(Deployment, deployment, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -787,7 +787,7 @@ async def test_streaming_response_rollback(self, async_client: AsyncCloudflare)
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
deployment = await response.parse()
- assert_matches_type(PagesDeployments, deployment, path=["response"])
+ assert_matches_type(Deployment, deployment, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/pages/test_projects.py b/tests/api_resources/pages/test_projects.py
index 18039cb30883..7bb79499027a 100644
--- a/tests/api_resources/pages/test_projects.py
+++ b/tests/api_resources/pages/test_projects.py
@@ -11,8 +11,8 @@
from tests.utils import assert_matches_type
from cloudflare.pagination import SyncSinglePage, AsyncSinglePage
from cloudflare.types.pages import (
- PagesProjects,
- PagesDeployments,
+ Project,
+ Deployment,
)
from cloudflare.types.shared import UnnamedSchemaRef65e3c8c1a9c4638ec25cdbbaca7165c1
@@ -150,7 +150,7 @@ def test_method_list(self, client: Cloudflare) -> None:
project = client.pages.projects.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(SyncSinglePage[PagesDeployments], project, path=["response"])
+ assert_matches_type(SyncSinglePage[Deployment], project, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -162,7 +162,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
project = response.parse()
- assert_matches_type(SyncSinglePage[PagesDeployments], project, path=["response"])
+ assert_matches_type(SyncSinglePage[Deployment], project, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -174,7 +174,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
project = response.parse()
- assert_matches_type(SyncSinglePage[PagesDeployments], project, path=["response"])
+ assert_matches_type(SyncSinglePage[Deployment], project, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -382,7 +382,7 @@ def test_method_get(self, client: Cloudflare) -> None:
"this-is-my-project-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(PagesProjects, project, path=["response"])
+ assert_matches_type(Project, project, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -395,7 +395,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
project = response.parse()
- assert_matches_type(PagesProjects, project, path=["response"])
+ assert_matches_type(Project, project, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -408,7 +408,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
project = response.parse()
- assert_matches_type(PagesProjects, project, path=["response"])
+ assert_matches_type(Project, project, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -611,7 +611,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
project = await async_client.pages.projects.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(AsyncSinglePage[PagesDeployments], project, path=["response"])
+ assert_matches_type(AsyncSinglePage[Deployment], project, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -623,7 +623,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
project = await response.parse()
- assert_matches_type(AsyncSinglePage[PagesDeployments], project, path=["response"])
+ assert_matches_type(AsyncSinglePage[Deployment], project, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -635,7 +635,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
project = await response.parse()
- assert_matches_type(AsyncSinglePage[PagesDeployments], project, path=["response"])
+ assert_matches_type(AsyncSinglePage[Deployment], project, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -843,7 +843,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
"this-is-my-project-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(PagesProjects, project, path=["response"])
+ assert_matches_type(Project, project, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -856,7 +856,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
project = await response.parse()
- assert_matches_type(PagesProjects, project, path=["response"])
+ assert_matches_type(Project, project, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -869,7 +869,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
project = await response.parse()
- assert_matches_type(PagesProjects, project, path=["response"])
+ assert_matches_type(Project, project, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/workers/scripts/test_content.py b/tests/api_resources/workers/scripts/test_content.py
index 2bbce51cfa3e..874362e56bdb 100644
--- a/tests/api_resources/workers/scripts/test_content.py
+++ b/tests/api_resources/workers/scripts/test_content.py
@@ -9,7 +9,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.types.workers import WorkersScript
+from cloudflare.types.workers import Script
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -24,7 +24,7 @@ def test_method_update(self, client: Cloudflare) -> None:
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(WorkersScript, content, path=["response"])
+ assert_matches_type(Script, content, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -38,7 +38,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
"main_module": "worker.js",
},
)
- assert_matches_type(WorkersScript, content, path=["response"])
+ assert_matches_type(Script, content, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -51,7 +51,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
content = response.parse()
- assert_matches_type(WorkersScript, content, path=["response"])
+ assert_matches_type(Script, content, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -64,7 +64,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
content = response.parse()
- assert_matches_type(WorkersScript, content, path=["response"])
+ assert_matches_type(Script, content, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -94,7 +94,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(WorkersScript, content, path=["response"])
+ assert_matches_type(Script, content, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -108,7 +108,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
"main_module": "worker.js",
},
)
- assert_matches_type(WorkersScript, content, path=["response"])
+ assert_matches_type(Script, content, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -121,7 +121,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
content = await response.parse()
- assert_matches_type(WorkersScript, content, path=["response"])
+ assert_matches_type(Script, content, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -134,7 +134,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
content = await response.parse()
- assert_matches_type(WorkersScript, content, path=["response"])
+ assert_matches_type(Script, content, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/workers/scripts/test_settings.py b/tests/api_resources/workers/scripts/test_settings.py
index 930984b7949e..324015fc81ed 100644
--- a/tests/api_resources/workers/scripts/test_settings.py
+++ b/tests/api_resources/workers/scripts/test_settings.py
@@ -9,7 +9,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.types.workers.scripts import SettingGetResponse, SettingEditResponse
+from cloudflare.types.workers import SettingsItem
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None:
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(SettingEditResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -51,7 +51,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
},
],
)
- assert_matches_type(SettingEditResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -64,7 +64,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
setting = response.parse()
- assert_matches_type(SettingEditResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -77,7 +77,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
setting = response.parse()
- assert_matches_type(SettingEditResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -103,7 +103,7 @@ def test_method_get(self, client: Cloudflare) -> None:
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(SettingGetResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -116,7 +116,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
setting = response.parse()
- assert_matches_type(SettingGetResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -129,7 +129,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
setting = response.parse()
- assert_matches_type(SettingGetResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -159,7 +159,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(SettingEditResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -186,7 +186,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
},
],
)
- assert_matches_type(SettingEditResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -199,7 +199,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
setting = await response.parse()
- assert_matches_type(SettingEditResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -212,7 +212,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
setting = await response.parse()
- assert_matches_type(SettingEditResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -238,7 +238,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(SettingGetResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -251,7 +251,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
setting = await response.parse()
- assert_matches_type(SettingGetResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -264,7 +264,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
setting = await response.parse()
- assert_matches_type(SettingGetResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/workers/services/environments/test_content.py b/tests/api_resources/workers/services/environments/test_content.py
index 48d8d171dd48..c4bd05f1a8dd 100644
--- a/tests/api_resources/workers/services/environments/test_content.py
+++ b/tests/api_resources/workers/services/environments/test_content.py
@@ -17,7 +17,7 @@
StreamedBinaryAPIResponse,
AsyncStreamedBinaryAPIResponse,
)
-from cloudflare.types.workers import WorkersScript
+from cloudflare.types.workers import Script
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -33,7 +33,7 @@ def test_method_update(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
service_name="my-worker",
)
- assert_matches_type(WorkersScript, content, path=["response"])
+ assert_matches_type(Script, content, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -48,7 +48,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
"main_module": "worker.js",
},
)
- assert_matches_type(WorkersScript, content, path=["response"])
+ assert_matches_type(Script, content, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -62,7 +62,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
content = response.parse()
- assert_matches_type(WorkersScript, content, path=["response"])
+ assert_matches_type(Script, content, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -76,7 +76,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
content = response.parse()
- assert_matches_type(WorkersScript, content, path=["response"])
+ assert_matches_type(Script, content, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -198,7 +198,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
service_name="my-worker",
)
- assert_matches_type(WorkersScript, content, path=["response"])
+ assert_matches_type(Script, content, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -213,7 +213,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
"main_module": "worker.js",
},
)
- assert_matches_type(WorkersScript, content, path=["response"])
+ assert_matches_type(Script, content, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -227,7 +227,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
content = await response.parse()
- assert_matches_type(WorkersScript, content, path=["response"])
+ assert_matches_type(Script, content, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -241,7 +241,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
content = await response.parse()
- assert_matches_type(WorkersScript, content, path=["response"])
+ assert_matches_type(Script, content, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/workers/services/environments/test_settings.py b/tests/api_resources/workers/services/environments/test_settings.py
index 6787c041e5fe..1c0e82365a8c 100644
--- a/tests/api_resources/workers/services/environments/test_settings.py
+++ b/tests/api_resources/workers/services/environments/test_settings.py
@@ -9,7 +9,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.types.workers.services.environments import SettingGetResponse, SettingEditResponse
+from cloudflare.types.workers import SettingsItem
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -55,7 +55,7 @@ def test_method_edit(self, client: Cloudflare) -> None:
result={},
success=True,
)
- assert_matches_type(SettingEditResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -114,7 +114,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
},
success=True,
)
- assert_matches_type(SettingEditResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -158,7 +158,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
setting = response.parse()
- assert_matches_type(SettingEditResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -202,7 +202,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
setting = response.parse()
- assert_matches_type(SettingEditResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -328,7 +328,7 @@ def test_method_get(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
service_name="my-worker",
)
- assert_matches_type(SettingGetResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -342,7 +342,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
setting = response.parse()
- assert_matches_type(SettingGetResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -356,7 +356,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
setting = response.parse()
- assert_matches_type(SettingGetResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -426,7 +426,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
result={},
success=True,
)
- assert_matches_type(SettingEditResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -485,7 +485,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
},
success=True,
)
- assert_matches_type(SettingEditResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -529,7 +529,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
setting = await response.parse()
- assert_matches_type(SettingEditResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -573,7 +573,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
setting = await response.parse()
- assert_matches_type(SettingEditResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -699,7 +699,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
service_name="my-worker",
)
- assert_matches_type(SettingGetResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -713,7 +713,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
setting = await response.parse()
- assert_matches_type(SettingGetResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -727,7 +727,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
setting = await response.parse()
- assert_matches_type(SettingGetResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/workers/test_scripts.py b/tests/api_resources/workers/test_scripts.py
index 79f625fb8270..061c2550d833 100644
--- a/tests/api_resources/workers/test_scripts.py
+++ b/tests/api_resources/workers/test_scripts.py
@@ -18,7 +18,7 @@
AsyncStreamedBinaryAPIResponse,
)
from cloudflare.pagination import SyncSinglePage, AsyncSinglePage
-from cloudflare.types.workers import WorkersScript
+from cloudflare.types.workers import Script
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -33,7 +33,7 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None:
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -117,7 +117,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N
"version_tags": {},
},
)
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -130,7 +130,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
script = response.parse()
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -143,7 +143,7 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
script = response.parse()
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -169,7 +169,7 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None:
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -180,7 +180,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N
rollback_to="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
message="string",
)
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -193,7 +193,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
script = response.parse()
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -206,7 +206,7 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
script = response.parse()
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -231,7 +231,7 @@ def test_method_list(self, client: Cloudflare) -> None:
script = client.workers.scripts.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(SyncSinglePage[WorkersScript], script, path=["response"])
+ assert_matches_type(SyncSinglePage[Script], script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -243,7 +243,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
script = response.parse()
- assert_matches_type(SyncSinglePage[WorkersScript], script, path=["response"])
+ assert_matches_type(SyncSinglePage[Script], script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -255,7 +255,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
script = response.parse()
- assert_matches_type(SyncSinglePage[WorkersScript], script, path=["response"])
+ assert_matches_type(SyncSinglePage[Script], script, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -416,7 +416,7 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) ->
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -500,7 +500,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn
"version_tags": {},
},
)
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -513,7 +513,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
script = await response.parse()
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -526,7 +526,7 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
script = await response.parse()
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -552,7 +552,7 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) ->
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -563,7 +563,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn
rollback_to="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
message="string",
)
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -576,7 +576,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
script = await response.parse()
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -589,7 +589,7 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
script = await response.parse()
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -614,7 +614,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
script = await async_client.workers.scripts.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(AsyncSinglePage[WorkersScript], script, path=["response"])
+ assert_matches_type(AsyncSinglePage[Script], script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -626,7 +626,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
script = await response.parse()
- assert_matches_type(AsyncSinglePage[WorkersScript], script, path=["response"])
+ assert_matches_type(AsyncSinglePage[Script], script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -638,7 +638,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
script = await response.parse()
- assert_matches_type(AsyncSinglePage[WorkersScript], script, path=["response"])
+ assert_matches_type(AsyncSinglePage[Script], script, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py
index e11447ac29af..43663655eb0e 100644
--- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py
+++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py
@@ -9,7 +9,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts import BindingGetResponse
+from cloudflare.types import Binding
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -25,7 +25,7 @@ def test_method_get(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
)
- assert_matches_type(BindingGetResponse, binding, path=["response"])
+ assert_matches_type(Binding, binding, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -39,7 +39,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
binding = response.parse()
- assert_matches_type(BindingGetResponse, binding, path=["response"])
+ assert_matches_type(Binding, binding, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -53,7 +53,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
binding = response.parse()
- assert_matches_type(BindingGetResponse, binding, path=["response"])
+ assert_matches_type(Binding, binding, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -93,7 +93,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
)
- assert_matches_type(BindingGetResponse, binding, path=["response"])
+ assert_matches_type(Binding, binding, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -107,7 +107,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
binding = await response.parse()
- assert_matches_type(BindingGetResponse, binding, path=["response"])
+ assert_matches_type(Binding, binding, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -121,7 +121,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
binding = await response.parse()
- assert_matches_type(BindingGetResponse, binding, path=["response"])
+ assert_matches_type(Binding, binding, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py
index 2044f5b05b88..8f4137753e6c 100644
--- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py
+++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py
@@ -17,7 +17,7 @@
StreamedBinaryAPIResponse,
AsyncStreamedBinaryAPIResponse,
)
-from cloudflare.types.workers import WorkersScript
+from cloudflare.types.workers import Script
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -33,7 +33,7 @@ def test_method_update(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
)
- assert_matches_type(WorkersScript, content, path=["response"])
+ assert_matches_type(Script, content, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -48,7 +48,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
"main_module": "worker.js",
},
)
- assert_matches_type(WorkersScript, content, path=["response"])
+ assert_matches_type(Script, content, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -62,7 +62,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
content = response.parse()
- assert_matches_type(WorkersScript, content, path=["response"])
+ assert_matches_type(Script, content, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -76,7 +76,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
content = response.parse()
- assert_matches_type(WorkersScript, content, path=["response"])
+ assert_matches_type(Script, content, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -198,7 +198,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
)
- assert_matches_type(WorkersScript, content, path=["response"])
+ assert_matches_type(Script, content, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -213,7 +213,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
"main_module": "worker.js",
},
)
- assert_matches_type(WorkersScript, content, path=["response"])
+ assert_matches_type(Script, content, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -229,7 +229,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
content = await response.parse()
- assert_matches_type(WorkersScript, content, path=["response"])
+ assert_matches_type(Script, content, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -243,7 +243,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
content = await response.parse()
- assert_matches_type(WorkersScript, content, path=["response"])
+ assert_matches_type(Script, content, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py
index 0fac573644a1..e96c7fa94a6d 100644
--- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py
+++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py
@@ -9,10 +9,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts import (
- SettingGetResponse,
- SettingEditResponse,
-)
+from cloudflare.types.workers import SettingsItem
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -58,7 +55,7 @@ def test_method_edit(self, client: Cloudflare) -> None:
result={},
success=True,
)
- assert_matches_type(SettingEditResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -117,7 +114,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
},
success=True,
)
- assert_matches_type(SettingEditResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -161,7 +158,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
setting = response.parse()
- assert_matches_type(SettingEditResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -205,7 +202,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
setting = response.parse()
- assert_matches_type(SettingEditResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -331,7 +328,7 @@ def test_method_get(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
)
- assert_matches_type(SettingGetResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -345,7 +342,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
setting = response.parse()
- assert_matches_type(SettingGetResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -359,7 +356,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
setting = response.parse()
- assert_matches_type(SettingGetResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -429,7 +426,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
result={},
success=True,
)
- assert_matches_type(SettingEditResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -488,7 +485,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
},
success=True,
)
- assert_matches_type(SettingEditResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -532,7 +529,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
setting = await response.parse()
- assert_matches_type(SettingEditResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -576,7 +573,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
setting = await response.parse()
- assert_matches_type(SettingEditResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -702,7 +699,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
)
- assert_matches_type(SettingGetResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -716,7 +713,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
setting = await response.parse()
- assert_matches_type(SettingGetResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -730,7 +727,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
setting = await response.parse()
- assert_matches_type(SettingGetResponse, setting, path=["response"])
+ assert_matches_type(SettingsItem, setting, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py
index 547f784caae5..aa92c8bb35f2 100644
--- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py
+++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py
@@ -9,7 +9,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.types.workers import WorkersScript
+from cloudflare.types.workers import Script
from cloudflare.types.workers_for_platforms.dispatch.namespaces import (
WorkersForPlatformsNamespaceScript,
)
@@ -28,7 +28,7 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
)
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -112,7 +112,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N
"version_tags": {},
},
)
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -126,7 +126,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
script = response.parse()
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -140,7 +140,7 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
script = response.parse()
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -176,7 +176,7 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
)
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -187,7 +187,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N
dispatch_namespace="my-dispatch-namespace",
message="string",
)
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -201,7 +201,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
script = response.parse()
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -215,7 +215,7 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
script = response.parse()
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -401,7 +401,7 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) ->
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
)
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -485,7 +485,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn
"version_tags": {},
},
)
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -499,7 +499,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
script = await response.parse()
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -513,7 +513,7 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
script = await response.parse()
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -549,7 +549,7 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) ->
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
)
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -560,7 +560,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn
dispatch_namespace="my-dispatch-namespace",
message="string",
)
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -574,7 +574,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
script = await response.parse()
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -588,7 +588,7 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
script = await response.parse()
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(Script, script, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/zero_trust/dlp/datasets/test_upload.py b/tests/api_resources/zero_trust/dlp/datasets/test_upload.py
index f2da3760ce17..073f054e4693 100644
--- a/tests/api_resources/zero_trust/dlp/datasets/test_upload.py
+++ b/tests/api_resources/zero_trust/dlp/datasets/test_upload.py
@@ -9,8 +9,8 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.types.zero_trust.dlp import DLPDataset
-from cloudflare.types.zero_trust.dlp.datasets import DLPDatasetNewVersion
+from cloudflare.types.zero_trust.dlp import Dataset
+from cloudflare.types.zero_trust.dlp.datasets import NewVersion
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -25,7 +25,7 @@ def test_method_create(self, client: Cloudflare) -> None:
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="string",
)
- assert_matches_type(Optional[DLPDatasetNewVersion], upload, path=["response"])
+ assert_matches_type(Optional[NewVersion], upload, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -38,7 +38,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
upload = response.parse()
- assert_matches_type(Optional[DLPDatasetNewVersion], upload, path=["response"])
+ assert_matches_type(Optional[NewVersion], upload, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -51,7 +51,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
upload = response.parse()
- assert_matches_type(Optional[DLPDatasetNewVersion], upload, path=["response"])
+ assert_matches_type(Optional[NewVersion], upload, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -79,7 +79,7 @@ def test_method_edit(self, client: Cloudflare) -> None:
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
body={},
)
- assert_matches_type(Optional[DLPDataset], upload, path=["response"])
+ assert_matches_type(Optional[Dataset], upload, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -94,7 +94,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
upload = response.parse()
- assert_matches_type(Optional[DLPDataset], upload, path=["response"])
+ assert_matches_type(Optional[Dataset], upload, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -109,7 +109,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
upload = response.parse()
- assert_matches_type(Optional[DLPDataset], upload, path=["response"])
+ assert_matches_type(Optional[Dataset], upload, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -143,7 +143,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="string",
)
- assert_matches_type(Optional[DLPDatasetNewVersion], upload, path=["response"])
+ assert_matches_type(Optional[NewVersion], upload, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -156,7 +156,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
upload = await response.parse()
- assert_matches_type(Optional[DLPDatasetNewVersion], upload, path=["response"])
+ assert_matches_type(Optional[NewVersion], upload, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -169,7 +169,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
upload = await response.parse()
- assert_matches_type(Optional[DLPDatasetNewVersion], upload, path=["response"])
+ assert_matches_type(Optional[NewVersion], upload, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -197,7 +197,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
body={},
)
- assert_matches_type(Optional[DLPDataset], upload, path=["response"])
+ assert_matches_type(Optional[Dataset], upload, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -212,7 +212,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
upload = await response.parse()
- assert_matches_type(Optional[DLPDataset], upload, path=["response"])
+ assert_matches_type(Optional[Dataset], upload, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -227,7 +227,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
upload = await response.parse()
- assert_matches_type(Optional[DLPDataset], upload, path=["response"])
+ assert_matches_type(Optional[Dataset], upload, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/zero_trust/dlp/test_datasets.py b/tests/api_resources/zero_trust/dlp/test_datasets.py
index 6a9e3a59c4e1..c6a79798a4d5 100644
--- a/tests/api_resources/zero_trust/dlp/test_datasets.py
+++ b/tests/api_resources/zero_trust/dlp/test_datasets.py
@@ -10,7 +10,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
from cloudflare.pagination import SyncSinglePage, AsyncSinglePage
-from cloudflare.types.zero_trust.dlp import DLPDataset, DLPDatasetCreation
+from cloudflare.types.zero_trust.dlp import Dataset, DatasetCreation
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -25,7 +25,7 @@ def test_method_create(self, client: Cloudflare) -> None:
account_id="string",
name="string",
)
- assert_matches_type(Optional[DLPDatasetCreation], dataset, path=["response"])
+ assert_matches_type(Optional[DatasetCreation], dataset, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -36,7 +36,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
description="string",
secret=True,
)
- assert_matches_type(Optional[DLPDatasetCreation], dataset, path=["response"])
+ assert_matches_type(Optional[DatasetCreation], dataset, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -49,7 +49,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
dataset = response.parse()
- assert_matches_type(Optional[DLPDatasetCreation], dataset, path=["response"])
+ assert_matches_type(Optional[DatasetCreation], dataset, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -62,7 +62,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
dataset = response.parse()
- assert_matches_type(Optional[DLPDatasetCreation], dataset, path=["response"])
+ assert_matches_type(Optional[DatasetCreation], dataset, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -82,7 +82,7 @@ def test_method_update(self, client: Cloudflare) -> None:
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="string",
)
- assert_matches_type(Optional[DLPDataset], dataset, path=["response"])
+ assert_matches_type(Optional[Dataset], dataset, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -93,7 +93,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
description="string",
name="string",
)
- assert_matches_type(Optional[DLPDataset], dataset, path=["response"])
+ assert_matches_type(Optional[Dataset], dataset, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -106,7 +106,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
dataset = response.parse()
- assert_matches_type(Optional[DLPDataset], dataset, path=["response"])
+ assert_matches_type(Optional[Dataset], dataset, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -119,7 +119,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
dataset = response.parse()
- assert_matches_type(Optional[DLPDataset], dataset, path=["response"])
+ assert_matches_type(Optional[Dataset], dataset, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -144,7 +144,7 @@ def test_method_list(self, client: Cloudflare) -> None:
dataset = client.zero_trust.dlp.datasets.list(
account_id="string",
)
- assert_matches_type(SyncSinglePage[DLPDataset], dataset, path=["response"])
+ assert_matches_type(SyncSinglePage[Dataset], dataset, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -156,7 +156,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
dataset = response.parse()
- assert_matches_type(SyncSinglePage[DLPDataset], dataset, path=["response"])
+ assert_matches_type(SyncSinglePage[Dataset], dataset, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -168,7 +168,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
dataset = response.parse()
- assert_matches_type(SyncSinglePage[DLPDataset], dataset, path=["response"])
+ assert_matches_type(SyncSinglePage[Dataset], dataset, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -239,7 +239,7 @@ def test_method_get(self, client: Cloudflare) -> None:
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="string",
)
- assert_matches_type(Optional[DLPDataset], dataset, path=["response"])
+ assert_matches_type(Optional[Dataset], dataset, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -252,7 +252,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
dataset = response.parse()
- assert_matches_type(Optional[DLPDataset], dataset, path=["response"])
+ assert_matches_type(Optional[Dataset], dataset, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -265,7 +265,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
dataset = response.parse()
- assert_matches_type(Optional[DLPDataset], dataset, path=["response"])
+ assert_matches_type(Optional[Dataset], dataset, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -295,7 +295,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
account_id="string",
name="string",
)
- assert_matches_type(Optional[DLPDatasetCreation], dataset, path=["response"])
+ assert_matches_type(Optional[DatasetCreation], dataset, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -306,7 +306,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
description="string",
secret=True,
)
- assert_matches_type(Optional[DLPDatasetCreation], dataset, path=["response"])
+ assert_matches_type(Optional[DatasetCreation], dataset, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -319,7 +319,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
dataset = await response.parse()
- assert_matches_type(Optional[DLPDatasetCreation], dataset, path=["response"])
+ assert_matches_type(Optional[DatasetCreation], dataset, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -332,7 +332,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
dataset = await response.parse()
- assert_matches_type(Optional[DLPDatasetCreation], dataset, path=["response"])
+ assert_matches_type(Optional[DatasetCreation], dataset, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -352,7 +352,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="string",
)
- assert_matches_type(Optional[DLPDataset], dataset, path=["response"])
+ assert_matches_type(Optional[Dataset], dataset, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -363,7 +363,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
description="string",
name="string",
)
- assert_matches_type(Optional[DLPDataset], dataset, path=["response"])
+ assert_matches_type(Optional[Dataset], dataset, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -376,7 +376,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
dataset = await response.parse()
- assert_matches_type(Optional[DLPDataset], dataset, path=["response"])
+ assert_matches_type(Optional[Dataset], dataset, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -389,7 +389,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
dataset = await response.parse()
- assert_matches_type(Optional[DLPDataset], dataset, path=["response"])
+ assert_matches_type(Optional[Dataset], dataset, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -414,7 +414,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
dataset = await async_client.zero_trust.dlp.datasets.list(
account_id="string",
)
- assert_matches_type(AsyncSinglePage[DLPDataset], dataset, path=["response"])
+ assert_matches_type(AsyncSinglePage[Dataset], dataset, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -426,7 +426,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
dataset = await response.parse()
- assert_matches_type(AsyncSinglePage[DLPDataset], dataset, path=["response"])
+ assert_matches_type(AsyncSinglePage[Dataset], dataset, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -438,7 +438,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
dataset = await response.parse()
- assert_matches_type(AsyncSinglePage[DLPDataset], dataset, path=["response"])
+ assert_matches_type(AsyncSinglePage[Dataset], dataset, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -509,7 +509,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="string",
)
- assert_matches_type(Optional[DLPDataset], dataset, path=["response"])
+ assert_matches_type(Optional[Dataset], dataset, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -522,7 +522,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
dataset = await response.parse()
- assert_matches_type(Optional[DLPDataset], dataset, path=["response"])
+ assert_matches_type(Optional[Dataset], dataset, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -535,7 +535,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
dataset = await response.parse()
- assert_matches_type(Optional[DLPDataset], dataset, path=["response"])
+ assert_matches_type(Optional[Dataset], dataset, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/zero_trust/test_tunnels.py b/tests/api_resources/zero_trust/test_tunnels.py
index 93eaaf4ba122..dce25a722209 100644
--- a/tests/api_resources/zero_trust/test_tunnels.py
+++ b/tests/api_resources/zero_trust/test_tunnels.py
@@ -13,7 +13,7 @@
from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
from cloudflare.types.shared import UnnamedSchemaRef413ab4522f0bb93f63444799121fe2f8
from cloudflare.types.zero_trust import (
- TunnelArgoTunnel,
+ Tunnel,
)
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -30,7 +30,7 @@ def test_method_create(self, client: Cloudflare) -> None:
name="blog",
tunnel_secret={},
)
- assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"])
+ assert_matches_type(Tunnel, tunnel, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -44,7 +44,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tunnel = response.parse()
- assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"])
+ assert_matches_type(Tunnel, tunnel, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -58,7 +58,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tunnel = response.parse()
- assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"])
+ assert_matches_type(Tunnel, tunnel, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -149,7 +149,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
account_id="699d98642c564d2e855e9661899b7252",
body={},
)
- assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"])
+ assert_matches_type(Tunnel, tunnel, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -163,7 +163,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tunnel = response.parse()
- assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"])
+ assert_matches_type(Tunnel, tunnel, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -177,7 +177,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tunnel = response.parse()
- assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"])
+ assert_matches_type(Tunnel, tunnel, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -268,7 +268,7 @@ def test_method_get(self, client: Cloudflare) -> None:
"f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
account_id="699d98642c564d2e855e9661899b7252",
)
- assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"])
+ assert_matches_type(Tunnel, tunnel, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -281,7 +281,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tunnel = response.parse()
- assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"])
+ assert_matches_type(Tunnel, tunnel, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -294,7 +294,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tunnel = response.parse()
- assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"])
+ assert_matches_type(Tunnel, tunnel, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -325,7 +325,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
name="blog",
tunnel_secret={},
)
- assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"])
+ assert_matches_type(Tunnel, tunnel, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -339,7 +339,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tunnel = await response.parse()
- assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"])
+ assert_matches_type(Tunnel, tunnel, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -353,7 +353,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tunnel = await response.parse()
- assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"])
+ assert_matches_type(Tunnel, tunnel, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -444,7 +444,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
account_id="699d98642c564d2e855e9661899b7252",
body={},
)
- assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"])
+ assert_matches_type(Tunnel, tunnel, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -458,7 +458,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tunnel = await response.parse()
- assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"])
+ assert_matches_type(Tunnel, tunnel, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -472,7 +472,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tunnel = await response.parse()
- assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"])
+ assert_matches_type(Tunnel, tunnel, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -563,7 +563,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
"f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
account_id="699d98642c564d2e855e9661899b7252",
)
- assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"])
+ assert_matches_type(Tunnel, tunnel, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -576,7 +576,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tunnel = await response.parse()
- assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"])
+ assert_matches_type(Tunnel, tunnel, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -589,7 +589,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tunnel = await response.parse()
- assert_matches_type(TunnelArgoTunnel, tunnel, path=["response"])
+ assert_matches_type(Tunnel, tunnel, path=["response"])
assert cast(Any, response.is_closed) is True