/** * Axios interceptors for the Raindrop API client. * * Provides: * - Request/response logging (verbose mode) * - Automatic retry with exponential backoff for transient errors * - Rate limit detection and RateLimitError throwing * - Error transformation to ApiError */ import type { AxiosInstance, AxiosError } from "axios"; declare const MAX_RETRIES = 3; declare const INITIAL_DELAY_MS = 1000; declare const MAX_DELAY_MS = 30000; /** * Check if an error is retryable (transient). * Retryable: network errors, 5xx server errors, 408 timeout. * NOT retryable: 429 (handled separately), 4xx client errors. */ export declare function isRetryableError(error: AxiosError): boolean; /** * Calculate exponential backoff delay with jitter. * Formula: min(initialDelay * 2^retryCount + jitter, maxDelay) */ export declare function calculateBackoff(retryCount: number): number; /** * Get the API delay from environment variable. * Used to throttle requests during live tests to avoid rate limits. */ declare function getApiDelayMs(): number; /** * Extract rate limit info from response headers. */ export declare function extractRateLimitInfo(headers: Record): { limit?: number; remaining?: number; reset?: number; }; /** * Configure Axios interceptors on a Raindrop client instance. * Call this after creating the client. */ export declare function setupClientInterceptors(axiosInstance: AxiosInstance): void; export { MAX_RETRIES, INITIAL_DELAY_MS, MAX_DELAY_MS, getApiDelayMs }; //# sourceMappingURL=axios-interceptors.d.ts.map