/** * Retry utility for transient network failures in the Trulioo Web SDK. * * ## Policy * - Up to `maxRetries` attempts (default 3 → 4 total). * - Exponential backoff: 500ms, 1000ms, 2000ms. * - Respects `Retry-After` header (integer seconds, capped at 30s). * * ## Retryable conditions * - Network errors: TypeError from fetch (connection refused, DNS failure, offline). * - HTTP status: 408, 429, 500, 502, 503, 504. * * ## Non-retryable * - Client errors (4xx except 408, 429). * - AbortError (intentional cancellation). * - Non-network errors. * * @internal */ declare const DEFAULT_MAX_RETRIES = 3; declare const INITIAL_DELAY_MS = 500; declare const MAX_RETRY_AFTER_MS = 30000; declare const DEFAULT_REQUEST_TIMEOUT_MS = 30000; /** * Wraps a fetch call with retry logic for transient failures. * * @param fetchFn - The fetch function to use (allows injection for testing). * @param input - The URL or Request to fetch. * @param init - Optional RequestInit (merged with timeout AbortController). * @param options - Retry and timeout options. * @returns The successful Response. * @throws TruliooTransportError with appropriate code when all retries are exhausted. */ export declare function fetchWithRetry(fetchFn: typeof globalThis.fetch, input: RequestInfo | URL, init?: RequestInit, options?: { maxRetries?: number; timeoutMs?: number; }): Promise; export { DEFAULT_MAX_RETRIES, INITIAL_DELAY_MS, MAX_RETRY_AFTER_MS, DEFAULT_REQUEST_TIMEOUT_MS };