@matter/protocol 0.16.0-alpha.0-20251213-e83db3732 → 0.16.0-alpha.0-20251217-038f88085

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 (309) hide show
  1. package/LICENSE +1 -1
  2. package/dist/cjs/action/client/ClientInteraction.d.ts +12 -5
  3. package/dist/cjs/action/client/ClientInteraction.d.ts.map +1 -1
  4. package/dist/cjs/action/client/ClientInteraction.js +39 -15
  5. package/dist/cjs/action/client/ClientInteraction.js.map +1 -1
  6. package/dist/cjs/action/client/ClientRead.d.ts +10 -0
  7. package/dist/cjs/action/client/ClientRead.d.ts.map +1 -0
  8. package/dist/cjs/action/client/ClientRead.js +22 -0
  9. package/dist/cjs/action/client/ClientRead.js.map +6 -0
  10. package/dist/cjs/action/client/ClientRequest.d.ts +20 -0
  11. package/dist/cjs/action/client/ClientRequest.d.ts.map +1 -0
  12. package/dist/cjs/action/client/ClientRequest.js +22 -0
  13. package/dist/cjs/action/client/ClientRequest.js.map +6 -0
  14. package/dist/cjs/action/client/ClientWrite.d.ts +10 -0
  15. package/dist/cjs/action/client/ClientWrite.d.ts.map +1 -0
  16. package/dist/cjs/action/client/ClientWrite.js +22 -0
  17. package/dist/cjs/action/client/ClientWrite.js.map +6 -0
  18. package/dist/cjs/action/client/QueuedClientInteraction.d.ts +49 -0
  19. package/dist/cjs/action/client/QueuedClientInteraction.d.ts.map +1 -0
  20. package/dist/cjs/action/client/QueuedClientInteraction.js +160 -0
  21. package/dist/cjs/action/client/QueuedClientInteraction.js.map +6 -0
  22. package/dist/cjs/action/client/index.d.ts +4 -0
  23. package/dist/cjs/action/client/index.d.ts.map +1 -1
  24. package/dist/cjs/action/client/index.js +4 -0
  25. package/dist/cjs/action/client/index.js.map +1 -1
  26. package/dist/cjs/action/client/subscription/ClientSubscribe.d.ts +2 -1
  27. package/dist/cjs/action/client/subscription/ClientSubscribe.d.ts.map +1 -1
  28. package/dist/cjs/action/client/subscription/ClientSubscriptionHandler.d.ts.map +1 -1
  29. package/dist/cjs/action/client/subscription/ClientSubscriptionHandler.js +14 -3
  30. package/dist/cjs/action/client/subscription/ClientSubscriptionHandler.js.map +1 -1
  31. package/dist/cjs/action/client/subscription/SustainedSubscription.d.ts +1 -1
  32. package/dist/cjs/action/client/subscription/SustainedSubscription.d.ts.map +1 -1
  33. package/dist/cjs/action/client/subscription/SustainedSubscription.js +1 -4
  34. package/dist/cjs/action/client/subscription/SustainedSubscription.js.map +1 -1
  35. package/dist/cjs/action/request/Invoke.d.ts +7 -1
  36. package/dist/cjs/action/request/Invoke.d.ts.map +1 -1
  37. package/dist/cjs/action/request/Invoke.js +0 -3
  38. package/dist/cjs/action/request/Invoke.js.map +1 -1
  39. package/dist/cjs/action/request/Read.d.ts.map +1 -1
  40. package/dist/cjs/action/request/Read.js +3 -2
  41. package/dist/cjs/action/request/Read.js.map +1 -1
  42. package/dist/cjs/action/request/Specifier.d.ts +1 -1
  43. package/dist/cjs/action/request/Specifier.d.ts.map +1 -1
  44. package/dist/cjs/action/request/Specifier.js +3 -0
  45. package/dist/cjs/action/request/Specifier.js.map +1 -1
  46. package/dist/cjs/action/request/Write.d.ts +1 -0
  47. package/dist/cjs/action/request/Write.d.ts.map +1 -1
  48. package/dist/cjs/action/request/Write.js +10 -2
  49. package/dist/cjs/action/request/Write.js.map +1 -1
  50. package/dist/cjs/action/response/ReadResult.d.ts +1 -1
  51. package/dist/cjs/action/response/ReadResult.d.ts.map +1 -1
  52. package/dist/cjs/cluster/client/ClusterClientTypes.d.ts +37 -8
  53. package/dist/cjs/cluster/client/ClusterClientTypes.d.ts.map +1 -1
  54. package/dist/cjs/cluster/client/index.d.ts +0 -3
  55. package/dist/cjs/cluster/client/index.d.ts.map +1 -1
  56. package/dist/cjs/cluster/client/index.js +0 -3
  57. package/dist/cjs/cluster/client/index.js.map +1 -1
  58. package/dist/cjs/interaction/InteractionMessenger.d.ts.map +1 -1
  59. package/dist/cjs/interaction/InteractionMessenger.js +3 -2
  60. package/dist/cjs/interaction/InteractionMessenger.js.map +1 -1
  61. package/dist/cjs/interaction/SubscriptionClient.d.ts.map +1 -1
  62. package/dist/cjs/interaction/SubscriptionClient.js +2 -1
  63. package/dist/cjs/interaction/SubscriptionClient.js.map +1 -1
  64. package/dist/cjs/interaction/index.d.ts +1 -1
  65. package/dist/cjs/interaction/index.d.ts.map +1 -1
  66. package/dist/cjs/interaction/index.js +1 -1
  67. package/dist/cjs/interaction/index.js.map +1 -1
  68. package/dist/cjs/peer/CommissioningError.d.ts +13 -0
  69. package/dist/cjs/peer/CommissioningError.d.ts.map +1 -0
  70. package/dist/cjs/peer/CommissioningError.js +32 -0
  71. package/dist/cjs/peer/CommissioningError.js.map +6 -0
  72. package/dist/cjs/peer/ControllerCommissioner.d.ts +2 -3
  73. package/dist/cjs/peer/ControllerCommissioner.d.ts.map +1 -1
  74. package/dist/cjs/peer/ControllerCommissioner.js +20 -13
  75. package/dist/cjs/peer/ControllerCommissioner.js.map +2 -2
  76. package/dist/cjs/peer/ControllerCommissioningFlow.d.ts +7 -16
  77. package/dist/cjs/peer/ControllerCommissioningFlow.d.ts.map +1 -1
  78. package/dist/cjs/peer/ControllerCommissioningFlow.js +395 -178
  79. package/dist/cjs/peer/ControllerCommissioningFlow.js.map +1 -1
  80. package/dist/cjs/peer/ControllerDiscovery.d.ts +4 -0
  81. package/dist/cjs/peer/ControllerDiscovery.d.ts.map +1 -1
  82. package/dist/cjs/peer/ControllerDiscovery.js +6 -3
  83. package/dist/cjs/peer/ControllerDiscovery.js.map +1 -1
  84. package/dist/cjs/peer/InteractionQueue.d.ts +2 -2
  85. package/dist/cjs/peer/InteractionQueue.d.ts.map +1 -1
  86. package/dist/cjs/peer/InteractionQueue.js +1 -1
  87. package/dist/cjs/peer/InteractionQueue.js.map +1 -1
  88. package/dist/cjs/peer/PeerAddressStore.d.ts +0 -9
  89. package/dist/cjs/peer/PeerAddressStore.d.ts.map +1 -1
  90. package/dist/cjs/peer/PeerAddressStore.js.map +1 -1
  91. package/dist/cjs/peer/PeerSet.d.ts +0 -2
  92. package/dist/cjs/peer/PeerSet.d.ts.map +1 -1
  93. package/dist/cjs/peer/PeerSet.js +32 -18
  94. package/dist/cjs/peer/PeerSet.js.map +1 -1
  95. package/dist/cjs/peer/PhysicalDeviceProperties.js +1 -1
  96. package/dist/cjs/peer/PhysicalDeviceProperties.js.map +1 -1
  97. package/dist/cjs/peer/index.d.ts +1 -0
  98. package/dist/cjs/peer/index.d.ts.map +1 -1
  99. package/dist/cjs/peer/index.js +1 -0
  100. package/dist/cjs/peer/index.js.map +1 -1
  101. package/dist/cjs/protocol/DeviceCommissioner.d.ts.map +1 -1
  102. package/dist/cjs/protocol/DeviceCommissioner.js.map +1 -1
  103. package/dist/cjs/protocol/ExchangeManager.js +2 -2
  104. package/dist/cjs/protocol/ExchangeManager.js.map +1 -1
  105. package/dist/cjs/protocol/ExchangeProvider.d.ts +13 -4
  106. package/dist/cjs/protocol/ExchangeProvider.d.ts.map +1 -1
  107. package/dist/cjs/protocol/ExchangeProvider.js +5 -3
  108. package/dist/cjs/protocol/ExchangeProvider.js.map +1 -1
  109. package/dist/cjs/session/NodeSession.d.ts +5 -2
  110. package/dist/cjs/session/NodeSession.d.ts.map +1 -1
  111. package/dist/cjs/session/NodeSession.js +5 -4
  112. package/dist/cjs/session/NodeSession.js.map +1 -1
  113. package/dist/cjs/session/Session.d.ts +5 -3
  114. package/dist/cjs/session/Session.d.ts.map +1 -1
  115. package/dist/cjs/session/Session.js +8 -4
  116. package/dist/cjs/session/Session.js.map +1 -1
  117. package/dist/cjs/session/SessionManager.d.ts +8 -0
  118. package/dist/cjs/session/SessionManager.d.ts.map +1 -1
  119. package/dist/cjs/session/SessionManager.js +16 -2
  120. package/dist/cjs/session/SessionManager.js.map +1 -1
  121. package/dist/esm/action/client/ClientInteraction.d.ts +12 -5
  122. package/dist/esm/action/client/ClientInteraction.d.ts.map +1 -1
  123. package/dist/esm/action/client/ClientInteraction.js +42 -16
  124. package/dist/esm/action/client/ClientInteraction.js.map +1 -1
  125. package/dist/esm/action/client/ClientRead.d.ts +10 -0
  126. package/dist/esm/action/client/ClientRead.d.ts.map +1 -0
  127. package/dist/esm/action/client/ClientRead.js +6 -0
  128. package/dist/esm/action/client/ClientRead.js.map +6 -0
  129. package/dist/esm/action/client/ClientRequest.d.ts +20 -0
  130. package/dist/esm/action/client/ClientRequest.d.ts.map +1 -0
  131. package/dist/esm/action/client/ClientRequest.js +6 -0
  132. package/dist/esm/action/client/ClientRequest.js.map +6 -0
  133. package/dist/esm/action/client/ClientWrite.d.ts +10 -0
  134. package/dist/esm/action/client/ClientWrite.d.ts.map +1 -0
  135. package/dist/esm/action/client/ClientWrite.js +6 -0
  136. package/dist/esm/action/client/ClientWrite.js.map +6 -0
  137. package/dist/esm/action/client/QueuedClientInteraction.d.ts +49 -0
  138. package/dist/esm/action/client/QueuedClientInteraction.d.ts.map +1 -0
  139. package/dist/esm/action/client/QueuedClientInteraction.js +140 -0
  140. package/dist/esm/action/client/QueuedClientInteraction.js.map +6 -0
  141. package/dist/esm/action/client/index.d.ts +4 -0
  142. package/dist/esm/action/client/index.d.ts.map +1 -1
  143. package/dist/esm/action/client/index.js +4 -0
  144. package/dist/esm/action/client/index.js.map +1 -1
  145. package/dist/esm/action/client/subscription/ClientSubscribe.d.ts +2 -1
  146. package/dist/esm/action/client/subscription/ClientSubscribe.d.ts.map +1 -1
  147. package/dist/esm/action/client/subscription/ClientSubscriptionHandler.d.ts.map +1 -1
  148. package/dist/esm/action/client/subscription/ClientSubscriptionHandler.js +14 -3
  149. package/dist/esm/action/client/subscription/ClientSubscriptionHandler.js.map +1 -1
  150. package/dist/esm/action/client/subscription/SustainedSubscription.d.ts +1 -1
  151. package/dist/esm/action/client/subscription/SustainedSubscription.d.ts.map +1 -1
  152. package/dist/esm/action/client/subscription/SustainedSubscription.js +1 -4
  153. package/dist/esm/action/client/subscription/SustainedSubscription.js.map +1 -1
  154. package/dist/esm/action/request/Invoke.d.ts +7 -1
  155. package/dist/esm/action/request/Invoke.d.ts.map +1 -1
  156. package/dist/esm/action/request/Invoke.js +0 -3
  157. package/dist/esm/action/request/Invoke.js.map +1 -1
  158. package/dist/esm/action/request/Read.d.ts.map +1 -1
  159. package/dist/esm/action/request/Read.js +3 -2
  160. package/dist/esm/action/request/Read.js.map +1 -1
  161. package/dist/esm/action/request/Specifier.d.ts +1 -1
  162. package/dist/esm/action/request/Specifier.d.ts.map +1 -1
  163. package/dist/esm/action/request/Specifier.js +3 -0
  164. package/dist/esm/action/request/Specifier.js.map +1 -1
  165. package/dist/esm/action/request/Write.d.ts +1 -0
  166. package/dist/esm/action/request/Write.d.ts.map +1 -1
  167. package/dist/esm/action/request/Write.js +10 -2
  168. package/dist/esm/action/request/Write.js.map +1 -1
  169. package/dist/esm/action/response/ReadResult.d.ts +1 -1
  170. package/dist/esm/action/response/ReadResult.d.ts.map +1 -1
  171. package/dist/esm/cluster/client/ClusterClientTypes.d.ts +37 -8
  172. package/dist/esm/cluster/client/ClusterClientTypes.d.ts.map +1 -1
  173. package/dist/esm/cluster/client/index.d.ts +0 -3
  174. package/dist/esm/cluster/client/index.d.ts.map +1 -1
  175. package/dist/esm/cluster/client/index.js +0 -3
  176. package/dist/esm/cluster/client/index.js.map +1 -1
  177. package/dist/esm/interaction/InteractionMessenger.d.ts.map +1 -1
  178. package/dist/esm/interaction/InteractionMessenger.js +4 -3
  179. package/dist/esm/interaction/InteractionMessenger.js.map +1 -1
  180. package/dist/esm/interaction/SubscriptionClient.d.ts.map +1 -1
  181. package/dist/esm/interaction/SubscriptionClient.js +2 -1
  182. package/dist/esm/interaction/SubscriptionClient.js.map +1 -1
  183. package/dist/esm/interaction/index.d.ts +1 -1
  184. package/dist/esm/interaction/index.d.ts.map +1 -1
  185. package/dist/esm/interaction/index.js +1 -1
  186. package/dist/esm/peer/CommissioningError.d.ts +13 -0
  187. package/dist/esm/peer/CommissioningError.d.ts.map +1 -0
  188. package/dist/esm/peer/CommissioningError.js +12 -0
  189. package/dist/esm/peer/CommissioningError.js.map +6 -0
  190. package/dist/esm/peer/ControllerCommissioner.d.ts +2 -3
  191. package/dist/esm/peer/ControllerCommissioner.d.ts.map +1 -1
  192. package/dist/esm/peer/ControllerCommissioner.js +19 -13
  193. package/dist/esm/peer/ControllerCommissioner.js.map +2 -2
  194. package/dist/esm/peer/ControllerCommissioningFlow.d.ts +7 -16
  195. package/dist/esm/peer/ControllerCommissioningFlow.d.ts.map +1 -1
  196. package/dist/esm/peer/ControllerCommissioningFlow.js +380 -162
  197. package/dist/esm/peer/ControllerCommissioningFlow.js.map +1 -1
  198. package/dist/esm/peer/ControllerDiscovery.d.ts +4 -0
  199. package/dist/esm/peer/ControllerDiscovery.d.ts.map +1 -1
  200. package/dist/esm/peer/ControllerDiscovery.js +4 -1
  201. package/dist/esm/peer/ControllerDiscovery.js.map +1 -1
  202. package/dist/esm/peer/InteractionQueue.d.ts +2 -2
  203. package/dist/esm/peer/InteractionQueue.d.ts.map +1 -1
  204. package/dist/esm/peer/InteractionQueue.js +2 -2
  205. package/dist/esm/peer/InteractionQueue.js.map +1 -1
  206. package/dist/esm/peer/PeerAddressStore.d.ts +0 -9
  207. package/dist/esm/peer/PeerAddressStore.d.ts.map +1 -1
  208. package/dist/esm/peer/PeerAddressStore.js.map +1 -1
  209. package/dist/esm/peer/PeerSet.d.ts +0 -2
  210. package/dist/esm/peer/PeerSet.d.ts.map +1 -1
  211. package/dist/esm/peer/PeerSet.js +32 -18
  212. package/dist/esm/peer/PeerSet.js.map +1 -1
  213. package/dist/esm/peer/PhysicalDeviceProperties.js +1 -1
  214. package/dist/esm/peer/PhysicalDeviceProperties.js.map +1 -1
  215. package/dist/esm/peer/index.d.ts +1 -0
  216. package/dist/esm/peer/index.d.ts.map +1 -1
  217. package/dist/esm/peer/index.js +1 -0
  218. package/dist/esm/peer/index.js.map +1 -1
  219. package/dist/esm/protocol/DeviceCommissioner.d.ts.map +1 -1
  220. package/dist/esm/protocol/DeviceCommissioner.js.map +1 -1
  221. package/dist/esm/protocol/ExchangeManager.js +2 -2
  222. package/dist/esm/protocol/ExchangeManager.js.map +1 -1
  223. package/dist/esm/protocol/ExchangeProvider.d.ts +13 -4
  224. package/dist/esm/protocol/ExchangeProvider.d.ts.map +1 -1
  225. package/dist/esm/protocol/ExchangeProvider.js +5 -3
  226. package/dist/esm/protocol/ExchangeProvider.js.map +1 -1
  227. package/dist/esm/session/NodeSession.d.ts +5 -2
  228. package/dist/esm/session/NodeSession.d.ts.map +1 -1
  229. package/dist/esm/session/NodeSession.js +5 -4
  230. package/dist/esm/session/NodeSession.js.map +1 -1
  231. package/dist/esm/session/Session.d.ts +5 -3
  232. package/dist/esm/session/Session.d.ts.map +1 -1
  233. package/dist/esm/session/Session.js +8 -4
  234. package/dist/esm/session/Session.js.map +1 -1
  235. package/dist/esm/session/SessionManager.d.ts +8 -0
  236. package/dist/esm/session/SessionManager.d.ts.map +1 -1
  237. package/dist/esm/session/SessionManager.js +17 -2
  238. package/dist/esm/session/SessionManager.js.map +1 -1
  239. package/package.json +6 -6
  240. package/src/action/client/ClientInteraction.ts +58 -19
  241. package/src/action/client/ClientRead.ts +10 -0
  242. package/src/action/client/ClientRequest.ts +20 -0
  243. package/src/action/client/ClientWrite.ts +10 -0
  244. package/src/action/client/QueuedClientInteraction.ts +91 -0
  245. package/src/action/client/index.ts +4 -0
  246. package/src/action/client/subscription/ClientSubscribe.ts +2 -1
  247. package/src/action/client/subscription/ClientSubscriptionHandler.ts +14 -3
  248. package/src/action/client/subscription/SustainedSubscription.ts +6 -9
  249. package/src/action/request/Invoke.ts +11 -4
  250. package/src/action/request/Read.ts +3 -2
  251. package/src/action/request/Specifier.ts +4 -1
  252. package/src/action/request/Write.ts +11 -2
  253. package/src/action/response/ReadResult.ts +1 -1
  254. package/src/cluster/client/ClusterClientTypes.ts +47 -7
  255. package/src/cluster/client/index.ts +0 -3
  256. package/src/interaction/InteractionMessenger.ts +5 -4
  257. package/src/interaction/SubscriptionClient.ts +2 -1
  258. package/src/interaction/index.ts +1 -1
  259. package/src/peer/CommissioningError.ts +13 -0
  260. package/src/peer/ControllerCommissioner.ts +21 -13
  261. package/src/peer/ControllerCommissioningFlow.ts +418 -186
  262. package/src/peer/ControllerDiscovery.ts +4 -1
  263. package/src/peer/InteractionQueue.ts +2 -2
  264. package/src/peer/PeerAddressStore.ts +0 -9
  265. package/src/peer/PeerSet.ts +56 -23
  266. package/src/peer/PhysicalDeviceProperties.ts +1 -1
  267. package/src/peer/index.ts +1 -0
  268. package/src/protocol/DeviceCommissioner.ts +0 -1
  269. package/src/protocol/ExchangeManager.ts +2 -2
  270. package/src/protocol/ExchangeProvider.ts +9 -7
  271. package/src/session/NodeSession.ts +5 -4
  272. package/src/session/Session.ts +8 -4
  273. package/src/session/SessionManager.ts +19 -2
  274. package/dist/cjs/cluster/client/AttributeClient.d.ts +0 -75
  275. package/dist/cjs/cluster/client/AttributeClient.d.ts.map +0 -1
  276. package/dist/cjs/cluster/client/AttributeClient.js +0 -209
  277. package/dist/cjs/cluster/client/AttributeClient.js.map +0 -6
  278. package/dist/cjs/cluster/client/ClusterClient.d.ts +0 -11
  279. package/dist/cjs/cluster/client/ClusterClient.d.ts.map +0 -1
  280. package/dist/cjs/cluster/client/ClusterClient.js +0 -335
  281. package/dist/cjs/cluster/client/ClusterClient.js.map +0 -6
  282. package/dist/cjs/cluster/client/EventClient.d.ts +0 -33
  283. package/dist/cjs/cluster/client/EventClient.d.ts.map +0 -1
  284. package/dist/cjs/cluster/client/EventClient.js +0 -89
  285. package/dist/cjs/cluster/client/EventClient.js.map +0 -6
  286. package/dist/cjs/interaction/InteractionClient.d.ts +0 -375
  287. package/dist/cjs/interaction/InteractionClient.d.ts.map +0 -1
  288. package/dist/cjs/interaction/InteractionClient.js +0 -1046
  289. package/dist/cjs/interaction/InteractionClient.js.map +0 -6
  290. package/dist/esm/cluster/client/AttributeClient.d.ts +0 -75
  291. package/dist/esm/cluster/client/AttributeClient.d.ts.map +0 -1
  292. package/dist/esm/cluster/client/AttributeClient.js +0 -189
  293. package/dist/esm/cluster/client/AttributeClient.js.map +0 -6
  294. package/dist/esm/cluster/client/ClusterClient.d.ts +0 -11
  295. package/dist/esm/cluster/client/ClusterClient.d.ts.map +0 -1
  296. package/dist/esm/cluster/client/ClusterClient.js +0 -320
  297. package/dist/esm/cluster/client/ClusterClient.js.map +0 -6
  298. package/dist/esm/cluster/client/EventClient.d.ts +0 -33
  299. package/dist/esm/cluster/client/EventClient.d.ts.map +0 -1
  300. package/dist/esm/cluster/client/EventClient.js +0 -69
  301. package/dist/esm/cluster/client/EventClient.js.map +0 -6
  302. package/dist/esm/interaction/InteractionClient.d.ts +0 -375
  303. package/dist/esm/interaction/InteractionClient.d.ts.map +0 -1
  304. package/dist/esm/interaction/InteractionClient.js +0 -1047
  305. package/dist/esm/interaction/InteractionClient.js.map +0 -6
  306. package/src/cluster/client/AttributeClient.ts +0 -230
  307. package/src/cluster/client/ClusterClient.ts +0 -433
  308. package/src/cluster/client/EventClient.ts +0 -99
  309. package/src/interaction/InteractionClient.ts +0 -1614
