/** * Base class for VeSync devices */ import { VeSync } from './vesync'; export declare abstract class VeSyncBaseDevice { protected manager: VeSync; protected config: Record; cid: string; deviceName: string; deviceStatus: string; deviceType: string; deviceRegion: string; uuid: string; configModule: string; macId: string; deviceCategory: string; connectionStatus: string; constructor(details: Record, manager: VeSync); /** * Return formatted device info to stdout */ display(): void; /** * Return JSON details for device */ displayJSON(): string; /** * Check API response for errors */ protected checkResponse(response: [any, number], method: string): boolean; /** * Log error with context */ protected logError(method: string, error: any): void; /** * Get device details */ abstract getDetails(): Promise; /** * Some device families have a detail endpoint that is more reliable than * the device-list connection status. Those devices can opt into detail * polling even when the list reports them offline. */ shouldPollDetailsWhenOffline(): boolean; /** * Update device details */ update(): Promise; /** * Call API with proper headers */ protected callApi(endpoint: string, method: string, data?: any, headers?: Record): Promise<[any, number]>; }