@matter/types 0.12.4-alpha.0-20250211-56b2c53a0 → 0.12.4-alpha.0-20250213-1187f81eb

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/dist/cjs/cluster/mutation/ClusterComposer.d.ts.map +1 -1
  2. package/dist/cjs/cluster/mutation/ClusterComposer.js +24 -9
  3. package/dist/cjs/cluster/mutation/ClusterComposer.js.map +1 -1
  4. package/dist/cjs/globals/Status.d.ts +5 -1
  5. package/dist/cjs/globals/Status.d.ts.map +1 -1
  6. package/dist/cjs/globals/Status.js +1 -0
  7. package/dist/cjs/globals/Status.js.map +1 -1
  8. package/dist/cjs/protocol/messages/TlvDataReport.d.ts +4 -2
  9. package/dist/cjs/protocol/messages/TlvDataReport.d.ts.map +1 -1
  10. package/dist/cjs/protocol/messages/TlvDataReport.js.map +1 -1
  11. package/dist/cjs/protocol/messages/TlvInvokeRequest.d.ts +3 -1
  12. package/dist/cjs/protocol/messages/TlvInvokeRequest.d.ts.map +1 -1
  13. package/dist/cjs/protocol/messages/TlvInvokeRequest.js.map +1 -1
  14. package/dist/cjs/protocol/messages/TlvInvokeResponse.d.ts +3 -1
  15. package/dist/cjs/protocol/messages/TlvInvokeResponse.d.ts.map +1 -1
  16. package/dist/cjs/protocol/messages/TlvInvokeResponse.js.map +1 -1
  17. package/dist/cjs/protocol/messages/TlvReadRequest.d.ts +2 -0
  18. package/dist/cjs/protocol/messages/TlvReadRequest.d.ts.map +1 -1
  19. package/dist/cjs/protocol/messages/TlvReadRequest.js.map +1 -1
  20. package/dist/cjs/protocol/messages/TlvSubscribeRequest.d.ts +2 -0
  21. package/dist/cjs/protocol/messages/TlvSubscribeRequest.d.ts.map +1 -1
  22. package/dist/cjs/protocol/messages/TlvSubscribeRequest.js.map +1 -1
  23. package/dist/cjs/protocol/messages/TlvSubscribeResponse.d.ts +2 -0
  24. package/dist/cjs/protocol/messages/TlvSubscribeResponse.d.ts.map +1 -1
  25. package/dist/cjs/protocol/messages/TlvSubscribeResponse.js.map +1 -1
  26. package/dist/cjs/protocol/messages/TlvTimedRequest.d.ts +2 -0
  27. package/dist/cjs/protocol/messages/TlvTimedRequest.d.ts.map +1 -1
  28. package/dist/cjs/protocol/messages/TlvTimedRequest.js.map +1 -1
  29. package/dist/cjs/protocol/messages/TlvWriteRequest.d.ts +3 -1
  30. package/dist/cjs/protocol/messages/TlvWriteRequest.d.ts.map +1 -1
  31. package/dist/cjs/protocol/messages/TlvWriteRequest.js.map +1 -1
  32. package/dist/cjs/protocol/messages/TlvWriteResponse.d.ts +2 -0
  33. package/dist/cjs/protocol/messages/TlvWriteResponse.d.ts.map +1 -1
  34. package/dist/cjs/protocol/messages/TlvWriteResponse.js.map +1 -1
  35. package/dist/cjs/protocol/types/TlvAttributePath.d.ts +2 -0
  36. package/dist/cjs/protocol/types/TlvAttributePath.d.ts.map +1 -1
  37. package/dist/cjs/protocol/types/TlvAttributePath.js.map +1 -1
  38. package/dist/cjs/protocol/types/TlvAttributeReport.d.ts +3 -1
  39. package/dist/cjs/protocol/types/TlvAttributeReport.d.ts.map +1 -1
  40. package/dist/cjs/protocol/types/TlvAttributeReport.js.map +1 -1
  41. package/dist/cjs/protocol/types/TlvAttributeReportData.d.ts +3 -1
  42. package/dist/cjs/protocol/types/TlvAttributeReportData.d.ts.map +1 -1
  43. package/dist/cjs/protocol/types/TlvAttributeReportData.js.map +1 -1
  44. package/dist/cjs/protocol/types/TlvAttributeStatus.d.ts +2 -0
  45. package/dist/cjs/protocol/types/TlvAttributeStatus.d.ts.map +1 -1
  46. package/dist/cjs/protocol/types/TlvAttributeStatus.js.map +1 -1
  47. package/dist/cjs/protocol/types/TlvCommandData.d.ts +3 -1
  48. package/dist/cjs/protocol/types/TlvCommandData.d.ts.map +1 -1
  49. package/dist/cjs/protocol/types/TlvCommandData.js.map +1 -1
  50. package/dist/cjs/protocol/types/TlvDataVersionFilter.d.ts +2 -0
  51. package/dist/cjs/protocol/types/TlvDataVersionFilter.d.ts.map +1 -1
  52. package/dist/cjs/protocol/types/TlvDataVersionFilter.js.map +1 -1
  53. package/dist/cjs/protocol/types/TlvEventData.d.ts +3 -1
  54. package/dist/cjs/protocol/types/TlvEventData.d.ts.map +1 -1
  55. package/dist/cjs/protocol/types/TlvEventData.js.map +1 -1
  56. package/dist/cjs/protocol/types/TlvEventFilter.d.ts +2 -0
  57. package/dist/cjs/protocol/types/TlvEventFilter.d.ts.map +1 -1
  58. package/dist/cjs/protocol/types/TlvEventFilter.js.map +1 -1
  59. package/dist/cjs/protocol/types/TlvEventPath.d.ts +2 -0
  60. package/dist/cjs/protocol/types/TlvEventPath.d.ts.map +1 -1
  61. package/dist/cjs/protocol/types/TlvEventPath.js.map +1 -1
  62. package/dist/cjs/protocol/types/TlvEventReport.d.ts +3 -1
  63. package/dist/cjs/protocol/types/TlvEventReport.d.ts.map +1 -1
  64. package/dist/cjs/protocol/types/TlvEventReport.js.map +1 -1
  65. package/dist/cjs/protocol/types/TlvEventStatus.d.ts +2 -0
  66. package/dist/cjs/protocol/types/TlvEventStatus.d.ts.map +1 -1
  67. package/dist/cjs/protocol/types/TlvEventStatus.js.map +1 -1
  68. package/dist/cjs/protocol/types/TlvInvokeResponseData.d.ts +3 -1
  69. package/dist/cjs/protocol/types/TlvInvokeResponseData.d.ts.map +1 -1
  70. package/dist/cjs/protocol/types/TlvInvokeResponseData.js.map +1 -1
  71. package/dist/esm/cluster/mutation/ClusterComposer.d.ts.map +1 -1
  72. package/dist/esm/cluster/mutation/ClusterComposer.js +25 -10
  73. package/dist/esm/cluster/mutation/ClusterComposer.js.map +1 -1
  74. package/dist/esm/globals/Status.d.ts +5 -1
  75. package/dist/esm/globals/Status.d.ts.map +1 -1
  76. package/dist/esm/globals/Status.js +1 -0
  77. package/dist/esm/globals/Status.js.map +1 -1
  78. package/dist/esm/protocol/messages/TlvDataReport.d.ts +4 -2
  79. package/dist/esm/protocol/messages/TlvDataReport.d.ts.map +1 -1
  80. package/dist/esm/protocol/messages/TlvDataReport.js.map +1 -1
  81. package/dist/esm/protocol/messages/TlvInvokeRequest.d.ts +3 -1
  82. package/dist/esm/protocol/messages/TlvInvokeRequest.d.ts.map +1 -1
  83. package/dist/esm/protocol/messages/TlvInvokeRequest.js.map +1 -1
  84. package/dist/esm/protocol/messages/TlvInvokeResponse.d.ts +3 -1
  85. package/dist/esm/protocol/messages/TlvInvokeResponse.d.ts.map +1 -1
  86. package/dist/esm/protocol/messages/TlvInvokeResponse.js.map +1 -1
  87. package/dist/esm/protocol/messages/TlvReadRequest.d.ts +2 -0
  88. package/dist/esm/protocol/messages/TlvReadRequest.d.ts.map +1 -1
  89. package/dist/esm/protocol/messages/TlvReadRequest.js.map +1 -1
  90. package/dist/esm/protocol/messages/TlvSubscribeRequest.d.ts +2 -0
  91. package/dist/esm/protocol/messages/TlvSubscribeRequest.d.ts.map +1 -1
  92. package/dist/esm/protocol/messages/TlvSubscribeRequest.js.map +1 -1
  93. package/dist/esm/protocol/messages/TlvSubscribeResponse.d.ts +2 -0
  94. package/dist/esm/protocol/messages/TlvSubscribeResponse.d.ts.map +1 -1
  95. package/dist/esm/protocol/messages/TlvSubscribeResponse.js.map +1 -1
  96. package/dist/esm/protocol/messages/TlvTimedRequest.d.ts +2 -0
  97. package/dist/esm/protocol/messages/TlvTimedRequest.d.ts.map +1 -1
  98. package/dist/esm/protocol/messages/TlvTimedRequest.js.map +1 -1
  99. package/dist/esm/protocol/messages/TlvWriteRequest.d.ts +3 -1
  100. package/dist/esm/protocol/messages/TlvWriteRequest.d.ts.map +1 -1
  101. package/dist/esm/protocol/messages/TlvWriteRequest.js.map +1 -1
  102. package/dist/esm/protocol/messages/TlvWriteResponse.d.ts +2 -0
  103. package/dist/esm/protocol/messages/TlvWriteResponse.d.ts.map +1 -1
  104. package/dist/esm/protocol/messages/TlvWriteResponse.js.map +1 -1
  105. package/dist/esm/protocol/types/TlvAttributePath.d.ts +2 -0
  106. package/dist/esm/protocol/types/TlvAttributePath.d.ts.map +1 -1
  107. package/dist/esm/protocol/types/TlvAttributePath.js.map +1 -1
  108. package/dist/esm/protocol/types/TlvAttributeReport.d.ts +3 -1
  109. package/dist/esm/protocol/types/TlvAttributeReport.d.ts.map +1 -1
  110. package/dist/esm/protocol/types/TlvAttributeReport.js.map +1 -1
  111. package/dist/esm/protocol/types/TlvAttributeReportData.d.ts +3 -1
  112. package/dist/esm/protocol/types/TlvAttributeReportData.d.ts.map +1 -1
  113. package/dist/esm/protocol/types/TlvAttributeReportData.js.map +1 -1
  114. package/dist/esm/protocol/types/TlvAttributeStatus.d.ts +2 -0
  115. package/dist/esm/protocol/types/TlvAttributeStatus.d.ts.map +1 -1
  116. package/dist/esm/protocol/types/TlvAttributeStatus.js.map +1 -1
  117. package/dist/esm/protocol/types/TlvCommandData.d.ts +3 -1
  118. package/dist/esm/protocol/types/TlvCommandData.d.ts.map +1 -1
  119. package/dist/esm/protocol/types/TlvCommandData.js.map +1 -1
  120. package/dist/esm/protocol/types/TlvDataVersionFilter.d.ts +2 -0
  121. package/dist/esm/protocol/types/TlvDataVersionFilter.d.ts.map +1 -1
  122. package/dist/esm/protocol/types/TlvDataVersionFilter.js.map +1 -1
  123. package/dist/esm/protocol/types/TlvEventData.d.ts +3 -1
  124. package/dist/esm/protocol/types/TlvEventData.d.ts.map +1 -1
  125. package/dist/esm/protocol/types/TlvEventData.js.map +1 -1
  126. package/dist/esm/protocol/types/TlvEventFilter.d.ts +2 -0
  127. package/dist/esm/protocol/types/TlvEventFilter.d.ts.map +1 -1
  128. package/dist/esm/protocol/types/TlvEventFilter.js.map +1 -1
  129. package/dist/esm/protocol/types/TlvEventPath.d.ts +2 -0
  130. package/dist/esm/protocol/types/TlvEventPath.d.ts.map +1 -1
  131. package/dist/esm/protocol/types/TlvEventPath.js.map +1 -1
  132. package/dist/esm/protocol/types/TlvEventReport.d.ts +3 -1
  133. package/dist/esm/protocol/types/TlvEventReport.d.ts.map +1 -1
  134. package/dist/esm/protocol/types/TlvEventReport.js.map +1 -1
  135. package/dist/esm/protocol/types/TlvEventStatus.d.ts +2 -0
  136. package/dist/esm/protocol/types/TlvEventStatus.d.ts.map +1 -1
  137. package/dist/esm/protocol/types/TlvEventStatus.js.map +1 -1
  138. package/dist/esm/protocol/types/TlvInvokeResponseData.d.ts +3 -1
  139. package/dist/esm/protocol/types/TlvInvokeResponseData.d.ts.map +1 -1
  140. package/dist/esm/protocol/types/TlvInvokeResponseData.js.map +1 -1
  141. package/package.json +5 -5
  142. package/src/cluster/mutation/ClusterComposer.ts +42 -11
  143. package/src/globals/Status.ts +6 -1
  144. package/src/protocol/messages/TlvDataReport.ts +3 -0
  145. package/src/protocol/messages/TlvInvokeRequest.ts +3 -0
  146. package/src/protocol/messages/TlvInvokeResponse.ts +3 -0
  147. package/src/protocol/messages/TlvReadRequest.ts +3 -0
  148. package/src/protocol/messages/TlvSubscribeRequest.ts +3 -0
  149. package/src/protocol/messages/TlvSubscribeResponse.ts +3 -0
  150. package/src/protocol/messages/TlvTimedRequest.ts +3 -0
  151. package/src/protocol/messages/TlvWriteRequest.ts +3 -0
  152. package/src/protocol/messages/TlvWriteResponse.ts +3 -0
  153. package/src/protocol/types/TlvAttributePath.ts +3 -0
  154. package/src/protocol/types/TlvAttributeReport.ts +3 -0
  155. package/src/protocol/types/TlvAttributeReportData.ts +3 -0
  156. package/src/protocol/types/TlvAttributeStatus.ts +3 -0
  157. package/src/protocol/types/TlvCommandData.ts +3 -0
  158. package/src/protocol/types/TlvDataVersionFilter.ts +3 -0
  159. package/src/protocol/types/TlvEventData.ts +3 -0
  160. package/src/protocol/types/TlvEventFilter.ts +3 -0
  161. package/src/protocol/types/TlvEventPath.ts +3 -0
  162. package/src/protocol/types/TlvEventReport.ts +3 -0
  163. package/src/protocol/types/TlvEventStatus.ts +3 -0
  164. package/src/protocol/types/TlvInvokeResponseData.ts +3 -0
