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/p2p/utils.d.ts
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { Socket } from "dgram";
|
|
2
|
-
import NodeRSA from "node-rsa";
|
|
3
|
-
import { P2PMessageParts, P2PMessageState, P2PQueueMessage } from "./interfaces";
|
|
4
|
-
import { CommandType, ESLCommand, LockV12P2PCommand, SmartSafeCommandCode, VideoCodec } from "./types";
|
|
5
|
-
import { Address, LockP2PCommandType, SmartSafeNotificationResponse, SmartSafeP2PCommandType } from "./models";
|
|
6
|
-
import { DeviceType } from "../http/types";
|
|
7
|
-
export declare const MAGIC_WORD = "XZYH";
|
|
8
|
-
export declare const isPrivateIp: (ip: string) => boolean;
|
|
9
|
-
export declare const getLocalIpAddress: (init?: string) => string;
|
|
10
|
-
export declare const buildLookupWithKeyPayload: (socket: Socket, p2pDid: string, dskKey: string) => Buffer;
|
|
11
|
-
export declare const buildLookupWithKeyPayload2: (p2pDid: string, dskKey: string) => Buffer;
|
|
12
|
-
export declare const buildLookupWithKeyPayload3: (p2pDid: string, address: Address, data: Buffer) => Buffer;
|
|
13
|
-
export declare const buildCheckCamPayload: (p2pDid: string) => Buffer;
|
|
14
|
-
export declare const buildCheckCamPayload2: (p2pDid: string, data: Buffer) => Buffer;
|
|
15
|
-
export declare const buildIntCommandPayload: (value: number, strValue?: string, channel?: number) => Buffer;
|
|
16
|
-
export declare const buildStringTypeCommandPayload: (strValue: string, strValueSub: string, channel?: number) => Buffer;
|
|
17
|
-
export declare const buildIntStringCommandPayload: (value: number, valueSub?: number, strValue?: string, strValueSub?: string, channel?: number) => Buffer;
|
|
18
|
-
export declare const sendMessage: (socket: Socket, address: {
|
|
19
|
-
host: string;
|
|
20
|
-
port: number;
|
|
21
|
-
}, msgID: Buffer, payload?: Buffer) => Promise<number>;
|
|
22
|
-
export declare const hasHeader: (msg: Buffer, searchedType: Buffer) => boolean;
|
|
23
|
-
export declare const buildCommandHeader: (seqNumber: number, commandType: CommandType, p2pDataTypeHeader?: Buffer | null) => Buffer;
|
|
24
|
-
export declare const buildCommandWithStringTypePayload: (value: string, channel?: number) => Buffer;
|
|
25
|
-
export declare const sortP2PMessageParts: (messages: P2PMessageParts) => Buffer;
|
|
26
|
-
export declare const getRSAPrivateKey: (pem: string) => NodeRSA;
|
|
27
|
-
export declare const getNewRSAPrivateKey: () => NodeRSA;
|
|
28
|
-
export declare const decryptAESData: (hexkey: string, data: Buffer) => Buffer;
|
|
29
|
-
export declare const findStartCode: (data: Buffer) => boolean;
|
|
30
|
-
export declare const isIFrame: (data: Buffer) => boolean;
|
|
31
|
-
export declare const decryptLockAESData: (key: string, iv: string, data: Buffer) => Buffer;
|
|
32
|
-
export declare const encryptLockAESData: (key: string, iv: string, data: Buffer) => Buffer;
|
|
33
|
-
export declare const generateBasicLockAESKey: (adminID: string, stationSN: string) => string;
|
|
34
|
-
export declare const getCurrentTimeInSeconds: () => number;
|
|
35
|
-
export declare const generateLockSequence: (deviceType: DeviceType) => number;
|
|
36
|
-
export declare const encodeLockPayload: (data: string) => Buffer;
|
|
37
|
-
export declare const getLockVectorBytes: (data: string) => string;
|
|
38
|
-
export declare const decodeLockPayload: (data: Buffer) => string;
|
|
39
|
-
export declare const decodeBase64: (data: string) => Buffer;
|
|
40
|
-
export declare const eslTimestamp: (timestamp_in_sec?: number) => number[];
|
|
41
|
-
export declare const generateAdvancedLockAESKey: () => string;
|
|
42
|
-
export declare const getVideoCodec: (data: Buffer) => VideoCodec;
|
|
43
|
-
export declare const checkT8420: (serialNumber: string) => boolean;
|
|
44
|
-
export declare const buildVoidCommandPayload: (channel?: number) => Buffer;
|
|
45
|
-
export declare function isP2PQueueMessage(type: P2PQueueMessage | P2PMessageState): type is P2PQueueMessage;
|
|
46
|
-
export declare const encryptPayloadData: (data: string | Buffer, key: Buffer, iv: Buffer) => Buffer;
|
|
47
|
-
export declare const decryptPayloadData: (data: Buffer, key: Buffer, iv: Buffer) => Buffer;
|
|
48
|
-
export declare const eufyKDF: (key: Buffer) => Buffer;
|
|
49
|
-
export declare const getAdvancedLockKey: (key: string, publicKey: string) => string;
|
|
50
|
-
export declare const getLockV12Key: (key: string, publicKey: string) => string;
|
|
51
|
-
export declare const buildTalkbackAudioFrameHeader: (audioData: Buffer, channel?: number) => Buffer;
|
|
52
|
-
export declare const decodeP2PCloudIPs: (data: string) => Array<Address>;
|
|
53
|
-
export declare const decodeSmartSafeData: (deviceSN: string, data: Buffer) => SmartSafeNotificationResponse;
|
|
54
|
-
export declare const getSmartSafeP2PCommand: (deviceSN: string, user_id: string, command: CommandType, intCommand: SmartSafeCommandCode, channel: number, sequence: number, data: Buffer) => SmartSafeP2PCommandType;
|
|
55
|
-
export declare const getLockP2PCommand: (deviceSN: string, user_id: string, command: CommandType, channel: number, lockPublicKey: string, payload: any) => LockP2PCommandType;
|
|
56
|
-
export declare const getLockV12P2PCommand: (deviceSN: string, user_id: string, command: CommandType | ESLCommand, channel: number, lockPublicKey: string, sequence: number, data: Buffer) => LockV12P2PCommand;
|
|
1
|
+
import { Socket } from "dgram";
|
|
2
|
+
import NodeRSA from "node-rsa";
|
|
3
|
+
import { P2PMessageParts, P2PMessageState, P2PQueueMessage } from "./interfaces";
|
|
4
|
+
import { CommandType, ESLCommand, LockV12P2PCommand, SmartSafeCommandCode, VideoCodec } from "./types";
|
|
5
|
+
import { Address, LockP2PCommandType, SmartSafeNotificationResponse, SmartSafeP2PCommandType } from "./models";
|
|
6
|
+
import { DeviceType } from "../http/types";
|
|
7
|
+
export declare const MAGIC_WORD = "XZYH";
|
|
8
|
+
export declare const isPrivateIp: (ip: string) => boolean;
|
|
9
|
+
export declare const getLocalIpAddress: (init?: string) => string;
|
|
10
|
+
export declare const buildLookupWithKeyPayload: (socket: Socket, p2pDid: string, dskKey: string) => Buffer;
|
|
11
|
+
export declare const buildLookupWithKeyPayload2: (p2pDid: string, dskKey: string) => Buffer;
|
|
12
|
+
export declare const buildLookupWithKeyPayload3: (p2pDid: string, address: Address, data: Buffer) => Buffer;
|
|
13
|
+
export declare const buildCheckCamPayload: (p2pDid: string) => Buffer;
|
|
14
|
+
export declare const buildCheckCamPayload2: (p2pDid: string, data: Buffer) => Buffer;
|
|
15
|
+
export declare const buildIntCommandPayload: (value: number, strValue?: string, channel?: number) => Buffer;
|
|
16
|
+
export declare const buildStringTypeCommandPayload: (strValue: string, strValueSub: string, channel?: number) => Buffer;
|
|
17
|
+
export declare const buildIntStringCommandPayload: (value: number, valueSub?: number, strValue?: string, strValueSub?: string, channel?: number) => Buffer;
|
|
18
|
+
export declare const sendMessage: (socket: Socket, address: {
|
|
19
|
+
host: string;
|
|
20
|
+
port: number;
|
|
21
|
+
}, msgID: Buffer, payload?: Buffer) => Promise<number>;
|
|
22
|
+
export declare const hasHeader: (msg: Buffer, searchedType: Buffer) => boolean;
|
|
23
|
+
export declare const buildCommandHeader: (seqNumber: number, commandType: CommandType, p2pDataTypeHeader?: Buffer | null) => Buffer;
|
|
24
|
+
export declare const buildCommandWithStringTypePayload: (value: string, channel?: number) => Buffer;
|
|
25
|
+
export declare const sortP2PMessageParts: (messages: P2PMessageParts) => Buffer;
|
|
26
|
+
export declare const getRSAPrivateKey: (pem: string) => NodeRSA;
|
|
27
|
+
export declare const getNewRSAPrivateKey: () => NodeRSA;
|
|
28
|
+
export declare const decryptAESData: (hexkey: string, data: Buffer) => Buffer;
|
|
29
|
+
export declare const findStartCode: (data: Buffer) => boolean;
|
|
30
|
+
export declare const isIFrame: (data: Buffer) => boolean;
|
|
31
|
+
export declare const decryptLockAESData: (key: string, iv: string, data: Buffer) => Buffer;
|
|
32
|
+
export declare const encryptLockAESData: (key: string, iv: string, data: Buffer) => Buffer;
|
|
33
|
+
export declare const generateBasicLockAESKey: (adminID: string, stationSN: string) => string;
|
|
34
|
+
export declare const getCurrentTimeInSeconds: () => number;
|
|
35
|
+
export declare const generateLockSequence: (deviceType: DeviceType) => number;
|
|
36
|
+
export declare const encodeLockPayload: (data: string) => Buffer;
|
|
37
|
+
export declare const getLockVectorBytes: (data: string) => string;
|
|
38
|
+
export declare const decodeLockPayload: (data: Buffer) => string;
|
|
39
|
+
export declare const decodeBase64: (data: string) => Buffer;
|
|
40
|
+
export declare const eslTimestamp: (timestamp_in_sec?: number) => number[];
|
|
41
|
+
export declare const generateAdvancedLockAESKey: () => string;
|
|
42
|
+
export declare const getVideoCodec: (data: Buffer) => VideoCodec;
|
|
43
|
+
export declare const checkT8420: (serialNumber: string) => boolean;
|
|
44
|
+
export declare const buildVoidCommandPayload: (channel?: number) => Buffer;
|
|
45
|
+
export declare function isP2PQueueMessage(type: P2PQueueMessage | P2PMessageState): type is P2PQueueMessage;
|
|
46
|
+
export declare const encryptPayloadData: (data: string | Buffer, key: Buffer, iv: Buffer) => Buffer;
|
|
47
|
+
export declare const decryptPayloadData: (data: Buffer, key: Buffer, iv: Buffer) => Buffer;
|
|
48
|
+
export declare const eufyKDF: (key: Buffer) => Buffer;
|
|
49
|
+
export declare const getAdvancedLockKey: (key: string, publicKey: string) => string;
|
|
50
|
+
export declare const getLockV12Key: (key: string, publicKey: string) => string;
|
|
51
|
+
export declare const buildTalkbackAudioFrameHeader: (audioData: Buffer, channel?: number) => Buffer;
|
|
52
|
+
export declare const decodeP2PCloudIPs: (data: string) => Array<Address>;
|
|
53
|
+
export declare const decodeSmartSafeData: (deviceSN: string, data: Buffer) => SmartSafeNotificationResponse;
|
|
54
|
+
export declare const getSmartSafeP2PCommand: (deviceSN: string, user_id: string, command: CommandType, intCommand: SmartSafeCommandCode, channel: number, sequence: number, data: Buffer) => SmartSafeP2PCommandType;
|
|
55
|
+
export declare const getLockP2PCommand: (deviceSN: string, user_id: string, command: CommandType, channel: number, lockPublicKey: string, payload: any) => LockP2PCommandType;
|
|
56
|
+
export declare const getLockV12P2PCommand: (deviceSN: string, user_id: string, command: CommandType | ESLCommand, channel: number, lockPublicKey: string, sequence: number, data: Buffer) => LockV12P2PCommand;
|