import { ESPCDF } from "../store/index"; import { ESPCDFTransportConfig } from "../types"; /** * Safely parses the payload and returns null if parsing fails. */ export declare function safelyParsePayload(payload: any): any; /** * Handles the `EVENT_NODE_PARAMS_CHANGED` event. * Merges shadow-style param updates into the node. Top-level keys are device or service names; * each maps to `{ paramName: value, ... }`. Emits `deviceParamChanged` / `serviceParamChanged` * per param so `_raw` stays in sync (see adaptor property-change handlers). */ export declare function handleNodeParamsChanged(rootStore: ESPCDF | null, node_id: string, payload: any): void; /** * Handles the `EVENT_USER_NODE_ADDED` event. * Fetches the new nodes into the store. */ export declare function handleUserNodeAdded(rootStore: ESPCDF | null, payload: any): Promise; /** * Handles the `EVENT_USER_NODE_REMOVED` event. * Removes nodes from the store. */ export declare function handleUserNodeRemoved(rootStore: ESPCDF | null, payload: any): void; /** * Handles the `EVENT_NODE_CONNECTED` event. * Updates node connectivity status and adds cloud transport. */ export declare function handleNodeConnected(rootStore: ESPCDF | null, node_id: string, timestamp: number): void; /** * Handles the `EVENT_NODE_DISCONNECTED` event. * Updates node connectivity status and removes cloud transport. */ export declare function handleNodeDisconnected(rootStore: ESPCDF | null, node_id: string, timestamp: number): void; /** * Handles node update events from the SDK. * Routes events to appropriate handlers based on event type. */ export declare function handleNodeUpdateEvent(event: any, rootStore: ESPCDF | null): void; /** * Handles adding a transport to a node. * Updates the node's available transports and emits property change events. * @param rootStore - The root CDF store instance * @param nodeId - The ID of the node to update * @param transportDetails - The transport configuration to add */ export declare const handleAddNodeTransport: (rootStore: ESPCDF | null, nodeId: string, transport: ESPCDFTransportConfig) => void; /** * Handles removing a transport from a node. * Updates the node's available transports and emits property change events. * @param rootStore - The root CDF store instance * @param nodeId - The ID of the node to update * @param transportDetails - The transport configuration to remove */ export declare const handleRemoveNodeTransport: (rootStore: ESPCDF | null, nodeId: string, transport: ESPCDFTransportConfig) => void; /** * Handles updating node transport (add or remove). * Routes to the appropriate handler based on the operation type. * @param rootStore - The root CDF store instance * @param nodeId - The ID of the node to update * @param transportDetails - The transport configuration * @param operation - The operation to perform: "add" (default) or "remove" */ export declare function handleNodeTransportUpdate(rootStore: ESPCDF | null, nodeId: string, transportDetails: ESPCDFTransportConfig, operation?: "add" | "remove"): void;