/** * Utility for handling retries with exponential backoff and jitter for API requests. */ /** * Options for configuring retry behavior */ export interface RetryOptions { /** Maximum number of retry attempts (default: 3) */ maxRetries?: number; /** Base delay in milliseconds (default: 500ms) */ baseDelay?: number; /** Maximum delay in milliseconds (default: 5000ms) */ maxDelay?: number; /** * Function to determine if a response should trigger a retry * By default, retries on 5xx status codes */ shouldRetry?: (error: any) => boolean; } /** * Executes a function with retry logic using exponential backoff and jitter. * * @param fn - Async function to execute and potentially retry * @param options - Retry configuration options * @returns Promise resolving to the function's result */ export declare function withRetry(fn: () => Promise, options?: RetryOptions): Promise; //# sourceMappingURL=retry.d.ts.map