/** * Augments the ESPRMMatterNode class with the `getEndpointWithCluster` method. */ declare module "../../ESPRMMatterNode" { interface ESPRMMatterNode { /** * Finds the first endpoint that exposes a given server cluster. * * Searches endpoints in ascending order and returns the first match. Useful when * you need the application endpoint for a control cluster (e.g. OnOff on endpoint 1). * * @param clusterId - Server cluster ID to locate (e.g. `6` for OnOff). * @returns The endpoint ID, or `undefined` if no endpoint exposes the cluster. * * @example * ```typescript * import { ESPRMMatterNode } from "@espressif/rainmaker-matter-sdk"; * * const node = ESPRMMatterNode.fromMatterMetaData(nodeDetails); * * const onOffEndpoint = await node.getEndpointWithCluster(6); * // onOffEndpoint === 1 for a typical OnOff light * ``` */ getEndpointWithCluster(clusterId: number): Promise; } } export {};