diff --git a/api.md b/api.md index 06ee50ca89d..831736d9955 100644 --- a/api.md +++ b/api.md @@ -5084,14 +5084,13 @@ Types: ```python from cloudflare.types.zero_trust.access import ( AllowedHeaders, - AllowedHTTPMethods, AllowedIdPs, AllowedMethods, AllowedOrigins, AppID, Application, + ApplicationType, CORSHeaders, - CustomPages, SaaSAppNameFormat, SaaSAppNameIDFormat, SaaSAppSource, diff --git a/src/cloudflare/resources/zero_trust/access/applications/applications.py b/src/cloudflare/resources/zero_trust/access/applications/applications.py index 7a78e2fe860..3192d3b31f5 100644 --- a/src/cloudflare/resources/zero_trust/access/applications/applications.py +++ b/src/cloudflare/resources/zero_trust/access/applications/applications.py @@ -3,7 +3,6 @@ from __future__ import annotations from typing import Any, List, Type, Optional, cast, overload -from typing_extensions import Literal import httpx @@ -50,11 +49,15 @@ UserPolicyChecksResourceWithStreamingResponse, AsyncUserPolicyChecksResourceWithStreamingResponse, ) -from .....types.zero_trust.access import application_create_params, application_update_params +from .....types.zero_trust.access import ( + ApplicationType, + application_create_params, + application_update_params, +) from .....types.zero_trust.access.application import Application from .....types.zero_trust.access.allowed_idps import AllowedIdPs from .....types.zero_trust.access.app_id_param import AppIDParam -from .....types.zero_trust.access.custom_pages import CustomPages +from .....types.zero_trust.access.application_type import ApplicationType from .....types.zero_trust.access.cors_headers_param import CORSHeadersParam from .....types.zero_trust.access.self_hosted_domains import SelfHostedDomains from .....types.zero_trust.access.application_delete_response import ApplicationDeleteResponse @@ -99,7 +102,7 @@ def create( custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPages] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -207,7 +210,7 @@ def create( allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPages] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, saas_app: application_create_params.SaaSApplicationSaaSApp | NotGiven = NOT_GIVEN, @@ -273,7 +276,7 @@ def create( custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPages] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -388,7 +391,7 @@ def create( custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPages] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -491,7 +494,7 @@ def create( def create( self, *, - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"], + type: ApplicationType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, @@ -538,7 +541,7 @@ def create( def create( self, *, - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"], + type: ApplicationType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, @@ -585,7 +588,7 @@ def create( def create( self, *, - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"], + type: ApplicationType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, @@ -682,9 +685,7 @@ def create( self, *, domain: str | NotGiven = NOT_GIVEN, - type: str - | Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"] - | NotGiven = NOT_GIVEN, + type: str | ApplicationType | NotGiven = NOT_GIVEN, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN, @@ -695,7 +696,7 @@ def create( custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPages] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -791,7 +792,7 @@ def update( custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPages] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -902,7 +903,7 @@ def update( allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPages] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, saas_app: application_update_params.SaaSApplicationSaaSApp | NotGiven = NOT_GIVEN, @@ -971,7 +972,7 @@ def update( custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPages] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -1089,7 +1090,7 @@ def update( custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPages] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -1195,7 +1196,7 @@ def update( self, app_id: AppIDParam, *, - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"], + type: ApplicationType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, @@ -1245,7 +1246,7 @@ def update( self, app_id: AppIDParam, *, - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"], + type: ApplicationType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, @@ -1295,7 +1296,7 @@ def update( self, app_id: AppIDParam, *, - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"], + type: ApplicationType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, @@ -1398,9 +1399,7 @@ def update( app_id: AppIDParam, *, domain: str | NotGiven = NOT_GIVEN, - type: str - | Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"] - | NotGiven = NOT_GIVEN, + type: str | ApplicationType | NotGiven = NOT_GIVEN, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN, @@ -1411,7 +1410,7 @@ def update( custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPages] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -1747,7 +1746,7 @@ async def create( custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPages] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -1855,7 +1854,7 @@ async def create( allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPages] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, saas_app: application_create_params.SaaSApplicationSaaSApp | NotGiven = NOT_GIVEN, @@ -1921,7 +1920,7 @@ async def create( custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPages] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -2036,7 +2035,7 @@ async def create( custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPages] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -2139,7 +2138,7 @@ async def create( async def create( self, *, - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"], + type: ApplicationType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, @@ -2186,7 +2185,7 @@ async def create( async def create( self, *, - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"], + type: ApplicationType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, @@ -2233,7 +2232,7 @@ async def create( async def create( self, *, - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"], + type: ApplicationType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, @@ -2330,9 +2329,7 @@ async def create( self, *, domain: str | NotGiven = NOT_GIVEN, - type: str - | Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"] - | NotGiven = NOT_GIVEN, + type: str | ApplicationType | NotGiven = NOT_GIVEN, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN, @@ -2343,7 +2340,7 @@ async def create( custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPages] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -2439,7 +2436,7 @@ async def update( custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPages] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -2550,7 +2547,7 @@ async def update( allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPages] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, saas_app: application_update_params.SaaSApplicationSaaSApp | NotGiven = NOT_GIVEN, @@ -2619,7 +2616,7 @@ async def update( custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPages] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -2737,7 +2734,7 @@ async def update( custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPages] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, @@ -2843,7 +2840,7 @@ async def update( self, app_id: AppIDParam, *, - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"], + type: ApplicationType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, @@ -2893,7 +2890,7 @@ async def update( self, app_id: AppIDParam, *, - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"], + type: ApplicationType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, @@ -2943,7 +2940,7 @@ async def update( self, app_id: AppIDParam, *, - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"], + type: ApplicationType, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allowed_idps: List[AllowedIdPs] | NotGiven = NOT_GIVEN, @@ -3046,9 +3043,7 @@ async def update( app_id: AppIDParam, *, domain: str | NotGiven = NOT_GIVEN, - type: str - | Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"] - | NotGiven = NOT_GIVEN, + type: str | ApplicationType | NotGiven = NOT_GIVEN, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN, @@ -3059,7 +3054,7 @@ async def update( custom_deny_message: str | NotGiven = NOT_GIVEN, custom_deny_url: str | NotGiven = NOT_GIVEN, custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN, - custom_pages: List[CustomPages] | NotGiven = NOT_GIVEN, + custom_pages: List[str] | NotGiven = NOT_GIVEN, enable_binding_cookie: bool | NotGiven = NOT_GIVEN, http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/types/zero_trust/access/__init__.py b/src/cloudflare/types/zero_trust/access/__init__.py index d850ee36a25..dad5650905a 100644 --- a/src/cloudflare/types/zero_trust/access/__init__.py +++ b/src/cloudflare/types/zero_trust/access/__init__.py @@ -11,13 +11,13 @@ from .allowed_idps import AllowedIdPs as AllowedIdPs from .app_id_param import AppIDParam as AppIDParam from .cors_headers import CORSHeaders as CORSHeaders -from .custom_pages import CustomPages as CustomPages from .saml_saas_app import SAMLSaaSApp as SAMLSaaSApp from .service_token import ServiceToken as ServiceToken from .allowed_headers import AllowedHeaders as AllowedHeaders from .allowed_methods import AllowedMethods as AllowedMethods from .allowed_origins import AllowedOrigins as AllowedOrigins from .saas_app_source import SaaSAppSource as SaaSAppSource +from .application_type import ApplicationType as ApplicationType from .key_get_response import KeyGetResponse as KeyGetResponse from .zero_trust_group import ZeroTrustGroup as ZeroTrustGroup from .key_update_params import KeyUpdateParams as KeyUpdateParams @@ -31,9 +31,9 @@ from .saml_saas_app_param import SAMLSaaSAppParam as SAMLSaaSAppParam from .self_hosted_domains import SelfHostedDomains as SelfHostedDomains from .tag_delete_response import TagDeleteResponse as TagDeleteResponse -from .allowed_http_methods import AllowedHTTPMethods as AllowedHTTPMethods from .associated_hostnames import AssociatedHostnames as AssociatedHostnames from .saas_app_name_format import SaaSAppNameFormat as SaaSAppNameFormat +from .allowed_methods_param import AllowedMethodsParam as AllowedMethodsParam from .group_delete_response import GroupDeleteResponse as GroupDeleteResponse from .saas_app_source_param import SaaSAppSourceParam as SaaSAppSourceParam from .bookmark_create_params import BookmarkCreateParams as BookmarkCreateParams @@ -47,7 +47,6 @@ from .certificate_update_params import CertificateUpdateParams as CertificateUpdateParams from .custom_page_create_params import CustomPageCreateParams as CustomPageCreateParams from .custom_page_update_params import CustomPageUpdateParams as CustomPageUpdateParams -from .allowed_http_methods_param import AllowedHTTPMethodsParam as AllowedHTTPMethodsParam from .application_delete_response import ApplicationDeleteResponse as ApplicationDeleteResponse from .certificate_delete_response import CertificateDeleteResponse as CertificateDeleteResponse from .custom_page_delete_response import CustomPageDeleteResponse as CustomPageDeleteResponse diff --git a/src/cloudflare/types/zero_trust/access/allowed_http_methods.py b/src/cloudflare/types/zero_trust/access/allowed_http_methods.py deleted file mode 100644 index f5cbe3ccdf4..00000000000 --- a/src/cloudflare/types/zero_trust/access/allowed_http_methods.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .allowed_methods import AllowedMethods - -__all__ = ["AllowedHTTPMethods"] - -AllowedHTTPMethods = List[AllowedMethods] diff --git a/src/cloudflare/types/zero_trust/access/allowed_http_methods_param.py b/src/cloudflare/types/zero_trust/access/allowed_http_methods_param.py deleted file mode 100644 index e4f0a3fd9ce..00000000000 --- a/src/cloudflare/types/zero_trust/access/allowed_http_methods_param.py +++ /dev/null @@ -1,12 +0,0 @@ -# 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 - -__all__ = ["AllowedMethods"] - -AllowedMethods = Literal["GET", "POST", "HEAD", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"] - -AllowedHTTPMethodsParam = List[AllowedMethods] diff --git a/src/cloudflare/types/zero_trust/access/allowed_methods.py b/src/cloudflare/types/zero_trust/access/allowed_methods.py index c1c9e45b63b..c284eef8e64 100644 --- a/src/cloudflare/types/zero_trust/access/allowed_methods.py +++ b/src/cloudflare/types/zero_trust/access/allowed_methods.py @@ -1,7 +1,8 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from typing import List from typing_extensions import Literal __all__ = ["AllowedMethods"] -AllowedMethods = Literal["GET", "POST", "HEAD", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"] +AllowedMethods = List[Literal["GET", "POST", "HEAD", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"]] diff --git a/src/cloudflare/types/zero_trust/access/allowed_methods_param.py b/src/cloudflare/types/zero_trust/access/allowed_methods_param.py new file mode 100644 index 00000000000..313038b6af7 --- /dev/null +++ b/src/cloudflare/types/zero_trust/access/allowed_methods_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 import List +from typing_extensions import Literal + +__all__ = ["AllowedMethodsParamItem"] + +AllowedMethodsParamItem = Literal["GET", "POST", "HEAD", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"] + +AllowedMethodsParam = List[Literal["GET", "POST", "HEAD", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"]] diff --git a/src/cloudflare/types/zero_trust/access/application.py b/src/cloudflare/types/zero_trust/access/application.py index 3042cdf94dc..433fd75e505 100644 --- a/src/cloudflare/types/zero_trust/access/application.py +++ b/src/cloudflare/types/zero_trust/access/application.py @@ -7,8 +7,8 @@ from ...._models import BaseModel from .allowed_idps import AllowedIdPs from .cors_headers import CORSHeaders -from .custom_pages import CustomPages from .saml_saas_app import SAMLSaaSApp +from .application_type import ApplicationType from .self_hosted_domains import SelfHostedDomains __all__ = [ @@ -92,7 +92,7 @@ class SelfHostedApplication(BaseModel): application when failing non-identity rules. """ - custom_pages: Optional[List[CustomPages]] = None + custom_pages: Optional[List[str]] = None """The custom pages that will be displayed when applicable for this application""" enable_binding_cookie: Optional[bool] = None @@ -247,7 +247,7 @@ class SaaSApplication(BaseModel): created_at: Optional[datetime] = None - custom_pages: Optional[List[CustomPages]] = None + custom_pages: Optional[List[str]] = None """The custom pages that will be displayed when applicable for this application""" logo_url: Optional[str] = None @@ -334,7 +334,7 @@ class BrowserSSHApplication(BaseModel): application when failing non-identity rules. """ - custom_pages: Optional[List[CustomPages]] = None + custom_pages: Optional[List[str]] = None """The custom pages that will be displayed when applicable for this application""" enable_binding_cookie: Optional[bool] = None @@ -462,7 +462,7 @@ class BrowserVncApplication(BaseModel): application when failing non-identity rules. """ - custom_pages: Optional[List[CustomPages]] = None + custom_pages: Optional[List[str]] = None """The custom pages that will be displayed when applicable for this application""" enable_binding_cookie: Optional[bool] = None @@ -527,7 +527,7 @@ class BrowserVncApplication(BaseModel): class AppLauncherApplication(BaseModel): - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"] + type: ApplicationType """The application type.""" id: Optional[str] = None @@ -573,7 +573,7 @@ class AppLauncherApplication(BaseModel): class DeviceEnrollmentPermissionsApplication(BaseModel): - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"] + type: ApplicationType """The application type.""" id: Optional[str] = None @@ -619,7 +619,7 @@ class DeviceEnrollmentPermissionsApplication(BaseModel): class BrowserIsolationPermissionsApplication(BaseModel): - type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"] + type: ApplicationType """The application type.""" id: Optional[str] = None diff --git a/src/cloudflare/types/zero_trust/access/application_create_params.py b/src/cloudflare/types/zero_trust/access/application_create_params.py index d70747a9766..d8f91af3899 100644 --- a/src/cloudflare/types/zero_trust/access/application_create_params.py +++ b/src/cloudflare/types/zero_trust/access/application_create_params.py @@ -6,7 +6,7 @@ from typing_extensions import Literal, Required, TypedDict from .allowed_idps import AllowedIdPs -from .custom_pages import CustomPages +from .application_type import ApplicationType from .cors_headers_param import CORSHeadersParam from .saml_saas_app_param import SAMLSaaSAppParam from .self_hosted_domains import SelfHostedDomains @@ -90,7 +90,7 @@ class SelfHostedApplication(TypedDict, total=False): application when failing non-identity rules. """ - custom_pages: List[CustomPages] + custom_pages: List[str] """The custom pages that will be displayed when applicable for this application""" enable_binding_cookie: bool @@ -176,7 +176,7 @@ class SaaSApplication(TypedDict, total=False): You must specify only one identity provider in allowed_idps. """ - custom_pages: List[CustomPages] + custom_pages: List[str] """The custom pages that will be displayed when applicable for this application""" logo_url: str @@ -320,7 +320,7 @@ class BrowserSSHApplication(TypedDict, total=False): application when failing non-identity rules. """ - custom_pages: List[CustomPages] + custom_pages: List[str] """The custom pages that will be displayed when applicable for this application""" enable_binding_cookie: bool @@ -444,7 +444,7 @@ class BrowserVncApplication(TypedDict, total=False): application when failing non-identity rules. """ - custom_pages: List[CustomPages] + custom_pages: List[str] """The custom pages that will be displayed when applicable for this application""" enable_binding_cookie: bool @@ -507,7 +507,7 @@ class BrowserVncApplication(TypedDict, total=False): class AppLauncherApplication(TypedDict, total=False): - type: Required[Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"]] + type: Required[ApplicationType] """The application type.""" account_id: str @@ -539,7 +539,7 @@ class AppLauncherApplication(TypedDict, total=False): class DeviceEnrollmentPermissionsApplication(TypedDict, total=False): - type: Required[Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"]] + type: Required[ApplicationType] """The application type.""" account_id: str @@ -571,7 +571,7 @@ class DeviceEnrollmentPermissionsApplication(TypedDict, total=False): class BrowserIsolationPermissionsApplication(TypedDict, total=False): - type: Required[Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"]] + type: Required[ApplicationType] """The application type.""" account_id: str diff --git a/src/cloudflare/types/zero_trust/access/application_type.py b/src/cloudflare/types/zero_trust/access/application_type.py new file mode 100644 index 00000000000..a15d52f3b44 --- /dev/null +++ b/src/cloudflare/types/zero_trust/access/application_type.py @@ -0,0 +1,7 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +__all__ = ["ApplicationType"] + +ApplicationType = Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"] diff --git a/src/cloudflare/types/zero_trust/access/application_update_params.py b/src/cloudflare/types/zero_trust/access/application_update_params.py index b40a12a51fe..53fac9bc0b1 100644 --- a/src/cloudflare/types/zero_trust/access/application_update_params.py +++ b/src/cloudflare/types/zero_trust/access/application_update_params.py @@ -6,7 +6,7 @@ from typing_extensions import Literal, Required, TypedDict from .allowed_idps import AllowedIdPs -from .custom_pages import CustomPages +from .application_type import ApplicationType from .cors_headers_param import CORSHeadersParam from .saml_saas_app_param import SAMLSaaSAppParam from .self_hosted_domains import SelfHostedDomains @@ -90,7 +90,7 @@ class SelfHostedApplication(TypedDict, total=False): application when failing non-identity rules. """ - custom_pages: List[CustomPages] + custom_pages: List[str] """The custom pages that will be displayed when applicable for this application""" enable_binding_cookie: bool @@ -176,7 +176,7 @@ class SaaSApplication(TypedDict, total=False): You must specify only one identity provider in allowed_idps. """ - custom_pages: List[CustomPages] + custom_pages: List[str] """The custom pages that will be displayed when applicable for this application""" logo_url: str @@ -320,7 +320,7 @@ class BrowserSSHApplication(TypedDict, total=False): application when failing non-identity rules. """ - custom_pages: List[CustomPages] + custom_pages: List[str] """The custom pages that will be displayed when applicable for this application""" enable_binding_cookie: bool @@ -444,7 +444,7 @@ class BrowserVncApplication(TypedDict, total=False): application when failing non-identity rules. """ - custom_pages: List[CustomPages] + custom_pages: List[str] """The custom pages that will be displayed when applicable for this application""" enable_binding_cookie: bool @@ -507,7 +507,7 @@ class BrowserVncApplication(TypedDict, total=False): class AppLauncherApplication(TypedDict, total=False): - type: Required[Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"]] + type: Required[ApplicationType] """The application type.""" account_id: str @@ -539,7 +539,7 @@ class AppLauncherApplication(TypedDict, total=False): class DeviceEnrollmentPermissionsApplication(TypedDict, total=False): - type: Required[Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"]] + type: Required[ApplicationType] """The application type.""" account_id: str @@ -571,7 +571,7 @@ class DeviceEnrollmentPermissionsApplication(TypedDict, total=False): class BrowserIsolationPermissionsApplication(TypedDict, total=False): - type: Required[Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"]] + type: Required[ApplicationType] """The application type.""" account_id: str diff --git a/src/cloudflare/types/zero_trust/access/cors_headers.py b/src/cloudflare/types/zero_trust/access/cors_headers.py index c6e54ffda11..9ddee58fe63 100644 --- a/src/cloudflare/types/zero_trust/access/cors_headers.py +++ b/src/cloudflare/types/zero_trust/access/cors_headers.py @@ -4,8 +4,8 @@ from ...._models import BaseModel from .allowed_headers import AllowedHeaders +from .allowed_methods import AllowedMethods from .allowed_origins import AllowedOrigins -from .allowed_http_methods import AllowedHTTPMethods __all__ = ["CORSHeaders"] @@ -29,7 +29,7 @@ class CORSHeaders(BaseModel): allowed_headers: Optional[List[AllowedHeaders]] = None """Allowed HTTP request headers.""" - allowed_methods: Optional[AllowedHTTPMethods] = None + allowed_methods: Optional[AllowedMethods] = None """Allowed HTTP request methods.""" allowed_origins: Optional[List[AllowedOrigins]] = None diff --git a/src/cloudflare/types/zero_trust/access/cors_headers_param.py b/src/cloudflare/types/zero_trust/access/cors_headers_param.py index d0ad003ae6a..583c165ce75 100644 --- a/src/cloudflare/types/zero_trust/access/cors_headers_param.py +++ b/src/cloudflare/types/zero_trust/access/cors_headers_param.py @@ -7,7 +7,7 @@ from .allowed_headers import AllowedHeaders from .allowed_origins import AllowedOrigins -from .allowed_http_methods_param import AllowedHTTPMethodsParam +from .allowed_methods_param import AllowedMethodsParam __all__ = ["CORSHeadersParam"] @@ -31,7 +31,7 @@ class CORSHeadersParam(TypedDict, total=False): allowed_headers: List[AllowedHeaders] """Allowed HTTP request headers.""" - allowed_methods: AllowedHTTPMethodsParam + allowed_methods: AllowedMethodsParam """Allowed HTTP request methods.""" allowed_origins: List[AllowedOrigins] diff --git a/src/cloudflare/types/zero_trust/access/custom_pages.py b/src/cloudflare/types/zero_trust/access/custom_pages.py deleted file mode 100644 index 0187b4067c6..00000000000 --- a/src/cloudflare/types/zero_trust/access/custom_pages.py +++ /dev/null @@ -1,6 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - - -__all__ = ["CustomPages"] - -CustomPages = str