Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): update via SDK Studio #468

Merged
merged 1 commit into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Types:

```python
from cloudflare.types.accounts import (
MemberStatus,
Status,
UserWithInviteCode,
MemberListResponse,
MemberDeleteResponse,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -1395,11 +1395,7 @@ Methods:
Types:

```python
from cloudflare.types.acm import (
TotalTLSCertificateAuthority,
TotalTLSCreateResponse,
TotalTLSGetResponse,
)
from cloudflare.types.acm import CertificateAuthority, TotalTLSCreateResponse, TotalTLSGetResponse
```

Methods:
Expand Down Expand Up @@ -1504,6 +1500,7 @@ Types:
from cloudflare.types.custom_certificates import (
CustomCertificate,
GeoRestrictions,
Status,
CustomCertificateCreateResponse,
CustomCertificateDeleteResponse,
CustomCertificateEditResponse,
Expand Down Expand Up @@ -3234,7 +3231,7 @@ Types:
```python
from cloudflare.types.addressing import (
AddressMap,
AddressMapKind,
Kind,
AddressMapCreateResponse,
AddressMapDeleteResponse,
AddressMapGetResponse,
Expand Down
8 changes: 4 additions & 4 deletions src/cloudflare/resources/acm/total_tls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
14 changes: 7 additions & 7 deletions src/cloudflare/resources/origin_ca_certificates.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/cloudflare/types/accounts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

from typing_extensions import Literal

__all__ = ["MemberStatus"]
__all__ = ["Status"]

MemberStatus = Literal["member", "invited"]
Status = Literal["member", "invited"]
2 changes: 1 addition & 1 deletion src/cloudflare/types/acm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

from typing_extensions import Literal

__all__ = ["CertificatePackCA"]
__all__ = ["CertificateAuthority"]

CertificatePackCA = Literal["digicert", "google", "lets_encrypt"]
CertificateAuthority = Literal["google", "lets_encrypt"]
4 changes: 2 additions & 2 deletions src/cloudflare/types/acm/total_tls_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from typing_extensions import Required, TypedDict

from .total_tls_certificate_authority import TotalTLSCertificateAuthority
from .certificate_authority import CertificateAuthority

__all__ = ["TotalTLSCreateParams"]

Expand All @@ -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."""
4 changes: 2 additions & 2 deletions src/cloudflare/types/acm/total_tls_create_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/cloudflare/types/acm/total_tls_get_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/cloudflare/types/addressing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand All @@ -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."""


Expand Down
4 changes: 2 additions & 2 deletions src/cloudflare/types/addressing/address_map_get_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand All @@ -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."""


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

from typing_extensions import Literal

__all__ = ["AddressMapKind"]
__all__ = ["Kind"]

AddressMapKind = Literal["zone", "account"]
Kind = Literal["zone", "account"]
Original file line number Diff line number Diff line change
@@ -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"]

Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/cloudflare/types/custom_certificates/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
Expand Down
Loading