Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Apr 10, 2024
1 parent c108be3 commit e9b10b4
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
36 changes: 36 additions & 0 deletions src/resources/zones/dns-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,28 @@ export class DNSSettings extends APIResource {
}

export interface DNSSetting {
/**
* Whether to enable Foundation DNS Advanced Nameservers on the zone.
*/
foundation_dns?: boolean;

/**
* 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.
*/
multi_provider?: boolean;

/**
* Settings determining the nameservers through which the zone should be available.
*/
nameservers?: Nameserver;

/**
* Allows a Secondary DNS zone to use (proxied) override records and CNAME
* flattening at the zone apex.
*/
secondary_overrides?: boolean;
}

/**
Expand All @@ -51,11 +69,29 @@ export interface DNSSettingEditParams {
*/
zone_id: string;

/**
* Body param: Whether to enable Foundation DNS Advanced Nameservers on the zone.
*/
foundation_dns?: boolean;

/**
* Body param: 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.
*/
multi_provider?: boolean;

/**
* Body param: Settings determining the nameservers through which the zone should
* be available.
*/
nameservers?: Nameserver;

/**
* Body param: Allows a Secondary DNS zone to use (proxied) override records and
* CNAME flattening at the zone apex.
*/
secondary_overrides?: boolean;
}

export interface DNSSettingGetParams {
Expand Down
3 changes: 3 additions & 0 deletions tests/api-resources/zones/dns-settings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ describe('resource dnsSettings', () => {
test.skip('edit: required and optional params', async () => {
const response = await cloudflare.zones.dnsSettings.edit({
zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
foundation_dns: false,
multi_provider: false,
nameservers: { type: 'cloudflare.standard' },
secondary_overrides: false,
});
});

Expand Down

0 comments on commit e9b10b4

Please sign in to comment.