Skip to content

Commit 44c9de7

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): api update (#2167)
1 parent cd21ed6 commit 44c9de7

11 files changed

+250
-212
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 1417
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-be2691c434328287926707d60e7e55c671a53351999dc9a67ca971e84fa499f6.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3019ca36c889678c47db09abc7882daa9c50171912385a7bff7d83dcb3e95d57.yml

api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,7 @@ Methods:
10391039
Types:
10401040

10411041
```python
1042-
from cloudflare.types.dns import DNSSetting, Nameserver, SettingEditResponse, SettingGetResponse
1042+
from cloudflare.types.dns import DNSSetting, SettingEditResponse, SettingGetResponse
10431043
```
10441044

10451045
Methods:

src/cloudflare/resources/dns/settings/settings.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
from ...._wrappers import ResultWrapper
3131
from ....types.dns import setting_edit_params
3232
from ...._base_client import make_request_options
33-
from ....types.dns.dns_setting_param import DNSSettingParam
3433
from ....types.dns.setting_get_response import SettingGetResponse
3534
from ....types.dns.setting_edit_response import SettingEditResponse
3635

@@ -66,7 +65,7 @@ def edit(
6665
*,
6766
account_id: str | NotGiven = NOT_GIVEN,
6867
zone_id: str | NotGiven = NOT_GIVEN,
69-
zone_defaults: DNSSettingParam | NotGiven = NOT_GIVEN,
68+
zone_defaults: setting_edit_params.ZoneDefaults | NotGiven = NOT_GIVEN,
7069
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
7170
# The extra values given here take precedence over values defined on the client or passed to this method.
7271
extra_headers: Headers | None = None,
@@ -197,7 +196,7 @@ async def edit(
197196
*,
198197
account_id: str | NotGiven = NOT_GIVEN,
199198
zone_id: str | NotGiven = NOT_GIVEN,
200-
zone_defaults: DNSSettingParam | NotGiven = NOT_GIVEN,
199+
zone_defaults: setting_edit_params.ZoneDefaults | NotGiven = NOT_GIVEN,
201200
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
202201
# The extra values given here take precedence over values defined on the client or passed to this method.
203202
extra_headers: Headers | None = None,

src/cloudflare/types/dns/__init__.py

-4
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@
88
from .ns_record import NSRecord as NSRecord
99
from .caa_record import CAARecord as CAARecord
1010
from .loc_record import LOCRecord as LOCRecord
11-
from .nameserver import Nameserver as Nameserver
1211
from .ptr_record import PTRRecord as PTRRecord
1312
from .srv_record import SRVRecord as SRVRecord
1413
from .txt_record import TXTRecord as TXTRecord
1514
from .uri_record import URIRecord as URIRecord
1615
from .aaaa_record import AAAARecord as AAAARecord
1716
from .cert_record import CERTRecord as CERTRecord
18-
from .dns_setting import DNSSetting as DNSSetting
1917
from .record_tags import RecordTags as RecordTags
2018
from .svcb_record import SVCBRecord as SVCBRecord
2119
from .tlsa_record import TLSARecord as TLSARecord
@@ -34,15 +32,13 @@
3432
from .ns_record_param import NSRecordParam as NSRecordParam
3533
from .caa_record_param import CAARecordParam as CAARecordParam
3634
from .loc_record_param import LOCRecordParam as LOCRecordParam
37-
from .nameserver_param import NameserverParam as NameserverParam
3835
from .ptr_record_param import PTRRecordParam as PTRRecordParam
3936
from .srv_record_param import SRVRecordParam as SRVRecordParam
4037
from .txt_record_param import TXTRecordParam as TXTRecordParam
4138
from .uri_record_param import URIRecordParam as URIRecordParam
4239
from .aaaa_record_param import AAAARecordParam as AAAARecordParam
4340
from .attack_mitigation import AttackMitigation as AttackMitigation
4441
from .cert_record_param import CERTRecordParam as CERTRecordParam
45-
from .dns_setting_param import DNSSettingParam as DNSSettingParam
4642
from .svcb_record_param import SVCBRecordParam as SVCBRecordParam
4743
from .tlsa_record_param import TLSARecordParam as TLSARecordParam
4844
from .cname_record_param import CNAMERecordParam as CNAMERecordParam

src/cloudflare/types/dns/dns_setting.py

-83
This file was deleted.

src/cloudflare/types/dns/dns_setting_param.py

-83
This file was deleted.

src/cloudflare/types/dns/nameserver.py

-12
This file was deleted.

src/cloudflare/types/dns/nameserver_param.py

-14
This file was deleted.

src/cloudflare/types/dns/setting_edit_params.py

+82-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22

33
from __future__ import annotations
44

5-
from typing_extensions import TypedDict
5+
from typing_extensions import Literal, Required, TypedDict
66

7-
from .dns_setting_param import DNSSettingParam
8-
9-
__all__ = ["SettingEditParams"]
7+
__all__ = ["SettingEditParams", "ZoneDefaults", "ZoneDefaultsNameservers", "ZoneDefaultsSOA"]
108

119

1210
class SettingEditParams(TypedDict, total=False):
@@ -16,4 +14,83 @@ class SettingEditParams(TypedDict, total=False):
1614
zone_id: str
1715
"""The Zone ID to use for this endpoint. Mutually exclusive with the Account ID."""
1816

19-
zone_defaults: DNSSettingParam
17+
zone_defaults: ZoneDefaults
18+
19+
20+
class ZoneDefaultsNameservers(TypedDict, total=False):
21+
type: Required[Literal["cloudflare.standard", "cloudflare.standard.random", "custom.account", "custom.tenant"]]
22+
"""Nameserver type"""
23+
24+
25+
class ZoneDefaultsSOA(TypedDict, total=False):
26+
expire: Required[float]
27+
"""
28+
Time in seconds of being unable to query the primary server after which
29+
secondary servers should stop serving the zone.
30+
"""
31+
32+
min_ttl: Required[float]
33+
"""The time to live (TTL) for negative caching of records within the zone."""
34+
35+
mname: Required[str]
36+
"""The primary nameserver, which may be used for outbound zone transfers."""
37+
38+
refresh: Required[float]
39+
"""
40+
Time in seconds after which secondary servers should re-check the SOA record to
41+
see if the zone has been updated.
42+
"""
43+
44+
retry: Required[float]
45+
"""
46+
Time in seconds after which secondary servers should retry queries after the
47+
primary server was unresponsive.
48+
"""
49+
50+
rname: Required[str]
51+
"""
52+
The email address of the zone administrator, with the first label representing
53+
the local part of the email address.
54+
"""
55+
56+
ttl: Required[float]
57+
"""The time to live (TTL) of the SOA record itself."""
58+
59+
60+
class ZoneDefaults(TypedDict, total=False):
61+
flatten_all_cnames: bool
62+
"""Whether to flatten all CNAME records in the zone.
63+
64+
Note that, due to DNS limitations, a CNAME record at the zone apex will always
65+
be flattened.
66+
"""
67+
68+
foundation_dns: bool
69+
"""Whether to enable Foundation DNS Advanced Nameservers on the zone."""
70+
71+
multi_provider: bool
72+
"""
73+
Whether to enable multi-provider DNS, which causes Cloudflare to activate the
74+
zone even when non-Cloudflare NS records exist, and to respect NS records at the
75+
zone apex during outbound zone transfers.
76+
"""
77+
78+
nameservers: ZoneDefaultsNameservers
79+
"""
80+
Settings determining the nameservers through which the zone should be available.
81+
"""
82+
83+
ns_ttl: float
84+
"""The time to live (TTL) of the zone's nameserver (NS) records."""
85+
86+
secondary_overrides: bool
87+
"""
88+
Allows a Secondary DNS zone to use (proxied) override records and CNAME
89+
flattening at the zone apex.
90+
"""
91+
92+
soa: ZoneDefaultsSOA
93+
"""Components of the zone's SOA record."""
94+
95+
zone_mode: Literal["standard", "cdn_only", "dns_only"]
96+
"""Whether the zone mode is a regular or CDN/DNS only zone."""

0 commit comments

Comments
 (0)