/** Configuration for retry behaviour with exponential backoff. */
export interface RetryConfig {
    maxRetries: number;
    initialDelayMs: number;
    maxDelayMs: number;
}
/** Type guard: checks if an unknown value has a numeric `statusCode` property. */
export declare function hasStatusCode(err: unknown): err is {
    statusCode: number;
};
/** Type guard: checks if an unknown value has a numeric `status` property. */
export declare function hasStatus(err: unknown): err is {
    status: number;
};
/**
 * Determines whether an error should trigger a retry.
 * Checks AppError.recoverable first, then falls back to HTTP status code inspection.
 * Handles both Error subclasses and plain objects with statusCode/status properties.
 */
export declare function isRetryableError(error: unknown): boolean;
/**
 * Wraps an async function with retry logic using exponential backoff.
 * Retries when `isRetryableError` returns true for the thrown error.
 *
 * @param fn - Async function to execute.
 * @param config - Optional overrides for retry behaviour.
 * @param onRetry - Optional callback invoked before each retry.
 */
export declare function withRetry<T>(fn: () => Promise<T>, config?: Partial<RetryConfig>, onRetry?: (attempt: number, error: Error, delayMs: number) => void): Promise<T>;
//# sourceMappingURL=retry.d.ts.map