/** * True for connection-level failures that are safe to retry on a fresh socket: * the known transient `code`/`errno` values, plus node-fetch's "Premature * close" / "socket hang up" (which arrive as a wrapped FetchError whose message * — not always its `code` — carries the cause). */ export declare function isTransientNetworkError(err: unknown): boolean; export interface RetryOptions { /** Number of retries AFTER the first attempt. Default 2 (so up to 3 tries). */ retries?: number; /** Base backoff in ms; the i-th retry waits up to `baseDelayMs * 2^i`. Default 50. */ baseDelayMs?: number; /** Upper bound on a single backoff delay, in ms. Default 250. */ maxDelayMs?: number; /** Predicate deciding whether an error is retryable. Default: transient network errors. */ shouldRetry?: (err: unknown) => boolean; } /** * Run `fn`, retrying on retryable errors with full-jitter exponential backoff. * Full jitter (delay drawn from `[0, cap]`) avoids synchronised retry bursts * when many calls fail at once. Non-retryable errors propagate immediately. */ export declare function retryTransient(fn: () => Promise, options?: RetryOptions): Promise;