hoffmation-base 3.2.3-alpha.0 → 3.2.3-alpha.2

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 (39) hide show
  1. package/lib/action/dingSensorAction.d.ts +16 -0
  2. package/lib/action/dingSensorAction.js +15 -0
  3. package/lib/action/index.d.ts +1 -0
  4. package/lib/action/index.js +3 -1
  5. package/lib/devices/DoorDevice.d.ts +38 -0
  6. package/lib/devices/DoorDevice.js +104 -0
  7. package/lib/devices/dachs/dachs.js +6 -4
  8. package/lib/devices/devices.d.ts +6 -3
  9. package/lib/devices/index.d.ts +1 -0
  10. package/lib/devices/index.js +1 -0
  11. package/lib/devices/unifi/index.d.ts +2 -0
  12. package/lib/devices/unifi/index.js +2 -0
  13. package/lib/devices/unifi/own-unifi-door.d.ts +15 -0
  14. package/lib/devices/unifi/own-unifi-door.js +48 -0
  15. package/lib/devices/unifi/unifi-access.d.ts +19 -0
  16. package/lib/devices/unifi/unifi-access.js +98 -0
  17. package/lib/devices/unifi/unifi-logger.d.ts +10 -0
  18. package/lib/devices/unifi/unifi-logger.js +31 -0
  19. package/lib/devices/unifi/unifi-protect.js +2 -23
  20. package/lib/enums/DeviceCapability.d.ts +2 -1
  21. package/lib/enums/DeviceCapability.js +1 -0
  22. package/lib/enums/commandType.d.ts +2 -1
  23. package/lib/enums/commandType.js +1 -0
  24. package/lib/enums/deviceType.d.ts +1 -0
  25. package/lib/enums/deviceType.js +1 -0
  26. package/lib/enums/logSource.d.ts +2 -1
  27. package/lib/enums/logSource.js +1 -0
  28. package/lib/index.js +5 -1
  29. package/lib/interfaces/baseDevices/iDoorDevice.d.ts +33 -0
  30. package/lib/interfaces/baseDevices/iDoorDevice.js +2 -0
  31. package/lib/interfaces/baseDevices/index.d.ts +1 -0
  32. package/lib/interfaces/deviceSettings/iDoorSettings.d.ts +18 -0
  33. package/lib/interfaces/deviceSettings/iDoorSettings.js +2 -0
  34. package/lib/interfaces/deviceSettings/index.d.ts +1 -0
  35. package/lib/interfaces/iUnifiProtectOptions.d.ts +4 -0
  36. package/lib/settingsObjects/deviceSettings/doorSettings.d.ts +8 -0
  37. package/lib/settingsObjects/deviceSettings/doorSettings.js +21 -0
  38. package/lib/tsconfig.tsbuildinfo +1 -1
  39. package/package.json +4 -2
@@ -0,0 +1,33 @@
1
+ import { iRoomDevice } from './iRoomDevice';
2
+ import { iDoorSettings } from '../deviceSettings';
3
+ import { DingSensorAction } from '../../action';
4
+ /**
5
+ * An interface defining a door device
6
+ */
7
+ export interface iDoorDevice extends iRoomDevice {
8
+ /**
9
+ * The settings of the doorbell device
10
+ */
11
+ settings: iDoorSettings;
12
+ /**
13
+ * Whether the doorbell is currently dinging
14
+ */
15
+ readonly dingActive: boolean;
16
+ /**
17
+ * The last time the doorbell received a data update.
18
+ */
19
+ readonly lastUpdate: Date;
20
+ /**
21
+ * The number of seconds since the last ding
22
+ */
23
+ readonly timeSinceDing: number;
24
+ /**
25
+ * The number of dings today
26
+ */
27
+ readonly dingsToday: number;
28
+ /**
29
+ * Adds a callback for when a ding state has changed.
30
+ * @param pCallback - Function that accepts the new state as parameter
31
+ */
32
+ addDingCallback(pCallback: (action: DingSensorAction) => void): void;
33
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -32,3 +32,4 @@ export { iWaterSensor } from './iWaterSensor';
32
32
  export { iWledDevice } from './iWledDevice';
33
33
  export { iTemperatureSensor } from './iTemperatureSensor';
34
34
  export { iHumiditySensor } from './iHumiditySensor';
35
+ export { iDoorDevice } from './iDoorDevice';
@@ -0,0 +1,18 @@
1
+ import { iDeviceSettings } from './iDeviceSettings';
2
+ /**
3
+ *
4
+ */
5
+ export interface iDoorSettings extends iDeviceSettings {
6
+ /**
7
+ *
8
+ */
9
+ alertDingOnTelegram: boolean;
10
+ /**
11
+ *
12
+ */
13
+ fromPartialObject(data: Partial<iDoorSettings>): void;
14
+ /**
15
+ *
16
+ */
17
+ toJSON(): Partial<iDoorSettings>;
18
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -6,3 +6,4 @@ export * from './iDeviceSettings';
6
6
  export * from './IDimmerSettings';
7
7
  export * from './iGarageDoorOpenerSettings';
8
8
  export * from './iMotionSensorSettings';
9
+ export { iDoorSettings } from './iDoorSettings';
@@ -10,6 +10,10 @@ export interface iUnifiProtectOptions {
10
10
  * The username for the NVR Api access.
11
11
  */
12
12
  username: string;
13
+ /**
14
+ * Separate Username for Unifi Access
15
+ */
16
+ usernameAccess: string;
13
17
  /**
14
18
  * The password for connecting to the NVR API.
15
19
  */
@@ -0,0 +1,8 @@
1
+ import { iDoorSettings } from '../../interfaces';
2
+ import { DeviceSettings } from './deviceSettings';
3
+ export declare class DoorSettings extends DeviceSettings implements iDoorSettings {
4
+ /** @inheritdoc */
5
+ alertDingOnTelegram: boolean;
6
+ fromPartialObject(data: Partial<DoorSettings>): void;
7
+ toJSON(): Partial<DoorSettings>;
8
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DoorSettings = void 0;
4
+ const utils_1 = require("../../utils");
5
+ const deviceSettings_1 = require("./deviceSettings");
6
+ class DoorSettings extends deviceSettings_1.DeviceSettings {
7
+ constructor() {
8
+ super(...arguments);
9
+ /** @inheritdoc */
10
+ this.alertDingOnTelegram = false;
11
+ }
12
+ fromPartialObject(data) {
13
+ var _a;
14
+ this.alertDingOnTelegram = (_a = data.alertDingOnTelegram) !== null && _a !== void 0 ? _a : this.alertDingOnTelegram;
15
+ super.fromPartialObject(data);
16
+ }
17
+ toJSON() {
18
+ return utils_1.Utils.jsonFilter(this);
19
+ }
20
+ }
21
+ exports.DoorSettings = DoorSettings;