eufy-security-client 3.6.0 → 3.7.1
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/.prettierignore/342/200/216 +8 -0
- package/.prettierrc +11 -0
- package/README.md +18 -0
- package/a.ts +61 -0
- package/build/error.js.map +1 -1
- package/build/eufysecurity.d.ts +1 -0
- package/build/eufysecurity.js +721 -224
- package/build/eufysecurity.js.map +1 -1
- package/build/http/api.d.ts +29 -0
- package/build/http/api.js +991 -701
- package/build/http/api.js.map +1 -1
- package/build/http/cache.js.map +1 -1
- package/build/http/const.d.ts +6 -1
- package/build/http/const.js +2044 -7536
- package/build/http/const.js.map +1 -1
- package/build/http/device.d.ts +4 -0
- package/build/http/device.js +1325 -440
- package/build/http/device.js.map +1 -1
- package/build/http/error.js.map +1 -1
- package/build/http/index.js.map +1 -1
- package/build/http/interfaces.d.ts +22 -15
- package/build/http/models.d.ts +2 -1
- package/build/http/parameter.js +74 -63
- package/build/http/parameter.js.map +1 -1
- package/build/http/station.d.ts +20 -2
- package/build/http/station.js +8639 -3566
- package/build/http/station.js.map +1 -1
- package/build/http/types.d.ts +12 -0
- package/build/http/types.js +297 -155
- package/build/http/types.js.map +1 -1
- package/build/http/utils.d.ts +16 -6
- package/build/http/utils.js +335 -208
- package/build/http/utils.js.map +1 -1
- package/build/index.js.map +1 -1
- package/build/interfaces.d.ts +4 -3
- package/build/logging.js +8 -13
- package/build/logging.js.map +1 -1
- package/build/mqtt/interface.d.ts +2 -2
- package/build/mqtt/service.js +12 -3
- package/build/mqtt/service.js.map +1 -1
- package/build/p2p/ble.js +7 -6
- package/build/p2p/ble.js.map +1 -1
- package/build/p2p/error.js.map +1 -1
- package/build/p2p/interfaces.d.ts +41 -6
- package/build/p2p/session.js +1484 -383
- package/build/p2p/session.js.map +1 -1
- package/build/p2p/talkback.js.map +1 -1
- package/build/p2p/types.js +36 -36
- package/build/p2p/types.js.map +1 -1
- package/build/p2p/utils.d.ts +10 -0
- package/build/p2p/utils.js +183 -90
- package/build/p2p/utils.js.map +1 -1
- package/build/push/client.js +15 -4
- package/build/push/client.js.map +1 -1
- package/build/push/error.js.map +1 -1
- package/build/push/interfaces.d.ts +8 -8
- package/build/push/models.js.map +1 -1
- package/build/push/parser.js +6 -2
- package/build/push/parser.js.map +1 -1
- package/build/push/service.js +214 -85
- package/build/push/service.js.map +1 -1
- package/build/push/types.js.map +1 -1
- package/build/push/utils.js.map +1 -1
- package/build/utils.js +7 -15
- package/build/utils.js.map +1 -1
- package/coverage/clover.xml +11133 -13648
- package/coverage/coverage-final.json +20 -30
- package/coverage/lcov-report/error.ts.html +3 -3
- package/coverage/lcov-report/index.html +50 -65
- package/coverage/lcov-report/logging.ts.html +598 -0
- package/coverage/lcov.info +21072 -25751
- package/dont-care.js +101 -0
- package/package.json +9 -5
- package/build/package.json +0 -81
package/build/http/utils.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Device } from "./device";
|
|
2
2
|
import { Picture, Schedule } from "./interfaces";
|
|
3
|
-
import {
|
|
3
|
+
import { FloodlightT8425NotificationTypes, HB3DetectionTypes, IndoorS350DetectionTypes, IndoorS350NotificationTypes, NotificationSwitchMode, SignalLevel, SmartLockNotification, SourceType, T8170DetectionTypes, EufyCamC35DetectionTypes } from "./types";
|
|
4
4
|
import { HTTPApi } from "./api";
|
|
5
5
|
import { LockPushEvent } from "./../push/types";
|
|
6
6
|
import { Station } from "./station";
|
|
7
7
|
import { PushMessage } from "../push/models";
|
|
8
|
+
export declare const normalizeVersionString: (version: string) => number[] | null;
|
|
8
9
|
export declare const isGreaterEqualMinVersion: (minimal_version: string, current_version: string) => boolean;
|
|
9
10
|
export declare const pad: (num: number) => string;
|
|
10
11
|
export declare const getTimezoneGMTString: () => string;
|
|
@@ -16,8 +17,9 @@ export declare const calculateWifiSignalLevel: (device: Device, rssi: number) =>
|
|
|
16
17
|
export declare const calculateCellularSignalLevel: (rssi: number) => SignalLevel;
|
|
17
18
|
export declare const encryptAPIData: (data: string, key: Buffer) => string;
|
|
18
19
|
export declare const decryptAPIData: (data: string, key: Buffer) => Buffer;
|
|
19
|
-
export declare const getBlocklist: (
|
|
20
|
-
export declare const getDistances: (
|
|
20
|
+
export declare const getBlocklist: (distanceArray: Array<number>) => Array<number>;
|
|
21
|
+
export declare const getDistances: (rawDistanceData: Array<number>) => Array<number>;
|
|
22
|
+
export declare const isDeliveryPackageType: (value: number) => boolean;
|
|
21
23
|
export declare const isHB3DetectionModeEnabled: (value: number, type: HB3DetectionTypes) => boolean;
|
|
22
24
|
export declare const getHB3DetectionMode: (value: number, type: HB3DetectionTypes, enable: boolean) => number;
|
|
23
25
|
export interface EufyTimezone {
|
|
@@ -35,7 +37,12 @@ export declare class WritePayload {
|
|
|
35
37
|
getData(): Buffer;
|
|
36
38
|
}
|
|
37
39
|
export declare class ParsePayload {
|
|
38
|
-
|
|
40
|
+
/**
|
|
41
|
+
* extract specific pieces of data from a binary buffer
|
|
42
|
+
*
|
|
43
|
+
* @private
|
|
44
|
+
*/
|
|
45
|
+
private readonly data;
|
|
39
46
|
constructor(data: Buffer);
|
|
40
47
|
readUint32BE(indexValue: number): number;
|
|
41
48
|
readUint32LE(indexValue: number): number;
|
|
@@ -55,9 +62,9 @@ export declare const hexWeek: (schedule: Schedule) => string;
|
|
|
55
62
|
export declare const hexStringScheduleToSchedule: (startDay: string, startTime: string, endDay: string, endTime: string, week: string) => Schedule;
|
|
56
63
|
export declare const randomNumber: (min: number, max: number) => number;
|
|
57
64
|
export declare const getIdSuffix: (p2pDid: string) => number;
|
|
58
|
-
export declare const getImageBaseCode: (
|
|
65
|
+
export declare const getImageBaseCode: (serialNumber: string, p2pDid: string) => string;
|
|
59
66
|
export declare const getImageSeed: (p2pDid: string, code: string) => string;
|
|
60
|
-
export declare const getImageKey: (
|
|
67
|
+
export declare const getImageKey: (serialNumber: string, p2pDid: string, code: string) => string;
|
|
61
68
|
export declare const decodeImage: (p2pDid: string, data: Buffer) => Buffer;
|
|
62
69
|
export declare const getImagePath: (path: string) => string;
|
|
63
70
|
export declare const getImage: (api: HTTPApi, serial: string, url: string) => Promise<Picture>;
|
|
@@ -65,6 +72,8 @@ export declare const isPrioritySourceType: (current: SourceType | undefined, upd
|
|
|
65
72
|
export declare const decryptTrackerData: (data: Buffer, key: Buffer) => Buffer;
|
|
66
73
|
export declare const isT8170DetectionModeEnabled: (value: number, type: T8170DetectionTypes) => boolean;
|
|
67
74
|
export declare const getT8170DetectionMode: (value: number, type: T8170DetectionTypes, enable: boolean) => number;
|
|
75
|
+
export declare const isT8110DetectionModeEnabled: (value: number, type: EufyCamC35DetectionTypes) => boolean;
|
|
76
|
+
export declare const getT8110DetectionMode: (value: number, type: EufyCamC35DetectionTypes, enable: boolean) => number;
|
|
68
77
|
export declare const isIndoorS350DetectionModeEnabled: (value: number, type: IndoorS350DetectionTypes) => boolean;
|
|
69
78
|
export declare const getIndoorS350DetectionMode: (value: number, type: IndoorS350DetectionTypes, enable: boolean) => number;
|
|
70
79
|
export declare const isIndoorNotitficationEnabled: (value: number, type: IndoorS350NotificationTypes) => boolean;
|
|
@@ -77,3 +86,4 @@ export declare const isSmartLockNotification: (value: number, mode: SmartLockNot
|
|
|
77
86
|
export declare const getWaitSeconds: (device: Device) => number;
|
|
78
87
|
export declare const loadImageOverP2P: (station: Station, device: Device, id: string, p2pTimeouts: Map<string, NodeJS.Timeout>) => void;
|
|
79
88
|
export declare const loadEventImage: (station: Station, api: HTTPApi, device: Device, message: PushMessage, p2pTimeouts: Map<string, NodeJS.Timeout>) => void;
|
|
89
|
+
export declare const getRandomPhoneModel: () => string;
|