@zwave-js/cc 14.0.0-beta.1 → 14.0.0-beta.4

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 (922) hide show
  1. package/build/cjs/cc/AlarmSensorCC.d.ts +194 -0
  2. package/build/cjs/cc/AlarmSensorCC.js +395 -0
  3. package/build/cjs/cc/AlarmSensorCC.js.map +7 -0
  4. package/build/cjs/cc/AssociationCC.d.ts +253 -0
  5. package/build/cjs/cc/AssociationCC.js +711 -0
  6. package/build/cjs/cc/AssociationCC.js.map +7 -0
  7. package/build/cjs/cc/AssociationGroupInfoCC.d.ts +230 -0
  8. package/build/cjs/cc/AssociationGroupInfoCC.js +746 -0
  9. package/build/cjs/cc/AssociationGroupInfoCC.js.map +7 -0
  10. package/build/cjs/cc/BarrierOperatorCC.d.ts +243 -0
  11. package/build/cjs/cc/BarrierOperatorCC.js +582 -0
  12. package/build/cjs/cc/BarrierOperatorCC.js.map +7 -0
  13. package/build/cjs/cc/BasicCC.d.ts +191 -0
  14. package/build/cjs/cc/BasicCC.js +384 -0
  15. package/build/cjs/cc/BasicCC.js.map +7 -0
  16. package/build/cjs/cc/BatteryCC.d.ts +406 -0
  17. package/build/cjs/cc/BatteryCC.js +508 -0
  18. package/build/cjs/cc/BatteryCC.js.map +7 -0
  19. package/build/cjs/cc/BinarySensorCC.d.ts +122 -0
  20. package/build/cjs/cc/BinarySensorCC.js +431 -0
  21. package/build/cjs/cc/BinarySensorCC.js.map +7 -0
  22. package/build/cjs/cc/BinarySwitchCC.d.ts +139 -0
  23. package/build/cjs/cc/BinarySwitchCC.js +378 -0
  24. package/build/cjs/cc/BinarySwitchCC.js.map +7 -0
  25. package/build/cjs/cc/CRC16CC.d.ts +29 -0
  26. package/build/cjs/cc/CRC16CC.js +133 -0
  27. package/build/cjs/cc/CRC16CC.js.map +7 -0
  28. package/build/cjs/cc/CentralSceneCC.d.ts +210 -0
  29. package/build/cjs/cc/CentralSceneCC.js +449 -0
  30. package/build/cjs/cc/CentralSceneCC.js.map +7 -0
  31. package/build/cjs/cc/ClimateControlScheduleCC.d.ts +177 -0
  32. package/build/cjs/cc/ClimateControlScheduleCC.js +480 -0
  33. package/build/cjs/cc/ClimateControlScheduleCC.js.map +7 -0
  34. package/build/cjs/cc/ClockCC.d.ts +47 -0
  35. package/build/cjs/cc/ClockCC.js +226 -0
  36. package/build/cjs/cc/ClockCC.js.map +7 -0
  37. package/build/cjs/cc/ColorSwitchCC.d.ts +339 -0
  38. package/build/cjs/cc/ColorSwitchCC.js +1117 -0
  39. package/build/cjs/cc/ColorSwitchCC.js.map +7 -0
  40. package/build/cjs/cc/ConfigurationCC.d.ts +396 -0
  41. package/build/cjs/cc/ConfigurationCC.js +2230 -0
  42. package/build/cjs/cc/ConfigurationCC.js.map +7 -0
  43. package/build/cjs/cc/DeviceResetLocallyCC.d.ts +17 -0
  44. package/build/cjs/cc/DeviceResetLocallyCC.js +92 -0
  45. package/build/cjs/cc/DeviceResetLocallyCC.js.map +7 -0
  46. package/build/cjs/cc/DoorLockCC.d.ts +837 -0
  47. package/build/cjs/cc/DoorLockCC.js +1239 -0
  48. package/build/cjs/cc/DoorLockCC.js.map +7 -0
  49. package/build/cjs/cc/DoorLockLoggingCC.d.ts +77 -0
  50. package/build/cjs/cc/DoorLockLoggingCC.js +343 -0
  51. package/build/cjs/cc/DoorLockLoggingCC.js.map +7 -0
  52. package/build/cjs/cc/EnergyProductionCC.d.ts +77 -0
  53. package/build/cjs/cc/EnergyProductionCC.js +240 -0
  54. package/build/cjs/cc/EnergyProductionCC.js.map +7 -0
  55. package/build/cjs/cc/EntryControlCC.d.ts +231 -0
  56. package/build/cjs/cc/EntryControlCC.js +593 -0
  57. package/build/cjs/cc/EntryControlCC.js.map +7 -0
  58. package/build/cjs/cc/FirmwareUpdateMetaDataCC.d.ts +359 -0
  59. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +1122 -0
  60. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +7 -0
  61. package/build/cjs/cc/HailCC.d.ts +6 -0
  62. package/build/cjs/cc/HailCC.js +45 -0
  63. package/build/cjs/cc/HailCC.js.map +7 -0
  64. package/build/cjs/cc/HumidityControlModeCC.d.ts +111 -0
  65. package/build/cjs/cc/HumidityControlModeCC.js +323 -0
  66. package/build/cjs/cc/HumidityControlModeCC.js.map +7 -0
  67. package/build/cjs/cc/HumidityControlOperatingStateCC.d.ts +60 -0
  68. package/build/cjs/cc/HumidityControlOperatingStateCC.js +164 -0
  69. package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +7 -0
  70. package/build/cjs/cc/HumidityControlSetpointCC.d.ts +209 -0
  71. package/build/cjs/cc/HumidityControlSetpointCC.js +634 -0
  72. package/build/cjs/cc/HumidityControlSetpointCC.js.map +7 -0
  73. package/build/cjs/cc/InclusionControllerCC.d.ts +42 -0
  74. package/build/cjs/cc/InclusionControllerCC.js +160 -0
  75. package/build/cjs/cc/InclusionControllerCC.js.map +7 -0
  76. package/build/cjs/cc/IndicatorCC.d.ts +338 -0
  77. package/build/cjs/cc/IndicatorCC.js +1234 -0
  78. package/build/cjs/cc/IndicatorCC.js.map +7 -0
  79. package/build/cjs/cc/IrrigationCC.d.ts +1496 -0
  80. package/build/cjs/cc/IrrigationCC.js +1978 -0
  81. package/build/cjs/cc/IrrigationCC.js.map +7 -0
  82. package/build/cjs/cc/LanguageCC.d.ts +101 -0
  83. package/build/cjs/cc/LanguageCC.js +267 -0
  84. package/build/cjs/cc/LanguageCC.js.map +7 -0
  85. package/build/cjs/cc/LockCC.d.ts +73 -0
  86. package/build/cjs/cc/LockCC.js +222 -0
  87. package/build/cjs/cc/LockCC.js.map +7 -0
  88. package/build/cjs/cc/ManufacturerProprietaryCC.d.ts +32 -0
  89. package/build/cjs/cc/ManufacturerProprietaryCC.js +209 -0
  90. package/build/cjs/cc/ManufacturerProprietaryCC.js.map +7 -0
  91. package/build/cjs/cc/ManufacturerSpecificCC.d.ts +171 -0
  92. package/build/cjs/cc/ManufacturerSpecificCC.js +334 -0
  93. package/build/cjs/cc/ManufacturerSpecificCC.js.map +7 -0
  94. package/build/cjs/cc/MeterCC.d.ts +318 -0
  95. package/build/cjs/cc/MeterCC.js +1235 -0
  96. package/build/cjs/cc/MeterCC.js.map +7 -0
  97. package/build/cjs/cc/MultiChannelAssociationCC.d.ts +241 -0
  98. package/build/cjs/cc/MultiChannelAssociationCC.js +956 -0
  99. package/build/cjs/cc/MultiChannelAssociationCC.js.map +7 -0
  100. package/build/cjs/cc/MultiChannelCC.d.ts +394 -0
  101. package/build/cjs/cc/MultiChannelCC.js +1050 -0
  102. package/build/cjs/cc/MultiChannelCC.js.map +7 -0
  103. package/build/cjs/cc/MultiCommandCC.d.ts +27 -0
  104. package/build/cjs/cc/MultiCommandCC.js +159 -0
  105. package/build/cjs/cc/MultiCommandCC.js.map +7 -0
  106. package/build/cjs/cc/MultilevelSensorCC.d.ts +185 -0
  107. package/build/cjs/cc/MultilevelSensorCC.js +716 -0
  108. package/build/cjs/cc/MultilevelSensorCC.js.map +7 -0
  109. package/build/cjs/cc/MultilevelSwitchCC.d.ts +357 -0
  110. package/build/cjs/cc/MultilevelSwitchCC.js +780 -0
  111. package/build/cjs/cc/MultilevelSwitchCC.js.map +7 -0
  112. package/build/cjs/cc/NoOperationCC.d.ts +9 -0
  113. package/build/cjs/cc/NoOperationCC.js +64 -0
  114. package/build/cjs/cc/NoOperationCC.js.map +7 -0
  115. package/build/cjs/cc/NodeNamingCC.d.ts +118 -0
  116. package/build/cjs/cc/NodeNamingCC.js +364 -0
  117. package/build/cjs/cc/NodeNamingCC.js.map +7 -0
  118. package/build/cjs/cc/NotificationCC.d.ts +479 -0
  119. package/build/cjs/cc/NotificationCC.js +1245 -0
  120. package/build/cjs/cc/NotificationCC.js.map +7 -0
  121. package/build/cjs/cc/PowerlevelCC.d.ts +82 -0
  122. package/build/cjs/cc/PowerlevelCC.js +510 -0
  123. package/build/cjs/cc/PowerlevelCC.js.map +7 -0
  124. package/build/cjs/cc/ProtectionCC.d.ts +325 -0
  125. package/build/cjs/cc/ProtectionCC.js +667 -0
  126. package/build/cjs/cc/ProtectionCC.js.map +7 -0
  127. package/build/cjs/cc/SceneActivationCC.d.ts +89 -0
  128. package/build/cjs/cc/SceneActivationCC.js +193 -0
  129. package/build/cjs/cc/SceneActivationCC.js.map +7 -0
  130. package/build/cjs/cc/SceneActuatorConfigurationCC.d.ts +120 -0
  131. package/build/cjs/cc/SceneActuatorConfigurationCC.js +370 -0
  132. package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +7 -0
  133. package/build/cjs/cc/SceneControllerConfigurationCC.d.ts +129 -0
  134. package/build/cjs/cc/SceneControllerConfigurationCC.js +423 -0
  135. package/build/cjs/cc/SceneControllerConfigurationCC.js.map +7 -0
  136. package/build/cjs/cc/ScheduleEntryLockCC.d.ts +434 -0
  137. package/build/cjs/cc/ScheduleEntryLockCC.js +1763 -0
  138. package/build/cjs/cc/ScheduleEntryLockCC.js.map +7 -0
  139. package/build/cjs/cc/Security2CC.d.ts +251 -0
  140. package/build/cjs/cc/Security2CC.js +1589 -0
  141. package/build/cjs/cc/Security2CC.js.map +7 -0
  142. package/build/cjs/cc/SecurityCC.d.ts +128 -0
  143. package/build/cjs/cc/SecurityCC.js +757 -0
  144. package/build/cjs/cc/SecurityCC.js.map +7 -0
  145. package/build/cjs/cc/SoundSwitchCC.d.ts +232 -0
  146. package/build/cjs/cc/SoundSwitchCC.js +661 -0
  147. package/build/cjs/cc/SoundSwitchCC.js.map +7 -0
  148. package/build/cjs/cc/SupervisionCC.d.ts +104 -0
  149. package/build/cjs/cc/SupervisionCC.js +308 -0
  150. package/build/cjs/cc/SupervisionCC.js.map +7 -0
  151. package/build/cjs/cc/ThermostatFanModeCC.d.ts +141 -0
  152. package/build/cjs/cc/ThermostatFanModeCC.js +372 -0
  153. package/build/cjs/cc/ThermostatFanModeCC.js.map +7 -0
  154. package/build/cjs/cc/ThermostatFanStateCC.d.ts +60 -0
  155. package/build/cjs/cc/ThermostatFanStateCC.js +166 -0
  156. package/build/cjs/cc/ThermostatFanStateCC.js.map +7 -0
  157. package/build/cjs/cc/ThermostatModeCC.d.ts +150 -0
  158. package/build/cjs/cc/ThermostatModeCC.js +436 -0
  159. package/build/cjs/cc/ThermostatModeCC.js.map +7 -0
  160. package/build/cjs/cc/ThermostatOperatingStateCC.d.ts +61 -0
  161. package/build/cjs/cc/ThermostatOperatingStateCC.js +162 -0
  162. package/build/cjs/cc/ThermostatOperatingStateCC.js.map +7 -0
  163. package/build/cjs/cc/ThermostatSetbackCC.d.ts +46 -0
  164. package/build/cjs/cc/ThermostatSetbackCC.js +262 -0
  165. package/build/cjs/cc/ThermostatSetbackCC.js.map +7 -0
  166. package/build/cjs/cc/ThermostatSetpointCC.d.ts +197 -0
  167. package/build/cjs/cc/ThermostatSetpointCC.js +638 -0
  168. package/build/cjs/cc/ThermostatSetpointCC.js.map +7 -0
  169. package/build/cjs/cc/TimeCC.d.ts +88 -0
  170. package/build/cjs/cc/TimeCC.js +473 -0
  171. package/build/cjs/cc/TimeCC.js.map +7 -0
  172. package/build/cjs/cc/TimeParametersCC.d.ts +72 -0
  173. package/build/cjs/cc/TimeParametersCC.js +313 -0
  174. package/build/cjs/cc/TimeParametersCC.js.map +7 -0
  175. package/build/cjs/cc/TransportServiceCC.d.ts +107 -0
  176. package/build/cjs/cc/TransportServiceCC.js +404 -0
  177. package/build/cjs/cc/TransportServiceCC.js.map +7 -0
  178. package/build/cjs/cc/UserCodeCC.d.ts +683 -0
  179. package/build/cjs/cc/UserCodeCC.js +1620 -0
  180. package/build/cjs/cc/UserCodeCC.js.map +7 -0
  181. package/build/cjs/cc/VersionCC.d.ts +469 -0
  182. package/build/cjs/cc/VersionCC.js +828 -0
  183. package/build/cjs/cc/VersionCC.js.map +7 -0
  184. package/build/cjs/cc/WakeUpCC.d.ts +150 -0
  185. package/build/cjs/cc/WakeUpCC.js +456 -0
  186. package/build/cjs/cc/WakeUpCC.js.map +7 -0
  187. package/build/cjs/cc/WindowCoveringCC.d.ts +315 -0
  188. package/build/cjs/cc/WindowCoveringCC.js +776 -0
  189. package/build/cjs/cc/WindowCoveringCC.js.map +7 -0
  190. package/build/cjs/cc/ZWaveLongRangeCC.d.ts +4 -0
  191. package/build/cjs/cc/ZWaveLongRangeCC.js +43 -0
  192. package/build/cjs/cc/ZWaveLongRangeCC.js.map +7 -0
  193. package/build/cjs/cc/ZWavePlusCC.d.ts +163 -0
  194. package/build/cjs/cc/ZWavePlusCC.js +288 -0
  195. package/build/cjs/cc/ZWavePlusCC.js.map +7 -0
  196. package/build/cjs/cc/ZWaveProtocolCC.d.ts +344 -0
  197. package/build/cjs/cc/ZWaveProtocolCC.js +1071 -0
  198. package/build/cjs/cc/ZWaveProtocolCC.js.map +7 -0
  199. package/build/cjs/cc/index.d.ts +132 -0
  200. package/build/cjs/cc/index.js +1180 -0
  201. package/build/cjs/cc/index.js.map +7 -0
  202. package/build/cjs/cc/manufacturerProprietary/Decorators.d.ts +64 -0
  203. package/build/cjs/cc/manufacturerProprietary/Decorators.js +76 -0
  204. package/build/cjs/cc/manufacturerProprietary/Decorators.js.map +7 -0
  205. package/build/cjs/cc/manufacturerProprietary/FibaroCC.d.ts +79 -0
  206. package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +412 -0
  207. package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +7 -0
  208. package/build/cjs/index.d.ts +15 -0
  209. package/build/cjs/index.js +77 -0
  210. package/build/cjs/index.js.map +7 -0
  211. package/build/cjs/index_safe.d.ts +3 -0
  212. package/build/cjs/index_safe.js +25 -0
  213. package/build/cjs/index_safe.js.map +7 -0
  214. package/build/cjs/lib/API.d.ts +271 -0
  215. package/build/cjs/lib/API.js +413 -0
  216. package/build/cjs/lib/API.js.map +7 -0
  217. package/build/cjs/lib/CommandClass.d.ts +234 -0
  218. package/build/cjs/lib/CommandClass.js +692 -0
  219. package/build/cjs/lib/CommandClass.js.map +7 -0
  220. package/build/cjs/lib/CommandClassDecorators.d.ts +112 -0
  221. package/build/cjs/lib/CommandClassDecorators.js +182 -0
  222. package/build/cjs/lib/CommandClassDecorators.js.map +7 -0
  223. package/build/cjs/lib/EncapsulatingCommandClass.d.ts +22 -0
  224. package/build/cjs/lib/EncapsulatingCommandClass.js +71 -0
  225. package/build/cjs/lib/EncapsulatingCommandClass.js.map +7 -0
  226. package/build/cjs/lib/ICommandClassContainer.js +17 -0
  227. package/build/cjs/lib/ICommandClassContainer.js.map +7 -0
  228. package/build/cjs/lib/NotificationEventPayload.d.ts +10 -0
  229. package/build/cjs/lib/NotificationEventPayload.js +31 -0
  230. package/build/cjs/lib/NotificationEventPayload.js.map +7 -0
  231. package/build/cjs/lib/Security2/Extension.js +333 -0
  232. package/build/cjs/lib/Security2/Extension.js.map +7 -0
  233. package/build/cjs/lib/Security2/shared.js +69 -0
  234. package/build/cjs/lib/Security2/shared.js.map +7 -0
  235. package/build/cjs/lib/SetValueResult.js +65 -0
  236. package/build/cjs/lib/SetValueResult.js.map +7 -0
  237. package/build/cjs/lib/Values.d.ts +223 -0
  238. package/build/cjs/lib/Values.js +191 -0
  239. package/build/cjs/lib/Values.js.map +7 -0
  240. package/build/cjs/lib/_Types.js +1676 -0
  241. package/build/cjs/lib/_Types.js.map +7 -0
  242. package/build/cjs/lib/serializers.d.ts +34 -0
  243. package/build/cjs/lib/serializers.js +110 -0
  244. package/build/cjs/lib/serializers.js.map +7 -0
  245. package/build/cjs/lib/utils.d.ts +17 -0
  246. package/build/cjs/lib/utils.js +678 -0
  247. package/build/cjs/lib/utils.js.map +7 -0
  248. package/build/cjs/package.json +3 -0
  249. package/build/esm/cc/AlarmSensorCC.d.ts +194 -0
  250. package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -0
  251. package/build/esm/cc/AlarmSensorCC.js +392 -0
  252. package/build/esm/cc/AlarmSensorCC.js.map +1 -0
  253. package/build/esm/cc/AssociationCC.d.ts +253 -0
  254. package/build/esm/cc/AssociationCC.d.ts.map +1 -0
  255. package/build/esm/cc/AssociationCC.js +706 -0
  256. package/build/esm/cc/AssociationCC.js.map +1 -0
  257. package/build/esm/cc/AssociationGroupInfoCC.d.ts +230 -0
  258. package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -0
  259. package/build/esm/cc/AssociationGroupInfoCC.js +769 -0
  260. package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -0
  261. package/build/esm/cc/BarrierOperatorCC.d.ts +243 -0
  262. package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -0
  263. package/build/esm/cc/BarrierOperatorCC.js +610 -0
  264. package/build/esm/cc/BarrierOperatorCC.js.map +1 -0
  265. package/build/esm/cc/BasicCC.d.ts +191 -0
  266. package/build/esm/cc/BasicCC.d.ts.map +1 -0
  267. package/build/esm/cc/BasicCC.js +390 -0
  268. package/build/esm/cc/BasicCC.js.map +1 -0
  269. package/build/esm/cc/BatteryCC.d.ts +406 -0
  270. package/build/esm/cc/BatteryCC.d.ts.map +1 -0
  271. package/build/esm/cc/BatteryCC.js +513 -0
  272. package/build/esm/cc/BatteryCC.js.map +1 -0
  273. package/build/esm/cc/BinarySensorCC.d.ts +122 -0
  274. package/build/esm/cc/BinarySensorCC.d.ts.map +1 -0
  275. package/build/esm/cc/BinarySensorCC.js +417 -0
  276. package/build/esm/cc/BinarySensorCC.js.map +1 -0
  277. package/build/esm/cc/BinarySwitchCC.d.ts +139 -0
  278. package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -0
  279. package/build/esm/cc/BinarySwitchCC.js +362 -0
  280. package/build/esm/cc/BinarySwitchCC.js.map +1 -0
  281. package/build/esm/cc/CRC16CC.d.ts +29 -0
  282. package/build/esm/cc/CRC16CC.d.ts.map +1 -0
  283. package/build/esm/cc/CRC16CC.js +123 -0
  284. package/build/esm/cc/CRC16CC.js.map +1 -0
  285. package/build/esm/cc/CentralSceneCC.d.ts +210 -0
  286. package/build/esm/cc/CentralSceneCC.d.ts.map +1 -0
  287. package/build/esm/cc/CentralSceneCC.js +427 -0
  288. package/build/esm/cc/CentralSceneCC.js.map +1 -0
  289. package/build/esm/cc/ClimateControlScheduleCC.d.ts +177 -0
  290. package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -0
  291. package/build/esm/cc/ClimateControlScheduleCC.js +466 -0
  292. package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -0
  293. package/build/esm/cc/ClockCC.d.ts +47 -0
  294. package/build/esm/cc/ClockCC.d.ts.map +1 -0
  295. package/build/esm/cc/ClockCC.js +205 -0
  296. package/build/esm/cc/ClockCC.js.map +1 -0
  297. package/build/esm/cc/ColorSwitchCC.d.ts +339 -0
  298. package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -0
  299. package/build/esm/cc/ColorSwitchCC.js +1149 -0
  300. package/build/esm/cc/ColorSwitchCC.js.map +1 -0
  301. package/build/esm/cc/ConfigurationCC.d.ts +396 -0
  302. package/build/esm/cc/ConfigurationCC.d.ts.map +1 -0
  303. package/build/esm/cc/ConfigurationCC.js +2454 -0
  304. package/build/esm/cc/ConfigurationCC.js.map +1 -0
  305. package/build/esm/cc/DeviceResetLocallyCC.d.ts +17 -0
  306. package/build/esm/cc/DeviceResetLocallyCC.d.ts.map +1 -0
  307. package/build/esm/cc/DeviceResetLocallyCC.js +73 -0
  308. package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -0
  309. package/build/esm/cc/DoorLockCC.d.ts +837 -0
  310. package/build/esm/cc/DoorLockCC.d.ts.map +1 -0
  311. package/build/esm/cc/DoorLockCC.js +1270 -0
  312. package/build/esm/cc/DoorLockCC.js.map +1 -0
  313. package/build/esm/cc/DoorLockLoggingCC.d.ts +77 -0
  314. package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -0
  315. package/build/esm/cc/DoorLockLoggingCC.js +316 -0
  316. package/build/esm/cc/DoorLockLoggingCC.js.map +1 -0
  317. package/build/esm/cc/EnergyProductionCC.d.ts +77 -0
  318. package/build/esm/cc/EnergyProductionCC.d.ts.map +1 -0
  319. package/build/esm/cc/EnergyProductionCC.js +213 -0
  320. package/build/esm/cc/EnergyProductionCC.js.map +1 -0
  321. package/build/esm/cc/EntryControlCC.d.ts +231 -0
  322. package/build/esm/cc/EntryControlCC.d.ts.map +1 -0
  323. package/build/esm/cc/EntryControlCC.js +581 -0
  324. package/build/esm/cc/EntryControlCC.js.map +1 -0
  325. package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts +359 -0
  326. package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -0
  327. package/build/esm/cc/FirmwareUpdateMetaDataCC.js +1142 -0
  328. package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -0
  329. package/build/esm/cc/HailCC.d.ts +6 -0
  330. package/build/esm/cc/HailCC.d.ts.map +1 -0
  331. package/build/esm/cc/HailCC.js +21 -0
  332. package/build/esm/cc/HailCC.js.map +1 -0
  333. package/build/esm/cc/HumidityControlModeCC.d.ts +111 -0
  334. package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -0
  335. package/build/esm/cc/HumidityControlModeCC.js +305 -0
  336. package/build/esm/cc/HumidityControlModeCC.js.map +1 -0
  337. package/build/esm/cc/HumidityControlOperatingStateCC.d.ts +60 -0
  338. package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -0
  339. package/build/esm/cc/HumidityControlOperatingStateCC.js +137 -0
  340. package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -0
  341. package/build/esm/cc/HumidityControlSetpointCC.d.ts +209 -0
  342. package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -0
  343. package/build/esm/cc/HumidityControlSetpointCC.js +645 -0
  344. package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -0
  345. package/build/esm/cc/InclusionControllerCC.d.ts +42 -0
  346. package/build/esm/cc/InclusionControllerCC.d.ts.map +1 -0
  347. package/build/esm/cc/InclusionControllerCC.js +133 -0
  348. package/build/esm/cc/InclusionControllerCC.js.map +1 -0
  349. package/build/esm/cc/IndicatorCC.d.ts +338 -0
  350. package/build/esm/cc/IndicatorCC.d.ts.map +1 -0
  351. package/build/esm/cc/IndicatorCC.js +1317 -0
  352. package/build/esm/cc/IndicatorCC.js.map +1 -0
  353. package/build/esm/cc/IrrigationCC.d.ts +1496 -0
  354. package/build/esm/cc/IrrigationCC.d.ts.map +1 -0
  355. package/build/esm/cc/IrrigationCC.js +2038 -0
  356. package/build/esm/cc/IrrigationCC.js.map +1 -0
  357. package/build/esm/cc/LanguageCC.d.ts +101 -0
  358. package/build/esm/cc/LanguageCC.d.ts.map +1 -0
  359. package/build/esm/cc/LanguageCC.js +243 -0
  360. package/build/esm/cc/LanguageCC.js.map +1 -0
  361. package/build/esm/cc/LockCC.d.ts +73 -0
  362. package/build/esm/cc/LockCC.d.ts.map +1 -0
  363. package/build/esm/cc/LockCC.js +197 -0
  364. package/build/esm/cc/LockCC.js.map +1 -0
  365. package/build/esm/cc/ManufacturerProprietaryCC.d.ts +32 -0
  366. package/build/esm/cc/ManufacturerProprietaryCC.d.ts.map +1 -0
  367. package/build/esm/cc/ManufacturerProprietaryCC.js +201 -0
  368. package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -0
  369. package/build/esm/cc/ManufacturerSpecificCC.d.ts +171 -0
  370. package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -0
  371. package/build/esm/cc/ManufacturerSpecificCC.js +315 -0
  372. package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -0
  373. package/build/esm/cc/MeterCC.d.ts +318 -0
  374. package/build/esm/cc/MeterCC.d.ts.map +1 -0
  375. package/build/esm/cc/MeterCC.js +1308 -0
  376. package/build/esm/cc/MeterCC.js.map +1 -0
  377. package/build/esm/cc/MultiChannelAssociationCC.d.ts +241 -0
  378. package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -0
  379. package/build/esm/cc/MultiChannelAssociationCC.js +981 -0
  380. package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -0
  381. package/build/esm/cc/MultiChannelCC.d.ts +394 -0
  382. package/build/esm/cc/MultiChannelCC.d.ts.map +1 -0
  383. package/build/esm/cc/MultiChannelCC.js +1127 -0
  384. package/build/esm/cc/MultiChannelCC.js.map +1 -0
  385. package/build/esm/cc/MultiCommandCC.d.ts +27 -0
  386. package/build/esm/cc/MultiCommandCC.d.ts.map +1 -0
  387. package/build/esm/cc/MultiCommandCC.js +142 -0
  388. package/build/esm/cc/MultiCommandCC.js.map +1 -0
  389. package/build/esm/cc/MultilevelSensorCC.d.ts +185 -0
  390. package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -0
  391. package/build/esm/cc/MultilevelSensorCC.js +753 -0
  392. package/build/esm/cc/MultilevelSensorCC.js.map +1 -0
  393. package/build/esm/cc/MultilevelSwitchCC.d.ts +357 -0
  394. package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -0
  395. package/build/esm/cc/MultilevelSwitchCC.js +810 -0
  396. package/build/esm/cc/MultilevelSwitchCC.js.map +1 -0
  397. package/build/esm/cc/NoOperationCC.d.ts +9 -0
  398. package/build/esm/cc/NoOperationCC.d.ts.map +1 -0
  399. package/build/esm/cc/NoOperationCC.js +39 -0
  400. package/build/esm/cc/NoOperationCC.js.map +1 -0
  401. package/build/esm/cc/NodeNamingCC.d.ts +118 -0
  402. package/build/esm/cc/NodeNamingCC.d.ts.map +1 -0
  403. package/build/esm/cc/NodeNamingCC.js +345 -0
  404. package/build/esm/cc/NodeNamingCC.js.map +1 -0
  405. package/build/esm/cc/NotificationCC.d.ts +479 -0
  406. package/build/esm/cc/NotificationCC.d.ts.map +1 -0
  407. package/build/esm/cc/NotificationCC.js +1350 -0
  408. package/build/esm/cc/NotificationCC.js.map +1 -0
  409. package/build/esm/cc/PowerlevelCC.d.ts +82 -0
  410. package/build/esm/cc/PowerlevelCC.d.ts.map +1 -0
  411. package/build/esm/cc/PowerlevelCC.js +485 -0
  412. package/build/esm/cc/PowerlevelCC.js.map +1 -0
  413. package/build/esm/cc/ProtectionCC.d.ts +325 -0
  414. package/build/esm/cc/ProtectionCC.d.ts.map +1 -0
  415. package/build/esm/cc/ProtectionCC.js +669 -0
  416. package/build/esm/cc/ProtectionCC.js.map +1 -0
  417. package/build/esm/cc/SceneActivationCC.d.ts +89 -0
  418. package/build/esm/cc/SceneActivationCC.d.ts.map +1 -0
  419. package/build/esm/cc/SceneActivationCC.js +166 -0
  420. package/build/esm/cc/SceneActivationCC.js.map +1 -0
  421. package/build/esm/cc/SceneActuatorConfigurationCC.d.ts +120 -0
  422. package/build/esm/cc/SceneActuatorConfigurationCC.d.ts.map +1 -0
  423. package/build/esm/cc/SceneActuatorConfigurationCC.js +374 -0
  424. package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -0
  425. package/build/esm/cc/SceneControllerConfigurationCC.d.ts +129 -0
  426. package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -0
  427. package/build/esm/cc/SceneControllerConfigurationCC.js +446 -0
  428. package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -0
  429. package/build/esm/cc/ScheduleEntryLockCC.d.ts +434 -0
  430. package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -0
  431. package/build/esm/cc/ScheduleEntryLockCC.js +1826 -0
  432. package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -0
  433. package/build/esm/cc/Security2CC.d.ts +251 -0
  434. package/build/esm/cc/Security2CC.d.ts.map +1 -0
  435. package/build/esm/cc/Security2CC.js +1814 -0
  436. package/build/esm/cc/Security2CC.js.map +1 -0
  437. package/build/esm/cc/SecurityCC.d.ts +128 -0
  438. package/build/esm/cc/SecurityCC.d.ts.map +1 -0
  439. package/build/esm/cc/SecurityCC.js +800 -0
  440. package/build/esm/cc/SecurityCC.js.map +1 -0
  441. package/build/esm/cc/SoundSwitchCC.d.ts +232 -0
  442. package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -0
  443. package/build/esm/cc/SoundSwitchCC.js +633 -0
  444. package/build/esm/cc/SoundSwitchCC.js.map +1 -0
  445. package/build/esm/cc/SupervisionCC.d.ts +104 -0
  446. package/build/esm/cc/SupervisionCC.d.ts.map +1 -0
  447. package/build/esm/cc/SupervisionCC.js +319 -0
  448. package/build/esm/cc/SupervisionCC.js.map +1 -0
  449. package/build/esm/cc/ThermostatFanModeCC.d.ts +141 -0
  450. package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -0
  451. package/build/esm/cc/ThermostatFanModeCC.js +359 -0
  452. package/build/esm/cc/ThermostatFanModeCC.js.map +1 -0
  453. package/build/esm/cc/ThermostatFanStateCC.d.ts +60 -0
  454. package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -0
  455. package/build/esm/cc/ThermostatFanStateCC.js +139 -0
  456. package/build/esm/cc/ThermostatFanStateCC.js.map +1 -0
  457. package/build/esm/cc/ThermostatModeCC.d.ts +150 -0
  458. package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -0
  459. package/build/esm/cc/ThermostatModeCC.js +426 -0
  460. package/build/esm/cc/ThermostatModeCC.js.map +1 -0
  461. package/build/esm/cc/ThermostatOperatingStateCC.d.ts +61 -0
  462. package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -0
  463. package/build/esm/cc/ThermostatOperatingStateCC.js +135 -0
  464. package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -0
  465. package/build/esm/cc/ThermostatSetbackCC.d.ts +46 -0
  466. package/build/esm/cc/ThermostatSetbackCC.d.ts.map +1 -0
  467. package/build/esm/cc/ThermostatSetbackCC.js +244 -0
  468. package/build/esm/cc/ThermostatSetbackCC.js.map +1 -0
  469. package/build/esm/cc/ThermostatSetpointCC.d.ts +197 -0
  470. package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -0
  471. package/build/esm/cc/ThermostatSetpointCC.js +655 -0
  472. package/build/esm/cc/ThermostatSetpointCC.js.map +1 -0
  473. package/build/esm/cc/TimeCC.d.ts +88 -0
  474. package/build/esm/cc/TimeCC.d.ts.map +1 -0
  475. package/build/esm/cc/TimeCC.js +451 -0
  476. package/build/esm/cc/TimeCC.js.map +1 -0
  477. package/build/esm/cc/TimeParametersCC.d.ts +72 -0
  478. package/build/esm/cc/TimeParametersCC.d.ts.map +1 -0
  479. package/build/esm/cc/TimeParametersCC.js +300 -0
  480. package/build/esm/cc/TimeParametersCC.js.map +1 -0
  481. package/build/esm/cc/TransportServiceCC.d.ts +107 -0
  482. package/build/esm/cc/TransportServiceCC.d.ts.map +1 -0
  483. package/build/esm/cc/TransportServiceCC.js +422 -0
  484. package/build/esm/cc/TransportServiceCC.js.map +1 -0
  485. package/build/esm/cc/UserCodeCC.d.ts +683 -0
  486. package/build/esm/cc/UserCodeCC.d.ts.map +1 -0
  487. package/build/esm/cc/UserCodeCC.js +1695 -0
  488. package/build/esm/cc/UserCodeCC.js.map +1 -0
  489. package/build/esm/cc/VersionCC.d.ts +469 -0
  490. package/build/esm/cc/VersionCC.d.ts.map +1 -0
  491. package/build/esm/cc/VersionCC.js +862 -0
  492. package/build/esm/cc/VersionCC.js.map +1 -0
  493. package/build/esm/cc/WakeUpCC.d.ts +150 -0
  494. package/build/esm/cc/WakeUpCC.d.ts.map +1 -0
  495. package/build/esm/cc/WakeUpCC.js +438 -0
  496. package/build/esm/cc/WakeUpCC.js.map +1 -0
  497. package/build/esm/cc/WindowCoveringCC.d.ts +315 -0
  498. package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -0
  499. package/build/esm/cc/WindowCoveringCC.js +780 -0
  500. package/build/esm/cc/WindowCoveringCC.js.map +1 -0
  501. package/build/esm/cc/ZWaveLongRangeCC.d.ts +4 -0
  502. package/build/esm/cc/ZWaveLongRangeCC.d.ts.map +1 -0
  503. package/build/esm/cc/ZWaveLongRangeCC.js +17 -0
  504. package/build/esm/cc/ZWaveLongRangeCC.js.map +1 -0
  505. package/build/esm/cc/ZWavePlusCC.d.ts +163 -0
  506. package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -0
  507. package/build/esm/cc/ZWavePlusCC.js +267 -0
  508. package/build/esm/cc/ZWavePlusCC.js.map +1 -0
  509. package/build/esm/cc/ZWaveProtocolCC.d.ts +344 -0
  510. package/build/esm/cc/ZWaveProtocolCC.d.ts.map +1 -0
  511. package/build/esm/cc/ZWaveProtocolCC.js +1030 -0
  512. package/build/esm/cc/ZWaveProtocolCC.js.map +1 -0
  513. package/build/esm/cc/index.d.ts +132 -0
  514. package/build/esm/cc/index.d.ts.map +1 -0
  515. package/build/esm/cc/index.js +71 -0
  516. package/build/esm/cc/index.js.map +1 -0
  517. package/build/esm/cc/manufacturerProprietary/Decorators.d.ts +64 -0
  518. package/build/esm/cc/manufacturerProprietary/Decorators.d.ts.map +1 -0
  519. package/build/esm/cc/manufacturerProprietary/Decorators.js +79 -0
  520. package/build/esm/cc/manufacturerProprietary/Decorators.js.map +1 -0
  521. package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts +79 -0
  522. package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -0
  523. package/build/esm/cc/manufacturerProprietary/FibaroCC.js +385 -0
  524. package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -0
  525. package/build/esm/index.d.ts +15 -0
  526. package/build/esm/index.d.ts.map +1 -0
  527. package/build/esm/index.js +14 -0
  528. package/build/esm/index.js.map +1 -0
  529. package/build/esm/index_safe.d.ts +3 -0
  530. package/build/esm/index_safe.d.ts.map +1 -0
  531. package/build/esm/index_safe.js +4 -0
  532. package/build/esm/index_safe.js.map +1 -0
  533. package/build/esm/lib/API.d.ts +271 -0
  534. package/build/esm/lib/API.d.ts.map +1 -0
  535. package/build/esm/lib/API.js +448 -0
  536. package/build/esm/lib/API.js.map +1 -0
  537. package/build/esm/lib/CommandClass.d.ts +234 -0
  538. package/build/esm/lib/CommandClass.d.ts.map +1 -0
  539. package/build/esm/lib/CommandClass.js +781 -0
  540. package/build/esm/lib/CommandClass.js.map +1 -0
  541. package/build/esm/lib/CommandClassDecorators.d.ts +112 -0
  542. package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -0
  543. package/build/esm/lib/CommandClassDecorators.js +229 -0
  544. package/build/esm/lib/CommandClassDecorators.js.map +1 -0
  545. package/build/esm/lib/EncapsulatingCommandClass.d.ts +22 -0
  546. package/build/esm/lib/EncapsulatingCommandClass.d.ts.map +1 -0
  547. package/build/esm/lib/EncapsulatingCommandClass.js +56 -0
  548. package/build/esm/lib/EncapsulatingCommandClass.js.map +1 -0
  549. package/build/esm/lib/ICommandClassContainer.d.ts +2 -0
  550. package/build/esm/lib/ICommandClassContainer.d.ts.map +1 -0
  551. package/build/esm/lib/ICommandClassContainer.js +2 -0
  552. package/build/esm/lib/ICommandClassContainer.js.map +1 -0
  553. package/build/esm/lib/NotificationEventPayload.d.ts +10 -0
  554. package/build/esm/lib/NotificationEventPayload.d.ts.map +1 -0
  555. package/build/esm/lib/NotificationEventPayload.js +7 -0
  556. package/build/esm/lib/NotificationEventPayload.js.map +1 -0
  557. package/build/esm/lib/Security2/Extension.d.ts +106 -0
  558. package/build/esm/lib/Security2/Extension.d.ts.map +1 -0
  559. package/build/esm/lib/Security2/Extension.js +296 -0
  560. package/build/esm/lib/Security2/Extension.js.map +1 -0
  561. package/build/esm/lib/Security2/shared.d.ts +37 -0
  562. package/build/esm/lib/Security2/shared.d.ts.map +1 -0
  563. package/build/esm/lib/Security2/shared.js +40 -0
  564. package/build/esm/lib/Security2/shared.js.map +1 -0
  565. package/build/esm/lib/SetValueResult.d.ts +55 -0
  566. package/build/esm/lib/SetValueResult.d.ts.map +1 -0
  567. package/build/esm/lib/SetValueResult.js +53 -0
  568. package/build/esm/lib/SetValueResult.js.map +1 -0
  569. package/build/esm/lib/Values.d.ts +223 -0
  570. package/build/esm/lib/Values.d.ts.map +1 -0
  571. package/build/esm/lib/Values.js +169 -0
  572. package/build/esm/lib/Values.js.map +1 -0
  573. package/build/esm/lib/_Types.d.ts +1461 -0
  574. package/build/esm/lib/_Types.d.ts.map +1 -0
  575. package/build/esm/lib/_Types.js +1432 -0
  576. package/build/esm/lib/_Types.js.map +1 -0
  577. package/build/esm/lib/serializers.d.ts +34 -0
  578. package/build/esm/lib/serializers.d.ts.map +1 -0
  579. package/build/esm/lib/serializers.js +98 -0
  580. package/build/esm/lib/serializers.js.map +1 -0
  581. package/build/esm/lib/utils.d.ts +17 -0
  582. package/build/esm/lib/utils.d.ts.map +1 -0
  583. package/build/esm/lib/utils.js +847 -0
  584. package/build/esm/lib/utils.js.map +1 -0
  585. package/build/esm/package.json +3 -0
  586. package/package.json +28 -23
  587. package/build/cc/AlarmSensorCC.d.ts +0 -194
  588. package/build/cc/AlarmSensorCC.d.ts.map +0 -1
  589. package/build/cc/AlarmSensorCC.js +0 -395
  590. package/build/cc/AlarmSensorCC.js.map +0 -1
  591. package/build/cc/AssociationCC.d.ts +0 -253
  592. package/build/cc/AssociationCC.d.ts.map +0 -1
  593. package/build/cc/AssociationCC.js +0 -732
  594. package/build/cc/AssociationCC.js.map +0 -1
  595. package/build/cc/AssociationGroupInfoCC.d.ts +0 -230
  596. package/build/cc/AssociationGroupInfoCC.d.ts.map +0 -1
  597. package/build/cc/AssociationGroupInfoCC.js +0 -772
  598. package/build/cc/AssociationGroupInfoCC.js.map +0 -1
  599. package/build/cc/BarrierOperatorCC.d.ts +0 -243
  600. package/build/cc/BarrierOperatorCC.d.ts.map +0 -1
  601. package/build/cc/BarrierOperatorCC.js +0 -613
  602. package/build/cc/BarrierOperatorCC.js.map +0 -1
  603. package/build/cc/BasicCC.d.ts +0 -191
  604. package/build/cc/BasicCC.d.ts.map +0 -1
  605. package/build/cc/BasicCC.js +0 -393
  606. package/build/cc/BasicCC.js.map +0 -1
  607. package/build/cc/BatteryCC.d.ts +0 -406
  608. package/build/cc/BatteryCC.d.ts.map +0 -1
  609. package/build/cc/BatteryCC.js +0 -516
  610. package/build/cc/BatteryCC.js.map +0 -1
  611. package/build/cc/BinarySensorCC.d.ts +0 -122
  612. package/build/cc/BinarySensorCC.d.ts.map +0 -1
  613. package/build/cc/BinarySensorCC.js +0 -420
  614. package/build/cc/BinarySensorCC.js.map +0 -1
  615. package/build/cc/BinarySwitchCC.d.ts +0 -139
  616. package/build/cc/BinarySwitchCC.d.ts.map +0 -1
  617. package/build/cc/BinarySwitchCC.js +0 -365
  618. package/build/cc/BinarySwitchCC.js.map +0 -1
  619. package/build/cc/CRC16CC.d.ts +0 -29
  620. package/build/cc/CRC16CC.d.ts.map +0 -1
  621. package/build/cc/CRC16CC.js +0 -126
  622. package/build/cc/CRC16CC.js.map +0 -1
  623. package/build/cc/CentralSceneCC.d.ts +0 -210
  624. package/build/cc/CentralSceneCC.d.ts.map +0 -1
  625. package/build/cc/CentralSceneCC.js +0 -453
  626. package/build/cc/CentralSceneCC.js.map +0 -1
  627. package/build/cc/ClimateControlScheduleCC.d.ts +0 -177
  628. package/build/cc/ClimateControlScheduleCC.d.ts.map +0 -1
  629. package/build/cc/ClimateControlScheduleCC.js +0 -469
  630. package/build/cc/ClimateControlScheduleCC.js.map +0 -1
  631. package/build/cc/ClockCC.d.ts +0 -47
  632. package/build/cc/ClockCC.d.ts.map +0 -1
  633. package/build/cc/ClockCC.js +0 -208
  634. package/build/cc/ClockCC.js.map +0 -1
  635. package/build/cc/ColorSwitchCC.d.ts +0 -339
  636. package/build/cc/ColorSwitchCC.d.ts.map +0 -1
  637. package/build/cc/ColorSwitchCC.js +0 -1152
  638. package/build/cc/ColorSwitchCC.js.map +0 -1
  639. package/build/cc/ConfigurationCC.d.ts +0 -396
  640. package/build/cc/ConfigurationCC.d.ts.map +0 -1
  641. package/build/cc/ConfigurationCC.js +0 -2458
  642. package/build/cc/ConfigurationCC.js.map +0 -1
  643. package/build/cc/DeviceResetLocallyCC.d.ts +0 -17
  644. package/build/cc/DeviceResetLocallyCC.d.ts.map +0 -1
  645. package/build/cc/DeviceResetLocallyCC.js +0 -76
  646. package/build/cc/DeviceResetLocallyCC.js.map +0 -1
  647. package/build/cc/DoorLockCC.d.ts +0 -837
  648. package/build/cc/DoorLockCC.d.ts.map +0 -1
  649. package/build/cc/DoorLockCC.js +0 -1273
  650. package/build/cc/DoorLockCC.js.map +0 -1
  651. package/build/cc/DoorLockLoggingCC.d.ts +0 -77
  652. package/build/cc/DoorLockLoggingCC.d.ts.map +0 -1
  653. package/build/cc/DoorLockLoggingCC.js +0 -319
  654. package/build/cc/DoorLockLoggingCC.js.map +0 -1
  655. package/build/cc/EnergyProductionCC.d.ts +0 -77
  656. package/build/cc/EnergyProductionCC.d.ts.map +0 -1
  657. package/build/cc/EnergyProductionCC.js +0 -216
  658. package/build/cc/EnergyProductionCC.js.map +0 -1
  659. package/build/cc/EntryControlCC.d.ts +0 -231
  660. package/build/cc/EntryControlCC.d.ts.map +0 -1
  661. package/build/cc/EntryControlCC.js +0 -607
  662. package/build/cc/EntryControlCC.js.map +0 -1
  663. package/build/cc/FirmwareUpdateMetaDataCC.d.ts +0 -359
  664. package/build/cc/FirmwareUpdateMetaDataCC.d.ts.map +0 -1
  665. package/build/cc/FirmwareUpdateMetaDataCC.js +0 -1145
  666. package/build/cc/FirmwareUpdateMetaDataCC.js.map +0 -1
  667. package/build/cc/HailCC.d.ts +0 -6
  668. package/build/cc/HailCC.d.ts.map +0 -1
  669. package/build/cc/HailCC.js +0 -24
  670. package/build/cc/HailCC.js.map +0 -1
  671. package/build/cc/HumidityControlModeCC.d.ts +0 -111
  672. package/build/cc/HumidityControlModeCC.d.ts.map +0 -1
  673. package/build/cc/HumidityControlModeCC.js +0 -308
  674. package/build/cc/HumidityControlModeCC.js.map +0 -1
  675. package/build/cc/HumidityControlOperatingStateCC.d.ts +0 -60
  676. package/build/cc/HumidityControlOperatingStateCC.d.ts.map +0 -1
  677. package/build/cc/HumidityControlOperatingStateCC.js +0 -140
  678. package/build/cc/HumidityControlOperatingStateCC.js.map +0 -1
  679. package/build/cc/HumidityControlSetpointCC.d.ts +0 -209
  680. package/build/cc/HumidityControlSetpointCC.d.ts.map +0 -1
  681. package/build/cc/HumidityControlSetpointCC.js +0 -648
  682. package/build/cc/HumidityControlSetpointCC.js.map +0 -1
  683. package/build/cc/InclusionControllerCC.d.ts +0 -42
  684. package/build/cc/InclusionControllerCC.d.ts.map +0 -1
  685. package/build/cc/InclusionControllerCC.js +0 -136
  686. package/build/cc/InclusionControllerCC.js.map +0 -1
  687. package/build/cc/IndicatorCC.d.ts +0 -338
  688. package/build/cc/IndicatorCC.d.ts.map +0 -1
  689. package/build/cc/IndicatorCC.js +0 -1320
  690. package/build/cc/IndicatorCC.js.map +0 -1
  691. package/build/cc/IrrigationCC.d.ts +0 -1496
  692. package/build/cc/IrrigationCC.d.ts.map +0 -1
  693. package/build/cc/IrrigationCC.js +0 -2041
  694. package/build/cc/IrrigationCC.js.map +0 -1
  695. package/build/cc/LanguageCC.d.ts +0 -101
  696. package/build/cc/LanguageCC.d.ts.map +0 -1
  697. package/build/cc/LanguageCC.js +0 -246
  698. package/build/cc/LanguageCC.js.map +0 -1
  699. package/build/cc/LockCC.d.ts +0 -73
  700. package/build/cc/LockCC.d.ts.map +0 -1
  701. package/build/cc/LockCC.js +0 -200
  702. package/build/cc/LockCC.js.map +0 -1
  703. package/build/cc/ManufacturerProprietaryCC.d.ts +0 -32
  704. package/build/cc/ManufacturerProprietaryCC.d.ts.map +0 -1
  705. package/build/cc/ManufacturerProprietaryCC.js +0 -204
  706. package/build/cc/ManufacturerProprietaryCC.js.map +0 -1
  707. package/build/cc/ManufacturerSpecificCC.d.ts +0 -171
  708. package/build/cc/ManufacturerSpecificCC.d.ts.map +0 -1
  709. package/build/cc/ManufacturerSpecificCC.js +0 -318
  710. package/build/cc/ManufacturerSpecificCC.js.map +0 -1
  711. package/build/cc/MeterCC.d.ts +0 -318
  712. package/build/cc/MeterCC.d.ts.map +0 -1
  713. package/build/cc/MeterCC.js +0 -1312
  714. package/build/cc/MeterCC.js.map +0 -1
  715. package/build/cc/MultiChannelAssociationCC.d.ts +0 -241
  716. package/build/cc/MultiChannelAssociationCC.d.ts.map +0 -1
  717. package/build/cc/MultiChannelAssociationCC.js +0 -1007
  718. package/build/cc/MultiChannelAssociationCC.js.map +0 -1
  719. package/build/cc/MultiChannelCC.d.ts +0 -394
  720. package/build/cc/MultiChannelCC.d.ts.map +0 -1
  721. package/build/cc/MultiChannelCC.js +0 -1130
  722. package/build/cc/MultiChannelCC.js.map +0 -1
  723. package/build/cc/MultiCommandCC.d.ts +0 -27
  724. package/build/cc/MultiCommandCC.d.ts.map +0 -1
  725. package/build/cc/MultiCommandCC.js +0 -145
  726. package/build/cc/MultiCommandCC.js.map +0 -1
  727. package/build/cc/MultilevelSensorCC.d.ts +0 -185
  728. package/build/cc/MultilevelSensorCC.d.ts.map +0 -1
  729. package/build/cc/MultilevelSensorCC.js +0 -756
  730. package/build/cc/MultilevelSensorCC.js.map +0 -1
  731. package/build/cc/MultilevelSwitchCC.d.ts +0 -357
  732. package/build/cc/MultilevelSwitchCC.d.ts.map +0 -1
  733. package/build/cc/MultilevelSwitchCC.js +0 -813
  734. package/build/cc/MultilevelSwitchCC.js.map +0 -1
  735. package/build/cc/NoOperationCC.d.ts +0 -9
  736. package/build/cc/NoOperationCC.d.ts.map +0 -1
  737. package/build/cc/NoOperationCC.js +0 -42
  738. package/build/cc/NoOperationCC.js.map +0 -1
  739. package/build/cc/NodeNamingCC.d.ts +0 -118
  740. package/build/cc/NodeNamingCC.d.ts.map +0 -1
  741. package/build/cc/NodeNamingCC.js +0 -348
  742. package/build/cc/NodeNamingCC.js.map +0 -1
  743. package/build/cc/NotificationCC.d.ts +0 -479
  744. package/build/cc/NotificationCC.d.ts.map +0 -1
  745. package/build/cc/NotificationCC.js +0 -1379
  746. package/build/cc/NotificationCC.js.map +0 -1
  747. package/build/cc/PowerlevelCC.d.ts +0 -82
  748. package/build/cc/PowerlevelCC.d.ts.map +0 -1
  749. package/build/cc/PowerlevelCC.js +0 -488
  750. package/build/cc/PowerlevelCC.js.map +0 -1
  751. package/build/cc/ProtectionCC.d.ts +0 -325
  752. package/build/cc/ProtectionCC.d.ts.map +0 -1
  753. package/build/cc/ProtectionCC.js +0 -672
  754. package/build/cc/ProtectionCC.js.map +0 -1
  755. package/build/cc/SceneActivationCC.d.ts +0 -89
  756. package/build/cc/SceneActivationCC.d.ts.map +0 -1
  757. package/build/cc/SceneActivationCC.js +0 -169
  758. package/build/cc/SceneActivationCC.js.map +0 -1
  759. package/build/cc/SceneActuatorConfigurationCC.d.ts +0 -120
  760. package/build/cc/SceneActuatorConfigurationCC.d.ts.map +0 -1
  761. package/build/cc/SceneActuatorConfigurationCC.js +0 -377
  762. package/build/cc/SceneActuatorConfigurationCC.js.map +0 -1
  763. package/build/cc/SceneControllerConfigurationCC.d.ts +0 -129
  764. package/build/cc/SceneControllerConfigurationCC.d.ts.map +0 -1
  765. package/build/cc/SceneControllerConfigurationCC.js +0 -449
  766. package/build/cc/SceneControllerConfigurationCC.js.map +0 -1
  767. package/build/cc/ScheduleEntryLockCC.d.ts +0 -434
  768. package/build/cc/ScheduleEntryLockCC.d.ts.map +0 -1
  769. package/build/cc/ScheduleEntryLockCC.js +0 -1829
  770. package/build/cc/ScheduleEntryLockCC.js.map +0 -1
  771. package/build/cc/Security2CC.d.ts +0 -251
  772. package/build/cc/Security2CC.d.ts.map +0 -1
  773. package/build/cc/Security2CC.js +0 -1817
  774. package/build/cc/Security2CC.js.map +0 -1
  775. package/build/cc/SecurityCC.d.ts +0 -128
  776. package/build/cc/SecurityCC.d.ts.map +0 -1
  777. package/build/cc/SecurityCC.js +0 -803
  778. package/build/cc/SecurityCC.js.map +0 -1
  779. package/build/cc/SoundSwitchCC.d.ts +0 -232
  780. package/build/cc/SoundSwitchCC.d.ts.map +0 -1
  781. package/build/cc/SoundSwitchCC.js +0 -636
  782. package/build/cc/SoundSwitchCC.js.map +0 -1
  783. package/build/cc/SupervisionCC.d.ts +0 -104
  784. package/build/cc/SupervisionCC.d.ts.map +0 -1
  785. package/build/cc/SupervisionCC.js +0 -322
  786. package/build/cc/SupervisionCC.js.map +0 -1
  787. package/build/cc/ThermostatFanModeCC.d.ts +0 -141
  788. package/build/cc/ThermostatFanModeCC.d.ts.map +0 -1
  789. package/build/cc/ThermostatFanModeCC.js +0 -362
  790. package/build/cc/ThermostatFanModeCC.js.map +0 -1
  791. package/build/cc/ThermostatFanStateCC.d.ts +0 -60
  792. package/build/cc/ThermostatFanStateCC.d.ts.map +0 -1
  793. package/build/cc/ThermostatFanStateCC.js +0 -142
  794. package/build/cc/ThermostatFanStateCC.js.map +0 -1
  795. package/build/cc/ThermostatModeCC.d.ts +0 -150
  796. package/build/cc/ThermostatModeCC.d.ts.map +0 -1
  797. package/build/cc/ThermostatModeCC.js +0 -429
  798. package/build/cc/ThermostatModeCC.js.map +0 -1
  799. package/build/cc/ThermostatOperatingStateCC.d.ts +0 -61
  800. package/build/cc/ThermostatOperatingStateCC.d.ts.map +0 -1
  801. package/build/cc/ThermostatOperatingStateCC.js +0 -138
  802. package/build/cc/ThermostatOperatingStateCC.js.map +0 -1
  803. package/build/cc/ThermostatSetbackCC.d.ts +0 -46
  804. package/build/cc/ThermostatSetbackCC.d.ts.map +0 -1
  805. package/build/cc/ThermostatSetbackCC.js +0 -247
  806. package/build/cc/ThermostatSetbackCC.js.map +0 -1
  807. package/build/cc/ThermostatSetpointCC.d.ts +0 -197
  808. package/build/cc/ThermostatSetpointCC.d.ts.map +0 -1
  809. package/build/cc/ThermostatSetpointCC.js +0 -658
  810. package/build/cc/ThermostatSetpointCC.js.map +0 -1
  811. package/build/cc/TimeCC.d.ts +0 -88
  812. package/build/cc/TimeCC.d.ts.map +0 -1
  813. package/build/cc/TimeCC.js +0 -454
  814. package/build/cc/TimeCC.js.map +0 -1
  815. package/build/cc/TimeParametersCC.d.ts +0 -72
  816. package/build/cc/TimeParametersCC.d.ts.map +0 -1
  817. package/build/cc/TimeParametersCC.js +0 -303
  818. package/build/cc/TimeParametersCC.js.map +0 -1
  819. package/build/cc/TransportServiceCC.d.ts +0 -107
  820. package/build/cc/TransportServiceCC.d.ts.map +0 -1
  821. package/build/cc/TransportServiceCC.js +0 -426
  822. package/build/cc/TransportServiceCC.js.map +0 -1
  823. package/build/cc/UserCodeCC.d.ts +0 -683
  824. package/build/cc/UserCodeCC.d.ts.map +0 -1
  825. package/build/cc/UserCodeCC.js +0 -1699
  826. package/build/cc/UserCodeCC.js.map +0 -1
  827. package/build/cc/VersionCC.d.ts +0 -469
  828. package/build/cc/VersionCC.d.ts.map +0 -1
  829. package/build/cc/VersionCC.js +0 -865
  830. package/build/cc/VersionCC.js.map +0 -1
  831. package/build/cc/WakeUpCC.d.ts +0 -150
  832. package/build/cc/WakeUpCC.d.ts.map +0 -1
  833. package/build/cc/WakeUpCC.js +0 -441
  834. package/build/cc/WakeUpCC.js.map +0 -1
  835. package/build/cc/WindowCoveringCC.d.ts +0 -315
  836. package/build/cc/WindowCoveringCC.d.ts.map +0 -1
  837. package/build/cc/WindowCoveringCC.js +0 -783
  838. package/build/cc/WindowCoveringCC.js.map +0 -1
  839. package/build/cc/ZWaveLongRangeCC.d.ts +0 -4
  840. package/build/cc/ZWaveLongRangeCC.d.ts.map +0 -1
  841. package/build/cc/ZWaveLongRangeCC.js +0 -20
  842. package/build/cc/ZWaveLongRangeCC.js.map +0 -1
  843. package/build/cc/ZWavePlusCC.d.ts +0 -163
  844. package/build/cc/ZWavePlusCC.d.ts.map +0 -1
  845. package/build/cc/ZWavePlusCC.js +0 -270
  846. package/build/cc/ZWavePlusCC.js.map +0 -1
  847. package/build/cc/ZWaveProtocolCC.d.ts +0 -344
  848. package/build/cc/ZWaveProtocolCC.d.ts.map +0 -1
  849. package/build/cc/ZWaveProtocolCC.js +0 -1033
  850. package/build/cc/ZWaveProtocolCC.js.map +0 -1
  851. package/build/cc/index.d.ts +0 -132
  852. package/build/cc/index.d.ts.map +0 -1
  853. package/build/cc/index.js +0 -627
  854. package/build/cc/index.js.map +0 -1
  855. package/build/cc/manufacturerProprietary/Decorators.d.ts +0 -64
  856. package/build/cc/manufacturerProprietary/Decorators.d.ts.map +0 -1
  857. package/build/cc/manufacturerProprietary/Decorators.js +0 -83
  858. package/build/cc/manufacturerProprietary/Decorators.js.map +0 -1
  859. package/build/cc/manufacturerProprietary/FibaroCC.d.ts +0 -79
  860. package/build/cc/manufacturerProprietary/FibaroCC.d.ts.map +0 -1
  861. package/build/cc/manufacturerProprietary/FibaroCC.js +0 -392
  862. package/build/cc/manufacturerProprietary/FibaroCC.js.map +0 -1
  863. package/build/index.d.ts +0 -15
  864. package/build/index.d.ts.map +0 -1
  865. package/build/index.js +0 -52
  866. package/build/index.js.map +0 -1
  867. package/build/index_safe.d.ts +0 -3
  868. package/build/index_safe.d.ts.map +0 -1
  869. package/build/index_safe.js +0 -20
  870. package/build/index_safe.js.map +0 -1
  871. package/build/lib/API.d.ts +0 -271
  872. package/build/lib/API.d.ts.map +0 -1
  873. package/build/lib/API.js +0 -458
  874. package/build/lib/API.js.map +0 -1
  875. package/build/lib/CommandClass.d.ts +0 -234
  876. package/build/lib/CommandClass.d.ts.map +0 -1
  877. package/build/lib/CommandClass.js +0 -788
  878. package/build/lib/CommandClass.js.map +0 -1
  879. package/build/lib/CommandClassDecorators.d.ts +0 -112
  880. package/build/lib/CommandClassDecorators.d.ts.map +0 -1
  881. package/build/lib/CommandClassDecorators.js +0 -243
  882. package/build/lib/CommandClassDecorators.js.map +0 -1
  883. package/build/lib/EncapsulatingCommandClass.d.ts +0 -22
  884. package/build/lib/EncapsulatingCommandClass.d.ts.map +0 -1
  885. package/build/lib/EncapsulatingCommandClass.js +0 -61
  886. package/build/lib/EncapsulatingCommandClass.js.map +0 -1
  887. package/build/lib/ICommandClassContainer.d.ts.map +0 -1
  888. package/build/lib/ICommandClassContainer.js +0 -3
  889. package/build/lib/ICommandClassContainer.js.map +0 -1
  890. package/build/lib/NotificationEventPayload.d.ts +0 -10
  891. package/build/lib/NotificationEventPayload.d.ts.map +0 -1
  892. package/build/lib/NotificationEventPayload.js +0 -10
  893. package/build/lib/NotificationEventPayload.js.map +0 -1
  894. package/build/lib/Security2/Extension.d.ts.map +0 -1
  895. package/build/lib/Security2/Extension.js +0 -303
  896. package/build/lib/Security2/Extension.js.map +0 -1
  897. package/build/lib/Security2/shared.d.ts.map +0 -1
  898. package/build/lib/Security2/shared.js +0 -43
  899. package/build/lib/Security2/shared.js.map +0 -1
  900. package/build/lib/SetValueResult.d.ts.map +0 -1
  901. package/build/lib/SetValueResult.js +0 -60
  902. package/build/lib/SetValueResult.js.map +0 -1
  903. package/build/lib/Values.d.ts +0 -223
  904. package/build/lib/Values.d.ts.map +0 -1
  905. package/build/lib/Values.js +0 -172
  906. package/build/lib/Values.js.map +0 -1
  907. package/build/lib/_Types.d.ts.map +0 -1
  908. package/build/lib/_Types.js +0 -1443
  909. package/build/lib/_Types.js.map +0 -1
  910. package/build/lib/serializers.d.ts +0 -34
  911. package/build/lib/serializers.d.ts.map +0 -1
  912. package/build/lib/serializers.js +0 -107
  913. package/build/lib/serializers.js.map +0 -1
  914. package/build/lib/utils.d.ts +0 -17
  915. package/build/lib/utils.d.ts.map +0 -1
  916. package/build/lib/utils.js +0 -860
  917. package/build/lib/utils.js.map +0 -1
  918. /package/build/{lib → cjs/lib}/ICommandClassContainer.d.ts +0 -0
  919. /package/build/{lib → cjs/lib}/Security2/Extension.d.ts +0 -0
  920. /package/build/{lib → cjs/lib}/Security2/shared.d.ts +0 -0
  921. /package/build/{lib → cjs/lib}/SetValueResult.d.ts +0 -0
  922. /package/build/{lib → cjs/lib}/_Types.d.ts +0 -0
