@project-chip/matter.js 0.0.2 → 0.2.0

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 (136) hide show
  1. package/README.md +14 -0
  2. package/dist/cjs/cluster/AccessControlCluster.js +105 -0
  3. package/dist/cjs/cluster/BasicInformationCluster.js +92 -0
  4. package/dist/cjs/cluster/BindingCluster.js +51 -0
  5. package/dist/cjs/cluster/BridgedDeviceBasicInformationCluster.js +75 -0
  6. package/dist/cjs/cluster/Cluster.js +49 -0
  7. package/dist/cjs/cluster/DescriptorCluster.js +53 -0
  8. package/dist/cjs/cluster/GeneralCommissioningCluster.js +89 -0
  9. package/dist/cjs/cluster/GroupsCluster.js +140 -0
  10. package/dist/cjs/cluster/IdentifyCluster.js +55 -0
  11. package/dist/cjs/cluster/LabelCluster.js +55 -0
  12. package/dist/cjs/cluster/OnOffCluster.js +105 -0
  13. package/dist/cjs/cluster/OperationalCredentialsCluster.js +205 -0
  14. package/dist/cjs/cluster/ScenesCluster.js +236 -0
  15. package/dist/cjs/common/AttributeId.js +23 -0
  16. package/dist/cjs/common/ClusterId.js +24 -0
  17. package/dist/cjs/common/DeviceTypeId.js +23 -0
  18. package/dist/cjs/common/EndpointNumber.js +23 -0
  19. package/dist/cjs/common/FabricId.js +24 -0
  20. package/dist/cjs/common/FabricIndex.js +28 -0
  21. package/dist/cjs/common/GroupId.js +30 -0
  22. package/dist/cjs/common/NodeId.js +31 -0
  23. package/dist/cjs/common/SubjectId.js +11 -0
  24. package/dist/cjs/common/VendorId.js +25 -0
  25. package/{dist-cjs → dist/cjs}/matter.js +12 -0
  26. package/dist/cjs/protocol/InteractionProtocol.js +136 -0
  27. package/dist/cjs/schema/BitmapSchema.js +133 -0
  28. package/{dist-cjs → dist/cjs}/tlv/TlvObject.js +6 -2
  29. package/{dist-cjs → dist/cjs}/util/ByteArray.js +2 -0
  30. package/{dist-cjs → dist/cjs}/util/Type.js +3 -0
  31. package/dist/dts/cluster/AccessControlCluster.d.ts +108 -0
  32. package/dist/dts/cluster/BasicInformationCluster.d.ts +57 -0
  33. package/dist/dts/cluster/BindingCluster.d.ts +23 -0
  34. package/dist/dts/cluster/BridgedDeviceBasicInformationCluster.d.ts +53 -0
  35. package/dist/dts/cluster/Cluster.d.ts +109 -0
  36. package/dist/dts/cluster/DescriptorCluster.d.ts +25 -0
  37. package/dist/dts/cluster/GeneralCommissioningCluster.d.ts +94 -0
  38. package/dist/dts/cluster/GroupsCluster.d.ts +92 -0
  39. package/dist/dts/cluster/IdentifyCluster.d.ts +60 -0
  40. package/dist/dts/cluster/LabelCluster.d.ts +34 -0
  41. package/dist/dts/cluster/OnOffCluster.d.ts +85 -0
  42. package/dist/dts/cluster/OperationalCredentialsCluster.d.ts +156 -0
  43. package/dist/dts/cluster/ScenesCluster.d.ts +200 -0
  44. package/dist/dts/common/AttributeId.d.ts +17 -0
  45. package/dist/dts/common/ClusterId.d.ts +18 -0
  46. package/dist/dts/common/DeviceTypeId.d.ts +17 -0
  47. package/dist/dts/common/EndpointNumber.d.ts +17 -0
  48. package/dist/dts/common/FabricId.d.ts +18 -0
  49. package/dist/dts/common/FabricIndex.d.ts +22 -0
  50. package/dist/dts/common/GroupId.d.ts +24 -0
  51. package/dist/dts/common/NodeId.d.ts +19 -0
  52. package/dist/dts/common/SubjectId.d.ts +15 -0
  53. package/dist/dts/common/VendorId.d.ts +19 -0
  54. package/dist/{matter.d.ts → dts/matter.d.ts} +12 -0
  55. package/dist/dts/protocol/InteractionProtocol.d.ts +159 -0
  56. package/dist/{schema → dts/schema}/BitmapSchema.d.ts +15 -3
  57. package/dist/{util → dts/util}/Type.d.ts +1 -0
  58. package/dist/es/cluster/AccessControlCluster.js +102 -0
  59. package/dist/es/cluster/BasicInformationCluster.js +89 -0
  60. package/dist/es/cluster/BindingCluster.js +48 -0
  61. package/dist/es/cluster/BridgedDeviceBasicInformationCluster.js +72 -0
  62. package/dist/es/cluster/Cluster.js +36 -0
  63. package/dist/es/cluster/DescriptorCluster.js +50 -0
  64. package/dist/es/cluster/GeneralCommissioningCluster.js +86 -0
  65. package/dist/es/cluster/GroupsCluster.js +137 -0
  66. package/dist/es/cluster/IdentifyCluster.js +52 -0
  67. package/dist/es/cluster/LabelCluster.js +52 -0
  68. package/dist/es/cluster/OnOffCluster.js +102 -0
  69. package/dist/es/cluster/OperationalCredentialsCluster.js +202 -0
  70. package/dist/es/cluster/ScenesCluster.js +233 -0
  71. package/dist/es/common/AttributeId.js +19 -0
  72. package/dist/es/common/ClusterId.js +20 -0
  73. package/dist/es/common/DeviceTypeId.js +19 -0
  74. package/dist/es/common/EndpointNumber.js +19 -0
  75. package/dist/es/common/FabricId.js +20 -0
  76. package/dist/es/common/FabricIndex.js +24 -0
  77. package/dist/es/common/GroupId.js +26 -0
  78. package/dist/es/common/NodeId.js +27 -0
  79. package/dist/es/common/SubjectId.js +8 -0
  80. package/dist/es/common/VendorId.js +21 -0
  81. package/dist/{matter.js → es/matter.js} +12 -0
  82. package/dist/es/protocol/InteractionProtocol.js +133 -0
  83. package/dist/es/schema/BitmapSchema.js +125 -0
  84. package/dist/{tlv → es/tlv}/TlvObject.js +6 -2
  85. package/dist/{util → es/util}/ByteArray.js +2 -0
  86. package/dist/{util → es/util}/Type.js +1 -1
  87. package/package.json +7 -8
  88. package/dist/schema/BitmapSchema.js +0 -48
  89. package/dist-cjs/schema/BitmapSchema.js +0 -55
  90. /package/{dist-cjs → dist/cjs}/schema/Schema.js +0 -0
  91. /package/{dist-cjs → dist/cjs}/spec/Specifications.js +0 -0
  92. /package/{dist-cjs → dist/cjs}/tlv/TlvAny.js +0 -0
  93. /package/{dist-cjs → dist/cjs}/tlv/TlvArray.js +0 -0
  94. /package/{dist-cjs → dist/cjs}/tlv/TlvBoolean.js +0 -0
  95. /package/{dist-cjs → dist/cjs}/tlv/TlvCodec.js +0 -0
  96. /package/{dist-cjs → dist/cjs}/tlv/TlvNullable.js +0 -0
  97. /package/{dist-cjs → dist/cjs}/tlv/TlvNumber.js +0 -0
  98. /package/{dist-cjs → dist/cjs}/tlv/TlvSchema.js +0 -0
  99. /package/{dist-cjs → dist/cjs}/tlv/TlvString.js +0 -0
  100. /package/{dist-cjs → dist/cjs}/tlv/TlvVoid.js +0 -0
  101. /package/{dist-cjs → dist/cjs}/tlv/TlvWrapper.js +0 -0
  102. /package/{dist-cjs → dist/cjs}/util/DataReader.js +0 -0
  103. /package/{dist-cjs → dist/cjs}/util/DataWriter.js +0 -0
  104. /package/{dist-cjs → dist/cjs}/util/Number.js +0 -0
  105. /package/dist/{schema → dts/schema}/Schema.d.ts +0 -0
  106. /package/dist/{spec → dts/spec}/Specifications.d.ts +0 -0
  107. /package/dist/{tlv → dts/tlv}/TlvAny.d.ts +0 -0
  108. /package/dist/{tlv → dts/tlv}/TlvArray.d.ts +0 -0
  109. /package/dist/{tlv → dts/tlv}/TlvBoolean.d.ts +0 -0
  110. /package/dist/{tlv → dts/tlv}/TlvCodec.d.ts +0 -0
  111. /package/dist/{tlv → dts/tlv}/TlvNullable.d.ts +0 -0
  112. /package/dist/{tlv → dts/tlv}/TlvNumber.d.ts +0 -0
  113. /package/dist/{tlv → dts/tlv}/TlvObject.d.ts +0 -0
  114. /package/dist/{tlv → dts/tlv}/TlvSchema.d.ts +0 -0
  115. /package/dist/{tlv → dts/tlv}/TlvString.d.ts +0 -0
  116. /package/dist/{tlv → dts/tlv}/TlvVoid.d.ts +0 -0
  117. /package/dist/{tlv → dts/tlv}/TlvWrapper.d.ts +0 -0
  118. /package/dist/{util → dts/util}/ByteArray.d.ts +0 -0
  119. /package/dist/{util → dts/util}/DataReader.d.ts +0 -0
  120. /package/dist/{util → dts/util}/DataWriter.d.ts +0 -0
  121. /package/dist/{util → dts/util}/Number.d.ts +0 -0
  122. /package/dist/{schema → es/schema}/Schema.js +0 -0
  123. /package/dist/{spec → es/spec}/Specifications.js +0 -0
  124. /package/dist/{tlv → es/tlv}/TlvAny.js +0 -0
  125. /package/dist/{tlv → es/tlv}/TlvArray.js +0 -0
  126. /package/dist/{tlv → es/tlv}/TlvBoolean.js +0 -0
  127. /package/dist/{tlv → es/tlv}/TlvCodec.js +0 -0
  128. /package/dist/{tlv → es/tlv}/TlvNullable.js +0 -0
  129. /package/dist/{tlv → es/tlv}/TlvNumber.js +0 -0
  130. /package/dist/{tlv → es/tlv}/TlvSchema.js +0 -0
  131. /package/dist/{tlv → es/tlv}/TlvString.js +0 -0
  132. /package/dist/{tlv → es/tlv}/TlvVoid.js +0 -0
  133. /package/dist/{tlv → es/tlv}/TlvWrapper.js +0 -0
  134. /package/dist/{util → es/util}/DataReader.js +0 -0
  135. /package/dist/{util → es/util}/DataWriter.js +0 -0
  136. /package/dist/{util → es/util}/Number.js +0 -0
