Skip to content

Commit d482c74

Browse files
feat(api): update via SDK Studio (#466)
1 parent 965aec9 commit d482c74

16 files changed

+67
-18
lines changed

api.md

+4
Original file line numberDiff line numberDiff line change
@@ -1278,7 +1278,11 @@ Types:
12781278

12791279
```python
12801280
from cloudflare.types.ssl import (
1281+
CertificatePackCA,
1282+
CertificatePackRequestType,
1283+
CertificatePackRequestValidity,
12811284
CertificatePackStatus,
1285+
CertificatePackValidationMethod,
12821286
Host,
12831287
CertificatePackListResponse,
12841288
CertificatePackDeleteResponse,

src/cloudflare/resources/origin_ca_certificates.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from __future__ import annotations
44

55
from typing import Any, Type, Iterable, Optional, cast
6-
from typing_extensions import Literal
76

87
import httpx
98

@@ -21,12 +20,15 @@
2120
async_to_streamed_response_wrapper,
2221
)
2322
from .._wrappers import ResultWrapper
23+
from ..types.ssl import CertificatePackRequestType, CertificatePackRequestValidity
2424
from ..pagination import SyncSinglePage, AsyncSinglePage
2525
from .._base_client import (
2626
AsyncPaginator,
2727
make_request_options,
2828
)
2929
from ..types.origin_ca_certificates import origin_ca_certificate_list_params, origin_ca_certificate_create_params
30+
from ..types.ssl.certificate_pack_request_type import CertificatePackRequestType
31+
from ..types.ssl.certificate_pack_request_validity import CertificatePackRequestValidity
3032
from ..types.origin_ca_certificates.origin_ca_certificate import OriginCACertificate
3133
from ..types.origin_ca_certificates.origin_ca_certificate_get_response import OriginCACertificateGetResponse
3234
from ..types.origin_ca_certificates.origin_ca_certificate_create_response import OriginCACertificateCreateResponse
@@ -49,8 +51,8 @@ def create(
4951
*,
5052
csr: str | NotGiven = NOT_GIVEN,
5153
hostnames: Iterable[object] | NotGiven = NOT_GIVEN,
52-
request_type: Literal["origin-rsa", "origin-ecc", "keyless-certificate"] | NotGiven = NOT_GIVEN,
53-
requested_validity: Literal[7, 30, 90, 365, 730, 1095, 5475] | NotGiven = NOT_GIVEN,
54+
request_type: CertificatePackRequestType | NotGiven = NOT_GIVEN,
55+
requested_validity: CertificatePackRequestValidity | NotGiven = NOT_GIVEN,
5456
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5557
# The extra values given here take precedence over values defined on the client or passed to this method.
5658
extra_headers: Headers | None = None,
@@ -257,8 +259,8 @@ async def create(
257259
*,
258260
csr: str | NotGiven = NOT_GIVEN,
259261
hostnames: Iterable[object] | NotGiven = NOT_GIVEN,
260-
request_type: Literal["origin-rsa", "origin-ecc", "keyless-certificate"] | NotGiven = NOT_GIVEN,
261-
requested_validity: Literal[7, 30, 90, 365, 730, 1095, 5475] | NotGiven = NOT_GIVEN,
262+
request_type: CertificatePackRequestType | NotGiven = NOT_GIVEN,
263+
requested_validity: CertificatePackRequestValidity | NotGiven = NOT_GIVEN,
262264
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
263265
# The extra values given here take precedence over values defined on the client or passed to this method.
264266
extra_headers: Headers | None = None,

src/cloudflare/types/custom_hostnames/custom_hostname_create_params.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from .dcv_method import DCVMethod
99
from .bundle_method import BundleMethod
1010
from .domain_validation_type import DomainValidationType
11+
from ..ssl.certificate_pack_ca import CertificatePackCA
1112

1213
__all__ = ["CustomHostnameCreateParams", "SSL", "SSLSettings", "CustomMetadata"]
1314

@@ -55,7 +56,7 @@ class SSL(TypedDict, total=False):
5556
chain, but does not otherwise modify it.
5657
"""
5758

58-
certificate_authority: Literal["digicert", "google", "lets_encrypt"]
59+
certificate_authority: CertificatePackCA
5960
"""The Certificate Authority that will issue the certificate"""
6061

6162
custom_certificate: str

src/cloudflare/types/custom_hostnames/custom_hostname_create_response.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from .dcv_method import DCVMethod
99
from .bundle_method import BundleMethod
1010
from .domain_validation_type import DomainValidationType
11+
from ..ssl.certificate_pack_ca import CertificatePackCA
1112

1213
__all__ = [
1314
"CustomHostnameCreateResponse",
@@ -87,7 +88,7 @@ class SSL(BaseModel):
8788
chain, but does not otherwise modify it.
8889
"""
8990

90-
certificate_authority: Optional[Literal["digicert", "google", "lets_encrypt"]] = None
91+
certificate_authority: Optional[CertificatePackCA] = None
9192
"""The Certificate Authority that will issue the certificate"""
9293

9394
custom_certificate: Optional[str] = None

src/cloudflare/types/custom_hostnames/custom_hostname_edit_params.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from .dcv_method import DCVMethod
99
from .bundle_method import BundleMethod
1010
from .domain_validation_type import DomainValidationType
11+
from ..ssl.certificate_pack_ca import CertificatePackCA
1112

1213
__all__ = ["CustomHostnameEditParams", "CustomMetadata", "SSL", "SSLSettings"]
1314

@@ -72,7 +73,7 @@ class SSL(TypedDict, total=False):
7273
chain, but does not otherwise modify it.
7374
"""
7475

75-
certificate_authority: Literal["digicert", "google", "lets_encrypt"]
76+
certificate_authority: CertificatePackCA
7677
"""The Certificate Authority that will issue the certificate"""
7778

7879
custom_certificate: str

src/cloudflare/types/custom_hostnames/custom_hostname_edit_response.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from .dcv_method import DCVMethod
99
from .bundle_method import BundleMethod
1010
from .domain_validation_type import DomainValidationType
11+
from ..ssl.certificate_pack_ca import CertificatePackCA
1112

1213
__all__ = [
1314
"CustomHostnameEditResponse",
@@ -87,7 +88,7 @@ class SSL(BaseModel):
8788
chain, but does not otherwise modify it.
8889
"""
8990

90-
certificate_authority: Optional[Literal["digicert", "google", "lets_encrypt"]] = None
91+
certificate_authority: Optional[CertificatePackCA] = None
9192
"""The Certificate Authority that will issue the certificate"""
9293

9394
custom_certificate: Optional[str] = None

src/cloudflare/types/custom_hostnames/custom_hostname_get_response.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from .dcv_method import DCVMethod
99
from .bundle_method import BundleMethod
1010
from .domain_validation_type import DomainValidationType
11+
from ..ssl.certificate_pack_ca import CertificatePackCA
1112

1213
__all__ = [
1314
"CustomHostnameGetResponse",
@@ -87,7 +88,7 @@ class SSL(BaseModel):
8788
chain, but does not otherwise modify it.
8889
"""
8990

90-
certificate_authority: Optional[Literal["digicert", "google", "lets_encrypt"]] = None
91+
certificate_authority: Optional[CertificatePackCA] = None
9192
"""The Certificate Authority that will issue the certificate"""
9293

9394
custom_certificate: Optional[str] = None

src/cloudflare/types/custom_hostnames/custom_hostname_list_response.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from .dcv_method import DCVMethod
99
from .bundle_method import BundleMethod
1010
from .domain_validation_type import DomainValidationType
11+
from ..ssl.certificate_pack_ca import CertificatePackCA
1112

1213
__all__ = [
1314
"CustomHostnameListResponse",
@@ -87,7 +88,7 @@ class SSL(BaseModel):
8788
chain, but does not otherwise modify it.
8889
"""
8990

90-
certificate_authority: Optional[Literal["digicert", "google", "lets_encrypt"]] = None
91+
certificate_authority: Optional[CertificatePackCA] = None
9192
"""The Certificate Authority that will issue the certificate"""
9293

9394
custom_certificate: Optional[str] = None

src/cloudflare/types/origin_ca_certificates/origin_ca_certificate.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
from typing import List, Optional
44
from datetime import datetime
5-
from typing_extensions import Literal
65

76
from ..._models import BaseModel
7+
from ..ssl.certificate_pack_request_type import CertificatePackRequestType
8+
from ..ssl.certificate_pack_request_validity import CertificatePackRequestValidity
89

910
__all__ = ["OriginCACertificate"]
1011

@@ -19,13 +20,13 @@ class OriginCACertificate(BaseModel):
1920
certificate.
2021
"""
2122

22-
request_type: Literal["origin-rsa", "origin-ecc", "keyless-certificate"]
23+
request_type: CertificatePackRequestType
2324
"""
2425
Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa),
2526
or "keyless-certificate" (for Keyless SSL servers).
2627
"""
2728

28-
requested_validity: Literal[7, 30, 90, 365, 730, 1095, 5475]
29+
requested_validity: CertificatePackRequestValidity
2930
"""The number of days for which the certificate should be valid."""
3031

3132
id: Optional[str] = None

src/cloudflare/types/origin_ca_certificates/origin_ca_certificate_create_params.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
from __future__ import annotations
44

55
from typing import Iterable
6-
from typing_extensions import Literal, TypedDict
6+
from typing_extensions import TypedDict
7+
8+
from ..ssl.certificate_pack_request_type import CertificatePackRequestType
9+
from ..ssl.certificate_pack_request_validity import CertificatePackRequestValidity
710

811
__all__ = ["OriginCACertificateCreateParams"]
912

@@ -18,11 +21,11 @@ class OriginCACertificateCreateParams(TypedDict, total=False):
1821
certificate.
1922
"""
2023

21-
request_type: Literal["origin-rsa", "origin-ecc", "keyless-certificate"]
24+
request_type: CertificatePackRequestType
2225
"""
2326
Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa),
2427
or "keyless-certificate" (for Keyless SSL servers).
2528
"""
2629

27-
requested_validity: Literal[7, 30, 90, 365, 730, 1095, 5475]
30+
requested_validity: CertificatePackRequestValidity
2831
"""The number of days for which the certificate should be valid."""

src/cloudflare/types/ssl/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from .host import Host as Host
66
from .verification import Verification as Verification
7+
from .certificate_pack_ca import CertificatePackCA as CertificatePackCA
78
from .analyze_create_params import AnalyzeCreateParams as AnalyzeCreateParams
89
from .analyze_create_response import AnalyzeCreateResponse as AnalyzeCreateResponse
910
from .certificate_pack_status import CertificatePackStatus as CertificatePackStatus
@@ -15,5 +16,8 @@
1516
from .certificate_pack_edit_params import CertificatePackEditParams as CertificatePackEditParams
1617
from .certificate_pack_list_params import CertificatePackListParams as CertificatePackListParams
1718
from .certificate_pack_get_response import CertificatePackGetResponse as CertificatePackGetResponse
19+
from .certificate_pack_request_type import CertificatePackRequestType as CertificatePackRequestType
1820
from .certificate_pack_edit_response import CertificatePackEditResponse as CertificatePackEditResponse
1921
from .certificate_pack_delete_response import CertificatePackDeleteResponse as CertificatePackDeleteResponse
22+
from .certificate_pack_request_validity import CertificatePackRequestValidity as CertificatePackRequestValidity
23+
from .certificate_pack_validation_method import CertificatePackValidationMethod as CertificatePackValidationMethod
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from typing_extensions import Literal
4+
5+
__all__ = ["CertificatePackCA"]
6+
7+
CertificatePackCA = Literal["digicert", "google", "lets_encrypt"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from typing_extensions import Literal
4+
5+
__all__ = ["CertificatePackRequestType"]
6+
7+
CertificatePackRequestType = Literal["origin-rsa", "origin-ecc", "keyless-certificate"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from typing_extensions import Literal
4+
5+
__all__ = ["CertificatePackRequestValidity"]
6+
7+
CertificatePackRequestValidity = Literal[7, 30, 90, 365, 730, 1095, 5475]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from typing_extensions import Literal
4+
5+
__all__ = ["CertificatePackValidationMethod"]
6+
7+
CertificatePackValidationMethod = Literal["http", "cname", "txt"]

src/cloudflare/types/ssl/verification.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from typing_extensions import Literal
55

66
from ..._models import BaseModel
7+
from .certificate_pack_validation_method import CertificatePackValidationMethod
78

89
__all__ = ["Verification", "VerificationInfo"]
910

@@ -31,7 +32,7 @@ class Verification(BaseModel):
3132
signature: Optional[Literal["ECDSAWithSHA256", "SHA1WithRSA", "SHA256WithRSA"]] = None
3233
"""Certificate's signature algorithm."""
3334

34-
validation_method: Optional[Literal["http", "cname", "txt"]] = None
35+
validation_method: Optional[CertificatePackValidationMethod] = None
3536
"""Validation method in use for a certificate pack order."""
3637

3738
verification_info: Optional[VerificationInfo] = None

0 commit comments

Comments
 (0)