/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import type { ResultStatus } from "#action/response/ResultStatus.js"; import type { ClusterId, CommandId, CommandPath, EndpointNumber, TlvStream } from "@matter/types"; export type InvokeResult = AsyncIterable; export type DecodedInvokeResult = AsyncIterable; export namespace InvokeResult { export type Chunk = Iterable; export type DecodedChunk = Iterable; export type Data = CommandStatus | CommandResponse; export type DecodedData = CommandStatus | DecodedCommandResponse; export interface ConcreteCommandPath extends CommandPath { endpointId: EndpointNumber; clusterId: ClusterId; commandId: CommandId; } export interface CommandStatus extends ResultStatus { kind: "cmd-status"; path: ConcreteCommandPath; commandRef?: number; } export interface CommandResponse { kind: "cmd-response"; path: ConcreteCommandPath; commandRef?: number; data: TlvStream; } export interface DecodedCommandResponse extends Omit { data: any; } }