/** * Retry logic utilities for the Orbitport SDK */ import type { OrbitportError } from '../types'; /** * Retry configuration options */ export interface RetryOptions { maxAttempts: number; baseDelay: number; maxDelay: number; backoffMultiplier: number; jitter: boolean; } /** * Default retry configuration */ export declare const DEFAULT_RETRY_OPTIONS: RetryOptions; /** * Retries an async function with exponential backoff */ export declare function withRetry(fn: () => Promise, options?: Partial, onRetry?: (error: OrbitportError, attempt: number) => void): Promise; /** * Retries an async function with custom retry logic */ export declare function withCustomRetry(fn: () => Promise, shouldRetry: (error: OrbitportError, attempt: number) => boolean, getDelay: (attempt: number) => number, maxAttempts?: number, onRetry?: (error: OrbitportError, attempt: number) => void): Promise; /** * Creates a retry wrapper with specific configuration */ export declare function createRetryWrapper(options?: Partial): (fn: () => Promise, onRetry?: (error: OrbitportError, attempt: number) => void) => Promise; /** * Retry strategies for different types of operations */ export declare const RETRY_STRATEGIES: { readonly fast: { readonly maxAttempts: 2; readonly baseDelay: 500; readonly maxDelay: 2000; readonly backoffMultiplier: 2; readonly jitter: true; }; readonly standard: RetryOptions; readonly aggressive: { readonly maxAttempts: 5; readonly baseDelay: 1000; readonly maxDelay: 30000; readonly backoffMultiplier: 2; readonly jitter: true; }; readonly conservative: { readonly maxAttempts: 2; readonly baseDelay: 2000; readonly maxDelay: 5000; readonly backoffMultiplier: 1.5; readonly jitter: true; }; readonly none: { readonly maxAttempts: 1; readonly baseDelay: 0; readonly maxDelay: 0; readonly backoffMultiplier: 1; readonly jitter: false; }; }; //# sourceMappingURL=retry.d.ts.map