cloudflare
Version:
The official TypeScript library for the Cloudflare API
68 lines • 3.21 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../core/resource.mjs";
import { path } from "../../internal/utils/path.mjs";
export var BaseTransferInStatus = /* @__PURE__ */ (() => {
class BaseTransferInStatus extends APIResource {
/**
* Returns the current status of a domain transfer workflow.
*
* Use this endpoint to poll transfer progress after initiating a transfer with
* `POST /accounts/{account_id}/registrar/registrations/{domain_name}/transfer-in`.
* The URL is provided in the `links.self` field of the transfer response.
*
* ### Transfer timelines
*
* Transfers typically take 1–10 days due to ICANN-mandated approval windows.
*
* ### Workflow states
*
* **Terminal states:** `succeeded` and `failed` are terminal and always have
* `completed: true`.
*
* **Non-terminal states:**
*
* - `in_progress`: Transfer has been submitted to the registry and is being
* processed. Continue polling.
* - `blocked`: The workflow is waiting on the losing registrar or registry to
* release the domain. This is the **most common state** for transfers and is
* entirely normal — it means the ICANN transfer approval window is in effect.
* The losing registrar has up to 5 days to approve or reject. Continue polling
* with longer intervals (e.g., every 30–60 minutes).
* - `action_required`: The user needs to take action (e.g., the FOA email needs to
* be accepted). See `context` for details on what is needed.
* - `pending`: Transfer workflow created but not yet started processing.
*
* ### Polling guidance
*
* Adjust your polling interval based on the current workflow state:
*
* - `pending` or `in_progress`: Poll every 30 seconds.
* - `blocked`: The transfer is waiting on a third party (e.g., losing registrar
* approval). Poll every 30–60 minutes.
* - `action_required`: Stop polling. The workflow will not advance until the user
* takes action. Check `context` for details on what is needed.
* - `succeeded` or `failed`: Terminal — stop polling.
*
* @example
* ```ts
* const workflowStatus =
* await client.registrar.transferInStatus.get(
* 'example.com',
* { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* );
* ```
*/
get(domainName, params, options) {
const { account_id } = params;
return this._client.get(path `/accounts/${account_id}/registrar/registrations/${domainName}/transfer-in-status`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseTransferInStatus._key = Object.freeze([
'registrar',
'transferInStatus',
]);
return BaseTransferInStatus;
})();
export class TransferInStatus extends BaseTransferInStatus {
}
//# sourceMappingURL=transfer-in-status.mjs.map