/** * @license * Copyright 2025-2026 Open Home Foundation * SPDX-License-Identifier: Apache-2.0 */ import { NodeId } from "@matter/main"; import { DecodedAttributeReportValue } from "@matter/main/protocol"; import { PairedNode } from "@project-chip/matter.js/device"; import { AttributesData } from "../types/CommandHandler.js"; /** * Cache for node attributes in WebSocket format. * * Stores attributes pre-converted to WebSocket tag-based format as flat * "endpoint/cluster/attribute" keyed objects for direct retrieval when * clients request node data. */ export declare class AttributeDataCache { #private; /** * Add a node to the cache and populate its attributes. * If the node is not initialized, the cache entry will be empty. */ add(node: PairedNode): void; /** * Remove a node from the cache. */ delete(nodeId: NodeId): void; /** * Update (reinitialize) the cache for a node. * Creates a fresh cache from the node's current state. * Use this when the node structure may have changed (endpoints added/removed). */ update(node: PairedNode): void; /** * Update a single attribute in the cache. * Use this for incremental updates when an attribute value changes. */ updateAttribute(nodeId: NodeId, data: DecodedAttributeReportValue): void; /** * Get cached attributes for a node. * Returns undefined if no cache exists for the node. */ get(nodeId: NodeId): AttributesData | undefined; /** * Check if a node exists in the cache. */ has(nodeId: NodeId): boolean; } //# sourceMappingURL=AttributeDataCache.d.ts.map