/** Injectable wait seam — the default is real `setTimeout`; tests pass a synchronous recorder. */
export type FigmaRetrySleep = (ms: number) => Promise<void>;
export interface FigmaRetryPolicy {
    /** Maximum extra attempts after the first; total attempts = maxRetries + 1. */
    readonly maxRetries: number;
    /** First backoff delay in ms; subsequent delays double until `maxDelayMs`. */
    readonly baseDelayMs: number;
    /** Hard ceiling for any single delay (computed or `Retry-After`) — prevents unbounded waits. */
    readonly maxDelayMs: number;
}
/**
 * Bounded, conservative default well inside Figma's documented limits. Patient enough (8 retries,
 * 45s ceiling) that the multi-fetch deep scoped-pagination build (#837) absorbs the cost-based 429
 * bursts a large board provokes instead of aborting, while staying finite so a genuinely down API
 * still fails fast-ish.
 */
export declare const DEFAULT_FIGMA_RETRY_POLICY: FigmaRetryPolicy;
/** The minimum a backoff-capable response must expose: a status and (lower-cased) headers. */
export interface FigmaBackoffResponse {
    readonly status: number;
    readonly headers?: Readonly<Record<string, string>>;
}
/** The real-timer sleep used by the default ports. */
export declare const realFigmaRetrySleep: FigmaRetrySleep;
/**
 * Run `operation` (a single attempt), retrying ONLY on HTTP 429 with deterministic exponential
 * backoff up to `policy.maxRetries`. Honours a numeric `Retry-After` over the computed delay.
 * Throws FIGMA_RATE_LIMITED once the bounded retries are exhausted; never retries a non-429.
 */
export declare const fetchWithBackoff: <R extends FigmaBackoffResponse>(operation: () => Promise<R>, policy: FigmaRetryPolicy, sleep: FigmaRetrySleep) => Promise<R>;
//# sourceMappingURL=figmaRetry.d.ts.map