From a6c4b4bc9fde79df3b027ed8599dd85cee217b9b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 04:20:13 +0000 Subject: [PATCH] feat(api): update via SDK Studio (#468) --- api.md | 21 ++++++++----------- src/cloudflare/resources/acm/total_tls.py | 8 +++---- .../resources/origin_ca_certificates.py | 14 ++++++------- src/cloudflare/types/accounts/__init__.py | 2 +- .../accounts/{member_status.py => status.py} | 4 ++-- src/cloudflare/types/acm/__init__.py | 2 +- .../certificate_authority.py} | 4 ++-- .../types/acm/total_tls_create_params.py | 4 ++-- .../types/acm/total_tls_create_response.py | 4 ++-- .../types/acm/total_tls_get_response.py | 4 ++-- src/cloudflare/types/addressing/__init__.py | 2 +- .../addressing/address_map_create_response.py | 4 ++-- .../addressing/address_map_get_response.py | 4 ++-- .../{address_map_kind.py => kind.py} | 4 ++-- .../client_certificates/client_certificate.py | 4 ++-- .../types/custom_certificates/__init__.py | 1 + .../status.py} | 4 ++-- .../custom_hostname_create_params.py | 4 ++-- .../custom_hostname_create_response.py | 4 ++-- .../custom_hostname_edit_params.py | 4 ++-- .../custom_hostname_edit_response.py | 4 ++-- .../custom_hostname_get_response.py | 4 ++-- .../custom_hostname_list_response.py | 4 ++-- .../origin_ca_certificate.py | 8 +++---- .../origin_ca_certificate_create_params.py | 8 +++---- src/cloudflare/types/ssl/__init__.py | 10 ++++----- .../types/ssl/certificate_authority.py | 7 +++++++ .../ssl/certificate_pack_edit_response.py | 4 ++-- .../ssl/certificate_pack_request_type.py | 7 ------- .../ssl/certificate_pack_request_validity.py | 7 ------- .../ssl/certificate_pack_validation_method.py | 7 ------- .../order_create_response.py | 4 ++-- src/cloudflare/types/ssl/request_type.py | 7 +++++++ src/cloudflare/types/ssl/request_validity.py | 7 +++++++ .../{certificate_pack_status.py => status.py} | 4 ++-- src/cloudflare/types/ssl/validation_method.py | 7 +++++++ src/cloudflare/types/ssl/verification.py | 4 ++-- src/cloudflare/types/user/organization.py | 4 ++-- 38 files changed, 107 insertions(+), 102 deletions(-) rename src/cloudflare/types/accounts/{member_status.py => status.py} (64%) rename src/cloudflare/types/{ssl/certificate_pack_ca.py => acm/certificate_authority.py} (56%) rename src/cloudflare/types/addressing/{address_map_kind.py => kind.py} (63%) rename src/cloudflare/types/{acm/total_tls_certificate_authority.py => custom_certificates/status.py} (54%) create mode 100644 src/cloudflare/types/ssl/certificate_authority.py delete mode 100644 src/cloudflare/types/ssl/certificate_pack_request_type.py delete mode 100644 src/cloudflare/types/ssl/certificate_pack_request_validity.py delete mode 100644 src/cloudflare/types/ssl/certificate_pack_validation_method.py create mode 100644 src/cloudflare/types/ssl/request_type.py create mode 100644 src/cloudflare/types/ssl/request_validity.py rename src/cloudflare/types/ssl/{certificate_pack_status.py => status.py} (89%) create mode 100644 src/cloudflare/types/ssl/validation_method.py diff --git a/api.md b/api.md index 94e0991bb9c..ce214ccdcdd 100644 --- a/api.md +++ b/api.md @@ -43,7 +43,7 @@ Types: ```python from cloudflare.types.accounts import ( - MemberStatus, + Status, UserWithInviteCode, MemberListResponse, MemberDeleteResponse, @@ -1283,12 +1283,12 @@ Types: ```python from cloudflare.types.ssl import ( - CertificatePackCA, - CertificatePackRequestType, - CertificatePackRequestValidity, - CertificatePackStatus, - CertificatePackValidationMethod, + CertificateAuthority, Host, + RequestType, + RequestValidity, + Status, + ValidationMethod, CertificatePackListResponse, CertificatePackDeleteResponse, CertificatePackEditResponse, @@ -1395,11 +1395,7 @@ Methods: Types: ```python -from cloudflare.types.acm import ( - TotalTLSCertificateAuthority, - TotalTLSCreateResponse, - TotalTLSGetResponse, -) +from cloudflare.types.acm import CertificateAuthority, TotalTLSCreateResponse, TotalTLSGetResponse ``` Methods: @@ -1504,6 +1500,7 @@ Types: from cloudflare.types.custom_certificates import ( CustomCertificate, GeoRestrictions, + Status, CustomCertificateCreateResponse, CustomCertificateDeleteResponse, CustomCertificateEditResponse, @@ -3234,7 +3231,7 @@ Types: ```python from cloudflare.types.addressing import ( AddressMap, - AddressMapKind, + Kind, AddressMapCreateResponse, AddressMapDeleteResponse, AddressMapGetResponse, diff --git a/src/cloudflare/resources/acm/total_tls.py b/src/cloudflare/resources/acm/total_tls.py index f687efa967e..1282d909aa4 100644 --- a/src/cloudflare/resources/acm/total_tls.py +++ b/src/cloudflare/resources/acm/total_tls.py @@ -20,13 +20,13 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ...types.acm import TotalTLSCertificateAuthority, total_tls_create_params +from ...types.acm import CertificateAuthority, total_tls_create_params from ..._base_client import ( make_request_options, ) +from ...types.acm.certificate_authority import CertificateAuthority from ...types.acm.total_tls_get_response import TotalTLSGetResponse from ...types.acm.total_tls_create_response import TotalTLSCreateResponse -from ...types.acm.total_tls_certificate_authority import TotalTLSCertificateAuthority __all__ = ["TotalTLSResource", "AsyncTotalTLSResource"] @@ -45,7 +45,7 @@ def create( *, zone_id: str, enabled: bool, - certificate_authority: TotalTLSCertificateAuthority | NotGiven = NOT_GIVEN, + certificate_authority: CertificateAuthority | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -147,7 +147,7 @@ async def create( *, zone_id: str, enabled: bool, - certificate_authority: TotalTLSCertificateAuthority | NotGiven = NOT_GIVEN, + certificate_authority: CertificateAuthority | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, diff --git a/src/cloudflare/resources/origin_ca_certificates.py b/src/cloudflare/resources/origin_ca_certificates.py index f73e83b26d4..38c86adcefd 100644 --- a/src/cloudflare/resources/origin_ca_certificates.py +++ b/src/cloudflare/resources/origin_ca_certificates.py @@ -20,15 +20,15 @@ async_to_streamed_response_wrapper, ) from .._wrappers import ResultWrapper -from ..types.ssl import CertificatePackRequestType, CertificatePackRequestValidity +from ..types.ssl import RequestType, RequestValidity from ..pagination import SyncSinglePage, AsyncSinglePage from .._base_client import ( AsyncPaginator, make_request_options, ) +from ..types.ssl.request_type import RequestType +from ..types.ssl.request_validity import RequestValidity from ..types.origin_ca_certificates import origin_ca_certificate_list_params, origin_ca_certificate_create_params -from ..types.ssl.certificate_pack_request_type import CertificatePackRequestType -from ..types.ssl.certificate_pack_request_validity import CertificatePackRequestValidity from ..types.origin_ca_certificates.origin_ca_certificate import OriginCACertificate from ..types.origin_ca_certificates.origin_ca_certificate_get_response import OriginCACertificateGetResponse from ..types.origin_ca_certificates.origin_ca_certificate_create_response import OriginCACertificateCreateResponse @@ -51,8 +51,8 @@ def create( *, csr: str | NotGiven = NOT_GIVEN, hostnames: Iterable[object] | NotGiven = NOT_GIVEN, - request_type: CertificatePackRequestType | NotGiven = NOT_GIVEN, - requested_validity: CertificatePackRequestValidity | NotGiven = NOT_GIVEN, + request_type: RequestType | NotGiven = NOT_GIVEN, + requested_validity: RequestValidity | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -259,8 +259,8 @@ async def create( *, csr: str | NotGiven = NOT_GIVEN, hostnames: Iterable[object] | NotGiven = NOT_GIVEN, - request_type: CertificatePackRequestType | NotGiven = NOT_GIVEN, - requested_validity: CertificatePackRequestValidity | NotGiven = NOT_GIVEN, + request_type: RequestType | NotGiven = NOT_GIVEN, + requested_validity: RequestValidity | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, diff --git a/src/cloudflare/types/accounts/__init__.py b/src/cloudflare/types/accounts/__init__.py index fea67a337fc..71487082562 100644 --- a/src/cloudflare/types/accounts/__init__.py +++ b/src/cloudflare/types/accounts/__init__.py @@ -2,8 +2,8 @@ from __future__ import annotations +from .status import Status as Status from .account import Account as Account -from .member_status import MemberStatus as MemberStatus from .role_get_response import RoleGetResponse as RoleGetResponse from .member_list_params import MemberListParams as MemberListParams from .account_list_params import AccountListParams as AccountListParams diff --git a/src/cloudflare/types/accounts/member_status.py b/src/cloudflare/types/accounts/status.py similarity index 64% rename from src/cloudflare/types/accounts/member_status.py rename to src/cloudflare/types/accounts/status.py index fc12793b5fc..b38c2d347e1 100644 --- a/src/cloudflare/types/accounts/member_status.py +++ b/src/cloudflare/types/accounts/status.py @@ -2,6 +2,6 @@ from typing_extensions import Literal -__all__ = ["MemberStatus"] +__all__ = ["Status"] -MemberStatus = Literal["member", "invited"] +Status = Literal["member", "invited"] diff --git a/src/cloudflare/types/acm/__init__.py b/src/cloudflare/types/acm/__init__.py index 151a01596ba..3e75a50890f 100644 --- a/src/cloudflare/types/acm/__init__.py +++ b/src/cloudflare/types/acm/__init__.py @@ -2,7 +2,7 @@ from __future__ import annotations +from .certificate_authority import CertificateAuthority as CertificateAuthority from .total_tls_get_response import TotalTLSGetResponse as TotalTLSGetResponse from .total_tls_create_params import TotalTLSCreateParams as TotalTLSCreateParams from .total_tls_create_response import TotalTLSCreateResponse as TotalTLSCreateResponse -from .total_tls_certificate_authority import TotalTLSCertificateAuthority as TotalTLSCertificateAuthority diff --git a/src/cloudflare/types/ssl/certificate_pack_ca.py b/src/cloudflare/types/acm/certificate_authority.py similarity index 56% rename from src/cloudflare/types/ssl/certificate_pack_ca.py rename to src/cloudflare/types/acm/certificate_authority.py index ad165429462..74ff1407188 100644 --- a/src/cloudflare/types/ssl/certificate_pack_ca.py +++ b/src/cloudflare/types/acm/certificate_authority.py @@ -2,6 +2,6 @@ from typing_extensions import Literal -__all__ = ["CertificatePackCA"] +__all__ = ["CertificateAuthority"] -CertificatePackCA = Literal["digicert", "google", "lets_encrypt"] +CertificateAuthority = Literal["google", "lets_encrypt"] diff --git a/src/cloudflare/types/acm/total_tls_create_params.py b/src/cloudflare/types/acm/total_tls_create_params.py index b2f881147a5..aa49802762e 100644 --- a/src/cloudflare/types/acm/total_tls_create_params.py +++ b/src/cloudflare/types/acm/total_tls_create_params.py @@ -4,7 +4,7 @@ from typing_extensions import Required, TypedDict -from .total_tls_certificate_authority import TotalTLSCertificateAuthority +from .certificate_authority import CertificateAuthority __all__ = ["TotalTLSCreateParams"] @@ -19,5 +19,5 @@ class TotalTLSCreateParams(TypedDict, total=False): proxied A, AAAA, or CNAME record in your zone. """ - certificate_authority: TotalTLSCertificateAuthority + certificate_authority: CertificateAuthority """The Certificate Authority that Total TLS certificates will be issued through.""" diff --git a/src/cloudflare/types/acm/total_tls_create_response.py b/src/cloudflare/types/acm/total_tls_create_response.py index cfccefdf242..36bb25cef77 100644 --- a/src/cloudflare/types/acm/total_tls_create_response.py +++ b/src/cloudflare/types/acm/total_tls_create_response.py @@ -4,13 +4,13 @@ from typing_extensions import Literal from ..._models import BaseModel -from .total_tls_certificate_authority import TotalTLSCertificateAuthority +from .certificate_authority import CertificateAuthority __all__ = ["TotalTLSCreateResponse"] class TotalTLSCreateResponse(BaseModel): - certificate_authority: Optional[TotalTLSCertificateAuthority] = None + certificate_authority: Optional[CertificateAuthority] = None """The Certificate Authority that Total TLS certificates will be issued through.""" enabled: Optional[bool] = None diff --git a/src/cloudflare/types/acm/total_tls_get_response.py b/src/cloudflare/types/acm/total_tls_get_response.py index c06c91c5330..b2d6953e68b 100644 --- a/src/cloudflare/types/acm/total_tls_get_response.py +++ b/src/cloudflare/types/acm/total_tls_get_response.py @@ -4,13 +4,13 @@ from typing_extensions import Literal from ..._models import BaseModel -from .total_tls_certificate_authority import TotalTLSCertificateAuthority +from .certificate_authority import CertificateAuthority __all__ = ["TotalTLSGetResponse"] class TotalTLSGetResponse(BaseModel): - certificate_authority: Optional[TotalTLSCertificateAuthority] = None + certificate_authority: Optional[CertificateAuthority] = None """The Certificate Authority that Total TLS certificates will be issued through.""" enabled: Optional[bool] = None diff --git a/src/cloudflare/types/addressing/__init__.py b/src/cloudflare/types/addressing/__init__.py index f863e76ec26..2ea66f6d7f8 100644 --- a/src/cloudflare/types/addressing/__init__.py +++ b/src/cloudflare/types/addressing/__init__.py @@ -2,9 +2,9 @@ from __future__ import annotations +from .kind import Kind as Kind from .prefix import Prefix as Prefix from .address_map import AddressMap as AddressMap -from .address_map_kind import AddressMapKind as AddressMapKind from .prefix_edit_params import PrefixEditParams as PrefixEditParams from .prefix_create_params import PrefixCreateParams as PrefixCreateParams from .service_list_response import ServiceListResponse as ServiceListResponse diff --git a/src/cloudflare/types/addressing/address_map_create_response.py b/src/cloudflare/types/addressing/address_map_create_response.py index 015d84e46f6..d4eb788e2df 100644 --- a/src/cloudflare/types/addressing/address_map_create_response.py +++ b/src/cloudflare/types/addressing/address_map_create_response.py @@ -3,8 +3,8 @@ from typing import List, Optional from datetime import datetime +from .kind import Kind from ..._models import BaseModel -from .address_map_kind import AddressMapKind __all__ = ["AddressMapCreateResponse", "IP", "Membership"] @@ -25,7 +25,7 @@ class Membership(BaseModel): identifier: Optional[str] = None """Identifier""" - kind: Optional[AddressMapKind] = None + kind: Optional[Kind] = None """The type of the membership.""" diff --git a/src/cloudflare/types/addressing/address_map_get_response.py b/src/cloudflare/types/addressing/address_map_get_response.py index 3a93c423d39..06bdfc92ed8 100644 --- a/src/cloudflare/types/addressing/address_map_get_response.py +++ b/src/cloudflare/types/addressing/address_map_get_response.py @@ -3,8 +3,8 @@ from typing import List, Optional from datetime import datetime +from .kind import Kind from ..._models import BaseModel -from .address_map_kind import AddressMapKind __all__ = ["AddressMapGetResponse", "IP", "Membership"] @@ -25,7 +25,7 @@ class Membership(BaseModel): identifier: Optional[str] = None """Identifier""" - kind: Optional[AddressMapKind] = None + kind: Optional[Kind] = None """The type of the membership.""" diff --git a/src/cloudflare/types/addressing/address_map_kind.py b/src/cloudflare/types/addressing/kind.py similarity index 63% rename from src/cloudflare/types/addressing/address_map_kind.py rename to src/cloudflare/types/addressing/kind.py index b47d61efc0e..5e706ccd7e3 100644 --- a/src/cloudflare/types/addressing/address_map_kind.py +++ b/src/cloudflare/types/addressing/kind.py @@ -2,6 +2,6 @@ from typing_extensions import Literal -__all__ = ["AddressMapKind"] +__all__ = ["Kind"] -AddressMapKind = Literal["zone", "account"] +Kind = Literal["zone", "account"] diff --git a/src/cloudflare/types/client_certificates/client_certificate.py b/src/cloudflare/types/client_certificates/client_certificate.py index 426e5838446..58026ca697f 100644 --- a/src/cloudflare/types/client_certificates/client_certificate.py +++ b/src/cloudflare/types/client_certificates/client_certificate.py @@ -1,9 +1,9 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Optional -from typing_extensions import Literal from ..._models import BaseModel +from ..custom_certificates.status import Status __all__ = ["ClientCertificate", "CertificateAuthority"] @@ -63,7 +63,7 @@ class ClientCertificate(BaseModel): state: Optional[str] = None """State, provided by the CSR""" - status: Optional[Literal["active", "pending_reactivation", "pending_revocation", "revoked"]] = None + status: Optional[Status] = None """ Client Certificates may be active or revoked, and the pending_reactivation or pending_revocation represent in-progress asynchronous transitions diff --git a/src/cloudflare/types/custom_certificates/__init__.py b/src/cloudflare/types/custom_certificates/__init__.py index 71831651ad0..755996fb44a 100644 --- a/src/cloudflare/types/custom_certificates/__init__.py +++ b/src/cloudflare/types/custom_certificates/__init__.py @@ -2,6 +2,7 @@ from __future__ import annotations +from .status import Status as Status from .geo_restrictions import GeoRestrictions as GeoRestrictions from .custom_certificate import CustomCertificate as CustomCertificate from .geo_restrictions_param import GeoRestrictionsParam as GeoRestrictionsParam diff --git a/src/cloudflare/types/acm/total_tls_certificate_authority.py b/src/cloudflare/types/custom_certificates/status.py similarity index 54% rename from src/cloudflare/types/acm/total_tls_certificate_authority.py rename to src/cloudflare/types/custom_certificates/status.py index 6dc0c6fce36..428ccb247b1 100644 --- a/src/cloudflare/types/acm/total_tls_certificate_authority.py +++ b/src/cloudflare/types/custom_certificates/status.py @@ -2,6 +2,6 @@ from typing_extensions import Literal -__all__ = ["TotalTLSCertificateAuthority"] +__all__ = ["Status"] -TotalTLSCertificateAuthority = Literal["google", "lets_encrypt"] +Status = Literal["active", "pending_reactivation", "pending_revocation", "revoked"] diff --git a/src/cloudflare/types/custom_hostnames/custom_hostname_create_params.py b/src/cloudflare/types/custom_hostnames/custom_hostname_create_params.py index 60ba3fb69b7..ead0b1d5931 100644 --- a/src/cloudflare/types/custom_hostnames/custom_hostname_create_params.py +++ b/src/cloudflare/types/custom_hostnames/custom_hostname_create_params.py @@ -8,7 +8,7 @@ from .dcv_method import DCVMethod from .bundle_method import BundleMethod from .domain_validation_type import DomainValidationType -from ..ssl.certificate_pack_ca import CertificatePackCA +from ..ssl.certificate_authority import CertificateAuthority __all__ = ["CustomHostnameCreateParams", "SSL", "SSLSettings", "CustomMetadata"] @@ -56,7 +56,7 @@ class SSL(TypedDict, total=False): chain, but does not otherwise modify it. """ - certificate_authority: CertificatePackCA + certificate_authority: CertificateAuthority """The Certificate Authority that will issue the certificate""" custom_certificate: str diff --git a/src/cloudflare/types/custom_hostnames/custom_hostname_create_response.py b/src/cloudflare/types/custom_hostnames/custom_hostname_create_response.py index 91eae242109..ba359b4a128 100644 --- a/src/cloudflare/types/custom_hostnames/custom_hostname_create_response.py +++ b/src/cloudflare/types/custom_hostnames/custom_hostname_create_response.py @@ -8,7 +8,7 @@ from .dcv_method import DCVMethod from .bundle_method import BundleMethod from .domain_validation_type import DomainValidationType -from ..ssl.certificate_pack_ca import CertificatePackCA +from ..ssl.certificate_authority import CertificateAuthority __all__ = [ "CustomHostnameCreateResponse", @@ -88,7 +88,7 @@ class SSL(BaseModel): chain, but does not otherwise modify it. """ - certificate_authority: Optional[CertificatePackCA] = None + certificate_authority: Optional[CertificateAuthority] = None """The Certificate Authority that will issue the certificate""" custom_certificate: Optional[str] = None diff --git a/src/cloudflare/types/custom_hostnames/custom_hostname_edit_params.py b/src/cloudflare/types/custom_hostnames/custom_hostname_edit_params.py index fd206263555..b135722e804 100644 --- a/src/cloudflare/types/custom_hostnames/custom_hostname_edit_params.py +++ b/src/cloudflare/types/custom_hostnames/custom_hostname_edit_params.py @@ -8,7 +8,7 @@ from .dcv_method import DCVMethod from .bundle_method import BundleMethod from .domain_validation_type import DomainValidationType -from ..ssl.certificate_pack_ca import CertificatePackCA +from ..ssl.certificate_authority import CertificateAuthority __all__ = ["CustomHostnameEditParams", "CustomMetadata", "SSL", "SSLSettings"] @@ -73,7 +73,7 @@ class SSL(TypedDict, total=False): chain, but does not otherwise modify it. """ - certificate_authority: CertificatePackCA + certificate_authority: CertificateAuthority """The Certificate Authority that will issue the certificate""" custom_certificate: str diff --git a/src/cloudflare/types/custom_hostnames/custom_hostname_edit_response.py b/src/cloudflare/types/custom_hostnames/custom_hostname_edit_response.py index d2f1c904ceb..793c9949881 100644 --- a/src/cloudflare/types/custom_hostnames/custom_hostname_edit_response.py +++ b/src/cloudflare/types/custom_hostnames/custom_hostname_edit_response.py @@ -8,7 +8,7 @@ from .dcv_method import DCVMethod from .bundle_method import BundleMethod from .domain_validation_type import DomainValidationType -from ..ssl.certificate_pack_ca import CertificatePackCA +from ..ssl.certificate_authority import CertificateAuthority __all__ = [ "CustomHostnameEditResponse", @@ -88,7 +88,7 @@ class SSL(BaseModel): chain, but does not otherwise modify it. """ - certificate_authority: Optional[CertificatePackCA] = None + certificate_authority: Optional[CertificateAuthority] = None """The Certificate Authority that will issue the certificate""" custom_certificate: Optional[str] = None diff --git a/src/cloudflare/types/custom_hostnames/custom_hostname_get_response.py b/src/cloudflare/types/custom_hostnames/custom_hostname_get_response.py index f2cd3a05994..eb4b90a307c 100644 --- a/src/cloudflare/types/custom_hostnames/custom_hostname_get_response.py +++ b/src/cloudflare/types/custom_hostnames/custom_hostname_get_response.py @@ -8,7 +8,7 @@ from .dcv_method import DCVMethod from .bundle_method import BundleMethod from .domain_validation_type import DomainValidationType -from ..ssl.certificate_pack_ca import CertificatePackCA +from ..ssl.certificate_authority import CertificateAuthority __all__ = [ "CustomHostnameGetResponse", @@ -88,7 +88,7 @@ class SSL(BaseModel): chain, but does not otherwise modify it. """ - certificate_authority: Optional[CertificatePackCA] = None + certificate_authority: Optional[CertificateAuthority] = None """The Certificate Authority that will issue the certificate""" custom_certificate: Optional[str] = None diff --git a/src/cloudflare/types/custom_hostnames/custom_hostname_list_response.py b/src/cloudflare/types/custom_hostnames/custom_hostname_list_response.py index 11fbd841560..b79f5a32db3 100644 --- a/src/cloudflare/types/custom_hostnames/custom_hostname_list_response.py +++ b/src/cloudflare/types/custom_hostnames/custom_hostname_list_response.py @@ -8,7 +8,7 @@ from .dcv_method import DCVMethod from .bundle_method import BundleMethod from .domain_validation_type import DomainValidationType -from ..ssl.certificate_pack_ca import CertificatePackCA +from ..ssl.certificate_authority import CertificateAuthority __all__ = [ "CustomHostnameListResponse", @@ -88,7 +88,7 @@ class SSL(BaseModel): chain, but does not otherwise modify it. """ - certificate_authority: Optional[CertificatePackCA] = None + certificate_authority: Optional[CertificateAuthority] = None """The Certificate Authority that will issue the certificate""" custom_certificate: Optional[str] = None diff --git a/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate.py b/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate.py index ebeb3329d02..ed6842cd235 100644 --- a/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate.py +++ b/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate.py @@ -4,8 +4,8 @@ from datetime import datetime from ..._models import BaseModel -from ..ssl.certificate_pack_request_type import CertificatePackRequestType -from ..ssl.certificate_pack_request_validity import CertificatePackRequestValidity +from ..ssl.request_type import RequestType +from ..ssl.request_validity import RequestValidity __all__ = ["OriginCACertificate"] @@ -20,13 +20,13 @@ class OriginCACertificate(BaseModel): certificate. """ - request_type: CertificatePackRequestType + request_type: RequestType """ Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers). """ - requested_validity: CertificatePackRequestValidity + requested_validity: RequestValidity """The number of days for which the certificate should be valid.""" id: Optional[str] = None diff --git a/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate_create_params.py b/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate_create_params.py index 1c056197d60..8c48e958c68 100644 --- a/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate_create_params.py +++ b/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate_create_params.py @@ -5,8 +5,8 @@ from typing import Iterable from typing_extensions import TypedDict -from ..ssl.certificate_pack_request_type import CertificatePackRequestType -from ..ssl.certificate_pack_request_validity import CertificatePackRequestValidity +from ..ssl.request_type import RequestType +from ..ssl.request_validity import RequestValidity __all__ = ["OriginCACertificateCreateParams"] @@ -21,11 +21,11 @@ class OriginCACertificateCreateParams(TypedDict, total=False): certificate. """ - request_type: CertificatePackRequestType + request_type: RequestType """ Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers). """ - requested_validity: CertificatePackRequestValidity + requested_validity: RequestValidity """The number of days for which the certificate should be valid.""" diff --git a/src/cloudflare/types/ssl/__init__.py b/src/cloudflare/types/ssl/__init__.py index 011d6d34505..c10a873819a 100644 --- a/src/cloudflare/types/ssl/__init__.py +++ b/src/cloudflare/types/ssl/__init__.py @@ -3,11 +3,14 @@ from __future__ import annotations from .host import Host as Host +from .status import Status as Status +from .request_type import RequestType as RequestType from .verification import Verification as Verification -from .certificate_pack_ca import CertificatePackCA as CertificatePackCA +from .request_validity import RequestValidity as RequestValidity +from .validation_method import ValidationMethod as ValidationMethod from .analyze_create_params import AnalyzeCreateParams as AnalyzeCreateParams +from .certificate_authority import CertificateAuthority as CertificateAuthority from .analyze_create_response import AnalyzeCreateResponse as AnalyzeCreateResponse -from .certificate_pack_status import CertificatePackStatus as CertificatePackStatus from .verification_get_params import VerificationGetParams as VerificationGetParams from .verification_edit_params import VerificationEditParams as VerificationEditParams from .verification_get_response import VerificationGetResponse as VerificationGetResponse @@ -16,8 +19,5 @@ from .certificate_pack_edit_params import CertificatePackEditParams as CertificatePackEditParams from .certificate_pack_list_params import CertificatePackListParams as CertificatePackListParams from .certificate_pack_get_response import CertificatePackGetResponse as CertificatePackGetResponse -from .certificate_pack_request_type import CertificatePackRequestType as CertificatePackRequestType from .certificate_pack_edit_response import CertificatePackEditResponse as CertificatePackEditResponse from .certificate_pack_delete_response import CertificatePackDeleteResponse as CertificatePackDeleteResponse -from .certificate_pack_request_validity import CertificatePackRequestValidity as CertificatePackRequestValidity -from .certificate_pack_validation_method import CertificatePackValidationMethod as CertificatePackValidationMethod diff --git a/src/cloudflare/types/ssl/certificate_authority.py b/src/cloudflare/types/ssl/certificate_authority.py new file mode 100644 index 00000000000..928533b5a72 --- /dev/null +++ b/src/cloudflare/types/ssl/certificate_authority.py @@ -0,0 +1,7 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +__all__ = ["CertificateAuthority"] + +CertificateAuthority = Literal["digicert", "google", "lets_encrypt"] diff --git a/src/cloudflare/types/ssl/certificate_pack_edit_response.py b/src/cloudflare/types/ssl/certificate_pack_edit_response.py index e75f5b894ee..545348d5b33 100644 --- a/src/cloudflare/types/ssl/certificate_pack_edit_response.py +++ b/src/cloudflare/types/ssl/certificate_pack_edit_response.py @@ -4,8 +4,8 @@ from typing_extensions import Literal from .host import Host +from .status import Status from ..._models import BaseModel -from .certificate_pack_status import CertificatePackStatus __all__ = ["CertificatePackEditResponse"] @@ -34,7 +34,7 @@ class CertificatePackEditResponse(BaseModel): empty. """ - status: Optional[CertificatePackStatus] = None + status: Optional[Status] = None """Status of certificate pack.""" type: Optional[Literal["advanced"]] = None diff --git a/src/cloudflare/types/ssl/certificate_pack_request_type.py b/src/cloudflare/types/ssl/certificate_pack_request_type.py deleted file mode 100644 index 850d67c2f5e..00000000000 --- a/src/cloudflare/types/ssl/certificate_pack_request_type.py +++ /dev/null @@ -1,7 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing_extensions import Literal - -__all__ = ["CertificatePackRequestType"] - -CertificatePackRequestType = Literal["origin-rsa", "origin-ecc", "keyless-certificate"] diff --git a/src/cloudflare/types/ssl/certificate_pack_request_validity.py b/src/cloudflare/types/ssl/certificate_pack_request_validity.py deleted file mode 100644 index bb75848a032..00000000000 --- a/src/cloudflare/types/ssl/certificate_pack_request_validity.py +++ /dev/null @@ -1,7 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing_extensions import Literal - -__all__ = ["CertificatePackRequestValidity"] - -CertificatePackRequestValidity = Literal[7, 30, 90, 365, 730, 1095, 5475] diff --git a/src/cloudflare/types/ssl/certificate_pack_validation_method.py b/src/cloudflare/types/ssl/certificate_pack_validation_method.py deleted file mode 100644 index 309677c9cdc..00000000000 --- a/src/cloudflare/types/ssl/certificate_pack_validation_method.py +++ /dev/null @@ -1,7 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing_extensions import Literal - -__all__ = ["CertificatePackValidationMethod"] - -CertificatePackValidationMethod = Literal["http", "cname", "txt"] diff --git a/src/cloudflare/types/ssl/certificate_packs/order_create_response.py b/src/cloudflare/types/ssl/certificate_packs/order_create_response.py index 19d2e565786..2f95bb27fc1 100644 --- a/src/cloudflare/types/ssl/certificate_packs/order_create_response.py +++ b/src/cloudflare/types/ssl/certificate_packs/order_create_response.py @@ -4,8 +4,8 @@ from typing_extensions import Literal from ..host import Host +from ..status import Status from ...._models import BaseModel -from ..certificate_pack_status import CertificatePackStatus __all__ = ["OrderCreateResponse"] @@ -34,7 +34,7 @@ class OrderCreateResponse(BaseModel): empty. """ - status: Optional[CertificatePackStatus] = None + status: Optional[Status] = None """Status of certificate pack.""" type: Optional[Literal["advanced"]] = None diff --git a/src/cloudflare/types/ssl/request_type.py b/src/cloudflare/types/ssl/request_type.py new file mode 100644 index 00000000000..ef5b498b0da --- /dev/null +++ b/src/cloudflare/types/ssl/request_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__ = ["RequestType"] + +RequestType = Literal["origin-rsa", "origin-ecc", "keyless-certificate"] diff --git a/src/cloudflare/types/ssl/request_validity.py b/src/cloudflare/types/ssl/request_validity.py new file mode 100644 index 00000000000..bbacbc27cd1 --- /dev/null +++ b/src/cloudflare/types/ssl/request_validity.py @@ -0,0 +1,7 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +__all__ = ["RequestValidity"] + +RequestValidity = Literal[7, 30, 90, 365, 730, 1095, 5475] diff --git a/src/cloudflare/types/ssl/certificate_pack_status.py b/src/cloudflare/types/ssl/status.py similarity index 89% rename from src/cloudflare/types/ssl/certificate_pack_status.py rename to src/cloudflare/types/ssl/status.py index 2c23558ddd1..aac3d6b759b 100644 --- a/src/cloudflare/types/ssl/certificate_pack_status.py +++ b/src/cloudflare/types/ssl/status.py @@ -2,9 +2,9 @@ from typing_extensions import Literal -__all__ = ["CertificatePackStatus"] +__all__ = ["Status"] -CertificatePackStatus = Literal[ +Status = Literal[ "initializing", "pending_validation", "deleted", diff --git a/src/cloudflare/types/ssl/validation_method.py b/src/cloudflare/types/ssl/validation_method.py new file mode 100644 index 00000000000..f7aae0fdcd3 --- /dev/null +++ b/src/cloudflare/types/ssl/validation_method.py @@ -0,0 +1,7 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +__all__ = ["ValidationMethod"] + +ValidationMethod = Literal["http", "cname", "txt"] diff --git a/src/cloudflare/types/ssl/verification.py b/src/cloudflare/types/ssl/verification.py index f3e3805efa9..3c917bd9955 100644 --- a/src/cloudflare/types/ssl/verification.py +++ b/src/cloudflare/types/ssl/verification.py @@ -4,7 +4,7 @@ from typing_extensions import Literal from ..._models import BaseModel -from .certificate_pack_validation_method import CertificatePackValidationMethod +from .validation_method import ValidationMethod __all__ = ["Verification", "VerificationInfo"] @@ -32,7 +32,7 @@ class Verification(BaseModel): signature: Optional[Literal["ECDSAWithSHA256", "SHA1WithRSA", "SHA256WithRSA"]] = None """Certificate's signature algorithm.""" - validation_method: Optional[CertificatePackValidationMethod] = None + validation_method: Optional[ValidationMethod] = None """Validation method in use for a certificate pack order.""" verification_info: Optional[VerificationInfo] = None diff --git a/src/cloudflare/types/user/organization.py b/src/cloudflare/types/user/organization.py index d464f217e36..6c1aa83f02d 100644 --- a/src/cloudflare/types/user/organization.py +++ b/src/cloudflare/types/user/organization.py @@ -3,8 +3,8 @@ from typing import List, Optional from ..._models import BaseModel +from ..accounts.status import Status from ..shared.permission import Permission -from ..accounts.member_status import MemberStatus __all__ = ["Organization"] @@ -22,5 +22,5 @@ class Organization(BaseModel): roles: Optional[List[str]] = None """List of roles that a user has within an organization.""" - status: Optional[MemberStatus] = None + status: Optional[Status] = None """Whether the user is a member of the organization or has an inivitation pending."""