cloudflare
Version:
The official TypeScript library for the Cloudflare API
50 lines • 1.84 kB
JavaScript
;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.CustomNameservers = void 0;
const resource_1 = require("cloudflare/resource");
class CustomNameservers extends resource_1.APIResource {
/**
* Add Account Custom Nameserver
*/
create(params, options) {
const { account_id, ...body } = params;
return this._client.post(`/accounts/${account_id}/custom_ns`, { body, ...options })._thenUnwrap((obj) => obj.result);
}
/**
* Delete Account Custom Nameserver
*/
delete(customNSId, params, options) {
const { account_id, body } = params;
return this._client.delete(`/accounts/${account_id}/custom_ns/${customNSId}`, {
body: body,
...options,
})._thenUnwrap((obj) => obj.result);
}
/**
* Get Eligible Zones for Account Custom Nameservers
*/
availabilty(params, options) {
const { account_id } = params;
return this._client.get(`/accounts/${account_id}/custom_ns/availability`, options)._thenUnwrap((obj) => obj.result);
}
/**
* List an account's custom nameservers.
*/
get(params, options) {
const { account_id } = params;
return this._client.get(`/accounts/${account_id}/custom_ns`, options)._thenUnwrap((obj) => obj.result);
}
/**
* Verify Account Custom Nameserver Glue Records
*/
verify(params, options) {
const { account_id, body } = params;
return this._client.post(`/accounts/${account_id}/custom_ns/verify`, {
body: body,
...options,
})._thenUnwrap((obj) => obj.result);
}
}
exports.CustomNameservers = CustomNameservers;
//# sourceMappingURL=custom-nameservers.js.map