@@ -0,0 +1,1620 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var UserCodeCC_exports = {};
20
+ __export(UserCodeCC_exports, {
21
+ UserCodeCC: () => UserCodeCC,
22
+ UserCodeCCAPI: () => UserCodeCCAPI,
23
+ UserCodeCCAdminCodeGet: () => UserCodeCCAdminCodeGet,
24
+ UserCodeCCAdminCodeReport: () => UserCodeCCAdminCodeReport,
25
+ UserCodeCCAdminCodeSet: () => UserCodeCCAdminCodeSet,
26
+ UserCodeCCCapabilitiesGet: () => UserCodeCCCapabilitiesGet,
27
+ UserCodeCCCapabilitiesReport: () => UserCodeCCCapabilitiesReport,
28
+ UserCodeCCExtendedUserCodeGet: () => UserCodeCCExtendedUserCodeGet,
29
+ UserCodeCCExtendedUserCodeReport: () => UserCodeCCExtendedUserCodeReport,
30
+ UserCodeCCExtendedUserCodeSet: () => UserCodeCCExtendedUserCodeSet,
31
+ UserCodeCCGet: () => UserCodeCCGet,
32
+ UserCodeCCKeypadModeGet: () => UserCodeCCKeypadModeGet,
33
+ UserCodeCCKeypadModeReport: () => UserCodeCCKeypadModeReport,
34
+ UserCodeCCKeypadModeSet: () => UserCodeCCKeypadModeSet,
35
+ UserCodeCCReport: () => UserCodeCCReport,
36
+ UserCodeCCSet: () => UserCodeCCSet,
37
+ UserCodeCCUserCodeChecksumGet: () => UserCodeCCUserCodeChecksumGet,
38
+ UserCodeCCUserCodeChecksumReport: () => UserCodeCCUserCodeChecksumReport,
39
+ UserCodeCCUsersNumberGet: () => UserCodeCCUsersNumberGet,
40
+ UserCodeCCUsersNumberReport: () => UserCodeCCUsersNumberReport,
41
+ UserCodeCCValues: () => UserCodeCCValues,
42
+ userCodeToLogString: () => userCodeToLogString
43
+ });
44
+ module.exports = __toCommonJS(UserCodeCC_exports);
45
+ var import_safe = require("@zwave-js/core/safe");
46
+ var import_safe2 = require("@zwave-js/shared/safe");
47
+ var import_safe3 = require("@zwave-js/shared/safe");
48
+ var import_API = require("../lib/API.js");
49
+ var import_CommandClass = require("../lib/CommandClass.js");
50
+ var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
51
+ var import_Values = require("../lib/Values.js");
52
+ var import_Types = require("../lib/_Types.js");
53
+ var __decorate = function(decorators, target, key, desc) {
54
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
55
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
56
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
57
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
58
+ };
59
+ var UserCodeCC_1, UserCodeCCSet_1, UserCodeCCReport_1, UserCodeCCGet_1, UserCodeCCUsersNumberReport_1, UserCodeCCCapabilitiesReport_1, UserCodeCCKeypadModeSet_1, UserCodeCCKeypadModeReport_1, UserCodeCCAdminCodeSet_1, UserCodeCCAdminCodeReport_1, UserCodeCCUserCodeChecksumReport_1, UserCodeCCExtendedUserCodeReport_1;
60
+ function __assertType(argName, typeName, boundHasError) {
61
+ const { ZWaveError: ZWaveError2, ZWaveErrorCodes: ZWaveErrorCodes2 } = require("@zwave-js/core");
62
+ if (boundHasError()) {
63
+ throw new ZWaveError2(typeName ? `${argName} is not a ${typeName}` : `${argName} has the wrong type`, ZWaveErrorCodes2.Argument_Invalid);
64
+ }
65
+ }
66
+ const __assertType__number = ($o) => {
67
+ function _number($o2) {
68
+ return typeof $o2 !== "number" ? {} : null;
69
+ }
70
+ return _number($o);
71
+ };
72
+ const __assertType__optional_boolean = ($o) => {
73
+ function _boolean($o2) {
74
+ return typeof $o2 !== "boolean" ? {} : null;
75
+ }
76
+ function optional__boolean($o2) {
77
+ if ($o2 !== void 0) {
78
+ const error = _boolean($o2);
79
+ if (error)
80
+ return error;
81
+ }
82
+ return null;
83
+ }
84
+ return optional__boolean($o);
85
+ };
86
+ const __assertType__su__1__2__3__4_eu = ($o) => {
87
+ function _1($o2) {
88
+ return $o2 !== 1 ? {} : null;
89
+ }
90
+ function _2($o2) {
91
+ return $o2 !== 2 ? {} : null;
92
+ }
93
+ function _3($o2) {
94
+ return $o2 !== 3 ? {} : null;
95
+ }
96
+ function _4($o2) {
97
+ return $o2 !== 4 ? {} : null;
98
+ }
99
+ function su__1__2__3__4_eu($o2) {
100
+ const conditions = [_1, _2, _3, _4];
101
+ for (const condition of conditions) {
102
+ const error = condition($o2);
103
+ if (!error)
104
+ return null;
105
+ }
106
+ return {};
107
+ }
108
+ return su__1__2__3__4_eu($o);
109
+ };
110
+ const __assertType__su__string__uint8array_eu = ($o) => {
111
+ function _string($o2) {
112
+ return typeof $o2 !== "string" ? {} : null;
113
+ }
114
+ function _uint8array($o2) {
115
+ return !require("@zwave-js/shared/safe").isUint8Array($o2) ? {} : null;
116
+ }
117
+ function su__string__uint8array_eu($o2) {
118
+ const conditions = [_string, _uint8array];
119
+ for (const condition of conditions) {
120
+ const error = condition($o2);
121
+ if (!error)
122
+ return null;
123
+ }
124
+ return {};
125
+ }
126
+ return su__string__uint8array_eu($o);
127
+ };
128
+ const __assertType__sa_su__3__4__5_eu_ea_2 = ($o) => {
129
+ function _6($o2) {
130
+ return $o2 !== 0 ? {} : null;
131
+ }
132
+ function _7($o2) {
133
+ return $o2 !== 0 ? {} : null;
134
+ }
135
+ function _undefined($o2) {
136
+ return $o2 !== void 0 ? {} : null;
137
+ }
138
+ function _3($o2) {
139
+ if (typeof $o2 !== "object" || $o2 === null || Array.isArray($o2))
140
+ return {};
141
+ if ("userId" in $o2 && $o2["userId"] !== void 0) {
142
+ const error = _6($o2["userId"]);
143
+ if (error)
144
+ return error;
145
+ } else
146
+ return {};
147
+ if ("userIdStatus" in $o2 && $o2["userIdStatus"] !== void 0) {
148
+ const error = _7($o2["userIdStatus"]);
149
+ if (error)
150
+ return error;
151
+ } else
152
+ return {};
153
+ if ("userCode" in $o2 && $o2["userCode"] !== void 0) {
154
+ const error = _undefined($o2["userCode"]);
155
+ if (error)
156
+ return error;
157
+ }
158
+ return null;
159
+ }
160
+ function _number($o2) {
161
+ return typeof $o2 !== "number" ? {} : null;
162
+ }
163
+ function _4($o2) {
164
+ if (typeof $o2 !== "object" || $o2 === null || Array.isArray($o2))
165
+ return {};
166
+ if ("userId" in $o2 && $o2["userId"] !== void 0) {
167
+ const error = _number($o2["userId"]);
168
+ if (error)
169
+ return error;
170
+ } else
171
+ return {};
172
+ if ("userIdStatus" in $o2 && $o2["userIdStatus"] !== void 0) {
173
+ const error = _7($o2["userIdStatus"]);
174
+ if (error)
175
+ return error;
176
+ } else
177
+ return {};
178
+ if ("userCode" in $o2 && $o2["userCode"] !== void 0) {
179
+ const error = _undefined($o2["userCode"]);
180
+ if (error)
181
+ return error;
182
+ }
183
+ return null;
184
+ }
185
+ function _9($o2) {
186
+ return $o2 !== 1 ? {} : null;
187
+ }
188
+ function _10($o2) {
189
+ return $o2 !== 2 ? {} : null;
190
+ }
191
+ function _11($o2) {
192
+ return $o2 !== 3 ? {} : null;
193
+ }
194
+ function _12($o2) {
195
+ return $o2 !== 4 ? {} : null;
196
+ }
197
+ function su__9__10__11__12_eu($o2) {
198
+ const conditions = [_9, _10, _11, _12];
199
+ for (const condition of conditions) {
200
+ const error = condition($o2);
201
+ if (!error)
202
+ return null;
203
+ }
204
+ return {};
205
+ }
206
+ function _string($o2) {
207
+ return typeof $o2 !== "string" ? {} : null;
208
+ }
209
+ function _uint8array($o2) {
210
+ return !require("@zwave-js/shared/safe").isUint8Array($o2) ? {} : null;
211
+ }
212
+ function su__string__uint8array_eu($o2) {
213
+ const conditions = [_string, _uint8array];
214
+ for (const condition of conditions) {
215
+ const error = condition($o2);
216
+ if (!error)
217
+ return null;
218
+ }
219
+ return {};
220
+ }
221
+ function _5($o2) {
222
+ if (typeof $o2 !== "object" || $o2 === null || Array.isArray($o2))
223
+ return {};
224
+ if ("userId" in $o2 && $o2["userId"] !== void 0) {
225
+ const error = _number($o2["userId"]);
226
+ if (error)
227
+ return error;
228
+ } else
229
+ return {};
230
+ if ("userIdStatus" in $o2 && $o2["userIdStatus"] !== void 0) {
231
+ const error = su__9__10__11__12_eu($o2["userIdStatus"]);
232
+ if (error)
233
+ return error;
234
+ } else
235
+ return {};
236
+ if ("userCode" in $o2 && $o2["userCode"] !== void 0) {
237
+ const error = su__string__uint8array_eu($o2["userCode"]);
238
+ if (error)
239
+ return error;
240
+ } else
241
+ return {};
242
+ return null;
243
+ }
244
+ function su__3__4__5_eu($o2) {
245
+ const conditions = [_3, _4, _5];
246
+ for (const condition of conditions) {
247
+ const error = condition($o2);
248
+ if (!error)
249
+ return null;
250
+ }
251
+ return {};
252
+ }
253
+ function sa_su__3__4__5_eu_ea_2($o2) {
254
+ if (!Array.isArray($o2))
255
+ return {};
256
+ for (let i = 0; i < $o2.length; i++) {
257
+ const error = su__3__4__5_eu($o2[i]);
258
+ if (error)
259
+ return error;
260
+ }
261
+ return null;
262
+ }
263
+ return sa_su__3__4__5_eu_ea_2($o);
264
+ };
265
+ const __assertType__optional_number = ($o) => {
266
+ function _number($o2) {
267
+ return typeof $o2 !== "number" ? {} : null;
268
+ }
269
+ function optional__number($o2) {
270
+ if ($o2 !== void 0) {
271
+ const error = _number($o2);
272
+ if (error)
273
+ return error;
274
+ }
275
+ return null;
276
+ }
277
+ return optional__number($o);
278
+ };
279
+ const __assertType__KeypadMode = ($o) => {
280
+ function su__1__2__3__4_eu($o2) {
281
+ return ![0, 1, 2, 3].includes($o2) ? {} : null;
282
+ }
283
+ return su__1__2__3__4_eu($o);
284
+ };
285
+ const __assertType__string = ($o) => {
286
+ function _string($o2) {
287
+ return typeof $o2 !== "string" ? {} : null;
288
+ }
289
+ return _string($o);
290
+ };
291
+ const UserCodeCCValues = Object.freeze({
292
+ ...import_Values.V.defineStaticCCValues(import_safe.CommandClasses["User Code"], {
293
+ ...import_Values.V.staticProperty("supportedUsers", void 0, { internal: true }),
294
+ ...import_Values.V.staticProperty("supportsAdminCode", void 0, {
295
+ internal: true
296
+ }),
297
+ ...import_Values.V.staticProperty("supportsAdminCodeDeactivation", void 0, {
298
+ internal: true
299
+ }),
300
+ // The following two properties are only kept for compatibility with devices
301
+ // that were interviewed before the rename to admin code
302
+ ...import_Values.V.staticPropertyWithName("_deprecated_supportsMasterCode", "supportsMasterCode", void 0, {
303
+ internal: true
304
+ }),
305
+ ...import_Values.V.staticPropertyWithName("_deprecated_supportsMasterCodeDeactivation", "supportsMasterCodeDeactivation", void 0, {
306
+ internal: true
307
+ }),
308
+ ...import_Values.V.staticProperty("supportsUserCodeChecksum", void 0, {
309
+ internal: true
310
+ }),
311
+ ...import_Values.V.staticProperty("supportsMultipleUserCodeReport", void 0, {
312
+ internal: true
313
+ }),
314
+ ...import_Values.V.staticProperty("supportsMultipleUserCodeSet", void 0, {
315
+ internal: true
316
+ }),
317
+ ...import_Values.V.staticProperty("supportedUserIDStatuses", void 0, {
318
+ internal: true
319
+ }),
320
+ ...import_Values.V.staticProperty("supportedKeypadModes", void 0, {
321
+ internal: true
322
+ }),
323
+ ...import_Values.V.staticProperty("supportedASCIIChars", void 0, {
324
+ internal: true
325
+ }),
326
+ ...import_Values.V.staticProperty("userCodeChecksum", void 0, { internal: true }),
327
+ ...import_Values.V.staticProperty("keypadMode", {
328
+ ...import_safe.ValueMetadata.ReadOnlyNumber,
329
+ label: "Keypad Mode"
330
+ }, { minVersion: 2 }),
331
+ ...import_Values.V.staticProperty("adminCode", {
332
+ ...import_safe.ValueMetadata.String,
333
+ label: "Admin Code",
334
+ minLength: 4,
335
+ maxLength: 10
336
+ }, {
337
+ minVersion: 2,
338
+ secret: true
339
+ })
340
+ }),
341
+ ...import_Values.V.defineDynamicCCValues(import_safe.CommandClasses["User Code"], {
342
+ ...import_Values.V.dynamicPropertyAndKeyWithName("userIdStatus", "userIdStatus", (userId) => userId, ({ property, propertyKey }) => property === "userIdStatus" && typeof propertyKey === "number", (userId) => ({
343
+ ...import_safe.ValueMetadata.Number,
344
+ label: `User ID status (${userId})`
345
+ })),
346
+ ...import_Values.V.dynamicPropertyAndKeyWithName(
347
+ "userCode",
348
+ "userCode",
349
+ (userId) => userId,
350
+ ({ property, propertyKey }) => property === "userCode" && typeof propertyKey === "number",
351
+ // The user code metadata is dynamically created
352
+ void 0,
353
+ { secret: true }
354
+ )
355
+ })
356
+ });
357
+ function parseExtendedUserCode(payload) {
358
+ (0, import_safe.validatePayload)(payload.length >= 4);
359
+ const userId = payload.readUInt16BE(0);
360
+ const status = payload[2];
361
+ const codeLength = payload[3] & 15;
362
+ (0, import_safe.validatePayload)(payload.length >= 4 + codeLength);
363
+ const code = payload.subarray(4, 4 + codeLength).toString("ascii");
364
+ return {
365
+ code: {
366
+ userId,
367
+ userIdStatus: status,
368
+ userCode: code
369
+ },
370
+ bytesRead: 4 + codeLength
371
+ };
372
+ }
373
+ function validateCode(code, supportedChars) {
374
+ if (code.length < 4 || code.length > 10)
375
+ return false;
376
+ return [...code].every((char) => supportedChars.includes(char));
377
+ }
378
+ function setUserCodeMetadata(ctx, userId, userCode) {
379
+ const statusValue = UserCodeCCValues.userIdStatus(userId);
380
+ const codeValue = UserCodeCCValues.userCode(userId);
381
+ const ccVersion = (0, import_CommandClass.getEffectiveCCVersion)(ctx, this);
382
+ const supportedUserIDStatuses = this.getValue(ctx, UserCodeCCValues.supportedUserIDStatuses) ?? (ccVersion === 1 ? [
383
+ import_Types.UserIDStatus.Available,
384
+ import_Types.UserIDStatus.Enabled,
385
+ import_Types.UserIDStatus.Disabled
386
+ ] : [
387
+ import_Types.UserIDStatus.Available,
388
+ import_Types.UserIDStatus.Enabled,
389
+ import_Types.UserIDStatus.Disabled,
390
+ import_Types.UserIDStatus.Messaging,
391
+ import_Types.UserIDStatus.PassageMode
392
+ ]);
393
+ this.ensureMetadata(ctx, statusValue, {
394
+ ...statusValue.meta,
395
+ states: (0, import_safe.enumValuesToMetadataStates)(import_Types.UserIDStatus, supportedUserIDStatuses)
396
+ });
397
+ const codeMetadata = {
398
+ ...(0, import_safe2.isUint8Array)(userCode) ? import_safe.ValueMetadata.Buffer : import_safe.ValueMetadata.String,
399
+ minLength: 4,
400
+ maxLength: 10,
401
+ label: `User Code (${userId})`
402
+ };
403
+ if (this.getMetadata(ctx, codeValue)?.type !== codeMetadata.type) {
404
+ this.setMetadata(ctx, codeValue, codeMetadata);
405
+ }
406
+ }
407
+ function persistUserCode(ctx, userId, userIdStatus, userCode) {
408
+ const statusValue = UserCodeCCValues.userIdStatus(userId);
409
+ const codeValue = UserCodeCCValues.userCode(userId);
410
+ if (userIdStatus === import_Types.UserIDStatus.StatusNotAvailable) {
411
+ this.removeValue(ctx, statusValue);
412
+ this.removeValue(ctx, codeValue);
413
+ this.removeMetadata(ctx, statusValue);
414
+ this.removeMetadata(ctx, codeValue);
415
+ } else {
416
+ setUserCodeMetadata.call(this, ctx, userId, userCode);
417
+ this.setValue(ctx, statusValue, userIdStatus);
418
+ this.setValue(ctx, codeValue, userCode);
419
+ }
420
+ return true;
421
+ }
422
+ function userCodeToLogString(userCode) {
423
+ if (userCode.length === 0)
424
+ return "(empty)";
425
+ return "*".repeat(userCode.length);
426
+ }
427
+ let UserCodeCCAPI = class UserCodeCCAPI2 extends import_API.PhysicalCCAPI {
428
+ supportsCommand(cmd) {
429
+ switch (cmd) {
430
+ case import_Types.UserCodeCommand.Get:
431
+ case import_Types.UserCodeCommand.Set:
432
+ case import_Types.UserCodeCommand.UsersNumberGet:
433
+ return true;
434
+ // This is mandatory
435
+ case import_Types.UserCodeCommand.CapabilitiesGet:
436
+ case import_Types.UserCodeCommand.KeypadModeSet:
437
+ case import_Types.UserCodeCommand.KeypadModeGet:
438
+ case import_Types.UserCodeCommand.ExtendedUserCodeSet:
439
+ case import_Types.UserCodeCommand.ExtendedUserCodeGet:
440
+ return this.version >= 2;
441
+ case import_Types.UserCodeCommand.AdminCodeSet:
442
+ case import_Types.UserCodeCommand.AdminCodeGet: {
443
+ if (this.version < 2)
444
+ return false;
445
+ return this.tryGetValueDB()?.getValue(UserCodeCCValues.supportsAdminCode.endpoint(this.endpoint.index));
446
+ }
447
+ case import_Types.UserCodeCommand.UserCodeChecksumGet: {
448
+ if (this.version < 2)
449
+ return false;
450
+ return this.tryGetValueDB()?.getValue(UserCodeCCValues.supportsUserCodeChecksum.endpoint(this.endpoint.index));
451
+ }
452
+ }
453
+ return super.supportsCommand(cmd);
454
+ }
455
+ get [import_API.SET_VALUE]() {
456
+ return async function({ property, propertyKey }, value) {
457
+ let result;
458
+ if (property === "keypadMode") {
459
+ if (typeof value !== "number") {
460
+ (0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
461
+ }
462
+ result = await this.setKeypadMode(value);
463
+ } else if (property === "adminCode" || property === "masterCode") {
464
+ if (typeof value !== "string") {
465
+ (0, import_API.throwWrongValueType)(this.ccId, property, "string", typeof value);
466
+ }
467
+ result = await this.setAdminCode(value);
468
+ } else if (property === "userIdStatus") {
469
+ if (propertyKey == void 0) {
470
+ (0, import_API.throwMissingPropertyKey)(this.ccId, property);
471
+ } else if (typeof propertyKey !== "number") {
472
+ (0, import_API.throwUnsupportedPropertyKey)(this.ccId, property, propertyKey);
473
+ }
474
+ if (typeof value !== "number") {
475
+ (0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
476
+ }
477
+ if (value === import_Types.UserIDStatus.Available) {
478
+ result = await this.clear(propertyKey);
479
+ } else {
480
+ const userCode = this.getValueDB().getValue(UserCodeCCValues.userCode(propertyKey).endpoint(this.endpoint.index));
481
+ result = await this.set(propertyKey, value, userCode);
482
+ }
483
+ } else if (property === "userCode") {
484
+ if (propertyKey == void 0) {
485
+ (0, import_API.throwMissingPropertyKey)(this.ccId, property);
486
+ } else if (typeof propertyKey !== "number") {
487
+ (0, import_API.throwUnsupportedPropertyKey)(this.ccId, property, propertyKey);
488
+ }
489
+ if (typeof value !== "string" && !(0, import_safe2.isUint8Array)(value)) {
490
+ (0, import_API.throwWrongValueType)(this.ccId, property, "string or Buffer", typeof value);
491
+ }
492
+ let userIdStatus = this.getValueDB().getValue(UserCodeCCValues.userIdStatus(propertyKey).endpoint(this.endpoint.index));
493
+ if (userIdStatus === import_Types.UserIDStatus.Available || userIdStatus == void 0) {
494
+ userIdStatus = import_Types.UserIDStatus.Enabled;
495
+ }
496
+ result = await this.set(propertyKey, userIdStatus, value);
497
+ } else {
498
+ (0, import_API.throwUnsupportedProperty)(this.ccId, property);
499
+ }
500
+ if (this.isSinglecast() && !(0, import_safe.supervisedCommandSucceeded)(result)) {
501
+ this.schedulePoll({ property, propertyKey }, value, {
502
+ transition: "fast"
503
+ });
504
+ }
505
+ return result;
506
+ };
507
+ }
508
+ get [import_API.POLL_VALUE]() {
509
+ return async function({ property, propertyKey }) {
510
+ switch (property) {
511
+ case "keypadMode":
512
+ return this.getKeypadMode();
513
+ case "adminCode":
514
+ return this.getAdminCode();
515
+ case "userIdStatus":
516
+ case "userCode": {
517
+ if (propertyKey == void 0) {
518
+ (0, import_API.throwMissingPropertyKey)(this.ccId, property);
519
+ } else if (typeof propertyKey !== "number") {
520
+ (0, import_API.throwUnsupportedPropertyKey)(this.ccId, property, propertyKey);
521
+ }
522
+ return (await this.get(propertyKey))?.[property];
523
+ }
524
+ default:
525
+ (0, import_API.throwUnsupportedProperty)(this.ccId, property);
526
+ }
527
+ };
528
+ }
529
+ async getUsersCount() {
530
+ this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.UsersNumberGet);
531
+ const cc = new UserCodeCCUsersNumberGet({
532
+ nodeId: this.endpoint.nodeId,
533
+ endpointIndex: this.endpoint.index
534
+ });
535
+ const response = await this.host.sendCommand(cc, this.commandOptions);
536
+ return response?.supportedUsers;
537
+ }
538
+ async get(userId, multiple = false) {
539
+ __assertType("userId", "number", __assertType__number.bind(void 0, userId));
540
+ __assertType("multiple", "(optional) boolean", __assertType__optional_boolean.bind(void 0, multiple));
541
+ if (userId > 255 || multiple) {
542
+ this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.ExtendedUserCodeGet);
543
+ const cc = new UserCodeCCExtendedUserCodeGet({
544
+ nodeId: this.endpoint.nodeId,
545
+ endpointIndex: this.endpoint.index,
546
+ userId,
547
+ reportMore: multiple
548
+ });
549
+ const response = await this.host.sendCommand(cc, this.commandOptions);
550
+ if (!response) {
551
+ return;
552
+ } else if (multiple) {
553
+ return (0, import_safe3.pick)(response, ["userCodes", "nextUserId"]);
554
+ } else {
555
+ return (0, import_safe3.pick)(response.userCodes[0], [
556
+ "userIdStatus",
557
+ "userCode"
558
+ ]);
559
+ }
560
+ } else {
561
+ this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.Get);
562
+ const cc = new UserCodeCCGet({
563
+ nodeId: this.endpoint.nodeId,
564
+ endpointIndex: this.endpoint.index,
565
+ userId
566
+ });
567
+ const response = await this.host.sendCommand(cc, this.commandOptions);
568
+ if (response)
569
+ return (0, import_safe3.pick)(response, ["userIdStatus", "userCode"]);
570
+ }
571
+ }
572
+ /** Configures a single user code */
573
+ async set(userId, userIdStatus, userCode) {
574
+ __assertType("userId", "number", __assertType__number.bind(void 0, userId));
575
+ __assertType("userIdStatus", void 0, __assertType__su__1__2__3__4_eu.bind(void 0, userIdStatus));
576
+ __assertType("userCode", void 0, __assertType__su__string__uint8array_eu.bind(void 0, userCode));
577
+ if (userId > 255) {
578
+ return this.setMany([{ userId, userIdStatus, userCode }]);
579
+ }
580
+ this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.Set);
581
+ const numUsers = UserCodeCC.getSupportedUsersCached(this.host, this.endpoint);
582
+ if (numUsers != void 0 && userId > numUsers) {
583
+ throw new import_safe.ZWaveError(`The user ID must be between 0 and the number of supported users ${numUsers}.`, import_safe.ZWaveErrorCodes.Argument_Invalid);
584
+ }
585
+ const cc = new UserCodeCCSet({
586
+ nodeId: this.endpoint.nodeId,
587
+ endpointIndex: this.endpoint.index,
588
+ userId,
589
+ userIdStatus,
590
+ userCode
591
+ });
592
+ return this.host.sendCommand(cc, this.commandOptions);
593
+ }
594
+ /** Configures multiple user codes */
595
+ async setMany(codes) {
596
+ __assertType("codes", void 0, __assertType__sa_su__3__4__5_eu_ea_2.bind(void 0, codes));
597
+ this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.ExtendedUserCodeSet);
598
+ const numUsers = UserCodeCC.getSupportedUsersCached(this.host, this.endpoint);
599
+ const supportedStatuses = UserCodeCC.getSupportedUserIDStatusesCached(this.host, this.endpoint);
600
+ const supportedASCIIChars = UserCodeCC.getSupportedASCIICharsCached(this.host, this.endpoint);
601
+ const supportsMultipleUserCodeSet = UserCodeCC.supportsMultipleUserCodeSetCached(this.host, this.endpoint) ?? false;
602
+ if (numUsers != void 0) {
603
+ if (codes.some((code) => code.userId < 0 || code.userId > numUsers)) {
604
+ throw new import_safe.ZWaveError(`All User IDs must be between 0 and the number of supported users ${numUsers}.`, import_safe.ZWaveErrorCodes.Argument_Invalid);
605
+ }
606
+ } else {
607
+ if (codes.some((code) => code.userId < 0)) {
608
+ throw new import_safe.ZWaveError(`All User IDs must be greater than 0.`, import_safe.ZWaveErrorCodes.Argument_Invalid);
609
+ }
610
+ }
611
+ if (codes.some((code) => code.userId === 0) && codes.length > 1) {
612
+ throw new import_safe.ZWaveError(`If user ID 0 is used, only one code may be set`, import_safe.ZWaveErrorCodes.Argument_Invalid);
613
+ } else if (codes.some((code) => code.userId === 0 && code.userIdStatus !== import_Types.UserIDStatus.Available)) {
614
+ throw new import_safe.ZWaveError(`User ID 0 may only be used to clear all user codes`, import_safe.ZWaveErrorCodes.Argument_Invalid);
615
+ } else if (codes.length > 1 && !supportsMultipleUserCodeSet) {
616
+ throw new import_safe.ZWaveError(`The node does not support setting multiple user codes at once`, import_safe.ZWaveErrorCodes.Argument_Invalid);
617
+ }
618
+ for (const code of codes) {
619
+ if (supportedStatuses != void 0 && !supportedStatuses.includes(code.userIdStatus)) {
620
+ throw new import_safe.ZWaveError(`The user ID status ${(0, import_safe3.getEnumMemberName)(import_Types.UserIDStatus, code.userIdStatus)} is not supported by the node`, import_safe.ZWaveErrorCodes.Argument_Invalid);
621
+ } else if (code.userIdStatus === import_Types.UserIDStatus.Available) {
622
+ code.userCode = void 0;
623
+ } else if (supportedASCIIChars) {
624
+ const userCodeString = typeof code.userCode === "string" ? code.userCode : (0, import_safe2.uint8ArrayToString)(code.userCode);
625
+ if (!validateCode(userCodeString, supportedASCIIChars)) {
626
+ throw new import_safe.ZWaveError(`The user code must consist of 4 to 10 of the following characters: ${supportedASCIIChars}`, import_safe.ZWaveErrorCodes.Argument_Invalid);
627
+ }
628
+ }
629
+ }
630
+ const cc = new UserCodeCCExtendedUserCodeSet({
631
+ nodeId: this.endpoint.nodeId,
632
+ endpointIndex: this.endpoint.index,
633
+ userCodes: codes
634
+ });
635
+ return this.host.sendCommand(cc, this.commandOptions);
636
+ }
637
+ /**
638
+ * Clears one or all user code
639
+ * @param userId The user code to clear. If none or 0 is given, all codes are cleared
640
+ */
641
+ async clear(userId = 0) {
642
+ __assertType("userId", "(optional) number", __assertType__optional_number.bind(void 0, userId));
643
+ if (this.version > 1 || userId > 255) {
644
+ return this.setMany([
645
+ { userId, userIdStatus: import_Types.UserIDStatus.Available }
646
+ ]);
647
+ } else {
648
+ this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.Set);
649
+ const numUsers = UserCodeCC.getSupportedUsersCached(this.host, this.endpoint);
650
+ if (numUsers != void 0 && userId > numUsers) {
651
+ throw new import_safe.ZWaveError(`The user ID must be between 0 and the number of supported users ${numUsers}.`, import_safe.ZWaveErrorCodes.Argument_Invalid);
652
+ }
653
+ const cc = new UserCodeCCSet({
654
+ nodeId: this.endpoint.nodeId,
655
+ endpointIndex: this.endpoint.index,
656
+ userId,
657
+ userIdStatus: import_Types.UserIDStatus.Available
658
+ });
659
+ return this.host.sendCommand(cc, this.commandOptions);
660
+ }
661
+ }
662
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
663
+ async getCapabilities() {
664
+ this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.CapabilitiesGet);
665
+ const cc = new UserCodeCCCapabilitiesGet({
666
+ nodeId: this.endpoint.nodeId,
667
+ endpointIndex: this.endpoint.index
668
+ });
669
+ const response = await this.host.sendCommand(cc, this.commandOptions);
670
+ if (response) {
671
+ return (0, import_safe3.pick)(response, [
672
+ "supportsAdminCode",
673
+ "supportsAdminCodeDeactivation",
674
+ "supportsUserCodeChecksum",
675
+ "supportsMultipleUserCodeReport",
676
+ "supportsMultipleUserCodeSet",
677
+ "supportedUserIDStatuses",
678
+ "supportedKeypadModes",
679
+ "supportedASCIIChars"
680
+ ]);
681
+ }
682
+ }
683
+ async getKeypadMode() {
684
+ this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.KeypadModeGet);
685
+ const cc = new UserCodeCCKeypadModeGet({
686
+ nodeId: this.endpoint.nodeId,
687
+ endpointIndex: this.endpoint.index
688
+ });
689
+ const response = await this.host.sendCommand(cc, this.commandOptions);
690
+ return response?.keypadMode;
691
+ }
692
+ async setKeypadMode(keypadMode) {
693
+ __assertType("keypadMode", "KeypadMode", __assertType__KeypadMode.bind(void 0, keypadMode));
694
+ this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.KeypadModeSet);
695
+ const supportedModes = UserCodeCC.getSupportedKeypadModesCached(this.host, this.endpoint);
696
+ if (!supportedModes) {
697
+ throw new import_safe.ZWaveError(`The keypad mode can only be set after the interview is complete!`, import_safe.ZWaveErrorCodes.Argument_Invalid);
698
+ } else if (!supportedModes.includes(keypadMode)) {
699
+ throw new import_safe.ZWaveError(`The keypad mode ${(0, import_safe3.getEnumMemberName)(import_Types.KeypadMode, keypadMode)} is not supported by the node!`, import_safe.ZWaveErrorCodes.Argument_Invalid);
700
+ }
701
+ const cc = new UserCodeCCKeypadModeSet({
702
+ nodeId: this.endpoint.nodeId,
703
+ endpointIndex: this.endpoint.index,
704
+ keypadMode
705
+ });
706
+ return this.host.sendCommand(cc, this.commandOptions);
707
+ }
708
+ async getAdminCode() {
709
+ this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.AdminCodeGet);
710
+ const cc = new UserCodeCCAdminCodeGet({
711
+ nodeId: this.endpoint.nodeId,
712
+ endpointIndex: this.endpoint.index
713
+ });
714
+ const response = await this.host.sendCommand(cc, this.commandOptions);
715
+ return response?.adminCode;
716
+ }
717
+ async setAdminCode(adminCode) {
718
+ __assertType("adminCode", "string", __assertType__string.bind(void 0, adminCode));
719
+ this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.AdminCodeSet);
720
+ const supportedASCIIChars = UserCodeCC.getSupportedASCIICharsCached(this.host, this.endpoint);
721
+ if (!supportedASCIIChars) {
722
+ throw new import_safe.ZWaveError(`The admin code can only be set after the interview is complete!`, import_safe.ZWaveErrorCodes.Argument_Invalid);
723
+ }
724
+ if (!adminCode) {
725
+ const supportsDeactivation = UserCodeCC.supportsAdminCodeDeactivationCached(this.host, this.endpoint);
726
+ if (!supportsDeactivation) {
727
+ throw new import_safe.ZWaveError(`The node does not support deactivating the admin code!`, import_safe.ZWaveErrorCodes.Argument_Invalid);
728
+ }
729
+ } else if (!validateCode(adminCode, supportedASCIIChars)) {
730
+ throw new import_safe.ZWaveError(`The admin code must consist of 4 to 10 of the following characters: ${supportedASCIIChars}`, import_safe.ZWaveErrorCodes.Argument_Invalid);
731
+ }
732
+ const cc = new UserCodeCCAdminCodeSet({
733
+ nodeId: this.endpoint.nodeId,
734
+ endpointIndex: this.endpoint.index,
735
+ adminCode
736
+ });
737
+ return this.host.sendCommand(cc, this.commandOptions);
738
+ }
739
+ async getUserCodeChecksum() {
740
+ this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.UserCodeChecksumGet);
741
+ const cc = new UserCodeCCUserCodeChecksumGet({
742
+ nodeId: this.endpoint.nodeId,
743
+ endpointIndex: this.endpoint.index
744
+ });
745
+ const response = await this.host.sendCommand(cc, this.commandOptions);
746
+ return response?.userCodeChecksum;
747
+ }
748
+ };
749
+ UserCodeCCAPI = __decorate([
750
+ (0, import_CommandClassDecorators.API)(import_safe.CommandClasses["User Code"])
751
+ ], UserCodeCCAPI);
752
+ let UserCodeCC = UserCodeCC_1 = class UserCodeCC2 extends import_CommandClass.CommandClass {
753
+ async interview(ctx) {
754
+ const node = this.getNode(ctx);
755
+ const endpoint = this.getEndpoint(ctx);
756
+ const api = import_API.CCAPI.create(import_safe.CommandClasses["User Code"], ctx, endpoint).withOptions({
757
+ priority: import_safe.MessagePriority.NodeQuery
758
+ });
759
+ ctx.logNode(node.id, {
760
+ endpoint: this.endpointIndex,
761
+ message: `Interviewing ${this.ccName}...`,
762
+ direction: "none"
763
+ });
764
+ if (api.version >= 2) {
765
+ ctx.logNode(node.id, {
766
+ message: "querying capabilities...",
767
+ direction: "outbound"
768
+ });
769
+ const caps = await api.getCapabilities();
770
+ if (!caps) {
771
+ ctx.logNode(node.id, {
772
+ endpoint: this.endpointIndex,
773
+ message: "User Code capabilities query timed out, skipping interview...",
774
+ level: "warn"
775
+ });
776
+ return;
777
+ }
778
+ }
779
+ ctx.logNode(node.id, {
780
+ message: "querying number of user codes...",
781
+ direction: "outbound"
782
+ });
783
+ const supportedUsers = await api.getUsersCount();
784
+ if (supportedUsers == void 0) {
785
+ ctx.logNode(node.id, {
786
+ endpoint: this.endpointIndex,
787
+ message: "Querying number of user codes timed out, skipping interview...",
788
+ level: "warn"
789
+ });
790
+ return;
791
+ }
792
+ for (let userId = 1; userId <= supportedUsers; userId++) {
793
+ setUserCodeMetadata.call(this, ctx, userId);
794
+ }
795
+ if (ctx.getInterviewOptions()?.queryAllUserCodes) {
796
+ await this.refreshValues(ctx);
797
+ }
798
+ this.setInterviewComplete(ctx, true);
799
+ }
800
+ async refreshValues(ctx) {
801
+ const node = this.getNode(ctx);
802
+ const endpoint = this.getEndpoint(ctx);
803
+ const api = import_API.CCAPI.create(import_safe.CommandClasses["User Code"], ctx, endpoint).withOptions({
804
+ priority: import_safe.MessagePriority.NodeQuery
805
+ });
806
+ const supportsAdminCode = UserCodeCC_1.supportsAdminCodeCached(ctx, endpoint);
807
+ const supportsUserCodeChecksum = this.getValue(ctx, UserCodeCCValues.supportsUserCodeChecksum) ?? false;
808
+ const supportedKeypadModes = this.getValue(ctx, UserCodeCCValues.supportedKeypadModes) ?? [];
809
+ const supportedUsers = this.getValue(ctx, UserCodeCCValues.supportedUsers) ?? 0;
810
+ const supportsMultipleUserCodeReport = !!this.getValue(ctx, UserCodeCCValues.supportsMultipleUserCodeReport);
811
+ if (api.version >= 2) {
812
+ if (supportsAdminCode) {
813
+ ctx.logNode(node.id, {
814
+ message: "querying admin code...",
815
+ direction: "outbound"
816
+ });
817
+ await api.getAdminCode();
818
+ }
819
+ if (supportedKeypadModes.length > 1) {
820
+ ctx.logNode(node.id, {
821
+ message: "querying active keypad mode...",
822
+ direction: "outbound"
823
+ });
824
+ await api.getKeypadMode();
825
+ }
826
+ const storedUserCodeChecksum = this.getValue(ctx, UserCodeCCValues.userCodeChecksum) ?? 0;
827
+ let currentUserCodeChecksum = 0;
828
+ if (supportsUserCodeChecksum) {
829
+ ctx.logNode(node.id, {
830
+ message: "retrieving current user code checksum...",
831
+ direction: "outbound"
832
+ });
833
+ currentUserCodeChecksum = await api.getUserCodeChecksum();
834
+ }
835
+ if (!supportsUserCodeChecksum || currentUserCodeChecksum !== storedUserCodeChecksum) {
836
+ ctx.logNode(node.id, {
837
+ message: "checksum changed or is not supported, querying all user codes...",
838
+ direction: "outbound"
839
+ });
840
+ if (supportsMultipleUserCodeReport) {
841
+ let nextUserId = 1;
842
+ while (nextUserId > 0 && nextUserId <= supportedUsers) {
843
+ const response = await api.get(nextUserId, true);
844
+ if (response) {
845
+ nextUserId = response.nextUserId;
846
+ } else {
847
+ ctx.logNode(node.id, {
848
+ endpoint: this.endpointIndex,
849
+ message: `Querying user code #${nextUserId} timed out, skipping the remaining interview...`,
850
+ level: "warn"
851
+ });
852
+ break;
853
+ }
854
+ }
855
+ } else {
856
+ for (let userId = 1; userId <= supportedUsers; userId++) {
857
+ await api.get(userId);
858
+ }
859
+ }
860
+ }
861
+ } else {
862
+ ctx.logNode(node.id, {
863
+ message: "querying all user codes...",
864
+ direction: "outbound"
865
+ });
866
+ for (let userId = 1; userId <= supportedUsers; userId++) {
867
+ await api.get(userId);
868
+ }
869
+ }
870
+ }
871
+ /**
872
+ * Returns the number of supported users.
873
+ * This only works AFTER the interview process
874
+ */
875
+ static getSupportedUsersCached(ctx, endpoint) {
876
+ return ctx.getValueDB(endpoint.nodeId).getValue(UserCodeCCValues.supportedUsers.endpoint(endpoint.index));
877
+ }
878
+ /**
879
+ * Returns the supported keypad modes.
880
+ * This only works AFTER the interview process
881
+ */
882
+ static getSupportedKeypadModesCached(ctx, endpoint) {
883
+ return ctx.getValueDB(endpoint.nodeId).getValue(UserCodeCCValues.supportedKeypadModes.endpoint(endpoint.index));
884
+ }
885
+ /**
886
+ * Returns the supported user ID statuses.
887
+ * This only works AFTER the interview process
888
+ */
889
+ static getSupportedUserIDStatusesCached(ctx, endpoint) {
890
+ return ctx.getValueDB(endpoint.nodeId).getValue(UserCodeCCValues.supportedUserIDStatuses.endpoint(endpoint.index));
891
+ }
892
+ /**
893
+ * Returns the supported ASCII characters.
894
+ * This only works AFTER the interview process
895
+ */
896
+ static getSupportedASCIICharsCached(ctx, endpoint) {
897
+ return ctx.getValueDB(endpoint.nodeId).getValue(UserCodeCCValues.supportedASCIIChars.endpoint(endpoint.index));
898
+ }
899
+ /**
900
+ * Returns whether the admin code functionality is supported.
901
+ * This only works AFTER the interview process
902
+ */
903
+ static supportsAdminCodeCached(ctx, endpoint) {
904
+ const valueDB = ctx.getValueDB(endpoint.nodeId);
905
+ return valueDB.getValue(UserCodeCCValues.supportsAdminCode.endpoint(endpoint.index)) ?? valueDB.getValue(UserCodeCCValues._deprecated_supportsMasterCode.endpoint(endpoint.index)) ?? false;
906
+ }
907
+ /**
908
+ * Returns whether deactivating the admin code is supported.
909
+ * This only works AFTER the interview process
910
+ */
911
+ static supportsAdminCodeDeactivationCached(ctx, endpoint) {
912
+ const valueDB = ctx.getValueDB(endpoint.nodeId);
913
+ return valueDB.getValue(UserCodeCCValues.supportsAdminCodeDeactivation.endpoint(endpoint.index)) ?? valueDB.getValue(UserCodeCCValues._deprecated_supportsMasterCodeDeactivation.endpoint(endpoint.index)) ?? false;
914
+ }
915
+ /**
916
+ * Returns whether setting multiple user codes at once is supported.
917
+ * This only works AFTER the interview process
918
+ */
919
+ static supportsMultipleUserCodeSetCached(ctx, endpoint) {
920
+ return !!ctx.getValueDB(endpoint.nodeId).getValue(UserCodeCCValues.supportsMultipleUserCodeSet.endpoint(endpoint.index));
921
+ }
922
+ /**
923
+ * Returns the current status of a user ID.
924
+ * This only works AFTER the user IDs have been queried.
925
+ */
926
+ static getUserIdStatusCached(ctx, endpoint, userId) {
927
+ return ctx.getValueDB(endpoint.nodeId).getValue(UserCodeCCValues.userIdStatus(userId).endpoint(endpoint.index));
928
+ }
929
+ /**
930
+ * Returns the current code belonging to a user ID.
931
+ * This only works AFTER the user IDs have been queried.
932
+ */
933
+ static getUserCodeCached(ctx, endpoint, userId) {
934
+ return ctx.getValueDB(endpoint.nodeId).getValue(UserCodeCCValues.userCode(userId).endpoint(endpoint.index));
935
+ }
936
+ };
937
+ UserCodeCC = UserCodeCC_1 = __decorate([
938
+ (0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["User Code"]),
939
+ (0, import_CommandClassDecorators.implementedVersion)(2),
940
+ (0, import_CommandClassDecorators.ccValues)(UserCodeCCValues)
941
+ ], UserCodeCC);
942
+ let UserCodeCCSet = UserCodeCCSet_1 = class UserCodeCCSet2 extends UserCodeCC {
943
+ constructor(options) {
944
+ super(options);
945
+ this.userId = options.userId;
946
+ this.userIdStatus = options.userIdStatus;
947
+ if (this.userId < 0) {
948
+ throw new import_safe.ZWaveError(`${this.constructor.name}: The user ID must be between greater than 0.`, import_safe.ZWaveErrorCodes.Argument_Invalid);
949
+ } else if (this.userId === 0 && this.userIdStatus !== import_Types.UserIDStatus.Available) {
950
+ throw new import_safe.ZWaveError(`${this.constructor.name}: User ID 0 may only be used to clear all user codes`, import_safe.ZWaveErrorCodes.Argument_Invalid);
951
+ } else if (this.userIdStatus === import_Types.UserIDStatus.Available) {
952
+ this.userCode = "\0".repeat(4);
953
+ } else {
954
+ this.userCode = options.userCode;
955
+ if (this.userCode.length < 4 || this.userCode.length > 10) {
956
+ throw new import_safe.ZWaveError(`${this.constructor.name}: The user code must have a length of 4 to 10 ${typeof this.userCode === "string" ? "characters" : "bytes"}`, import_safe.ZWaveErrorCodes.Argument_Invalid);
957
+ }
958
+ }
959
+ }
960
+ static from(raw, ctx) {
961
+ (0, import_safe.validatePayload)(raw.payload.length >= 2);
962
+ const userId = raw.payload[0];
963
+ const userIdStatus = raw.payload[1];
964
+ if (userIdStatus === import_Types.UserIDStatus.StatusNotAvailable) {
965
+ import_safe.validatePayload.fail("Invalid user ID status");
966
+ }
967
+ if (userIdStatus === import_Types.UserIDStatus.Available) {
968
+ return new UserCodeCCSet_1({
969
+ nodeId: ctx.sourceNodeId,
970
+ userId,
971
+ userIdStatus
972
+ });
973
+ }
974
+ const userCode = raw.payload.subarray(2);
975
+ return new UserCodeCCSet_1({
976
+ nodeId: ctx.sourceNodeId,
977
+ userId,
978
+ userIdStatus,
979
+ userCode
980
+ });
981
+ }
982
+ userId;
983
+ userIdStatus;
984
+ userCode;
985
+ serialize(ctx) {
986
+ this.payload = import_safe2.Bytes.concat([
987
+ import_safe2.Bytes.from([this.userId, this.userIdStatus]),
988
+ typeof this.userCode === "string" ? import_safe2.Bytes.from(this.userCode, "ascii") : this.userCode
989
+ ]);
990
+ return super.serialize(ctx);
991
+ }
992
+ toLogEntry(ctx) {
993
+ return {
994
+ ...super.toLogEntry(ctx),
995
+ message: {
996
+ "user id": this.userId,
997
+ "id status": (0, import_safe3.getEnumMemberName)(import_Types.UserIDStatus, this.userIdStatus),
998
+ "user code": userCodeToLogString(this.userCode)
999
+ }
1000
+ };
1001
+ }
1002
+ };
1003
+ UserCodeCCSet = UserCodeCCSet_1 = __decorate([
1004
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.Set),
1005
+ (0, import_CommandClassDecorators.useSupervision)()
1006
+ ], UserCodeCCSet);
1007
+ let UserCodeCCReport = UserCodeCCReport_1 = class UserCodeCCReport2 extends UserCodeCC {
1008
+ constructor(options) {
1009
+ super(options);
1010
+ this.userId = options.userId;
1011
+ this.userIdStatus = options.userIdStatus;
1012
+ this.userCode = options.userCode ?? "";
1013
+ }
1014
+ static from(raw, ctx) {
1015
+ (0, import_safe.validatePayload)(raw.payload.length >= 2);
1016
+ const userId = raw.payload[0];
1017
+ const userIdStatus = raw.payload[1];
1018
+ let userCode;
1019
+ if (raw.payload.length === 2 && (userIdStatus === import_Types.UserIDStatus.Available || userIdStatus === import_Types.UserIDStatus.StatusNotAvailable)) {
1020
+ userCode = "";
1021
+ } else {
1022
+ (0, import_safe.validatePayload)(raw.payload.length >= 6);
1023
+ let userCodeBuffer = raw.payload.subarray(2);
1024
+ while (userCodeBuffer.at(-1) === 0) {
1025
+ userCodeBuffer = userCodeBuffer.subarray(0, -1);
1026
+ }
1027
+ const userCodeString = userCodeBuffer.toString("utf8");
1028
+ if ((0, import_safe3.isPrintableASCII)(userCodeString)) {
1029
+ userCode = userCodeString;
1030
+ } else if ((0, import_safe3.isPrintableASCIIWithWhitespace)(userCodeString)) {
1031
+ userCode = userCodeString.trim();
1032
+ } else {
1033
+ userCode = userCodeBuffer;
1034
+ }
1035
+ }
1036
+ return new UserCodeCCReport_1({
1037
+ nodeId: ctx.sourceNodeId,
1038
+ userId,
1039
+ userIdStatus,
1040
+ userCode
1041
+ });
1042
+ }
1043
+ userId;
1044
+ userIdStatus;
1045
+ userCode;
1046
+ persistValues(ctx) {
1047
+ if (!super.persistValues(ctx))
1048
+ return false;
1049
+ persistUserCode.call(this, ctx, this.userId, this.userIdStatus, this.userCode);
1050
+ return true;
1051
+ }
1052
+ serialize(ctx) {
1053
+ let userCodeBuffer;
1054
+ if (typeof this.userCode === "string") {
1055
+ userCodeBuffer = import_safe2.Bytes.from(this.userCode, "ascii");
1056
+ } else {
1057
+ userCodeBuffer = this.userCode;
1058
+ }
1059
+ this.payload = import_safe2.Bytes.concat([
1060
+ import_safe2.Bytes.from([this.userId, this.userIdStatus]),
1061
+ userCodeBuffer
1062
+ ]);
1063
+ return super.serialize(ctx);
1064
+ }
1065
+ toLogEntry(ctx) {
1066
+ return {
1067
+ ...super.toLogEntry(ctx),
1068
+ message: {
1069
+ "user id": this.userId,
1070
+ "id status": (0, import_safe3.getEnumMemberName)(import_Types.UserIDStatus, this.userIdStatus),
1071
+ "user code": userCodeToLogString(this.userCode)
1072
+ }
1073
+ };
1074
+ }
1075
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
1076
+ toNotificationEventParameters() {
1077
+ return { userId: this.userId };
1078
+ }
1079
+ };
1080
+ UserCodeCCReport = UserCodeCCReport_1 = __decorate([
1081
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.Report)
1082
+ ], UserCodeCCReport);
1083
+ let UserCodeCCGet = UserCodeCCGet_1 = class UserCodeCCGet2 extends UserCodeCC {
1084
+ constructor(options) {
1085
+ super(options);
1086
+ this.userId = options.userId;
1087
+ }
1088
+ static from(raw, ctx) {
1089
+ (0, import_safe.validatePayload)(raw.payload.length >= 1);
1090
+ const userId = raw.payload[0];
1091
+ return new UserCodeCCGet_1({
1092
+ nodeId: ctx.sourceNodeId,
1093
+ userId
1094
+ });
1095
+ }
1096
+ userId;
1097
+ serialize(ctx) {
1098
+ this.payload = import_safe2.Bytes.from([this.userId]);
1099
+ return super.serialize(ctx);
1100
+ }
1101
+ toLogEntry(ctx) {
1102
+ return {
1103
+ ...super.toLogEntry(ctx),
1104
+ message: { "user id": this.userId }
1105
+ };
1106
+ }
1107
+ };
1108
+ UserCodeCCGet = UserCodeCCGet_1 = __decorate([
1109
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.Get),
1110
+ (0, import_CommandClassDecorators.expectedCCResponse)(UserCodeCCReport)
1111
+ ], UserCodeCCGet);
1112
+ let UserCodeCCUsersNumberReport = UserCodeCCUsersNumberReport_1 = class UserCodeCCUsersNumberReport2 extends UserCodeCC {
1113
+ constructor(options) {
1114
+ super(options);
1115
+ this.supportedUsers = options.supportedUsers;
1116
+ }
1117
+ static from(raw, ctx) {
1118
+ (0, import_safe.validatePayload)(raw.payload.length >= 1);
1119
+ let supportedUsers;
1120
+ if (raw.payload.length >= 3) {
1121
+ supportedUsers = raw.payload.readUInt16BE(1);
1122
+ } else {
1123
+ supportedUsers = raw.payload[0];
1124
+ }
1125
+ return new UserCodeCCUsersNumberReport_1({
1126
+ nodeId: ctx.sourceNodeId,
1127
+ supportedUsers
1128
+ });
1129
+ }
1130
+ supportedUsers;
1131
+ serialize(ctx) {
1132
+ this.payload = new import_safe2.Bytes(3);
1133
+ this.payload[0] = Math.min(255, this.supportedUsers);
1134
+ this.payload.writeUInt16BE(this.supportedUsers, 1);
1135
+ return super.serialize(ctx);
1136
+ }
1137
+ toLogEntry(ctx) {
1138
+ return {
1139
+ ...super.toLogEntry(ctx),
1140
+ message: { "supported users": this.supportedUsers }
1141
+ };
1142
+ }
1143
+ };
1144
+ __decorate([
1145
+ (0, import_CommandClassDecorators.ccValue)(UserCodeCCValues.supportedUsers)
1146
+ ], UserCodeCCUsersNumberReport.prototype, "supportedUsers", void 0);
1147
+ UserCodeCCUsersNumberReport = UserCodeCCUsersNumberReport_1 = __decorate([
1148
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.UsersNumberReport)
1149
+ ], UserCodeCCUsersNumberReport);
1150
+ let UserCodeCCUsersNumberGet = class UserCodeCCUsersNumberGet2 extends UserCodeCC {
1151
+ };
1152
+ UserCodeCCUsersNumberGet = __decorate([
1153
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.UsersNumberGet),
1154
+ (0, import_CommandClassDecorators.expectedCCResponse)(UserCodeCCUsersNumberReport)
1155
+ ], UserCodeCCUsersNumberGet);
1156
+ let UserCodeCCCapabilitiesReport = UserCodeCCCapabilitiesReport_1 = class UserCodeCCCapabilitiesReport2 extends UserCodeCC {
1157
+ constructor(options) {
1158
+ super(options);
1159
+ this.supportsAdminCode = options.supportsAdminCode;
1160
+ this.supportsAdminCodeDeactivation = options.supportsAdminCodeDeactivation;
1161
+ this.supportsUserCodeChecksum = options.supportsUserCodeChecksum;
1162
+ this.supportsMultipleUserCodeReport = options.supportsMultipleUserCodeReport;
1163
+ this.supportsMultipleUserCodeSet = options.supportsMultipleUserCodeSet;
1164
+ this.supportedUserIDStatuses = options.supportedUserIDStatuses;
1165
+ this.supportedKeypadModes = options.supportedKeypadModes;
1166
+ this.supportedASCIIChars = options.supportedASCIIChars;
1167
+ }
1168
+ static from(raw, ctx) {
1169
+ let offset = 0;
1170
+ (0, import_safe.validatePayload)(raw.payload.length >= offset + 1);
1171
+ const supportsAdminCode = !!(raw.payload[offset] & 128);
1172
+ const supportsAdminCodeDeactivation = !!(raw.payload[offset] & 64);
1173
+ const statusBitMaskLength = raw.payload[offset] & 31;
1174
+ offset += 1;
1175
+ (0, import_safe.validatePayload)(raw.payload.length >= offset + statusBitMaskLength + 1);
1176
+ const supportedUserIDStatuses = (0, import_safe.parseBitMask)(raw.payload.subarray(offset, offset + statusBitMaskLength), import_Types.UserIDStatus.Available);
1177
+ offset += statusBitMaskLength;
1178
+ const supportsUserCodeChecksum = !!(raw.payload[offset] & 128);
1179
+ const supportsMultipleUserCodeReport = !!(raw.payload[offset] & 64);
1180
+ const supportsMultipleUserCodeSet = !!(raw.payload[offset] & 32);
1181
+ const keypadModesBitMaskLength = raw.payload[offset] & 31;
1182
+ offset += 1;
1183
+ (0, import_safe.validatePayload)(raw.payload.length >= offset + keypadModesBitMaskLength + 1);
1184
+ const supportedKeypadModes = (0, import_safe.parseBitMask)(raw.payload.subarray(offset, offset + keypadModesBitMaskLength), import_Types.KeypadMode.Normal);
1185
+ offset += keypadModesBitMaskLength;
1186
+ const keysBitMaskLength = raw.payload[offset] & 31;
1187
+ offset += 1;
1188
+ (0, import_safe.validatePayload)(raw.payload.length >= offset + keysBitMaskLength);
1189
+ const supportedASCIIChars = import_safe2.Bytes.from((0, import_safe.parseBitMask)(raw.payload.subarray(offset, offset + keysBitMaskLength), 0)).toString("ascii");
1190
+ return new UserCodeCCCapabilitiesReport_1({
1191
+ nodeId: ctx.sourceNodeId,
1192
+ supportsAdminCode,
1193
+ supportsAdminCodeDeactivation,
1194
+ supportedUserIDStatuses,
1195
+ supportsUserCodeChecksum,
1196
+ supportsMultipleUserCodeReport,
1197
+ supportsMultipleUserCodeSet,
1198
+ supportedKeypadModes,
1199
+ supportedASCIIChars
1200
+ });
1201
+ }
1202
+ supportsAdminCode;
1203
+ supportsAdminCodeDeactivation;
1204
+ supportsUserCodeChecksum;
1205
+ supportsMultipleUserCodeReport;
1206
+ supportsMultipleUserCodeSet;
1207
+ supportedUserIDStatuses;
1208
+ supportedKeypadModes;
1209
+ supportedASCIIChars;
1210
+ serialize(ctx) {
1211
+ const supportedStatusesBitmask = (0, import_safe.encodeBitMask)(this.supportedUserIDStatuses, void 0, import_Types.UserIDStatus.Available);
1212
+ const controlByte1 = (this.supportsAdminCode ? 128 : 0) | (this.supportsAdminCodeDeactivation ? 64 : 0) | supportedStatusesBitmask.length & 31;
1213
+ const supportedKeypadModesBitmask = (0, import_safe.encodeBitMask)(this.supportedKeypadModes, void 0, import_Types.KeypadMode.Normal);
1214
+ const controlByte2 = (this.supportsUserCodeChecksum ? 128 : 0) | (this.supportsMultipleUserCodeReport ? 64 : 0) | (this.supportsMultipleUserCodeSet ? 32 : 0) | supportedKeypadModesBitmask.length & 31;
1215
+ const keysAsNumbers = [...this.supportedASCIIChars].map((char) => char.charCodeAt(0));
1216
+ const supportedKeysBitmask = (0, import_safe.encodeBitMask)(keysAsNumbers, void 0, 0);
1217
+ const controlByte3 = supportedKeysBitmask.length & 31;
1218
+ this.payload = import_safe2.Bytes.concat([
1219
+ import_safe2.Bytes.from([controlByte1]),
1220
+ supportedStatusesBitmask,
1221
+ import_safe2.Bytes.from([controlByte2]),
1222
+ supportedKeypadModesBitmask,
1223
+ import_safe2.Bytes.from([controlByte3]),
1224
+ supportedKeysBitmask
1225
+ ]);
1226
+ return super.serialize(ctx);
1227
+ }
1228
+ toLogEntry(ctx) {
1229
+ return {
1230
+ ...super.toLogEntry(ctx),
1231
+ message: {
1232
+ "supports admin code": this.supportsAdminCode,
1233
+ "supports admin code deactivation": this.supportsAdminCodeDeactivation,
1234
+ "supports user code checksum": this.supportsUserCodeChecksum,
1235
+ "supports multiple codes in report": this.supportsMultipleUserCodeReport,
1236
+ "supports multiple codes in set": this.supportsMultipleUserCodeSet,
1237
+ "supported user id statuses": this.supportedUserIDStatuses.map((status) => `
1238
+ \xB7 ${(0, import_safe3.getEnumMemberName)(import_Types.UserIDStatus, status)}`).join(""),
1239
+ "supported keypad modes": this.supportedKeypadModes.map((mode) => `
1240
+ \xB7 ${(0, import_safe3.getEnumMemberName)(import_Types.KeypadMode, mode)}`).join(""),
1241
+ "supported ASCII chars": this.supportedASCIIChars
1242
+ }
1243
+ };
1244
+ }
1245
+ };
1246
+ __decorate([
1247
+ (0, import_CommandClassDecorators.ccValue)(UserCodeCCValues.supportsAdminCode)
1248
+ ], UserCodeCCCapabilitiesReport.prototype, "supportsAdminCode", void 0);
1249
+ __decorate([
1250
+ (0, import_CommandClassDecorators.ccValue)(UserCodeCCValues.supportsAdminCodeDeactivation)
1251
+ ], UserCodeCCCapabilitiesReport.prototype, "supportsAdminCodeDeactivation", void 0);
1252
+ __decorate([
1253
+ (0, import_CommandClassDecorators.ccValue)(UserCodeCCValues.supportsUserCodeChecksum)
1254
+ ], UserCodeCCCapabilitiesReport.prototype, "supportsUserCodeChecksum", void 0);
1255
+ __decorate([
1256
+ (0, import_CommandClassDecorators.ccValue)(UserCodeCCValues.supportsMultipleUserCodeReport)
1257
+ ], UserCodeCCCapabilitiesReport.prototype, "supportsMultipleUserCodeReport", void 0);
1258
+ __decorate([
1259
+ (0, import_CommandClassDecorators.ccValue)(UserCodeCCValues.supportsMultipleUserCodeSet)
1260
+ ], UserCodeCCCapabilitiesReport.prototype, "supportsMultipleUserCodeSet", void 0);
1261
+ __decorate([
1262
+ (0, import_CommandClassDecorators.ccValue)(UserCodeCCValues.supportedUserIDStatuses)
1263
+ ], UserCodeCCCapabilitiesReport.prototype, "supportedUserIDStatuses", void 0);
1264
+ __decorate([
1265
+ (0, import_CommandClassDecorators.ccValue)(UserCodeCCValues.supportedKeypadModes)
1266
+ ], UserCodeCCCapabilitiesReport.prototype, "supportedKeypadModes", void 0);
1267
+ __decorate([
1268
+ (0, import_CommandClassDecorators.ccValue)(UserCodeCCValues.supportedASCIIChars)
1269
+ ], UserCodeCCCapabilitiesReport.prototype, "supportedASCIIChars", void 0);
1270
+ UserCodeCCCapabilitiesReport = UserCodeCCCapabilitiesReport_1 = __decorate([
1271
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.CapabilitiesReport)
1272
+ ], UserCodeCCCapabilitiesReport);
1273
+ let UserCodeCCCapabilitiesGet = class UserCodeCCCapabilitiesGet2 extends UserCodeCC {
1274
+ };
1275
+ UserCodeCCCapabilitiesGet = __decorate([
1276
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.CapabilitiesGet),
1277
+ (0, import_CommandClassDecorators.expectedCCResponse)(UserCodeCCCapabilitiesReport)
1278
+ ], UserCodeCCCapabilitiesGet);
1279
+ let UserCodeCCKeypadModeSet = UserCodeCCKeypadModeSet_1 = class UserCodeCCKeypadModeSet2 extends UserCodeCC {
1280
+ constructor(options) {
1281
+ super(options);
1282
+ this.keypadMode = options.keypadMode;
1283
+ }
1284
+ static from(raw, ctx) {
1285
+ (0, import_safe.validatePayload)(raw.payload.length >= 1);
1286
+ const keypadMode = raw.payload[0];
1287
+ return new UserCodeCCKeypadModeSet_1({
1288
+ nodeId: ctx.sourceNodeId,
1289
+ keypadMode
1290
+ });
1291
+ }
1292
+ keypadMode;
1293
+ serialize(ctx) {
1294
+ this.payload = import_safe2.Bytes.from([this.keypadMode]);
1295
+ return super.serialize(ctx);
1296
+ }
1297
+ toLogEntry(ctx) {
1298
+ return {
1299
+ ...super.toLogEntry(ctx),
1300
+ message: { mode: (0, import_safe3.getEnumMemberName)(import_Types.KeypadMode, this.keypadMode) }
1301
+ };
1302
+ }
1303
+ };
1304
+ UserCodeCCKeypadModeSet = UserCodeCCKeypadModeSet_1 = __decorate([
1305
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.KeypadModeSet),
1306
+ (0, import_CommandClassDecorators.useSupervision)()
1307
+ ], UserCodeCCKeypadModeSet);
1308
+ let UserCodeCCKeypadModeReport = UserCodeCCKeypadModeReport_1 = class UserCodeCCKeypadModeReport2 extends UserCodeCC {
1309
+ constructor(options) {
1310
+ super(options);
1311
+ this.keypadMode = options.keypadMode;
1312
+ }
1313
+ static from(raw, ctx) {
1314
+ (0, import_safe.validatePayload)(raw.payload.length >= 1);
1315
+ const keypadMode = raw.payload[0];
1316
+ return new UserCodeCCKeypadModeReport_1({
1317
+ nodeId: ctx.sourceNodeId,
1318
+ keypadMode
1319
+ });
1320
+ }
1321
+ persistValues(ctx) {
1322
+ if (!super.persistValues(ctx))
1323
+ return false;
1324
+ const supportedKeypadModes = this.getValue(ctx, UserCodeCCValues.supportedKeypadModes) ?? [this.keypadMode];
1325
+ const keypadModeValue = UserCodeCCValues.keypadMode;
1326
+ this.setMetadata(ctx, keypadModeValue, {
1327
+ ...keypadModeValue.meta,
1328
+ states: (0, import_safe.enumValuesToMetadataStates)(import_Types.KeypadMode, supportedKeypadModes)
1329
+ });
1330
+ return true;
1331
+ }
1332
+ keypadMode;
1333
+ serialize(ctx) {
1334
+ this.payload = import_safe2.Bytes.from([this.keypadMode]);
1335
+ return super.serialize(ctx);
1336
+ }
1337
+ toLogEntry(ctx) {
1338
+ return {
1339
+ ...super.toLogEntry(ctx),
1340
+ message: {
1341
+ keypadMode: (0, import_safe3.getEnumMemberName)(import_Types.KeypadMode, this.keypadMode)
1342
+ }
1343
+ };
1344
+ }
1345
+ };
1346
+ __decorate([
1347
+ (0, import_CommandClassDecorators.ccValue)(UserCodeCCValues.keypadMode)
1348
+ ], UserCodeCCKeypadModeReport.prototype, "keypadMode", void 0);
1349
+ UserCodeCCKeypadModeReport = UserCodeCCKeypadModeReport_1 = __decorate([
1350
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.KeypadModeReport)
1351
+ ], UserCodeCCKeypadModeReport);
1352
+ let UserCodeCCKeypadModeGet = class UserCodeCCKeypadModeGet2 extends UserCodeCC {
1353
+ };
1354
+ UserCodeCCKeypadModeGet = __decorate([
1355
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.KeypadModeGet),
1356
+ (0, import_CommandClassDecorators.expectedCCResponse)(UserCodeCCKeypadModeReport)
1357
+ ], UserCodeCCKeypadModeGet);
1358
+ let UserCodeCCAdminCodeSet = UserCodeCCAdminCodeSet_1 = class UserCodeCCAdminCodeSet2 extends UserCodeCC {
1359
+ constructor(options) {
1360
+ super(options);
1361
+ this.adminCode = options.adminCode;
1362
+ }
1363
+ static from(raw, ctx) {
1364
+ (0, import_safe.validatePayload)(raw.payload.length >= 1);
1365
+ const codeLength = raw.payload[0] & 15;
1366
+ (0, import_safe.validatePayload)(raw.payload.length >= 1 + codeLength);
1367
+ const adminCode = raw.payload.subarray(1, 1 + codeLength).toString("ascii");
1368
+ return new UserCodeCCAdminCodeSet_1({
1369
+ nodeId: ctx.sourceNodeId,
1370
+ adminCode
1371
+ });
1372
+ }
1373
+ adminCode;
1374
+ serialize(ctx) {
1375
+ this.payload = import_safe2.Bytes.concat([
1376
+ import_safe2.Bytes.from([this.adminCode.length & 15]),
1377
+ import_safe2.Bytes.from(this.adminCode, "ascii")
1378
+ ]);
1379
+ return super.serialize(ctx);
1380
+ }
1381
+ toLogEntry(ctx) {
1382
+ return {
1383
+ ...super.toLogEntry(ctx),
1384
+ message: { "admin code": userCodeToLogString(this.adminCode) }
1385
+ };
1386
+ }
1387
+ };
1388
+ UserCodeCCAdminCodeSet = UserCodeCCAdminCodeSet_1 = __decorate([
1389
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.AdminCodeSet),
1390
+ (0, import_CommandClassDecorators.useSupervision)()
1391
+ ], UserCodeCCAdminCodeSet);
1392
+ let UserCodeCCAdminCodeReport = UserCodeCCAdminCodeReport_1 = class UserCodeCCAdminCodeReport2 extends UserCodeCC {
1393
+ constructor(options) {
1394
+ super(options);
1395
+ this.adminCode = options.adminCode;
1396
+ }
1397
+ static from(raw, ctx) {
1398
+ (0, import_safe.validatePayload)(raw.payload.length >= 1);
1399
+ const codeLength = raw.payload[0] & 15;
1400
+ (0, import_safe.validatePayload)(raw.payload.length >= 1 + codeLength);
1401
+ const adminCode = raw.payload.subarray(1, 1 + codeLength).toString("ascii");
1402
+ return new UserCodeCCAdminCodeReport_1({
1403
+ nodeId: ctx.sourceNodeId,
1404
+ adminCode
1405
+ });
1406
+ }
1407
+ adminCode;
1408
+ serialize(ctx) {
1409
+ this.payload = import_safe2.Bytes.concat([
1410
+ import_safe2.Bytes.from([this.adminCode.length & 15]),
1411
+ import_safe2.Bytes.from(this.adminCode, "ascii")
1412
+ ]);
1413
+ return super.serialize(ctx);
1414
+ }
1415
+ toLogEntry(ctx) {
1416
+ return {
1417
+ ...super.toLogEntry(ctx),
1418
+ message: { "admin code": userCodeToLogString(this.adminCode) }
1419
+ };
1420
+ }
1421
+ };
1422
+ __decorate([
1423
+ (0, import_CommandClassDecorators.ccValue)(UserCodeCCValues.adminCode)
1424
+ ], UserCodeCCAdminCodeReport.prototype, "adminCode", void 0);
1425
+ UserCodeCCAdminCodeReport = UserCodeCCAdminCodeReport_1 = __decorate([
1426
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.AdminCodeReport)
1427
+ ], UserCodeCCAdminCodeReport);
1428
+ let UserCodeCCAdminCodeGet = class UserCodeCCAdminCodeGet2 extends UserCodeCC {
1429
+ };
1430
+ UserCodeCCAdminCodeGet = __decorate([
1431
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.AdminCodeGet),
1432
+ (0, import_CommandClassDecorators.expectedCCResponse)(UserCodeCCAdminCodeReport)
1433
+ ], UserCodeCCAdminCodeGet);
1434
+ let UserCodeCCUserCodeChecksumReport = UserCodeCCUserCodeChecksumReport_1 = class UserCodeCCUserCodeChecksumReport2 extends UserCodeCC {
1435
+ constructor(options) {
1436
+ super(options);
1437
+ this.userCodeChecksum = options.userCodeChecksum;
1438
+ }
1439
+ static from(raw, ctx) {
1440
+ (0, import_safe.validatePayload)(raw.payload.length >= 2);
1441
+ const userCodeChecksum = raw.payload.readUInt16BE(0);
1442
+ return new UserCodeCCUserCodeChecksumReport_1({
1443
+ nodeId: ctx.sourceNodeId,
1444
+ userCodeChecksum
1445
+ });
1446
+ }
1447
+ userCodeChecksum;
1448
+ serialize(ctx) {
1449
+ this.payload = new import_safe2.Bytes(2);
1450
+ this.payload.writeUInt16BE(this.userCodeChecksum, 0);
1451
+ return super.serialize(ctx);
1452
+ }
1453
+ toLogEntry(ctx) {
1454
+ return {
1455
+ ...super.toLogEntry(ctx),
1456
+ message: { "user code checksum": (0, import_safe3.num2hex)(this.userCodeChecksum) }
1457
+ };
1458
+ }
1459
+ };
1460
+ __decorate([
1461
+ (0, import_CommandClassDecorators.ccValue)(UserCodeCCValues.userCodeChecksum)
1462
+ ], UserCodeCCUserCodeChecksumReport.prototype, "userCodeChecksum", void 0);
1463
+ UserCodeCCUserCodeChecksumReport = UserCodeCCUserCodeChecksumReport_1 = __decorate([
1464
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.UserCodeChecksumReport)
1465
+ ], UserCodeCCUserCodeChecksumReport);
1466
+ let UserCodeCCUserCodeChecksumGet = class UserCodeCCUserCodeChecksumGet2 extends UserCodeCC {
1467
+ };
1468
+ UserCodeCCUserCodeChecksumGet = __decorate([
1469
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.UserCodeChecksumGet),
1470
+ (0, import_CommandClassDecorators.expectedCCResponse)(UserCodeCCUserCodeChecksumReport)
1471
+ ], UserCodeCCUserCodeChecksumGet);
1472
+ let UserCodeCCExtendedUserCodeSet = class UserCodeCCExtendedUserCodeSet2 extends UserCodeCC {
1473
+ constructor(options) {
1474
+ super(options);
1475
+ this.userCodes = options.userCodes;
1476
+ }
1477
+ static from(_raw, _ctx) {
1478
+ throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
1479
+ }
1480
+ userCodes;
1481
+ serialize(ctx) {
1482
+ const userCodeBuffers = this.userCodes.map((code) => {
1483
+ const ret = import_safe2.Bytes.concat([
1484
+ import_safe2.Bytes.from([
1485
+ 0,
1486
+ 0,
1487
+ code.userIdStatus,
1488
+ code.userCode?.length ?? 0
1489
+ ]),
1490
+ (0, import_safe2.isUint8Array)(code.userCode) ? code.userCode : import_safe2.Bytes.from(code.userCode ?? "", "ascii")
1491
+ ]);
1492
+ ret.writeUInt16BE(code.userId, 0);
1493
+ return ret;
1494
+ });
1495
+ this.payload = import_safe2.Bytes.concat([
1496
+ import_safe2.Bytes.from([this.userCodes.length]),
1497
+ ...userCodeBuffers
1498
+ ]);
1499
+ return super.serialize(ctx);
1500
+ }
1501
+ toLogEntry(ctx) {
1502
+ const message = {};
1503
+ for (const { userId, userIdStatus, userCode } of this.userCodes) {
1504
+ message[`code #${userId}`] = `${userCodeToLogString(userCode ?? "")} (status: ${(0, import_safe3.getEnumMemberName)(import_Types.UserIDStatus, userIdStatus)})`;
1505
+ }
1506
+ return {
1507
+ ...super.toLogEntry(ctx),
1508
+ message
1509
+ };
1510
+ }
1511
+ };
1512
+ UserCodeCCExtendedUserCodeSet = __decorate([
1513
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.ExtendedUserCodeSet),
1514
+ (0, import_CommandClassDecorators.useSupervision)()
1515
+ ], UserCodeCCExtendedUserCodeSet);
1516
+ let UserCodeCCExtendedUserCodeReport = UserCodeCCExtendedUserCodeReport_1 = class UserCodeCCExtendedUserCodeReport2 extends UserCodeCC {
1517
+ constructor(options) {
1518
+ super(options);
1519
+ this.userCodes = options.userCodes;
1520
+ this.nextUserId = options.nextUserId;
1521
+ }
1522
+ static from(raw, ctx) {
1523
+ (0, import_safe.validatePayload)(raw.payload.length >= 1);
1524
+ const numCodes = raw.payload[0];
1525
+ let offset = 1;
1526
+ const userCodes = [];
1527
+ for (let i = 0; i < numCodes; i++) {
1528
+ const { code, bytesRead } = parseExtendedUserCode(raw.payload.subarray(offset));
1529
+ userCodes.push(code);
1530
+ offset += bytesRead;
1531
+ }
1532
+ (0, import_safe.validatePayload)(raw.payload.length >= offset + 2);
1533
+ const nextUserId = raw.payload.readUInt16BE(offset);
1534
+ return new UserCodeCCExtendedUserCodeReport_1({
1535
+ nodeId: ctx.sourceNodeId,
1536
+ userCodes,
1537
+ nextUserId
1538
+ });
1539
+ }
1540
+ persistValues(ctx) {
1541
+ if (!super.persistValues(ctx))
1542
+ return false;
1543
+ for (const { userId, userIdStatus, userCode } of this.userCodes) {
1544
+ persistUserCode.call(this, ctx, userId, userIdStatus, userCode);
1545
+ }
1546
+ return true;
1547
+ }
1548
+ userCodes;
1549
+ nextUserId;
1550
+ toLogEntry(ctx) {
1551
+ const message = {};
1552
+ for (const { userId, userIdStatus, userCode } of this.userCodes) {
1553
+ message[`code #${userId}`] = `${userCodeToLogString(userCode)} (status: ${(0, import_safe3.getEnumMemberName)(import_Types.UserIDStatus, userIdStatus)})`;
1554
+ }
1555
+ message["next user id"] = this.nextUserId;
1556
+ return {
1557
+ ...super.toLogEntry(ctx),
1558
+ message
1559
+ };
1560
+ }
1561
+ };
1562
+ UserCodeCCExtendedUserCodeReport = UserCodeCCExtendedUserCodeReport_1 = __decorate([
1563
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.ExtendedUserCodeReport)
1564
+ ], UserCodeCCExtendedUserCodeReport);
1565
+ let UserCodeCCExtendedUserCodeGet = class UserCodeCCExtendedUserCodeGet2 extends UserCodeCC {
1566
+ constructor(options) {
1567
+ super(options);
1568
+ this.userId = options.userId;
1569
+ this.reportMore = !!options.reportMore;
1570
+ }
1571
+ static from(_raw, _ctx) {
1572
+ throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
1573
+ }
1574
+ userId;
1575
+ reportMore;
1576
+ serialize(ctx) {
1577
+ this.payload = import_safe2.Bytes.from([0, 0, this.reportMore ? 1 : 0]);
1578
+ this.payload.writeUInt16BE(this.userId, 0);
1579
+ return super.serialize(ctx);
1580
+ }
1581
+ toLogEntry(ctx) {
1582
+ return {
1583
+ ...super.toLogEntry(ctx),
1584
+ message: {
1585
+ "user id": this.userId,
1586
+ "report more": this.reportMore
1587
+ }
1588
+ };
1589
+ }
1590
+ };
1591
+ UserCodeCCExtendedUserCodeGet = __decorate([
1592
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.ExtendedUserCodeGet),
1593
+ (0, import_CommandClassDecorators.expectedCCResponse)(UserCodeCCExtendedUserCodeReport)
1594
+ ], UserCodeCCExtendedUserCodeGet);
1595
+ // Annotate the CommonJS export names for ESM import in node:
1596
+ 0 && (module.exports = {
1597
+ UserCodeCC,
1598
+ UserCodeCCAPI,
1599
+ UserCodeCCAdminCodeGet,
1600
+ UserCodeCCAdminCodeReport,
1601
+ UserCodeCCAdminCodeSet,
1602
+ UserCodeCCCapabilitiesGet,
1603
+ UserCodeCCCapabilitiesReport,
1604
+ UserCodeCCExtendedUserCodeGet,
1605
+ UserCodeCCExtendedUserCodeReport,
1606
+ UserCodeCCExtendedUserCodeSet,
1607
+ UserCodeCCGet,
1608
+ UserCodeCCKeypadModeGet,
1609
+ UserCodeCCKeypadModeReport,
1610
+ UserCodeCCKeypadModeSet,
1611
+ UserCodeCCReport,
1612
+ UserCodeCCSet,
1613
+ UserCodeCCUserCodeChecksumGet,
1614
+ UserCodeCCUserCodeChecksumReport,
1615
+ UserCodeCCUsersNumberGet,
1616
+ UserCodeCCUsersNumberReport,
1617
+ UserCodeCCValues,
1618
+ userCodeToLogString
1619
+ });
1620
+ //# sourceMappingURL=UserCodeCC.js.map