@@ -1,209 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var AttributeClient_exports = {};
20
- __export(AttributeClient_exports, {
21
- AttributeClient: () => AttributeClient,
22
- SupportedAttributeClient: () => SupportedAttributeClient,
23
- UnknownSupportedAttributeClient: () => UnknownSupportedAttributeClient,
24
- createAttributeClient: () => createAttributeClient
25
- });
26
- module.exports = __toCommonJS(AttributeClient_exports);
27
- var import_general = require("#general");
28
- var import_model = require("#model");
29
- var import_errors = require("#protocol/errors.js");
30
- var import_types = require("#types");
31
- /**
32
- * @license
33
- * Copyright 2022-2025 Matter.js Authors
34
- * SPDX-License-Identifier: Apache-2.0
35
- */
36
- function createAttributeClient(attribute, name, endpointId, clusterId, interactionClient, present = false) {
37
- if (attribute.unknown) {
38
- return new UnknownSupportedAttributeClient(attribute, name, endpointId, clusterId, interactionClient);
39
- }
40
- if (present) {
41
- return new SupportedAttributeClient(attribute, name, endpointId, clusterId, interactionClient);
42
- }
43
- return new AttributeClient(attribute, name, endpointId, clusterId, interactionClient);
44
- }
45
- class AttributeClient {
46
- constructor(attribute, name, endpointId, clusterId, interactionClient) {
47
- this.attribute = attribute;
48
- this.name = name;
49
- this.endpointId = endpointId;
50
- this.clusterId = clusterId;
51
- const { schema, writable, fabricScoped, id, omitChanges } = attribute;
52
- this.schema = schema;
53
- this.#isWritable = writable;
54
- this.#isFabricScoped = fabricScoped;
55
- this.#updatedBySubscriptions = !omitChanges;
56
- this.id = id;
57
- this.#interactionClient = interactionClient;
58
- }
59
- #isWritable;
60
- #isFabricScoped;
61
- #updatedBySubscriptions;
62
- schema;
63
- #listeners = new Array();
64
- id;
65
- #interactionClient;
66
- /**
67
- * Set the value of the attribute. When dataVersion parameter is provided the value is only set when the
68
- * cluster dataVersion of the server matches. If it does not match it is rejected with an Error.
69
- */
70
- async set(value, dataVersion) {
71
- if (!this.#isWritable) throw new import_types.AttributeError(`Attribute ${this.name} is not writable`);
72
- value = this.schema.injectField(
73
- value,
74
- import_model.FabricIndex.id,
75
- import_types.FabricIndex.OMIT_FABRIC,
76
- (existingFieldIndex) => existingFieldIndex === void 0
77
- );
78
- this.schema.validate(value);
79
- if (this.#isFabricScoped) {
80
- value = this.schema.removeField(
81
- value,
82
- import_model.FabricIndex.id,
83
- (existingFieldIndex) => existingFieldIndex === import_types.FabricIndex.OMIT_FABRIC
84
- );
85
- try {
86
- const sessionFabric = this.#interactionClient.session.associatedFabric;
87
- value = this.schema.removeField(
88
- value,
89
- import_model.FabricIndex.id,
90
- (existingFieldIndex) => existingFieldIndex.index === sessionFabric.fabricIndex
91
- );
92
- } catch (e) {
93
- import_errors.NoAssociatedFabricError.accept(e);
94
- }
95
- }
96
- return await this.#interactionClient.setAttribute({
97
- attributeData: {
98
- endpointId: this.endpointId,
99
- clusterId: this.clusterId,
100
- attribute: this.attribute,
101
- value,
102
- dataVersion
103
- }
104
- });
105
- }
106
- get fabricScoped() {
107
- return this.#isFabricScoped;
108
- }
109
- getLocal() {
110
- if (this.endpointId === void 0) {
111
- throw new import_general.ImplementationError(`Cannot read attribute ${this.name} without endpointId.`);
112
- }
113
- return this.#interactionClient.getStoredAttribute({
114
- endpointId: this.endpointId,
115
- clusterId: this.clusterId,
116
- attribute: this.attribute
117
- });
118
- }
119
- /**
120
- * Get the value of the attribute. Fabric scoped reads are always done with the remote.
121
- * The `requestFromRemote` parameter allowed to force or prevent remote reads:
122
- * - `true` forces a remote read
123
- * - `false` forces a local read, return undefined if no value is available
124
- * - `undefined` returns local values if available or if the read is fabric filtered, otherwise remote read
125
- */
126
- async get(requestFromRemote, isFabricFiltered = true) {
127
- if (this.endpointId === void 0) {
128
- throw new import_general.ImplementationError(`Cannot read attribute ${this.name} without endpointId.`);
129
- }
130
- if (requestFromRemote === void 0) {
131
- requestFromRemote = this.#isFabricScoped || !this.#updatedBySubscriptions ? true : void 0;
132
- } else if (!requestFromRemote && this.#isFabricScoped) {
133
- requestFromRemote = true;
134
- }
135
- return await this.#interactionClient.getAttribute({
136
- endpointId: this.endpointId,
137
- clusterId: this.clusterId,
138
- attribute: this.attribute,
139
- isFabricFiltered,
140
- requestFromRemote
141
- });
142
- }
143
- /**
144
- * Get the value with version of the attribute. Fabric scoped reads are always done with the remote.
145
- * The `requestFromRemote` parameter allowed to force or prevent remote reads:
146
- * - `true` forces a remote read
147
- * - `false` forces a local read, return undefined if no value is available
148
- * - `undefined` returns local values if available or if the read is fabric filtered, otherwise remote read
149
- */
150
- async getWithVersion(requestFromRemote, isFabricFiltered = true) {
151
- if (this.endpointId === void 0) {
152
- throw new import_general.ImplementationError(`Cannot read attribute ${this.name} without endpointId.`);
153
- }
154
- if (requestFromRemote === void 0) {
155
- requestFromRemote = this.#isFabricScoped || !this.#updatedBySubscriptions ? true : void 0;
156
- } else if (!requestFromRemote && this.#isFabricScoped) {
157
- requestFromRemote = true;
158
- }
159
- return await this.#interactionClient.getAttributeWithVersion({
160
- endpointId: this.endpointId,
161
- clusterId: this.clusterId,
162
- attribute: this.attribute,
163
- isFabricFiltered,
164
- requestFromRemote
165
- });
166
- }
167
- /** Subscribe to the attribute. */
168
- async subscribe(minIntervalFloorSeconds, maxIntervalCeilingSeconds, knownDataVersion, isFabricFiltered = true) {
169
- if (this.endpointId === void 0) {
170
- throw new import_general.ImplementationError(`Cannot read attribute ${this.name} without endpointId.`);
171
- }
172
- if (!this.#updatedBySubscriptions) {
173
- throw new import_general.ImplementationError(`Attribute ${this.name} is not updated by subscriptions.`);
174
- }
175
- return this.#interactionClient.subscribeAttribute({
176
- endpointId: this.endpointId,
177
- clusterId: this.clusterId,
178
- attribute: this.attribute,
179
- minIntervalFloorSeconds,
180
- maxIntervalCeilingSeconds,
181
- isFabricFiltered,
182
- knownDataVersion,
183
- listener: this.update.bind(this)
184
- });
185
- }
186
- /**
187
- * Update the value of the attribute. Just internally used!
188
- * @private
189
- */
190
- update(value) {
191
- this.#listeners.forEach((listener) => listener(value));
192
- }
193
- /** Add a listener to the attribute. */
194
- addListener(listener) {
195
- this.#listeners.push(listener);
196
- }
197
- /** Remove a listener from the attribute. */
198
- removeListener(listener) {
199
- const entryIndex = this.#listeners.indexOf(listener);
200
- if (entryIndex !== -1) {
201
- this.#listeners.splice(entryIndex, 1);
202
- }
203
- }
204
- }
205
- class SupportedAttributeClient extends AttributeClient {
206
- }
207
- class UnknownSupportedAttributeClient extends SupportedAttributeClient {
208
- }
209
- //# sourceMappingURL=AttributeClient.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/cluster/client/AttributeClient.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,qBAAoC;AACpC,mBAAkD;AAClD,oBAAwC;AACxC,mBAA0G;AAT1G;AAAA;AAAA;AAAA;AAAA;AAeO,SAAS,sBACZ,WACA,MACA,YACA,WACA,mBACA,UAAU,OACQ;AAClB,MAAI,UAAU,SAAS;AACnB,WAAO,IAAI,gCAAgC,WAAW,MAAM,YAAY,WAAW,iBAAiB;AAAA,EACxG;AACA,MAAI,SAAS;AACT,WAAO,IAAI,yBAAyB,WAAW,MAAM,YAAY,WAAW,iBAAiB;AAAA,EACjG;AACA,SAAO,IAAI,gBAAgB,WAAW,MAAM,YAAY,WAAW,iBAAiB;AACxF;AAKO,MAAM,gBAAyB;AAAA,EASlC,YACa,WACA,MACA,YACA,WACT,mBACF;AALW;AACA;AACA;AACA;AAGT,UAAM,EAAE,QAAQ,UAAU,cAAc,IAAI,YAAY,IAAI;AAC5D,SAAK,SAAS;AACd,SAAK,cAAc;AACnB,SAAK,kBAAkB;AACvB,SAAK,0BAA0B,CAAC;AAChC,SAAK,KAAK;AACV,SAAK,qBAAqB;AAAA,EAC9B;AAAA,EAtBS;AAAA,EACA;AAAA,EACA;AAAA,EACU;AAAA,EACV,aAAa,IAAI,MAA6B;AAAA,EAC9C;AAAA,EACA;AAAA;AAAA;AAAA;AAAA;AAAA,EAsBT,MAAM,IAAI,OAAU,aAAsB;AACtC,QAAI,CAAC,KAAK,YAAa,OAAM,IAAI,4BAAe,aAAa,KAAK,IAAI,kBAAkB;AAEx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A,MACA,UAAU,KAAK,OAAO,KAAK,IAAI;AAAA,IACnC,CAAC;AAAA,EACL;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,OAAO,OAAU;AACb,SAAK,WAAW,QAAQ,cAAY,SAAS,KAAK,CAAC;AAAA,EACvD;AAAA;AAAA,EAGA,YAAY,UAAiC;AACzC,SAAK,WAAW,KAAK,QAAQ;AAAA,EACjC;AAAA;AAAA,EAGA,eAAe,UAAiC;AAC5C,UAAM,aAAa,KAAK,WAAW,QAAQ,QAAQ;AACnD,QAAI,eAAe,IAAI;AACnB,WAAK,WAAW,OAAO,YAAY,CAAC;AAAA,IACxC;AAAA,EACJ;AACJ;AAKO,MAAM,iCAAoC,gBAAmB;AAAC;AAM9D,MAAM,wCAAwC,yBAA8B;AAAC;",
5
- "names": ["FabricIndexElement"]
6
- }
@@ -1,11 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2022-2025 Matter.js Authors
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { ClusterType, EndpointNumber, GlobalAttributes } from "#types";
7
- import { InteractionClient } from "../../interaction/InteractionClient.js";
8
- import { AttributeClientValues, ClusterClientObj, GroupClusterClientObj } from "./ClusterClientTypes.js";
9
- export declare function GroupClusterClient<const T extends ClusterType>(clusterDef: T, interactionClient: InteractionClient, globalAttributeValues?: Partial<AttributeClientValues<GlobalAttributes<T["features"]>>>): GroupClusterClientObj<T>;
10
- export declare function ClusterClient<const T extends ClusterType>(clusterDef: T, endpointId: EndpointNumber | undefined, interactionClient: InteractionClient, globalAttributeValues?: Partial<AttributeClientValues<GlobalAttributes<T["features"]>>>): ClusterClientObj<T>;
11
- //# sourceMappingURL=ClusterClient.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ClusterClient.d.ts","sourceRoot":"","sources":["../../../../src/cluster/client/ClusterClient.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAIH,WAAW,EAGX,cAAc,EAGd,gBAAgB,EAOnB,MAAM,QAAQ,CAAC;AAEhB,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAE3E,OAAO,EAEH,qBAAqB,EACrB,gBAAgB,EAEhB,qBAAqB,EAGxB,MAAM,yBAAyB,CAAC;AAKjC,wBAAgB,kBAAkB,CAAC,KAAK,CAAC,CAAC,SAAS,WAAW,EAC1D,UAAU,EAAE,CAAC,EACb,iBAAiB,EAAE,iBAAiB,EACpC,qBAAqB,GAAE,OAAO,CAAC,qBAAqB,CAAC,gBAAgB,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAM,GAC5F,qBAAqB,CAAC,CAAC,CAAC,CAM1B;AAED,wBAAgB,aAAa,CAAC,KAAK,CAAC,CAAC,SAAS,WAAW,EACrD,UAAU,EAAE,CAAC,EACb,UAAU,EAAE,cAAc,GAAG,SAAS,EACtC,iBAAiB,EAAE,iBAAiB,EACpC,qBAAqB,GAAE,OAAO,CAAC,qBAAqB,CAAC,gBAAgB,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAM,GAC5F,gBAAgB,CAAC,CAAC,CAAC,CAsXrB"}
@@ -1,335 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var ClusterClient_exports = {};
20
- __export(ClusterClient_exports, {
21
- ClusterClient: () => ClusterClient,
22
- GroupClusterClient: () => GroupClusterClient
23
- });
24
- module.exports = __toCommonJS(ClusterClient_exports);
25
- var import_general = require("#general");
26
- var import_types = require("#types");
27
- var import_AttributeClient = require("./AttributeClient.js");
28
- var import_EventClient = require("./EventClient.js");
29
- /**
30
- * @license
31
- * Copyright 2022-2025 Matter.js Authors
32
- * SPDX-License-Identifier: Apache-2.0
33
- */
34
- const logger = import_general.Logger.get("ClusterClient");
35
- function GroupClusterClient(clusterDef, interactionClient, globalAttributeValues = {}) {
36
- if (!interactionClient.isGroupAddress) {
37
- throw new Error("GroupClusterClient must be used with a GroupAddress InteractionClient");
38
- }
39
- return ClusterClient(clusterDef, void 0, interactionClient, globalAttributeValues);
40
- }
41
- function ClusterClient(clusterDef, endpointId, interactionClient, globalAttributeValues = {}) {
42
- const isGroupAddress = interactionClient.isGroupAddress;
43
- if (isGroupAddress !== (endpointId === void 0)) {
44
- throw new Error("Endpoint ID must be defined for a Non-Group ClusterClient");
45
- }
46
- function addAttributeToResult(attribute, attributeName) {
47
- attributes[attributeName] = (0, import_AttributeClient.createAttributeClient)(
48
- attribute,
49
- attributeName,
50
- endpointId,
51
- clusterId,
52
- interactionClient,
53
- !!globalAttributeValues?.attributeList?.includes(attribute.id)
54
- );
55
- attributes[attribute.id] = attributes[attributeName];
56
- attributeToId[attribute.id] = attributeName;
57
- const capitalizedAttributeName = (0, import_general.capitalize)(attributeName);
58
- result[`get${capitalizedAttributeName}Attribute`] = async (requestFromRemote, isFabricFiltered = true) => {
59
- if (isGroupAddress) {
60
- throw new import_general.ImplementationError("Group cluster clients do not support reading attributes");
61
- }
62
- try {
63
- return await attributes[attributeName].get(requestFromRemote, isFabricFiltered);
64
- } catch (e) {
65
- if (import_types.StatusResponseError.is(e, import_types.StatusCode.UnsupportedAttribute)) {
66
- return void 0;
67
- }
68
- throw e;
69
- }
70
- };
71
- result[`get${capitalizedAttributeName}AttributeFromCache`] = () => {
72
- if (isGroupAddress) {
73
- throw new import_general.ImplementationError("Group cluster clients do not support reading attributes");
74
- }
75
- return attributes[attributeName].getLocal();
76
- };
77
- result[`set${capitalizedAttributeName}Attribute`] = async (value, dataVersion) => attributes[attributeName].set(value, dataVersion);
78
- result[`subscribe${capitalizedAttributeName}Attribute`] = async (listener, minIntervalS, maxIntervalS, knownDataVersion, isFabricFiltered) => {
79
- if (isGroupAddress) {
80
- throw new import_general.ImplementationError("Group cluster clients do not support subscribing attributes");
81
- }
82
- attributes[attributeName].addListener(listener);
83
- return attributes[attributeName].subscribe(
84
- minIntervalS,
85
- maxIntervalS,
86
- knownDataVersion,
87
- isFabricFiltered
88
- );
89
- };
90
- result[`add${capitalizedAttributeName}AttributeListener`] = (listener) => {
91
- if (isGroupAddress) {
92
- throw new import_general.ImplementationError("Group cluster clients do not support subscribing attributes");
93
- }
94
- attributes[attributeName].addListener(listener);
95
- };
96
- result[`remove${capitalizedAttributeName}AttributeListener`] = (listener) => {
97
- if (isGroupAddress) {
98
- throw new import_general.ImplementationError("Group cluster clients do not support subscribing attributes");
99
- }
100
- attributes[attributeName].removeListener(listener);
101
- };
102
- }
103
- function addEventToResult(event, eventName) {
104
- events[eventName] = (0, import_EventClient.createEventClient)(event, eventName, endpointId, clusterId, interactionClient);
105
- events[event.id] = events[eventName];
106
- eventToId[event.id] = eventName;
107
- const capitalizedEventName = (0, import_general.capitalize)(eventName);
108
- result[`get${capitalizedEventName}Event`] = async (minimumEventNumber, isFabricFiltered) => {
109
- if (isGroupAddress) {
110
- throw new import_general.ImplementationError("Group cluster clients do not support reading events");
111
- }
112
- try {
113
- return await events[eventName].get(minimumEventNumber, isFabricFiltered);
114
- } catch (e) {
115
- if (import_types.StatusResponseError.is(e, import_types.StatusCode.UnsupportedEvent)) {
116
- return void 0;
117
- }
118
- throw e;
119
- }
120
- };
121
- result[`subscribe${capitalizedEventName}Event`] = async (listener, minIntervalS, maxIntervalS, isUrgent, minimumEventNumber, isFabricFiltered) => {
122
- if (isGroupAddress) {
123
- throw new import_general.ImplementationError("Group cluster clients do not support subscribing to events");
124
- }
125
- events[eventName].addListener(listener);
126
- return events[eventName].subscribe(
127
- minIntervalS,
128
- maxIntervalS,
129
- isUrgent,
130
- minimumEventNumber,
131
- isFabricFiltered
132
- );
133
- };
134
- result[`add${capitalizedEventName}EventListener`] = (listener) => {
135
- if (isGroupAddress) {
136
- throw new import_general.ImplementationError("Group cluster clients do not support subscribing events");
137
- }
138
- events[eventName].addListener(listener);
139
- };
140
- result[`remove${capitalizedEventName}EventListener`] = (listener) => {
141
- if (isGroupAddress) {
142
- throw new import_general.ImplementationError("Group cluster clients do not support subscribing events");
143
- }
144
- events[eventName].removeListener(listener);
145
- };
146
- }
147
- const {
148
- id: clusterId,
149
- name,
150
- commands: commandDef,
151
- attributes: attributeDef,
152
- events: eventDef,
153
- features,
154
- supportedFeatures,
155
- revision,
156
- unknown
157
- } = clusterDef;
158
- const attributes = {};
159
- const events = {};
160
- const commands = {};
161
- let reportedFeatures = void 0;
162
- if (globalAttributeValues !== void 0) {
163
- if (globalAttributeValues.featureMap !== void 0) {
164
- reportedFeatures = globalAttributeValues.featureMap;
165
- }
166
- }
167
- const result = {
168
- id: clusterId,
169
- name,
170
- revision: globalAttributeValues?.clusterRevision ?? revision,
171
- _type: "ClusterClient",
172
- supportedFeatures: reportedFeatures ?? supportedFeatures ?? {},
173
- isUnknown: unknown,
174
- endpointId,
175
- attributes,
176
- events,
177
- commands,
178
- subscribeAllAttributes: async (options) => {
179
- if (isGroupAddress) {
180
- throw new import_general.ImplementationError("Group cluster clients do not support subscribing attributes");
181
- }
182
- const {
183
- minIntervalFloorSeconds,
184
- maxIntervalCeilingSeconds,
185
- keepSubscriptions,
186
- isFabricFiltered,
187
- eventFilters,
188
- dataVersionFilters
189
- } = options;
190
- return interactionClient.subscribeMultipleAttributesAndEvents({
191
- attributes: [{ endpointId, clusterId }],
192
- events: [{ endpointId, clusterId }],
193
- minIntervalFloorSeconds,
194
- maxIntervalCeilingSeconds,
195
- keepSubscriptions,
196
- isFabricFiltered,
197
- eventFilters,
198
- dataVersionFilters,
199
- attributeListener: (attributeData) => {
200
- const { path, value } = attributeData;
201
- result._triggerAttributeUpdate(path.attributeId, value);
202
- },
203
- eventListener: (eventData) => {
204
- const { path, events: newEvents } = eventData;
205
- result._triggerEventUpdate(path.eventId, newEvents);
206
- }
207
- });
208
- },
209
- /** Trigger a value change for an Attributed, used by subscriptions. */
210
- _triggerAttributeUpdate(attributeId, value) {
211
- const attributeName = attributeToId[attributeId];
212
- if (attributeName === void 0) {
213
- logger.warn("Unknown attribute id", attributeId);
214
- return;
215
- }
216
- if (attributes[attributeName] !== void 0) {
217
- attributes[attributeName].update(value);
218
- } else {
219
- logger.warn("Attribute not found", attributeName, "in list", Object.keys(attributes));
220
- }
221
- },
222
- /** Trigger a value change for an Event, used by subscriptions. */
223
- _triggerEventUpdate(eventId, eventData) {
224
- const eventName = eventToId[eventId];
225
- if (eventName === void 0) {
226
- logger.warn("Unknown event id", eventId);
227
- return;
228
- }
229
- if (events[eventName] !== void 0) {
230
- const event = events[eventName];
231
- eventData.forEach((data) => event.update(data));
232
- } else {
233
- logger.warn("Event not found", eventName, "in list", Object.keys(events));
234
- }
235
- },
236
- isAttributeSupported: (attributeId) => {
237
- if (isGroupAddress) {
238
- throw new import_general.ImplementationError("Group cluster clients do not allow to determine attribute existence.");
239
- }
240
- return !!globalAttributeValues?.attributeList?.includes(attributeId);
241
- },
242
- isAttributeSupportedByName: (attributeName) => {
243
- if (isGroupAddress) {
244
- throw new import_general.ImplementationError("Group cluster clients do not allow to determine attribute existence.");
245
- }
246
- const attribute = attributes[attributeName];
247
- if (attribute === void 0) {
248
- return false;
249
- }
250
- return !!globalAttributeValues?.attributeList?.includes(attribute.id);
251
- },
252
- isCommandSupported: (commandId) => {
253
- if (isGroupAddress) {
254
- throw new import_general.ImplementationError("Group cluster clients do not allow to determine command existence.");
255
- }
256
- return !!globalAttributeValues?.acceptedCommandList?.includes(commandId);
257
- },
258
- isCommandSupportedByName: (commandName) => {
259
- if (isGroupAddress) {
260
- throw new import_general.ImplementationError("Group cluster clients do not allow to determine attribute existence.");
261
- }
262
- const command = commandDef[commandName];
263
- if (command === void 0) {
264
- return false;
265
- }
266
- return !!globalAttributeValues?.acceptedCommandList?.includes(command.requestId);
267
- }
268
- };
269
- const attributeToId = {};
270
- const allAttributeDefs = (0, import_general.Merge)(
271
- attributeDef,
272
- (0, import_types.GlobalAttributes)(features)
273
- );
274
- for (const attributeName in allAttributeDefs) {
275
- addAttributeToResult(allAttributeDefs[attributeName], attributeName);
276
- }
277
- if (globalAttributeValues?.attributeList !== void 0) {
278
- for (const attributeId of globalAttributeValues.attributeList) {
279
- if (attributeToId[attributeId] === void 0) {
280
- const attribute = (0, import_types.UnknownAttribute)(attributeId);
281
- addAttributeToResult(attribute, `unknownAttribute_${import_general.Diagnostic.hex(attributeId)}`);
282
- logger.info(
283
- `Added unknown attribute ${import_general.Diagnostic.hex(attributeId)} to cluster ${import_general.Diagnostic.hex(clusterId)}`
284
- );
285
- }
286
- }
287
- }
288
- const eventToId = {};
289
- for (const eventName in eventDef) {
290
- addEventToResult(eventDef[eventName], eventName);
291
- }
292
- const commandToId = {};
293
- for (const commandName in commandDef) {
294
- const { requestId } = commandDef[commandName];
295
- commandToId[requestId] = commandName;
296
- commands[commandName] = async (request, options = {}) => {
297
- const {
298
- asTimedRequest,
299
- timedRequestTimeout,
300
- useExtendedFailSafeMessageResponseTimeout,
301
- expectedProcessingTime
302
- } = options;
303
- if (isGroupAddress) {
304
- return interactionClient.invokeWithSuppressedResponse({
305
- clusterId,
306
- command: commandDef[commandName],
307
- request,
308
- asTimedRequest,
309
- timedRequestTimeout
310
- });
311
- }
312
- return interactionClient.invoke({
313
- endpointId,
314
- clusterId,
315
- command: commandDef[commandName],
316
- request,
317
- asTimedRequest,
318
- timedRequestTimeout,
319
- expectedProcessingTime,
320
- useExtendedFailSafeMessageResponseTimeout
321
- });
322
- };
323
- commands[requestId] = commands[commandName];
324
- result[commandName] = result.commands[commandName];
325
- }
326
- if (globalAttributeValues?.acceptedCommandList !== void 0) {
327
- for (const requestId of globalAttributeValues.acceptedCommandList) {
328
- if (commandToId[requestId] === void 0) {
329
- logger.info(`Ignoring unknown command ${requestId} at cluster ${import_general.Diagnostic.hex(clusterId)}`);
330
- }
331
- }
332
- }
333
- return result;
334
- }
335
- //# sourceMappingURL=ClusterClient.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/cluster/client/ClusterClient.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,qBAAqF;AACrF,mBAiBO;AAGP,6BAAsC;AAUtC,yBAAkC;AArClC;AAAA;AAAA;AAAA;AAAA;AAuCA,MAAM,SAAS,sBAAO,IAAI,eAAe;AAElC,SAAS,mBACZ,YACA,mBACA,wBAAyF,CAAC,GAClE;AACxB,MAAI,CAAC,kBAAkB,gBAAgB;AACnC,UAAM,IAAI,MAAM,uEAAuE;AAAA,EAC3F;AAEA,SAAO,cAAc,YAAY,QAAW,mBAAmB,qBAAqB;AACxF;AAEO,SAAS,cACZ,YACA,YACA,mBACA,wBAAyF,CAAC,GACvE;AACnB,QAAM,iBAAiB,kBAAkB;AACzC,MAAI,oBAAoB,eAAe,SAAY;AAC/C,UAAM,IAAI,MAAM,2DAA2D;AAAA,EAC/E;AAEA,WAAS,qBAAqB,WAAgC,eAAuB;AACjF,IAAC,WAAmB,aAAa,QAAI;AAAA,MACjC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,CAAC,CAAC,uBAAuB,eAAe,SAAS,UAAU,EAAE;AAAA,IACjE;AACA,IAAC,WAAmB,UAAU,EAAE,IAAK,WAAmB,aAAa;AACrE,kBAAc,UAAU,EAAE,IAAI;AAC9B,UAAM,+BAA2B,2BAAW,aAAa;AACzD,WAAO,MAAM,wBAAwB,WAAW,I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AW;AAAA,UAC/B;AAAA,UACA;AAAA,UACA;AAAA,QACJ,CAAC;AAAA,MACL;AACA,aAAO,kBAAkB,OAA0C;AAAA,QAC/D;AAAA,QACA;AAAA,QACA,SAAS,WAAW,WAAW;AAAA,QAC/B;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACJ,CAAC;AAAA,IACL;AACA,aAAS,SAA2C,IAAI,SAAS,WAAkC;AACnG,WAAO,WAAW,IAAI,OAAO,SAAS,WAAW;AAAA,EACrD;AACA,MAAI,uBAAuB,wBAAwB,QAAW;AAC1D,eAAW,aAAa,sBAAsB,qBAAqB;AAC/D,UAAI,YAAY,SAAS,MAAM,QAAW;AACtC,eAAO,KAAK,4BAA4B,SAAS,eAAe,0BAAW,IAAI,SAAS,CAAC,EAAE;AAAA,MAC/F;AAAA,IACJ;AAAA,EACJ;AAEA,SAAO;AACX;",
5
- "names": []
6
- }
@@ -1,33 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2022-2025 Matter.js Authors
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { Duration } from "#general";
7
- import { ClusterId, EndpointNumber, Event, EventId, EventNumber } from "#types";
8
- import { DecodedEventData } from "../../interaction/EventDataDecoder.js";
9
- import { InteractionClient } from "../../interaction/InteractionClient.js";
10
- /**
11
- * Factory function to create an EVentClient for a given event.
12
- */
13
- export declare function createEventClient<T>(event: Event<T, any>, name: string, endpointId: EndpointNumber | undefined, clusterId: ClusterId, interactionClient: InteractionClient): EventClient<T>;
14
- /**
15
- * General class for EventClients
16
- */
17
- export declare class EventClient<T> {
18
- #private;
19
- readonly event: Event<T, any>;
20
- readonly name: string;
21
- readonly endpointId: EndpointNumber | undefined;
22
- readonly clusterId: ClusterId;
23
- readonly id: EventId;
24
- constructor(event: Event<T, any>, name: string, endpointId: EndpointNumber | undefined, clusterId: ClusterId, interactionClient: InteractionClient);
25
- get(minimumEventNumber?: EventNumber, isFabricFiltered?: boolean): Promise<DecodedEventData<T>[] | undefined>;
26
- subscribe(minIntervalFloor: Duration, maxIntervalCeiling: Duration, isUrgent?: boolean, minimumEventNumber?: EventNumber, isFabricFiltered?: boolean): Promise<{
27
- maxInterval: number;
28
- }>;
29
- update(newEvent: DecodedEventData<T>): void;
30
- addListener(listener: (newValue: DecodedEventData<T>) => void): void;
31
- removeListener(listener: (newValue: DecodedEventData<T>) => void): void;
32
- }
33
- //# sourceMappingURL=EventClient.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EventClient.d.ts","sourceRoot":"","sources":["../../../../src/cluster/client/EventClient.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAuB,MAAM,UAAU,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAE3E;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAC/B,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EACpB,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,cAAc,GAAG,SAAS,EACtC,SAAS,EAAE,SAAS,EACpB,iBAAiB,EAAE,iBAAiB,GACrC,WAAW,CAAC,CAAC,CAAC,CAEhB;AAED;;GAEG;AACH,qBAAa,WAAW,CAAC,CAAC;;IAMlB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM;IACrB,QAAQ,CAAC,UAAU,EAAE,cAAc,GAAG,SAAS;IAC/C,QAAQ,CAAC,SAAS,EAAE,SAAS;IAPjC,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;gBAIR,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE,G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