/** * @license * Copyright 2025-2026 Open Home Foundation * SPDX-License-Identifier: Apache-2.0 */ import { NodeId, Observable } from "@matter/main"; import { AttributeResponseStatus, AttributesData, InvokeRequest, MatterNodeData, NodeCommandHandler, WriteAttributeRequest } from "../types/CommandHandler.js"; import { MatterNode } from "../types/WebSocketMessageTypes.js"; /** * Command handler for test nodes (imported diagnostic dumps). * Test nodes are stored in memory and provide mock responses for commands. */ export declare class TestNodeCommandHandler implements NodeCommandHandler { #private; /** Observable for node added events */ readonly nodeAdded: Observable<[nodeId: NodeId, node: MatterNodeData], void>; /** Observable for node removed events */ readonly nodeRemoved: Observable<[nodeId: NodeId], void>; /** * Check if a node ID is in the test node range (>= TEST_NODE_START). */ static isTestNodeId(nodeId: number | bigint): boolean; /** * Check if this handler manages the given node ID. */ hasNode(nodeId: NodeId): boolean; /** * Get all test node IDs. */ getNodeIds(): NodeId[]; /** * Get all test nodes. */ getNodes(): MatterNode[]; /** * Get a test node by ID. */ getNode(nodeId: NodeId): MatterNode | undefined; /** * Get full node details in WebSocket API format. */ getNodeDetails(nodeId: NodeId): Promise; /** * Read multiple attributes from a test node by path strings. * Handles wildcards in paths. */ handleReadAttributes(nodeId: NodeId, attributePaths: string[], _fabricFiltered?: boolean): Promise; /** * Import test nodes from a diagnostic dump. * @param dump JSON string containing the diagnostic dump * @returns Array of imported node IDs */ importTestNodes(dump: string): NodeId[]; /** * Write an attribute to a test node. * Logs the write and returns success (no actual write occurs). */ handleWriteAttribute(data: WriteAttributeRequest): Promise; /** * Invoke a command on a test node. * Logs the command and returns null (no actual command execution). */ handleInvoke(data: InvokeRequest): Promise; /** * Get IP addresses for a test node. * Returns mock IP addresses. */ getNodeIpAddresses(_nodeId: NodeId, _preferCache?: boolean): Promise; /** * Ping a test node. * Returns mock success results. */ pingNode(_nodeId: NodeId, _attempts?: number): Promise>; /** * Remove a test node. */ removeNode(nodeId: NodeId): Promise; } //# sourceMappingURL=TestNodeCommandHandler.d.ts.map