@@ -4,12 +4,19 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
- import { camelize, isDeepEqual, MatterError, serialize } from "#general";
7
+ import { camelize, MatterError, serialize } from "#general";
8
+ import { FeatureSet } from "@matter/model";
8
9
  import { BitFlags } from "../../schema/BitmapSchema.js";
9
10
  import { ClusterType } from "../ClusterType.js";
10
11
 
11
12
  export class IllegalClusterError extends MatterError {}
12
13
 
14
+ /**
15
+ * To save memory we cache clusters with specific feature variants. Otherwise code that configures clusters dynamically
16
+ * may create multiple redundant copies.
17
+ */
18
+ const featureSelectionCache = new WeakMap<ClusterType, Record<string, WeakRef<ClusterType>>>();
19
+
13
20
  /**
14
21
  * A "cluster composer" manages cluster configuration based on feature selection.
15
22
  */
@@ -26,9 +33,28 @@ export class ClusterComposer<const T extends ClusterType> {
26
33
  this.validateFeatureSelection(selection);
27
34
 
28
35
  const extensions = this.cluster.extensions;
29
- let cluster: ClusterType;
36
+ let cluster: ClusterType | undefined;
37
+
38
+ // First check cache
39
+ const cacheKey = [...selection].sort().join("␜");
40
+ cluster = featureSelectionCache.get(this.cluster)?.[cacheKey]?.deref();
41
+
42
+ // Next check whether feature set remains unchanged
43
+ if (!cluster) {
44
+ const currentCacheKey = [...new FeatureSet(this.cluster.supportedFeatures)].sort().join("␜");
45
+ if (currentCacheKey === cacheKey) {
46
+ cluster = featureSelectionCache.get(this.cluster)?.[cacheKey]?.deref();
47
+ }
48
+ }
49
+
50
+ // Done if either optimization above succeeded
51
+ if (cluster) {
52
+ return cluster as ClusterComposer.Of<T, SelectionT>;
53
+ }
30
54
 
55
+ // Modify feature selection
31
56
  if (extensions) {
57
+ // Feature selection modifies elements
32
58
  const base = this.cluster.base ?? this.cluster;
33
59
 
34
60
  const baseElements = (type: "attributes" | "commands" | "events") => {
@@ -57,16 +83,21 @@ export class ClusterComposer<const T extends ClusterType> {
57
83
  }
58
84
  }
59
85
  } else {
86
+ // Feature selection does not modify elements
60
87
  const supportedFeatures = BitFlags(this.cluster.features, ...selection);
61
- if (isDeepEqual(supportedFeatures, this.cluster.supportedFeatures)) {
62
- cluster = this.cluster;
63
- } else {
64
- cluster = ClusterType({
65
- ...this.cluster,
66
- supportedFeatures,
67
- base: this.cluster.base ?? this.cluster,
68
- });
69
- }
88
+ cluster = ClusterType({
89
+ ...this.cluster,
90
+ supportedFeatures,
91
+ base: this.cluster.base ?? this.cluster,
92
+ });
93
+ }
94
+
95
+ // Update cache
96
+ const baseVariants = featureSelectionCache.get(this.cluster);
97
+ if (baseVariants === undefined) {
98
+ featureSelectionCache.set(this.cluster, { [cacheKey]: new WeakRef(cluster) });
99
+ } else {
100
+ baseVariants[cacheKey] = new WeakRef(cluster);
70
101
  }
71
102
 
72
103
  return cluster as ClusterComposer.Of<T, SelectionT>;
@@ -231,5 +231,10 @@ export enum Status {
231
231
  *
232
232
  * @see {@link MatterSpecification.v13.Core} § 8.10.1
233
233
  */
234
- NoCommandResponse = 204
234
+ NoCommandResponse = 204,
235
+
236
+ /**
237
+ * Matter 1.4, temporarily patched in manually.
238
+ */
239
+ AccessRestricted = 0x9d,
235
240
  }
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
+ import { TypeFromSchema } from "#tlv/TlvSchema.js";
7
8
  import { TlvArray } from "../../tlv/TlvArray.js";
8
9
  import { TlvBoolean } from "../../tlv/TlvBoolean.js";
9
10
  import { TlvUInt32, TlvUInt8 } from "../../tlv/TlvNumber.js";
@@ -28,3 +29,5 @@ export const TlvDataReport = TlvObject({
28
29
  suppressResponse: TlvOptionalField(4, TlvBoolean),
29
30
  interactionModelRevision: TlvField(0xff, TlvUInt8),
30
31
  });
32
+
33
+ export type DataReport = TypeFromSchema<typeof TlvDataReport>;
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
+ import { TypeFromSchema } from "#tlv/TlvSchema.js";
7
8
  import { TlvArray } from "../../tlv/TlvArray.js";
8
9
  import { TlvBoolean } from "../../tlv/TlvBoolean.js";
9
10
  import { TlvUInt8 } from "../../tlv/TlvNumber.js";
@@ -23,3 +24,5 @@ export const TlvInvokeRequest = TlvObject({
23
24
  invokeRequests: TlvField(2, TlvArray(TlvCommandData)),
24
25
  interactionModelRevision: TlvField(0xff, TlvUInt8),
25
26
  });
27
+
28
+ export type InvokeRequest = TypeFromSchema<typeof TlvInvokeRequest>;
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
+ import { TypeFromSchema } from "#tlv/TlvSchema.js";
7
8
  import { TlvArray } from "../../tlv/TlvArray.js";
8
9
  import { TlvBoolean } from "../../tlv/TlvBoolean.js";
9
10
  import { TlvUInt8 } from "../../tlv/TlvNumber.js";
@@ -21,3 +22,5 @@ export const TlvInvokeResponse = TlvObject({
21
22
  moreChunkedMessages: TlvOptionalField(2, TlvBoolean),
22
23
  interactionModelRevision: TlvField(0xff, TlvUInt8),
23
24
  });
25
+
26
+ export type InvokeResponse = TypeFromSchema<typeof TlvInvokeResponse>;
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
+ import { TypeFromSchema } from "#tlv/TlvSchema.js";
7
8
  import { TlvArray } from "../../tlv/TlvArray.js";
8
9
  import { TlvBoolean } from "../../tlv/TlvBoolean.js";
9
10
  import { TlvUInt8 } from "../../tlv/TlvNumber.js";
@@ -32,3 +33,5 @@ export const TlvReadRequest = TlvObject({
32
33
  dataVersionFilters: TlvOptionalField(4, TlvArray(TlvDataVersionFilter)),
33
34
  interactionModelRevision: TlvField(0xff, TlvUInt8),
34
35
  });
36
+
37
+ export type ReadRequest = TypeFromSchema<typeof TlvReadRequest>;
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
+ import { TypeFromSchema } from "#tlv/TlvSchema.js";
7
8
  import { TlvArray } from "../../tlv/TlvArray.js";
8
9
  import { TlvBoolean } from "../../tlv/TlvBoolean.js";
9
10
  import { TlvUInt16, TlvUInt8 } from "../../tlv/TlvNumber.js";
@@ -41,3 +42,5 @@ export const TlvSubscribeRequest = TlvObject({
41
42
  dataVersionFilters: TlvOptionalField(8, TlvArray(TlvDataVersionFilter)),
42
43
  interactionModelRevision: TlvField(0xff, TlvUInt8),
43
44
  });
45
+
46
+ export type SubscribeRequest = TypeFromSchema<typeof TlvSubscribeRequest>;
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
+ import { TypeFromSchema } from "#tlv/TlvSchema.js";
7
8
  import { TlvUInt16, TlvUInt32, TlvUInt8 } from "../../tlv/TlvNumber.js";
8
9
  import { TlvField, TlvObject } from "../../tlv/TlvObject.js";
9
10
 
@@ -17,3 +18,5 @@ export const TlvSubscribeResponse = TlvObject({
17
18
  maxInterval: TlvField(2, TlvUInt16),
18
19
  interactionModelRevision: TlvField(0xff, TlvUInt8),
19
20
  });
21
+
22
+ export type SubscribeResponse = TypeFromSchema<typeof TlvSubscribeResponse>;
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
+ import { TypeFromSchema } from "#tlv/TlvSchema.js";
7
8
  import { TlvUInt16, TlvUInt8 } from "../../tlv/TlvNumber.js";
8
9
  import { TlvField, TlvObject } from "../../tlv/TlvObject.js";
9
10
 
@@ -14,3 +15,5 @@ export const TlvTimedRequest = TlvObject({
14
15
  timeout: TlvField(0, TlvUInt16),
15
16
  interactionModelRevision: TlvField(0xff, TlvUInt8),
16
17
  });
18
+
19
+ export type TimedRequest = TypeFromSchema<typeof TlvTimedRequest>;
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
+ import { TypeFromSchema } from "#tlv/TlvSchema.js";
7
8
  import { TlvArray } from "../../tlv/TlvArray.js";
8
9
  import { TlvBoolean } from "../../tlv/TlvBoolean.js";
9
10
  import { TlvUInt8 } from "../../tlv/TlvNumber.js";
@@ -24,3 +25,5 @@ export const TlvWriteRequest = TlvObject({
24
25
  moreChunkedMessages: TlvOptionalField(3, TlvBoolean),
25
26
  interactionModelRevision: TlvField(0xff, TlvUInt8),
26
27
  });
28
+
29
+ export type WriteRequest = TypeFromSchema<typeof TlvWriteRequest>;
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
+ import { TypeFromSchema } from "#tlv/TlvSchema.js";
7
8
  import { TlvArray } from "../../tlv/TlvArray.js";
8
9
  import { TlvUInt8 } from "../../tlv/TlvNumber.js";
9
10
  import { TlvField, TlvObject } from "../../tlv/TlvObject.js";
@@ -16,3 +17,5 @@ export const TlvWriteResponse = TlvObject({
16
17
  writeResponses: TlvField(0, TlvArray(TlvAttributeStatus)),
17
18
  interactionModelRevision: TlvField(0xff, TlvUInt8),
18
19
  });
20
+
21
+ export type WriteResponse = TypeFromSchema<typeof TlvWriteResponse>;
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
+ import { TypeFromSchema } from "#tlv/TlvSchema.js";
7
8
  import { TlvAttributeId } from "../../datatype/AttributeId.js";
8
9
  import { TlvClusterId } from "../../datatype/ClusterId.js";
9
10
  import { TlvEndpointNumber } from "../../datatype/EndpointNumber.js";
@@ -26,3 +27,5 @@ export const TlvAttributePath = TlvTaggedList({
26
27
  listIndex: TlvOptionalField(5, TlvNullable(TlvUInt16)),
27
28
  wildcardPathFlags: TlvOptionalField(6, TlvBitmap(TlvUInt32, WildcardPathFlagsBitmap)),
28
29
  });
30
+
31
+ export type AttributePath = TypeFromSchema<typeof TlvAttributePath>;
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
+ import { TypeFromSchema } from "#tlv/TlvSchema.js";
7
8
  import { TlvObject, TlvOptionalField } from "../../tlv/TlvObject.js";
8
9
  import { TlvAttributeReportData } from "./TlvAttributeReportData.js";
9
10
  import { TlvAttributeStatus } from "./TlvAttributeStatus.js";
@@ -15,3 +16,5 @@ export const TlvAttributeReport = TlvObject({
15
16
  attributeStatus: TlvOptionalField(0, TlvAttributeStatus),
16
17
  attributeData: TlvOptionalField(1, TlvAttributeReportData),
17
18
  });
19
+
20
+ export type AttributeReport = TypeFromSchema<typeof TlvAttributeReport>;
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
+ import { TypeFromSchema } from "#tlv/TlvSchema.js";
7
8
  import { TlvAny } from "../../tlv/TlvAny.js";
8
9
  import { TlvUInt32 } from "../../tlv/TlvNumber.js";
9
10
  import { TlvField, TlvObject, TlvOptionalField } from "../../tlv/TlvObject.js";
@@ -15,3 +16,5 @@ export const TlvAttributeReportData = TlvObject({
15
16
  path: TlvField(1, TlvAttributePath),
16
17
  data: TlvField(2, TlvAny),
17
18
  });
19
+
20
+ export type AttributeReportData = TypeFromSchema<typeof TlvAttributeReportData>;
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
+ import { TypeFromSchema } from "#tlv/TlvSchema.js";
7
8
  import { TlvField, TlvObject } from "../../tlv/TlvObject.js";
8
9
  import { TlvAttributePath } from "./TlvAttributePath.js";
9
10
  import { TlvStatus } from "./TlvStatus.js";
@@ -15,3 +16,5 @@ export const TlvAttributeStatus = TlvObject({
15
16
  path: TlvField(0, TlvAttributePath),
16
17
  status: TlvField(1, TlvStatus),
17
18
  });
19
+
20
+ export type AttributeStatus = TypeFromSchema<typeof TlvAttributeStatus>;
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
+ import { TypeFromSchema } from "#tlv/TlvSchema.js";
7
8
  import { TlvAny } from "../../tlv/TlvAny.js";
8
9
  import { TlvUInt16 } from "../../tlv/TlvNumber.js";
9
10
  import { TlvField, TlvObject, TlvOptionalField } from "../../tlv/TlvObject.js";
@@ -17,3 +18,5 @@ export const TlvCommandData = TlvObject({
17
18
  commandFields: TlvOptionalField(1, TlvAny),
18
19
  commandRef: TlvOptionalField(2, TlvUInt16),
19
20
  });
21
+
22
+ export type CommandData = TypeFromSchema<typeof TlvCommandData>;
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
+ import { TypeFromSchema } from "#tlv/TlvSchema.js";
7
8
  import { TlvUInt32 } from "../../tlv/TlvNumber.js";
8
9
  import { TlvField, TlvObject } from "../../tlv/TlvObject.js";
9
10
  import { TlvClusterPath } from "./TlvClusterPath.js";
@@ -15,3 +16,5 @@ export const TlvDataVersionFilter = TlvObject({
15
16
  path: TlvField(0, TlvClusterPath),
16
17
  dataVersion: TlvField(1, TlvUInt32),
17
18
  });
19
+
20
+ export type DataVersionFilter = TypeFromSchema<typeof TlvDataVersionFilter>;
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
+ import { TypeFromSchema } from "#tlv/TlvSchema.js";
7
8
  import { EventPriority } from "../../cluster/Cluster.js";
8
9
  import { TlvEventNumber } from "../../datatype/EventNumber.js";
9
10
  import { TlvAny } from "../../tlv/TlvAny.js";
@@ -24,3 +25,5 @@ export const TlvEventData = TlvObject({
24
25
  deltaSystemTimestamp: TlvOptionalField(6, TlvSysTimeMS),
25
26
  data: TlvOptionalField(7, TlvAny),
26
27
  });
28
+
29
+ export type EventData = TypeFromSchema<typeof TlvEventData>;
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
+ import { TypeFromSchema } from "#tlv/TlvSchema.js";
7
8
  import { TlvNodeId } from "../../datatype/NodeId.js";
8
9
  import { TlvUInt64 } from "../../tlv/TlvNumber.js";
9
10
  import { TlvField, TlvObject, TlvOptionalField } from "../../tlv/TlvObject.js";
@@ -15,3 +16,5 @@ export const TlvEventFilter = TlvObject({
15
16
  nodeId: TlvOptionalField(0, TlvNodeId),
16
17
  eventMin: TlvField(1, TlvUInt64),
17
18
  });
19
+
20
+ export type EventFilter = TypeFromSchema<typeof TlvEventFilter>;
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
+ import { TypeFromSchema } from "#tlv/TlvSchema.js";
7
8
  import { TlvClusterId } from "../../datatype/ClusterId.js";
8
9
  import { TlvEndpointNumber } from "../../datatype/EndpointNumber.js";
9
10
  import { TlvEventId } from "../../datatype/EventId.js";
@@ -21,3 +22,5 @@ export const TlvEventPath = TlvTaggedList({
21
22
  eventId: TlvOptionalField(3, TlvEventId),
22
23
  isUrgent: TlvOptionalField(4, TlvBoolean),
23
24
  });
25
+
26
+ export type EventPath = TypeFromSchema<typeof TlvEventPath>;
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
+ import { TypeFromSchema } from "#tlv/TlvSchema.js";
7
8
  import { TlvObject, TlvOptionalField } from "../../tlv/TlvObject.js";
8
9
  import { TlvEventData } from "./TlvEventData.js";
9
10
  import { TlvEventStatus } from "./TlvEventStatus.js";
@@ -15,3 +16,5 @@ export const TlvEventReport = TlvObject({
15
16
  eventStatus: TlvOptionalField(0, TlvEventStatus),
16
17
  eventData: TlvOptionalField(1, TlvEventData),
17
18
  });
19
+
20
+ export type EventReport = TypeFromSchema<typeof TlvEventReport>;
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
+ import { TypeFromSchema } from "#tlv/TlvSchema.js";
7
8
  import { TlvField, TlvObject } from "../../tlv/TlvObject.js";
8
9
  import { TlvEventPath } from "./TlvEventPath.js";
9
10
  import { TlvStatus } from "./TlvStatus.js";
@@ -15,3 +16,5 @@ export const TlvEventStatus = TlvObject({
15
16
  path: TlvField(0, TlvEventPath),
16
17
  status: TlvField(1, TlvStatus),
17
18
  });
19
+
20
+ export type EventStatus = TypeFromSchema<typeof TlvEventStatus>;
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
+ import { TypeFromSchema } from "#tlv/TlvSchema.js";
7
8
  import { TlvObject, TlvOptionalField } from "../../tlv/TlvObject.js";
8
9
  import { TlvCommandData } from "./TlvCommandData.js";
9
10
  import { TlvCommandStatus } from "./TlvCommandStatus.js";
@@ -15,3 +16,5 @@ export const TlvInvokeResponseData = TlvObject({
15
16
  command: TlvOptionalField(0, TlvCommandData),
16
17
  status: TlvOptionalField(1, TlvCommandStatus),
17
18
  });
19
+
20
+ export type InvokeResponseData = TypeFromSchema<typeof TlvInvokeResponseData>;