export interface TapoCredentials { username: string; password: string; } export interface TapoDeviceInfo { device_id: string; fw_ver: string; hw_ver: string; type: string; model: string; mac: string; hw_id: string; fw_id: string; oem_id: string; specs: string; device_on: boolean; on_time: number; overheated: boolean; nickname: string; location: string; avatar: string; longitude: number; latitude: number; has_set_location_info: boolean; ip: string; ssid?: string; signal_level: number; rssi: number; region: string; time_diff: number; lang: string; default_states: { type: string; state: Record; }; auto_off_status: string; auto_off_remain_time: number; } export declare function getDeviceId(deviceInfo: TapoDeviceInfo): string; export declare function getDeviceType(deviceInfo: TapoDeviceInfo): string; export declare function getFwVer(deviceInfo: TapoDeviceInfo): string; export declare function getHwVer(deviceInfo: TapoDeviceInfo): string; export declare function getOnTime(deviceInfo: TapoDeviceInfo): number; export declare function getSignalLevel(deviceInfo: TapoDeviceInfo): number; export interface TapoApiRequest { method: string; params?: Record; } export interface TapoApiResponse { error_code: number; result: T; msg?: string; } export interface TapoHandshakeResponse { key: string; session: string; } export interface TapoError extends Error { errorCode: number; message: string; } export declare class FeatureNotSupportedError extends Error { readonly name = "FeatureNotSupportedError"; readonly feature: string; readonly deviceModel: string; constructor(feature: string, deviceModel: string, message?: string); } export declare class DeviceCapabilityError extends Error { readonly name = "DeviceCapabilityError"; readonly capability: string; readonly reason: string; constructor(capability: string, reason: string, message?: string); } export type Result = { success: true; data: T; } | { success: false; error: E; }; export interface DeviceMethodOptions { throwOnUnsupported?: boolean; timeout?: number; } export declare abstract class BaseTapoDevice { protected ip: string; protected credentials: TapoCredentials; protected sessionKey?: string; protected sessionId?: string; constructor(ip: string, credentials: TapoCredentials); abstract connect(): Promise; abstract getDeviceInfo(): Promise; abstract disconnect(): Promise; protected abstract sendRequest(request: TapoApiRequest): Promise>; }