/** * Retry utilities for Tapo device operations * Separated from wrapper for better separation of concerns */ export interface RetryConfig { maxAttempts: number; baseDelay: number; strategy: 'linear' | 'exponential' | 'fixed'; busyErrorPatterns: string[]; sessionErrorPatterns: string[]; onRetry?: (attempt: number, error: Error, delay: number) => void; } export interface RetryResult { success: boolean; data?: T; error?: Error; metadata: { attempts: number; duration: number; retryReasons: string[]; }; } export declare class TapoRetryHandler { private config; static readonly DEFAULT_CONFIG: RetryConfig; constructor(config?: RetryConfig); execute(operation: () => Promise, operationName?: string): Promise>; private shouldRetry; private getRetryReason; private calculateDelay; /** * Create a pre-configured retry handler for common scenarios */ static forDeviceControl(): TapoRetryHandler; static forEnergyMonitoring(): TapoRetryHandler; static forInfoRetrieval(): TapoRetryHandler; } /** * Utility function to wrap any async operation with retry logic */ export declare function withRetry(operation: () => Promise, config?: Partial): Promise>; /** * Decorator for automatic retry (for class methods) */ export declare function retryable(config?: Partial): (_target: any, _propertyName: string, descriptor: PropertyDescriptor) => void;