@@ -0,0 +1,92 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Project CHIP Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { Attribute, Cluster, Command } from "./Cluster.js";
7
+ import { BitFlag } from "../schema/BitmapSchema.js";
8
+ import { StatusCode } from "../protocol/InteractionProtocol.js";
9
+ /**
10
+ * The Groups cluster manages, per endpoint, the content of the node-wide Group
11
+ * Table that is part of the underlying interaction layer.
12
+ *
13
+ * @see {@link MatterApplicationClusterSpecificationV1_0} § 1.3
14
+ */
15
+ export declare const GroupsCluster: Cluster<{
16
+ /** The ability to store a name for a group. */
17
+ groupNames: BitFlag;
18
+ }, {
19
+ nameSupport: Attribute<import("../schema/BitmapSchema.js").TypeFromBitSchema<{
20
+ groupNames: BitFlag;
21
+ }>>;
22
+ clusterRevision: Attribute<number>;
23
+ featureMap: Attribute<import("../schema/BitmapSchema.js").TypeFromBitSchema<{
24
+ /** The ability to store a name for a group. */
25
+ groupNames: BitFlag;
26
+ }>>;
27
+ }, {
28
+ /**
29
+ * The AddGroup command allows a client to add group membership in a particular group for the server endpoint.
30
+ */
31
+ addGroup: Command<{
32
+ groupId: import("../common/GroupId.js").GroupId;
33
+ groupName: string;
34
+ }, {
35
+ status: StatusCode;
36
+ groupId: import("../common/GroupId.js").GroupId;
37
+ }>;
38
+ /**
39
+ * The ViewGroup command allows a client to request that the server responds with a ViewGroupResponse command
40
+ * containing the name string for a particular group.
41
+ *
42
+ */
43
+ viewGroup: Command<{
44
+ groupId: import("../common/GroupId.js").GroupId;
45
+ }, {
46
+ status: StatusCode;
47
+ groupId: import("../common/GroupId.js").GroupId;
48
+ groupName: string;
49
+ }>;
50
+ /**
51
+ * The GetGroupMembership command allows a client to inquire about the group membership of the server endpoint,
52
+ * in a number of ways.
53
+ */
54
+ getGroupMembership: Command<{
55
+ groupList: import("../common/GroupId.js").GroupId[];
56
+ }, {
57
+ groupList: import("../common/GroupId.js").GroupId[];
58
+ capacity: number | null;
59
+ }>;
60
+ /**
61
+ * The RemoveGroup command allows a client to request that the server removes the membership for the server
62
+ * endpoint, if any, in a particular group.
63
+ */
64
+ removeGroup: Command<{
65
+ groupId: import("../common/GroupId.js").GroupId;
66
+ }, {
67
+ status: StatusCode;
68
+ groupId: import("../common/GroupId.js").GroupId;
69
+ }>;
70
+ /**
71
+ * The RemoveAllGroups command allows a client to direct the server to remove all group associations for the
72
+ * server endpoint.
73
+ *
74
+ * TODO: According to specs the response might be suppressed:
75
+ * If the RemoveAllGroups command was received as unicast and a response is not suppressed, the server
76
+ * SHALL generate a response with the Status field set to SUCCESS.
77
+ * Else potentially no response?
78
+ *
79
+ */
80
+ removeAllGroups: Command<{}, {
81
+ status: StatusCode;
82
+ }>;
83
+ /**
84
+ * The AddGroupIfIdentifying command allows a client to add group membership in a particular group for the
85
+ * server endpoint, on condition that the endpoint is identifying itself.
86
+ *
87
+ */
88
+ addGroupIfIdentifying: Command<{
89
+ groupId: import("../common/GroupId.js").GroupId;
90
+ groupName: string;
91
+ }, void>;
92
+ }, import("./Cluster.js").Events>;
@@ -0,0 +1,60 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Project CHIP Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { Attribute, WritableAttribute, Cluster, Command, OptionalCommand } from "./Cluster.js";
7
+ import { BitFlag } from "../schema/BitmapSchema.js";
8
+ /** @see {@link MatterApplicationClusterSpecificationV1_0} § 1.2.5.2 */
9
+ export declare const enum IdentifyType {
10
+ None = 0,
11
+ VisibleLight = 1,
12
+ VisibleLED = 2,
13
+ AudibleBeep = 3,
14
+ Display = 4,
15
+ Actuator = 5
16
+ }
17
+ /** @see {@link MatterApplicationClusterSpecificationV1_0} § 1.2.6.3.1 */
18
+ export declare const enum IdentifyEffectIdentifier {
19
+ Blink = 0,
20
+ Breathe = 1,
21
+ Okay = 2,
22
+ ChannelChange = 11,
23
+ FinishEffect = 254,
24
+ StopEffect = 255
25
+ }
26
+ /** @see {@link MatterApplicationClusterSpecificationV1_0} § 1.2.6.3.2 */
27
+ export declare const enum EffectVariant {
28
+ Default = 0
29
+ }
30
+ /**
31
+ * Attributes and commands for putting a device into Identification mode (e.g. flashing a light).
32
+ *
33
+ * @see {@link MatterApplicationClusterSpecificationV1_0} § 1.2
34
+ */
35
+ export declare const IdentifyCluster: Cluster<{
36
+ /** Replies to multicast / groupcast queries if the identification state is active. */
37
+ query: BitFlag;
38
+ }, {
39
+ identifyTime: WritableAttribute<number>;
40
+ identifyType: Attribute<IdentifyType>;
41
+ clusterRevision: Attribute<number>;
42
+ featureMap: Attribute<import("../schema/BitmapSchema.js").TypeFromBitSchema<{
43
+ /** Replies to multicast / groupcast queries if the identification state is active. */
44
+ query: BitFlag;
45
+ }>>;
46
+ }, {
47
+ /** Starts or stops the receiving device identifying itself. */
48
+ identify: Command<{
49
+ identifyTime: number;
50
+ }, void>;
51
+ /** Request the target or targets to respond if they are currently identifying themselves. */
52
+ identifyQuery: Command<{}, {
53
+ timeout: number;
54
+ }>;
55
+ /** Allows the support of feedback to the user, such as a certain light effect when identifying. */
56
+ triggerEffect: OptionalCommand<{
57
+ effectIdentifier: IdentifyEffectIdentifier;
58
+ effectVariant: EffectVariant;
59
+ }, void>;
60
+ }, import("./Cluster.js").Events>;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Project CHIP Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { Attribute, Cluster, WritableAttribute } from "./Cluster.js";
7
+ /**
8
+ * This cluster provides a feature to tag an endpoint with zero or more labels.
9
+ * Derived from LabelCluster ({@link MatterCoreSpecificationV1_0} § 9.7)
10
+ *
11
+ * @see {@link MatterCoreSpecificationV1_0} § 9.9
12
+ */
13
+ export declare const UserLabelCluster: Cluster<import("../matter.js").BitSchema, {
14
+ labelList: WritableAttribute<{
15
+ value: string;
16
+ label: string;
17
+ }[]>;
18
+ clusterRevision: Attribute<number>;
19
+ featureMap: Attribute<import("../matter.js").TypeFromBitSchema<import("../matter.js").BitSchema>>;
20
+ }, import("./Cluster.js").Commands, import("./Cluster.js").Events>;
21
+ /**
22
+ * This cluster provides a feature for the device to tag an endpoint with zero or more read only labels.
23
+ * Derived from LabelCluster ({@link MatterCoreSpecificationV1_0} § 9.7)
24
+ *
25
+ * @see {@link MatterCoreSpecificationV1_0} § 9.8
26
+ */
27
+ export declare const FixedLabelCluster: Cluster<import("../matter.js").BitSchema, {
28
+ labelList: Attribute<{
29
+ value: string;
30
+ label: string;
31
+ }[]>;
32
+ clusterRevision: Attribute<number>;
33
+ featureMap: Attribute<import("../matter.js").TypeFromBitSchema<import("../matter.js").BitSchema>>;
34
+ }, import("./Cluster.js").Commands, import("./Cluster.js").Events>;
@@ -0,0 +1,85 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Project CHIP Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { Attribute, Cluster, Command } from "./Cluster.js";
7
+ import { BitFlag } from "../schema/BitmapSchema.js";
8
+ /**
9
+ * Defined how the devices should behave when it is powered on.
10
+ * If the value is null, the OnOff attribute is set to its previous value when the device starts up.
11
+ *
12
+ * @see {@link MatterApplicationClusterSpecificationV1_0} § 1.5.5.1
13
+ */
14
+ export declare const enum StartUpOnOff {
15
+ /** Set the OnOff attribute to FALSE when the device starts up. */
16
+ Off = 0,
17
+ /** Set the OnOff attribute to TRUE when the device starts up. */
18
+ On = 1,
19
+ /**
20
+ * If the previous value of the OnOff attribute is equal to FALSE, set the OnOff
21
+ * attribute to TRUE. If the previous value of the OnOff attribute is equal to TRUE,
22
+ * set the OnOff attribute to FALSE (toggle).
23
+ */
24
+ Toggle = 2
25
+ }
26
+ /** @see {@link MatterApplicationClusterSpecificationV1_0} § 1.5.7.4.1 */
27
+ export declare const enum OnOffEffectIdentifier {
28
+ DelayedAllOff = 0,
29
+ DyingLight = 1
30
+ }
31
+ /** @see {@link MatterApplicationClusterSpecificationV1_0} § 1.5.7.4.2 */
32
+ export declare const enum DelayedAllOffEffectVariant {
33
+ /** Fade to off in 0.8 seconds. */
34
+ Fade = 0,
35
+ /** Don't fade, turn off immediately. */
36
+ NoFade = 1,
37
+ /** 50% dim down in 0.8 seconds then fade to off in 12 seconds. */
38
+ DimDownThenFade = 2
39
+ }
40
+ /** @see {@link MatterApplicationClusterSpecificationV1_0} § 1.5.7.4.2 */
41
+ export declare const enum DyingLightEffectVariant {
42
+ /** 20% dim up in 0.5s then fade to off in 1 second. */
43
+ DimUpThenFade = 0
44
+ }
45
+ /** @see {@link MatterApplicationClusterSpecificationV1_0} § 1.5.7.4.2 */
46
+ /** @see {@link MatterApplicationClusterSpecificationV1_0} § 1.5.7.4 */
47
+ /** @see {@link MatterApplicationClusterSpecificationV1_0} § 1.5.7.4.2 */
48
+ /** @see {@link MatterApplicationClusterSpecificationV1_0} § 1.5.7.6. */
49
+ /**
50
+ * Attributes and commands for switching devices between 'On' and 'Off' states.
51
+ *
52
+ * @see {@link MatterApplicationClusterSpecificationV1_0} § 1.5
53
+ */
54
+ export declare const OnOffCluster: Cluster<{
55
+ /** Level Control for Lighting - Behavior that supports lighting applications */
56
+ lightingLevelControl: BitFlag;
57
+ }, {
58
+ onOff: Attribute<boolean>;
59
+ clusterRevision: Attribute<number>;
60
+ featureMap: Attribute<import("../schema/BitmapSchema.js").TypeFromBitSchema<{
61
+ /** Level Control for Lighting - Behavior that supports lighting applications */
62
+ lightingLevelControl: BitFlag;
63
+ }>>;
64
+ }, {
65
+ /**
66
+ * On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is
67
+ * recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime
68
+ * attribute SHALL be set to 0.
69
+ */
70
+ off: Command<{}, void>;
71
+ /**
72
+ * On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is
73
+ * recommended that it is used for power on or similar functions. On receipt of the On command, if the value
74
+ * of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0.
75
+ */
76
+ on: Command<{}, void>;
77
+ /**
78
+ * On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise,
79
+ * if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value
80
+ * of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device
81
+ * SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime
82
+ * attribute SHALL be set to 0.
83
+ */
84
+ toggle: Command<{}, void>;
85
+ }, import("./Cluster.js").Events>;
@@ -0,0 +1,156 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Project CHIP Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { Attribute, Cluster, Command } from "./Cluster.js";
7
+ /** @see {@link MatterCoreSpecificationV1_0} § 11.17.5.1 */
8
+ export declare const RESP_MAX = 900;
9
+ /**
10
+ * Used by the CertificateChainRequest command to convey which certificate from the device attestation certificate
11
+ * chain to transmit back to the client.
12
+ *
13
+ * @see {@link MatterCoreSpecificationV1_0} § 11.17.5.8 */
14
+ export declare const enum CertificateChainType {
15
+ /** Request the DER- encoded DAC certificate */
16
+ DeviceAttestation = 1,
17
+ /** Request the DER- encoded PAI certificate */
18
+ ProductAttestationIntermediate = 2
19
+ }
20
+ /**
21
+ * Used by the NOCResponse common response command to convey detailed outcome of several of this cluster’s operations.
22
+ *
23
+ * @see {@link MatterCoreSpecificationV1_0} § 11.17.5.9 */
24
+ export declare const enum OperationalCertStatus {
25
+ /** OK, no error. */
26
+ Success = 0,
27
+ /** Public Key in the NOC does not match the public key in the NOCSR. */
28
+ InvalidPublicKey = 1,
29
+ /** The Node Operational ID in the NOC is not formatted correctly. */
30
+ InvalidNodeOpId = 2,
31
+ /** Any other validation error in NOC chain. */
32
+ InvalidOperationalCert = 3,
33
+ /** No record of prior CSR for which this NOC could match. */
34
+ MissingCsr = 4,
35
+ /** NOCs table full, cannot add another one. */
36
+ TableFull = 5,
37
+ /** Invalid CaseAdminSubject field for an AddNOC command. */
38
+ InvalidAdminSubject = 6,
39
+ /** Trying to AddNOC instead of UpdateNOC against an existing Fabric. */
40
+ FabricConflict = 9,
41
+ /** Label already exists on another Fabric. */
42
+ LabelConflict = 10,
43
+ /** FabricIndex argument is invalid. */
44
+ InvalidFabricIndex = 11
45
+ }
46
+ /** @see {@link MatterCoreSpecificationV1_0} § 11.17.5.4 */
47
+ export declare const TlvAttestation: import("../tlv/TlvObject.js").ObjectSchema<{
48
+ declaration: import("../tlv/TlvObject.js").FieldType<Uint8Array>;
49
+ attestationNonce: import("../tlv/TlvObject.js").FieldType<Uint8Array>;
50
+ timestamp: import("../tlv/TlvObject.js").FieldType<number>;
51
+ firmwareInfo: import("../tlv/TlvObject.js").OptionalFieldType<Uint8Array>;
52
+ }>;
53
+ /** @see {@link MatterCoreSpecificationV1_0} § 11.17.5.6 */
54
+ export declare const TlvCertSigningRequest: import("../tlv/TlvObject.js").ObjectSchema<{
55
+ certSigningRequest: import("../tlv/TlvObject.js").FieldType<Uint8Array>;
56
+ certSigningRequestNonce: import("../tlv/TlvObject.js").FieldType<Uint8Array>;
57
+ vendorReserved1: import("../tlv/TlvObject.js").OptionalFieldType<Uint8Array>;
58
+ vendorReserved2: import("../tlv/TlvObject.js").OptionalFieldType<Uint8Array>;
59
+ vendorReserved3: import("../tlv/TlvObject.js").OptionalFieldType<Uint8Array>;
60
+ }>;
61
+ /**
62
+ * This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the
63
+ * associated Fabrics.
64
+ *
65
+ * @see {@link MatterCoreSpecificationV1_0} § 11.17
66
+ */
67
+ export declare const OperationalCredentialsCluster: Cluster<import("../matter.js").BitSchema, {
68
+ nocs: Attribute<{
69
+ noc: Uint8Array;
70
+ icac: Uint8Array | null;
71
+ }[]>;
72
+ fabrics: Attribute<{
73
+ label: string;
74
+ vendorId: import("../common/VendorId.js").VendorId;
75
+ rootPublicKey: Uint8Array;
76
+ fabricID: import("../common/FabricId.js").FabricId;
77
+ nodeID: import("../common/NodeId.js").NodeId;
78
+ }[]>;
79
+ supportedFabrics: Attribute<number>;
80
+ commissionedFabrics: Attribute<number>;
81
+ trustedRootCertificates: Attribute<Uint8Array[]>;
82
+ currentFabricIndex: Attribute<number>;
83
+ clusterRevision: Attribute<number>;
84
+ featureMap: Attribute<import("../matter.js").TypeFromBitSchema<import("../matter.js").BitSchema>>;
85
+ }, {
86
+ /** Sender is requesting attestation information from the receiver. */
87
+ requestAttestation: Command<{
88
+ attestationNonce: Uint8Array;
89
+ }, {
90
+ elements: Uint8Array;
91
+ signature: Uint8Array;
92
+ }>;
93
+ /** Sender is requesting a device attestation certificate from the receiver. */
94
+ requestCertChain: Command<{
95
+ type: CertificateChainType;
96
+ }, {
97
+ certificate: Uint8Array;
98
+ }>;
99
+ /** Sender is requesting a certificate signing request (CSR) from the receiver. */
100
+ requestCertSigning: Command<{
101
+ certSigningRequestNonce: Uint8Array;
102
+ isForUpdateNOC?: boolean | undefined;
103
+ }, {
104
+ elements: Uint8Array;
105
+ signature: Uint8Array;
106
+ }>;
107
+ /** Sender is requesting to add the new node operational certificates. */
108
+ addOperationalCert: Command<{
109
+ operationalCert: Uint8Array;
110
+ identityProtectionKey: Uint8Array;
111
+ caseAdminNode: import("../common/NodeId.js").NodeId;
112
+ adminVendorId: import("../common/VendorId.js").VendorId;
113
+ intermediateCaCert?: Uint8Array | undefined;
114
+ }, {
115
+ status: OperationalCertStatus;
116
+ fabricIndex?: import("../common/FabricIndex.js").FabricIndex | undefined;
117
+ debugText?: string | undefined;
118
+ }>;
119
+ /** Sender is requesting to update the node operational certificates. */
120
+ updateOperationalCert: Command<{
121
+ operationalCert: Uint8Array;
122
+ intermediateCaCert?: Uint8Array | undefined;
123
+ }, {
124
+ status: OperationalCertStatus;
125
+ fabricIndex?: import("../common/FabricIndex.js").FabricIndex | undefined;
126
+ debugText?: string | undefined;
127
+ }>;
128
+ /**
129
+ * This command SHALL be used by an Administrative Node to set the user-visible Label field for a given
130
+ * Fabric, as reflected by entries in the Fabrics attribute.
131
+ */
132
+ updateFabricLabel: Command<{
133
+ label: string;
134
+ }, {
135
+ status: OperationalCertStatus;
136
+ fabricIndex?: import("../common/FabricIndex.js").FabricIndex | undefined;
137
+ debugText?: string | undefined;
138
+ }>;
139
+ /**
140
+ * This command is used by Administrative Nodes to remove a given fabric index and delete all associated
141
+ * fabric-scoped data.
142
+ */
143
+ removeFabric: Command<{
144
+ fabricIndex: import("../common/FabricIndex.js").FabricIndex;
145
+ }, {
146
+ status: OperationalCertStatus;
147
+ fabricIndex?: import("../common/FabricIndex.js").FabricIndex | undefined;
148
+ debugText?: string | undefined;
149
+ }>;
150
+ /**
151
+ * This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation.
152
+ */
153
+ addRootCert: Command<{
154
+ certificate: Uint8Array;
155
+ }, void>;
156
+ }, import("./Cluster.js").Events>;
@@ -0,0 +1,200 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Project CHIP Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { Attribute, OptionalAttribute, Cluster, Command, OptionalCommand } from "./Cluster.js";
7
+ import { BitFlag } from "../schema/BitmapSchema.js";
8
+ import { StatusCode } from "../protocol/InteractionProtocol.js";
9
+ /**
10
+ * This data type indicates for a given cluster a set of attributes and their values. Only attributes which
11
+ * have the "S" designation in the Quality column of the cluster specification SHALL be used in the
12
+ * AttributeValueList field.
13
+ *
14
+ * @see {@link MatterApplicationClusterSpecificationV1_0} § 1.4.6.2
15
+ */
16
+ export declare const TlvExtensionFieldSet: import("../tlv/TlvObject.js").ObjectSchema<{
17
+ clusterId: import("../tlv/TlvObject.js").FieldType<import("../common/ClusterId.js").ClusterId>;
18
+ attributeValueList: import("../tlv/TlvObject.js").FieldType<{
19
+ attributeId: import("../common/AttributeId.js").AttributeId;
20
+ attributeValue: import("../matter.js").TlvStream[];
21
+ }[]>;
22
+ }>;
23
+ /**
24
+ * The Scenes cluster provides attributes and commands for setting up and recalling scenes.
25
+ * Each scene corresponds to a set of stored values of specified attributes for one or more
26
+ * clusters on the same end point as the Scenes cluster.
27
+ *
28
+ * @see {@link MatterApplicationClusterSpecificationV1_0} § 1.4
29
+ */
30
+ export declare const ScenesCluster: Cluster<{
31
+ /** The ability to store a name for a scene. */
32
+ sceneNames: BitFlag;
33
+ }, {
34
+ sceneCount: Attribute<number>;
35
+ currentScene: Attribute<number>;
36
+ currentGroup: Attribute<number>;
37
+ sceneValid: Attribute<boolean>;
38
+ nameSupport: Attribute<import("../schema/BitmapSchema.js").TypeFromBitSchema<{
39
+ sceneNames: BitFlag;
40
+ }>>;
41
+ lastConfiguredBy: OptionalAttribute<import("../common/NodeId.js").NodeId | null>;
42
+ clusterRevision: Attribute<number>;
43
+ featureMap: Attribute<import("../schema/BitmapSchema.js").TypeFromBitSchema<{
44
+ /** The ability to store a name for a scene. */
45
+ sceneNames: BitFlag;
46
+ }>>;
47
+ }, {
48
+ /**
49
+ * Add a scene to the scene table.
50
+ * Extension field sets are supported, and are inputed as
51
+ * '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}'
52
+ */
53
+ addScene: Command<{
54
+ groupId: import("../common/GroupId.js").GroupId;
55
+ sceneId: number;
56
+ transitionTime: number;
57
+ sceneName: string;
58
+ extensionFieldSets: {
59
+ clusterId: import("../common/ClusterId.js").ClusterId;
60
+ attributeValueList: {
61
+ attributeId: import("../common/AttributeId.js").AttributeId;
62
+ attributeValue: import("../matter.js").TlvStream[];
63
+ }[];
64
+ }[];
65
+ }, {
66
+ status: StatusCode;
67
+ groupId: import("../common/GroupId.js").GroupId;
68
+ sceneId: number;
69
+ }>;
70
+ /**
71
+ * Retrieves the requested scene entry from its Scene table.
72
+ */
73
+ viewScene: Command<{
74
+ groupId: import("../common/GroupId.js").GroupId;
75
+ sceneId: number;
76
+ }, {
77
+ status: StatusCode;
78
+ groupId: import("../common/GroupId.js").GroupId;
79
+ sceneId: number;
80
+ transitionTime?: number | undefined;
81
+ sceneName?: string | undefined;
82
+ extensionFieldSets?: {
83
+ clusterId: import("../common/ClusterId.js").ClusterId;
84
+ attributeValueList: {
85
+ attributeId: import("../common/AttributeId.js").AttributeId;
86
+ attributeValue: import("../matter.js").TlvStream[];
87
+ }[];
88
+ }[] | undefined;
89
+ }>;
90
+ /**
91
+ * Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table
92
+ */
93
+ removeScene: Command<{
94
+ groupId: import("../common/GroupId.js").GroupId;
95
+ sceneId: number;
96
+ }, {
97
+ status: StatusCode;
98
+ groupId: import("../common/GroupId.js").GroupId;
99
+ sceneId: number;
100
+ }>;
101
+ /**
102
+ * Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table
103
+ */
104
+ removeAllScenes: Command<{
105
+ groupId: import("../common/GroupId.js").GroupId;
106
+ }, {
107
+ status: StatusCode;
108
+ groupId: import("../common/GroupId.js").GroupId;
109
+ }>;
110
+ /**
111
+ * Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current
112
+ * state of other clusters on the same endpoint
113
+ */
114
+ storeScenes: Command<{
115
+ groupId: import("../common/GroupId.js").GroupId;
116
+ sceneId: number;
117
+ }, {
118
+ status: StatusCode;
119
+ groupId: import("../common/GroupId.js").GroupId;
120
+ sceneId: number;
121
+ }>;
122
+ /**
123
+ * Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to
124
+ * the requested scene entry in the Scene Table
125
+ */
126
+ recallScene: Command<{
127
+ groupId: import("../common/GroupId.js").GroupId;
128
+ sceneId: number;
129
+ transitionTime?: number | null | undefined;
130
+ }, void>;
131
+ /**
132
+ * Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to
133
+ * get the used scene identifiers within a certain group
134
+ */
135
+ getSceneMembership: Command<{
136
+ groupId: import("../common/GroupId.js").GroupId;
137
+ }, {
138
+ status: StatusCode;
139
+ groupId: import("../common/GroupId.js").GroupId;
140
+ capacity: number | null;
141
+ sceneList?: number[] | undefined;
142
+ }>;
143
+ /**
144
+ * Allows a scene to be added using a finer scene transition time than the AddScene command.
145
+ */
146
+ enhancedAddScene: OptionalCommand<{
147
+ groupId: import("../common/GroupId.js").GroupId;
148
+ sceneId: number;
149
+ transitionTime: number;
150
+ sceneName: string;
151
+ extensionFieldSets: {
152
+ clusterId: import("../common/ClusterId.js").ClusterId;
153
+ attributeValueList: {
154
+ attributeId: import("../common/AttributeId.js").AttributeId;
155
+ attributeValue: import("../matter.js").TlvStream[];
156
+ }[];
157
+ }[];
158
+ }, {
159
+ status: StatusCode;
160
+ groupId: import("../common/GroupId.js").GroupId;
161
+ sceneId: number;
162
+ }>;
163
+ /**
164
+ * Allows a scene to be retrieved using a finer scene transition time than the ViewScene command
165
+ */
166
+ enhancedViewScene: OptionalCommand<{
167
+ groupId: import("../common/GroupId.js").GroupId;
168
+ sceneId: number;
169
+ }, {
170
+ status: StatusCode;
171
+ groupId: import("../common/GroupId.js").GroupId;
172
+ sceneId: number;
173
+ transitionTime?: number | undefined;
174
+ sceneName?: string | undefined;
175
+ extensionFieldSets?: {
176
+ clusterId: import("../common/ClusterId.js").ClusterId;
177
+ attributeValueList: {
178
+ attributeId: import("../common/AttributeId.js").AttributeId;
179
+ attributeValue: import("../matter.js").TlvStream[];
180
+ }[];
181
+ }[] | undefined;
182
+ }>;
183
+ /**
184
+ * Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene
185
+ * identifier pair.
186
+ */
187
+ copyScene: OptionalCommand<{
188
+ mode: import("../schema/BitmapSchema.js").TypeFromBitSchema<{
189
+ copyAllScenes: BitFlag;
190
+ }>;
191
+ groupIdFrom: import("../common/GroupId.js").GroupId;
192
+ sceneIdFrom: number;
193
+ TlvGroupIdo: import("../common/GroupId.js").GroupId;
194
+ sceneIdTo: number;
195
+ }, {
196
+ status: StatusCode;
197
+ groupIdFrom: import("../common/GroupId.js").GroupId;
198
+ sceneIdFrom: number;
199
+ }>;
200
+ }, import("./Cluster.js").Events>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Project CHIP Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { TlvWrapper } from "../tlv/TlvWrapper.js";
7
+ /**
8
+ * An Attribute ID is a 32 bit number and indicates an attribute defined in a cluster specification.
9
+ *
10
+ * @see {@link MatterCoreSpecificationV1_0} § 7.18.2.15
11
+ */
12
+ export declare class AttributeId {
13
+ readonly id: number;
14
+ constructor(id: number);
15
+ }
16
+ /** Tlv schema for an Attribute Id. */
17
+ export declare const TlvAttributeId: TlvWrapper<AttributeId, number>;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Project CHIP Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { TlvWrapper } from "../tlv/TlvWrapper.js";
7
+ /**
8
+ * A Cluster Identifier is a 32 bit number and SHALL reference a single cluster specification and
9
+ * SHALL define conformance to that specification.
10
+ *
11
+ * @see {@link MatterCoreSpecificationV1_0} § 7.10
12
+ */
13
+ export declare class ClusterId {
14
+ readonly id: number;
15
+ constructor(id: number);
16
+ }
17
+ /** Tlv schema for a cluster Id. */
18
+ export declare const TlvClusterId: TlvWrapper<ClusterId, number>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Project CHIP Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { TlvWrapper } from "../tlv/TlvWrapper.js";
7
+ /**
8
+ * A Device type ID is a 32-bit number that defines the type of the device.
9
+ *
10
+ * @see {@link MatterCoreSpecificationV1_0} § 7.15
11
+ */
12
+ export declare class DeviceTypeId {
13
+ readonly id: number;
14
+ constructor(id: number);
15
+ }
16
+ /** Tlv schema for a Device type ID. */
17
+ export declare const TlvDeviceTypeId: TlvWrapper<DeviceTypeId, number>;