@zwave-js/cc 15.28.0 → 15.29.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 (312) hide show
  1. package/build/cjs/cc/AlarmSensorCC.js.map +2 -2
  2. package/build/cjs/cc/AssociationCC.js +6 -5
  3. package/build/cjs/cc/AssociationCC.js.map +2 -2
  4. package/build/cjs/cc/AssociationGroupInfoCC.js +4 -5
  5. package/build/cjs/cc/AssociationGroupInfoCC.js.map +2 -2
  6. package/build/cjs/cc/BarrierOperatorCC.js.map +2 -2
  7. package/build/cjs/cc/BasicCC.d.ts +4 -1
  8. package/build/cjs/cc/BasicCC.js +18 -0
  9. package/build/cjs/cc/BasicCC.js.map +3 -3
  10. package/build/cjs/cc/BasicWindowCoveringCC.js.map +2 -2
  11. package/build/cjs/cc/BatteryCC.js +16 -3
  12. package/build/cjs/cc/BatteryCC.js.map +2 -2
  13. package/build/cjs/cc/BinarySensorCC.js.map +2 -2
  14. package/build/cjs/cc/BinarySwitchCC.d.ts +4 -1
  15. package/build/cjs/cc/BinarySwitchCC.js +18 -0
  16. package/build/cjs/cc/BinarySwitchCC.js.map +3 -3
  17. package/build/cjs/cc/CRC16CC.d.ts +3 -2
  18. package/build/cjs/cc/CRC16CC.js +7 -1
  19. package/build/cjs/cc/CRC16CC.js.map +3 -3
  20. package/build/cjs/cc/CentralSceneCC.js.map +2 -2
  21. package/build/cjs/cc/ClimateControlScheduleCC.js.map +2 -2
  22. package/build/cjs/cc/ClockCC.js.map +2 -2
  23. package/build/cjs/cc/ColorSwitchCC.js +1 -4
  24. package/build/cjs/cc/ColorSwitchCC.js.map +2 -2
  25. package/build/cjs/cc/ConfigurationCC.js +1 -4
  26. package/build/cjs/cc/ConfigurationCC.js.map +2 -2
  27. package/build/cjs/cc/DeviceResetLocallyCC.js.map +2 -2
  28. package/build/cjs/cc/DoorLockCC.js.map +2 -2
  29. package/build/cjs/cc/EntryControlCC.js.map +2 -2
  30. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +4 -16
  31. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +2 -2
  32. package/build/cjs/cc/HumidityControlSetpointCC.js +10 -4
  33. package/build/cjs/cc/HumidityControlSetpointCC.js.map +2 -2
  34. package/build/cjs/cc/IndicatorCC.js +1 -5
  35. package/build/cjs/cc/IndicatorCC.js.map +2 -2
  36. package/build/cjs/cc/IrrigationCC.js.map +2 -2
  37. package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
  38. package/build/cjs/cc/ManufacturerSpecificCC.js +4 -5
  39. package/build/cjs/cc/ManufacturerSpecificCC.js.map +2 -2
  40. package/build/cjs/cc/MeterCC.js +8 -21
  41. package/build/cjs/cc/MeterCC.js.map +2 -2
  42. package/build/cjs/cc/MultiChannelAssociationCC.js +11 -7
  43. package/build/cjs/cc/MultiChannelAssociationCC.js.map +2 -2
  44. package/build/cjs/cc/MultiChannelCC.d.ts +3 -1
  45. package/build/cjs/cc/MultiChannelCC.js +21 -10
  46. package/build/cjs/cc/MultiChannelCC.js.map +3 -3
  47. package/build/cjs/cc/MultilevelSensorCC.js.map +2 -2
  48. package/build/cjs/cc/MultilevelSwitchCC.d.ts +5 -1
  49. package/build/cjs/cc/MultilevelSwitchCC.js +30 -0
  50. package/build/cjs/cc/MultilevelSwitchCC.js.map +3 -3
  51. package/build/cjs/cc/NotificationCC.js +29 -11
  52. package/build/cjs/cc/NotificationCC.js.map +2 -2
  53. package/build/cjs/cc/PowerlevelCC.js.map +1 -1
  54. package/build/cjs/cc/ProtectionCC.js.map +2 -2
  55. package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +2 -2
  56. package/build/cjs/cc/SceneControllerConfigurationCC.js.map +2 -2
  57. package/build/cjs/cc/ScheduleEntryLockCC.js.map +2 -2
  58. package/build/cjs/cc/Security2CC.d.ts +2 -1
  59. package/build/cjs/cc/Security2CC.js +31 -3
  60. package/build/cjs/cc/Security2CC.js.map +2 -2
  61. package/build/cjs/cc/SecurityCC.d.ts +2 -1
  62. package/build/cjs/cc/SecurityCC.js +7 -6
  63. package/build/cjs/cc/SecurityCC.js.map +2 -2
  64. package/build/cjs/cc/SoundSwitchCC.js +6 -6
  65. package/build/cjs/cc/SoundSwitchCC.js.map +2 -2
  66. package/build/cjs/cc/SupervisionCC.d.ts +2 -1
  67. package/build/cjs/cc/SupervisionCC.js +6 -0
  68. package/build/cjs/cc/SupervisionCC.js.map +3 -3
  69. package/build/cjs/cc/ThermostatFanModeCC.js.map +2 -2
  70. package/build/cjs/cc/ThermostatModeCC.js +1 -3
  71. package/build/cjs/cc/ThermostatModeCC.js.map +2 -2
  72. package/build/cjs/cc/ThermostatOperatingStateCC.js.map +2 -2
  73. package/build/cjs/cc/ThermostatSetpointCC.d.ts +4 -1
  74. package/build/cjs/cc/ThermostatSetpointCC.js +18 -0
  75. package/build/cjs/cc/ThermostatSetpointCC.js.map +3 -3
  76. package/build/cjs/cc/TimeCC.js.map +2 -2
  77. package/build/cjs/cc/TransportServiceCC.js.map +2 -2
  78. package/build/cjs/cc/UserCodeCC.js +1 -6
  79. package/build/cjs/cc/UserCodeCC.js.map +2 -2
  80. package/build/cjs/cc/UserCredentialCC.js +4 -6
  81. package/build/cjs/cc/UserCredentialCC.js.map +2 -2
  82. package/build/cjs/cc/VersionCC.js.map +2 -2
  83. package/build/cjs/cc/WindowCoveringCC.js +5 -1
  84. package/build/cjs/cc/WindowCoveringCC.js.map +2 -2
  85. package/build/cjs/cc/ZWaveProtocolCC.js +3 -11
  86. package/build/cjs/cc/ZWaveProtocolCC.js.map +2 -2
  87. package/build/cjs/cc/_CCValues.generated.d.ts +2 -2
  88. package/build/cjs/cc/_CCValues.generated.js.map +2 -2
  89. package/build/cjs/cc/index.d.ts +179 -179
  90. package/build/cjs/cc/index.js.map +1 -1
  91. package/build/cjs/cc/manufacturerProprietary/Decorators.js.map +2 -2
  92. package/build/cjs/lib/API.d.ts +3 -2
  93. package/build/cjs/lib/API.js.map +2 -2
  94. package/build/cjs/lib/CommandClass.d.ts +20 -0
  95. package/build/cjs/lib/CommandClass.js +52 -11
  96. package/build/cjs/lib/CommandClass.js.map +3 -3
  97. package/build/cjs/lib/CommandClassDecorators.js.map +2 -2
  98. package/build/cjs/lib/EncapsulatingCommandClass.js.map +2 -2
  99. package/build/cjs/lib/NotificationEventPayload.js.map +2 -2
  100. package/build/cjs/lib/Security2/Extension.js +1 -4
  101. package/build/cjs/lib/Security2/Extension.js.map +2 -2
  102. package/build/cjs/lib/Security2/shared.js.map +2 -2
  103. package/build/cjs/lib/SetValueResult.js.map +1 -1
  104. package/build/cjs/lib/Values.d.ts +1 -1
  105. package/build/cjs/lib/Values.js.map +2 -2
  106. package/build/cjs/lib/_CCAPI.generated.js.map +1 -1
  107. package/build/cjs/lib/_Types.d.ts +30 -30
  108. package/build/cjs/lib/_Types.js.map +2 -2
  109. package/build/cjs/lib/serializers.js +1 -4
  110. package/build/cjs/lib/serializers.js.map +2 -2
  111. package/build/cjs/lib/utils.js.map +2 -2
  112. package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
  113. package/build/esm/cc/AlarmSensorCC.js +1 -2
  114. package/build/esm/cc/AlarmSensorCC.js.map +1 -1
  115. package/build/esm/cc/AssociationCC.d.ts.map +1 -1
  116. package/build/esm/cc/AssociationCC.js +8 -7
  117. package/build/esm/cc/AssociationCC.js.map +1 -1
  118. package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
  119. package/build/esm/cc/AssociationGroupInfoCC.js +10 -12
  120. package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
  121. package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
  122. package/build/esm/cc/BarrierOperatorCC.js +10 -9
  123. package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
  124. package/build/esm/cc/BasicCC.d.ts +4 -1
  125. package/build/esm/cc/BasicCC.d.ts.map +1 -1
  126. package/build/esm/cc/BasicCC.js +30 -7
  127. package/build/esm/cc/BasicCC.js.map +1 -1
  128. package/build/esm/cc/BasicWindowCoveringCC.d.ts.map +1 -1
  129. package/build/esm/cc/BasicWindowCoveringCC.js +2 -5
  130. package/build/esm/cc/BasicWindowCoveringCC.js.map +1 -1
  131. package/build/esm/cc/BatteryCC.d.ts.map +1 -1
  132. package/build/esm/cc/BatteryCC.js +12 -12
  133. package/build/esm/cc/BatteryCC.js.map +1 -1
  134. package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
  135. package/build/esm/cc/BinarySensorCC.js +4 -5
  136. package/build/esm/cc/BinarySensorCC.js.map +1 -1
  137. package/build/esm/cc/BinarySwitchCC.d.ts +4 -1
  138. package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
  139. package/build/esm/cc/BinarySwitchCC.js +31 -6
  140. package/build/esm/cc/BinarySwitchCC.js.map +1 -1
  141. package/build/esm/cc/CRC16CC.d.ts +3 -2
  142. package/build/esm/cc/CRC16CC.d.ts.map +1 -1
  143. package/build/esm/cc/CRC16CC.js +10 -4
  144. package/build/esm/cc/CRC16CC.js.map +1 -1
  145. package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
  146. package/build/esm/cc/CentralSceneCC.js +2 -1
  147. package/build/esm/cc/CentralSceneCC.js.map +1 -1
  148. package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
  149. package/build/esm/cc/ClimateControlScheduleCC.js +6 -2
  150. package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
  151. package/build/esm/cc/ClockCC.d.ts.map +1 -1
  152. package/build/esm/cc/ClockCC.js +6 -2
  153. package/build/esm/cc/ClockCC.js.map +1 -1
  154. package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
  155. package/build/esm/cc/ColorSwitchCC.js +17 -20
  156. package/build/esm/cc/ColorSwitchCC.js.map +1 -1
  157. package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
  158. package/build/esm/cc/ConfigurationCC.js +20 -29
  159. package/build/esm/cc/ConfigurationCC.js.map +1 -1
  160. package/build/esm/cc/DeviceResetLocallyCC.d.ts.map +1 -1
  161. package/build/esm/cc/DeviceResetLocallyCC.js +1 -2
  162. package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
  163. package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
  164. package/build/esm/cc/DoorLockCC.js +25 -29
  165. package/build/esm/cc/DoorLockCC.js.map +1 -1
  166. package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
  167. package/build/esm/cc/EntryControlCC.js +10 -7
  168. package/build/esm/cc/EntryControlCC.js.map +1 -1
  169. package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
  170. package/build/esm/cc/FirmwareUpdateMetaDataCC.js +15 -27
  171. package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
  172. package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
  173. package/build/esm/cc/HumidityControlSetpointCC.js +8 -9
  174. package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
  175. package/build/esm/cc/IndicatorCC.d.ts.map +1 -1
  176. package/build/esm/cc/IndicatorCC.js +19 -38
  177. package/build/esm/cc/IndicatorCC.js.map +1 -1
  178. package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
  179. package/build/esm/cc/IrrigationCC.js +8 -6
  180. package/build/esm/cc/IrrigationCC.js.map +1 -1
  181. package/build/esm/cc/ManufacturerProprietaryCC.d.ts.map +1 -1
  182. package/build/esm/cc/ManufacturerProprietaryCC.js +1 -2
  183. package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
  184. package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
  185. package/build/esm/cc/ManufacturerSpecificCC.js +5 -8
  186. package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
  187. package/build/esm/cc/MeterCC.d.ts.map +1 -1
  188. package/build/esm/cc/MeterCC.js +15 -29
  189. package/build/esm/cc/MeterCC.js.map +1 -1
  190. package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
  191. package/build/esm/cc/MultiChannelAssociationCC.js +15 -20
  192. package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
  193. package/build/esm/cc/MultiChannelCC.d.ts +3 -1
  194. package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
  195. package/build/esm/cc/MultiChannelCC.js +28 -22
  196. package/build/esm/cc/MultiChannelCC.js.map +1 -1
  197. package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
  198. package/build/esm/cc/MultilevelSensorCC.js +11 -11
  199. package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
  200. package/build/esm/cc/MultilevelSwitchCC.d.ts +5 -1
  201. package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
  202. package/build/esm/cc/MultilevelSwitchCC.js +56 -16
  203. package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
  204. package/build/esm/cc/NotificationCC.d.ts.map +1 -1
  205. package/build/esm/cc/NotificationCC.js +66 -55
  206. package/build/esm/cc/NotificationCC.js.map +1 -1
  207. package/build/esm/cc/PowerlevelCC.d.ts.map +1 -1
  208. package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
  209. package/build/esm/cc/ProtectionCC.js +10 -9
  210. package/build/esm/cc/ProtectionCC.js.map +1 -1
  211. package/build/esm/cc/SceneActuatorConfigurationCC.d.ts.map +1 -1
  212. package/build/esm/cc/SceneActuatorConfigurationCC.js +5 -8
  213. package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
  214. package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
  215. package/build/esm/cc/SceneControllerConfigurationCC.js +10 -16
  216. package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
  217. package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
  218. package/build/esm/cc/ScheduleEntryLockCC.js +13 -20
  219. package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
  220. package/build/esm/cc/Security2CC.d.ts +2 -1
  221. package/build/esm/cc/Security2CC.d.ts.map +1 -1
  222. package/build/esm/cc/Security2CC.js +68 -32
  223. package/build/esm/cc/Security2CC.js.map +1 -1
  224. package/build/esm/cc/SecurityCC.d.ts +2 -1
  225. package/build/esm/cc/SecurityCC.d.ts.map +1 -1
  226. package/build/esm/cc/SecurityCC.js +16 -11
  227. package/build/esm/cc/SecurityCC.js.map +1 -1
  228. package/build/esm/cc/SoundSwitchCC.js +2 -2
  229. package/build/esm/cc/SoundSwitchCC.js.map +1 -1
  230. package/build/esm/cc/SupervisionCC.d.ts +2 -1
  231. package/build/esm/cc/SupervisionCC.d.ts.map +1 -1
  232. package/build/esm/cc/SupervisionCC.js +13 -6
  233. package/build/esm/cc/SupervisionCC.js.map +1 -1
  234. package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
  235. package/build/esm/cc/ThermostatFanModeCC.js +1 -2
  236. package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
  237. package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
  238. package/build/esm/cc/ThermostatModeCC.js +1 -3
  239. package/build/esm/cc/ThermostatModeCC.js.map +1 -1
  240. package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
  241. package/build/esm/cc/ThermostatOperatingStateCC.js +1 -2
  242. package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
  243. package/build/esm/cc/ThermostatSetpointCC.d.ts +4 -1
  244. package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
  245. package/build/esm/cc/ThermostatSetpointCC.js +31 -19
  246. package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
  247. package/build/esm/cc/TimeCC.d.ts.map +1 -1
  248. package/build/esm/cc/TimeCC.js +6 -2
  249. package/build/esm/cc/TimeCC.js.map +1 -1
  250. package/build/esm/cc/TransportServiceCC.d.ts.map +1 -1
  251. package/build/esm/cc/TransportServiceCC.js +8 -8
  252. package/build/esm/cc/TransportServiceCC.js.map +1 -1
  253. package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
  254. package/build/esm/cc/UserCodeCC.js +20 -30
  255. package/build/esm/cc/UserCodeCC.js.map +1 -1
  256. package/build/esm/cc/UserCredentialCC.d.ts.map +1 -1
  257. package/build/esm/cc/UserCredentialCC.js +42 -59
  258. package/build/esm/cc/UserCredentialCC.js.map +1 -1
  259. package/build/esm/cc/VersionCC.js +3 -3
  260. package/build/esm/cc/VersionCC.js.map +1 -1
  261. package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
  262. package/build/esm/cc/WindowCoveringCC.js +10 -9
  263. package/build/esm/cc/WindowCoveringCC.js.map +1 -1
  264. package/build/esm/cc/ZWaveProtocolCC.d.ts.map +1 -1
  265. package/build/esm/cc/ZWaveProtocolCC.js +5 -26
  266. package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
  267. package/build/esm/cc/_CCValues.generated.d.ts +2 -2
  268. package/build/esm/cc/_CCValues.generated.d.ts.map +1 -1
  269. package/build/esm/cc/_CCValues.generated.js +637 -678
  270. package/build/esm/cc/_CCValues.generated.js.map +1 -1
  271. package/build/esm/cc/index.d.ts +179 -179
  272. package/build/esm/cc/index.d.ts.map +1 -1
  273. package/build/esm/cc/index.js +124 -124
  274. package/build/esm/cc/index.js.map +1 -1
  275. package/build/esm/cc/manufacturerProprietary/Decorators.d.ts.map +1 -1
  276. package/build/esm/cc/manufacturerProprietary/Decorators.js.map +1 -1
  277. package/build/esm/lib/API.d.ts +3 -2
  278. package/build/esm/lib/API.d.ts.map +1 -1
  279. package/build/esm/lib/API.js +1 -1
  280. package/build/esm/lib/API.js.map +1 -1
  281. package/build/esm/lib/CommandClass.d.ts +20 -0
  282. package/build/esm/lib/CommandClass.d.ts.map +1 -1
  283. package/build/esm/lib/CommandClass.js +50 -16
  284. package/build/esm/lib/CommandClass.js.map +1 -1
  285. package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -1
  286. package/build/esm/lib/CommandClassDecorators.js +1 -2
  287. package/build/esm/lib/CommandClassDecorators.js.map +1 -1
  288. package/build/esm/lib/EncapsulatingCommandClass.d.ts.map +1 -1
  289. package/build/esm/lib/EncapsulatingCommandClass.js.map +1 -1
  290. package/build/esm/lib/NotificationEventPayload.d.ts.map +1 -1
  291. package/build/esm/lib/NotificationEventPayload.js.map +1 -1
  292. package/build/esm/lib/Security2/Extension.d.ts.map +1 -1
  293. package/build/esm/lib/Security2/Extension.js +2 -6
  294. package/build/esm/lib/Security2/Extension.js.map +1 -1
  295. package/build/esm/lib/Security2/shared.d.ts.map +1 -1
  296. package/build/esm/lib/Security2/shared.js.map +1 -1
  297. package/build/esm/lib/SetValueResult.d.ts.map +1 -1
  298. package/build/esm/lib/Values.d.ts +1 -1
  299. package/build/esm/lib/Values.d.ts.map +1 -1
  300. package/build/esm/lib/Values.js.map +1 -1
  301. package/build/esm/lib/_CCAPI.generated.d.ts.map +1 -1
  302. package/build/esm/lib/_Types.d.ts +30 -30
  303. package/build/esm/lib/_Types.d.ts.map +1 -1
  304. package/build/esm/lib/_Types.js.map +1 -1
  305. package/build/esm/lib/serializers.d.ts.map +1 -1
  306. package/build/esm/lib/serializers.js +1 -4
  307. package/build/esm/lib/serializers.js.map +1 -1
  308. package/build/esm/lib/traits.d.ts.map +1 -1
  309. package/build/esm/lib/utils.d.ts.map +1 -1
  310. package/build/esm/lib/utils.js +25 -31
  311. package/build/esm/lib/utils.js.map +1 -1
  312. package/package.json +7 -7
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src_gen/lib/CommandClassDecorators.ts"],
4
- "sourcesContent": ["import {\n\ttype CommandClasses,\n\tZWaveError,\n\tZWaveErrorCodes,\n} from \"@zwave-js/core\";\nimport {\n\tcreateReflectionDecorator,\n\tcreateReflectionDecoratorPair,\n\tcreateValuelessReflectionDecorator,\n} from \"@zwave-js/core/reflection\";\nimport type { TypedClassDecorator } from \"@zwave-js/shared\";\nimport type { APIConstructor, CCAPI } from \"./API.js\";\nimport type {\n\tCCConstructor,\n\tCCResponsePredicate,\n\tCommandClass,\n\tDynamicCCResponse,\n} from \"./CommandClass.js\";\nimport type {\n\tDynamicCCValue,\n\tStaticCCValue,\n\tStaticCCValueFactory,\n} from \"./Values.js\";\n\nconst CCAndCommandDecorator = createReflectionDecoratorPair<\n\ttypeof CommandClass,\n\t[ccId: CommandClasses],\n\t[ccCommand: number],\n\tCCConstructor<CommandClass>\n>({ superName: \"ccId\", subName: \"ccCommand\" });\n\n/**\n * @publicAPI\n * Defines the CC ID associated with a Z-Wave Command Class\n */\nexport const commandClass = CCAndCommandDecorator.superDecorator;\n\n/**\n * @publicAPI\n * Looks up the command class constructor for a given CC ID\n */\nexport const getCCConstructor = CCAndCommandDecorator.lookupSuperConstructor;\n\n/**\n * @publicAPI\n * Defines the CC command a subclass of a CC implements\n */\nexport const CCCommand = CCAndCommandDecorator.subDecorator;\n\n/**\n * @publicAPI\n * Retrieves the CC command a subclass of a CC implements\n */\nexport const getCCCommand = CCAndCommandDecorator.lookupSubValue;\n\n/**\n * @publicAPI\n * Looks up the command class constructor for a given CC ID and command\n */\nexport const getCCCommandConstructor =\n\tCCAndCommandDecorator.lookupSubConstructor;\n\n/**\n * @publicAPI\n * Retrieves the CC ID defined for a Z-Wave Command Class\n */\nexport function getCommandClassStatic(\n\tclassConstructor: CCConstructor<CommandClass>,\n): CommandClasses {\n\t// retrieve the current metadata\n\tconst ret = CCAndCommandDecorator.lookupSuperValueStatic(classConstructor);\n\tif (ret == undefined) {\n\t\tthrow new ZWaveError(\n\t\t\t`No command class defined for ${classConstructor.name}!`,\n\t\t\tZWaveErrorCodes.CC_Invalid,\n\t\t);\n\t}\n\treturn ret;\n}\n\nconst apiDecorator = createReflectionDecorator<\n\ttypeof CCAPI,\n\t[cc: CommandClasses],\n\tCommandClasses,\n\tAPIConstructor\n>({\n\tname: \"API\",\n\tvalueFromArgs: (cc) => cc,\n});\n\n/**\n * @publicAPI\n * Defines the CC ID a CC API implementation belongs to\n */\nexport const API = apiDecorator.decorator;\n\n/**\n * @publicAPI\n * Retrieves the CC API constructor that is defined for a Z-Wave CC ID\n */\nexport function getAPI(cc: CommandClasses): APIConstructor | undefined {\n\treturn apiDecorator.lookupConstructorByValue(cc);\n}\n\n/**\n * @publicAPI\n * Retrieves the CC ID associated with a Z-Wave Command Class or CC API\n */\nexport function getCommandClass(cc: CommandClass | CCAPI): CommandClasses {\n\t// get the class constructor\n\tconst constr = cc.constructor;\n\t// retrieve the current metadata\n\tconst ret = CCAndCommandDecorator.lookupSuperValueStatic(\n\t\tconstr as typeof CommandClass,\n\t)\n\t\t?? apiDecorator.lookupValueStatic(constr as typeof CCAPI);\n\n\tif (ret == undefined) {\n\t\tthrow new ZWaveError(\n\t\t\t`No command class defined for ${constr.name}!`,\n\t\t\tZWaveErrorCodes.CC_Invalid,\n\t\t);\n\t}\n\treturn ret;\n}\n\nconst implementedVersionDecorator = createReflectionDecorator<\n\ttypeof CommandClass,\n\t[version: number],\n\tnumber\n>({\n\tname: \"implementedVersion\",\n\tvalueFromArgs: (version) => version,\n\tconstructorLookupKey: false,\n});\n\n/**\n * @publicAPI\n * Defines the implemented version of a Z-Wave command class\n */\nexport const implementedVersion = implementedVersionDecorator.decorator;\n\n/**\n * @publicAPI\n * Retrieves the implemented version defined for a Z-Wave command class\n */\nexport function getImplementedVersion(\n\tcc: CommandClass | CommandClasses,\n): number {\n\t// get the class constructor\n\tlet constr: CCConstructor<CommandClass> | undefined;\n\tif (typeof cc === \"number\") {\n\t\tconstr = getCCConstructor(cc);\n\t} else {\n\t\tconstr = cc.constructor as CCConstructor<CommandClass>;\n\t}\n\n\tif (!constr) return 0;\n\treturn implementedVersionDecorator.lookupValueStatic(constr) ?? 0;\n}\n\n/**\n * @publicAPI\n * Retrieves the implemented version defined for a Z-Wave command class\n */\nexport function getImplementedVersionStatic(\n\tclassConstructor: CCConstructor<CommandClass>,\n): number {\n\treturn implementedVersionDecorator.lookupValueStatic(classConstructor) ?? 0;\n}\n\nconst expectedCCResponseDecorator = createReflectionDecorator<\n\ttypeof CommandClass,\n\t[\n\t\tcc:\n\t\t\t| CCConstructor<CommandClass>\n\t\t\t| DynamicCCResponse<CommandClass, CommandClass>,\n\t\tpredicate?: CCResponsePredicate<CommandClass, CommandClass>,\n\t],\n\t{\n\t\tcc:\n\t\t\t| CCConstructor<CommandClass>\n\t\t\t| DynamicCCResponse<CommandClass, CommandClass>;\n\t\tpredicate?: CCResponsePredicate<CommandClass, CommandClass>;\n\t}\n>({\n\tname: \"expectedCCResponse\",\n\tvalueFromArgs: (cc, predicate) => ({ cc, predicate }),\n\t// We don't need reverse lookup\n\tconstructorLookupKey: false,\n});\n\n/**\n * @publicAPI\n * Defines the expected response associated with a Z-Wave message\n */\nexport function expectedCCResponse<\n\tTTarget extends typeof CommandClass,\n\tTSent extends CommandClass,\n\tTReceived extends CommandClass,\n>(\n\tcc: CCConstructor<TReceived> | DynamicCCResponse<TSent, TReceived>,\n\tpredicate?: CCResponsePredicate<TSent, TReceived>,\n): TypedClassDecorator<TTarget> {\n\treturn expectedCCResponseDecorator.decorator(cc as any, predicate as any);\n}\n\n/**\n * @publicAPI\n * Retrieves the expected response (static or dynamic) defined for a Z-Wave message class\n */\nexport function getExpectedCCResponse<T extends CommandClass>(\n\tccClass: T,\n): typeof CommandClass | DynamicCCResponse<T> | undefined {\n\treturn expectedCCResponseDecorator.lookupValue(ccClass)?.cc;\n}\n\n/**\n * @publicAPI\n * Retrieves the CC response predicate defined for a Z-Wave message class\n */\nexport function getCCResponsePredicate<T extends CommandClass>(\n\tccClass: T,\n): CCResponsePredicate<T> | undefined {\n\treturn expectedCCResponseDecorator.lookupValue(ccClass)?.predicate;\n}\n\nconst ccValuesDecorator = createReflectionDecorator<\n\ttypeof CommandClass,\n\t[valueDefinition: Record<string, StaticCCValue | DynamicCCValue>],\n\tRecord<string, StaticCCValue | DynamicCCValue | undefined>\n>({\n\tname: \"ccValues\",\n\tvalueFromArgs: (valueDefinition) => valueDefinition,\n\t// We don't need reverse lookup\n\tconstructorLookupKey: false,\n});\n\n/**\n * @publicAPI\n * Defines which CC value definitions belong to a Z-Wave command class\n */\nexport const ccValues = ccValuesDecorator.decorator;\n\n/**\n * @publicAPI\n * Retrieves the CC value definitions which belong to a Z-Wave command class\n */\nexport function getCCValues(\n\tcc: CommandClass | CommandClasses,\n): Record<string, StaticCCValue | DynamicCCValue | undefined> | undefined {\n\t// get the class constructor\n\tlet constr: CCConstructor<CommandClass> | undefined;\n\tif (typeof cc === \"number\") {\n\t\tconstr = getCCConstructor(cc);\n\t} else {\n\t\tconstr = cc.constructor as CCConstructor<CommandClass>;\n\t}\n\n\tif (constr) return ccValuesDecorator.lookupValueStatic(constr);\n}\n\nconst ccValue_METADATA = Symbol.for(`METADATA_ccValue`);\n\n// /**\n// * @publicAPI\n// * Defines which CC value a Z-Wave command class property belongs to\n// */\n// export function ccValue<TTarget extends CommandClass>(\n// \tvalue: StaticCCValue,\n// ): TypedPropertyDecorator<TTarget>;\n\n// export function ccValue<TTarget extends CommandClass, TArgs extends any[]>(\n// \tvalue: DynamicCCValue<TArgs>,\n// \tgetArgs: (self: TTarget) => Readonly<TArgs>,\n// ): TypedPropertyDecorator<TTarget>;\n\n// // Ideally this should use the PropertyReflectionDecorator, but we cannot reuse the\n// // target type in the getArgs function then.\n// export function ccValue<TTarget extends CommandClass, TArgs extends any[]>(\n// \t...args:\n// \t\t| [value: StaticCCValue]\n// \t\t| [value: DynamicCCValue<TArgs>, getArgs: (self: TTarget) => TArgs]\n// ): TypedPropertyDecorator<TTarget> {\n// \t// Normalize the arguments to the expected format\n// \tdebugger;\n// \tlet valueOrFactory: StaticCCValue | StaticCCValueFactory<TTarget>;\n// \tif (args.length === 1) {\n// \t\tvalueOrFactory = args[0];\n// \t} else {\n// \t\tconst [value, getArgs] = args;\n// \t\tvalueOrFactory = (self: TTarget) => {\n// \t\t\tconst args = getArgs(self);\n// \t\t\tconst base = value(...args);\n// \t\t\treturn {\n// \t\t\t\t...base,\n// \t\t\t\tis: value.is,\n// \t\t\t\toptions: value.options,\n// \t\t\t};\n// \t\t};\n// \t}\n\n// \treturn function decoratorBody_ccValue(\n// \t\ttarget: TTarget,\n// \t\tproperty: string | number | symbol,\n// \t): void {\n// \t\t// get the class constructor\n// \t\tconst constr = target.constructor;\n\n// \t\t// retrieve the current metadata\n// \t\tconst metadata: Map<\n// \t\t\tstring | number,\n// \t\t\tStaticCCValue | StaticCCValueFactory<TTarget>\n// \t\t> = Reflect.getMetadata(ccValue_METADATA, constr) ?? new Map();\n\n// \t\t// Add the variable\n// \t\tmetadata.set(property as string | number, valueOrFactory);\n\n// \t\t// And store it back\n// \t\tReflect.defineMetadata(ccValue_METADATA, metadata, constr);\n// \t};\n// }\n\nexport function ccValueProperty<\n\tClass extends abstract new (...args: any) => any,\n>(\n\tproperty: keyof InstanceType<Class>,\n\tvalue: StaticCCValue,\n): TypedClassDecorator<Class>;\n\nexport function ccValueProperty<\n\tClass extends abstract new (...args: any) => any,\n\tconst TArgs extends any[],\n>(\n\tproperty: keyof InstanceType<Class>,\n\tvalue: DynamicCCValue<TArgs>,\n\tgetArgs: (self: InstanceType<Class>) => TArgs,\n): TypedClassDecorator<Class>;\n\n/**\n * @publicAPI\n * Defines which CC values the properties of a Z-Wave Command Class correspond to\n */\nexport function ccValueProperty<\n\tClass extends abstract new (...args: any) => any,\n\tconst TArgs extends any[],\n>(\n\tproperty: keyof InstanceType<Class>,\n\t...args:\n\t\t| [value: StaticCCValue]\n\t\t| [\n\t\t\tvalue: DynamicCCValue<TArgs>,\n\t\t\tgetArgs: (self: InstanceType<Class>) => TArgs,\n\t\t]\n): TypedClassDecorator<Class> {\n\treturn function decorator_ccValueProperty(constr: Class): void {\n\t\t// retrieve the current metadata\n\t\tconst metadata: Map<\n\t\t\tstring | number,\n\t\t\tStaticCCValue | StaticCCValueFactory<InstanceType<Class>>\n\t\t> = Reflect.getMetadata(ccValue_METADATA, constr) ?? new Map();\n\n\t\t// Determine the correct metadata\n\t\tlet valueOrFactory:\n\t\t\t| StaticCCValue\n\t\t\t| StaticCCValueFactory<InstanceType<Class>>;\n\t\tif (args.length === 1) {\n\t\t\tvalueOrFactory = args[0];\n\t\t} else {\n\t\t\tconst [value, getArgs] = args;\n\t\t\tvalueOrFactory = (self: InstanceType<Class>) => {\n\t\t\t\tconst args = getArgs(self);\n\t\t\t\tconst base = value(...args);\n\t\t\t\treturn {\n\t\t\t\t\t...base,\n\t\t\t\t\tis: value.is,\n\t\t\t\t\toptions: value.options,\n\t\t\t\t};\n\t\t\t};\n\t\t}\n\n\t\t// Add the metadata\n\t\tmetadata.set(property as string | number, valueOrFactory);\n\n\t\t// And store it back\n\t\tReflect.defineMetadata(ccValue_METADATA, metadata, constr);\n\t};\n}\n\n/**\n * @publicAPI\n * Retrieves the defined mapping between properties and CC values of a Z-Wave command class instance\n */\nexport function getCCValueProperties<TTarget extends CommandClass>(\n\ttarget: TTarget,\n): ReadonlyMap<string | number, StaticCCValue | StaticCCValueFactory<TTarget>> {\n\treturn (\n\t\tReflect.getMetadata(ccValue_METADATA, target.constructor) ?? new Map()\n\t);\n}\n\n// const ccValueDecorator = createPropertyReflectionDecorator<\n// \tCommandClass,\n// \t[value: StaticCCValue | StaticCCValueFactory<CommandClass>],\n// \tStaticCCValue | StaticCCValueFactory<CommandClass>\n// >({\n// \tname: \"ccValue\",\n// \tvalueFromArgs: (valueDefinition) => valueDefinition,\n// });\n\n// /**\n// * @publicAPI\n// * Defines which CC value a Z-Wave command class property belongs to\n// */\n// export const ccValue = ccValueDecorator.decorator;\n\n// /**\n// * @publicAPI\n// * Retrieves the defined mapping between properties and CC values of a Z-Wave command class instance\n// */\n// export const getCCValueDefinitions = ccValueDecorator.lookupValues;\n\nconst supervisionDecorator = createValuelessReflectionDecorator<\n\ttypeof CommandClass\n>({\n\tname: \"useSupervision\",\n});\n\n/**\n * @publicAPI\n * Defines that this CC may be sent supervised\n */\nexport const useSupervision = supervisionDecorator.decorator;\n\n/**\n * @publicAPI\n * Checks if the given CC may be sent supervised\n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;UACH,IAAI,MAAM;UACV,SAAS,MAAM;;MAEjB,GARiB;IASlB;AAGA,aAAS,IAAI,UAA6B,cAAc;AAGxD,YAAQ,eAAe,kBAAkB,UAAU,MAAM;EAC1D,GA/BO;AAgCR;AA5CgB;AAkDV,SAAU,qBACf,QAAe;AAEf,SACC,QAAQ,YAAY,kBAAkB,OAAO,WAAW,KAAK,oBAAI,IAAG;AAEtE;AANgB;AA6BhB,MAAM,2BAAuB,sDAE3B;EACD,MAAM;CACN;AAMM,MAAM,iBAAiB,qBAAqB;AAM5C,MAAM,uBAAuB,qBAAqB;",
4
+ "sourcesContent": ["import {\n\ttype CommandClasses,\n\tZWaveError,\n\tZWaveErrorCodes,\n} from \"@zwave-js/core\";\nimport {\n\tcreateReflectionDecorator,\n\tcreateReflectionDecoratorPair,\n\tcreateValuelessReflectionDecorator,\n} from \"@zwave-js/core/reflection\";\nimport type { TypedClassDecorator } from \"@zwave-js/shared\";\n\nimport type { APIConstructor, CCAPI } from \"./API.js\";\nimport type {\n\tCCConstructor,\n\tCCResponsePredicate,\n\tCommandClass,\n\tDynamicCCResponse,\n} from \"./CommandClass.js\";\nimport type {\n\tDynamicCCValue,\n\tStaticCCValue,\n\tStaticCCValueFactory,\n} from \"./Values.js\";\n\nconst CCAndCommandDecorator = createReflectionDecoratorPair<\n\ttypeof CommandClass,\n\t[ccId: CommandClasses],\n\t[ccCommand: number],\n\tCCConstructor<CommandClass>\n>({ superName: \"ccId\", subName: \"ccCommand\" });\n\n/**\n * @publicAPI\n * Defines the CC ID associated with a Z-Wave Command Class\n */\nexport const commandClass = CCAndCommandDecorator.superDecorator;\n\n/**\n * @publicAPI\n * Looks up the command class constructor for a given CC ID\n */\nexport const getCCConstructor = CCAndCommandDecorator.lookupSuperConstructor;\n\n/**\n * @publicAPI\n * Defines the CC command a subclass of a CC implements\n */\nexport const CCCommand = CCAndCommandDecorator.subDecorator;\n\n/**\n * @publicAPI\n * Retrieves the CC command a subclass of a CC implements\n */\nexport const getCCCommand = CCAndCommandDecorator.lookupSubValue;\n\n/**\n * @publicAPI\n * Looks up the command class constructor for a given CC ID and command\n */\nexport const getCCCommandConstructor =\n\tCCAndCommandDecorator.lookupSubConstructor;\n\n/**\n * @publicAPI\n * Retrieves the CC ID defined for a Z-Wave Command Class\n */\nexport function getCommandClassStatic(\n\tclassConstructor: CCConstructor<CommandClass>,\n): CommandClasses {\n\t// retrieve the current metadata\n\tconst ret = CCAndCommandDecorator.lookupSuperValueStatic(classConstructor);\n\tif (ret == undefined) {\n\t\tthrow new ZWaveError(\n\t\t\t`No command class defined for ${classConstructor.name}!`,\n\t\t\tZWaveErrorCodes.CC_Invalid,\n\t\t);\n\t}\n\treturn ret;\n}\n\nconst apiDecorator = createReflectionDecorator<\n\ttypeof CCAPI,\n\t[cc: CommandClasses],\n\tCommandClasses,\n\tAPIConstructor\n>({\n\tname: \"API\",\n\tvalueFromArgs: (cc) => cc,\n});\n\n/**\n * @publicAPI\n * Defines the CC ID a CC API implementation belongs to\n */\nexport const API = apiDecorator.decorator;\n\n/**\n * @publicAPI\n * Retrieves the CC API constructor that is defined for a Z-Wave CC ID\n */\nexport function getAPI(cc: CommandClasses): APIConstructor | undefined {\n\treturn apiDecorator.lookupConstructorByValue(cc);\n}\n\n/**\n * @publicAPI\n * Retrieves the CC ID associated with a Z-Wave Command Class or CC API\n */\nexport function getCommandClass(cc: CommandClass | CCAPI): CommandClasses {\n\t// get the class constructor\n\tconst constr = cc.constructor;\n\t// retrieve the current metadata\n\tconst ret =\n\t\tCCAndCommandDecorator.lookupSuperValueStatic(\n\t\t\tconstr as typeof CommandClass,\n\t\t) ?? apiDecorator.lookupValueStatic(constr as typeof CCAPI);\n\n\tif (ret == undefined) {\n\t\tthrow new ZWaveError(\n\t\t\t`No command class defined for ${constr.name}!`,\n\t\t\tZWaveErrorCodes.CC_Invalid,\n\t\t);\n\t}\n\treturn ret;\n}\n\nconst implementedVersionDecorator = createReflectionDecorator<\n\ttypeof CommandClass,\n\t[version: number],\n\tnumber\n>({\n\tname: \"implementedVersion\",\n\tvalueFromArgs: (version) => version,\n\tconstructorLookupKey: false,\n});\n\n/**\n * @publicAPI\n * Defines the implemented version of a Z-Wave command class\n */\nexport const implementedVersion = implementedVersionDecorator.decorator;\n\n/**\n * @publicAPI\n * Retrieves the implemented version defined for a Z-Wave command class\n */\nexport function getImplementedVersion(\n\tcc: CommandClass | CommandClasses,\n): number {\n\t// get the class constructor\n\tlet constr: CCConstructor<CommandClass> | undefined;\n\tif (typeof cc === \"number\") {\n\t\tconstr = getCCConstructor(cc);\n\t} else {\n\t\tconstr = cc.constructor as CCConstructor<CommandClass>;\n\t}\n\n\tif (!constr) return 0;\n\treturn implementedVersionDecorator.lookupValueStatic(constr) ?? 0;\n}\n\n/**\n * @publicAPI\n * Retrieves the implemented version defined for a Z-Wave command class\n */\nexport function getImplementedVersionStatic(\n\tclassConstructor: CCConstructor<CommandClass>,\n): number {\n\treturn implementedVersionDecorator.lookupValueStatic(classConstructor) ?? 0;\n}\n\nconst expectedCCResponseDecorator = createReflectionDecorator<\n\ttypeof CommandClass,\n\t[\n\t\tcc:\n\t\t\t| CCConstructor<CommandClass>\n\t\t\t| DynamicCCResponse<CommandClass, CommandClass>,\n\t\tpredicate?: CCResponsePredicate<CommandClass, CommandClass>,\n\t],\n\t{\n\t\tcc:\n\t\t\t| CCConstructor<CommandClass>\n\t\t\t| DynamicCCResponse<CommandClass, CommandClass>;\n\t\tpredicate?: CCResponsePredicate<CommandClass, CommandClass>;\n\t}\n>({\n\tname: \"expectedCCResponse\",\n\tvalueFromArgs: (cc, predicate) => ({ cc, predicate }),\n\t// We don't need reverse lookup\n\tconstructorLookupKey: false,\n});\n\n/**\n * @publicAPI\n * Defines the expected response associated with a Z-Wave message\n */\nexport function expectedCCResponse<\n\tTTarget extends typeof CommandClass,\n\tTSent extends CommandClass,\n\tTReceived extends CommandClass,\n>(\n\tcc: CCConstructor<TReceived> | DynamicCCResponse<TSent, TReceived>,\n\tpredicate?: CCResponsePredicate<TSent, TReceived>,\n): TypedClassDecorator<TTarget> {\n\treturn expectedCCResponseDecorator.decorator(cc as any, predicate as any);\n}\n\n/**\n * @publicAPI\n * Retrieves the expected response (static or dynamic) defined for a Z-Wave message class\n */\nexport function getExpectedCCResponse<T extends CommandClass>(\n\tccClass: T,\n): typeof CommandClass | DynamicCCResponse<T> | undefined {\n\treturn expectedCCResponseDecorator.lookupValue(ccClass)?.cc;\n}\n\n/**\n * @publicAPI\n * Retrieves the CC response predicate defined for a Z-Wave message class\n */\nexport function getCCResponsePredicate<T extends CommandClass>(\n\tccClass: T,\n): CCResponsePredicate<T> | undefined {\n\treturn expectedCCResponseDecorator.lookupValue(ccClass)?.predicate;\n}\n\nconst ccValuesDecorator = createReflectionDecorator<\n\ttypeof CommandClass,\n\t[valueDefinition: Record<string, StaticCCValue | DynamicCCValue>],\n\tRecord<string, StaticCCValue | DynamicCCValue | undefined>\n>({\n\tname: \"ccValues\",\n\tvalueFromArgs: (valueDefinition) => valueDefinition,\n\t// We don't need reverse lookup\n\tconstructorLookupKey: false,\n});\n\n/**\n * @publicAPI\n * Defines which CC value definitions belong to a Z-Wave command class\n */\nexport const ccValues = ccValuesDecorator.decorator;\n\n/**\n * @publicAPI\n * Retrieves the CC value definitions which belong to a Z-Wave command class\n */\nexport function getCCValues(\n\tcc: CommandClass | CommandClasses,\n): Record<string, StaticCCValue | DynamicCCValue | undefined> | undefined {\n\t// get the class constructor\n\tlet constr: CCConstructor<CommandClass> | undefined;\n\tif (typeof cc === \"number\") {\n\t\tconstr = getCCConstructor(cc);\n\t} else {\n\t\tconstr = cc.constructor as CCConstructor<CommandClass>;\n\t}\n\n\tif (constr) return ccValuesDecorator.lookupValueStatic(constr);\n}\n\nconst ccValue_METADATA = Symbol.for(`METADATA_ccValue`);\n\n// /**\n// * @publicAPI\n// * Defines which CC value a Z-Wave command class property belongs to\n// */\n// export function ccValue<TTarget extends CommandClass>(\n// \tvalue: StaticCCValue,\n// ): TypedPropertyDecorator<TTarget>;\n\n// export function ccValue<TTarget extends CommandClass, TArgs extends any[]>(\n// \tvalue: DynamicCCValue<TArgs>,\n// \tgetArgs: (self: TTarget) => Readonly<TArgs>,\n// ): TypedPropertyDecorator<TTarget>;\n\n// // Ideally this should use the PropertyReflectionDecorator, but we cannot reuse the\n// // target type in the getArgs function then.\n// export function ccValue<TTarget extends CommandClass, TArgs extends any[]>(\n// \t...args:\n// \t\t| [value: StaticCCValue]\n// \t\t| [value: DynamicCCValue<TArgs>, getArgs: (self: TTarget) => TArgs]\n// ): TypedPropertyDecorator<TTarget> {\n// \t// Normalize the arguments to the expected format\n// \tdebugger;\n// \tlet valueOrFactory: StaticCCValue | StaticCCValueFactory<TTarget>;\n// \tif (args.length === 1) {\n// \t\tvalueOrFactory = args[0];\n// \t} else {\n// \t\tconst [value, getArgs] = args;\n// \t\tvalueOrFactory = (self: TTarget) => {\n// \t\t\tconst args = getArgs(self);\n// \t\t\tconst base = value(...args);\n// \t\t\treturn {\n// \t\t\t\t...base,\n// \t\t\t\tis: value.is,\n// \t\t\t\toptions: value.options,\n// \t\t\t};\n// \t\t};\n// \t}\n\n// \treturn function decoratorBody_ccValue(\n// \t\ttarget: TTarget,\n// \t\tproperty: string | number | symbol,\n// \t): void {\n// \t\t// get the class constructor\n// \t\tconst constr = target.constructor;\n\n// \t\t// retrieve the current metadata\n// \t\tconst metadata: Map<\n// \t\t\tstring | number,\n// \t\t\tStaticCCValue | StaticCCValueFactory<TTarget>\n// \t\t> = Reflect.getMetadata(ccValue_METADATA, constr) ?? new Map();\n\n// \t\t// Add the variable\n// \t\tmetadata.set(property as string | number, valueOrFactory);\n\n// \t\t// And store it back\n// \t\tReflect.defineMetadata(ccValue_METADATA, metadata, constr);\n// \t};\n// }\n\nexport function ccValueProperty<\n\tClass extends abstract new (...args: any) => any,\n>(\n\tproperty: keyof InstanceType<Class>,\n\tvalue: StaticCCValue,\n): TypedClassDecorator<Class>;\n\nexport function ccValueProperty<\n\tClass extends abstract new (...args: any) => any,\n\tconst TArgs extends any[],\n>(\n\tproperty: keyof InstanceType<Class>,\n\tvalue: DynamicCCValue<TArgs>,\n\tgetArgs: (self: InstanceType<Class>) => TArgs,\n): TypedClassDecorator<Class>;\n\n/**\n * @publicAPI\n * Defines which CC values the properties of a Z-Wave Command Class correspond to\n */\nexport function ccValueProperty<\n\tClass extends abstract new (...args: any) => any,\n\tconst TArgs extends any[],\n>(\n\tproperty: keyof InstanceType<Class>,\n\t...args:\n\t\t| [value: StaticCCValue]\n\t\t| [\n\t\t\t\tvalue: DynamicCCValue<TArgs>,\n\t\t\t\tgetArgs: (self: InstanceType<Class>) => TArgs,\n\t\t ]\n): TypedClassDecorator<Class> {\n\treturn function decorator_ccValueProperty(constr: Class): void {\n\t\t// retrieve the current metadata\n\t\tconst metadata: Map<\n\t\t\tstring | number,\n\t\t\tStaticCCValue | StaticCCValueFactory<InstanceType<Class>>\n\t\t> = Reflect.getMetadata(ccValue_METADATA, constr) ?? new Map();\n\n\t\t// Determine the correct metadata\n\t\tlet valueOrFactory:\n\t\t\t| StaticCCValue\n\t\t\t| StaticCCValueFactory<InstanceType<Class>>;\n\t\tif (args.length === 1) {\n\t\t\tvalueOrFactory = args[0];\n\t\t} else {\n\t\t\tconst [value, getArgs] = args;\n\t\t\tvalueOrFactory = (self: InstanceType<Class>) => {\n\t\t\t\tconst args = getArgs(self);\n\t\t\t\tconst base = value(...args);\n\t\t\t\treturn {\n\t\t\t\t\t...base,\n\t\t\t\t\tis: value.is,\n\t\t\t\t\toptions: value.options,\n\t\t\t\t};\n\t\t\t};\n\t\t}\n\n\t\t// Add the metadata\n\t\tmetadata.set(property as string | number, valueOrFactory);\n\n\t\t// And store it back\n\t\tReflect.defineMetadata(ccValue_METADATA, metadata, constr);\n\t};\n}\n\n/**\n * @publicAPI\n * Retrieves the defined mapping between properties and CC values of a Z-Wave command class instance\n */\nexport function getCCValueProperties<TTarget extends CommandClass>(\n\ttarget: TTarget,\n): ReadonlyMap<string | number, StaticCCValue | StaticCCValueFactory<TTarget>> {\n\treturn (\n\t\tReflect.getMetadata(ccValue_METADATA, target.constructor) ?? new Map()\n\t);\n}\n\n// const ccValueDecorator = createPropertyReflectionDecorator<\n// \tCommandClass,\n// \t[value: StaticCCValue | StaticCCValueFactory<CommandClass>],\n// \tStaticCCValue | StaticCCValueFactory<CommandClass>\n// >({\n// \tname: \"ccValue\",\n// \tvalueFromArgs: (valueDefinition) => valueDefinition,\n// });\n\n// /**\n// * @publicAPI\n// * Defines which CC value a Z-Wave command class property belongs to\n// */\n// export const ccValue = ccValueDecorator.decorator;\n\n// /**\n// * @publicAPI\n// * Retrieves the defined mapping between properties and CC values of a Z-Wave command class instance\n// */\n// export const getCCValueDefinitions = ccValueDecorator.lookupValues;\n\nconst supervisionDecorator = createValuelessReflectionDecorator<\n\ttypeof CommandClass\n>({\n\tname: \"useSupervision\",\n});\n\n/**\n * @publicAPI\n * Defines that this CC may be sent supervised\n */\nexport const useSupervision = supervisionDecorator.decorator;\n\n/**\n * @publicAPI\n * Checks if the given CC may be sent supervised\n */\nexport const shouldUseSupervision = supervisionDecorator.isDecorated;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBAIO;AACP,wBAIO;AAgBP,MAAM,4BAAwB,iDAK5B,EAAE,WAAW,QAAQ,SAAS,YAAW,CAAE;AAMtC,MAAM,eAAe,sBAAsB;AAM3C,MAAM,mBAAmB,sBAAsB;AAM/C,MAAM,YAAY,sBAAsB;AAMxC,MAAM,eAAe,sBAAsB;AAM3C,MAAM,0BACZ,sBAAsB;AAMjB,SAAU,sBACf,kBAA6C;AAG7C,QAAM,MAAM,sBAAsB,uBAAuB,gBAAgB;AACzE,MAAI,OAAO,QAAW;AACrB,UAAM,IAAI,uBACT,gCAAgC,iBAAiB,IAAI,KACrD,4BAAgB,UAAU;EAE5B;AACA,SAAO;AACR;AAZgB;AAchB,MAAM,mBAAe,6CA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AoB,iBAArB;;EAEf,sBAAsB;CACtB;AAMM,MAAM,WAAW,kBAAkB;AAMpC,SAAU,YACf,IAAiC;AAGjC,MAAI;AACJ,MAAI,OAAO,OAAO,UAAU;AAC3B,aAAS,iBAAiB,EAAE;EAC7B,OAAO;AACN,aAAS,GAAG;EACb;AAEA,MAAI;AAAQ,WAAO,kBAAkB,kBAAkB,MAAM;AAC9D;AAZgB;AAchB,MAAM,mBAAmB,OAAO,IAAI,kBAAkB;AAiFhD,SAAU,gBAIf,aACG,MAKC;AAEJ,SAAO,gCAAS,0BAA0B,QAAa;AAEtD,UAAM,WAGF,QAAQ,YAAY,kBAAkB,MAAM,KAAK,oBAAI,IAAG;AAG5D,QAAI;AAGJ,QAAI,KAAK,WAAW,GAAG;AACtB,uBAAiB,KAAK,CAAC;IACxB,OAAO;AACN,YAAM,CAAC,OAAO,OAAO,IAAI;AACzB,uBAAiB,wBAAC,SAA6B;AAC9C,cAAMA,QAAO,QAAQ,IAAI;AACzB,cAAM,OAAO,MAAM,GAAGA,KAAI;AAC1B,eAAO;UACN,GAAG;UACH,IAAI,MAAM;UACV,SAAS,MAAM;;MAEjB,GARiB;IASlB;AAGA,aAAS,IAAI,UAA6B,cAAc;AAGxD,YAAQ,eAAe,kBAAkB,UAAU,MAAM;EAC1D,GA/BO;AAgCR;AA5CgB;AAkDV,SAAU,qBACf,QAAe;AAEf,SACC,QAAQ,YAAY,kBAAkB,OAAO,WAAW,KAAK,oBAAI,IAAG;AAEtE;AANgB;AA6BhB,MAAM,2BAAuB,sDAE3B;EACD,MAAM;CACN;AAMM,MAAM,iBAAiB,qBAAqB;AAM5C,MAAM,uBAAuB,qBAAqB;",
6
6
  "names": ["args"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src_gen/lib/EncapsulatingCommandClass.ts"],
4
- "sourcesContent": ["import { isArray } from \"alcalzone-shared/typeguards\";\nimport { CommandClass } from \"./CommandClass.js\";\n\nexport type EncapsulatedCommandClass = CommandClass & {\n\tencapsulatingCC: EncapsulatingCommandClass;\n};\n\nexport type EncapsulatingCommandClass = CommandClass & {\n\tencapsulated: EncapsulatedCommandClass;\n};\n\n/**\n * Tests if a given CC statically implements the EncapsulatingCommandClassStatic interface\n * @param cc The command class instance to test\n */\nexport function isEncapsulatingCommandClass(\n\tcc: any,\n): cc is CommandClass & EncapsulatingCommandClass {\n\t// To satisfy the criterion, cc must be a CommandClass\n\tif (!(cc instanceof CommandClass)) return false;\n\t// The encapsulated property must be a CommandClass\n\tif (!((cc as any).encapsulated instanceof CommandClass)) {\n\t\treturn false;\n\t}\n\n\t// Walk up the static side of the prototype chain to see if it has the required methods\n\tlet proto: any = Object.getPrototypeOf(cc.constructor);\n\twhile (proto) {\n\t\tif (typeof proto.encapsulate === \"function\") {\n\t\t\treturn true;\n\t\t}\n\t\tproto = Object.getPrototypeOf(proto);\n\t}\n\treturn false;\n}\n\nexport function getInnermostCommandClass(cc: CommandClass): CommandClass {\n\tif (isEncapsulatingCommandClass(cc)) {\n\t\treturn getInnermostCommandClass(cc.encapsulated);\n\t} else {\n\t\treturn cc;\n\t}\n}\n\nexport interface MultiEncapsulatingCommandClass {\n\tencapsulated: EncapsulatedCommandClass[];\n}\n\n/**\n * Tests if a given CC statically implements the EncapsulatingCommandClassStatic interface\n * @param cc The command class instance to test\n */\nexport function isMultiEncapsulatingCommandClass(\n\tcc: any,\n): cc is CommandClass & MultiEncapsulatingCommandClass {\n\t// To satisfy the criterion, cc must be a CommandClass\n\tif (!(cc instanceof CommandClass)) return false;\n\t// The encapsulated property must array of CCs\n\tif (\n\t\t!(\n\t\t\tisArray((cc as any).encapsulated)\n\t\t\t&& (cc as any).encapsulated.every(\n\t\t\t\t(item: any) => item instanceof CommandClass,\n\t\t\t)\n\t\t)\n\t) {\n\t\treturn false;\n\t}\n\n\t// Walk up the static side of the prototype chain to see if it has the required methods\n\tlet proto: any = Object.getPrototypeOf(cc.constructor);\n\twhile (proto) {\n\t\tif (typeof proto.encapsulate === \"function\") {\n\t\t\treturn true;\n\t\t}\n\t\tproto = Object.getPrototypeOf(proto);\n\t}\n\treturn false;\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;AAAA,wBAAwB;AACxB,0BAA6B;AAcvB,SAAU,4BACf,IAAO;AAGP,MAAI,EAAE,cAAc;AAAe,WAAO;AAE1C,MAAI,EAAG,GAAW,wBAAwB,mCAAe;AACxD,WAAO;EACR;AAGA,MAAI,QAAa,OAAO,eAAe,GAAG,WAAW;AACrD,SAAO,OAAO;AACb,QAAI,OAAO,MAAM,gBAAgB,YAAY;AAC5C,aAAO;IACR;AACA,YAAQ,OAAO,eAAe,KAAK;EACpC;AACA,SAAO;AACR;AAnBgB;AAqBV,SAAU,yBAAyB,IAAgB;AACxD,MAAI,4BAA4B,EAAE,GAAG;AACpC,WAAO,yBAAyB,GAAG,YAAY;EAChD,OAAO;AACN,WAAO;EACR;AACD;AANgB;AAgBV,SAAU,iCACf,IAAO;AAGP,MAAI,EAAE,cAAc;AAAe,WAAO;AAE1C,MACC,MACC,2BAAS,GAAW,YAAY,KAC5B,GAAW,aAAa,MAC3B,CAAC,SAAc,gBAAgB,gCAAY,IAG5C;AACD,WAAO;EACR;AAGA,MAAI,QAAa,OAAO,eAAe,GAAG,WAAW;AACrD,SAAO,OAAO;AACb,QAAI,OAAO,MAAM,gBAAgB,YAAY;AAC5C,aAAO;IACR;AACA,YAAQ,OAAO,eAAe,KAAK;EACpC;AACA,SAAO;AACR;AA1BgB;",
4
+ "sourcesContent": ["import { isArray } from \"alcalzone-shared/typeguards\";\n\nimport { CommandClass } from \"./CommandClass.js\";\n\nexport type EncapsulatedCommandClass = CommandClass & {\n\tencapsulatingCC: EncapsulatingCommandClass;\n};\n\nexport type EncapsulatingCommandClass = CommandClass & {\n\tencapsulated: EncapsulatedCommandClass;\n};\n\n/**\n * Tests if a given CC statically implements the EncapsulatingCommandClassStatic interface\n * @param cc The command class instance to test\n */\nexport function isEncapsulatingCommandClass(\n\tcc: any,\n): cc is CommandClass & EncapsulatingCommandClass {\n\t// To satisfy the criterion, cc must be a CommandClass\n\tif (!(cc instanceof CommandClass)) return false;\n\t// The encapsulated property must be a CommandClass\n\tif (!((cc as any).encapsulated instanceof CommandClass)) {\n\t\treturn false;\n\t}\n\n\t// Walk up the static side of the prototype chain to see if it has the required methods\n\tlet proto: any = Object.getPrototypeOf(cc.constructor);\n\twhile (proto) {\n\t\tif (typeof proto.encapsulate === \"function\") {\n\t\t\treturn true;\n\t\t}\n\t\tproto = Object.getPrototypeOf(proto);\n\t}\n\treturn false;\n}\n\nexport function getInnermostCommandClass(cc: CommandClass): CommandClass {\n\tif (isEncapsulatingCommandClass(cc)) {\n\t\treturn getInnermostCommandClass(cc.encapsulated);\n\t} else {\n\t\treturn cc;\n\t}\n}\n\nexport interface MultiEncapsulatingCommandClass {\n\tencapsulated: EncapsulatedCommandClass[];\n}\n\n/**\n * Tests if a given CC statically implements the EncapsulatingCommandClassStatic interface\n * @param cc The command class instance to test\n */\nexport function isMultiEncapsulatingCommandClass(\n\tcc: any,\n): cc is CommandClass & MultiEncapsulatingCommandClass {\n\t// To satisfy the criterion, cc must be a CommandClass\n\tif (!(cc instanceof CommandClass)) return false;\n\t// The encapsulated property must array of CCs\n\tif (\n\t\t!(\n\t\t\tisArray((cc as any).encapsulated)\n\t\t\t&& (cc as any).encapsulated.every(\n\t\t\t\t(item: any) => item instanceof CommandClass,\n\t\t\t)\n\t\t)\n\t) {\n\t\treturn false;\n\t}\n\n\t// Walk up the static side of the prototype chain to see if it has the required methods\n\tlet proto: any = Object.getPrototypeOf(cc.constructor);\n\twhile (proto) {\n\t\tif (typeof proto.encapsulate === \"function\") {\n\t\t\treturn true;\n\t\t}\n\t\tproto = Object.getPrototypeOf(proto);\n\t}\n\treturn false;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;AAAA,wBAAwB;AAExB,0BAA6B;AAcvB,SAAU,4BACf,IAAO;AAGP,MAAI,EAAE,cAAc;AAAe,WAAO;AAE1C,MAAI,EAAG,GAAW,wBAAwB,mCAAe;AACxD,WAAO;EACR;AAGA,MAAI,QAAa,OAAO,eAAe,GAAG,WAAW;AACrD,SAAO,OAAO;AACb,QAAI,OAAO,MAAM,gBAAgB,YAAY;AAC5C,aAAO;IACR;AACA,YAAQ,OAAO,eAAe,KAAK;EACpC;AACA,SAAO;AACR;AAnBgB;AAqBV,SAAU,yBAAyB,IAAgB;AACxD,MAAI,4BAA4B,EAAE,GAAG;AACpC,WAAO,yBAAyB,GAAG,YAAY;EAChD,OAAO;AACN,WAAO;EACR;AACD;AANgB;AAgBV,SAAU,iCACf,IAAO;AAGP,MAAI,EAAE,cAAc;AAAe,WAAO;AAE1C,MACC,MACC,2BAAS,GAAW,YAAY,KAC5B,GAAW,aAAa,MAC3B,CAAC,SAAc,gBAAgB,gCAAY,IAG5C;AACD,WAAO;EACR;AAGA,MAAI,QAAa,OAAO,eAAe,GAAG,WAAW;AACrD,SAAO,OAAO;AACb,QAAI,OAAO,MAAM,gBAAgB,YAAY;AAC5C,aAAO;IACR;AACA,YAAQ,OAAO,eAAe,KAAK;EACpC;AACA,SAAO;AACR;AA1BgB;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src_gen/lib/NotificationEventPayload.ts"],
4
- "sourcesContent": ["import type { Duration } from \"@zwave-js/core\";\nimport type { BytesView } from \"@zwave-js/shared\";\nimport type { CommandClass } from \"./CommandClass.js\";\n\nexport interface NotificationEventPayload {\n\ttoNotificationEventParameters():\n\t\t| BytesView\n\t\t| Duration\n\t\t| Record<string, number>;\n}\n\n/**\n * Tests if the given message contains a CC\n */\nexport function isNotificationEventPayload<T extends CommandClass>(\n\tmsg: T,\n): msg is T & NotificationEventPayload {\n\treturn typeof (msg as any).toNotificationEventParameters === \"function\";\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAWA;;;;;AAGM,SAAU,2BACf,KAAM;AAEN,SAAO,OAAQ,IAAY,kCAAkC;AAC9D;AAJgB;",
4
+ "sourcesContent": ["import type { Duration } from \"@zwave-js/core\";\nimport type { BytesView } from \"@zwave-js/shared\";\n\nimport type { CommandClass } from \"./CommandClass.js\";\n\nexport interface NotificationEventPayload {\n\ttoNotificationEventParameters():\n\t\t| BytesView\n\t\t| Duration\n\t\t| Record<string, number>;\n}\n\n/**\n * Tests if the given message contains a CC\n */\nexport function isNotificationEventPayload<T extends CommandClass>(\n\tmsg: T,\n): msg is T & NotificationEventPayload {\n\treturn typeof (msg as any).toNotificationEventParameters === \"function\";\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAYA;;;;;AAGM,SAAU,2BACf,KAAM;AAEN,SAAO,OAAQ,IAAY,kCAAkC;AAC9D;AAJgB;",
6
6
  "names": []
7
7
  }
@@ -296,10 +296,7 @@ let MPANExtension = (() => {
296
296
  }
297
297
  static expectedLength = 19;
298
298
  serialize(moreToFollow) {
299
- this.payload = import_shared.Bytes.concat([
300
- [this.groupId],
301
- this.innerMPANState
302
- ]);
299
+ this.payload = import_shared.Bytes.concat([[this.groupId], this.innerMPANState]);
303
300
  return super.serialize(moreToFollow);
304
301
  }
305
302
  toLogEntryDict() {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src_gen/lib/Security2/Extension.ts"],
4
- "sourcesContent": ["import {\n\ttype LogPayloadText,\n\ttype MessageRecord,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tlogBuffer,\n\tlogDict,\n\tlogText,\n\tvalidatePayload,\n} from \"@zwave-js/core\";\nimport { createSimpleReflectionDecorator } from \"@zwave-js/core/reflection\";\nimport {\n\tBytes,\n\ttype BytesView,\n\tbuffer2hex,\n\tgetEnumMemberName,\n\tgetenv,\n} from \"@zwave-js/shared\";\n\nenum S2ExtensionType {\n\tSPAN = 0x01,\n\tMPAN = 0x02,\n\tMGRP = 0x03,\n\tMOS = 0x04,\n}\n\nconst extensionTypeDecorator = createSimpleReflectionDecorator<\n\ttypeof Security2Extension,\n\t[type: S2ExtensionType],\n\tSecurity2ExtensionConstructor<Security2Extension>\n>({\n\tname: \"extensionType\",\n});\n\n/** Defines which S2 extension type a subclass of S2Extension has */\nexport const extensionType = extensionTypeDecorator.decorator;\n\n/** Returns which S2 extension type a subclass of S2Extension has */\nexport const getExtensionType = extensionTypeDecorator.lookupValue;\n\n/**\n * Looks up the S2 extension constructor for a given S2 extension type\n */\nexport const getS2ExtensionConstructor =\n\textensionTypeDecorator.lookupConstructor;\n\nexport type Security2ExtensionConstructor<T extends Security2Extension> =\n\t& typeof Security2Extension\n\t& {\n\t\tnew (options: Security2ExtensionOptions): T;\n\t};\n\nexport enum ValidateS2ExtensionResult {\n\tOK,\n\tDiscardExtension,\n\tDiscardCommand,\n}\n\n/** Tests if the extension may be accepted */\nexport function validateS2Extension(\n\text: Security2Extension,\n\twasEncrypted: boolean,\n): ValidateS2ExtensionResult {\n\tif (ext instanceof InvalidExtension) {\n\t\t// The extension could not be parsed, ignore it\n\t\treturn ValidateS2ExtensionResult.DiscardExtension;\n\t}\n\n\tif (ext.critical && !(ext.type in S2ExtensionType)) {\n\t\t// A receiving node MUST discard the entire command if the Critical flag\n\t\t// is set to \u20181\u2019 and the Type field advertises a value that the\n\t\t// receiving node does not support.\n\t\treturn ValidateS2ExtensionResult.DiscardCommand;\n\t}\n\n\t// Check if the extension is correctly encrypted or not encrypted\n\tswitch (ext.type) {\n\t\tcase S2ExtensionType.MPAN:\n\t\t\tif (!wasEncrypted) {\n\t\t\t\treturn ValidateS2ExtensionResult.DiscardExtension;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase S2ExtensionType.SPAN:\n\t\tcase S2ExtensionType.MGRP:\n\t\tcase S2ExtensionType.MOS:\n\t\t\tif (wasEncrypted) {\n\t\t\t\treturn ValidateS2ExtensionResult.DiscardExtension;\n\t\t\t}\n\t\t\tbreak;\n\t}\n\n\treturn ValidateS2ExtensionResult.OK;\n}\n\nexport class Security2ExtensionRaw {\n\tpublic constructor(\n\t\tpublic type: S2ExtensionType,\n\t\tpublic critical: boolean,\n\t\tpublic readonly moreToFollow: boolean,\n\t\tpublic payload: BytesView,\n\t) {}\n\n\tpublic static parse(data: BytesView): Security2ExtensionRaw {\n\t\tvalidatePayload(data.length >= 2);\n\t\tconst totalLength = data[0];\n\t\tconst moreToFollow = !!(data[1] & 0b1000_0000);\n\t\tconst critical = !!(data[1] & 0b0100_0000);\n\t\tconst type = data[1] & 0b11_1111;\n\t\tconst payload = data.subarray(2, totalLength);\n\n\t\treturn new Security2ExtensionRaw(type, critical, moreToFollow, payload);\n\t}\n\n\tpublic withPayload(payload: Bytes): Security2ExtensionRaw {\n\t\treturn new Security2ExtensionRaw(\n\t\t\tthis.type,\n\t\t\tthis.critical,\n\t\t\tthis.moreToFollow,\n\t\t\tpayload,\n\t\t);\n\t}\n}\n\ninterface Security2ExtensionBaseOptions {\n\tcritical?: boolean;\n\tmoreToFollow?: boolean;\n}\n\ninterface Security2ExtensionOptions extends Security2ExtensionBaseOptions {\n\ttype?: S2ExtensionType;\n\tpayload?: BytesView;\n}\n\nexport class Security2Extension {\n\tpublic constructor(options: Security2ExtensionOptions) {\n\t\tconst {\n\t\t\t// Try to determine the extension type if none is given\n\t\t\ttype = getExtensionType(this),\n\t\t\tcritical = false,\n\t\t\tmoreToFollow = false,\n\t\t\tpayload = new Uint8Array(),\n\t\t} = options;\n\n\t\tif (type == undefined) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t\"A Security2Extension must have a given or predefined extension type\",\n\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t);\n\t\t}\n\n\t\tthis.type = type;\n\t\tthis.critical = critical;\n\t\tthis.moreToFollow = moreToFollow;\n\t\tthis.payload = payload;\n\t}\n\n\tpublic static parse(\n\t\tdata: BytesView,\n\t): Security2Extension {\n\t\tconst raw = Security2ExtensionRaw.parse(data);\n\t\tconst Constructor = getS2ExtensionConstructor(raw.type)\n\t\t\t?? Security2Extension;\n\t\treturn Constructor.from(raw);\n\t}\n\n\t/** Creates an instance of the message that is serialized in the given buffer */\n\tpublic static from(\n\t\traw: Security2ExtensionRaw,\n\t): Security2Extension {\n\t\treturn new this({\n\t\t\ttype: raw.type,\n\t\t\tcritical: raw.critical,\n\t\t\tmoreToFollow: raw.moreToFollow,\n\t\t\tpayload: raw.payload,\n\t\t});\n\t}\n\n\tpublic type: S2ExtensionType;\n\tpublic critical: boolean;\n\tpublic readonly moreToFollow?: boolean;\n\tpublic payload: BytesView;\n\n\tpublic isEncrypted(): boolean {\n\t\treturn false;\n\t}\n\n\tpublic serialize(moreToFollow: boolean): Bytes {\n\t\treturn Bytes.concat([\n\t\t\t[\n\t\t\t\t2 + this.payload.length,\n\t\t\t\t(moreToFollow ? 0b1000_0000 : 0)\n\t\t\t\t| (this.critical ? 0b0100_0000 : 0)\n\t\t\t\t| (this.type & 0b11_1111),\n\t\t\t],\n\t\t\tthis.payload,\n\t\t]);\n\t}\n\n\t/** Returns the number of bytes the first extension in the buffer occupies */\n\tpublic static getExtensionLength(\n\t\tdata: BytesView,\n\t): { expected?: number; actual: number } {\n\t\tconst actual = data[0];\n\t\tlet expected: number | undefined;\n\n\t\t// For known extensions, return the expected length\n\t\tconst type = data[1] & 0b11_1111;\n\t\tswitch (type) {\n\t\t\tcase S2ExtensionType.SPAN:\n\t\t\t\texpected = SPANExtension.expectedLength;\n\t\t\t\tbreak;\n\t\t\tcase S2ExtensionType.MPAN:\n\t\t\t\texpected = MPANExtension.expectedLength;\n\t\t\t\tbreak;\n\t\t\tcase S2ExtensionType.MGRP:\n\t\t\t\texpected = MGRPExtension.expectedLength;\n\t\t\t\tbreak;\n\t\t\tcase S2ExtensionType.MOS:\n\t\t\t\texpected = MOSExtension.expectedLength;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn { expected, actual };\n\t}\n\n\t/** Returns the number of bytes the serialized extension will occupy */\n\tpublic computeLength(): number {\n\t\treturn 2 + this.payload.length;\n\t}\n\n\tpublic toLogEntry(): LogPayloadText {\n\t\treturn logText([], {\n\t\t\ttags: [getEnumMemberName(S2ExtensionType, this.type)],\n\t\t\tnested: logDict(this.toLogEntryDict()),\n\t\t});\n\t}\n\n\tprotected toLogEntryDict(): MessageRecord {\n\t\treturn {\n\t\t\tpayload: logBuffer(this.payload),\n\t\t};\n\t}\n}\n\nexport class InvalidExtension extends Security2Extension {\n}\n\ninterface SPANExtensionOptions {\n\tsenderEI: BytesView;\n}\n\n@extensionType(S2ExtensionType.SPAN)\nexport class SPANExtension extends Security2Extension {\n\tpublic constructor(\n\t\toptions: SPANExtensionOptions & Security2ExtensionBaseOptions,\n\t) {\n\t\tif (options.senderEI.length !== 16) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t\"The sender's entropy must be a 16-byte buffer!\",\n\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t);\n\t\t}\n\t\tsuper({ critical: true, ...options });\n\t\tthis.senderEI = options.senderEI;\n\t}\n\n\tpublic static from(raw: Security2ExtensionRaw): Security2Extension {\n\t\tvalidatePayload(raw.payload.length === 16);\n\t\tconst senderEI = raw.payload;\n\n\t\treturn new SPANExtension({\n\t\t\tcritical: raw.critical,\n\t\t\tmoreToFollow: raw.moreToFollow,\n\t\t\tsenderEI,\n\t\t});\n\t}\n\n\tpublic senderEI: BytesView;\n\tpublic static readonly expectedLength = 18;\n\n\tpublic serialize(moreToFollow: boolean): Bytes {\n\t\tthis.payload = this.senderEI;\n\t\treturn super.serialize(moreToFollow);\n\t}\n\n\tprotected toLogEntryDict(): MessageRecord {\n\t\treturn {\n\t\t\t\"sender EI\": buffer2hex(this.senderEI),\n\t\t};\n\t}\n}\n\ninterface MPANExtensionOptions {\n\tgroupId: number;\n\tinnerMPANState: BytesView;\n}\n\n@extensionType(S2ExtensionType.MPAN)\nexport class MPANExtension extends Security2Extension {\n\tpublic constructor(\n\t\toptions: MPANExtensionOptions & Security2ExtensionBaseOptions,\n\t) {\n\t\tif (options.innerMPANState.length !== 16) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t\"The inner MPAN state must be a 16-byte buffer!\",\n\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t);\n\t\t}\n\t\tsuper({ critical: true, ...options });\n\t\tthis.groupId = options.groupId;\n\t\tthis.innerMPANState = options.innerMPANState;\n\t}\n\n\tpublic static from(raw: Security2ExtensionRaw): Security2Extension {\n\t\tvalidatePayload(raw.payload.length === 17);\n\t\tconst groupId = raw.payload[0];\n\t\tconst innerMPANState = raw.payload.subarray(1);\n\n\t\treturn new MPANExtension({\n\t\t\tcritical: raw.critical,\n\t\t\tmoreToFollow: raw.moreToFollow,\n\t\t\tgroupId,\n\t\t\tinnerMPANState,\n\t\t});\n\t}\n\n\tpublic groupId: number;\n\tpublic innerMPANState: BytesView;\n\n\tpublic isEncrypted(): boolean {\n\t\treturn true;\n\t}\n\n\tpublic static readonly expectedLength = 19;\n\n\tpublic serialize(moreToFollow: boolean): Bytes {\n\t\tthis.payload = Bytes.concat([\n\t\t\t[this.groupId],\n\t\t\tthis.innerMPANState,\n\t\t]);\n\t\treturn super.serialize(moreToFollow);\n\t}\n\n\tprotected toLogEntryDict(): MessageRecord {\n\t\tconst mpanState = getenv(\"NODE_ENV\") === \"test\"\n\t\t\t\t|| getenv(\"NODE_ENV\") === \"development\"\n\t\t\t? buffer2hex(this.innerMPANState)\n\t\t\t: \"(hidden)\";\n\t\treturn {\n\t\t\t\"group ID\": this.groupId,\n\t\t\t\"MPAN state\": mpanState,\n\t\t};\n\t}\n}\n\ninterface MGRPExtensionOptions {\n\tgroupId: number;\n}\n\n@extensionType(S2ExtensionType.MGRP)\nexport class MGRPExtension extends Security2Extension {\n\tpublic constructor(\n\t\toptions: MGRPExtensionOptions & Security2ExtensionBaseOptions,\n\t) {\n\t\tsuper({ critical: true, ...options });\n\t\tthis.groupId = options.groupId;\n\t}\n\n\tpublic static from(raw: Security2ExtensionRaw): Security2Extension {\n\t\tvalidatePayload(raw.payload.length === 1);\n\t\tconst groupId = raw.payload[0];\n\n\t\treturn new MGRPExtension({\n\t\t\tcritical: raw.critical,\n\t\t\tmoreToFollow: raw.moreToFollow,\n\t\t\tgroupId,\n\t\t});\n\t}\n\n\tpublic groupId: number;\n\n\tpublic static readonly expectedLength = 3;\n\n\tpublic serialize(moreToFollow: boolean): Bytes {\n\t\tthis.payload = Bytes.from([this.groupId]);\n\t\treturn super.serialize(moreToFollow);\n\t}\n\n\tprotected toLogEntryDict(): MessageRecord {\n\t\treturn {\n\t\t\t\"group ID\": this.groupId,\n\t\t};\n\t}\n}\n\n@extensionType(S2ExtensionType.MOS)\nexport class MOSExtension extends Security2Extension {\n\tpublic constructor(options: Security2ExtensionBaseOptions = {}) {\n\t\tsuper({ critical: false, ...options });\n\t}\n\n\tpublic static readonly expectedLength = 2;\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBASO;AACP,wBAAgD;AAChD,oBAMO;AAEP,IAAK;CAAL,SAAKA,kBAAe;AACnB,EAAAA,iBAAAA,iBAAA,MAAA,IAAA,CAAA,IAAA;AACA,EAAAA,iBAAAA,iBAAA,MAAA,IAAA,CAAA,IAAA;AACA,EAAAA,iBAAAA,iBAAA,MAAA,IAAA,CAAA,IAAA;AACA,EAAAA,iBAAAA,iBAAA,KAAA,IAAA,CAAA,IAAA;AACD,GALK,oBAAA,kBAAe,CAAA,EAAA;AAOpB,MAAM,6BAAyB,mDAI7B;EACD,MAAM;CACN;AAGM,MAAM,gBAAgB,uBAAuB;AAG7C,MAAM,mBAAmB,uBAAuB;AAKhD,MAAM,4BACZ,uBAAuB;AAQxB,IAAY;CAAZ,SAAYC,4BAAyB;AACpC,EAAAA,2BAAAA,2BAAA,IAAA,IAAA,CAAA,IAAA;AACA,EAAAA,2BAAAA,2BAAA,kBAAA,IAAA,CA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,UAAU,YAAY;IACpC;IAEU,iBAAc;AACvB,aAAO;QACN,YAAY,KAAK;;IAEnB;;AAhCY,0CAAA,YAAA,uBAAA;;;;;IAoCA,gBAAY,MAAA;0BADxB,cAAc,gBAAgB,GAAG,CAAC;;;;oBACD;oCAAA,YAAkB;WAAA;;;;;;;;AAApD,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;;IACC,YAAmB,UAAyC,CAAA,GAAE;AAC7D,YAAM,EAAE,UAAU,OAAO,GAAG,QAAO,CAAE;IACtC;IAEO,OAAgB,iBAAiB;;AAL5B,0CAAA,YAAA,uBAAA;;;;;",
4
+ "sourcesContent": ["import {\n\ttype LogPayloadText,\n\ttype MessageRecord,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tlogBuffer,\n\tlogDict,\n\tlogText,\n\tvalidatePayload,\n} from \"@zwave-js/core\";\nimport { createSimpleReflectionDecorator } from \"@zwave-js/core/reflection\";\nimport {\n\tBytes,\n\ttype BytesView,\n\tbuffer2hex,\n\tgetEnumMemberName,\n\tgetenv,\n} from \"@zwave-js/shared\";\n\nenum S2ExtensionType {\n\tSPAN = 0x01,\n\tMPAN = 0x02,\n\tMGRP = 0x03,\n\tMOS = 0x04,\n}\n\nconst extensionTypeDecorator = createSimpleReflectionDecorator<\n\ttypeof Security2Extension,\n\t[type: S2ExtensionType],\n\tSecurity2ExtensionConstructor<Security2Extension>\n>({\n\tname: \"extensionType\",\n});\n\n/** Defines which S2 extension type a subclass of S2Extension has */\nexport const extensionType = extensionTypeDecorator.decorator;\n\n/** Returns which S2 extension type a subclass of S2Extension has */\nexport const getExtensionType = extensionTypeDecorator.lookupValue;\n\n/**\n * Looks up the S2 extension constructor for a given S2 extension type\n */\nexport const getS2ExtensionConstructor =\n\textensionTypeDecorator.lookupConstructor;\n\nexport type Security2ExtensionConstructor<T extends Security2Extension> =\n\ttypeof Security2Extension & {\n\t\tnew (options: Security2ExtensionOptions): T;\n\t};\n\nexport enum ValidateS2ExtensionResult {\n\tOK,\n\tDiscardExtension,\n\tDiscardCommand,\n}\n\n/** Tests if the extension may be accepted */\nexport function validateS2Extension(\n\text: Security2Extension,\n\twasEncrypted: boolean,\n): ValidateS2ExtensionResult {\n\tif (ext instanceof InvalidExtension) {\n\t\t// The extension could not be parsed, ignore it\n\t\treturn ValidateS2ExtensionResult.DiscardExtension;\n\t}\n\n\tif (ext.critical && !(ext.type in S2ExtensionType)) {\n\t\t// A receiving node MUST discard the entire command if the Critical flag\n\t\t// is set to \u20181\u2019 and the Type field advertises a value that the\n\t\t// receiving node does not support.\n\t\treturn ValidateS2ExtensionResult.DiscardCommand;\n\t}\n\n\t// Check if the extension is correctly encrypted or not encrypted\n\tswitch (ext.type) {\n\t\tcase S2ExtensionType.MPAN:\n\t\t\tif (!wasEncrypted) {\n\t\t\t\treturn ValidateS2ExtensionResult.DiscardExtension;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase S2ExtensionType.SPAN:\n\t\tcase S2ExtensionType.MGRP:\n\t\tcase S2ExtensionType.MOS:\n\t\t\tif (wasEncrypted) {\n\t\t\t\treturn ValidateS2ExtensionResult.DiscardExtension;\n\t\t\t}\n\t\t\tbreak;\n\t}\n\n\treturn ValidateS2ExtensionResult.OK;\n}\n\nexport class Security2ExtensionRaw {\n\tpublic constructor(\n\t\tpublic type: S2ExtensionType,\n\t\tpublic critical: boolean,\n\t\tpublic readonly moreToFollow: boolean,\n\t\tpublic payload: BytesView,\n\t) {}\n\n\tpublic static parse(data: BytesView): Security2ExtensionRaw {\n\t\tvalidatePayload(data.length >= 2);\n\t\tconst totalLength = data[0];\n\t\tconst moreToFollow = !!(data[1] & 0b1000_0000);\n\t\tconst critical = !!(data[1] & 0b0100_0000);\n\t\tconst type = data[1] & 0b11_1111;\n\t\tconst payload = data.subarray(2, totalLength);\n\n\t\treturn new Security2ExtensionRaw(type, critical, moreToFollow, payload);\n\t}\n\n\tpublic withPayload(payload: Bytes): Security2ExtensionRaw {\n\t\treturn new Security2ExtensionRaw(\n\t\t\tthis.type,\n\t\t\tthis.critical,\n\t\t\tthis.moreToFollow,\n\t\t\tpayload,\n\t\t);\n\t}\n}\n\ninterface Security2ExtensionBaseOptions {\n\tcritical?: boolean;\n\tmoreToFollow?: boolean;\n}\n\ninterface Security2ExtensionOptions extends Security2ExtensionBaseOptions {\n\ttype?: S2ExtensionType;\n\tpayload?: BytesView;\n}\n\nexport class Security2Extension {\n\tpublic constructor(options: Security2ExtensionOptions) {\n\t\tconst {\n\t\t\t// Try to determine the extension type if none is given\n\t\t\ttype = getExtensionType(this),\n\t\t\tcritical = false,\n\t\t\tmoreToFollow = false,\n\t\t\tpayload = new Uint8Array(),\n\t\t} = options;\n\n\t\tif (type == undefined) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t\"A Security2Extension must have a given or predefined extension type\",\n\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t);\n\t\t}\n\n\t\tthis.type = type;\n\t\tthis.critical = critical;\n\t\tthis.moreToFollow = moreToFollow;\n\t\tthis.payload = payload;\n\t}\n\n\tpublic static parse(data: BytesView): Security2Extension {\n\t\tconst raw = Security2ExtensionRaw.parse(data);\n\t\tconst Constructor =\n\t\t\tgetS2ExtensionConstructor(raw.type) ?? Security2Extension;\n\t\treturn Constructor.from(raw);\n\t}\n\n\t/** Creates an instance of the message that is serialized in the given buffer */\n\tpublic static from(raw: Security2ExtensionRaw): Security2Extension {\n\t\treturn new this({\n\t\t\ttype: raw.type,\n\t\t\tcritical: raw.critical,\n\t\t\tmoreToFollow: raw.moreToFollow,\n\t\t\tpayload: raw.payload,\n\t\t});\n\t}\n\n\tpublic type: S2ExtensionType;\n\tpublic critical: boolean;\n\tpublic readonly moreToFollow?: boolean;\n\tpublic payload: BytesView;\n\n\tpublic isEncrypted(): boolean {\n\t\treturn false;\n\t}\n\n\tpublic serialize(moreToFollow: boolean): Bytes {\n\t\treturn Bytes.concat([\n\t\t\t[\n\t\t\t\t2 + this.payload.length,\n\t\t\t\t(moreToFollow ? 0b1000_0000 : 0)\n\t\t\t\t\t| (this.critical ? 0b0100_0000 : 0)\n\t\t\t\t\t| (this.type & 0b11_1111),\n\t\t\t],\n\t\t\tthis.payload,\n\t\t]);\n\t}\n\n\t/** Returns the number of bytes the first extension in the buffer occupies */\n\tpublic static getExtensionLength(data: BytesView): {\n\t\texpected?: number;\n\t\tactual: number;\n\t} {\n\t\tconst actual = data[0];\n\t\tlet expected: number | undefined;\n\n\t\t// For known extensions, return the expected length\n\t\tconst type = data[1] & 0b11_1111;\n\t\tswitch (type) {\n\t\t\tcase S2ExtensionType.SPAN:\n\t\t\t\texpected = SPANExtension.expectedLength;\n\t\t\t\tbreak;\n\t\t\tcase S2ExtensionType.MPAN:\n\t\t\t\texpected = MPANExtension.expectedLength;\n\t\t\t\tbreak;\n\t\t\tcase S2ExtensionType.MGRP:\n\t\t\t\texpected = MGRPExtension.expectedLength;\n\t\t\t\tbreak;\n\t\t\tcase S2ExtensionType.MOS:\n\t\t\t\texpected = MOSExtension.expectedLength;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn { expected, actual };\n\t}\n\n\t/** Returns the number of bytes the serialized extension will occupy */\n\tpublic computeLength(): number {\n\t\treturn 2 + this.payload.length;\n\t}\n\n\tpublic toLogEntry(): LogPayloadText {\n\t\treturn logText([], {\n\t\t\ttags: [getEnumMemberName(S2ExtensionType, this.type)],\n\t\t\tnested: logDict(this.toLogEntryDict()),\n\t\t});\n\t}\n\n\tprotected toLogEntryDict(): MessageRecord {\n\t\treturn {\n\t\t\tpayload: logBuffer(this.payload),\n\t\t};\n\t}\n}\n\nexport class InvalidExtension extends Security2Extension {}\n\ninterface SPANExtensionOptions {\n\tsenderEI: BytesView;\n}\n\n@extensionType(S2ExtensionType.SPAN)\nexport class SPANExtension extends Security2Extension {\n\tpublic constructor(\n\t\toptions: SPANExtensionOptions & Security2ExtensionBaseOptions,\n\t) {\n\t\tif (options.senderEI.length !== 16) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t\"The sender's entropy must be a 16-byte buffer!\",\n\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t);\n\t\t}\n\t\tsuper({ critical: true, ...options });\n\t\tthis.senderEI = options.senderEI;\n\t}\n\n\tpublic static from(raw: Security2ExtensionRaw): Security2Extension {\n\t\tvalidatePayload(raw.payload.length === 16);\n\t\tconst senderEI = raw.payload;\n\n\t\treturn new SPANExtension({\n\t\t\tcritical: raw.critical,\n\t\t\tmoreToFollow: raw.moreToFollow,\n\t\t\tsenderEI,\n\t\t});\n\t}\n\n\tpublic senderEI: BytesView;\n\tpublic static readonly expectedLength = 18;\n\n\tpublic serialize(moreToFollow: boolean): Bytes {\n\t\tthis.payload = this.senderEI;\n\t\treturn super.serialize(moreToFollow);\n\t}\n\n\tprotected toLogEntryDict(): MessageRecord {\n\t\treturn {\n\t\t\t\"sender EI\": buffer2hex(this.senderEI),\n\t\t};\n\t}\n}\n\ninterface MPANExtensionOptions {\n\tgroupId: number;\n\tinnerMPANState: BytesView;\n}\n\n@extensionType(S2ExtensionType.MPAN)\nexport class MPANExtension extends Security2Extension {\n\tpublic constructor(\n\t\toptions: MPANExtensionOptions & Security2ExtensionBaseOptions,\n\t) {\n\t\tif (options.innerMPANState.length !== 16) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t\"The inner MPAN state must be a 16-byte buffer!\",\n\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t);\n\t\t}\n\t\tsuper({ critical: true, ...options });\n\t\tthis.groupId = options.groupId;\n\t\tthis.innerMPANState = options.innerMPANState;\n\t}\n\n\tpublic static from(raw: Security2ExtensionRaw): Security2Extension {\n\t\tvalidatePayload(raw.payload.length === 17);\n\t\tconst groupId = raw.payload[0];\n\t\tconst innerMPANState = raw.payload.subarray(1);\n\n\t\treturn new MPANExtension({\n\t\t\tcritical: raw.critical,\n\t\t\tmoreToFollow: raw.moreToFollow,\n\t\t\tgroupId,\n\t\t\tinnerMPANState,\n\t\t});\n\t}\n\n\tpublic groupId: number;\n\tpublic innerMPANState: BytesView;\n\n\tpublic isEncrypted(): boolean {\n\t\treturn true;\n\t}\n\n\tpublic static readonly expectedLength = 19;\n\n\tpublic serialize(moreToFollow: boolean): Bytes {\n\t\tthis.payload = Bytes.concat([[this.groupId], this.innerMPANState]);\n\t\treturn super.serialize(moreToFollow);\n\t}\n\n\tprotected toLogEntryDict(): MessageRecord {\n\t\tconst mpanState =\n\t\t\tgetenv(\"NODE_ENV\") === \"test\"\n\t\t\t|| getenv(\"NODE_ENV\") === \"development\"\n\t\t\t\t? buffer2hex(this.innerMPANState)\n\t\t\t\t: \"(hidden)\";\n\t\treturn {\n\t\t\t\"group ID\": this.groupId,\n\t\t\t\"MPAN state\": mpanState,\n\t\t};\n\t}\n}\n\ninterface MGRPExtensionOptions {\n\tgroupId: number;\n}\n\n@extensionType(S2ExtensionType.MGRP)\nexport class MGRPExtension extends Security2Extension {\n\tpublic constructor(\n\t\toptions: MGRPExtensionOptions & Security2ExtensionBaseOptions,\n\t) {\n\t\tsuper({ critical: true, ...options });\n\t\tthis.groupId = options.groupId;\n\t}\n\n\tpublic static from(raw: Security2ExtensionRaw): Security2Extension {\n\t\tvalidatePayload(raw.payload.length === 1);\n\t\tconst groupId = raw.payload[0];\n\n\t\treturn new MGRPExtension({\n\t\t\tcritical: raw.critical,\n\t\t\tmoreToFollow: raw.moreToFollow,\n\t\t\tgroupId,\n\t\t});\n\t}\n\n\tpublic groupId: number;\n\n\tpublic static readonly expectedLength = 3;\n\n\tpublic serialize(moreToFollow: boolean): Bytes {\n\t\tthis.payload = Bytes.from([this.groupId]);\n\t\treturn super.serialize(moreToFollow);\n\t}\n\n\tprotected toLogEntryDict(): MessageRecord {\n\t\treturn {\n\t\t\t\"group ID\": this.groupId,\n\t\t};\n\t}\n}\n\n@extensionType(S2ExtensionType.MOS)\nexport class MOSExtension extends Security2Extension {\n\tpublic constructor(options: Security2ExtensionBaseOptions = {}) {\n\t\tsuper({ critical: false, ...options });\n\t}\n\n\tpublic static readonly expectedLength = 2;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBASO;AACP,wBAAgD;AAChD,oBAMO;AAEP,IAAK;CAAL,SAAKA,kBAAe;AACnB,EAAAA,iBAAAA,iBAAA,MAAA,IAAA,CAAA,IAAA;AACA,EAAAA,iBAAAA,iBAAA,MAAA,IAAA,CAAA,IAAA;AACA,EAAAA,iBAAAA,iBAAA,MAAA,IAAA,CAAA,IAAA;AACA,EAAAA,iBAAAA,iBAAA,KAAA,IAAA,CAAA,IAAA;AACD,GALK,oBAAA,kBAAe,CAAA,EAAA;AAOpB,MAAM,6BAAyB,mDAI7B;EACD,MAAM;CACN;AAGM,MAAM,gBAAgB,uBAAuB;AAG7C,MAAM,mBAAmB,uBAAuB;AAKhD,MAAM,4BACZ,uBAAuB;AAOxB,IAAY;CAAZ,SAAYC,4BAAyB;AACpC,EAAAA,2BAAAA,2BAAA,IAAA,IAAA,CAAA,IAAA;AACA,EAAAA,2BAAAA,2BAAA,kBAAA,IAAA,CAAA,IAAA;AACA,EAAAA,2BAAAA,2BAAA,gBAAA,IAAA,CAAA,IAAA;AACD,GAJY,8BAAA,4BAAyB,CAAA,EAAA;AAO/B,SAAU,oBACf,KACA,cAAqB;AAErB,MAAI,eAAe,kBAAkB;AAEpC,WAAO,0BAA0B;EAClC;AAEA,MAAI,IAAI,YAAY,EAAE,IAAI,QAAQ,kBAAkB;AAInD,WAAO,0BAA0B;EAClC;AAGA,UAAQ,IAAI,MAAM;IACjB,KAAK,gBAAgB;AACpB,UAAI,CAAC,cAAc;AAClB,eAAO,0BAA0B;MAClC;AACA;IACD,KAAK,gBAAgB;IACrB,KAAK,gBAAgB;IACrB,KAAK,gBAAgB;AACpB,UAAI,cAAc;AACjB,eAAO,0BAA0B;MAClC;A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;;;;;",
6
6
  "names": ["S2ExtensionType", "ValidateS2ExtensionResult", "SPANExtension", "MPANExtension", "MGRPExtension"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src_gen/lib/Security2/shared.ts"],
4
- "sourcesContent": ["/** @publicAPI */\nexport enum KEXSchemes {\n\tKEXScheme1 = 1,\n}\n\n/** @publicAPI */\nexport enum ECDHProfiles {\n\tCurve25519 = 0,\n}\n\n/** @publicAPI */\nexport enum KEXFailType {\n\tNoKeyMatch = 0x01, // KEX_KEY\n\tNoSupportedScheme = 0x02, // KEX_SCHEME\n\tNoSupportedCurve = 0x03, // KEX_CURVES\n\tDecrypt = 0x05,\n\tBootstrappingCanceled = 0x06, // CANCEL\n\tWrongSecurityLevel = 0x07, // AUTH\n\tKeyNotGranted = 0x08, // GET\n\tNoVerify = 0x09, // VERIFY\n\tDifferentKey = 0x0a, // REPORT\n}\n\n/** @publicAPI */\nexport const inclusionTimeouts = Object.freeze(\n\t{\n\t\tTA1: 10000,\n\t\tTA2: 10000,\n\t\tTA3: 10000,\n\t\tTA4: 10000,\n\t\tTA5: 10000,\n\t\tTAI1: 240000,\n\t\tTAI2: 240000,\n\t\tTB1: 30000,\n\t\tTB2: 240000,\n\t\tTB3: 10000,\n\t\tTB4: 10000,\n\t\tTB5: 10000,\n\t\tTBI1: 240000,\n\t} as const,\n);\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;AACA,IAAY;CAAZ,SAAYA,aAAU;AACrB,EAAAA,YAAAA,YAAA,YAAA,IAAA,CAAA,IAAA;AACD,GAFY,eAAA,aAAU,CAAA,EAAA;AAKtB,IAAY;CAAZ,SAAYC,eAAY;AACvB,EAAAA,cAAAA,cAAA,YAAA,IAAA,CAAA,IAAA;AACD,GAFY,iBAAA,eAAY,CAAA,EAAA;AAKxB,IAAY;CAAZ,SAAYC,cAAW;AACtB,EAAAA,aAAAA,aAAA,YAAA,IAAA,CAAA,IAAA;AACA,EAAAA,aAAAA,aAAA,mBAAA,IAAA,CAAA,IAAA;AACA,EAAAA,aAAAA,aAAA,kBAAA,IAAA,CAAA,IAAA;AACA,EAAAA,aAAAA,aAAA,SAAA,IAAA,CAAA,IAAA;AACA,EAAAA,aAAAA,aAAA,uBAAA,IAAA,CAAA,IAAA;AACA,EAAAA,aAAAA,aAAA,oBAAA,IAAA,CAAA,IAAA;AACA,EAAAA,aAAAA,aAAA,eAAA,IAAA,CAAA,IAAA;AACA,EAAAA,aAAAA,aAAA,UAAA,IAAA,CAAA,IAAA;AACA,EAAAA,aAAAA,aAAA,cAAA,IAAA,EAAA,IAAA;AACD,GAVY,gBAAA,cAAW,CAAA,EAAA;AAahB,MAAM,oBAAoB,OAAO,OACvC;EACC,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,MAAM;EACN,MAAM;EACN,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,MAAM;CACG;",
4
+ "sourcesContent": ["/** @publicAPI */\nexport enum KEXSchemes {\n\tKEXScheme1 = 1,\n}\n\n/** @publicAPI */\nexport enum ECDHProfiles {\n\tCurve25519 = 0,\n}\n\n/** @publicAPI */\nexport enum KEXFailType {\n\tNoKeyMatch = 0x01, // KEX_KEY\n\tNoSupportedScheme = 0x02, // KEX_SCHEME\n\tNoSupportedCurve = 0x03, // KEX_CURVES\n\tDecrypt = 0x05,\n\tBootstrappingCanceled = 0x06, // CANCEL\n\tWrongSecurityLevel = 0x07, // AUTH\n\tKeyNotGranted = 0x08, // GET\n\tNoVerify = 0x09, // VERIFY\n\tDifferentKey = 0x0a, // REPORT\n}\n\n/** @publicAPI */\nexport const inclusionTimeouts = Object.freeze({\n\tTA1: 10000,\n\tTA2: 10000,\n\tTA3: 10000,\n\tTA4: 10000,\n\tTA5: 10000,\n\tTAI1: 240000,\n\tTAI2: 240000,\n\tTB1: 30000,\n\tTB2: 240000,\n\tTB3: 10000,\n\tTB4: 10000,\n\tTB5: 10000,\n\tTBI1: 240000,\n} as const);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;AACA,IAAY;CAAZ,SAAYA,aAAU;AACrB,EAAAA,YAAAA,YAAA,YAAA,IAAA,CAAA,IAAA;AACD,GAFY,eAAA,aAAU,CAAA,EAAA;AAKtB,IAAY;CAAZ,SAAYC,eAAY;AACvB,EAAAA,cAAAA,cAAA,YAAA,IAAA,CAAA,IAAA;AACD,GAFY,iBAAA,eAAY,CAAA,EAAA;AAKxB,IAAY;CAAZ,SAAYC,cAAW;AACtB,EAAAA,aAAAA,aAAA,YAAA,IAAA,CAAA,IAAA;AACA,EAAAA,aAAAA,aAAA,mBAAA,IAAA,CAAA,IAAA;AACA,EAAAA,aAAAA,aAAA,kBAAA,IAAA,CAAA,IAAA;AACA,EAAAA,aAAAA,aAAA,SAAA,IAAA,CAAA,IAAA;AACA,EAAAA,aAAAA,aAAA,uBAAA,IAAA,CAAA,IAAA;AACA,EAAAA,aAAAA,aAAA,oBAAA,IAAA,CAAA,IAAA;AACA,EAAAA,aAAAA,aAAA,eAAA,IAAA,CAAA,IAAA;AACA,EAAAA,aAAAA,aAAA,UAAA,IAAA,CAAA,IAAA;AACA,EAAAA,aAAAA,aAAA,cAAA,IAAA,EAAA,IAAA;AACD,GAVY,gBAAA,cAAW,CAAA,EAAA;AAahB,MAAM,oBAAoB,OAAO,OAAO;EAC9C,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,MAAM;EACN,MAAM;EACN,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,MAAM;CACG;",
6
6
  "names": ["KEXSchemes", "ECDHProfiles", "KEXFailType"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src_gen/lib/SetValueResult.ts"],
4
- "sourcesContent": ["import type { Duration, SupervisionResult } from \"@zwave-js/core\";\n\n/**\n * Indicates the status of a `setValue` call. This enum is an extension of `SupervisionStatus`\n * with additional status codes to indicate errors that are not related to supervision.\n */\nexport enum SetValueStatus {\n\t/** The device reports no support for this command */\n\tNoDeviceSupport = 0x00,\n\t/** The device has accepted the command and is working on it */\n\tWorking = 0x01,\n\t/** The device has rejected the command */\n\tFail = 0x02,\n\t/** The endpoint specified in the value ID does not exist */\n\tEndpointNotFound = 0x03,\n\t/** The given CC or its API is not implemented (yet) or it has no `setValue` implementation */\n\tNotImplemented = 0x04,\n\t/** The value to set (or a related value) is invalid */\n\tInvalidValue = 0x05,\n\t/** The command was sent successfully, but it is unknown whether it was executed */\n\tSuccessUnsupervised = 0xfe,\n\t/** The device has executed the command successfully */\n\tSuccess = 0xff,\n}\n\n/** Indicates the result of a `setValue` call. */\nexport type SetValueResult =\n\t// Derived from SupervisionResult\n\t| {\n\t\tstatus:\n\t\t\t| SetValueStatus.NoDeviceSupport\n\t\t\t| SetValueStatus.Fail\n\t\t\t| SetValueStatus.Success;\n\t\tremainingDuration?: undefined;\n\t\tmessage?: undefined;\n\t}\n\t| {\n\t\tstatus: SetValueStatus.Working;\n\t\tremainingDuration: Duration;\n\t\tmessage?: undefined;\n\t}\n\t// Added by setValue\n\t| {\n\t\tstatus: SetValueStatus.SuccessUnsupervised;\n\t\tremainingDuration?: undefined;\n\t\tmessage?: undefined;\n\t}\n\t| {\n\t\tstatus:\n\t\t\t| SetValueStatus.EndpointNotFound\n\t\t\t| SetValueStatus.NotImplemented\n\t\t\t| SetValueStatus.InvalidValue;\n\t\tremainingDuration?: undefined;\n\t\tmessage: string;\n\t};\n\nexport function supervisionResultToSetValueResult(\n\tresult: SupervisionResult | undefined,\n): SetValueResult {\n\tif (result == undefined) {\n\t\treturn {\n\t\t\tstatus: SetValueStatus.SuccessUnsupervised,\n\t\t};\n\t} else {\n\t\t// @ts-expect-error We only care about the compatible subset of status codes\n\t\treturn result;\n\t}\n}\n\n/** Tests whether a `SetValueResult` indicates that the device accepted the command. */\nexport function setValueSucceeded(\n\tresult: SetValueResult,\n): result is SetValueResult & {\n\tstatus: SetValueStatus.Success | SetValueStatus.Working;\n} {\n\treturn (\n\t\tresult.status === SetValueStatus.Success\n\t\t|| result.status === SetValueStatus.Working\n\t);\n}\n\n/** Tests whether a `SetValueResult` indicates that the command could not be sent or the device did not accept the command. */\nexport function setValueFailed(\n\tresult: SetValueResult,\n): result is SetValueResult & {\n\tstatus:\n\t\t| SetValueStatus.NoDeviceSupport\n\t\t| SetValueStatus.Fail\n\t\t| SetValueStatus.EndpointNotFound\n\t\t| SetValueStatus.NotImplemented\n\t\t| SetValueStatus.InvalidValue;\n} {\n\treturn (\n\t\tresult.status === SetValueStatus.NoDeviceSupport\n\t\t|| result.status === SetValueStatus.Fail\n\t\t|| result.status === SetValueStatus.EndpointNotFound\n\t\t|| result.status === SetValueStatus.NotImplemented\n\t\t|| result.status === SetValueStatus.InvalidValue\n\t);\n}\n\n/** Tests whether a `SetValueResult` indicates that the command was sent and that the device maybe accepted the command. */\nexport function setValueWasUnsupervisedOrSucceeded(\n\tresult: SetValueResult,\n): result is SetValueResult & {\n\tstatus:\n\t\t| SetValueStatus.SuccessUnsupervised\n\t\t| SetValueStatus.Success\n\t\t| SetValueStatus.Working;\n} {\n\treturn (\n\t\tresult.status === SetValueStatus.SuccessUnsupervised\n\t\t|| setValueSucceeded(result)\n\t);\n}\n"],
4
+ "sourcesContent": ["import type { Duration, SupervisionResult } from \"@zwave-js/core\";\n\n/**\n * Indicates the status of a `setValue` call. This enum is an extension of `SupervisionStatus`\n * with additional status codes to indicate errors that are not related to supervision.\n */\nexport enum SetValueStatus {\n\t/** The device reports no support for this command */\n\tNoDeviceSupport = 0x00,\n\t/** The device has accepted the command and is working on it */\n\tWorking = 0x01,\n\t/** The device has rejected the command */\n\tFail = 0x02,\n\t/** The endpoint specified in the value ID does not exist */\n\tEndpointNotFound = 0x03,\n\t/** The given CC or its API is not implemented (yet) or it has no `setValue` implementation */\n\tNotImplemented = 0x04,\n\t/** The value to set (or a related value) is invalid */\n\tInvalidValue = 0x05,\n\t/** The command was sent successfully, but it is unknown whether it was executed */\n\tSuccessUnsupervised = 0xfe,\n\t/** The device has executed the command successfully */\n\tSuccess = 0xff,\n}\n\n/** Indicates the result of a `setValue` call. */\nexport type SetValueResult =\n\t// Derived from SupervisionResult\n\t| {\n\t\t\tstatus:\n\t\t\t\t| SetValueStatus.NoDeviceSupport\n\t\t\t\t| SetValueStatus.Fail\n\t\t\t\t| SetValueStatus.Success;\n\t\t\tremainingDuration?: undefined;\n\t\t\tmessage?: undefined;\n\t }\n\t| {\n\t\t\tstatus: SetValueStatus.Working;\n\t\t\tremainingDuration: Duration;\n\t\t\tmessage?: undefined;\n\t }\n\t// Added by setValue\n\t| {\n\t\t\tstatus: SetValueStatus.SuccessUnsupervised;\n\t\t\tremainingDuration?: undefined;\n\t\t\tmessage?: undefined;\n\t }\n\t| {\n\t\t\tstatus:\n\t\t\t\t| SetValueStatus.EndpointNotFound\n\t\t\t\t| SetValueStatus.NotImplemented\n\t\t\t\t| SetValueStatus.InvalidValue;\n\t\t\tremainingDuration?: undefined;\n\t\t\tmessage: string;\n\t };\n\nexport function supervisionResultToSetValueResult(\n\tresult: SupervisionResult | undefined,\n): SetValueResult {\n\tif (result == undefined) {\n\t\treturn {\n\t\t\tstatus: SetValueStatus.SuccessUnsupervised,\n\t\t};\n\t} else {\n\t\t// @ts-expect-error We only care about the compatible subset of status codes\n\t\treturn result;\n\t}\n}\n\n/** Tests whether a `SetValueResult` indicates that the device accepted the command. */\nexport function setValueSucceeded(\n\tresult: SetValueResult,\n): result is SetValueResult & {\n\tstatus: SetValueStatus.Success | SetValueStatus.Working;\n} {\n\treturn (\n\t\tresult.status === SetValueStatus.Success\n\t\t|| result.status === SetValueStatus.Working\n\t);\n}\n\n/** Tests whether a `SetValueResult` indicates that the command could not be sent or the device did not accept the command. */\nexport function setValueFailed(\n\tresult: SetValueResult,\n): result is SetValueResult & {\n\tstatus:\n\t\t| SetValueStatus.NoDeviceSupport\n\t\t| SetValueStatus.Fail\n\t\t| SetValueStatus.EndpointNotFound\n\t\t| SetValueStatus.NotImplemented\n\t\t| SetValueStatus.InvalidValue;\n} {\n\treturn (\n\t\tresult.status === SetValueStatus.NoDeviceSupport\n\t\t|| result.status === SetValueStatus.Fail\n\t\t|| result.status === SetValueStatus.EndpointNotFound\n\t\t|| result.status === SetValueStatus.NotImplemented\n\t\t|| result.status === SetValueStatus.InvalidValue\n\t);\n}\n\n/** Tests whether a `SetValueResult` indicates that the command was sent and that the device maybe accepted the command. */\nexport function setValueWasUnsupervisedOrSucceeded(\n\tresult: SetValueResult,\n): result is SetValueResult & {\n\tstatus:\n\t\t| SetValueStatus.SuccessUnsupervised\n\t\t| SetValueStatus.Success\n\t\t| SetValueStatus.Working;\n} {\n\treturn (\n\t\tresult.status === SetValueStatus.SuccessUnsupervised\n\t\t|| setValueSucceeded(result)\n\t);\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;AAEA;;;;;;;;;AAIA,IAAY;CAAZ,SAAYA,iBAAc;AAEzB,EAAAA,gBAAAA,gBAAA,iBAAA,IAAA,CAAA,IAAA;AAEA,EAAAA,gBAAAA,gBAAA,SAAA,IAAA,CAAA,IAAA;AAEA,EAAAA,gBAAAA,gBAAA,MAAA,IAAA,CAAA,IAAA;AAEA,EAAAA,gBAAAA,gBAAA,kBAAA,IAAA,CAAA,IAAA;AAEA,EAAAA,gBAAAA,gBAAA,gBAAA,IAAA,CAAA,IAAA;AAEA,EAAAA,gBAAAA,gBAAA,cAAA,IAAA,CAAA,IAAA;AAEA,EAAAA,gBAAAA,gBAAA,qBAAA,IAAA,GAAA,IAAA;AAEA,EAAAA,gBAAAA,gBAAA,SAAA,IAAA,GAAA,IAAA;AACD,GAjBY,mBAAA,iBAAc,CAAA,EAAA;AAkDpB,SAAU,kCACf,QAAqC;AAErC,MAAI,UAAU,QAAW;AACxB,WAAO;MACN,QAAQ,eAAe;;EAEzB,OAAO;AAEN,WAAO;EACR;AACD;AAXgB;AAcV,SAAU,kBACf,QAAsB;AAItB,SACC,OAAO,WAAW,eAAe,WAC9B,OAAO,WAAW,eAAe;AAEtC;AATgB;AAYV,SAAU,eACf,QAAsB;AAStB,SACC,OAAO,WAAW,eAAe,mBAC9B,OAAO,WAAW,eAAe,QACjC,OAAO,WAAW,eAAe,oBACjC,OAAO,WAAW,eAAe,kBACjC,OAAO,WAAW,eAAe;AAEtC;AAjBgB;AAoBV,SAAU,mCACf,QAAsB;AAOtB,SACC,OAAO,WAAW,eAAe,uBAC9B,kBAAkB,MAAM;AAE7B;AAZgB;",
6
6
  "names": ["SetValueStatus"]
7
7
  }
@@ -2,7 +2,7 @@ import type { GetDeviceConfig } from "@zwave-js/config";
2
2
  import type { CommandClasses, EndpointId, GetValueDB, ValueID, ValueMetadata } from "@zwave-js/core";
3
3
  import { type FnOrStatic, type ReturnTypeOrStatic } from "@zwave-js/shared";
4
4
  import type { ValueIDProperties } from "./API.js";
5
- declare function defineCCValues<T extends CommandClasses>(commandClass: T, _: Record<string, CCValueBlueprint | DynamicCCValueBlueprint<any[]>>): typeof import("../cc/_CCValues.generated.js").CCValues[T];
5
+ declare function defineCCValues<T extends CommandClasses>(commandClass: T, _: Record<string, CCValueBlueprint | DynamicCCValueBlueprint<any[]>>): (typeof import("../cc/_CCValues.generated.js").CCValues)[T];
6
6
  export interface CCValueOptions {
7
7
  /**
8
8
  * Whether the CC value is internal. Internal values are not exposed to the user.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src_gen/lib/Values.ts"],
4
- "sourcesContent": ["import type { GetDeviceConfig } from \"@zwave-js/config\";\nimport type {\n\tCommandClasses,\n\tEndpointId,\n\tGetValueDB,\n\tValueID,\n\tValueMetadata,\n} from \"@zwave-js/core\";\nimport {\n\ttype FnOrStatic,\n\ttype ReturnTypeOrStatic,\n\tevalOrStatic,\n} from \"@zwave-js/shared\";\nimport type { ValueIDProperties } from \"./API.js\";\n\nimport { CCValues } from \"../cc/_CCValues.generated.js\";\n\nfunction defineCCValues<T extends CommandClasses>(\n\tcommandClass: T,\n\t_: Record<string, CCValueBlueprint | DynamicCCValueBlueprint<any[]>>,\n\t// oxlint-disable-next-line typescript/ban-ts-comment\n\t// @ts-ignore I know what I'm doing!\n): typeof import(\"../cc/_CCValues.generated.js\").CCValues[T] {\n\t// oxlint-disable-next-line typescript/ban-ts-comment\n\t// @ts-ignore I know what I'm doing!\n\treturn CCValues[commandClass];\n}\n\n// HINT: To fully view types for definitions created by this, open\n// node_modules/typescript/lib/tsserver.js and change the definition of\n// ts.defaultMaximumTruncationLength = 160\n// to something higher like\n// ts.defaultMaximumTruncationLength = 1000\n// Then restart TS Server\n\nexport interface CCValueOptions {\n\t/**\n\t * Whether the CC value is internal. Internal values are not exposed to the user.\n\t */\n\tinternal?: boolean;\n\t/**\n\t * The minimum CC version required for this value to exist.\n\t */\n\tminVersion?: number;\n\t/**\n\t * Whether this value represents a state (`true`) or a notification/event (`false`). Default: `true`\n\t */\n\tstateful?: boolean;\n\t/**\n\t * Omit this value from value logs. Default: `false`\n\t */\n\tsecret?: boolean;\n\n\t/** Whether the CC value may exist on endpoints. Default: `true` */\n\tsupportsEndpoints?: boolean;\n\n\t/**\n\t * Can be used to dynamically decide if this value should be created automatically.\n\t * This is ignored for dynamic values and defaults to `true` if not given.\n\t */\n\tautoCreate?:\n\t\t| boolean\n\t\t| ((\n\t\t\tctx: GetValueDB & GetDeviceConfig,\n\t\t\tendpoint: EndpointId,\n\t\t) => boolean);\n}\n\nexport const defaultCCValueOptions = {\n\tinternal: false,\n\tminVersion: 1,\n\tsecret: false,\n\tstateful: true,\n\tsupportsEndpoints: true,\n\tautoCreate: true,\n} as const;\n\n// expands object types recursively\nexport type ExpandRecursively<T> =\n\t// Split functions with properties into the function and object parts\n\tT extends (...args: infer A) => infer R\n\t\t? [keyof T] extends [never] ? (...args: A) => ExpandRecursively<R>\n\t\t:\n\t\t\t& ((...args: A) => ExpandRecursively<R>)\n\t\t\t& {\n\t\t\t\t[P in keyof T]: ExpandRecursively<T[P]>;\n\t\t\t}\n\t\t// Expand object types\n\t\t: T extends object\n\t\t\t? T extends infer O ? { [K in keyof O]: ExpandRecursively<O[K]> }\n\t\t\t: never\n\t\t// Fallback to the type itself if no match\n\t\t: T;\n\nexport type ExpandRecursivelySkipMeta<T> =\n\t// Split functions with properties into the function and object parts\n\tT extends (...args: infer A) => infer R\n\t\t? [keyof T] extends [never]\n\t\t\t? (...args: A) => ExpandRecursivelySkipMeta<R>\n\t\t:\n\t\t\t& ((...args: A) => ExpandRecursivelySkipMeta<R>)\n\t\t\t& {\n\t\t\t\t[P in keyof T]: ExpandRecursivelySkipMeta<T[P]>;\n\t\t\t}\n\t\t// Ignore the ValueMetadata type\n\t\t: T extends ValueMetadata ? T\n\t\t// Expand object types\n\t\t: T extends object\n\t\t\t? T extends infer O\n\t\t\t\t? { [K in keyof O]: ExpandRecursivelySkipMeta<O[K]> }\n\t\t\t: never\n\t\t// Fallback to the type itself if no match\n\t\t: T;\n\ntype InferArgs<T extends FnOrStatic<any, any>[]> = T extends [\n\t(...args: infer A) => any,\n\t...any,\n] ? A\n\t: T extends [any, ...infer R] ? InferArgs<R>\n\t: [];\n\n// Namespace for utilities to define CC values\nexport const V = {\n\t/** Returns a CC value definition that is named like the value `property` */\n\tstaticProperty<\n\t\tTProp extends string | number,\n\t\tconst TMeta extends ValueMetadata,\n\t\tconst TOptions extends CCValueOptions,\n\t>(\n\t\tproperty: TProp,\n\t\tmeta?: TMeta,\n\t\toptions?: TOptions,\n\t): {\n\t\t[K in TProp]: {\n\t\t\tproperty: TProp;\n\t\t\tmeta: TMeta;\n\t\t\toptions: TOptions;\n\t\t};\n\t} {\n\t\treturn {\n\t\t\t[property]: {\n\t\t\t\tproperty,\n\t\t\t\tmeta,\n\t\t\t\toptions,\n\t\t\t},\n\t\t} as any;\n\t},\n\n\t/** Returns a CC value definition with the given name and `property` */\n\tstaticPropertyWithName<\n\t\tTName extends string,\n\t\tTProp extends string | number,\n\t\tconst TMeta extends ValueMetadata,\n\t\tconst TOptions extends CCValueOptions,\n\t>(\n\t\tname: TName,\n\t\tproperty: TProp,\n\t\tmeta?: TMeta,\n\t\toptions?: TOptions,\n\t): {\n\t\t[K in TName]: {\n\t\t\tproperty: TProp;\n\t\t\tmeta: TMeta;\n\t\t\toptions: TOptions;\n\t\t};\n\t} {\n\t\treturn {\n\t\t\t[name]: {\n\t\t\t\tproperty,\n\t\t\t\tmeta,\n\t\t\t\toptions,\n\t\t\t},\n\t\t} as any;\n\t},\n\n\t/** Returns a CC value definition with the given name, `property` and `propertyKey` */\n\tstaticPropertyAndKeyWithName<\n\t\tTName extends string,\n\t\tTProp extends string | number,\n\t\tTKey extends string | number,\n\t\tconst TMeta extends ValueMetadata,\n\t\tconst TOptions extends CCValueOptions,\n\t>(\n\t\tname: TName,\n\t\tproperty: TProp,\n\t\tpropertyKey: TKey,\n\t\tmeta?: TMeta,\n\t\toptions?: TOptions,\n\t): {\n\t\t[K in TName]: {\n\t\t\tproperty: TProp;\n\t\t\tpropertyKey: TKey;\n\t\t\tmeta: TMeta;\n\t\t\toptions: TOptions;\n\t\t};\n\t} {\n\t\treturn {\n\t\t\t[name]: {\n\t\t\t\tproperty,\n\t\t\t\tpropertyKey,\n\t\t\t\tmeta,\n\t\t\t\toptions,\n\t\t\t},\n\t\t} as any;\n\t},\n\n\t/** Returns a CC value definition with the given name and a dynamic `property` */\n\tdynamicPropertyWithName<\n\t\tTName extends string,\n\t\tTProp extends FnOrStatic<any[], ValueIDProperties[\"property\"]>,\n\t\tTMeta extends FnOrStatic<any[], ValueMetadata> = ValueMetadata,\n\t\tTOptions extends CCValueOptions = CCValueOptions,\n\t>(\n\t\tname: TName,\n\t\tproperty: TProp,\n\t\tis: PartialCCValuePredicate,\n\t\tmeta?: TMeta,\n\t\toptions?: TOptions,\n\t): {\n\t\t[K in TName]: {\n\t\t\t(...args: InferArgs<[TProp, TMeta]>): {\n\t\t\t\tproperty: ReturnTypeOrStatic<TProp>;\n\t\t\t\tmeta: ReturnTypeOrStatic<TMeta>;\n\t\t\t};\n\t\t\tis: PartialCCValuePredicate;\n\t\t\toptions: TOptions;\n\t\t};\n\t} {\n\t\treturn {\n\t\t\t[name]: Object.assign(\n\t\t\t\t(...args: InferArgs<[TProp, TMeta]>) => ({\n\t\t\t\t\tproperty: evalOrStatic(property, ...args),\n\t\t\t\t\tmeta: evalOrStatic(meta, ...args),\n\t\t\t\t}),\n\t\t\t\t{ is, options },\n\t\t\t),\n\t\t} as any;\n\t},\n\n\t/** Returns a CC value definition with the given name and a dynamic `property` */\n\tdynamicPropertyAndKeyWithName<\n\t\tTName extends string,\n\t\tTProp extends FnOrStatic<any[], ValueIDProperties[\"property\"]>,\n\t\tTKey extends FnOrStatic<any[], ValueIDProperties[\"propertyKey\"]>,\n\t\tTOptions extends CCValueOptions,\n\t\tTMeta extends FnOrStatic<any[], ValueMetadata> = ValueMetadata,\n\t>(\n\t\tname: TName,\n\t\tproperty: TProp,\n\t\tpropertyKey: TKey,\n\t\tis: PartialCCValuePredicate,\n\t\tmeta?: TMeta,\n\t\toptions?: TOptions,\n\t): {\n\t\t[K in TName]: {\n\t\t\t(...args: InferArgs<[TProp, TKey, TMeta]>): {\n\t\t\t\tproperty: ReturnTypeOrStatic<TProp>;\n\t\t\t\tpropertyKey: ReturnTypeOrStatic<TKey>;\n\t\t\t\tmeta: ReturnTypeOrStatic<TMeta>;\n\t\t\t};\n\t\t\tis: PartialCCValuePredicate;\n\t\t\toptions: TOptions;\n\t\t};\n\t} {\n\t\treturn {\n\t\t\t[name]: Object.assign(\n\t\t\t\t(...args: any[]) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tproperty: evalOrStatic(property, ...args),\n\t\t\t\t\t\tpropertyKey: evalOrStatic(propertyKey, ...args),\n\t\t\t\t\t\tmeta: evalOrStatic(meta, ...args),\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{ is, options },\n\t\t\t),\n\t\t} as any;\n\t},\n\n\tdefineCCValues,\n};\n\nexport interface CCValueBlueprint extends Readonly<ValueIDProperties> {\n\treadonly meta?: Readonly<ValueMetadata>;\n\treadonly options?: Readonly<CCValueOptions>;\n}\n\nexport type CCValuePredicate = (valueId: ValueID) => boolean;\nexport type PartialCCValuePredicate = (\n\tproperties: ValueIDProperties,\n) => boolean;\n\n/** A blueprint for a CC value which depends on one or more parameters */\nexport interface DynamicCCValueBlueprint<TArgs extends any[]> {\n\t(...args: TArgs): Omit<CCValueBlueprint, \"options\">;\n\tis: PartialCCValuePredicate;\n\treadonly options?: Readonly<CCValueOptions>;\n}\n\n/** The common base type of all CC value definitions */\nexport interface CCValue {\n\treadonly id: Omit<ValueID, \"endpoint\">;\n\tendpoint(endpoint?: number): ValueID;\n\treadonly meta: ValueMetadata;\n}\n\nexport interface StaticCCValue extends CCValue {\n\t/** Whether the given value ID matches this value definition */\n\tis: CCValuePredicate;\n\treadonly options: Required<CCValueOptions>;\n}\n\nexport type DynamicCCValue<TArgs extends any[] = any[]> =\n\t& ExpandRecursivelySkipMeta<(...args: TArgs) => CCValue>\n\t& {\n\t\t/** Whether the given value ID matches this value definition */\n\t\tis: CCValuePredicate;\n\t\treadonly options: Required<CCValueOptions>;\n\t};\n\nexport type StaticCCValueFactory<T> = (self: T) => StaticCCValue;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAQA;;;;;;AAAA,oBAIO;AAGP,gCAAyB;AAEzB,SAAS,eACR,cACA,GAAoE;AAMpE,SAAO,mCAAS,YAAY;AAC7B;AATS;AAmDF,MAAM,wBAAwB;EACpC,UAAU;EACV,YAAY;EACZ,QAAQ;EACR,UAAU;EACV,mBAAmB;EACnB,YAAY;;AAgDN,MAAM,IAAI;;EAEhB,eAKC,UACA,MACA,SAAkB;AAQlB,WAAO;MACN,CAAC,QAAQ,GAAG;QACX;QACA;QACA;;;EAGH;;EAGA,uBAMC,MACA,UACA,MACA,SAAkB;AAQlB,WAAO;MACN,CAAC,IAAI,GAAG;QACP;QACA;QACA;;;EAGH;;EAGA,6BAOC,MACA,UACA,aACA,MACA,SAAkB;AASlB,WAAO;MACN,CAAC,IAAI,GAAG;QACP;QACA;QACA;QACA;;;EAGH;;EAGA,wBAMC,MACA,UACA,IACA,MACA,SAAkB;AAWlB,WAAO;MACN,CAAC,IAAI,GAAG,OAAO,OACd,IAAI,UAAqC;QACxC,cAAU,4BAAa,UAAU,GAAG,IAAI;QACxC,UAAM,4BAAa,MAAM,GAAG,IAAI;UAEjC,EAAE,IAAI,QAAO,CAAE;;EAGlB;;EAGA,8BAOC,MACA,UACA,aACA,IACA,MACA,SAAkB;AAYlB,WAAO;MACN,CAAC,IAAI,GAAG,OAAO,OACd,IAAI,SAAe;AAClB,eAAO;UACN,cAAU,4BAAa,UAAU,GAAG,IAAI;UACxC,iBAAa,4BAAa,aAAa,GAAG,IAAI;UAC9C,UAAM,4BAAa,MAAM,GAAG,IAAI;;MAElC,GACA,EAAE,IAAI,QAAO,CAAE;;EAGlB;EAEA;;",
4
+ "sourcesContent": ["import type { GetDeviceConfig } from \"@zwave-js/config\";\nimport type {\n\tCommandClasses,\n\tEndpointId,\n\tGetValueDB,\n\tValueID,\n\tValueMetadata,\n} from \"@zwave-js/core\";\nimport {\n\ttype FnOrStatic,\n\ttype ReturnTypeOrStatic,\n\tevalOrStatic,\n} from \"@zwave-js/shared\";\n\nimport { CCValues } from \"../cc/_CCValues.generated.js\";\n\nimport type { ValueIDProperties } from \"./API.js\";\n\nfunction defineCCValues<T extends CommandClasses>(\n\tcommandClass: T,\n\t_: Record<string, CCValueBlueprint | DynamicCCValueBlueprint<any[]>>,\n\t// oxlint-disable-next-line typescript/ban-ts-comment\n\t// @ts-ignore I know what I'm doing!\n): (typeof import(\"../cc/_CCValues.generated.js\").CCValues)[T] {\n\t// oxlint-disable-next-line typescript/ban-ts-comment\n\t// @ts-ignore I know what I'm doing!\n\treturn CCValues[commandClass];\n}\n\n// HINT: To fully view types for definitions created by this, open\n// node_modules/typescript/lib/tsserver.js and change the definition of\n// ts.defaultMaximumTruncationLength = 160\n// to something higher like\n// ts.defaultMaximumTruncationLength = 1000\n// Then restart TS Server\n\nexport interface CCValueOptions {\n\t/**\n\t * Whether the CC value is internal. Internal values are not exposed to the user.\n\t */\n\tinternal?: boolean;\n\t/**\n\t * The minimum CC version required for this value to exist.\n\t */\n\tminVersion?: number;\n\t/**\n\t * Whether this value represents a state (`true`) or a notification/event (`false`). Default: `true`\n\t */\n\tstateful?: boolean;\n\t/**\n\t * Omit this value from value logs. Default: `false`\n\t */\n\tsecret?: boolean;\n\n\t/** Whether the CC value may exist on endpoints. Default: `true` */\n\tsupportsEndpoints?: boolean;\n\n\t/**\n\t * Can be used to dynamically decide if this value should be created automatically.\n\t * This is ignored for dynamic values and defaults to `true` if not given.\n\t */\n\tautoCreate?:\n\t\t| boolean\n\t\t| ((\n\t\t\t\tctx: GetValueDB & GetDeviceConfig,\n\t\t\t\tendpoint: EndpointId,\n\t\t ) => boolean);\n}\n\nexport const defaultCCValueOptions = {\n\tinternal: false,\n\tminVersion: 1,\n\tsecret: false,\n\tstateful: true,\n\tsupportsEndpoints: true,\n\tautoCreate: true,\n} as const;\n\n// expands object types recursively\nexport type ExpandRecursively<T> =\n\t// Split functions with properties into the function and object parts\n\tT extends (...args: infer A) => infer R\n\t\t? [keyof T] extends [never]\n\t\t\t? (...args: A) => ExpandRecursively<R>\n\t\t\t: ((...args: A) => ExpandRecursively<R>) & {\n\t\t\t\t\t[P in keyof T]: ExpandRecursively<T[P]>;\n\t\t\t\t}\n\t\t: // Expand object types\n\t\t\tT extends object\n\t\t\t? T extends infer O\n\t\t\t\t? { [K in keyof O]: ExpandRecursively<O[K]> }\n\t\t\t\t: never\n\t\t\t: // Fallback to the type itself if no match\n\t\t\t\tT;\n\nexport type ExpandRecursivelySkipMeta<T> =\n\t// Split functions with properties into the function and object parts\n\tT extends (...args: infer A) => infer R\n\t\t? [keyof T] extends [never]\n\t\t\t? (...args: A) => ExpandRecursivelySkipMeta<R>\n\t\t\t: ((...args: A) => ExpandRecursivelySkipMeta<R>) & {\n\t\t\t\t\t[P in keyof T]: ExpandRecursivelySkipMeta<T[P]>;\n\t\t\t\t}\n\t\t: // Ignore the ValueMetadata type\n\t\t\tT extends ValueMetadata\n\t\t\t? T\n\t\t\t: // Expand object types\n\t\t\t\tT extends object\n\t\t\t\t? T extends infer O\n\t\t\t\t\t? { [K in keyof O]: ExpandRecursivelySkipMeta<O[K]> }\n\t\t\t\t\t: never\n\t\t\t\t: // Fallback to the type itself if no match\n\t\t\t\t\tT;\n\ntype InferArgs<T extends FnOrStatic<any, any>[]> = T extends [\n\t(...args: infer A) => any,\n\t...any,\n]\n\t? A\n\t: T extends [any, ...infer R]\n\t\t? InferArgs<R>\n\t\t: [];\n\n// Namespace for utilities to define CC values\nexport const V = {\n\t/** Returns a CC value definition that is named like the value `property` */\n\tstaticProperty<\n\t\tTProp extends string | number,\n\t\tconst TMeta extends ValueMetadata,\n\t\tconst TOptions extends CCValueOptions,\n\t>(\n\t\tproperty: TProp,\n\t\tmeta?: TMeta,\n\t\toptions?: TOptions,\n\t): {\n\t\t[K in TProp]: {\n\t\t\tproperty: TProp;\n\t\t\tmeta: TMeta;\n\t\t\toptions: TOptions;\n\t\t};\n\t} {\n\t\treturn {\n\t\t\t[property]: {\n\t\t\t\tproperty,\n\t\t\t\tmeta,\n\t\t\t\toptions,\n\t\t\t},\n\t\t} as any;\n\t},\n\n\t/** Returns a CC value definition with the given name and `property` */\n\tstaticPropertyWithName<\n\t\tTName extends string,\n\t\tTProp extends string | number,\n\t\tconst TMeta extends ValueMetadata,\n\t\tconst TOptions extends CCValueOptions,\n\t>(\n\t\tname: TName,\n\t\tproperty: TProp,\n\t\tmeta?: TMeta,\n\t\toptions?: TOptions,\n\t): {\n\t\t[K in TName]: {\n\t\t\tproperty: TProp;\n\t\t\tmeta: TMeta;\n\t\t\toptions: TOptions;\n\t\t};\n\t} {\n\t\treturn {\n\t\t\t[name]: {\n\t\t\t\tproperty,\n\t\t\t\tmeta,\n\t\t\t\toptions,\n\t\t\t},\n\t\t} as any;\n\t},\n\n\t/** Returns a CC value definition with the given name, `property` and `propertyKey` */\n\tstaticPropertyAndKeyWithName<\n\t\tTName extends string,\n\t\tTProp extends string | number,\n\t\tTKey extends string | number,\n\t\tconst TMeta extends ValueMetadata,\n\t\tconst TOptions extends CCValueOptions,\n\t>(\n\t\tname: TName,\n\t\tproperty: TProp,\n\t\tpropertyKey: TKey,\n\t\tmeta?: TMeta,\n\t\toptions?: TOptions,\n\t): {\n\t\t[K in TName]: {\n\t\t\tproperty: TProp;\n\t\t\tpropertyKey: TKey;\n\t\t\tmeta: TMeta;\n\t\t\toptions: TOptions;\n\t\t};\n\t} {\n\t\treturn {\n\t\t\t[name]: {\n\t\t\t\tproperty,\n\t\t\t\tpropertyKey,\n\t\t\t\tmeta,\n\t\t\t\toptions,\n\t\t\t},\n\t\t} as any;\n\t},\n\n\t/** Returns a CC value definition with the given name and a dynamic `property` */\n\tdynamicPropertyWithName<\n\t\tTName extends string,\n\t\tTProp extends FnOrStatic<any[], ValueIDProperties[\"property\"]>,\n\t\tTMeta extends FnOrStatic<any[], ValueMetadata> = ValueMetadata,\n\t\tTOptions extends CCValueOptions = CCValueOptions,\n\t>(\n\t\tname: TName,\n\t\tproperty: TProp,\n\t\tis: PartialCCValuePredicate,\n\t\tmeta?: TMeta,\n\t\toptions?: TOptions,\n\t): {\n\t\t[K in TName]: {\n\t\t\t(...args: InferArgs<[TProp, TMeta]>): {\n\t\t\t\tproperty: ReturnTypeOrStatic<TProp>;\n\t\t\t\tmeta: ReturnTypeOrStatic<TMeta>;\n\t\t\t};\n\t\t\tis: PartialCCValuePredicate;\n\t\t\toptions: TOptions;\n\t\t};\n\t} {\n\t\treturn {\n\t\t\t[name]: Object.assign(\n\t\t\t\t(...args: InferArgs<[TProp, TMeta]>) => ({\n\t\t\t\t\tproperty: evalOrStatic(property, ...args),\n\t\t\t\t\tmeta: evalOrStatic(meta, ...args),\n\t\t\t\t}),\n\t\t\t\t{ is, options },\n\t\t\t),\n\t\t} as any;\n\t},\n\n\t/** Returns a CC value definition with the given name and a dynamic `property` */\n\tdynamicPropertyAndKeyWithName<\n\t\tTName extends string,\n\t\tTProp extends FnOrStatic<any[], ValueIDProperties[\"property\"]>,\n\t\tTKey extends FnOrStatic<any[], ValueIDProperties[\"propertyKey\"]>,\n\t\tTOptions extends CCValueOptions,\n\t\tTMeta extends FnOrStatic<any[], ValueMetadata> = ValueMetadata,\n\t>(\n\t\tname: TName,\n\t\tproperty: TProp,\n\t\tpropertyKey: TKey,\n\t\tis: PartialCCValuePredicate,\n\t\tmeta?: TMeta,\n\t\toptions?: TOptions,\n\t): {\n\t\t[K in TName]: {\n\t\t\t(...args: InferArgs<[TProp, TKey, TMeta]>): {\n\t\t\t\tproperty: ReturnTypeOrStatic<TProp>;\n\t\t\t\tpropertyKey: ReturnTypeOrStatic<TKey>;\n\t\t\t\tmeta: ReturnTypeOrStatic<TMeta>;\n\t\t\t};\n\t\t\tis: PartialCCValuePredicate;\n\t\t\toptions: TOptions;\n\t\t};\n\t} {\n\t\treturn {\n\t\t\t[name]: Object.assign(\n\t\t\t\t(...args: any[]) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tproperty: evalOrStatic(property, ...args),\n\t\t\t\t\t\tpropertyKey: evalOrStatic(propertyKey, ...args),\n\t\t\t\t\t\tmeta: evalOrStatic(meta, ...args),\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{ is, options },\n\t\t\t),\n\t\t} as any;\n\t},\n\n\tdefineCCValues,\n};\n\nexport interface CCValueBlueprint extends Readonly<ValueIDProperties> {\n\treadonly meta?: Readonly<ValueMetadata>;\n\treadonly options?: Readonly<CCValueOptions>;\n}\n\nexport type CCValuePredicate = (valueId: ValueID) => boolean;\nexport type PartialCCValuePredicate = (\n\tproperties: ValueIDProperties,\n) => boolean;\n\n/** A blueprint for a CC value which depends on one or more parameters */\nexport interface DynamicCCValueBlueprint<TArgs extends any[]> {\n\t(...args: TArgs): Omit<CCValueBlueprint, \"options\">;\n\tis: PartialCCValuePredicate;\n\treadonly options?: Readonly<CCValueOptions>;\n}\n\n/** The common base type of all CC value definitions */\nexport interface CCValue {\n\treadonly id: Omit<ValueID, \"endpoint\">;\n\tendpoint(endpoint?: number): ValueID;\n\treadonly meta: ValueMetadata;\n}\n\nexport interface StaticCCValue extends CCValue {\n\t/** Whether the given value ID matches this value definition */\n\tis: CCValuePredicate;\n\treadonly options: Required<CCValueOptions>;\n}\n\nexport type DynamicCCValue<TArgs extends any[] = any[]> =\n\tExpandRecursivelySkipMeta<(...args: TArgs) => CCValue> & {\n\t\t/** Whether the given value ID matches this value definition */\n\t\tis: CCValuePredicate;\n\t\treadonly options: Required<CCValueOptions>;\n\t};\n\nexport type StaticCCValueFactory<T> = (self: T) => StaticCCValue;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAQA;;;;;;AAAA,oBAIO;AAEP,gCAAyB;AAIzB,SAAS,eACR,cACA,GAAoE;AAMpE,SAAO,mCAAS,YAAY;AAC7B;AATS;AAmDF,MAAM,wBAAwB;EACpC,UAAU;EACV,YAAY;EACZ,QAAQ;EACR,UAAU;EACV,mBAAmB;EACnB,YAAY;;AAiDN,MAAM,IAAI;;EAEhB,eAKC,UACA,MACA,SAAkB;AAQlB,WAAO;MACN,CAAC,QAAQ,GAAG;QACX;QACA;QACA;;;EAGH;;EAGA,uBAMC,MACA,UACA,MACA,SAAkB;AAQlB,WAAO;MACN,CAAC,IAAI,GAAG;QACP;QACA;QACA;;;EAGH;;EAGA,6BAOC,MACA,UACA,aACA,MACA,SAAkB;AASlB,WAAO;MACN,CAAC,IAAI,GAAG;QACP;QACA;QACA;QACA;;;EAGH;;EAGA,wBAMC,MACA,UACA,IACA,MACA,SAAkB;AAWlB,WAAO;MACN,CAAC,IAAI,GAAG,OAAO,OACd,IAAI,UAAqC;QACxC,cAAU,4BAAa,UAAU,GAAG,IAAI;QACxC,UAAM,4BAAa,MAAM,GAAG,IAAI;UAEjC,EAAE,IAAI,QAAO,CAAE;;EAGlB;;EAGA,8BAOC,MACA,UACA,aACA,IACA,MACA,SAAkB;AAYlB,WAAO;MACN,CAAC,IAAI,GAAG,OAAO,OACd,IAAI,SAAe;AAClB,eAAO;UACN,cAAU,4BAAa,UAAU,GAAG,IAAI;UACxC,iBAAa,4BAAa,aAAa,GAAG,IAAI;UAC9C,UAAM,4BAAa,MAAM,GAAG,IAAI;;MAElC,GACA,EAAE,IAAI,QAAO,CAAE;;EAGlB;EAEA;;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src_gen/lib/_CCAPI.generated.ts"],
4
- "sourcesContent": ["// This file is auto-generated by maintenance/generateCCAPIInterface.ts\n// Do not edit it by hand or your changes will be lost!\n\nimport type { CommandClasses } from \"@zwave-js/core\";\nimport type { CCAPI } from \"./API.js\";\n\n// Maps CC names to their CommandClasses enum values\nexport type CCNameMap = {\n\t\"Alarm Sensor\": typeof CommandClasses[\"Alarm Sensor\"];\n\t\"Application Status\": typeof CommandClasses[\"Application Status\"];\n\t\"Association Group Information\":\n\t\ttypeof CommandClasses[\"Association Group Information\"];\n\t\"Barrier Operator\": typeof CommandClasses[\"Barrier Operator\"];\n\t\"Basic Window Covering\": typeof CommandClasses[\"Basic Window Covering\"];\n\t\"Binary Sensor\": typeof CommandClasses[\"Binary Sensor\"];\n\t\"Binary Switch\": typeof CommandClasses[\"Binary Switch\"];\n\t\"Central Scene\": typeof CommandClasses[\"Central Scene\"];\n\t\"Climate Control Schedule\":\n\t\ttypeof CommandClasses[\"Climate Control Schedule\"];\n\t\"Color Switch\": typeof CommandClasses[\"Color Switch\"];\n\t\"CRC-16 Encapsulation\": typeof CommandClasses[\"CRC-16 Encapsulation\"];\n\t\"Device Reset Locally\": typeof CommandClasses[\"Device Reset Locally\"];\n\t\"Door Lock Logging\": typeof CommandClasses[\"Door Lock Logging\"];\n\t\"Door Lock\": typeof CommandClasses[\"Door Lock\"];\n\t\"Energy Production\": typeof CommandClasses[\"Energy Production\"];\n\t\"Entry Control\": typeof CommandClasses[\"Entry Control\"];\n\t\"Firmware Update Meta Data\":\n\t\ttypeof CommandClasses[\"Firmware Update Meta Data\"];\n\t\"Humidity Control Mode\": typeof CommandClasses[\"Humidity Control Mode\"];\n\t\"Humidity Control Operating State\":\n\t\ttypeof CommandClasses[\"Humidity Control Operating State\"];\n\t\"Humidity Control Setpoint\":\n\t\ttypeof CommandClasses[\"Humidity Control Setpoint\"];\n\t\"Inclusion Controller\": typeof CommandClasses[\"Inclusion Controller\"];\n\t\"Manufacturer Proprietary\":\n\t\ttypeof CommandClasses[\"Manufacturer Proprietary\"];\n\t\"Manufacturer Specific\": typeof CommandClasses[\"Manufacturer Specific\"];\n\t\"Multi Channel Association\":\n\t\ttypeof CommandClasses[\"Multi Channel Association\"];\n\t\"Multi Channel\": typeof CommandClasses[\"Multi Channel\"];\n\t\"Multi Command\": typeof CommandClasses[\"Multi Command\"];\n\t\"Multilevel Sensor\": typeof CommandClasses[\"Multilevel Sensor\"];\n\t\"Multilevel Switch\": typeof CommandClasses[\"Multilevel Switch\"];\n\t\"No Operation\": typeof CommandClasses[\"No Operation\"];\n\t\"Node Naming and Location\":\n\t\ttypeof CommandClasses[\"Node Naming and Location\"];\n\t\"Scene Activation\": typeof CommandClasses[\"Scene Activation\"];\n\t\"Scene Actuator Configuration\":\n\t\ttypeof CommandClasses[\"Scene Actuator Configuration\"];\n\t\"Scene Controller Configuration\":\n\t\ttypeof CommandClasses[\"Scene Controller Configuration\"];\n\t\"Schedule Entry Lock\": typeof CommandClasses[\"Schedule Entry Lock\"];\n\t\"Security 2\": typeof CommandClasses[\"Security 2\"];\n\t\"Sound Switch\": typeof CommandClasses[\"Sound Switch\"];\n\t\"Thermostat Fan Mode\": typeof CommandClasses[\"Thermostat Fan Mode\"];\n\t\"Thermostat Fan State\": typeof CommandClasses[\"Thermostat Fan State\"];\n\t\"Thermostat Mode\": typeof CommandClasses[\"Thermostat Mode\"];\n\t\"Thermostat Operating State\":\n\t\ttypeof CommandClasses[\"Thermostat Operating State\"];\n\t\"Thermostat Setback\": typeof CommandClasses[\"Thermostat Setback\"];\n\t\"Thermostat Setpoint\": typeof CommandClasses[\"Thermostat Setpoint\"];\n\t\"Time Parameters\": typeof CommandClasses[\"Time Parameters\"];\n\t\"User Code\": typeof CommandClasses[\"User Code\"];\n\t\"User Credential\": typeof CommandClasses[\"User Credential\"];\n\t\"Wake Up\": typeof CommandClasses[\"Wake Up\"];\n\t\"Window Covering\": typeof CommandClasses[\"Window Covering\"];\n\t\"Z-Wave Plus Info\": typeof CommandClasses[\"Z-Wave Plus Info\"];\n\tAssociation: typeof CommandClasses[\"Association\"];\n\tBasic: typeof CommandClasses[\"Basic\"];\n\tBattery: typeof CommandClasses[\"Battery\"];\n\tClock: typeof CommandClasses[\"Clock\"];\n\tConfiguration: typeof CommandClasses[\"Configuration\"];\n\tIndicator: typeof CommandClasses[\"Indicator\"];\n\tIrrigation: typeof CommandClasses[\"Irrigation\"];\n\tLanguage: typeof CommandClasses[\"Language\"];\n\tLock: typeof CommandClasses[\"Lock\"];\n\tMeter: typeof CommandClasses[\"Meter\"];\n\tNotification: typeof CommandClasses[\"Notification\"];\n\tPowerlevel: typeof CommandClasses[\"Powerlevel\"];\n\tProtection: typeof CommandClasses[\"Protection\"];\n\tSecurity: typeof CommandClasses[\"Security\"];\n\tSupervision: typeof CommandClasses[\"Supervision\"];\n\tTime: typeof CommandClasses[\"Time\"];\n\tVersion: typeof CommandClasses[\"Version\"];\n};\n\n// Maps CC names to their API class types\nexport interface CCAPIs {\n\t[Symbol.iterator](): Iterator<CCAPI>;\n\n\t\"Alarm Sensor\": import(\"../cc/AlarmSensorCC.js\").AlarmSensorCCAPI;\n\t\"Application Status\":\n\t\timport(\"../cc/ApplicationStatusCC.js\").ApplicationStatusCCAPI;\n\t\"Association Group Information\":\n\t\timport(\"../cc/AssociationGroupInfoCC.js\").AssociationGroupInfoCCAPI;\n\t\"Barrier Operator\":\n\t\timport(\"../cc/BarrierOperatorCC.js\").BarrierOperatorCCAPI;\n\t\"Basic Window Covering\":\n\t\timport(\"../cc/BasicWindowCoveringCC.js\").BasicWindowCoveringCCAPI;\n\t\"Binary Sensor\": import(\"../cc/BinarySensorCC.js\").BinarySensorCCAPI;\n\t\"Binary Switch\": import(\"../cc/BinarySwitchCC.js\").BinarySwitchCCAPI;\n\t\"Central Scene\": import(\"../cc/CentralSceneCC.js\").CentralSceneCCAPI;\n\t\"Climate Control Schedule\":\n\t\timport(\"../cc/ClimateControlScheduleCC.js\").ClimateControlScheduleCCAPI;\n\t\"Color Switch\": import(\"../cc/ColorSwitchCC.js\").ColorSwitchCCAPI;\n\t\"CRC-16 Encapsulation\": import(\"../cc/CRC16CC.js\").CRC16CCAPI;\n\t\"Device Reset Locally\":\n\t\timport(\"../cc/DeviceResetLocallyCC.js\").DeviceResetLocallyCCAPI;\n\t\"Door Lock Logging\":\n\t\timport(\"../cc/DoorLockLoggingCC.js\").DoorLockLoggingCCAPI;\n\t\"Door Lock\": import(\"../cc/DoorLockCC.js\").DoorLockCCAPI;\n\t\"Energy Production\":\n\t\timport(\"../cc/EnergyProductionCC.js\").EnergyProductionCCAPI;\n\t\"Entry Control\": import(\"../cc/EntryControlCC.js\").EntryControlCCAPI;\n\t\"Firmware Update Meta Data\":\n\t\timport(\"../cc/FirmwareUpdateMetaDataCC.js\").FirmwareUpdateMetaDataCCAPI;\n\t\"Humidity Control Mode\":\n\t\timport(\"../cc/HumidityControlModeCC.js\").HumidityControlModeCCAPI;\n\t\"Humidity Control Operating State\":\n\t\timport(\"../cc/HumidityControlOperatingStateCC.js\").HumidityControlOperatingStateCCAPI;\n\t\"Humidity Control Setpoint\":\n\t\timport(\"../cc/HumidityControlSetpointCC.js\").HumidityControlSetpointCCAPI;\n\t\"Inclusion Controller\":\n\t\timport(\"../cc/InclusionControllerCC.js\").InclusionControllerCCAPI;\n\t\"Manufacturer Proprietary\":\n\t\timport(\"../cc/ManufacturerProprietaryCC.js\").ManufacturerProprietaryCCAPI;\n\t\"Manufacturer Specific\":\n\t\timport(\"../cc/ManufacturerSpecificCC.js\").ManufacturerSpecificCCAPI;\n\t\"Multi Channel Association\":\n\t\timport(\"../cc/MultiChannelAssociationCC.js\").MultiChannelAssociationCCAPI;\n\t\"Multi Channel\": import(\"../cc/MultiChannelCC.js\").MultiChannelCCAPI;\n\t\"Multi Command\": import(\"../cc/MultiCommandCC.js\").MultiCommandCCAPI;\n\t\"Multilevel Sensor\":\n\t\timport(\"../cc/MultilevelSensorCC.js\").MultilevelSensorCCAPI;\n\t\"Multilevel Switch\":\n\t\timport(\"../cc/MultilevelSwitchCC.js\").MultilevelSwitchCCAPI;\n\t\"No Operation\": import(\"../cc/NoOperationCC.js\").NoOperationCCAPI;\n\t\"Node Naming and Location\":\n\t\timport(\"../cc/NodeNamingCC.js\").NodeNamingAndLocationCCAPI;\n\t\"Scene Activation\":\n\t\timport(\"../cc/SceneActivationCC.js\").SceneActivationCCAPI;\n\t\"Scene Actuator Configuration\":\n\t\timport(\"../cc/SceneActuatorConfigurationCC.js\").SceneActuatorConfigurationCCAPI;\n\t\"Scene Controller Configuration\":\n\t\timport(\"../cc/SceneControllerConfigurationCC.js\").SceneControllerConfigurationCCAPI;\n\t\"Schedule Entry Lock\":\n\t\timport(\"../cc/ScheduleEntryLockCC.js\").ScheduleEntryLockCCAPI;\n\t\"Security 2\": import(\"../cc/Security2CC.js\").Security2CCAPI;\n\t\"Sound Switch\": import(\"../cc/SoundSwitchCC.js\").SoundSwitchCCAPI;\n\t\"Thermostat Fan Mode\":\n\t\timport(\"../cc/ThermostatFanModeCC.js\").ThermostatFanModeCCAPI;\n\t\"Thermostat Fan State\":\n\t\timport(\"../cc/ThermostatFanStateCC.js\").ThermostatFanStateCCAPI;\n\t\"Thermostat Mode\": import(\"../cc/ThermostatModeCC.js\").ThermostatModeCCAPI;\n\t\"Thermostat Operating State\":\n\t\timport(\"../cc/ThermostatOperatingStateCC.js\").ThermostatOperatingStateCCAPI;\n\t\"Thermostat Setback\":\n\t\timport(\"../cc/ThermostatSetbackCC.js\").ThermostatSetbackCCAPI;\n\t\"Thermostat Setpoint\":\n\t\timport(\"../cc/ThermostatSetpointCC.js\").ThermostatSetpointCCAPI;\n\t\"Time Parameters\": import(\"../cc/TimeParametersCC.js\").TimeParametersCCAPI;\n\t\"User Code\": import(\"../cc/UserCodeCC.js\").UserCodeCCAPI;\n\t\"User Credential\": import(\"../cc/UserCredentialCC.js\").UserCredentialCCAPI;\n\t\"Wake Up\": import(\"../cc/WakeUpCC.js\").WakeUpCCAPI;\n\t\"Window Covering\": import(\"../cc/WindowCoveringCC.js\").WindowCoveringCCAPI;\n\t\"Z-Wave Plus Info\": import(\"../cc/ZWavePlusCC.js\").ZWavePlusCCAPI;\n\tAssociation: import(\"../cc/AssociationCC.js\").AssociationCCAPI;\n\tBasic: import(\"../cc/BasicCC.js\").BasicCCAPI;\n\tBattery: import(\"../cc/BatteryCC.js\").BatteryCCAPI;\n\tClock: import(\"../cc/ClockCC.js\").ClockCCAPI;\n\tConfiguration: import(\"../cc/ConfigurationCC.js\").ConfigurationCCAPI;\n\tIndicator: import(\"../cc/IndicatorCC.js\").IndicatorCCAPI;\n\tIrrigation: import(\"../cc/IrrigationCC.js\").IrrigationCCAPI;\n\tLanguage: import(\"../cc/LanguageCC.js\").LanguageCCAPI;\n\tLock: import(\"../cc/LockCC.js\").LockCCAPI;\n\tMeter: import(\"../cc/MeterCC.js\").MeterCCAPI;\n\tNotification: import(\"../cc/NotificationCC.js\").NotificationCCAPI;\n\tPowerlevel: import(\"../cc/PowerlevelCC.js\").PowerlevelCCAPI;\n\tProtection: import(\"../cc/ProtectionCC.js\").ProtectionCCAPI;\n\tSecurity: import(\"../cc/SecurityCC.js\").SecurityCCAPI;\n\tSupervision: import(\"../cc/SupervisionCC.js\").SupervisionCCAPI;\n\tTime: import(\"../cc/TimeCC.js\").TimeCCAPI;\n\tVersion: import(\"../cc/VersionCC.js\").VersionCCAPI;\n}\n"],
4
+ "sourcesContent": ["// This file is auto-generated by maintenance/generateCCAPIInterface.ts\n// Do not edit it by hand or your changes will be lost!\n\nimport type { CommandClasses } from \"@zwave-js/core\";\n\nimport type { CCAPI } from \"./API.js\";\n\n// Maps CC names to their CommandClasses enum values\nexport type CCNameMap = {\n\t\"Alarm Sensor\": (typeof CommandClasses)[\"Alarm Sensor\"];\n\t\"Application Status\": (typeof CommandClasses)[\"Application Status\"];\n\t\"Association Group Information\": (typeof CommandClasses)[\"Association Group Information\"];\n\t\"Barrier Operator\": (typeof CommandClasses)[\"Barrier Operator\"];\n\t\"Basic Window Covering\": (typeof CommandClasses)[\"Basic Window Covering\"];\n\t\"Binary Sensor\": (typeof CommandClasses)[\"Binary Sensor\"];\n\t\"Binary Switch\": (typeof CommandClasses)[\"Binary Switch\"];\n\t\"Central Scene\": (typeof CommandClasses)[\"Central Scene\"];\n\t\"Climate Control Schedule\": (typeof CommandClasses)[\"Climate Control Schedule\"];\n\t\"Color Switch\": (typeof CommandClasses)[\"Color Switch\"];\n\t\"CRC-16 Encapsulation\": (typeof CommandClasses)[\"CRC-16 Encapsulation\"];\n\t\"Device Reset Locally\": (typeof CommandClasses)[\"Device Reset Locally\"];\n\t\"Door Lock Logging\": (typeof CommandClasses)[\"Door Lock Logging\"];\n\t\"Door Lock\": (typeof CommandClasses)[\"Door Lock\"];\n\t\"Energy Production\": (typeof CommandClasses)[\"Energy Production\"];\n\t\"Entry Control\": (typeof CommandClasses)[\"Entry Control\"];\n\t\"Firmware Update Meta Data\": (typeof CommandClasses)[\"Firmware Update Meta Data\"];\n\t\"Humidity Control Mode\": (typeof CommandClasses)[\"Humidity Control Mode\"];\n\t\"Humidity Control Operating State\": (typeof CommandClasses)[\"Humidity Control Operating State\"];\n\t\"Humidity Control Setpoint\": (typeof CommandClasses)[\"Humidity Control Setpoint\"];\n\t\"Inclusion Controller\": (typeof CommandClasses)[\"Inclusion Controller\"];\n\t\"Manufacturer Proprietary\": (typeof CommandClasses)[\"Manufacturer Proprietary\"];\n\t\"Manufacturer Specific\": (typeof CommandClasses)[\"Manufacturer Specific\"];\n\t\"Multi Channel Association\": (typeof CommandClasses)[\"Multi Channel Association\"];\n\t\"Multi Channel\": (typeof CommandClasses)[\"Multi Channel\"];\n\t\"Multi Command\": (typeof CommandClasses)[\"Multi Command\"];\n\t\"Multilevel Sensor\": (typeof CommandClasses)[\"Multilevel Sensor\"];\n\t\"Multilevel Switch\": (typeof CommandClasses)[\"Multilevel Switch\"];\n\t\"No Operation\": (typeof CommandClasses)[\"No Operation\"];\n\t\"Node Naming and Location\": (typeof CommandClasses)[\"Node Naming and Location\"];\n\t\"Scene Activation\": (typeof CommandClasses)[\"Scene Activation\"];\n\t\"Scene Actuator Configuration\": (typeof CommandClasses)[\"Scene Actuator Configuration\"];\n\t\"Scene Controller Configuration\": (typeof CommandClasses)[\"Scene Controller Configuration\"];\n\t\"Schedule Entry Lock\": (typeof CommandClasses)[\"Schedule Entry Lock\"];\n\t\"Security 2\": (typeof CommandClasses)[\"Security 2\"];\n\t\"Sound Switch\": (typeof CommandClasses)[\"Sound Switch\"];\n\t\"Thermostat Fan Mode\": (typeof CommandClasses)[\"Thermostat Fan Mode\"];\n\t\"Thermostat Fan State\": (typeof CommandClasses)[\"Thermostat Fan State\"];\n\t\"Thermostat Mode\": (typeof CommandClasses)[\"Thermostat Mode\"];\n\t\"Thermostat Operating State\": (typeof CommandClasses)[\"Thermostat Operating State\"];\n\t\"Thermostat Setback\": (typeof CommandClasses)[\"Thermostat Setback\"];\n\t\"Thermostat Setpoint\": (typeof CommandClasses)[\"Thermostat Setpoint\"];\n\t\"Time Parameters\": (typeof CommandClasses)[\"Time Parameters\"];\n\t\"User Code\": (typeof CommandClasses)[\"User Code\"];\n\t\"User Credential\": (typeof CommandClasses)[\"User Credential\"];\n\t\"Wake Up\": (typeof CommandClasses)[\"Wake Up\"];\n\t\"Window Covering\": (typeof CommandClasses)[\"Window Covering\"];\n\t\"Z-Wave Plus Info\": (typeof CommandClasses)[\"Z-Wave Plus Info\"];\n\tAssociation: (typeof CommandClasses)[\"Association\"];\n\tBasic: (typeof CommandClasses)[\"Basic\"];\n\tBattery: (typeof CommandClasses)[\"Battery\"];\n\tClock: (typeof CommandClasses)[\"Clock\"];\n\tConfiguration: (typeof CommandClasses)[\"Configuration\"];\n\tIndicator: (typeof CommandClasses)[\"Indicator\"];\n\tIrrigation: (typeof CommandClasses)[\"Irrigation\"];\n\tLanguage: (typeof CommandClasses)[\"Language\"];\n\tLock: (typeof CommandClasses)[\"Lock\"];\n\tMeter: (typeof CommandClasses)[\"Meter\"];\n\tNotification: (typeof CommandClasses)[\"Notification\"];\n\tPowerlevel: (typeof CommandClasses)[\"Powerlevel\"];\n\tProtection: (typeof CommandClasses)[\"Protection\"];\n\tSecurity: (typeof CommandClasses)[\"Security\"];\n\tSupervision: (typeof CommandClasses)[\"Supervision\"];\n\tTime: (typeof CommandClasses)[\"Time\"];\n\tVersion: (typeof CommandClasses)[\"Version\"];\n};\n\n// Maps CC names to their API class types\nexport interface CCAPIs {\n\t[Symbol.iterator](): Iterator<CCAPI>;\n\n\t\"Alarm Sensor\": import(\"../cc/AlarmSensorCC.js\").AlarmSensorCCAPI;\n\t\"Application Status\": import(\"../cc/ApplicationStatusCC.js\").ApplicationStatusCCAPI;\n\t\"Association Group Information\": import(\"../cc/AssociationGroupInfoCC.js\").AssociationGroupInfoCCAPI;\n\t\"Barrier Operator\": import(\"../cc/BarrierOperatorCC.js\").BarrierOperatorCCAPI;\n\t\"Basic Window Covering\": import(\"../cc/BasicWindowCoveringCC.js\").BasicWindowCoveringCCAPI;\n\t\"Binary Sensor\": import(\"../cc/BinarySensorCC.js\").BinarySensorCCAPI;\n\t\"Binary Switch\": import(\"../cc/BinarySwitchCC.js\").BinarySwitchCCAPI;\n\t\"Central Scene\": import(\"../cc/CentralSceneCC.js\").CentralSceneCCAPI;\n\t\"Climate Control Schedule\": import(\"../cc/ClimateControlScheduleCC.js\").ClimateControlScheduleCCAPI;\n\t\"Color Switch\": import(\"../cc/ColorSwitchCC.js\").ColorSwitchCCAPI;\n\t\"CRC-16 Encapsulation\": import(\"../cc/CRC16CC.js\").CRC16CCAPI;\n\t\"Device Reset Locally\": import(\"../cc/DeviceResetLocallyCC.js\").DeviceResetLocallyCCAPI;\n\t\"Door Lock Logging\": import(\"../cc/DoorLockLoggingCC.js\").DoorLockLoggingCCAPI;\n\t\"Door Lock\": import(\"../cc/DoorLockCC.js\").DoorLockCCAPI;\n\t\"Energy Production\": import(\"../cc/EnergyProductionCC.js\").EnergyProductionCCAPI;\n\t\"Entry Control\": import(\"../cc/EntryControlCC.js\").EntryControlCCAPI;\n\t\"Firmware Update Meta Data\": import(\"../cc/FirmwareUpdateMetaDataCC.js\").FirmwareUpdateMetaDataCCAPI;\n\t\"Humidity Control Mode\": import(\"../cc/HumidityControlModeCC.js\").HumidityControlModeCCAPI;\n\t\"Humidity Control Operating State\": import(\"../cc/HumidityControlOperatingStateCC.js\").HumidityControlOperatingStateCCAPI;\n\t\"Humidity Control Setpoint\": import(\"../cc/HumidityControlSetpointCC.js\").HumidityControlSetpointCCAPI;\n\t\"Inclusion Controller\": import(\"../cc/InclusionControllerCC.js\").InclusionControllerCCAPI;\n\t\"Manufacturer Proprietary\": import(\"../cc/ManufacturerProprietaryCC.js\").ManufacturerProprietaryCCAPI;\n\t\"Manufacturer Specific\": import(\"../cc/ManufacturerSpecificCC.js\").ManufacturerSpecificCCAPI;\n\t\"Multi Channel Association\": import(\"../cc/MultiChannelAssociationCC.js\").MultiChannelAssociationCCAPI;\n\t\"Multi Channel\": import(\"../cc/MultiChannelCC.js\").MultiChannelCCAPI;\n\t\"Multi Command\": import(\"../cc/MultiCommandCC.js\").MultiCommandCCAPI;\n\t\"Multilevel Sensor\": import(\"../cc/MultilevelSensorCC.js\").MultilevelSensorCCAPI;\n\t\"Multilevel Switch\": import(\"../cc/MultilevelSwitchCC.js\").MultilevelSwitchCCAPI;\n\t\"No Operation\": import(\"../cc/NoOperationCC.js\").NoOperationCCAPI;\n\t\"Node Naming and Location\": import(\"../cc/NodeNamingCC.js\").NodeNamingAndLocationCCAPI;\n\t\"Scene Activation\": import(\"../cc/SceneActivationCC.js\").SceneActivationCCAPI;\n\t\"Scene Actuator Configuration\": import(\"../cc/SceneActuatorConfigurationCC.js\").SceneActuatorConfigurationCCAPI;\n\t\"Scene Controller Configuration\": import(\"../cc/SceneControllerConfigurationCC.js\").SceneControllerConfigurationCCAPI;\n\t\"Schedule Entry Lock\": import(\"../cc/ScheduleEntryLockCC.js\").ScheduleEntryLockCCAPI;\n\t\"Security 2\": import(\"../cc/Security2CC.js\").Security2CCAPI;\n\t\"Sound Switch\": import(\"../cc/SoundSwitchCC.js\").SoundSwitchCCAPI;\n\t\"Thermostat Fan Mode\": import(\"../cc/ThermostatFanModeCC.js\").ThermostatFanModeCCAPI;\n\t\"Thermostat Fan State\": import(\"../cc/ThermostatFanStateCC.js\").ThermostatFanStateCCAPI;\n\t\"Thermostat Mode\": import(\"../cc/ThermostatModeCC.js\").ThermostatModeCCAPI;\n\t\"Thermostat Operating State\": import(\"../cc/ThermostatOperatingStateCC.js\").ThermostatOperatingStateCCAPI;\n\t\"Thermostat Setback\": import(\"../cc/ThermostatSetbackCC.js\").ThermostatSetbackCCAPI;\n\t\"Thermostat Setpoint\": import(\"../cc/ThermostatSetpointCC.js\").ThermostatSetpointCCAPI;\n\t\"Time Parameters\": import(\"../cc/TimeParametersCC.js\").TimeParametersCCAPI;\n\t\"User Code\": import(\"../cc/UserCodeCC.js\").UserCodeCCAPI;\n\t\"User Credential\": import(\"../cc/UserCredentialCC.js\").UserCredentialCCAPI;\n\t\"Wake Up\": import(\"../cc/WakeUpCC.js\").WakeUpCCAPI;\n\t\"Window Covering\": import(\"../cc/WindowCoveringCC.js\").WindowCoveringCCAPI;\n\t\"Z-Wave Plus Info\": import(\"../cc/ZWavePlusCC.js\").ZWavePlusCCAPI;\n\tAssociation: import(\"../cc/AssociationCC.js\").AssociationCCAPI;\n\tBasic: import(\"../cc/BasicCC.js\").BasicCCAPI;\n\tBattery: import(\"../cc/BatteryCC.js\").BatteryCCAPI;\n\tClock: import(\"../cc/ClockCC.js\").ClockCCAPI;\n\tConfiguration: import(\"../cc/ConfigurationCC.js\").ConfigurationCCAPI;\n\tIndicator: import(\"../cc/IndicatorCC.js\").IndicatorCCAPI;\n\tIrrigation: import(\"../cc/IrrigationCC.js\").IrrigationCCAPI;\n\tLanguage: import(\"../cc/LanguageCC.js\").LanguageCCAPI;\n\tLock: import(\"../cc/LockCC.js\").LockCCAPI;\n\tMeter: import(\"../cc/MeterCC.js\").MeterCCAPI;\n\tNotification: import(\"../cc/NotificationCC.js\").NotificationCCAPI;\n\tPowerlevel: import(\"../cc/PowerlevelCC.js\").PowerlevelCCAPI;\n\tProtection: import(\"../cc/ProtectionCC.js\").ProtectionCCAPI;\n\tSecurity: import(\"../cc/SecurityCC.js\").SecurityCCAPI;\n\tSupervision: import(\"../cc/SupervisionCC.js\").SupervisionCCAPI;\n\tTime: import(\"../cc/TimeCC.js\").TimeCCAPI;\n\tVersion: import(\"../cc/VersionCC.js\").VersionCCAPI;\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;AAAA;;",
6
6
  "names": []
7
7
  }
@@ -707,18 +707,18 @@ export declare enum HumidityControlModeCommand {
707
707
  SupportedReport = 5
708
708
  }
709
709
  export declare enum HumidityControlMode {
710
- "Off" = 0,
711
- "Humidify" = 1,
710
+ Off = 0,
711
+ Humidify = 1,
712
712
  "De-humidify" = 2,
713
- "Auto" = 3
713
+ Auto = 3
714
714
  }
715
715
  export declare enum HumidityControlOperatingStateCommand {
716
716
  Get = 1,
717
717
  Report = 2
718
718
  }
719
719
  export declare enum HumidityControlOperatingState {
720
- "Idle" = 0,
721
- "Humidifying" = 1,
720
+ Idle = 0,
721
+ Humidifying = 1,
722
722
  "De-humidifying" = 2
723
723
  }
724
724
  export declare enum HumidityControlSetpointCommand {
@@ -734,9 +734,9 @@ export declare enum HumidityControlSetpointCommand {
734
734
  }
735
735
  export declare enum HumidityControlSetpointType {
736
736
  "N/A" = 0,
737
- "Humidifier" = 1,// CC v1
737
+ Humidifier = 1,// CC v1
738
738
  "De-humidifier" = 2,// CC v1
739
- "Auto" = 3
739
+ Auto = 3
740
740
  }
741
741
  export interface HumidityControlSetpointValue {
742
742
  value: number;
@@ -938,8 +938,8 @@ export declare enum MultilevelSwitchCommand {
938
938
  SupportedReport = 7
939
939
  }
940
940
  export declare enum LevelChangeDirection {
941
- "up" = 0,
942
- "down" = 1
941
+ up = 0,
942
+ down = 1
943
943
  }
944
944
  export declare enum SwitchType {
945
945
  "not supported" = 0,
@@ -1167,16 +1167,16 @@ export declare enum ThermostatFanModeCommand {
1167
1167
  }
1168
1168
  export declare enum ThermostatFanMode {
1169
1169
  "Auto low" = 0,
1170
- "Low" = 1,
1170
+ Low = 1,
1171
1171
  "Auto high" = 2,
1172
- "High" = 3,
1172
+ High = 3,
1173
1173
  "Auto medium" = 4,
1174
- "Medium" = 5,
1175
- "Circulation" = 6,
1174
+ Medium = 5,
1175
+ Circulation = 6,
1176
1176
  "Humidity circulation" = 7,
1177
1177
  "Left and right" = 8,
1178
1178
  "Up and down" = 9,
1179
- "Quiet" = 10,
1179
+ Quiet = 10,
1180
1180
  "External circulation" = 11
1181
1181
  }
1182
1182
  export declare enum ThermostatFanStateCommand {
@@ -1202,20 +1202,20 @@ export declare enum ThermostatModeCommand {
1202
1202
  SupportedReport = 5
1203
1203
  }
1204
1204
  export declare enum ThermostatMode {
1205
- "Off" = 0,
1206
- "Heat" = 1,
1207
- "Cool" = 2,
1208
- "Auto" = 3,
1209
- "Auxiliary" = 4,
1205
+ Off = 0,
1206
+ Heat = 1,
1207
+ Cool = 2,
1208
+ Auto = 3,
1209
+ Auxiliary = 4,
1210
1210
  "Resume (on)" = 5,
1211
- "Fan" = 6,
1212
- "Furnace" = 7,
1213
- "Dry" = 8,
1214
- "Moist" = 9,
1211
+ Fan = 6,
1212
+ Furnace = 7,
1213
+ Dry = 8,
1214
+ Moist = 9,
1215
1215
  "Auto changeover" = 10,
1216
1216
  "Energy heat" = 11,
1217
1217
  "Energy cool" = 12,
1218
- "Away" = 13,
1218
+ Away = 13,
1219
1219
  "Full power" = 15,
1220
1220
  "Manufacturer specific" = 31
1221
1221
  }
@@ -1228,9 +1228,9 @@ export declare enum ThermostatOperatingStateCommand {
1228
1228
  LoggingReport = 6
1229
1229
  }
1230
1230
  export declare enum ThermostatOperatingState {
1231
- "Idle" = 0,
1232
- "Heating" = 1,
1233
- "Cooling" = 2,
1231
+ Idle = 0,
1232
+ Heating = 1,
1233
+ Cooling = 2,
1234
1234
  "Fan Only" = 3,
1235
1235
  "Pending Heat" = 4,
1236
1236
  "Pending Cool" = 5,
@@ -1275,9 +1275,9 @@ export declare enum ThermostatSetpointCommand {
1275
1275
  }
1276
1276
  export declare enum ThermostatSetpointType {
1277
1277
  "N/A" = 0,
1278
- "Heating" = 1,// CC v1
1279
- "Cooling" = 2,// CC v1
1280
- "Furnace" = 7,// CC v1
1278
+ Heating = 1,// CC v1
1279
+ Cooling = 2,// CC v1
1280
+ Furnace = 7,// CC v1
1281
1281
  "Dry Air" = 8,// CC v1
1282
1282
  "Moist Air" = 9,// CC v1
1283
1283
  "Auto Changeover" = 10,// CC v1