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