import { TapoCredentials } from '../types'; import { TapoDeviceInfo } from '../types'; import { TapoDeviceType } from '../types/device-types'; import { BaseDevice } from '../devices/base-device'; /** * Factory class for creating appropriate Tapo device instances * Handles automatic device type detection and caching for optimal performance */ export declare class DeviceFactory { /** Device information cache to minimize redundant API calls */ private static genericInfoCache; /** Cache TTL in milliseconds (30 seconds) */ private static readonly CACHE_TTL; /** * Get device information using lightweight generic retriever * @param ip Device IP address * @param credentials Authentication credentials * @param useCache Whether to use cached results (default: true) * @returns Device information */ static getDeviceInfo(ip: string, credentials: TapoCredentials, useCache?: boolean): Promise; /** * Create device instance with automatic device type detection * Always detects the device type first, then creates the appropriate device instance * @param ip Device IP address * @param credentials Authentication credentials * @param methodHint Optional method hint for better type inference (fallback only) * @returns Device instance */ static createDevice(ip: string, credentials: TapoCredentials, methodHint?: string): Promise; /** * Create specific device instance based on device type * @param deviceType Specific device type * @param ip Device IP address * @param credentials Authentication credentials * @returns Device instance */ private static createSpecificDevice; /** * Clear the device info cache */ static clearDeviceInfoCache(): void; static getDeviceTypeForMethod(method: string): TapoDeviceType; }