/** * Verification code utility functions. */ /** Response shape from POST surecart/v1/verification_codes. */ export interface VerificationCodeResponse { email?: string; /** False when an in-window request resumed an existing code instead of sending a new email. */ email_sent?: boolean; resend_available_at?: number; resend_available_in?: number; } /** Fallback resend window (seconds) used when the platform doesn't provide one. */ export declare const RESEND_COOLDOWN_SECONDS = 60; /** Whole seconds from now until an absolute timestamp (ms); 0 if unset or already past. */ export declare const secondsUntil: (timestampMs?: number | null) => number; /** * The platform's resend backoff (in seconds) carried in a verification-code error. * Present on `blocked_duplicate` responses; returns null when absent or non-positive. */ export declare const getBlockedDuplicateSeconds: (error: any) => number | null; /** * Absolute ms timestamp when a resend becomes available, from a platform-provided * seconds value. * * - `null`/`undefined` means the window is unknown → fall back to the default so * callers always get a concrete anchor (never an unset cooldown). * - A numeric `0` (or negative) is a real "available now" signal (e.g. the window * lapsed by the time the request resolved) → anchor at now so the resend link * shows immediately instead of imposing another full cooldown. */ export declare const resendAnchorFrom: (seconds?: number | null) => number;