Skip to content
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
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1417
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-be2691c434328287926707d60e7e55c671a53351999dc9a67ca971e84fa499f6.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3019ca36c889678c47db09abc7882daa9c50171912385a7bff7d83dcb3e95d57.yml
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ Methods:
Types:

```python
from cloudflare.types.dns import DNSSetting, Nameserver, SettingEditResponse, SettingGetResponse
from cloudflare.types.dns import DNSSetting, SettingEditResponse, SettingGetResponse
```

Methods:
Expand Down
5 changes: 2 additions & 3 deletions src/cloudflare/resources/dns/settings/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
from ...._wrappers import ResultWrapper
from ....types.dns import setting_edit_params
from ...._base_client import make_request_options
from ....types.dns.dns_setting_param import DNSSettingParam
from ....types.dns.setting_get_response import SettingGetResponse
from ....types.dns.setting_edit_response import SettingEditResponse

Expand Down Expand Up @@ -66,7 +65,7 @@ def edit(
*,
account_id: str | NotGiven = NOT_GIVEN,
zone_id: str | NotGiven = NOT_GIVEN,
zone_defaults: DNSSettingParam | NotGiven = NOT_GIVEN,
zone_defaults: setting_edit_params.ZoneDefaults | 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 @@ -197,7 +196,7 @@ async def edit(
*,
account_id: str | NotGiven = NOT_GIVEN,
zone_id: str | NotGiven = NOT_GIVEN,
zone_defaults: DNSSettingParam | NotGiven = NOT_GIVEN,
zone_defaults: setting_edit_params.ZoneDefaults | 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
4 changes: 0 additions & 4 deletions src/cloudflare/types/dns/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@
from .ns_record import NSRecord as NSRecord
from .caa_record import CAARecord as CAARecord
from .loc_record import LOCRecord as LOCRecord
from .nameserver import Nameserver as Nameserver
from .ptr_record import PTRRecord as PTRRecord
from .srv_record import SRVRecord as SRVRecord
from .txt_record import TXTRecord as TXTRecord
from .uri_record import URIRecord as URIRecord
from .aaaa_record import AAAARecord as AAAARecord
from .cert_record import CERTRecord as CERTRecord
from .dns_setting import DNSSetting as DNSSetting
from .record_tags import RecordTags as RecordTags
from .svcb_record import SVCBRecord as SVCBRecord
from .tlsa_record import TLSARecord as TLSARecord
Expand All @@ -34,15 +32,13 @@
from .ns_record_param import NSRecordParam as NSRecordParam
from .caa_record_param import CAARecordParam as CAARecordParam
from .loc_record_param import LOCRecordParam as LOCRecordParam
from .nameserver_param import NameserverParam as NameserverParam
from .ptr_record_param import PTRRecordParam as PTRRecordParam
from .srv_record_param import SRVRecordParam as SRVRecordParam
from .txt_record_param import TXTRecordParam as TXTRecordParam
from .uri_record_param import URIRecordParam as URIRecordParam
from .aaaa_record_param import AAAARecordParam as AAAARecordParam
from .attack_mitigation import AttackMitigation as AttackMitigation
from .cert_record_param import CERTRecordParam as CERTRecordParam
from .dns_setting_param import DNSSettingParam as DNSSettingParam
from .svcb_record_param import SVCBRecordParam as SVCBRecordParam
from .tlsa_record_param import TLSARecordParam as TLSARecordParam
from .cname_record_param import CNAMERecordParam as CNAMERecordParam
Expand Down
83 changes: 0 additions & 83 deletions src/cloudflare/types/dns/dns_setting.py

This file was deleted.

83 changes: 0 additions & 83 deletions src/cloudflare/types/dns/dns_setting_param.py

This file was deleted.

12 changes: 0 additions & 12 deletions src/cloudflare/types/dns/nameserver.py

This file was deleted.

14 changes: 0 additions & 14 deletions src/cloudflare/types/dns/nameserver_param.py

This file was deleted.

87 changes: 82 additions & 5 deletions src/cloudflare/types/dns/setting_edit_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

from __future__ import annotations

from typing_extensions import TypedDict
from typing_extensions import Literal, Required, TypedDict

from .dns_setting_param import DNSSettingParam

__all__ = ["SettingEditParams"]
__all__ = ["SettingEditParams", "ZoneDefaults", "ZoneDefaultsNameservers", "ZoneDefaultsSOA"]


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

zone_defaults: DNSSettingParam
zone_defaults: ZoneDefaults


class ZoneDefaultsNameservers(TypedDict, total=False):
type: Required[Literal["cloudflare.standard", "cloudflare.standard.random", "custom.account", "custom.tenant"]]
"""Nameserver type"""


class ZoneDefaultsSOA(TypedDict, total=False):
expire: Required[float]
"""
Time in seconds of being unable to query the primary server after which
secondary servers should stop serving the zone.
"""

min_ttl: Required[float]
"""The time to live (TTL) for negative caching of records within the zone."""

mname: Required[str]
"""The primary nameserver, which may be used for outbound zone transfers."""

refresh: Required[float]
"""
Time in seconds after which secondary servers should re-check the SOA record to
see if the zone has been updated.
"""

retry: Required[float]
"""
Time in seconds after which secondary servers should retry queries after the
primary server was unresponsive.
"""

rname: Required[str]
"""
The email address of the zone administrator, with the first label representing
the local part of the email address.
"""

ttl: Required[float]
"""The time to live (TTL) of the SOA record itself."""


class ZoneDefaults(TypedDict, total=False):
flatten_all_cnames: bool
"""Whether to flatten all CNAME records in the zone.

Note that, due to DNS limitations, a CNAME record at the zone apex will always
be flattened.
"""

foundation_dns: bool
"""Whether to enable Foundation DNS Advanced Nameservers on the zone."""

multi_provider: bool
"""
Whether to enable multi-provider DNS, which causes Cloudflare to activate the
zone even when non-Cloudflare NS records exist, and to respect NS records at the
zone apex during outbound zone transfers.
"""

nameservers: ZoneDefaultsNameservers
"""
Settings determining the nameservers through which the zone should be available.
"""

ns_ttl: float
"""The time to live (TTL) of the zone's nameserver (NS) records."""

secondary_overrides: bool
"""
Allows a Secondary DNS zone to use (proxied) override records and CNAME
flattening at the zone apex.
"""

soa: ZoneDefaultsSOA
"""Components of the zone's SOA record."""

zone_mode: Literal["standard", "cdn_only", "dns_only"]
"""Whether the zone mode is a regular or CDN/DNS only zone."""
Loading