cloudflare
Version:
The official TypeScript library for the Cloudflare API
51 lines • 2.63 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Domains = exports.BaseDomains = void 0;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
const resource_1 = require("../../core/resource.js");
const pagination_1 = require("../../core/pagination.js");
const path_1 = require("../../internal/utils/path.js");
var BaseDomains = /* @__PURE__ */ (() => {
class BaseDomains extends resource_1.APIResource {
/**
* Updates an individual domain.
*
* @deprecated This operation is deprecated and will reach end of life on September 27, 2026. Use the new Registrar API endpoints (domain-search, domain-check, registrations) instead. Refer to https://developers.cloudflare.com/fundamentals/api/reference/deprecations/ for details.
*/
update(domainName, params, options) {
const { account_id, ...body } = params;
return this._client.put((0, path_1.path) `/accounts/${account_id}/registrar/domains/${domainName}`, {
body,
...options,
})._thenUnwrap((obj) => obj.result);
}
/**
* Lists domains handled by Registrar.
*
* @deprecated This operation is deprecated and will reach end of life on September 27, 2026. Use the new Registrar API endpoints (domain-search, domain-check, registrations) instead. Refer to https://developers.cloudflare.com/fundamentals/api/reference/deprecations/ for details.
*/
list(params, options) {
const { account_id } = params;
return this._client.getAPIList((0, path_1.path) `/accounts/${account_id}/registrar/domains`, (pagination_1.SinglePage), options);
}
/**
* Show individual domain.
*
* @deprecated This operation is deprecated and will reach end of life on September 27, 2026. Use the new Registrar API endpoints (domain-search, domain-check, registrations) instead. Refer to https://developers.cloudflare.com/fundamentals/api/reference/deprecations/ for details.
*/
get(domainName, params, options) {
const { account_id } = params;
return this._client.get((0, path_1.path) `/accounts/${account_id}/registrar/domains/${domainName}`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseDomains._key = Object.freeze([
'registrar',
'domains',
]);
return BaseDomains;
})();
exports.BaseDomains = BaseDomains;
class Domains extends BaseDomains {
}
exports.Domains = Domains;
//# sourceMappingURL=domains.js.map