import { TapoCredentials, TapoApiRequest } from '../types'; /** * Unified protocol manager similar to Rust tapo's TapoProtocol * This addresses the core issue of distributed session management */ export declare class UnifiedTapoProtocol { private auth; private klapAuth; private activeProtocol; private lastRequestTime; private minRequestInterval; constructor(ip: string, credentials: TapoCredentials); /** * Initialize connection with automatic protocol detection */ connect(): Promise; /** * Execute request with automatic session management (like Rust implementation) */ executeRequest(request: TapoApiRequest): Promise; /** * Send request using current active protocol */ private sendWithCurrentProtocol; /** * Refresh session for current protocol */ private refreshCurrentSession; /** * Try switching to alternative protocol and execute request */ private trySwitchProtocol; /** * Check if error indicates session issues */ private isSessionError; /** * Check if currently connected */ isConnected(): boolean; /** * Clear all sessions */ disconnect(): Promise; /** * Get current active protocol */ getActiveProtocol(): string | null; /** * Get detailed protocol information */ getProtocolInfo(): { protocol: string | null; version?: string; }; }