cloudflare
Version:
The official TypeScript library for the Cloudflare API
46 lines • 2.4 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../core/resource.mjs";
import { SinglePage } from "../../core/pagination.mjs";
import { path } from "../../internal/utils/path.mjs";
export var BaseDomains = /* @__PURE__ */ (() => {
class BaseDomains extends 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(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(path `/accounts/${account_id}/registrar/domains`, (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(path `/accounts/${account_id}/registrar/domains/${domainName}`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseDomains._key = Object.freeze([
'registrar',
'domains',
]);
return BaseDomains;
})();
export class Domains extends BaseDomains {
}
//# sourceMappingURL=domains.mjs.map