diff --git a/api.md b/api.md index c6b33370fb6..f9f5281fff1 100644 --- a/api.md +++ b/api.md @@ -9,6 +9,7 @@ from cloudflare.types import ( PaginationInfo, ResponseInfo, Result, + Tunnel, ) ``` @@ -3042,7 +3043,7 @@ from cloudflare.types.rulesets import ( ChallengeRule, CompressResponseRule, ExecuteRule, - JsChallengeRule, + JSChallengeRule, LogRule, Logging, ManagedChallengeRule, @@ -4595,13 +4596,12 @@ Methods: - client.r2.sippy.delete(bucket_name, \*, account_id) -> SippyDeleteResponse - client.r2.sippy.get(bucket_name, \*, account_id) -> Sippy -# WARPConnectorResource +# WARPConnector Types: ```python from cloudflare.types import ( - WARPConnector, WARPConnectorCreateResponse, WARPConnectorListResponse, WARPConnectorDeleteResponse, @@ -5465,7 +5465,6 @@ Types: ```python from cloudflare.types.zero_trust import ( Connection, - Tunnel, TunnelCreateResponse, TunnelListResponse, TunnelDeleteResponse, diff --git a/src/cloudflare/_client.py b/src/cloudflare/_client.py index d85574035e0..000dc7fe45a 100644 --- a/src/cloudflare/_client.py +++ b/src/cloudflare/_client.py @@ -110,7 +110,7 @@ class Cloudflare(SyncAPIClient): alerting: resources.Alerting d1: resources.D1Resource r2: resources.R2 - warp_connector: resources.WARPConnectorResource + warp_connector: resources.WARPConnector workers_for_platforms: resources.WorkersForPlatforms zero_trust: resources.ZeroTrust challenges: resources.Challenges @@ -265,7 +265,7 @@ def __init__( self.alerting = resources.Alerting(self) self.d1 = resources.D1Resource(self) self.r2 = resources.R2(self) - self.warp_connector = resources.WARPConnectorResource(self) + self.warp_connector = resources.WARPConnector(self) self.workers_for_platforms = resources.WorkersForPlatforms(self) self.zero_trust = resources.ZeroTrust(self) self.challenges = resources.Challenges(self) @@ -523,7 +523,7 @@ class AsyncCloudflare(AsyncAPIClient): alerting: resources.AsyncAlerting d1: resources.AsyncD1Resource r2: resources.AsyncR2 - warp_connector: resources.AsyncWARPConnectorResource + warp_connector: resources.AsyncWARPConnector workers_for_platforms: resources.AsyncWorkersForPlatforms zero_trust: resources.AsyncZeroTrust challenges: resources.AsyncChallenges @@ -678,7 +678,7 @@ def __init__( self.alerting = resources.AsyncAlerting(self) self.d1 = resources.AsyncD1Resource(self) self.r2 = resources.AsyncR2(self) - self.warp_connector = resources.AsyncWARPConnectorResource(self) + self.warp_connector = resources.AsyncWARPConnector(self) self.workers_for_platforms = resources.AsyncWorkersForPlatforms(self) self.zero_trust = resources.AsyncZeroTrust(self) self.challenges = resources.AsyncChallenges(self) @@ -937,7 +937,7 @@ def __init__(self, client: Cloudflare) -> None: self.alerting = resources.AlertingWithRawResponse(client.alerting) self.d1 = resources.D1ResourceWithRawResponse(client.d1) self.r2 = resources.R2WithRawResponse(client.r2) - self.warp_connector = resources.WARPConnectorResourceWithRawResponse(client.warp_connector) + self.warp_connector = resources.WARPConnectorWithRawResponse(client.warp_connector) self.workers_for_platforms = resources.WorkersForPlatformsWithRawResponse(client.workers_for_platforms) self.zero_trust = resources.ZeroTrustWithRawResponse(client.zero_trust) self.challenges = resources.ChallengesWithRawResponse(client.challenges) @@ -1027,7 +1027,7 @@ def __init__(self, client: AsyncCloudflare) -> None: self.alerting = resources.AsyncAlertingWithRawResponse(client.alerting) self.d1 = resources.AsyncD1ResourceWithRawResponse(client.d1) self.r2 = resources.AsyncR2WithRawResponse(client.r2) - self.warp_connector = resources.AsyncWARPConnectorResourceWithRawResponse(client.warp_connector) + self.warp_connector = resources.AsyncWARPConnectorWithRawResponse(client.warp_connector) self.workers_for_platforms = resources.AsyncWorkersForPlatformsWithRawResponse(client.workers_for_platforms) self.zero_trust = resources.AsyncZeroTrustWithRawResponse(client.zero_trust) self.challenges = resources.AsyncChallengesWithRawResponse(client.challenges) @@ -1117,7 +1117,7 @@ def __init__(self, client: Cloudflare) -> None: self.alerting = resources.AlertingWithStreamingResponse(client.alerting) self.d1 = resources.D1ResourceWithStreamingResponse(client.d1) self.r2 = resources.R2WithStreamingResponse(client.r2) - self.warp_connector = resources.WARPConnectorResourceWithStreamingResponse(client.warp_connector) + self.warp_connector = resources.WARPConnectorWithStreamingResponse(client.warp_connector) self.workers_for_platforms = resources.WorkersForPlatformsWithStreamingResponse(client.workers_for_platforms) self.zero_trust = resources.ZeroTrustWithStreamingResponse(client.zero_trust) self.challenges = resources.ChallengesWithStreamingResponse(client.challenges) @@ -1211,7 +1211,7 @@ def __init__(self, client: AsyncCloudflare) -> None: self.alerting = resources.AsyncAlertingWithStreamingResponse(client.alerting) self.d1 = resources.AsyncD1ResourceWithStreamingResponse(client.d1) self.r2 = resources.AsyncR2WithStreamingResponse(client.r2) - self.warp_connector = resources.AsyncWARPConnectorResourceWithStreamingResponse(client.warp_connector) + self.warp_connector = resources.AsyncWARPConnectorWithStreamingResponse(client.warp_connector) self.workers_for_platforms = resources.AsyncWorkersForPlatformsWithStreamingResponse( client.workers_for_platforms ) diff --git a/src/cloudflare/resources/__init__.py b/src/cloudflare/resources/__init__.py index 096d7cfd8ea..22875e389ef 100644 --- a/src/cloudflare/resources/__init__.py +++ b/src/cloudflare/resources/__init__.py @@ -497,12 +497,12 @@ AsyncLoadBalancersWithStreamingResponse, ) from .warp_connector import ( - WARPConnectorResource, - AsyncWARPConnectorResource, - WARPConnectorResourceWithRawResponse, - AsyncWARPConnectorResourceWithRawResponse, - WARPConnectorResourceWithStreamingResponse, - AsyncWARPConnectorResourceWithStreamingResponse, + WARPConnector, + AsyncWARPConnector, + WARPConnectorWithRawResponse, + AsyncWARPConnectorWithRawResponse, + WARPConnectorWithStreamingResponse, + AsyncWARPConnectorWithStreamingResponse, ) from .durable_objects import ( DurableObjects, @@ -1020,12 +1020,12 @@ "AsyncR2WithRawResponse", "R2WithStreamingResponse", "AsyncR2WithStreamingResponse", - "WARPConnectorResource", - "AsyncWARPConnectorResource", - "WARPConnectorResourceWithRawResponse", - "AsyncWARPConnectorResourceWithRawResponse", - "WARPConnectorResourceWithStreamingResponse", - "AsyncWARPConnectorResourceWithStreamingResponse", + "WARPConnector", + "AsyncWARPConnector", + "WARPConnectorWithRawResponse", + "AsyncWARPConnectorWithRawResponse", + "WARPConnectorWithStreamingResponse", + "AsyncWARPConnectorWithStreamingResponse", "WorkersForPlatforms", "AsyncWorkersForPlatforms", "WorkersForPlatformsWithRawResponse", diff --git a/src/cloudflare/resources/warp_connector.py b/src/cloudflare/resources/warp_connector.py index e817d072846..c25a010f0d3 100644 --- a/src/cloudflare/resources/warp_connector.py +++ b/src/cloudflare/resources/warp_connector.py @@ -39,17 +39,17 @@ make_request_options, ) -__all__ = ["WARPConnectorResource", "AsyncWARPConnectorResource"] +__all__ = ["WARPConnector", "AsyncWARPConnector"] -class WARPConnectorResource(SyncAPIResource): +class WARPConnector(SyncAPIResource): @cached_property - def with_raw_response(self) -> WARPConnectorResourceWithRawResponse: - return WARPConnectorResourceWithRawResponse(self) + def with_raw_response(self) -> WARPConnectorWithRawResponse: + return WARPConnectorWithRawResponse(self) @cached_property - def with_streaming_response(self) -> WARPConnectorResourceWithStreamingResponse: - return WARPConnectorResourceWithStreamingResponse(self) + def with_streaming_response(self) -> WARPConnectorWithStreamingResponse: + return WARPConnectorWithStreamingResponse(self) def create( self, @@ -393,14 +393,14 @@ def token( ) -class AsyncWARPConnectorResource(AsyncAPIResource): +class AsyncWARPConnector(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncWARPConnectorResourceWithRawResponse: - return AsyncWARPConnectorResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncWARPConnectorWithRawResponse: + return AsyncWARPConnectorWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncWARPConnectorResourceWithStreamingResponse: - return AsyncWARPConnectorResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncWARPConnectorWithStreamingResponse: + return AsyncWARPConnectorWithStreamingResponse(self) async def create( self, @@ -746,8 +746,8 @@ async def token( ) -class WARPConnectorResourceWithRawResponse: - def __init__(self, warp_connector: WARPConnectorResource) -> None: +class WARPConnectorWithRawResponse: + def __init__(self, warp_connector: WARPConnector) -> None: self._warp_connector = warp_connector self.create = to_raw_response_wrapper( @@ -770,8 +770,8 @@ def __init__(self, warp_connector: WARPConnectorResource) -> None: ) -class AsyncWARPConnectorResourceWithRawResponse: - def __init__(self, warp_connector: AsyncWARPConnectorResource) -> None: +class AsyncWARPConnectorWithRawResponse: + def __init__(self, warp_connector: AsyncWARPConnector) -> None: self._warp_connector = warp_connector self.create = async_to_raw_response_wrapper( @@ -794,8 +794,8 @@ def __init__(self, warp_connector: AsyncWARPConnectorResource) -> None: ) -class WARPConnectorResourceWithStreamingResponse: - def __init__(self, warp_connector: WARPConnectorResource) -> None: +class WARPConnectorWithStreamingResponse: + def __init__(self, warp_connector: WARPConnector) -> None: self._warp_connector = warp_connector self.create = to_streamed_response_wrapper( @@ -818,8 +818,8 @@ def __init__(self, warp_connector: WARPConnectorResource) -> None: ) -class AsyncWARPConnectorResourceWithStreamingResponse: - def __init__(self, warp_connector: AsyncWARPConnectorResource) -> None: +class AsyncWARPConnectorWithStreamingResponse: + def __init__(self, warp_connector: AsyncWARPConnector) -> None: self._warp_connector = warp_connector self.create = async_to_streamed_response_wrapper( diff --git a/src/cloudflare/types/__init__.py b/src/cloudflare/types/__init__.py index 566b1625351..c234a3d462c 100644 --- a/src/cloudflare/types/__init__.py +++ b/src/cloudflare/types/__init__.py @@ -20,6 +20,7 @@ from .origin import Origin as Origin from .shared import ( Result as Result, + Tunnel as Tunnel, AuditLog as AuditLog, ErrorData as ErrorData, Identifier as Identifier, @@ -78,7 +79,6 @@ from .ip_list_params import IPListParams as IPListParams from .labeled_region import LabeledRegion as LabeledRegion from .migration_step import MigrationStep as MigrationStep -from .warp_connector import WARPConnector as WARPConnector from .allowed_origins import AllowedOrigins as AllowedOrigins from .firewall_filter import FirewallFilter as FirewallFilter from .origin_steering import OriginSteering as OriginSteering diff --git a/src/cloudflare/types/ruleset_create_params.py b/src/cloudflare/types/ruleset_create_params.py index ed5e84c494e..60b48be6748 100644 --- a/src/cloudflare/types/ruleset_create_params.py +++ b/src/cloudflare/types/ruleset_create_params.py @@ -17,7 +17,7 @@ ChallengeRuleParam, SetConfigRuleParam, ServeErrorRuleParam, - JsChallengeRuleParam, + JSChallengeRuleParam, CompressResponseRuleParam, ManagedChallengeRuleParam, SetCacheSettingsRuleParam, @@ -80,7 +80,7 @@ class RulesetCreateParams(TypedDict, total=False): ChallengeRuleParam, CompressResponseRuleParam, ExecuteRuleParam, - JsChallengeRuleParam, + JSChallengeRuleParam, LogRuleParam, ManagedChallengeRuleParam, RedirectRuleParam, diff --git a/src/cloudflare/types/ruleset_create_response.py b/src/cloudflare/types/ruleset_create_response.py index 84bacfd8f1e..5029d8a5350 100644 --- a/src/cloudflare/types/ruleset_create_response.py +++ b/src/cloudflare/types/ruleset_create_response.py @@ -17,7 +17,7 @@ ChallengeRule, SetConfigRule, ServeErrorRule, - JsChallengeRule, + JSChallengeRule, CompressResponseRule, ManagedChallengeRule, SetCacheSettingsRule, @@ -30,7 +30,7 @@ ChallengeRule, CompressResponseRule, ExecuteRule, - JsChallengeRule, + JSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, diff --git a/src/cloudflare/types/ruleset_get_response.py b/src/cloudflare/types/ruleset_get_response.py index 01e252fd950..9ed60c97ee8 100644 --- a/src/cloudflare/types/ruleset_get_response.py +++ b/src/cloudflare/types/ruleset_get_response.py @@ -17,7 +17,7 @@ ChallengeRule, SetConfigRule, ServeErrorRule, - JsChallengeRule, + JSChallengeRule, CompressResponseRule, ManagedChallengeRule, SetCacheSettingsRule, @@ -30,7 +30,7 @@ ChallengeRule, CompressResponseRule, ExecuteRule, - JsChallengeRule, + JSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, diff --git a/src/cloudflare/types/ruleset_update_params.py b/src/cloudflare/types/ruleset_update_params.py index d0d49b584e1..c737edfaf9e 100644 --- a/src/cloudflare/types/ruleset_update_params.py +++ b/src/cloudflare/types/ruleset_update_params.py @@ -17,7 +17,7 @@ ChallengeRuleParam, SetConfigRuleParam, ServeErrorRuleParam, - JsChallengeRuleParam, + JSChallengeRuleParam, CompressResponseRuleParam, ManagedChallengeRuleParam, SetCacheSettingsRuleParam, @@ -78,7 +78,7 @@ class RulesetUpdateParams(TypedDict, total=False): ChallengeRuleParam, CompressResponseRuleParam, ExecuteRuleParam, - JsChallengeRuleParam, + JSChallengeRuleParam, LogRuleParam, ManagedChallengeRuleParam, RedirectRuleParam, diff --git a/src/cloudflare/types/ruleset_update_response.py b/src/cloudflare/types/ruleset_update_response.py index 4fe157273a1..1bac8b53486 100644 --- a/src/cloudflare/types/ruleset_update_response.py +++ b/src/cloudflare/types/ruleset_update_response.py @@ -17,7 +17,7 @@ ChallengeRule, SetConfigRule, ServeErrorRule, - JsChallengeRule, + JSChallengeRule, CompressResponseRule, ManagedChallengeRule, SetCacheSettingsRule, @@ -30,7 +30,7 @@ ChallengeRule, CompressResponseRule, ExecuteRule, - JsChallengeRule, + JSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, diff --git a/src/cloudflare/types/rulesets/__init__.py b/src/cloudflare/types/rulesets/__init__.py index c84a6a31cd8..0af5349b36f 100644 --- a/src/cloudflare/types/rulesets/__init__.py +++ b/src/cloudflare/types/rulesets/__init__.py @@ -22,7 +22,7 @@ from .rule_edit_params import RuleEditParams as RuleEditParams from .score_rule_param import ScoreRuleParam as ScoreRuleParam from .serve_error_rule import ServeErrorRule as ServeErrorRule -from .js_challenge_rule import JsChallengeRule as JsChallengeRule +from .js_challenge_rule import JSChallengeRule as JSChallengeRule from .execute_rule_param import ExecuteRuleParam as ExecuteRuleParam from .phase_get_response import PhaseGetResponse as PhaseGetResponse from .rewrite_rule_param import RewriteRuleParam as RewriteRuleParam @@ -40,7 +40,7 @@ from .managed_challenge_rule import ManagedChallengeRule as ManagedChallengeRule from .rewrite_uri_part_param import RewriteURIPartParam as RewriteURIPartParam from .serve_error_rule_param import ServeErrorRuleParam as ServeErrorRuleParam -from .js_challenge_rule_param import JsChallengeRuleParam as JsChallengeRuleParam +from .js_challenge_rule_param import JSChallengeRuleParam as JSChallengeRuleParam from .set_cache_settings_rule import SetCacheSettingsRule as SetCacheSettingsRule from .compress_response_rule_param import CompressResponseRuleParam as CompressResponseRuleParam from .managed_challenge_rule_param import ManagedChallengeRuleParam as ManagedChallengeRuleParam diff --git a/src/cloudflare/types/rulesets/js_challenge_rule.py b/src/cloudflare/types/rulesets/js_challenge_rule.py index c24e8833f87..7e1325ba2e3 100644 --- a/src/cloudflare/types/rulesets/js_challenge_rule.py +++ b/src/cloudflare/types/rulesets/js_challenge_rule.py @@ -7,10 +7,10 @@ from .logging import Logging from ..._models import BaseModel -__all__ = ["JsChallengeRule"] +__all__ = ["JSChallengeRule"] -class JsChallengeRule(BaseModel): +class JSChallengeRule(BaseModel): last_updated: datetime """The timestamp of when the rule was last modified.""" diff --git a/src/cloudflare/types/rulesets/js_challenge_rule_param.py b/src/cloudflare/types/rulesets/js_challenge_rule_param.py index 3dc666ae047..ded155dfeb2 100644 --- a/src/cloudflare/types/rulesets/js_challenge_rule_param.py +++ b/src/cloudflare/types/rulesets/js_challenge_rule_param.py @@ -6,10 +6,10 @@ from .logging_param import LoggingParam -__all__ = ["JsChallengeRuleParam"] +__all__ = ["JSChallengeRuleParam"] -class JsChallengeRuleParam(TypedDict, total=False): +class JSChallengeRuleParam(TypedDict, total=False): id: str """The unique ID of the rule.""" diff --git a/src/cloudflare/types/rulesets/phase_get_response.py b/src/cloudflare/types/rulesets/phase_get_response.py index b0f1c8dc5c0..ba836f604ee 100644 --- a/src/cloudflare/types/rulesets/phase_get_response.py +++ b/src/cloudflare/types/rulesets/phase_get_response.py @@ -16,7 +16,7 @@ from .challenge_rule import ChallengeRule from .set_config_rule import SetConfigRule from .serve_error_rule import ServeErrorRule -from .js_challenge_rule import JsChallengeRule +from .js_challenge_rule import JSChallengeRule from .compress_response_rule import CompressResponseRule from .managed_challenge_rule import ManagedChallengeRule from .set_cache_settings_rule import SetCacheSettingsRule @@ -28,7 +28,7 @@ ChallengeRule, CompressResponseRule, ExecuteRule, - JsChallengeRule, + JSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, diff --git a/src/cloudflare/types/rulesets/phase_update_params.py b/src/cloudflare/types/rulesets/phase_update_params.py index 35f0f070769..234efabd899 100644 --- a/src/cloudflare/types/rulesets/phase_update_params.py +++ b/src/cloudflare/types/rulesets/phase_update_params.py @@ -16,7 +16,7 @@ from .challenge_rule_param import ChallengeRuleParam from .set_config_rule_param import SetConfigRuleParam from .serve_error_rule_param import ServeErrorRuleParam -from .js_challenge_rule_param import JsChallengeRuleParam +from .js_challenge_rule_param import JSChallengeRuleParam from .compress_response_rule_param import CompressResponseRuleParam from .managed_challenge_rule_param import ManagedChallengeRuleParam from .set_cache_settings_rule_param import SetCacheSettingsRuleParam @@ -76,7 +76,7 @@ class PhaseUpdateParams(TypedDict, total=False): ChallengeRuleParam, CompressResponseRuleParam, ExecuteRuleParam, - JsChallengeRuleParam, + JSChallengeRuleParam, LogRuleParam, ManagedChallengeRuleParam, RedirectRuleParam, diff --git a/src/cloudflare/types/rulesets/phase_update_response.py b/src/cloudflare/types/rulesets/phase_update_response.py index 890bbbbb100..41257fc0f35 100644 --- a/src/cloudflare/types/rulesets/phase_update_response.py +++ b/src/cloudflare/types/rulesets/phase_update_response.py @@ -16,7 +16,7 @@ from .challenge_rule import ChallengeRule from .set_config_rule import SetConfigRule from .serve_error_rule import ServeErrorRule -from .js_challenge_rule import JsChallengeRule +from .js_challenge_rule import JSChallengeRule from .compress_response_rule import CompressResponseRule from .managed_challenge_rule import ManagedChallengeRule from .set_cache_settings_rule import SetCacheSettingsRule @@ -28,7 +28,7 @@ ChallengeRule, CompressResponseRule, ExecuteRule, - JsChallengeRule, + JSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, diff --git a/src/cloudflare/types/rulesets/phases/version_get_response.py b/src/cloudflare/types/rulesets/phases/version_get_response.py index 86bce386821..3109c6c05f3 100644 --- a/src/cloudflare/types/rulesets/phases/version_get_response.py +++ b/src/cloudflare/types/rulesets/phases/version_get_response.py @@ -16,7 +16,7 @@ from ..challenge_rule import ChallengeRule from ..set_config_rule import SetConfigRule from ..serve_error_rule import ServeErrorRule -from ..js_challenge_rule import JsChallengeRule +from ..js_challenge_rule import JSChallengeRule from ..compress_response_rule import CompressResponseRule from ..managed_challenge_rule import ManagedChallengeRule from ..set_cache_settings_rule import SetCacheSettingsRule @@ -28,7 +28,7 @@ ChallengeRule, CompressResponseRule, ExecuteRule, - JsChallengeRule, + JSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, diff --git a/src/cloudflare/types/rulesets/rule_create_params.py b/src/cloudflare/types/rulesets/rule_create_params.py index 02cb342935a..0aa3ff1f5a8 100644 --- a/src/cloudflare/types/rulesets/rule_create_params.py +++ b/src/cloudflare/types/rulesets/rule_create_params.py @@ -23,7 +23,7 @@ "ExecuteRuleActionParametersOverrides", "ExecuteRuleActionParametersOverridesCategory", "ExecuteRuleActionParametersOverridesRule", - "JsChallengeRule", + "JSChallengeRule", "LogRule", "ManagedChallengeRule", "RedirectRule", @@ -304,7 +304,7 @@ class ExecuteRuleActionParameters(TypedDict, total=False): """A set of overrides to apply to the target ruleset.""" -class JsChallengeRule(TypedDict, total=False): +class JSChallengeRule(TypedDict, total=False): account_id: str """The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.""" @@ -1166,7 +1166,7 @@ class SetCacheSettingsRuleActionParameters(TypedDict, total=False): ChallengeRule, CompressResponseRule, ExecuteRule, - JsChallengeRule, + JSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, diff --git a/src/cloudflare/types/rulesets/rule_create_response.py b/src/cloudflare/types/rulesets/rule_create_response.py index 8f06a060fef..8e554d96ac9 100644 --- a/src/cloudflare/types/rulesets/rule_create_response.py +++ b/src/cloudflare/types/rulesets/rule_create_response.py @@ -16,7 +16,7 @@ from .challenge_rule import ChallengeRule from .set_config_rule import SetConfigRule from .serve_error_rule import ServeErrorRule -from .js_challenge_rule import JsChallengeRule +from .js_challenge_rule import JSChallengeRule from .compress_response_rule import CompressResponseRule from .managed_challenge_rule import ManagedChallengeRule from .set_cache_settings_rule import SetCacheSettingsRule @@ -28,7 +28,7 @@ ChallengeRule, CompressResponseRule, ExecuteRule, - JsChallengeRule, + JSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, diff --git a/src/cloudflare/types/rulesets/rule_delete_response.py b/src/cloudflare/types/rulesets/rule_delete_response.py index 919358ff3fa..d729df47b53 100644 --- a/src/cloudflare/types/rulesets/rule_delete_response.py +++ b/src/cloudflare/types/rulesets/rule_delete_response.py @@ -16,7 +16,7 @@ from .challenge_rule import ChallengeRule from .set_config_rule import SetConfigRule from .serve_error_rule import ServeErrorRule -from .js_challenge_rule import JsChallengeRule +from .js_challenge_rule import JSChallengeRule from .compress_response_rule import CompressResponseRule from .managed_challenge_rule import ManagedChallengeRule from .set_cache_settings_rule import SetCacheSettingsRule @@ -28,7 +28,7 @@ ChallengeRule, CompressResponseRule, ExecuteRule, - JsChallengeRule, + JSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, diff --git a/src/cloudflare/types/rulesets/rule_edit_params.py b/src/cloudflare/types/rulesets/rule_edit_params.py index 297e2a99aaf..2b4fabd4b76 100644 --- a/src/cloudflare/types/rulesets/rule_edit_params.py +++ b/src/cloudflare/types/rulesets/rule_edit_params.py @@ -23,7 +23,7 @@ "ExecuteRuleActionParametersOverrides", "ExecuteRuleActionParametersOverridesCategory", "ExecuteRuleActionParametersOverridesRule", - "JsChallengeRule", + "JSChallengeRule", "LogRule", "ManagedChallengeRule", "RedirectRule", @@ -316,7 +316,7 @@ class ExecuteRuleActionParameters(TypedDict, total=False): """A set of overrides to apply to the target ruleset.""" -class JsChallengeRule(TypedDict, total=False): +class JSChallengeRule(TypedDict, total=False): ruleset_id: Required[str] """The unique ID of the ruleset.""" @@ -1211,7 +1211,7 @@ class SetCacheSettingsRuleActionParameters(TypedDict, total=False): ChallengeRule, CompressResponseRule, ExecuteRule, - JsChallengeRule, + JSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, diff --git a/src/cloudflare/types/rulesets/rule_edit_response.py b/src/cloudflare/types/rulesets/rule_edit_response.py index dd6f8f95ad9..9239500ea74 100644 --- a/src/cloudflare/types/rulesets/rule_edit_response.py +++ b/src/cloudflare/types/rulesets/rule_edit_response.py @@ -16,7 +16,7 @@ from .challenge_rule import ChallengeRule from .set_config_rule import SetConfigRule from .serve_error_rule import ServeErrorRule -from .js_challenge_rule import JsChallengeRule +from .js_challenge_rule import JSChallengeRule from .compress_response_rule import CompressResponseRule from .managed_challenge_rule import ManagedChallengeRule from .set_cache_settings_rule import SetCacheSettingsRule @@ -28,7 +28,7 @@ ChallengeRule, CompressResponseRule, ExecuteRule, - JsChallengeRule, + JSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, diff --git a/src/cloudflare/types/rulesets/version_get_response.py b/src/cloudflare/types/rulesets/version_get_response.py index a3e03c89cb8..63d43d6a422 100644 --- a/src/cloudflare/types/rulesets/version_get_response.py +++ b/src/cloudflare/types/rulesets/version_get_response.py @@ -16,7 +16,7 @@ from .challenge_rule import ChallengeRule from .set_config_rule import SetConfigRule from .serve_error_rule import ServeErrorRule -from .js_challenge_rule import JsChallengeRule +from .js_challenge_rule import JSChallengeRule from .compress_response_rule import CompressResponseRule from .managed_challenge_rule import ManagedChallengeRule from .set_cache_settings_rule import SetCacheSettingsRule @@ -28,7 +28,7 @@ ChallengeRule, CompressResponseRule, ExecuteRule, - JsChallengeRule, + JSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, diff --git a/src/cloudflare/types/rulesets/versions/by_tag_get_response.py b/src/cloudflare/types/rulesets/versions/by_tag_get_response.py index dcb0495e66e..b5b714a8119 100644 --- a/src/cloudflare/types/rulesets/versions/by_tag_get_response.py +++ b/src/cloudflare/types/rulesets/versions/by_tag_get_response.py @@ -16,7 +16,7 @@ from ..challenge_rule import ChallengeRule from ..set_config_rule import SetConfigRule from ..serve_error_rule import ServeErrorRule -from ..js_challenge_rule import JsChallengeRule +from ..js_challenge_rule import JSChallengeRule from ..compress_response_rule import CompressResponseRule from ..managed_challenge_rule import ManagedChallengeRule from ..set_cache_settings_rule import SetCacheSettingsRule @@ -28,7 +28,7 @@ ChallengeRule, CompressResponseRule, ExecuteRule, - JsChallengeRule, + JSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, diff --git a/src/cloudflare/types/shared/__init__.py b/src/cloudflare/types/shared/__init__.py index ee245acbbe4..62e8826930b 100644 --- a/src/cloudflare/types/shared/__init__.py +++ b/src/cloudflare/types/shared/__init__.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from .result import Result as Result +from .tunnel import Tunnel as Tunnel from .audit_log import AuditLog as AuditLog from .error_data import ErrorData as ErrorData from .identifier import Identifier as Identifier diff --git a/src/cloudflare/types/zero_trust/tunnel.py b/src/cloudflare/types/shared/tunnel.py similarity index 100% rename from src/cloudflare/types/zero_trust/tunnel.py rename to src/cloudflare/types/shared/tunnel.py diff --git a/src/cloudflare/types/shared_params/__init__.py b/src/cloudflare/types/shared_params/__init__.py new file mode 100644 index 00000000000..479125d38fc --- /dev/null +++ b/src/cloudflare/types/shared_params/__init__.py @@ -0,0 +1,3 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from .tunnel import Tunnel as Tunnel diff --git a/src/cloudflare/types/zero_trust/tunnel_param.py b/src/cloudflare/types/shared_params/tunnel.py similarity index 97% rename from src/cloudflare/types/zero_trust/tunnel_param.py rename to src/cloudflare/types/shared_params/tunnel.py index fe4c9a77071..268364366bc 100644 --- a/src/cloudflare/types/zero_trust/tunnel_param.py +++ b/src/cloudflare/types/shared_params/tunnel.py @@ -8,7 +8,7 @@ from ..._utils import PropertyInfo -__all__ = ["TunnelParam", "Connection"] +__all__ = ["Tunnel", "Connection"] class Connection(TypedDict, total=False): @@ -36,7 +36,7 @@ class Connection(TypedDict, total=False): """The public IP address of the host running cloudflared.""" -class TunnelParam(TypedDict, total=False): +class Tunnel(TypedDict, total=False): account_tag: str """Cloudflare account ID""" diff --git a/src/cloudflare/types/url_scanner/scan_get_response.py b/src/cloudflare/types/url_scanner/scan_get_response.py index 1cb217d5a63..8f33a05659d 100644 --- a/src/cloudflare/types/url_scanner/scan_get_response.py +++ b/src/cloudflare/types/url_scanner/scan_get_response.py @@ -26,8 +26,8 @@ "ScanPage", "ScanPageConsole", "ScanPageCooky", - "ScanPageJs", - "ScanPageJsVariable", + "ScanPageJS", + "ScanPageJSVariable", "ScanPageSecurityViolation", "ScanPerformance", "ScanTask", @@ -204,14 +204,14 @@ class ScanPageCooky(BaseModel): priority: Optional[str] = None -class ScanPageJsVariable(BaseModel): +class ScanPageJSVariable(BaseModel): name: str type: str -class ScanPageJs(BaseModel): - variables: List[ScanPageJsVariable] +class ScanPageJS(BaseModel): + variables: List[ScanPageJSVariable] class ScanPageSecurityViolation(BaseModel): @@ -243,7 +243,7 @@ class ScanPage(BaseModel): ip: str - js: ScanPageJs + js: ScanPageJS security_violations: List[ScanPageSecurityViolation] = FieldInfo(alias="securityViolations") diff --git a/src/cloudflare/types/warp_connector.py b/src/cloudflare/types/warp_connector.py deleted file mode 100644 index b38246c800a..00000000000 --- a/src/cloudflare/types/warp_connector.py +++ /dev/null @@ -1,90 +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__ = ["WARPConnector", "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 WARPConnector(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/warp_connector_create_response.py b/src/cloudflare/types/warp_connector_create_response.py index 02aa7e8a64e..2b145cac371 100644 --- a/src/cloudflare/types/warp_connector_create_response.py +++ b/src/cloudflare/types/warp_connector_create_response.py @@ -1,10 +1,94 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union +from typing import List, Union, Optional +from datetime import datetime +from typing_extensions import Literal -from .zero_trust import Tunnel -from .warp_connector import WARPConnector +from .shared import Tunnel +from .._models import BaseModel -__all__ = ["WARPConnectorCreateResponse"] +__all__ = ["WARPConnectorCreateResponse", "TunnelWARPConnectorTunnel", "TunnelWARPConnectorTunnelConnection"] -WARPConnectorCreateResponse = Union[Tunnel, WARPConnector] + +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.""" + + +WARPConnectorCreateResponse = Union[Tunnel, TunnelWARPConnectorTunnel] diff --git a/src/cloudflare/types/warp_connector_delete_response.py b/src/cloudflare/types/warp_connector_delete_response.py index a5d9622b077..a9d3d09d139 100644 --- a/src/cloudflare/types/warp_connector_delete_response.py +++ b/src/cloudflare/types/warp_connector_delete_response.py @@ -1,10 +1,94 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union +from typing import List, Union, Optional +from datetime import datetime +from typing_extensions import Literal -from .zero_trust import Tunnel -from .warp_connector import WARPConnector +from .shared import Tunnel +from .._models import BaseModel -__all__ = ["WARPConnectorDeleteResponse"] +__all__ = ["WARPConnectorDeleteResponse", "TunnelWARPConnectorTunnel", "TunnelWARPConnectorTunnelConnection"] -WARPConnectorDeleteResponse = Union[Tunnel, WARPConnector] + +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.""" + + +WARPConnectorDeleteResponse = Union[Tunnel, TunnelWARPConnectorTunnel] diff --git a/src/cloudflare/types/warp_connector_edit_response.py b/src/cloudflare/types/warp_connector_edit_response.py index cecd76b5835..d371096bafb 100644 --- a/src/cloudflare/types/warp_connector_edit_response.py +++ b/src/cloudflare/types/warp_connector_edit_response.py @@ -1,10 +1,94 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union +from typing import List, Union, Optional +from datetime import datetime +from typing_extensions import Literal -from .zero_trust import Tunnel -from .warp_connector import WARPConnector +from .shared import Tunnel +from .._models import BaseModel -__all__ = ["WARPConnectorEditResponse"] +__all__ = ["WARPConnectorEditResponse", "TunnelWARPConnectorTunnel", "TunnelWARPConnectorTunnelConnection"] -WARPConnectorEditResponse = Union[Tunnel, WARPConnector] + +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.""" + + +WARPConnectorEditResponse = Union[Tunnel, TunnelWARPConnectorTunnel] diff --git a/src/cloudflare/types/warp_connector_get_response.py b/src/cloudflare/types/warp_connector_get_response.py index ac37eb7c2f1..22c1046365a 100644 --- a/src/cloudflare/types/warp_connector_get_response.py +++ b/src/cloudflare/types/warp_connector_get_response.py @@ -1,10 +1,94 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union +from typing import List, Union, Optional +from datetime import datetime +from typing_extensions import Literal -from .zero_trust import Tunnel -from .warp_connector import WARPConnector +from .shared import Tunnel +from .._models import BaseModel -__all__ = ["WARPConnectorGetResponse"] +__all__ = ["WARPConnectorGetResponse", "TunnelWARPConnectorTunnel", "TunnelWARPConnectorTunnelConnection"] -WARPConnectorGetResponse = Union[Tunnel, WARPConnector] + +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.""" + + +WARPConnectorGetResponse = Union[Tunnel, TunnelWARPConnectorTunnel] diff --git a/src/cloudflare/types/warp_connector_list_response.py b/src/cloudflare/types/warp_connector_list_response.py index 42be92ba52f..9a7a7514c51 100644 --- a/src/cloudflare/types/warp_connector_list_response.py +++ b/src/cloudflare/types/warp_connector_list_response.py @@ -1,10 +1,94 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union +from typing import List, Union, Optional +from datetime import datetime +from typing_extensions import Literal -from .zero_trust import Tunnel -from .warp_connector import WARPConnector +from .shared import Tunnel +from .._models import BaseModel -__all__ = ["WARPConnectorListResponse"] +__all__ = ["WARPConnectorListResponse", "TunnelWARPConnectorTunnel", "TunnelWARPConnectorTunnelConnection"] -WARPConnectorListResponse = Union[Tunnel, WARPConnector] + +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.""" + + +WARPConnectorListResponse = Union[Tunnel, TunnelWARPConnectorTunnel] diff --git a/src/cloudflare/types/zero_trust/__init__.py b/src/cloudflare/types/zero_trust/__init__.py index 3efb80f492b..27b06513bab 100644 --- a/src/cloudflare/types/zero_trust/__init__.py +++ b/src/cloudflare/types/zero_trust/__init__.py @@ -4,7 +4,6 @@ from .seat import Seat as Seat from .device import Device as Device -from .tunnel import Tunnel as Tunnel from .ip_rule import IPRule as IPRule from .azure_ad import AzureAD as AzureAD from .connection import Connection as Connection @@ -19,7 +18,6 @@ from .login_design import LoginDesign as LoginDesign from .network_path import NetworkPath as NetworkPath from .organization import Organization as Organization -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 diff --git a/src/cloudflare/types/zero_trust/tunnel_edit_response.py b/src/cloudflare/types/zero_trust/tunnel_edit_response.py index 109df4fcb8c..a06b6680aac 100644 --- a/src/cloudflare/types/zero_trust/tunnel_edit_response.py +++ b/src/cloudflare/types/zero_trust/tunnel_edit_response.py @@ -1,10 +1,94 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union +from typing import List, Union, Optional +from datetime import datetime +from typing_extensions import Literal -from .tunnel import Tunnel -from ..warp_connector import WARPConnector +from ..shared import Tunnel +from ..._models import BaseModel -__all__ = ["TunnelEditResponse"] +__all__ = ["TunnelEditResponse", "TunnelWARPConnectorTunnel", "TunnelWARPConnectorTunnelConnection"] -TunnelEditResponse = Union[Tunnel, WARPConnector] + +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.""" + + +TunnelEditResponse = Union[Tunnel, TunnelWARPConnectorTunnel] diff --git a/src/cloudflare/types/zero_trust/tunnel_list_response.py b/src/cloudflare/types/zero_trust/tunnel_list_response.py index 612c9f139bf..1d05b47b7e8 100644 --- a/src/cloudflare/types/zero_trust/tunnel_list_response.py +++ b/src/cloudflare/types/zero_trust/tunnel_list_response.py @@ -1,10 +1,94 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union +from typing import List, Union, Optional +from datetime import datetime +from typing_extensions import Literal -from .tunnel import Tunnel -from ..warp_connector import WARPConnector +from ..shared import Tunnel +from ..._models import BaseModel -__all__ = ["TunnelListResponse"] +__all__ = ["TunnelListResponse", "TunnelWARPConnectorTunnel", "TunnelWARPConnectorTunnelConnection"] -TunnelListResponse = Union[Tunnel, WARPConnector] + +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.""" + + +TunnelListResponse = Union[Tunnel, TunnelWARPConnectorTunnel]