UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

46 lines • 1.93 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UpdateStatus = exports.BaseUpdateStatus = void 0; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. const resource_1 = require("../../core/resource.js"); const path_1 = require("../../internal/utils/path.js"); var BaseUpdateStatus = /* @__PURE__ */ (() => { class BaseUpdateStatus extends resource_1.APIResource { /** * Returns the current status of a domain update workflow. * * Use this endpoint to poll for completion when the PATCH response returned * `202 Accepted`. The URL is provided in the `links.self` field of the workflow * status response. * * Poll this endpoint until the workflow reaches a terminal state or a state that * requires user attention. * * Use increasing backoff between polls. When the workflow remains blocked on a * third party, use a longer polling interval and do not poll indefinitely. * * @example * ```ts * const updateStatus = * await client.registrarSandbox.updateStatus.get( * 'example.com', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ get(domainName, params, options) { const { account_id } = params; return this._client.get((0, path_1.path) `/accounts/${account_id}/registrar-sandbox/registrations/${domainName}/update-status`, options)._thenUnwrap((obj) => obj.result); } } BaseUpdateStatus._key = Object.freeze([ 'registrarSandbox', 'updateStatus', ]); return BaseUpdateStatus; })(); exports.BaseUpdateStatus = BaseUpdateStatus; class UpdateStatus extends BaseUpdateStatus { } exports.UpdateStatus = UpdateStatus; //# sourceMappingURL=update-status.js.map