/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import { AttributeId, ClusterId, EndpointNumber, NodeId, TlvAttributeReport, TlvAttributeReportData, TlvDataReport, TlvEncodingOptions, TlvEventData, TlvEventReport, TlvSchema, TlvStream, TypeFromSchema } from "@matter/types"; /** Type for TlvAttributeReportData where the real data are represented with the schema and the JS value. */ type AttributeDataPayload = Omit, "data"> & { tlv: TlvSchema; payload: any; }; /** Type for TlvAttributeReport where the real data are represented with the schema and the JS value. */ export type AttributeReportPayload = Omit, "attributeData"> & { attributeData?: AttributeDataPayload; hasFabricSensitiveData: boolean; }; /** Type for TlvEventData where the real data are represented with the schema and the JS value. */ export type EventDataPayload = Omit, "data"> & { tlv: TlvSchema; payload: any; }; /** Type for TlvEventReport where the real data are represented with the schema and the JS value. */ export type EventReportPayload = Omit, "eventData"> & { eventData?: EventDataPayload; hasFabricSensitiveData: boolean; }; export type EventOrAttributeDataPayload = AttributeReportPayload | EventReportPayload; /** A base type for a DataReport which removes the fields of the actual attribute or event content */ export type BaseDataReport = Omit, "attributeReports" | "eventReports">; /** Type for TlvDataReport where the real data are represented with the schema and the JS value. */ export type DataReportPayload = BaseDataReport & { attributeReportsPayload?: AttributeReportPayload[]; eventReportsPayload?: EventReportPayload[]; }; /** * Type for the DataReport Generator function to send all data */ export type DataReportPayloadIterator = AsyncIterableIterator; export declare function encodeAttributePayloadData(attributePayload: AttributeReportPayload, options?: TlvEncodingOptions): TlvStream; /** Encodes an AttributeReportPayload into a TlvStream (used for TlvAny type). */ export declare function encodeAttributePayload(attributePayload: AttributeReportPayload, options?: TlvEncodingOptions): TlvStream; /** Encodes an EventReportPayload into a TlvStream (used for TlvAny type). */ export declare function encodeEventPayload(eventPayload: EventReportPayload, options?: TlvEncodingOptions): TlvStream; /** Return if an AttributeReportPayload can be chunked or not. */ export declare function canAttributePayloadBeChunked(attributePayload: AttributeReportPayload): boolean; /** Chunk an AttributeReportPayload into multiple AttributeReportPayloads. */ export declare function chunkAttributePayload(attributePayload: AttributeReportPayload): AttributeReportPayload[]; /** * Sort function to sort AttributeReportPayloads by nodeId/EndpointId/clusterId/attributeId to generate an ideal * ground for tag compression. */ export declare function sortAttributeDataByPath(data1: AttributeReportPayload, data2: AttributeReportPayload): -1 | 0 | 1; /** Sort and use Tag compression to compress a list of AttributeReportPayloads. */ export declare function compressAttributeDataReportTags(data: AttributeReportPayload[]): { hasFabricSensitiveData: boolean; attributeData: AttributeDataPayload | undefined; attributeStatus: import("@matter/types").TypeFromFields<{ path: import("@matter/types").FieldType; nodeId: import("@matter/types").OptionalFieldType; endpointId: import("@matter/types").OptionalFieldType; clusterId: import("@matter/types").OptionalFieldType; attributeId: import("@matter/types").OptionalFieldType; listIndex: import("@matter/types").OptionalFieldType; wildcardPathFlags: import("@matter/types").OptionalFieldType>; wildcardFilterConfigurationVersion: import("@matter/types").OptionalFieldType; }>>; status: import("@matter/types").FieldType; clusterStatus: import("@matter/types").OptionalFieldType; }>>; }> | undefined; }[]; export {}; //# sourceMappingURL=AttributeDataEncoder.d.ts.map