import type { StateManager } from "../state.js"; export interface FailoverOptions { /** Account index to try first */ accountIndex: number; /** Maximum failover attempts (default: 2) */ maxFailovers?: number; } export interface FailoverResult { result: T; /** Account index that actually succeeded */ usedAccountIndex: number; /** Number of failover attempts */ failoverCount: number; } /** * Execute operation with automatic account failover. * On retryable/rate_limited errors, tries next healthy account. * On fatal errors, does NOT failover. */ export declare function withFailover(state: StateManager, options: FailoverOptions, operation: (accountIndex: number) => Promise): Promise>; //# sourceMappingURL=failover.d.ts.map