eufy-security-client 2.4.2 → 2.4.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.
- package/README.md +12 -0
- package/build/error.d.ts +57 -57
- package/build/error.js +155 -155
- package/build/eufysecurity.d.ts +162 -161
- package/build/eufysecurity.js +2104 -2091
- package/build/eufysecurity.js.map +1 -1
- package/build/http/api.d.ts +90 -90
- package/build/http/api.js +1407 -1407
- package/build/http/api.js.map +1 -1
- package/build/http/cache.d.ts +8 -8
- package/build/http/cache.js +33 -33
- package/build/http/const.d.ts +3 -3
- package/build/http/const.js +8545 -8545
- package/build/http/device.d.ts +360 -360
- package/build/http/device.js +2793 -2793
- package/build/http/device.js.map +1 -1
- package/build/http/error.d.ts +28 -28
- package/build/http/error.js +76 -76
- package/build/http/index.d.ts +10 -10
- package/build/http/index.js +29 -29
- package/build/http/interfaces.d.ts +202 -202
- package/build/http/interfaces.js +2 -2
- package/build/http/models.d.ts +561 -561
- package/build/http/models.js +2 -2
- package/build/http/parameter.d.ts +5 -5
- package/build/http/parameter.js +75 -75
- package/build/http/station.d.ts +292 -292
- package/build/http/station.js +6780 -6780
- package/build/http/station.js.map +1 -1
- package/build/http/types.d.ts +945 -945
- package/build/http/types.js +6070 -6070
- package/build/http/utils.d.ts +37 -37
- package/build/http/utils.js +370 -370
- package/build/index.d.ts +7 -7
- package/build/index.js +25 -25
- package/build/interfaces.d.ts +113 -113
- package/build/interfaces.js +2 -2
- package/build/mqtt/interface.d.ts +6 -6
- package/build/mqtt/interface.js +2 -2
- package/build/mqtt/model.d.ts +24 -24
- package/build/mqtt/model.js +2 -2
- package/build/mqtt/service.d.ts +30 -30
- package/build/mqtt/service.js +168 -168
- package/build/mqtt/service.js.map +1 -1
- package/build/p2p/ble.d.ts +47 -47
- package/build/p2p/ble.js +188 -188
- package/build/p2p/ble.js.map +1 -1
- package/build/p2p/error.d.ts +24 -24
- package/build/p2p/error.js +67 -67
- package/build/p2p/index.d.ts +8 -8
- package/build/p2p/index.js +27 -27
- package/build/p2p/interfaces.d.ts +162 -162
- package/build/p2p/interfaces.js +2 -2
- package/build/p2p/models.d.ts +146 -146
- package/build/p2p/models.js +2 -2
- package/build/p2p/session.d.ts +168 -168
- package/build/p2p/session.js +2087 -2087
- package/build/p2p/session.js.map +1 -1
- package/build/p2p/talkback.d.ts +10 -10
- package/build/p2p/talkback.js +22 -22
- package/build/p2p/types.d.ts +923 -923
- package/build/p2p/types.js +957 -957
- package/build/p2p/utils.d.ts +56 -56
- package/build/p2p/utils.js +653 -653
- package/build/push/client.d.ts +51 -51
- package/build/push/client.js +311 -311
- package/build/push/client.js.map +1 -1
- package/build/push/index.d.ts +5 -5
- package/build/push/index.js +24 -24
- package/build/push/interfaces.d.ts +19 -19
- package/build/push/interfaces.js +2 -2
- package/build/push/models.d.ts +292 -292
- package/build/push/models.js +30 -30
- package/build/push/parser.d.ts +28 -28
- package/build/push/parser.js +215 -215
- package/build/push/parser.js.map +1 -1
- package/build/push/service.d.ts +45 -45
- package/build/push/service.js +643 -643
- package/build/push/service.js.map +1 -1
- package/build/push/types.d.ts +176 -176
- package/build/push/types.js +192 -192
- package/build/push/utils.d.ts +7 -7
- package/build/push/utils.js +102 -102
- package/build/utils.d.ts +16 -13
- package/build/utils.js +207 -191
- package/build/utils.js.map +1 -1
- package/package.json +10 -10
package/build/http/models.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=models.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Logger } from "ts-log";
|
|
2
|
-
export declare class ParameterHelper {
|
|
3
|
-
static readValue(type: number, value: string, log: Logger): string;
|
|
4
|
-
static writeValue(type: number, value: string): string;
|
|
5
|
-
}
|
|
1
|
+
import { Logger } from "ts-log";
|
|
2
|
+
export declare class ParameterHelper {
|
|
3
|
+
static readValue(type: number, value: string, log: Logger): string;
|
|
4
|
+
static writeValue(type: number, value: string): string;
|
|
5
|
+
}
|
package/build/http/parameter.js
CHANGED
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ParameterHelper = void 0;
|
|
4
|
-
const types_1 = require("../p2p/types");
|
|
5
|
-
const utils_1 = require("../p2p/utils");
|
|
6
|
-
const utils_2 = require("../utils");
|
|
7
|
-
const types_2 = require("./types");
|
|
8
|
-
class ParameterHelper {
|
|
9
|
-
static readValue(type, value, log) {
|
|
10
|
-
if (value) {
|
|
11
|
-
if (type === types_2.ParamType.SNOOZE_MODE ||
|
|
12
|
-
type === types_2.ParamType.CAMERA_MOTION_ZONES ||
|
|
13
|
-
type === types_1.CommandType.CMD_SET_DOORSENSOR_ALWAYS_OPEN_DELAY ||
|
|
14
|
-
type === types_1.CommandType.CMD_SET_DOORSENSOR_ALWAYS_OPEN ||
|
|
15
|
-
type === types_1.CommandType.ARM_DELAY_HOME ||
|
|
16
|
-
type === types_1.CommandType.ARM_DELAY_AWAY ||
|
|
17
|
-
type === types_1.CommandType.ARM_DELAY_CUS1 ||
|
|
18
|
-
type === types_1.CommandType.ARM_DELAY_CUS2 ||
|
|
19
|
-
type === types_1.CommandType.ARM_DELAY_CUS3 ||
|
|
20
|
-
type === types_1.CommandType.ARM_DELAY_OFF ||
|
|
21
|
-
type === types_1.CommandType.CELLULAR_INFO) {
|
|
22
|
-
try {
|
|
23
|
-
if (typeof value === "string") {
|
|
24
|
-
return (0, utils_2.parseJSON)((0, utils_1.decodeBase64)(value).toString("utf8"), log);
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
return value; //return object
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
catch (error) {
|
|
31
|
-
log.error(`Error readValue param ${type} `, error, type, value);
|
|
32
|
-
}
|
|
33
|
-
return "";
|
|
34
|
-
}
|
|
35
|
-
else if (type === types_1.CommandType.CMD_BAT_DOORBELL_SET_NOTIFICATION_MODE ||
|
|
36
|
-
type === types_1.CommandType.CMD_DOORBELL_DUAL_RADAR_WD_DETECTION_SENSITIVITY ||
|
|
37
|
-
type === types_1.CommandType.CMD_DOORBELL_DUAL_RADAR_WD_AUTO_RESPONSE ||
|
|
38
|
-
type === types_1.CommandType.CMD_DOORBELL_DUAL_PACKAGE_STRAND_TIME ||
|
|
39
|
-
type === types_1.CommandType.CMD_DOORBELL_DUAL_RING_AUTO_RESPONSE ||
|
|
40
|
-
type === types_1.CommandType.CMD_DOORBELL_DUAL_PACKAGE_GUARD_TIME ||
|
|
41
|
-
type === types_1.CommandType.CMD_DOORBELL_DUAL_RADAR_WD_DISTANCE ||
|
|
42
|
-
type === types_1.CommandType.CMD_DOORBELL_DUAL_RADAR_WD_TIME ||
|
|
43
|
-
type === types_1.CommandType.CMD_DOORBELL_DUAL_DELIVERY_GUARD_SWITCH ||
|
|
44
|
-
type === types_1.CommandType.CMD_DOORBELL_DUAL_PACKAGE_GUARD_VOICE) {
|
|
45
|
-
if (typeof value === "string") {
|
|
46
|
-
try {
|
|
47
|
-
return (0, utils_2.parseJSON)(value, log); //return object
|
|
48
|
-
}
|
|
49
|
-
catch (error) {
|
|
50
|
-
log.error(`Error readValue param ${type} `, error, type, value);
|
|
51
|
-
}
|
|
52
|
-
return "";
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
return value; //return object
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return value;
|
|
60
|
-
}
|
|
61
|
-
static writeValue(type, value) {
|
|
62
|
-
if (value) {
|
|
63
|
-
const result = JSON.stringify(value);
|
|
64
|
-
if (type === types_2.ParamType.SNOOZE_MODE ||
|
|
65
|
-
type === types_2.ParamType.CAMERA_MOTION_ZONES ||
|
|
66
|
-
type === types_1.CommandType.CMD_SET_DOORSENSOR_ALWAYS_OPEN_DELAY ||
|
|
67
|
-
type === types_1.CommandType.CMD_SET_DOORSENSOR_ALWAYS_OPEN) {
|
|
68
|
-
return Buffer.from(result).toString("base64");
|
|
69
|
-
}
|
|
70
|
-
return result;
|
|
71
|
-
}
|
|
72
|
-
return "";
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
exports.ParameterHelper = ParameterHelper;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ParameterHelper = void 0;
|
|
4
|
+
const types_1 = require("../p2p/types");
|
|
5
|
+
const utils_1 = require("../p2p/utils");
|
|
6
|
+
const utils_2 = require("../utils");
|
|
7
|
+
const types_2 = require("./types");
|
|
8
|
+
class ParameterHelper {
|
|
9
|
+
static readValue(type, value, log) {
|
|
10
|
+
if (value) {
|
|
11
|
+
if (type === types_2.ParamType.SNOOZE_MODE ||
|
|
12
|
+
type === types_2.ParamType.CAMERA_MOTION_ZONES ||
|
|
13
|
+
type === types_1.CommandType.CMD_SET_DOORSENSOR_ALWAYS_OPEN_DELAY ||
|
|
14
|
+
type === types_1.CommandType.CMD_SET_DOORSENSOR_ALWAYS_OPEN ||
|
|
15
|
+
type === types_1.CommandType.ARM_DELAY_HOME ||
|
|
16
|
+
type === types_1.CommandType.ARM_DELAY_AWAY ||
|
|
17
|
+
type === types_1.CommandType.ARM_DELAY_CUS1 ||
|
|
18
|
+
type === types_1.CommandType.ARM_DELAY_CUS2 ||
|
|
19
|
+
type === types_1.CommandType.ARM_DELAY_CUS3 ||
|
|
20
|
+
type === types_1.CommandType.ARM_DELAY_OFF ||
|
|
21
|
+
type === types_1.CommandType.CELLULAR_INFO) {
|
|
22
|
+
try {
|
|
23
|
+
if (typeof value === "string") {
|
|
24
|
+
return (0, utils_2.parseJSON)((0, utils_1.decodeBase64)(value).toString("utf8"), log);
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
return value; //return object
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
log.error(`Error readValue param ${type} `, error, type, value);
|
|
32
|
+
}
|
|
33
|
+
return "";
|
|
34
|
+
}
|
|
35
|
+
else if (type === types_1.CommandType.CMD_BAT_DOORBELL_SET_NOTIFICATION_MODE ||
|
|
36
|
+
type === types_1.CommandType.CMD_DOORBELL_DUAL_RADAR_WD_DETECTION_SENSITIVITY ||
|
|
37
|
+
type === types_1.CommandType.CMD_DOORBELL_DUAL_RADAR_WD_AUTO_RESPONSE ||
|
|
38
|
+
type === types_1.CommandType.CMD_DOORBELL_DUAL_PACKAGE_STRAND_TIME ||
|
|
39
|
+
type === types_1.CommandType.CMD_DOORBELL_DUAL_RING_AUTO_RESPONSE ||
|
|
40
|
+
type === types_1.CommandType.CMD_DOORBELL_DUAL_PACKAGE_GUARD_TIME ||
|
|
41
|
+
type === types_1.CommandType.CMD_DOORBELL_DUAL_RADAR_WD_DISTANCE ||
|
|
42
|
+
type === types_1.CommandType.CMD_DOORBELL_DUAL_RADAR_WD_TIME ||
|
|
43
|
+
type === types_1.CommandType.CMD_DOORBELL_DUAL_DELIVERY_GUARD_SWITCH ||
|
|
44
|
+
type === types_1.CommandType.CMD_DOORBELL_DUAL_PACKAGE_GUARD_VOICE) {
|
|
45
|
+
if (typeof value === "string") {
|
|
46
|
+
try {
|
|
47
|
+
return (0, utils_2.parseJSON)(value, log); //return object
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
log.error(`Error readValue param ${type} `, error, type, value);
|
|
51
|
+
}
|
|
52
|
+
return "";
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
return value; //return object
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return value;
|
|
60
|
+
}
|
|
61
|
+
static writeValue(type, value) {
|
|
62
|
+
if (value) {
|
|
63
|
+
const result = JSON.stringify(value);
|
|
64
|
+
if (type === types_2.ParamType.SNOOZE_MODE ||
|
|
65
|
+
type === types_2.ParamType.CAMERA_MOTION_ZONES ||
|
|
66
|
+
type === types_1.CommandType.CMD_SET_DOORSENSOR_ALWAYS_OPEN_DELAY ||
|
|
67
|
+
type === types_1.CommandType.CMD_SET_DOORSENSOR_ALWAYS_OPEN) {
|
|
68
|
+
return Buffer.from(result).toString("base64");
|
|
69
|
+
}
|
|
70
|
+
return result;
|
|
71
|
+
}
|
|
72
|
+
return "";
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
exports.ParameterHelper = ParameterHelper;
|
|
76
76
|
//# sourceMappingURL=parameter.js.map
|