From 4bb8a84329efbe4958b6d32e9398fdb80ca08f9c Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 26 Nov 2024 21:50:05 +0000 Subject: [PATCH] chore(internal): codegen related update --- .stats.yml | 2 +- src/cloudflare/types/pagerules/page_rule.py | 36 ++++++++++ .../types/pagerules/pagerule_create_params.py | 36 ++++++++++ .../types/pagerules/pagerule_edit_params.py | 36 ++++++++++ .../types/pagerules/pagerule_update_params.py | 36 ++++++++++ src/cloudflare/types/zones/__init__.py | 3 + .../types/zones/development_mode.py | 23 +----- .../types/zones/development_mode_param.py | 11 +++ .../types/zones/hotlink_protection.py | 16 +---- .../types/zones/hotlink_protection_param.py | 11 +++ .../types/zones/server_side_excludes.py | 16 +---- .../types/zones/server_side_excludes_param.py | 11 +++ .../types/zones/setting_edit_params.py | 18 ++--- .../types/zones/setting_edit_response.py | 70 +++++++++++++++++-- .../types/zones/setting_get_response.py | 70 +++++++++++++++++-- 15 files changed, 321 insertions(+), 74 deletions(-) create mode 100644 src/cloudflare/types/zones/development_mode_param.py create mode 100644 src/cloudflare/types/zones/hotlink_protection_param.py create mode 100644 src/cloudflare/types/zones/server_side_excludes_param.py diff --git a/.stats.yml b/.stats.yml index 6d19daf067a..674596d454d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1436 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-da11321182930ad0deb0691d0e8e6c3bf9cced28dfb452d612590e86ec13a5a3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-511887ff04241247ce592a1c095e403a0fc8b376f7072c28bc59ced11f82e547.yml diff --git a/src/cloudflare/types/pagerules/page_rule.py b/src/cloudflare/types/pagerules/page_rule.py index 3792ea151f9..9a858e89db6 100644 --- a/src/cloudflare/types/pagerules/page_rule.py +++ b/src/cloudflare/types/pagerules/page_rule.py @@ -17,9 +17,12 @@ from ..zones.ip_geolocation import IPGeolocation from ..zones.security_level import SecurityLevel from ..zones.always_use_https import AlwaysUseHTTPS +from ..zones.development_mode import DevelopmentMode from ..zones.browser_cache_ttl import BrowserCacheTTL from ..zones.email_obfuscation import EmailObfuscation +from ..zones.hotlink_protection import HotlinkProtection from ..zones.response_buffering import ResponseBuffering +from ..zones.server_side_excludes import ServerSideExcludes from ..zones.true_client_ip_header import TrueClientIPHeader from ..zones.automatic_https_rewrites import AutomaticHTTPSRewrites from ..zones.opportunistic_encryption import OpportunisticEncryption @@ -39,7 +42,10 @@ "ActionCacheKeyValueHost", "ActionCacheKeyValueQueryString", "ActionCacheKeyValueUser", + "ActionCacheKeyFields", "ActionCacheOnCookie", + "ActionCacheTTLByStatus", + "ActionDDoSProtection", "ActionDisableApps", "ActionDisablePerformance", "ActionDisableSecurity", @@ -49,6 +55,8 @@ "ActionForwardingURL", "ActionForwardingURLValue", "ActionHostHeaderOverride", + "ActionMinify", + "ActionPurgeByPageRule", "ActionResolveOverride", "ActionRespectStrongEtag", ] @@ -179,6 +187,10 @@ class ActionCacheKey(BaseModel): value: Optional[ActionCacheKeyValue] = None +class ActionCacheKeyFields(BaseModel): + id: Optional[Literal["cache_key_fields"]] = None + + class ActionCacheOnCookie(BaseModel): id: Optional[Literal["cache_on_cookie"]] = None """ @@ -190,6 +202,14 @@ class ActionCacheOnCookie(BaseModel): """The regular expression to use for matching cookie names in the request.""" +class ActionCacheTTLByStatus(BaseModel): + id: Optional[Literal["cache_ttl_by_status"]] = None + + +class ActionDDoSProtection(BaseModel): + id: Optional[Literal["ddos_protection"]] = None + + class ActionDisableApps(BaseModel): id: Optional[Literal["disable_apps"]] = None """ @@ -281,6 +301,14 @@ class ActionHostHeaderOverride(BaseModel): """The hostname to use in the `Host` header""" +class ActionMinify(BaseModel): + id: Optional[Literal["minify"]] = None + + +class ActionPurgeByPageRule(BaseModel): + id: Optional[Literal["purge_by_page_rule"]] = None + + class ActionResolveOverride(BaseModel): id: Optional[Literal["resolve_override"]] = None """Change the origin address to the value specified in this setting.""" @@ -310,8 +338,12 @@ class ActionRespectStrongEtag(BaseModel): ActionCacheByDeviceType, ActionCacheDeceptionArmor, ActionCacheKey, + ActionCacheKeyFields, CacheLevel, ActionCacheOnCookie, + ActionCacheTTLByStatus, + ActionDDoSProtection, + DevelopmentMode, ActionDisableApps, ActionDisablePerformance, ActionDisableSecurity, @@ -321,16 +353,20 @@ class ActionRespectStrongEtag(BaseModel): ActionExplicitCacheControl, ActionForwardingURL, ActionHostHeaderOverride, + HotlinkProtection, IPGeolocation, + ActionMinify, Mirage, OpportunisticEncryption, OriginErrorPagePassThru, Polish, + ActionPurgeByPageRule, ActionResolveOverride, ActionRespectStrongEtag, ResponseBuffering, RocketLoader, SecurityLevel, + ServerSideExcludes, SortQueryStringForCache, SSL, TrueClientIPHeader, diff --git a/src/cloudflare/types/pagerules/pagerule_create_params.py b/src/cloudflare/types/pagerules/pagerule_create_params.py index 2fe0781abfa..ba3e8460e5b 100644 --- a/src/cloudflare/types/pagerules/pagerule_create_params.py +++ b/src/cloudflare/types/pagerules/pagerule_create_params.py @@ -16,9 +16,12 @@ from ..zones.ip_geolocation_param import IPGeolocationParam from ..zones.security_level_param import SecurityLevelParam from ..zones.always_use_https_param import AlwaysUseHTTPSParam +from ..zones.development_mode_param import DevelopmentModeParam from ..zones.browser_cache_ttl_param import BrowserCacheTTLParam from ..zones.email_obfuscation_param import EmailObfuscationParam +from ..zones.hotlink_protection_param import HotlinkProtectionParam from ..zones.response_buffering_param import ResponseBufferingParam +from ..zones.server_side_excludes_param import ServerSideExcludesParam from ..zones.true_client_ip_header_param import TrueClientIPHeaderParam from ..zones.automatic_https_rewrites_param import AutomaticHTTPSRewritesParam from ..zones.opportunistic_encryption_param import OpportunisticEncryptionParam @@ -38,7 +41,10 @@ "ActionCacheKeyValueHost", "ActionCacheKeyValueQueryString", "ActionCacheKeyValueUser", + "ActionCacheKeyFields", "ActionCacheOnCookie", + "ActionCacheTTLByStatus", + "ActionDDoSProtection", "ActionDisableApps", "ActionDisablePerformance", "ActionDisableSecurity", @@ -48,6 +54,8 @@ "ActionForwardingURL", "ActionForwardingURLValue", "ActionHostHeaderOverride", + "ActionMinify", + "ActionPurgeByPageRule", "ActionResolveOverride", "ActionRespectStrongEtag", ] @@ -204,6 +212,10 @@ class ActionCacheKey(TypedDict, total=False): value: ActionCacheKeyValue +class ActionCacheKeyFields(TypedDict, total=False): + id: Literal["cache_key_fields"] + + class ActionCacheOnCookie(TypedDict, total=False): id: Literal["cache_on_cookie"] """ @@ -215,6 +227,14 @@ class ActionCacheOnCookie(TypedDict, total=False): """The regular expression to use for matching cookie names in the request.""" +class ActionCacheTTLByStatus(TypedDict, total=False): + id: Literal["cache_ttl_by_status"] + + +class ActionDDoSProtection(TypedDict, total=False): + id: Literal["ddos_protection"] + + class ActionDisableApps(TypedDict, total=False): id: Literal["disable_apps"] """ @@ -306,6 +326,14 @@ class ActionHostHeaderOverride(TypedDict, total=False): """The hostname to use in the `Host` header""" +class ActionMinify(TypedDict, total=False): + id: Literal["minify"] + + +class ActionPurgeByPageRule(TypedDict, total=False): + id: Literal["purge_by_page_rule"] + + class ActionResolveOverride(TypedDict, total=False): id: Literal["resolve_override"] """Change the origin address to the value specified in this setting.""" @@ -334,8 +362,12 @@ class ActionRespectStrongEtag(TypedDict, total=False): ActionCacheByDeviceType, ActionCacheDeceptionArmor, ActionCacheKey, + ActionCacheKeyFields, CacheLevelParam, ActionCacheOnCookie, + ActionCacheTTLByStatus, + ActionDDoSProtection, + DevelopmentModeParam, ActionDisableApps, ActionDisablePerformance, ActionDisableSecurity, @@ -345,16 +377,20 @@ class ActionRespectStrongEtag(TypedDict, total=False): ActionExplicitCacheControl, ActionForwardingURL, ActionHostHeaderOverride, + HotlinkProtectionParam, IPGeolocationParam, + ActionMinify, MirageParam, OpportunisticEncryptionParam, OriginErrorPagePassThruParam, PolishParam, + ActionPurgeByPageRule, ActionResolveOverride, ActionRespectStrongEtag, ResponseBufferingParam, RocketLoaderParam, SecurityLevelParam, + ServerSideExcludesParam, SortQueryStringForCacheParam, SSLParam, TrueClientIPHeaderParam, diff --git a/src/cloudflare/types/pagerules/pagerule_edit_params.py b/src/cloudflare/types/pagerules/pagerule_edit_params.py index 2130f00d83d..6604e24f8a6 100644 --- a/src/cloudflare/types/pagerules/pagerule_edit_params.py +++ b/src/cloudflare/types/pagerules/pagerule_edit_params.py @@ -16,9 +16,12 @@ from ..zones.ip_geolocation_param import IPGeolocationParam from ..zones.security_level_param import SecurityLevelParam from ..zones.always_use_https_param import AlwaysUseHTTPSParam +from ..zones.development_mode_param import DevelopmentModeParam from ..zones.browser_cache_ttl_param import BrowserCacheTTLParam from ..zones.email_obfuscation_param import EmailObfuscationParam +from ..zones.hotlink_protection_param import HotlinkProtectionParam from ..zones.response_buffering_param import ResponseBufferingParam +from ..zones.server_side_excludes_param import ServerSideExcludesParam from ..zones.true_client_ip_header_param import TrueClientIPHeaderParam from ..zones.automatic_https_rewrites_param import AutomaticHTTPSRewritesParam from ..zones.opportunistic_encryption_param import OpportunisticEncryptionParam @@ -38,7 +41,10 @@ "ActionCacheKeyValueHost", "ActionCacheKeyValueQueryString", "ActionCacheKeyValueUser", + "ActionCacheKeyFields", "ActionCacheOnCookie", + "ActionCacheTTLByStatus", + "ActionDDoSProtection", "ActionDisableApps", "ActionDisablePerformance", "ActionDisableSecurity", @@ -48,6 +54,8 @@ "ActionForwardingURL", "ActionForwardingURLValue", "ActionHostHeaderOverride", + "ActionMinify", + "ActionPurgeByPageRule", "ActionResolveOverride", "ActionRespectStrongEtag", ] @@ -204,6 +212,10 @@ class ActionCacheKey(TypedDict, total=False): value: ActionCacheKeyValue +class ActionCacheKeyFields(TypedDict, total=False): + id: Literal["cache_key_fields"] + + class ActionCacheOnCookie(TypedDict, total=False): id: Literal["cache_on_cookie"] """ @@ -215,6 +227,14 @@ class ActionCacheOnCookie(TypedDict, total=False): """The regular expression to use for matching cookie names in the request.""" +class ActionCacheTTLByStatus(TypedDict, total=False): + id: Literal["cache_ttl_by_status"] + + +class ActionDDoSProtection(TypedDict, total=False): + id: Literal["ddos_protection"] + + class ActionDisableApps(TypedDict, total=False): id: Literal["disable_apps"] """ @@ -306,6 +326,14 @@ class ActionHostHeaderOverride(TypedDict, total=False): """The hostname to use in the `Host` header""" +class ActionMinify(TypedDict, total=False): + id: Literal["minify"] + + +class ActionPurgeByPageRule(TypedDict, total=False): + id: Literal["purge_by_page_rule"] + + class ActionResolveOverride(TypedDict, total=False): id: Literal["resolve_override"] """Change the origin address to the value specified in this setting.""" @@ -334,8 +362,12 @@ class ActionRespectStrongEtag(TypedDict, total=False): ActionCacheByDeviceType, ActionCacheDeceptionArmor, ActionCacheKey, + ActionCacheKeyFields, CacheLevelParam, ActionCacheOnCookie, + ActionCacheTTLByStatus, + ActionDDoSProtection, + DevelopmentModeParam, ActionDisableApps, ActionDisablePerformance, ActionDisableSecurity, @@ -345,16 +377,20 @@ class ActionRespectStrongEtag(TypedDict, total=False): ActionExplicitCacheControl, ActionForwardingURL, ActionHostHeaderOverride, + HotlinkProtectionParam, IPGeolocationParam, + ActionMinify, MirageParam, OpportunisticEncryptionParam, OriginErrorPagePassThruParam, PolishParam, + ActionPurgeByPageRule, ActionResolveOverride, ActionRespectStrongEtag, ResponseBufferingParam, RocketLoaderParam, SecurityLevelParam, + ServerSideExcludesParam, SortQueryStringForCacheParam, SSLParam, TrueClientIPHeaderParam, diff --git a/src/cloudflare/types/pagerules/pagerule_update_params.py b/src/cloudflare/types/pagerules/pagerule_update_params.py index 7b5245c39f8..98169be4178 100644 --- a/src/cloudflare/types/pagerules/pagerule_update_params.py +++ b/src/cloudflare/types/pagerules/pagerule_update_params.py @@ -16,9 +16,12 @@ from ..zones.ip_geolocation_param import IPGeolocationParam from ..zones.security_level_param import SecurityLevelParam from ..zones.always_use_https_param import AlwaysUseHTTPSParam +from ..zones.development_mode_param import DevelopmentModeParam from ..zones.browser_cache_ttl_param import BrowserCacheTTLParam from ..zones.email_obfuscation_param import EmailObfuscationParam +from ..zones.hotlink_protection_param import HotlinkProtectionParam from ..zones.response_buffering_param import ResponseBufferingParam +from ..zones.server_side_excludes_param import ServerSideExcludesParam from ..zones.true_client_ip_header_param import TrueClientIPHeaderParam from ..zones.automatic_https_rewrites_param import AutomaticHTTPSRewritesParam from ..zones.opportunistic_encryption_param import OpportunisticEncryptionParam @@ -38,7 +41,10 @@ "ActionCacheKeyValueHost", "ActionCacheKeyValueQueryString", "ActionCacheKeyValueUser", + "ActionCacheKeyFields", "ActionCacheOnCookie", + "ActionCacheTTLByStatus", + "ActionDDoSProtection", "ActionDisableApps", "ActionDisablePerformance", "ActionDisableSecurity", @@ -48,6 +54,8 @@ "ActionForwardingURL", "ActionForwardingURLValue", "ActionHostHeaderOverride", + "ActionMinify", + "ActionPurgeByPageRule", "ActionResolveOverride", "ActionRespectStrongEtag", ] @@ -204,6 +212,10 @@ class ActionCacheKey(TypedDict, total=False): value: ActionCacheKeyValue +class ActionCacheKeyFields(TypedDict, total=False): + id: Literal["cache_key_fields"] + + class ActionCacheOnCookie(TypedDict, total=False): id: Literal["cache_on_cookie"] """ @@ -215,6 +227,14 @@ class ActionCacheOnCookie(TypedDict, total=False): """The regular expression to use for matching cookie names in the request.""" +class ActionCacheTTLByStatus(TypedDict, total=False): + id: Literal["cache_ttl_by_status"] + + +class ActionDDoSProtection(TypedDict, total=False): + id: Literal["ddos_protection"] + + class ActionDisableApps(TypedDict, total=False): id: Literal["disable_apps"] """ @@ -306,6 +326,14 @@ class ActionHostHeaderOverride(TypedDict, total=False): """The hostname to use in the `Host` header""" +class ActionMinify(TypedDict, total=False): + id: Literal["minify"] + + +class ActionPurgeByPageRule(TypedDict, total=False): + id: Literal["purge_by_page_rule"] + + class ActionResolveOverride(TypedDict, total=False): id: Literal["resolve_override"] """Change the origin address to the value specified in this setting.""" @@ -334,8 +362,12 @@ class ActionRespectStrongEtag(TypedDict, total=False): ActionCacheByDeviceType, ActionCacheDeceptionArmor, ActionCacheKey, + ActionCacheKeyFields, CacheLevelParam, ActionCacheOnCookie, + ActionCacheTTLByStatus, + ActionDDoSProtection, + DevelopmentModeParam, ActionDisableApps, ActionDisablePerformance, ActionDisableSecurity, @@ -345,16 +377,20 @@ class ActionRespectStrongEtag(TypedDict, total=False): ActionExplicitCacheControl, ActionForwardingURL, ActionHostHeaderOverride, + HotlinkProtectionParam, IPGeolocationParam, + ActionMinify, MirageParam, OpportunisticEncryptionParam, OriginErrorPagePassThruParam, PolishParam, + ActionPurgeByPageRule, ActionResolveOverride, ActionRespectStrongEtag, ResponseBufferingParam, RocketLoaderParam, SecurityLevelParam, + ServerSideExcludesParam, SortQueryStringForCacheParam, SSLParam, TrueClientIPHeaderParam, diff --git a/src/cloudflare/types/zones/__init__.py b/src/cloudflare/types/zones/__init__.py index 5bf50dfaf51..656aeb26d5b 100644 --- a/src/cloudflare/types/zones/__init__.py +++ b/src/cloudflare/types/zones/__init__.py @@ -67,14 +67,17 @@ from .setting_edit_response import SettingEditResponse as SettingEditResponse from .true_client_ip_header import TrueClientIPHeader as TrueClientIPHeader from .always_use_https_param import AlwaysUseHTTPSParam as AlwaysUseHTTPSParam +from .development_mode_param import DevelopmentModeParam as DevelopmentModeParam from .rate_plan_get_response import RatePlanGetResponse as RatePlanGetResponse from .browser_cache_ttl_param import BrowserCacheTTLParam as BrowserCacheTTLParam from .email_obfuscation_param import EmailObfuscationParam as EmailObfuscationParam from .origin_max_http_version import OriginMaxHTTPVersion as OriginMaxHTTPVersion from .automatic_https_rewrites import AutomaticHTTPSRewrites as AutomaticHTTPSRewrites +from .hotlink_protection_param import HotlinkProtectionParam as HotlinkProtectionParam from .opportunistic_encryption import OpportunisticEncryption as OpportunisticEncryption from .response_buffering_param import ResponseBufferingParam as ResponseBufferingParam from .subscription_get_response import SubscriptionGetResponse as SubscriptionGetResponse +from .server_side_excludes_param import ServerSideExcludesParam as ServerSideExcludesParam from .subscription_create_params import SubscriptionCreateParams as SubscriptionCreateParams from .subscription_update_params import SubscriptionUpdateParams as SubscriptionUpdateParams from .origin_error_page_pass_thru import OriginErrorPagePassThru as OriginErrorPagePassThru diff --git a/src/cloudflare/types/zones/development_mode.py b/src/cloudflare/types/zones/development_mode.py index 06c81d58b5f..f529e46ab04 100644 --- a/src/cloudflare/types/zones/development_mode.py +++ b/src/cloudflare/types/zones/development_mode.py @@ -1,7 +1,6 @@ # 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 @@ -10,24 +9,4 @@ class DevelopmentMode(BaseModel): - id: Literal["development_mode"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - time_remaining: Optional[float] = None - """ - Value of the zone setting. Notes: The interval (in seconds) from when - development mode expires (positive integer) or last expired (negative integer) - for the domain. If development mode has never been enabled, this value is false. - """ + id: Optional[Literal["development_mode"]] = None diff --git a/src/cloudflare/types/zones/development_mode_param.py b/src/cloudflare/types/zones/development_mode_param.py new file mode 100644 index 00000000000..83e95df5c1c --- /dev/null +++ b/src/cloudflare/types/zones/development_mode_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 Literal, TypedDict + +__all__ = ["DevelopmentModeParam"] + + +class DevelopmentModeParam(TypedDict, total=False): + id: Literal["development_mode"] diff --git a/src/cloudflare/types/zones/hotlink_protection.py b/src/cloudflare/types/zones/hotlink_protection.py index 45d990193de..54e60d05aab 100644 --- a/src/cloudflare/types/zones/hotlink_protection.py +++ b/src/cloudflare/types/zones/hotlink_protection.py @@ -1,7 +1,6 @@ # 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 @@ -10,17 +9,4 @@ class HotlinkProtection(BaseModel): - id: Literal["hotlink_protection"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" + id: Optional[Literal["hotlink_protection"]] = None diff --git a/src/cloudflare/types/zones/hotlink_protection_param.py b/src/cloudflare/types/zones/hotlink_protection_param.py new file mode 100644 index 00000000000..cffd76c7102 --- /dev/null +++ b/src/cloudflare/types/zones/hotlink_protection_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 Literal, TypedDict + +__all__ = ["HotlinkProtectionParam"] + + +class HotlinkProtectionParam(TypedDict, total=False): + id: Literal["hotlink_protection"] diff --git a/src/cloudflare/types/zones/server_side_excludes.py b/src/cloudflare/types/zones/server_side_excludes.py index 2630a01b631..22a52497396 100644 --- a/src/cloudflare/types/zones/server_side_excludes.py +++ b/src/cloudflare/types/zones/server_side_excludes.py @@ -1,7 +1,6 @@ # 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 @@ -10,17 +9,4 @@ class ServerSideExcludes(BaseModel): - id: Literal["server_side_exclude"] - """ID of the zone setting.""" - - value: Literal["on", "off"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" + id: Optional[Literal["server_side_exclude"]] = None diff --git a/src/cloudflare/types/zones/server_side_excludes_param.py b/src/cloudflare/types/zones/server_side_excludes_param.py new file mode 100644 index 00000000000..1b0b716b61a --- /dev/null +++ b/src/cloudflare/types/zones/server_side_excludes_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 Literal, TypedDict + +__all__ = ["ServerSideExcludesParam"] + + +class ServerSideExcludesParam(TypedDict, total=False): + id: Literal["server_side_exclude"] diff --git a/src/cloudflare/types/zones/setting_edit_params.py b/src/cloudflare/types/zones/setting_edit_params.py index 37906fe334f..c8225843385 100644 --- a/src/cloudflare/types/zones/setting_edit_params.py +++ b/src/cloudflare/types/zones/setting_edit_params.py @@ -21,12 +21,12 @@ "ChallengeTTL", "Ciphers", "ZonesCNAMEFlattening", - "DevelopmentMode", + "ZonesSchemasDevelopmentMode", "EarlyHints", "ZonesSchemasEdgeCacheTTL", "ZonesSchemasEmailObfuscation", "H2Prioritization", - "HotlinkProtection", + "ZonesSchemasHotlinkProtection", "HTTP2", "HTTP3", "ImageResizing", @@ -53,7 +53,7 @@ "SecurityHeadersValue", "SecurityHeadersValueStrictTransportSecurity", "ZonesSchemasSecurityLevel", - "ServerSideExcludes", + "ZonesSchemasServerSideExclude", "ZonesSha1Support", "ZonesSchemasSortQueryStringForCache", "ZonesSchemasSSL", @@ -233,7 +233,7 @@ class ZonesCNAMEFlattening(TypedDict, total=False): """Current value of the zone setting.""" -class DevelopmentMode(TypedDict, total=False): +class ZonesSchemasDevelopmentMode(TypedDict, total=False): zone_id: Required[str] """Identifier""" @@ -312,7 +312,7 @@ class H2Prioritization(TypedDict, total=False): """Current value of the zone setting.""" -class HotlinkProtection(TypedDict, total=False): +class ZonesSchemasHotlinkProtection(TypedDict, total=False): zone_id: Required[str] """Identifier""" @@ -602,7 +602,7 @@ class ZonesSchemasSecurityLevel(TypedDict, total=False): """Current value of the zone setting.""" -class ServerSideExcludes(TypedDict, total=False): +class ZonesSchemasServerSideExclude(TypedDict, total=False): zone_id: Required[str] """Identifier""" @@ -747,12 +747,12 @@ class Websocket(TypedDict, total=False): ChallengeTTL, Ciphers, ZonesCNAMEFlattening, - DevelopmentMode, + ZonesSchemasDevelopmentMode, EarlyHints, ZonesSchemasEdgeCacheTTL, ZonesSchemasEmailObfuscation, H2Prioritization, - HotlinkProtection, + ZonesSchemasHotlinkProtection, HTTP2, HTTP3, ImageResizing, @@ -776,7 +776,7 @@ class Websocket(TypedDict, total=False): ZonesSchemasAutomaticPlatformOptimization, SecurityHeaders, ZonesSchemasSecurityLevel, - ServerSideExcludes, + ZonesSchemasServerSideExclude, ZonesSha1Support, ZonesSchemasSortQueryStringForCache, ZonesSchemasSSL, diff --git a/src/cloudflare/types/zones/setting_edit_response.py b/src/cloudflare/types/zones/setting_edit_response.py index 7b3e1c84f27..06b20495575 100644 --- a/src/cloudflare/types/zones/setting_edit_response.py +++ b/src/cloudflare/types/zones/setting_edit_response.py @@ -24,15 +24,12 @@ from .min_tls_version import MinTLSVersion from .ssl_recommender import SSLRecommender from .tls_client_auth import TLSClientAuth -from .development_mode import DevelopmentMode from .orange_to_orange import OrangeToOrange from .prefetch_preload import PrefetchPreload from .security_headers import SecurityHeaders from .h2_prioritization import H2Prioritization -from .hotlink_protection import HotlinkProtection from .proxy_read_timeout import ProxyReadTimeout from .opportunistic_onion import OpportunisticOnion -from .server_side_excludes import ServerSideExcludes from .automatic_platform_optimization import AutomaticPlatformOptimization __all__ = [ @@ -43,8 +40,10 @@ "ZonesSchemasBrowserCheck", "ZonesSchemasCacheLevel", "ZonesCNAMEFlattening", + "ZonesSchemasDevelopmentMode", "ZonesSchemasEdgeCacheTTL", "ZonesSchemasEmailObfuscation", + "ZonesSchemasHotlinkProtection", "ZonesSchemasIPGeolocation", "ZonesMaxUpload", "ZonesSchemasMirage", @@ -56,6 +55,7 @@ "ZonesSchemasRocketLoader", "ZonesSchemasAutomaticPlatformOptimization", "ZonesSchemasSecurityLevel", + "ZonesSchemasServerSideExclude", "ZonesSha1Support", "ZonesSchemasSortQueryStringForCache", "ZonesSchemasSSL", @@ -196,6 +196,30 @@ class ZonesCNAMEFlattening(BaseModel): """last time this setting was modified.""" +class ZonesSchemasDevelopmentMode(BaseModel): + id: Literal["development_mode"] + """ID of the zone setting.""" + + value: Literal["on", "off"] + """Current value of the zone setting.""" + + editable: Optional[Literal[True, False]] = None + """ + Whether or not this setting can be modified for this zone (based on your + Cloudflare plan level). + """ + + modified_on: Optional[datetime] = None + """last time this setting was modified.""" + + time_remaining: Optional[float] = None + """ + Value of the zone setting. Notes: The interval (in seconds) from when + development mode expires (positive integer) or last expired (negative integer) + for the domain. If development mode has never been enabled, this value is false. + """ + + class ZonesSchemasEdgeCacheTTL(BaseModel): id: Literal["edge_cache_ttl"] """ID of the zone setting.""" @@ -252,6 +276,23 @@ class ZonesSchemasEmailObfuscation(BaseModel): """last time this setting was modified.""" +class ZonesSchemasHotlinkProtection(BaseModel): + id: Literal["hotlink_protection"] + """ID of the zone setting.""" + + value: Literal["on", "off"] + """Current value of the zone setting.""" + + editable: Optional[Literal[True, False]] = None + """ + Whether or not this setting can be modified for this zone (based on your + Cloudflare plan level). + """ + + modified_on: Optional[datetime] = None + """last time this setting was modified.""" + + class ZonesSchemasIPGeolocation(BaseModel): id: Literal["ip_geolocation"] """ID of the zone setting.""" @@ -439,6 +480,23 @@ class ZonesSchemasSecurityLevel(BaseModel): """last time this setting was modified.""" +class ZonesSchemasServerSideExclude(BaseModel): + id: Literal["server_side_exclude"] + """ID of the zone setting.""" + + value: Literal["on", "off"] + """Current value of the zone setting.""" + + editable: Optional[Literal[True, False]] = None + """ + Whether or not this setting can be modified for this zone (based on your + Cloudflare plan level). + """ + + modified_on: Optional[datetime] = None + """last time this setting was modified.""" + + class ZonesSha1Support(BaseModel): id: Literal["sha1_support"] """Zone setting identifier.""" @@ -554,12 +612,12 @@ class ZonesSchemasWAF(BaseModel): ChallengeTTL, Ciphers, ZonesCNAMEFlattening, - DevelopmentMode, + ZonesSchemasDevelopmentMode, EarlyHints, ZonesSchemasEdgeCacheTTL, ZonesSchemasEmailObfuscation, H2Prioritization, - HotlinkProtection, + ZonesSchemasHotlinkProtection, HTTP2, HTTP3, ImageResizing, @@ -583,7 +641,7 @@ class ZonesSchemasWAF(BaseModel): ZonesSchemasAutomaticPlatformOptimization, SecurityHeaders, ZonesSchemasSecurityLevel, - ServerSideExcludes, + ZonesSchemasServerSideExclude, ZonesSha1Support, ZonesSchemasSortQueryStringForCache, ZonesSchemasSSL, diff --git a/src/cloudflare/types/zones/setting_get_response.py b/src/cloudflare/types/zones/setting_get_response.py index dd80d1c66ab..b6f4930c618 100644 --- a/src/cloudflare/types/zones/setting_get_response.py +++ b/src/cloudflare/types/zones/setting_get_response.py @@ -24,15 +24,12 @@ from .min_tls_version import MinTLSVersion from .ssl_recommender import SSLRecommender from .tls_client_auth import TLSClientAuth -from .development_mode import DevelopmentMode from .orange_to_orange import OrangeToOrange from .prefetch_preload import PrefetchPreload from .security_headers import SecurityHeaders from .h2_prioritization import H2Prioritization -from .hotlink_protection import HotlinkProtection from .proxy_read_timeout import ProxyReadTimeout from .opportunistic_onion import OpportunisticOnion -from .server_side_excludes import ServerSideExcludes from .automatic_platform_optimization import AutomaticPlatformOptimization __all__ = [ @@ -43,8 +40,10 @@ "ZonesSchemasBrowserCheck", "ZonesSchemasCacheLevel", "ZonesCNAMEFlattening", + "ZonesSchemasDevelopmentMode", "ZonesSchemasEdgeCacheTTL", "ZonesSchemasEmailObfuscation", + "ZonesSchemasHotlinkProtection", "ZonesSchemasIPGeolocation", "ZonesMaxUpload", "ZonesSchemasMirage", @@ -56,6 +55,7 @@ "ZonesSchemasRocketLoader", "ZonesSchemasAutomaticPlatformOptimization", "ZonesSchemasSecurityLevel", + "ZonesSchemasServerSideExclude", "ZonesSha1Support", "ZonesSchemasSortQueryStringForCache", "ZonesSchemasSSL", @@ -196,6 +196,30 @@ class ZonesCNAMEFlattening(BaseModel): """last time this setting was modified.""" +class ZonesSchemasDevelopmentMode(BaseModel): + id: Literal["development_mode"] + """ID of the zone setting.""" + + value: Literal["on", "off"] + """Current value of the zone setting.""" + + editable: Optional[Literal[True, False]] = None + """ + Whether or not this setting can be modified for this zone (based on your + Cloudflare plan level). + """ + + modified_on: Optional[datetime] = None + """last time this setting was modified.""" + + time_remaining: Optional[float] = None + """ + Value of the zone setting. Notes: The interval (in seconds) from when + development mode expires (positive integer) or last expired (negative integer) + for the domain. If development mode has never been enabled, this value is false. + """ + + class ZonesSchemasEdgeCacheTTL(BaseModel): id: Literal["edge_cache_ttl"] """ID of the zone setting.""" @@ -252,6 +276,23 @@ class ZonesSchemasEmailObfuscation(BaseModel): """last time this setting was modified.""" +class ZonesSchemasHotlinkProtection(BaseModel): + id: Literal["hotlink_protection"] + """ID of the zone setting.""" + + value: Literal["on", "off"] + """Current value of the zone setting.""" + + editable: Optional[Literal[True, False]] = None + """ + Whether or not this setting can be modified for this zone (based on your + Cloudflare plan level). + """ + + modified_on: Optional[datetime] = None + """last time this setting was modified.""" + + class ZonesSchemasIPGeolocation(BaseModel): id: Literal["ip_geolocation"] """ID of the zone setting.""" @@ -439,6 +480,23 @@ class ZonesSchemasSecurityLevel(BaseModel): """last time this setting was modified.""" +class ZonesSchemasServerSideExclude(BaseModel): + id: Literal["server_side_exclude"] + """ID of the zone setting.""" + + value: Literal["on", "off"] + """Current value of the zone setting.""" + + editable: Optional[Literal[True, False]] = None + """ + Whether or not this setting can be modified for this zone (based on your + Cloudflare plan level). + """ + + modified_on: Optional[datetime] = None + """last time this setting was modified.""" + + class ZonesSha1Support(BaseModel): id: Literal["sha1_support"] """Zone setting identifier.""" @@ -554,12 +612,12 @@ class ZonesSchemasWAF(BaseModel): ChallengeTTL, Ciphers, ZonesCNAMEFlattening, - DevelopmentMode, + ZonesSchemasDevelopmentMode, EarlyHints, ZonesSchemasEdgeCacheTTL, ZonesSchemasEmailObfuscation, H2Prioritization, - HotlinkProtection, + ZonesSchemasHotlinkProtection, HTTP2, HTTP3, ImageResizing, @@ -583,7 +641,7 @@ class ZonesSchemasWAF(BaseModel): ZonesSchemasAutomaticPlatformOptimization, SecurityHeaders, ZonesSchemasSecurityLevel, - ServerSideExcludes, + ZonesSchemasServerSideExclude, ZonesSha1Support, ZonesSchemasSortQueryStringForCache, ZonesSchemasSSL,