@zwave-js/cc 15.28.0 → 15.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/cc/AlarmSensorCC.js.map +2 -2
- package/build/cjs/cc/AssociationCC.js +6 -5
- package/build/cjs/cc/AssociationCC.js.map +2 -2
- package/build/cjs/cc/AssociationGroupInfoCC.js +4 -5
- package/build/cjs/cc/AssociationGroupInfoCC.js.map +2 -2
- package/build/cjs/cc/BarrierOperatorCC.js.map +2 -2
- package/build/cjs/cc/BasicCC.d.ts +4 -1
- package/build/cjs/cc/BasicCC.js +18 -0
- package/build/cjs/cc/BasicCC.js.map +3 -3
- package/build/cjs/cc/BasicWindowCoveringCC.js.map +2 -2
- package/build/cjs/cc/BatteryCC.js +16 -3
- package/build/cjs/cc/BatteryCC.js.map +2 -2
- package/build/cjs/cc/BinarySensorCC.js.map +2 -2
- package/build/cjs/cc/BinarySwitchCC.d.ts +4 -1
- package/build/cjs/cc/BinarySwitchCC.js +18 -0
- package/build/cjs/cc/BinarySwitchCC.js.map +3 -3
- package/build/cjs/cc/CRC16CC.d.ts +3 -2
- package/build/cjs/cc/CRC16CC.js +7 -1
- package/build/cjs/cc/CRC16CC.js.map +3 -3
- package/build/cjs/cc/CentralSceneCC.js.map +2 -2
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +2 -2
- package/build/cjs/cc/ClockCC.js.map +2 -2
- package/build/cjs/cc/ColorSwitchCC.js +1 -4
- package/build/cjs/cc/ColorSwitchCC.js.map +2 -2
- package/build/cjs/cc/ConfigurationCC.js +1 -4
- package/build/cjs/cc/ConfigurationCC.js.map +2 -2
- package/build/cjs/cc/DeviceResetLocallyCC.js.map +2 -2
- package/build/cjs/cc/DoorLockCC.js.map +2 -2
- package/build/cjs/cc/EntryControlCC.js.map +2 -2
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +4 -16
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlSetpointCC.js +10 -4
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +2 -2
- package/build/cjs/cc/IndicatorCC.js +1 -5
- package/build/cjs/cc/IndicatorCC.js.map +2 -2
- package/build/cjs/cc/IrrigationCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerSpecificCC.js +4 -5
- package/build/cjs/cc/ManufacturerSpecificCC.js.map +2 -2
- package/build/cjs/cc/MeterCC.js +8 -21
- package/build/cjs/cc/MeterCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelAssociationCC.js +11 -7
- package/build/cjs/cc/MultiChannelAssociationCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelCC.d.ts +3 -1
- package/build/cjs/cc/MultiChannelCC.js +21 -10
- package/build/cjs/cc/MultiChannelCC.js.map +3 -3
- package/build/cjs/cc/MultilevelSensorCC.js.map +2 -2
- package/build/cjs/cc/MultilevelSwitchCC.d.ts +5 -1
- package/build/cjs/cc/MultilevelSwitchCC.js +30 -0
- package/build/cjs/cc/MultilevelSwitchCC.js.map +3 -3
- package/build/cjs/cc/NotificationCC.js +29 -11
- package/build/cjs/cc/NotificationCC.js.map +2 -2
- package/build/cjs/cc/PowerlevelCC.js.map +1 -1
- package/build/cjs/cc/ProtectionCC.js.map +2 -2
- package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +2 -2
- package/build/cjs/cc/SceneControllerConfigurationCC.js.map +2 -2
- package/build/cjs/cc/ScheduleEntryLockCC.js.map +2 -2
- package/build/cjs/cc/Security2CC.d.ts +2 -1
- package/build/cjs/cc/Security2CC.js +31 -3
- package/build/cjs/cc/Security2CC.js.map +2 -2
- package/build/cjs/cc/SecurityCC.d.ts +2 -1
- package/build/cjs/cc/SecurityCC.js +7 -6
- package/build/cjs/cc/SecurityCC.js.map +2 -2
- package/build/cjs/cc/SoundSwitchCC.js +6 -6
- package/build/cjs/cc/SoundSwitchCC.js.map +2 -2
- package/build/cjs/cc/SupervisionCC.d.ts +2 -1
- package/build/cjs/cc/SupervisionCC.js +6 -0
- package/build/cjs/cc/SupervisionCC.js.map +3 -3
- package/build/cjs/cc/ThermostatFanModeCC.js.map +2 -2
- package/build/cjs/cc/ThermostatModeCC.js +1 -3
- package/build/cjs/cc/ThermostatModeCC.js.map +2 -2
- package/build/cjs/cc/ThermostatOperatingStateCC.js.map +2 -2
- package/build/cjs/cc/ThermostatSetpointCC.d.ts +4 -1
- package/build/cjs/cc/ThermostatSetpointCC.js +18 -0
- package/build/cjs/cc/ThermostatSetpointCC.js.map +3 -3
- package/build/cjs/cc/TimeCC.js.map +2 -2
- package/build/cjs/cc/TransportServiceCC.js.map +2 -2
- package/build/cjs/cc/UserCodeCC.js +1 -6
- package/build/cjs/cc/UserCodeCC.js.map +2 -2
- package/build/cjs/cc/UserCredentialCC.js +4 -6
- package/build/cjs/cc/UserCredentialCC.js.map +2 -2
- package/build/cjs/cc/VersionCC.js.map +2 -2
- package/build/cjs/cc/WindowCoveringCC.js +5 -1
- package/build/cjs/cc/WindowCoveringCC.js.map +2 -2
- package/build/cjs/cc/ZWaveProtocolCC.js +3 -11
- package/build/cjs/cc/ZWaveProtocolCC.js.map +2 -2
- package/build/cjs/cc/_CCValues.generated.d.ts +2 -2
- package/build/cjs/cc/_CCValues.generated.js.map +2 -2
- package/build/cjs/cc/index.d.ts +179 -179
- package/build/cjs/cc/index.js.map +1 -1
- package/build/cjs/cc/manufacturerProprietary/Decorators.js.map +2 -2
- package/build/cjs/lib/API.d.ts +3 -2
- package/build/cjs/lib/API.js.map +2 -2
- package/build/cjs/lib/CommandClass.d.ts +20 -0
- package/build/cjs/lib/CommandClass.js +52 -11
- package/build/cjs/lib/CommandClass.js.map +3 -3
- package/build/cjs/lib/CommandClassDecorators.js.map +2 -2
- package/build/cjs/lib/EncapsulatingCommandClass.js.map +2 -2
- package/build/cjs/lib/NotificationEventPayload.js.map +2 -2
- package/build/cjs/lib/Security2/Extension.js +1 -4
- package/build/cjs/lib/Security2/Extension.js.map +2 -2
- package/build/cjs/lib/Security2/shared.js.map +2 -2
- package/build/cjs/lib/SetValueResult.js.map +1 -1
- package/build/cjs/lib/Values.d.ts +1 -1
- package/build/cjs/lib/Values.js.map +2 -2
- package/build/cjs/lib/_CCAPI.generated.js.map +1 -1
- package/build/cjs/lib/_Types.d.ts +30 -30
- package/build/cjs/lib/_Types.js.map +2 -2
- package/build/cjs/lib/serializers.js +1 -4
- package/build/cjs/lib/serializers.js.map +2 -2
- package/build/cjs/lib/utils.js.map +2 -2
- package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/esm/cc/AlarmSensorCC.js +1 -2
- package/build/esm/cc/AlarmSensorCC.js.map +1 -1
- package/build/esm/cc/AssociationCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationCC.js +8 -7
- package/build/esm/cc/AssociationCC.js.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.js +10 -12
- package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.js +10 -9
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
- package/build/esm/cc/BasicCC.d.ts +4 -1
- package/build/esm/cc/BasicCC.d.ts.map +1 -1
- package/build/esm/cc/BasicCC.js +30 -7
- package/build/esm/cc/BasicCC.js.map +1 -1
- package/build/esm/cc/BasicWindowCoveringCC.d.ts.map +1 -1
- package/build/esm/cc/BasicWindowCoveringCC.js +2 -5
- package/build/esm/cc/BasicWindowCoveringCC.js.map +1 -1
- package/build/esm/cc/BatteryCC.d.ts.map +1 -1
- package/build/esm/cc/BatteryCC.js +12 -12
- package/build/esm/cc/BatteryCC.js.map +1 -1
- package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySensorCC.js +4 -5
- package/build/esm/cc/BinarySensorCC.js.map +1 -1
- package/build/esm/cc/BinarySwitchCC.d.ts +4 -1
- package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySwitchCC.js +31 -6
- package/build/esm/cc/BinarySwitchCC.js.map +1 -1
- package/build/esm/cc/CRC16CC.d.ts +3 -2
- package/build/esm/cc/CRC16CC.d.ts.map +1 -1
- package/build/esm/cc/CRC16CC.js +10 -4
- package/build/esm/cc/CRC16CC.js.map +1 -1
- package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
- package/build/esm/cc/CentralSceneCC.js +2 -1
- package/build/esm/cc/CentralSceneCC.js.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.js +6 -2
- package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/esm/cc/ClockCC.d.ts.map +1 -1
- package/build/esm/cc/ClockCC.js +6 -2
- package/build/esm/cc/ClockCC.js.map +1 -1
- package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/ColorSwitchCC.js +17 -20
- package/build/esm/cc/ColorSwitchCC.js.map +1 -1
- package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/ConfigurationCC.js +20 -29
- package/build/esm/cc/ConfigurationCC.js.map +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.d.ts.map +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.js +1 -2
- package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
- package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockCC.js +25 -29
- package/build/esm/cc/DoorLockCC.js.map +1 -1
- package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
- package/build/esm/cc/EntryControlCC.js +10 -7
- package/build/esm/cc/EntryControlCC.js.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js +15 -27
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.js +8 -9
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/esm/cc/IndicatorCC.d.ts.map +1 -1
- package/build/esm/cc/IndicatorCC.js +19 -38
- package/build/esm/cc/IndicatorCC.js.map +1 -1
- package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
- package/build/esm/cc/IrrigationCC.js +8 -6
- package/build/esm/cc/IrrigationCC.js.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.js +1 -2
- package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.js +5 -8
- package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/esm/cc/MeterCC.d.ts.map +1 -1
- package/build/esm/cc/MeterCC.js +15 -29
- package/build/esm/cc/MeterCC.js.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.js +15 -20
- package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/esm/cc/MultiChannelCC.d.ts +3 -1
- package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelCC.js +28 -22
- package/build/esm/cc/MultiChannelCC.js.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.js +11 -11
- package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.d.ts +5 -1
- package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.js +56 -16
- package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/esm/cc/NotificationCC.d.ts.map +1 -1
- package/build/esm/cc/NotificationCC.js +66 -55
- package/build/esm/cc/NotificationCC.js.map +1 -1
- package/build/esm/cc/PowerlevelCC.d.ts.map +1 -1
- package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
- package/build/esm/cc/ProtectionCC.js +10 -9
- package/build/esm/cc/ProtectionCC.js.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.js +5 -8
- package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.js +10 -16
- package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.js +13 -20
- package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/esm/cc/Security2CC.d.ts +2 -1
- package/build/esm/cc/Security2CC.d.ts.map +1 -1
- package/build/esm/cc/Security2CC.js +68 -32
- package/build/esm/cc/Security2CC.js.map +1 -1
- package/build/esm/cc/SecurityCC.d.ts +2 -1
- package/build/esm/cc/SecurityCC.d.ts.map +1 -1
- package/build/esm/cc/SecurityCC.js +16 -11
- package/build/esm/cc/SecurityCC.js.map +1 -1
- package/build/esm/cc/SoundSwitchCC.js +2 -2
- package/build/esm/cc/SoundSwitchCC.js.map +1 -1
- package/build/esm/cc/SupervisionCC.d.ts +2 -1
- package/build/esm/cc/SupervisionCC.d.ts.map +1 -1
- package/build/esm/cc/SupervisionCC.js +13 -6
- package/build/esm/cc/SupervisionCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.js +1 -2
- package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatModeCC.js +1 -3
- package/build/esm/cc/ThermostatModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.js +1 -2
- package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.d.ts +4 -1
- package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.js +31 -19
- package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/esm/cc/TimeCC.d.ts.map +1 -1
- package/build/esm/cc/TimeCC.js +6 -2
- package/build/esm/cc/TimeCC.js.map +1 -1
- package/build/esm/cc/TransportServiceCC.d.ts.map +1 -1
- package/build/esm/cc/TransportServiceCC.js +8 -8
- package/build/esm/cc/TransportServiceCC.js.map +1 -1
- package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
- package/build/esm/cc/UserCodeCC.js +20 -30
- package/build/esm/cc/UserCodeCC.js.map +1 -1
- package/build/esm/cc/UserCredentialCC.d.ts.map +1 -1
- package/build/esm/cc/UserCredentialCC.js +42 -59
- package/build/esm/cc/UserCredentialCC.js.map +1 -1
- package/build/esm/cc/VersionCC.js +3 -3
- package/build/esm/cc/VersionCC.js.map +1 -1
- package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/esm/cc/WindowCoveringCC.js +10 -9
- package/build/esm/cc/WindowCoveringCC.js.map +1 -1
- package/build/esm/cc/ZWaveProtocolCC.d.ts.map +1 -1
- package/build/esm/cc/ZWaveProtocolCC.js +5 -26
- package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
- package/build/esm/cc/_CCValues.generated.d.ts +2 -2
- package/build/esm/cc/_CCValues.generated.d.ts.map +1 -1
- package/build/esm/cc/_CCValues.generated.js +637 -678
- package/build/esm/cc/_CCValues.generated.js.map +1 -1
- package/build/esm/cc/index.d.ts +179 -179
- package/build/esm/cc/index.d.ts.map +1 -1
- package/build/esm/cc/index.js +124 -124
- package/build/esm/cc/index.js.map +1 -1
- package/build/esm/cc/manufacturerProprietary/Decorators.d.ts.map +1 -1
- package/build/esm/cc/manufacturerProprietary/Decorators.js.map +1 -1
- package/build/esm/lib/API.d.ts +3 -2
- package/build/esm/lib/API.d.ts.map +1 -1
- package/build/esm/lib/API.js +1 -1
- package/build/esm/lib/API.js.map +1 -1
- package/build/esm/lib/CommandClass.d.ts +20 -0
- package/build/esm/lib/CommandClass.d.ts.map +1 -1
- package/build/esm/lib/CommandClass.js +50 -16
- package/build/esm/lib/CommandClass.js.map +1 -1
- package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -1
- package/build/esm/lib/CommandClassDecorators.js +1 -2
- package/build/esm/lib/CommandClassDecorators.js.map +1 -1
- package/build/esm/lib/EncapsulatingCommandClass.d.ts.map +1 -1
- package/build/esm/lib/EncapsulatingCommandClass.js.map +1 -1
- package/build/esm/lib/NotificationEventPayload.d.ts.map +1 -1
- package/build/esm/lib/NotificationEventPayload.js.map +1 -1
- package/build/esm/lib/Security2/Extension.d.ts.map +1 -1
- package/build/esm/lib/Security2/Extension.js +2 -6
- package/build/esm/lib/Security2/Extension.js.map +1 -1
- package/build/esm/lib/Security2/shared.d.ts.map +1 -1
- package/build/esm/lib/Security2/shared.js.map +1 -1
- package/build/esm/lib/SetValueResult.d.ts.map +1 -1
- package/build/esm/lib/Values.d.ts +1 -1
- package/build/esm/lib/Values.d.ts.map +1 -1
- package/build/esm/lib/Values.js.map +1 -1
- package/build/esm/lib/_CCAPI.generated.d.ts.map +1 -1
- package/build/esm/lib/_Types.d.ts +30 -30
- package/build/esm/lib/_Types.d.ts.map +1 -1
- package/build/esm/lib/_Types.js.map +1 -1
- package/build/esm/lib/serializers.d.ts.map +1 -1
- package/build/esm/lib/serializers.js +1 -4
- package/build/esm/lib/serializers.js.map +1 -1
- package/build/esm/lib/traits.d.ts.map +1 -1
- package/build/esm/lib/utils.d.ts.map +1 -1
- package/build/esm/lib/utils.js +25 -31
- package/build/esm/lib/utils.js.map +1 -1
- package/package.json +7 -7
|
@@ -141,8 +141,7 @@ let UserCredentialCCAPI = (() => {
|
|
|
141
141
|
}
|
|
142
142
|
case UserCredentialCommand.CredentialChecksumGet:
|
|
143
143
|
case UserCredentialCommand.CredentialChecksumReport: {
|
|
144
|
-
return this.tryGetValueDB()?.getValue(UserCredentialCCValues.supportsCredentialChecksum
|
|
145
|
-
.endpoint(this.endpoint.index));
|
|
144
|
+
return this.tryGetValueDB()?.getValue(UserCredentialCCValues.supportsCredentialChecksum.endpoint(this.endpoint.index));
|
|
146
145
|
}
|
|
147
146
|
case UserCredentialCommand.AdminPinCodeSet:
|
|
148
147
|
case UserCredentialCommand.AdminPinCodeGet:
|
|
@@ -375,11 +374,7 @@ let UserCredentialCCAPI = (() => {
|
|
|
375
374
|
});
|
|
376
375
|
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
377
376
|
if (response) {
|
|
378
|
-
return pick(response, [
|
|
379
|
-
"occupied",
|
|
380
|
-
"entryType",
|
|
381
|
-
"entrySlot",
|
|
382
|
-
]);
|
|
377
|
+
return pick(response, ["occupied", "entryType", "entrySlot"]);
|
|
383
378
|
}
|
|
384
379
|
}
|
|
385
380
|
async sendUserCapabilitiesReport(options) {
|
|
@@ -730,7 +725,8 @@ let UserCredentialCC = (() => {
|
|
|
730
725
|
break; // No credential found, stop iterating
|
|
731
726
|
nextCredType = cred.nextCredentialType ?? UserCredentialType.None;
|
|
732
727
|
nextCredSlot = cred.nextCredentialSlot ?? 0;
|
|
733
|
-
} while (nextCredType !== UserCredentialType.None
|
|
728
|
+
} while (nextCredType !== UserCredentialType.None
|
|
729
|
+
|| nextCredSlot !== 0);
|
|
734
730
|
}
|
|
735
731
|
static getSupportedUsersCached(ctx, endpoint) {
|
|
736
732
|
return ctx
|
|
@@ -984,7 +980,9 @@ let UserCredentialCCCredentialCapabilitiesReport = (() => {
|
|
|
984
980
|
persistValues(ctx) {
|
|
985
981
|
if (!super.persistValues(ctx))
|
|
986
982
|
return false;
|
|
987
|
-
this.setValue(ctx, UserCredentialCCValues.supportedCredentialTypes, [
|
|
983
|
+
this.setValue(ctx, UserCredentialCCValues.supportedCredentialTypes, [
|
|
984
|
+
...this.credentialTypes.keys(),
|
|
985
|
+
]);
|
|
988
986
|
for (const [credentialType, capability] of this.credentialTypes) {
|
|
989
987
|
this.setValue(ctx, UserCredentialCCValues.credentialCapabilities(credentialType), capability);
|
|
990
988
|
}
|
|
@@ -993,9 +991,10 @@ let UserCredentialCCCredentialCapabilitiesReport = (() => {
|
|
|
993
991
|
serialize(ctx) {
|
|
994
992
|
const n = this.credentialTypes.size;
|
|
995
993
|
this.payload = Bytes.alloc(2 + n * 9);
|
|
996
|
-
this.payload[0] =
|
|
997
|
-
|
|
998
|
-
|
|
994
|
+
this.payload[0] =
|
|
995
|
+
(this.supportsCredentialChecksum ? 0x80 : 0)
|
|
996
|
+
| (this.supportsAdminCode ? 0x40 : 0)
|
|
997
|
+
| (this.supportsAdminCodeDeactivation ? 0x20 : 0);
|
|
999
998
|
this.payload[1] = n;
|
|
1000
999
|
const credTypeOff = 2;
|
|
1001
1000
|
const clSupportOff = credTypeOff + n;
|
|
@@ -1029,7 +1028,8 @@ let UserCredentialCCCredentialCapabilitiesReport = (() => {
|
|
|
1029
1028
|
"admin code deactivation support": this.supportsAdminCodeDeactivation,
|
|
1030
1029
|
};
|
|
1031
1030
|
for (const [credentialType, ct] of this.credentialTypes) {
|
|
1032
|
-
message[`credential type ${getEnumMemberName(UserCredentialType, credentialType)}`] =
|
|
1031
|
+
message[`credential type ${getEnumMemberName(UserCredentialType, credentialType)}`] =
|
|
1032
|
+
`slots: ${ct.numberOfCredentialSlots}, length: ${ct.minCredentialLength}-${ct.maxCredentialLength}`;
|
|
1033
1033
|
}
|
|
1034
1034
|
return {
|
|
1035
1035
|
...super.toLogEntry(ctx),
|
|
@@ -1139,7 +1139,8 @@ let UserCredentialCCKeyLockerCapabilitiesReport = (() => {
|
|
|
1139
1139
|
toLogEntry(ctx) {
|
|
1140
1140
|
const message = {};
|
|
1141
1141
|
for (const [entryType, capability] of this.keyLockerCapabilities) {
|
|
1142
|
-
message[`entry type ${getEnumMemberName(UserCredentialKeyLockerEntryType, entryType)}`] =
|
|
1142
|
+
message[`entry type ${getEnumMemberName(UserCredentialKeyLockerEntryType, entryType)}`] =
|
|
1143
|
+
`slots: ${capability.numberOfEntrySlots}, length: ${capability.minEntryDataLength}-${capability.maxEntryDataLength}`;
|
|
1143
1144
|
}
|
|
1144
1145
|
return {
|
|
1145
1146
|
...super.toLogEntry(ctx),
|
|
@@ -1216,8 +1217,7 @@ let UserCredentialCCUserSet = (() => {
|
|
|
1216
1217
|
userName;
|
|
1217
1218
|
static from(raw, ctx) {
|
|
1218
1219
|
validatePayload(raw.payload.length >= 3);
|
|
1219
|
-
const operationType = raw.payload[0]
|
|
1220
|
-
& 0b11;
|
|
1220
|
+
const operationType = raw.payload[0] & 0b11;
|
|
1221
1221
|
const userId = raw.payload.readUInt16BE(1);
|
|
1222
1222
|
if (operationType === UserCredentialOperationType.Delete) {
|
|
1223
1223
|
return new this({
|
|
@@ -1302,8 +1302,7 @@ let UserCredentialCCUserSet = (() => {
|
|
|
1302
1302
|
expiringTimeoutMinutes = 0;
|
|
1303
1303
|
}
|
|
1304
1304
|
// Name encoding defaults to ASCII
|
|
1305
|
-
const nameEncoding = this.nameEncoding
|
|
1306
|
-
?? UserCredentialNameEncoding.ASCII;
|
|
1305
|
+
const nameEncoding = this.nameEncoding ?? UserCredentialNameEncoding.ASCII;
|
|
1307
1306
|
// User name defaults to empty string
|
|
1308
1307
|
const userName = this.userName ?? "";
|
|
1309
1308
|
let nameBuffer;
|
|
@@ -1399,8 +1398,7 @@ let UserCredentialCCUserReport = (() => {
|
|
|
1399
1398
|
const credentialRule = raw.payload[10];
|
|
1400
1399
|
const expiringTimeoutMinutes = raw.payload.readUInt16BE(11);
|
|
1401
1400
|
validatePayload(raw.payload.length >= 15);
|
|
1402
|
-
const nameEncoding = raw.payload[13]
|
|
1403
|
-
& 0b111;
|
|
1401
|
+
const nameEncoding = raw.payload[13] & 0b111;
|
|
1404
1402
|
const nameLength = raw.payload[14];
|
|
1405
1403
|
validatePayload(raw.payload.length >= 15 + nameLength);
|
|
1406
1404
|
let userName;
|
|
@@ -1483,8 +1481,7 @@ let UserCredentialCCUserReport = (() => {
|
|
|
1483
1481
|
|| UserCredentialCCValues.credential.is(vid)
|
|
1484
1482
|
|| UserCredentialCCValues.credentialOwner.is(vid)
|
|
1485
1483
|
|| UserCredentialCCValues.credentialModifierType.is(vid)
|
|
1486
|
-
|| UserCredentialCCValues
|
|
1487
|
-
.credentialModifierNodeId.is(vid)));
|
|
1484
|
+
|| UserCredentialCCValues.credentialModifierNodeId.is(vid)));
|
|
1488
1485
|
for (const value of cachedUsersAndCredentials) {
|
|
1489
1486
|
valueDB.removeValue(value);
|
|
1490
1487
|
}
|
|
@@ -1494,8 +1491,7 @@ let UserCredentialCCUserReport = (() => {
|
|
|
1494
1491
|
}
|
|
1495
1492
|
// A UserModifyRejectedLocationEmpty report means we have a stale cache
|
|
1496
1493
|
// entry for a user that no longer exists on the device.
|
|
1497
|
-
if (this.reportType
|
|
1498
|
-
=== UserCredentialUserReportType.UserDeleted
|
|
1494
|
+
if (this.reportType === UserCredentialUserReportType.UserDeleted
|
|
1499
1495
|
|| this.reportType
|
|
1500
1496
|
=== UserCredentialUserReportType.UserModifyRejectedLocationEmpty) {
|
|
1501
1497
|
// Remove all values for this user
|
|
@@ -1532,12 +1528,9 @@ let UserCredentialCCUserReport = (() => {
|
|
|
1532
1528
|
}
|
|
1533
1529
|
// A UserAddRejectedLocationOccupied report contains the data for the
|
|
1534
1530
|
// existing user, so we can update our cache with the actual state.
|
|
1535
|
-
if (this.reportType
|
|
1536
|
-
!== UserCredentialUserReportType.
|
|
1537
|
-
&& this.reportType
|
|
1538
|
-
!== UserCredentialUserReportType.UserAdded
|
|
1539
|
-
&& this.reportType
|
|
1540
|
-
!== UserCredentialUserReportType.UserModified
|
|
1531
|
+
if (this.reportType !== UserCredentialUserReportType.ResponseToGet
|
|
1532
|
+
&& this.reportType !== UserCredentialUserReportType.UserAdded
|
|
1533
|
+
&& this.reportType !== UserCredentialUserReportType.UserModified
|
|
1541
1534
|
&& this.reportType
|
|
1542
1535
|
!== UserCredentialUserReportType.UserAddRejectedLocationOccupied) {
|
|
1543
1536
|
return true;
|
|
@@ -1580,8 +1573,7 @@ let UserCredentialCCUserReport = (() => {
|
|
|
1580
1573
|
})();
|
|
1581
1574
|
export { UserCredentialCCUserReport };
|
|
1582
1575
|
function testResponseForUserCredentialUserGet(sent, received) {
|
|
1583
|
-
return
|
|
1584
|
-
=== UserCredentialUserReportType.ResponseToGet);
|
|
1576
|
+
return received.reportType === UserCredentialUserReportType.ResponseToGet;
|
|
1585
1577
|
}
|
|
1586
1578
|
let UserCredentialCCUserGet = (() => {
|
|
1587
1579
|
let _classDecorators = [CCCommand(UserCredentialCommand.UserGet), expectedCCResponse(UserCredentialCCUserReport, testResponseForUserCredentialUserGet)];
|
|
@@ -1635,8 +1627,7 @@ function testResponseForUserCredentialCredentialSet(sent, received) {
|
|
|
1635
1627
|
// as the primary correlation. DuplicateCredential and DuplicateAdminPINCode
|
|
1636
1628
|
// reports reference the EXISTING duplicate's (userId, slot) rather than
|
|
1637
1629
|
// the requested location, so we cannot correlate them on slot.
|
|
1638
|
-
if (received.reportType
|
|
1639
|
-
=== UserCredentialCredentialReportType.ResponseToGet) {
|
|
1630
|
+
if (received.reportType === UserCredentialCredentialReportType.ResponseToGet) {
|
|
1640
1631
|
return false;
|
|
1641
1632
|
}
|
|
1642
1633
|
if (received.credentialType !== sent.credentialType) {
|
|
@@ -1685,8 +1676,7 @@ let UserCredentialCCCredentialSet = (() => {
|
|
|
1685
1676
|
const userId = raw.payload.readUInt16BE(0);
|
|
1686
1677
|
const credentialType = raw.payload[2];
|
|
1687
1678
|
const credentialSlot = raw.payload.readUInt16BE(3);
|
|
1688
|
-
const operationType = raw.payload[5]
|
|
1689
|
-
& 0b11;
|
|
1679
|
+
const operationType = raw.payload[5] & 0b11;
|
|
1690
1680
|
if (operationType === UserCredentialOperationType.Delete) {
|
|
1691
1681
|
return new this({
|
|
1692
1682
|
nodeId: ctx.sourceNodeId,
|
|
@@ -1850,8 +1840,8 @@ let UserCredentialCCCredentialReport = (() => {
|
|
|
1850
1840
|
const offset = 8 + credentialData.length;
|
|
1851
1841
|
this.payload[offset] = this.modifierType;
|
|
1852
1842
|
this.payload.writeUInt16BE(this.modifierNodeId, offset + 1);
|
|
1853
|
-
this.payload[offset + 3] =
|
|
1854
|
-
?? UserCredentialType.None;
|
|
1843
|
+
this.payload[offset + 3] =
|
|
1844
|
+
this.nextCredentialType ?? UserCredentialType.None;
|
|
1855
1845
|
this.payload.writeUInt16BE(this.nextCredentialSlot ?? 0, offset + 4);
|
|
1856
1846
|
return super.serialize(ctx);
|
|
1857
1847
|
}
|
|
@@ -1865,8 +1855,7 @@ let UserCredentialCCCredentialReport = (() => {
|
|
|
1865
1855
|
if (this.reportType
|
|
1866
1856
|
=== UserCredentialCredentialReportType.CredentialDeleted
|
|
1867
1857
|
|| this.reportType
|
|
1868
|
-
=== UserCredentialCredentialReportType
|
|
1869
|
-
.CredentialModifyRejectedLocationEmpty) {
|
|
1858
|
+
=== UserCredentialCredentialReportType.CredentialModifyRejectedLocationEmpty) {
|
|
1870
1859
|
if (this.credentialType !== UserCredentialType.None
|
|
1871
1860
|
&& this.credentialSlot !== 0) {
|
|
1872
1861
|
// Single credential. The (type, slot) tuple uniquely identifies
|
|
@@ -1882,7 +1871,7 @@ let UserCredentialCCCredentialReport = (() => {
|
|
|
1882
1871
|
const valueDB = this.getValueDB(ctx);
|
|
1883
1872
|
const credentialOwners = valueDB.findValues((vid) => UserCredentialCCValues.credentialOwner.is(vid)
|
|
1884
1873
|
&& vid.endpoint === this.endpointIndex);
|
|
1885
|
-
for (const { endpoint, propertyKey, value } of credentialOwners) {
|
|
1874
|
+
for (const { endpoint, propertyKey, value, } of credentialOwners) {
|
|
1886
1875
|
// If a user ID is given, only delete credentials owned by that user
|
|
1887
1876
|
if (this.userId !== 0 && value !== this.userId)
|
|
1888
1877
|
continue;
|
|
@@ -1894,10 +1883,8 @@ let UserCredentialCCCredentialReport = (() => {
|
|
|
1894
1883
|
&& cType !== this.credentialType) {
|
|
1895
1884
|
continue;
|
|
1896
1885
|
}
|
|
1897
|
-
valueDB.removeValue(UserCredentialCCValues.credential(cType, cSlot)
|
|
1898
|
-
|
|
1899
|
-
valueDB.removeValue(UserCredentialCCValues.credentialOwner(cType, cSlot)
|
|
1900
|
-
.endpoint(endpoint));
|
|
1886
|
+
valueDB.removeValue(UserCredentialCCValues.credential(cType, cSlot).endpoint(endpoint));
|
|
1887
|
+
valueDB.removeValue(UserCredentialCCValues.credentialOwner(cType, cSlot).endpoint(endpoint));
|
|
1901
1888
|
valueDB.removeValue(UserCredentialCCValues.credentialModifierType(cType, cSlot).endpoint(endpoint));
|
|
1902
1889
|
valueDB.removeValue(UserCredentialCCValues.credentialModifierNodeId(cType, cSlot).endpoint(endpoint));
|
|
1903
1890
|
}
|
|
@@ -1915,11 +1902,9 @@ let UserCredentialCCCredentialReport = (() => {
|
|
|
1915
1902
|
// credential data in the read-back field when the device chooses to
|
|
1916
1903
|
// reveal it, so we can update our cache with the real state.
|
|
1917
1904
|
const isRejectionWithReadback = this.reportType
|
|
1918
|
-
=== UserCredentialCredentialReportType
|
|
1919
|
-
.CredentialAddRejectedLocationOccupied
|
|
1905
|
+
=== UserCredentialCredentialReportType.CredentialAddRejectedLocationOccupied
|
|
1920
1906
|
&& this.credentialReadBack;
|
|
1921
|
-
if (this.reportType
|
|
1922
|
-
!== UserCredentialCredentialReportType.ResponseToGet
|
|
1907
|
+
if (this.reportType !== UserCredentialCredentialReportType.ResponseToGet
|
|
1923
1908
|
&& this.reportType
|
|
1924
1909
|
!== UserCredentialCredentialReportType.CredentialAdded
|
|
1925
1910
|
&& this.reportType
|
|
@@ -1962,8 +1947,7 @@ let UserCredentialCCCredentialReport = (() => {
|
|
|
1962
1947
|
})();
|
|
1963
1948
|
export { UserCredentialCCCredentialReport };
|
|
1964
1949
|
function testResponseForUserCredentialCredentialGet(_sent, received) {
|
|
1965
|
-
return (received.reportType
|
|
1966
|
-
=== UserCredentialCredentialReportType.ResponseToGet);
|
|
1950
|
+
return (received.reportType === UserCredentialCredentialReportType.ResponseToGet);
|
|
1967
1951
|
}
|
|
1968
1952
|
let UserCredentialCCCredentialGet = (() => {
|
|
1969
1953
|
let _classDecorators = [CCCommand(UserCredentialCommand.CredentialGet), expectedCCResponse(UserCredentialCCCredentialReport, testResponseForUserCredentialCredentialGet)];
|
|
@@ -2055,8 +2039,7 @@ let UserCredentialCCCredentialLearnStart = (() => {
|
|
|
2055
2039
|
const userId = raw.payload.readUInt16BE(0);
|
|
2056
2040
|
const credentialType = raw.payload[2];
|
|
2057
2041
|
const credentialSlot = raw.payload.readUInt16BE(3);
|
|
2058
|
-
const operationType = raw.payload[5]
|
|
2059
|
-
& 0b11;
|
|
2042
|
+
const operationType = raw.payload[5] & 0b11;
|
|
2060
2043
|
const learnTimeout = raw.payload[6];
|
|
2061
2044
|
return new this({
|
|
2062
2045
|
nodeId: ctx.sourceNodeId,
|
|
@@ -2666,8 +2649,9 @@ let UserCredentialCCAdminPinCodeReport = (() => {
|
|
|
2666
2649
|
serialize(ctx) {
|
|
2667
2650
|
const pinBuffer = Bytes.from(this.pinCode, "ascii");
|
|
2668
2651
|
this.payload = Bytes.alloc(1 + pinBuffer.length);
|
|
2669
|
-
this.payload[0] =
|
|
2670
|
-
|
|
2652
|
+
this.payload[0] =
|
|
2653
|
+
((this.operationResult & 0b1111) << 4)
|
|
2654
|
+
| (pinBuffer.length & 0b1111);
|
|
2671
2655
|
if (pinBuffer.length > 0) {
|
|
2672
2656
|
this.payload.set(pinBuffer, 1);
|
|
2673
2657
|
}
|
|
@@ -2752,8 +2736,7 @@ let UserCredentialCCKeyLockerEntrySet = (() => {
|
|
|
2752
2736
|
validatePayload(raw.payload.length >= 4);
|
|
2753
2737
|
const entryType = raw.payload[0];
|
|
2754
2738
|
const entrySlot = raw.payload.readUInt16BE(1);
|
|
2755
|
-
const operationType = raw.payload[3]
|
|
2756
|
-
& 0b11;
|
|
2739
|
+
const operationType = raw.payload[3] & 0b11;
|
|
2757
2740
|
if (operationType === UserCredentialOperationType.Delete) {
|
|
2758
2741
|
return new this({
|
|
2759
2742
|
nodeId: ctx.sourceNodeId,
|
|
@@ -2880,8 +2863,8 @@ let UserCredentialCCKeyLockerEntryReport = (() => {
|
|
|
2880
2863
|
})();
|
|
2881
2864
|
export { UserCredentialCCKeyLockerEntryReport };
|
|
2882
2865
|
function testResponseForUserCredentialKeyLockerEntryGet(sent, received) {
|
|
2883
|
-
return received.entryType === sent.entryType
|
|
2884
|
-
&& received.entrySlot === sent.entrySlot;
|
|
2866
|
+
return (received.entryType === sent.entryType
|
|
2867
|
+
&& received.entrySlot === sent.entrySlot);
|
|
2885
2868
|
}
|
|
2886
2869
|
let UserCredentialCCKeyLockerEntryGet = (() => {
|
|
2887
2870
|
let _classDecorators = [CCCommand(UserCredentialCommand.KeyLockerEntryGet), expectedCCResponse(UserCredentialCCKeyLockerEntryReport, testResponseForUserCredentialKeyLockerEntryGet)];
|