Skip to content

Commit bce1bf4

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): update via SDK Studio (#467)
1 parent 8f7435e commit bce1bf4

19 files changed

+70
-29
lines changed

api.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@ Methods:
4242
Types:
4343

4444
```python
45-
from cloudflare.types.accounts import UserWithInviteCode, MemberListResponse, MemberDeleteResponse
45+
from cloudflare.types.accounts import (
46+
MemberStatus,
47+
UserWithInviteCode,
48+
MemberListResponse,
49+
MemberDeleteResponse,
50+
)
4651
```
4752

4853
Methods:
@@ -1390,7 +1395,11 @@ Methods:
13901395
Types:
13911396

13921397
```python
1393-
from cloudflare.types.acm import TotalTLSCreateResponse, TotalTLSGetResponse
1398+
from cloudflare.types.acm import (
1399+
TotalTLSCertificateAuthority,
1400+
TotalTLSCreateResponse,
1401+
TotalTLSGetResponse,
1402+
)
13941403
```
13951404

13961405
Methods:
@@ -3225,6 +3234,7 @@ Types:
32253234
```python
32263235
from cloudflare.types.addressing import (
32273236
AddressMap,
3237+
AddressMapKind,
32283238
AddressMapCreateResponse,
32293239
AddressMapDeleteResponse,
32303240
AddressMapGetResponse,

src/cloudflare/resources/acm/total_tls.py

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

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

87
import httpx
98

@@ -21,12 +20,13 @@
2120
async_to_streamed_response_wrapper,
2221
)
2322
from ..._wrappers import ResultWrapper
24-
from ...types.acm import total_tls_create_params
23+
from ...types.acm import TotalTLSCertificateAuthority, total_tls_create_params
2524
from ..._base_client import (
2625
make_request_options,
2726
)
2827
from ...types.acm.total_tls_get_response import TotalTLSGetResponse
2928
from ...types.acm.total_tls_create_response import TotalTLSCreateResponse
29+
from ...types.acm.total_tls_certificate_authority import TotalTLSCertificateAuthority
3030

3131
__all__ = ["TotalTLSResource", "AsyncTotalTLSResource"]
3232

@@ -45,7 +45,7 @@ def create(
4545
*,
4646
zone_id: str,
4747
enabled: bool,
48-
certificate_authority: Literal["google", "lets_encrypt"] | NotGiven = NOT_GIVEN,
48+
certificate_authority: TotalTLSCertificateAuthority | NotGiven = NOT_GIVEN,
4949
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5050
# The extra values given here take precedence over values defined on the client or passed to this method.
5151
extra_headers: Headers | None = None,
@@ -147,7 +147,7 @@ async def create(
147147
*,
148148
zone_id: str,
149149
enabled: bool,
150-
certificate_authority: Literal["google", "lets_encrypt"] | NotGiven = NOT_GIVEN,
150+
certificate_authority: TotalTLSCertificateAuthority | NotGiven = NOT_GIVEN,
151151
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
152152
# The extra values given here take precedence over values defined on the client or passed to this method.
153153
extra_headers: Headers | None = None,

src/cloudflare/types/accounts/__init__.py

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

55
from .account import Account as Account
6+
from .member_status import MemberStatus as MemberStatus
67
from .role_get_response import RoleGetResponse as RoleGetResponse
78
from .member_list_params import MemberListParams as MemberListParams
89
from .account_list_params import AccountListParams as AccountListParams
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__ = ["MemberStatus"]
6+
7+
MemberStatus = Literal["member", "invited"]

src/cloudflare/types/acm/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
from .total_tls_get_response import TotalTLSGetResponse as TotalTLSGetResponse
66
from .total_tls_create_params import TotalTLSCreateParams as TotalTLSCreateParams
77
from .total_tls_create_response import TotalTLSCreateResponse as TotalTLSCreateResponse
8+
from .total_tls_certificate_authority import TotalTLSCertificateAuthority as TotalTLSCertificateAuthority
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__ = ["TotalTLSCertificateAuthority"]
6+
7+
TotalTLSCertificateAuthority = Literal["google", "lets_encrypt"]

src/cloudflare/types/acm/total_tls_create_params.py

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

33
from __future__ import annotations
44

5-
from typing_extensions import Literal, Required, TypedDict
5+
from typing_extensions import Required, TypedDict
6+
7+
from .total_tls_certificate_authority import TotalTLSCertificateAuthority
68

79
__all__ = ["TotalTLSCreateParams"]
810

@@ -17,5 +19,5 @@ class TotalTLSCreateParams(TypedDict, total=False):
1719
proxied A, AAAA, or CNAME record in your zone.
1820
"""
1921

20-
certificate_authority: Literal["google", "lets_encrypt"]
22+
certificate_authority: TotalTLSCertificateAuthority
2123
"""The Certificate Authority that Total TLS certificates will be issued through."""

src/cloudflare/types/acm/total_tls_create_response.py

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

66
from ..._models import BaseModel
7+
from .total_tls_certificate_authority import TotalTLSCertificateAuthority
78

89
__all__ = ["TotalTLSCreateResponse"]
910

1011

1112
class TotalTLSCreateResponse(BaseModel):
12-
certificate_authority: Optional[Literal["google", "lets_encrypt"]] = None
13+
certificate_authority: Optional[TotalTLSCertificateAuthority] = None
1314
"""The Certificate Authority that Total TLS certificates will be issued through."""
1415

1516
enabled: Optional[bool] = None

src/cloudflare/types/acm/total_tls_get_response.py

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

66
from ..._models import BaseModel
7+
from .total_tls_certificate_authority import TotalTLSCertificateAuthority
78

89
__all__ = ["TotalTLSGetResponse"]
910

1011

1112
class TotalTLSGetResponse(BaseModel):
12-
certificate_authority: Optional[Literal["google", "lets_encrypt"]] = None
13+
certificate_authority: Optional[TotalTLSCertificateAuthority] = None
1314
"""The Certificate Authority that Total TLS certificates will be issued through."""
1415

1516
enabled: Optional[bool] = None

src/cloudflare/types/addressing/__init__.py

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

55
from .prefix import Prefix as Prefix
66
from .address_map import AddressMap as AddressMap
7+
from .address_map_kind import AddressMapKind as AddressMapKind
78
from .prefix_edit_params import PrefixEditParams as PrefixEditParams
89
from .prefix_create_params import PrefixCreateParams as PrefixCreateParams
910
from .service_list_response import ServiceListResponse as ServiceListResponse

src/cloudflare/types/addressing/address_map_create_response.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 .address_map_kind import AddressMapKind
88

99
__all__ = ["AddressMapCreateResponse", "IP", "Membership"]
1010

@@ -25,7 +25,7 @@ class Membership(BaseModel):
2525
identifier: Optional[str] = None
2626
"""Identifier"""
2727

28-
kind: Optional[Literal["zone", "account"]] = None
28+
kind: Optional[AddressMapKind] = None
2929
"""The type of the membership."""
3030

3131

src/cloudflare/types/addressing/address_map_get_response.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 .address_map_kind import AddressMapKind
88

99
__all__ = ["AddressMapGetResponse", "IP", "Membership"]
1010

@@ -25,7 +25,7 @@ class Membership(BaseModel):
2525
identifier: Optional[str] = None
2626
"""Identifier"""
2727

28-
kind: Optional[Literal["zone", "account"]] = None
28+
kind: Optional[AddressMapKind] = None
2929
"""The type of the membership."""
3030

3131

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__ = ["AddressMapKind"]
6+
7+
AddressMapKind = Literal["zone", "account"]

src/cloudflare/types/rulesets/route_rule.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from .logging import Logging
88
from ..._models import BaseModel
99

10-
__all__ = ["RouteRule", "ActionParameters", "ActionParametersOrigin", "ActionParametersSni"]
10+
__all__ = ["RouteRule", "ActionParameters", "ActionParametersOrigin", "ActionParametersSNI"]
1111

1212

1313
class ActionParametersOrigin(BaseModel):
@@ -18,7 +18,7 @@ class ActionParametersOrigin(BaseModel):
1818
"""Override the destination port."""
1919

2020

21-
class ActionParametersSni(BaseModel):
21+
class ActionParametersSNI(BaseModel):
2222
value: str
2323
"""The SNI override."""
2424

@@ -30,7 +30,7 @@ class ActionParameters(BaseModel):
3030
origin: Optional[ActionParametersOrigin] = None
3131
"""Override the IP/TCP destination."""
3232

33-
sni: Optional[ActionParametersSni] = None
33+
sni: Optional[ActionParametersSNI] = None
3434
"""Override the Server Name Indication (SNI)."""
3535

3636

src/cloudflare/types/rulesets/route_rule_param.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from .logging_param import LoggingParam
88

9-
__all__ = ["RouteRuleParam", "ActionParameters", "ActionParametersOrigin", "ActionParametersSni"]
9+
__all__ = ["RouteRuleParam", "ActionParameters", "ActionParametersOrigin", "ActionParametersSNI"]
1010

1111

1212
class ActionParametersOrigin(TypedDict, total=False):
@@ -17,7 +17,7 @@ class ActionParametersOrigin(TypedDict, total=False):
1717
"""Override the destination port."""
1818

1919

20-
class ActionParametersSni(TypedDict, total=False):
20+
class ActionParametersSNI(TypedDict, total=False):
2121
value: Required[str]
2222
"""The SNI override."""
2323

@@ -29,7 +29,7 @@ class ActionParameters(TypedDict, total=False):
2929
origin: ActionParametersOrigin
3030
"""Override the IP/TCP destination."""
3131

32-
sni: ActionParametersSni
32+
sni: ActionParametersSNI
3333
"""Override the Server Name Indication (SNI)."""
3434

3535

src/cloudflare/types/rulesets/rule_create_params.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"RouteRule",
4444
"RouteRuleActionParameters",
4545
"RouteRuleActionParametersOrigin",
46-
"RouteRuleActionParametersSni",
46+
"RouteRuleActionParametersSNI",
4747
"ScoreRule",
4848
"ScoreRuleActionParameters",
4949
"ServeErrorRule",
@@ -588,7 +588,7 @@ class RouteRuleActionParametersOrigin(TypedDict, total=False):
588588
"""Override the destination port."""
589589

590590

591-
class RouteRuleActionParametersSni(TypedDict, total=False):
591+
class RouteRuleActionParametersSNI(TypedDict, total=False):
592592
value: Required[str]
593593
"""The SNI override."""
594594

@@ -600,7 +600,7 @@ class RouteRuleActionParameters(TypedDict, total=False):
600600
origin: RouteRuleActionParametersOrigin
601601
"""Override the IP/TCP destination."""
602602

603-
sni: RouteRuleActionParametersSni
603+
sni: RouteRuleActionParametersSNI
604604
"""Override the Server Name Indication (SNI)."""
605605

606606

src/cloudflare/types/rulesets/rule_edit_params.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"RouteRule",
4444
"RouteRuleActionParameters",
4545
"RouteRuleActionParametersOrigin",
46-
"RouteRuleActionParametersSni",
46+
"RouteRuleActionParametersSNI",
4747
"ScoreRule",
4848
"ScoreRuleActionParameters",
4949
"ServeErrorRule",
@@ -618,7 +618,7 @@ class RouteRuleActionParametersOrigin(TypedDict, total=False):
618618
"""Override the destination port."""
619619

620620

621-
class RouteRuleActionParametersSni(TypedDict, total=False):
621+
class RouteRuleActionParametersSNI(TypedDict, total=False):
622622
value: Required[str]
623623
"""The SNI override."""
624624

@@ -630,7 +630,7 @@ class RouteRuleActionParameters(TypedDict, total=False):
630630
origin: RouteRuleActionParametersOrigin
631631
"""Override the IP/TCP destination."""
632632

633-
sni: RouteRuleActionParametersSni
633+
sni: RouteRuleActionParametersSNI
634634
"""Override the Server Name Indication (SNI)."""
635635

636636

src/cloudflare/types/user/organization.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
from typing import List, Optional
4-
from typing_extensions import Literal
54

65
from ..._models import BaseModel
76
from ..shared.permission import Permission
7+
from ..accounts.member_status import MemberStatus
88

99
__all__ = ["Organization"]
1010

@@ -22,5 +22,5 @@ class Organization(BaseModel):
2222
roles: Optional[List[str]] = None
2323
"""List of roles that a user has within an organization."""
2424

25-
status: Optional[Literal["member", "invited"]] = None
25+
status: Optional[MemberStatus] = None
2626
"""Whether the user is a member of the organization or has an inivitation pending."""

tests/api_resources/acm/test_total_tls.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99

1010
from cloudflare import Cloudflare, AsyncCloudflare
1111
from tests.utils import assert_matches_type
12-
from cloudflare.types.acm import TotalTLSGetResponse, TotalTLSCreateResponse
12+
from cloudflare.types.acm import (
13+
TotalTLSGetResponse,
14+
TotalTLSCreateResponse,
15+
)
1316

1417
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
1518

0 commit comments

Comments
 (0)