export interface RetryConfig { /** Maximum number of retry attempts. Default: 3 */ maxRetries: number; /** Initial delay in milliseconds before the first retry. Default: 500 */ initialDelayMs: number; /** Maximum delay in milliseconds between retries. Default: 30000 */ maxDelayMs: number; /** Multiplier applied to the delay after each retry. Default: 2.0 */ backoffMultiplier: number; /** HTTP status codes that should trigger a retry. Default: [408, 429, 500, 502, 503, 504] */ retryableStatusCodes: number[]; } export declare const DEFAULT_RETRY_CONFIG: RetryConfig; /** * Executes `fn` with automatic retry and exponential backoff. * * On failure the function inspects the thrown error: * - If it is a `KeelError` whose status is listed in `config.retryableStatusCodes`, * the call is retried after an exponentially increasing delay (with jitter). * - If the error carries a `retryAfter` value (seconds), that value is used as the * minimum delay for the next attempt. * - Non-retryable errors are re-thrown immediately. * - After `config.maxRetries` failed attempts the last error is thrown. */ export declare function retryWithBackoff(fn: () => Promise, config: RetryConfig): Promise;