Skip to content

Commit 37db74d

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): update via SDK Studio (#469)
1 parent a6c4b4b commit 37db74d

File tree

17 files changed

+53
-28
lines changed

17 files changed

+53
-28
lines changed

api.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from cloudflare.types import (
55
ASN,
66
AuditLog,
7+
CertificatePackRequestType,
78
CloudflareTunnel,
89
ErrorData,
910
Identifier,
@@ -1285,7 +1286,6 @@ Types:
12851286
from cloudflare.types.ssl import (
12861287
CertificateAuthority,
12871288
Host,
1288-
RequestType,
12891289
RequestValidity,
12901290
Status,
12911291
ValidationMethod,
@@ -1700,6 +1700,12 @@ Methods:
17001700

17011701
### Analytics
17021702

1703+
Types:
1704+
1705+
```python
1706+
from cloudflare.types.dns.firewall import Delta
1707+
```
1708+
17031709
#### Reports
17041710

17051711
Methods:

src/cloudflare/resources/dns/analytics/reports/bytimes.py

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

55
from typing import Type, Union, Optional, cast
66
from datetime import datetime
7-
from typing_extensions import Literal
87

98
import httpx
109

@@ -25,6 +24,8 @@
2524
from ....._base_client import (
2625
make_request_options,
2726
)
27+
from .....types.dns.firewall import Delta
28+
from .....types.dns.firewall.delta import Delta
2829
from .....types.dns.analytics.reports import bytime_get_params
2930
from .....types.dns.analytics.reports.by_time import ByTime
3031

@@ -50,8 +51,7 @@ def get(
5051
metrics: str | NotGiven = NOT_GIVEN,
5152
since: Union[str, datetime] | NotGiven = NOT_GIVEN,
5253
sort: str | NotGiven = NOT_GIVEN,
53-
time_delta: Literal["all", "auto", "year", "quarter", "month", "week", "day", "hour", "dekaminute", "minute"]
54-
| NotGiven = NOT_GIVEN,
54+
time_delta: Delta | NotGiven = NOT_GIVEN,
5555
until: Union[str, datetime] | NotGiven = NOT_GIVEN,
5656
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5757
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -142,8 +142,7 @@ async def get(
142142
metrics: str | NotGiven = NOT_GIVEN,
143143
since: Union[str, datetime] | NotGiven = NOT_GIVEN,
144144
sort: str | NotGiven = NOT_GIVEN,
145-
time_delta: Literal["all", "auto", "year", "quarter", "month", "week", "day", "hour", "dekaminute", "minute"]
146-
| NotGiven = NOT_GIVEN,
145+
time_delta: Delta | NotGiven = NOT_GIVEN,
147146
until: Union[str, datetime] | NotGiven = NOT_GIVEN,
148147
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
149148
# The extra values given here take precedence over values defined on the client or passed to this method.

src/cloudflare/resources/dns/firewall/analytics/reports/bytimes.py

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

55
from typing import Type, Union, Optional, cast
66
from datetime import datetime
7-
from typing_extensions import Literal
87

98
import httpx
109

@@ -25,6 +24,8 @@
2524
from ......_base_client import (
2625
make_request_options,
2726
)
27+
from ......types.dns.firewall import Delta
28+
from ......types.dns.firewall.delta import Delta
2829
from ......types.dns.analytics.reports.by_time import ByTime
2930
from ......types.dns.firewall.analytics.reports import bytime_get_params
3031

@@ -51,8 +52,7 @@ def get(
5152
metrics: str | NotGiven = NOT_GIVEN,
5253
since: Union[str, datetime] | NotGiven = NOT_GIVEN,
5354
sort: str | NotGiven = NOT_GIVEN,
54-
time_delta: Literal["all", "auto", "year", "quarter", "month", "week", "day", "hour", "dekaminute", "minute"]
55-
| NotGiven = NOT_GIVEN,
55+
time_delta: Delta | NotGiven = NOT_GIVEN,
5656
until: Union[str, datetime] | NotGiven = NOT_GIVEN,
5757
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5858
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -148,8 +148,7 @@ async def get(
148148
metrics: str | NotGiven = NOT_GIVEN,
149149
since: Union[str, datetime] | NotGiven = NOT_GIVEN,
150150
sort: str | NotGiven = NOT_GIVEN,
151-
time_delta: Literal["all", "auto", "year", "quarter", "month", "week", "day", "hour", "dekaminute", "minute"]
152-
| NotGiven = NOT_GIVEN,
151+
time_delta: Delta | NotGiven = NOT_GIVEN,
153152
until: Union[str, datetime] | NotGiven = NOT_GIVEN,
154153
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
155154
# The extra values given here take precedence over values defined on the client or passed to this method.

src/cloudflare/resources/origin_ca_certificates.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
async_to_streamed_response_wrapper,
2121
)
2222
from .._wrappers import ResultWrapper
23-
from ..types.ssl import RequestType, RequestValidity
23+
from ..types.ssl import RequestValidity
2424
from ..pagination import SyncSinglePage, AsyncSinglePage
2525
from .._base_client import (
2626
AsyncPaginator,
2727
make_request_options,
2828
)
29-
from ..types.ssl.request_type import RequestType
3029
from ..types.ssl.request_validity import RequestValidity
3130
from ..types.origin_ca_certificates import origin_ca_certificate_list_params, origin_ca_certificate_create_params
31+
from ..types.shared.certificate_pack_request_type import CertificatePackRequestType
3232
from ..types.origin_ca_certificates.origin_ca_certificate import OriginCACertificate
3333
from ..types.origin_ca_certificates.origin_ca_certificate_get_response import OriginCACertificateGetResponse
3434
from ..types.origin_ca_certificates.origin_ca_certificate_create_response import OriginCACertificateCreateResponse
@@ -51,7 +51,7 @@ def create(
5151
*,
5252
csr: str | NotGiven = NOT_GIVEN,
5353
hostnames: Iterable[object] | NotGiven = NOT_GIVEN,
54-
request_type: RequestType | NotGiven = NOT_GIVEN,
54+
request_type: CertificatePackRequestType | NotGiven = NOT_GIVEN,
5555
requested_validity: RequestValidity | NotGiven = NOT_GIVEN,
5656
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5757
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -259,7 +259,7 @@ async def create(
259259
*,
260260
csr: str | NotGiven = NOT_GIVEN,
261261
hostnames: Iterable[object] | NotGiven = NOT_GIVEN,
262-
request_type: RequestType | NotGiven = NOT_GIVEN,
262+
request_type: CertificatePackRequestType | NotGiven = NOT_GIVEN,
263263
requested_validity: RequestValidity | NotGiven = NOT_GIVEN,
264264
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
265265
# The extra values given here take precedence over values defined on the client or passed to this method.

src/cloudflare/types/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@
1616
PermissionGrant as PermissionGrant,
1717
CloudflareTunnel as CloudflareTunnel,
1818
LoadBalancerPreview as LoadBalancerPreview,
19+
CertificatePackRequestType as CertificatePackRequestType,
1920
)

src/cloudflare/types/dns/analytics/reports/bytime_get_params.py

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

55
from typing import Union
66
from datetime import datetime
7-
from typing_extensions import Literal, Required, Annotated, TypedDict
7+
from typing_extensions import Required, Annotated, TypedDict
88

99
from ....._utils import PropertyInfo
10+
from ...firewall.delta import Delta
1011

1112
__all__ = ["BytimeGetParams"]
1213

@@ -36,7 +37,7 @@ class BytimeGetParams(TypedDict, total=False):
3637
prefixed by - (descending) or + (ascending).
3738
"""
3839

39-
time_delta: Literal["all", "auto", "year", "quarter", "month", "week", "day", "hour", "dekaminute", "minute"]
40+
time_delta: Delta
4041
"""Unit of time to group data by."""
4142

4243
until: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]

src/cloudflare/types/dns/dns_analytics_query.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
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 .firewall.delta import Delta
88

99
__all__ = ["DNSAnalyticsQuery"]
1010

@@ -22,7 +22,7 @@ class DNSAnalyticsQuery(BaseModel):
2222
since: datetime
2323
"""Start date and time of requesting data period in ISO 8601 format."""
2424

25-
time_delta: Literal["all", "auto", "year", "quarter", "month", "week", "day", "hour", "dekaminute", "minute"]
25+
time_delta: Delta
2626
"""Unit of time to group data by."""
2727

2828
until: datetime

src/cloudflare/types/dns/firewall/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
from __future__ import annotations
44

5+
from .delta import Delta as Delta
56
from .firewall import Firewall as Firewall

src/cloudflare/types/dns/firewall/analytics/reports/bytime_get_params.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44

55
from typing import Union
66
from datetime import datetime
7-
from typing_extensions import Literal, Required, Annotated, TypedDict
7+
from typing_extensions import Required, Annotated, TypedDict
88

9+
from ...delta import Delta
910
from ......_utils import PropertyInfo
1011

1112
__all__ = ["BytimeGetParams"]
@@ -36,7 +37,7 @@ class BytimeGetParams(TypedDict, total=False):
3637
prefixed by - (descending) or + (ascending).
3738
"""
3839

39-
time_delta: Literal["all", "auto", "year", "quarter", "month", "week", "day", "hour", "dekaminute", "minute"]
40+
time_delta: Delta
4041
"""Unit of time to group data by."""
4142

4243
until: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]

src/cloudflare/types/ssl/request_type.py src/cloudflare/types/dns/firewall/delta.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
from typing_extensions import Literal
44

5-
__all__ = ["RequestType"]
5+
__all__ = ["Delta"]
66

7-
RequestType = Literal["origin-rsa", "origin-ecc", "keyless-certificate"]
7+
Delta = Literal["all", "auto", "year", "quarter", "month", "week", "day", "hour", "dekaminute", "minute"]

src/cloudflare/types/origin_ca_certificates/origin_ca_certificate.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
from datetime import datetime
55

66
from ..._models import BaseModel
7-
from ..ssl.request_type import RequestType
87
from ..ssl.request_validity import RequestValidity
8+
from ..shared.certificate_pack_request_type import CertificatePackRequestType
99

1010
__all__ = ["OriginCACertificate"]
1111

@@ -20,7 +20,7 @@ class OriginCACertificate(BaseModel):
2020
certificate.
2121
"""
2222

23-
request_type: RequestType
23+
request_type: CertificatePackRequestType
2424
"""
2525
Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa),
2626
or "keyless-certificate" (for Keyless SSL servers).

src/cloudflare/types/origin_ca_certificates/origin_ca_certificate_create_params.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
from typing import Iterable
66
from typing_extensions import TypedDict
77

8-
from ..ssl.request_type import RequestType
98
from ..ssl.request_validity import RequestValidity
9+
from ..shared.certificate_pack_request_type import CertificatePackRequestType
1010

1111
__all__ = ["OriginCACertificateCreateParams"]
1212

@@ -21,7 +21,7 @@ class OriginCACertificateCreateParams(TypedDict, total=False):
2121
certificate.
2222
"""
2323

24-
request_type: RequestType
24+
request_type: CertificatePackRequestType
2525
"""
2626
Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa),
2727
or "keyless-certificate" (for Keyless SSL servers).

src/cloudflare/types/shared/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@
1313
from .permission_grant import PermissionGrant as PermissionGrant
1414
from .cloudflare_tunnel import CloudflareTunnel as CloudflareTunnel
1515
from .load_balancer_preview import LoadBalancerPreview as LoadBalancerPreview
16+
from .certificate_pack_request_type import CertificatePackRequestType as CertificatePackRequestType
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"]

src/cloudflare/types/shared_params/__init__.py

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

33
from .asn import ASN as ASN
44
from .permission_grant import PermissionGrant as PermissionGrant
5+
from .certificate_pack_request_type import CertificatePackRequestType as CertificatePackRequestType
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing_extensions import Literal
6+
7+
__all__ = ["CertificatePackRequestType"]
8+
9+
CertificatePackRequestType = Literal["origin-rsa", "origin-ecc", "keyless-certificate"]

src/cloudflare/types/ssl/__init__.py

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

55
from .host import Host as Host
66
from .status import Status as Status
7-
from .request_type import RequestType as RequestType
87
from .verification import Verification as Verification
98
from .request_validity import RequestValidity as RequestValidity
109
from .validation_method import ValidationMethod as ValidationMethod

0 commit comments

Comments
 (0)