import { ESPCDFAPIResponse, ESPCDFScheduleOperationType, ESPCDFScheduleInterface, ESPCDFScheduleOperation, ESPCDFScheduleEditInput, ESPCDFScheduleAction, ESPCDFScheduleTrigger, ESPCDFScheduleValidity } from "../types"; import { ESPCDFOperationEventEmitter, ESPCDFOperationListener } from "../utils/OperationEventEmitter"; export declare class ESPCDFSchedule implements ESPCDFScheduleInterface { id: string; name: string; info?: string; nodes: string[]; triggers: ESPCDFScheduleTrigger[]; action: ESPCDFScheduleAction; enabled?: boolean; validity?: ESPCDFScheduleValidity; flags?: number; devicesCount: number; operations: ESPCDFScheduleOperation; adaptorIdentifier?: string; outOfSyncMeta?: Record; _raw: any; readonly events: ESPCDFOperationEventEmitter; constructor(scheduleData: ESPCDFScheduleInterface); /** * Subscribe to all operation events * @param listener - The callback function to register * @returns Unsubscribe function */ subscribe(listener: ESPCDFOperationListener): () => void; /** * Remove all listeners and clean up */ dispose(): void; /** * Internal method to emit callbacks after operations */ private emit; /** * Wraps an operation with consistent event emission logic */ private runAndEmit; add(): Promise; edit(data: ESPCDFScheduleEditInput): Promise; remove(): Promise; enable(): Promise; disable(): Promise; /** * Checks if the schedule is enabled * @returns True if the schedule is enabled, false otherwise */ isEnabled(): boolean; /** * Adds out-of-sync metadata for a specific node * * This method stores metadata indicating that a node's schedule configuration * is not synchronized with the server state. * @param nodeId - The identifier of the node * @param value - The metadata value to store * @example * schedule.addOutOfSyncMeta('node1', { lastSync: timestamp }); */ addOutOfSyncMeta(nodeId: string, value: any): void; /** * Retrieves out-of-sync metadata for a specific node * @param nodeId - The identifier of the node * @returns The stored metadata for the node * @example * const syncStatus = schedule.getOutOfSyncMeta('node1'); */ getOutOfSyncMeta(nodeId: string): any; /** * Removes out-of-sync metadata for a specific node * * This method clears the stored metadata indicating that a node's schedule * configuration has been synchronized. * @param nodeId - The identifier of the node * @example * schedule.removeOutOfSyncMeta('node1'); */ removeOutOfSyncMeta(nodeId: string): void; /** * Clears all out-of-sync metadata * * This method removes all stored metadata about node synchronization status, * effectively marking all nodes as synchronized. * @example * schedule.clearOutOfSyncMeta(); */ clearOutOfSyncMeta(): void; }