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.
Files changed (87) hide show
  1. package/README.md +12 -0
  2. package/build/error.d.ts +57 -57
  3. package/build/error.js +155 -155
  4. package/build/eufysecurity.d.ts +162 -161
  5. package/build/eufysecurity.js +2104 -2091
  6. package/build/eufysecurity.js.map +1 -1
  7. package/build/http/api.d.ts +90 -90
  8. package/build/http/api.js +1407 -1407
  9. package/build/http/api.js.map +1 -1
  10. package/build/http/cache.d.ts +8 -8
  11. package/build/http/cache.js +33 -33
  12. package/build/http/const.d.ts +3 -3
  13. package/build/http/const.js +8545 -8545
  14. package/build/http/device.d.ts +360 -360
  15. package/build/http/device.js +2793 -2793
  16. package/build/http/device.js.map +1 -1
  17. package/build/http/error.d.ts +28 -28
  18. package/build/http/error.js +76 -76
  19. package/build/http/index.d.ts +10 -10
  20. package/build/http/index.js +29 -29
  21. package/build/http/interfaces.d.ts +202 -202
  22. package/build/http/interfaces.js +2 -2
  23. package/build/http/models.d.ts +561 -561
  24. package/build/http/models.js +2 -2
  25. package/build/http/parameter.d.ts +5 -5
  26. package/build/http/parameter.js +75 -75
  27. package/build/http/station.d.ts +292 -292
  28. package/build/http/station.js +6780 -6780
  29. package/build/http/station.js.map +1 -1
  30. package/build/http/types.d.ts +945 -945
  31. package/build/http/types.js +6070 -6070
  32. package/build/http/utils.d.ts +37 -37
  33. package/build/http/utils.js +370 -370
  34. package/build/index.d.ts +7 -7
  35. package/build/index.js +25 -25
  36. package/build/interfaces.d.ts +113 -113
  37. package/build/interfaces.js +2 -2
  38. package/build/mqtt/interface.d.ts +6 -6
  39. package/build/mqtt/interface.js +2 -2
  40. package/build/mqtt/model.d.ts +24 -24
  41. package/build/mqtt/model.js +2 -2
  42. package/build/mqtt/service.d.ts +30 -30
  43. package/build/mqtt/service.js +168 -168
  44. package/build/mqtt/service.js.map +1 -1
  45. package/build/p2p/ble.d.ts +47 -47
  46. package/build/p2p/ble.js +188 -188
  47. package/build/p2p/ble.js.map +1 -1
  48. package/build/p2p/error.d.ts +24 -24
  49. package/build/p2p/error.js +67 -67
  50. package/build/p2p/index.d.ts +8 -8
  51. package/build/p2p/index.js +27 -27
  52. package/build/p2p/interfaces.d.ts +162 -162
  53. package/build/p2p/interfaces.js +2 -2
  54. package/build/p2p/models.d.ts +146 -146
  55. package/build/p2p/models.js +2 -2
  56. package/build/p2p/session.d.ts +168 -168
  57. package/build/p2p/session.js +2087 -2087
  58. package/build/p2p/session.js.map +1 -1
  59. package/build/p2p/talkback.d.ts +10 -10
  60. package/build/p2p/talkback.js +22 -22
  61. package/build/p2p/types.d.ts +923 -923
  62. package/build/p2p/types.js +957 -957
  63. package/build/p2p/utils.d.ts +56 -56
  64. package/build/p2p/utils.js +653 -653
  65. package/build/push/client.d.ts +51 -51
  66. package/build/push/client.js +311 -311
  67. package/build/push/client.js.map +1 -1
  68. package/build/push/index.d.ts +5 -5
  69. package/build/push/index.js +24 -24
  70. package/build/push/interfaces.d.ts +19 -19
  71. package/build/push/interfaces.js +2 -2
  72. package/build/push/models.d.ts +292 -292
  73. package/build/push/models.js +30 -30
  74. package/build/push/parser.d.ts +28 -28
  75. package/build/push/parser.js +215 -215
  76. package/build/push/parser.js.map +1 -1
  77. package/build/push/service.d.ts +45 -45
  78. package/build/push/service.js +643 -643
  79. package/build/push/service.js.map +1 -1
  80. package/build/push/types.d.ts +176 -176
  81. package/build/push/types.js +192 -192
  82. package/build/push/utils.d.ts +7 -7
  83. package/build/push/utils.js +102 -102
  84. package/build/utils.d.ts +16 -13
  85. package/build/utils.js +207 -191
  86. package/build/utils.js.map +1 -1
  87. package/package.json +10 -10
@@ -1,146 +1,146 @@
1
- /// <reference types="node" />
2
- import { PropertyValue } from "../http";
3
- import { CommandName, PropertyName } from "../http/types";
4
- import { SmartSafeEventValueDetail } from "../push/models";
5
- import { CommandType } from "./types";
6
- export interface Address {
7
- host: string;
8
- port: number;
9
- }
10
- export interface CmdCameraInfoResponse {
11
- params: Array<{
12
- dev_type: number;
13
- param_type: number;
14
- param_value: string;
15
- }>;
16
- main_sw_version: string;
17
- sec_sw_version: string;
18
- }
19
- export interface PropertyData {
20
- name: PropertyName;
21
- value: PropertyValue;
22
- }
23
- export interface CommandData {
24
- name: CommandName;
25
- value?: any;
26
- }
27
- export interface CustomData {
28
- property?: PropertyData;
29
- command?: CommandData;
30
- }
31
- export interface CommandResult {
32
- customData?: CustomData;
33
- command_type: CommandType;
34
- channel: number;
35
- return_code: number;
36
- }
37
- export interface CmdNotifyPayload {
38
- cmd: number;
39
- payload: ESLStationP2PThroughData | ESLAdvancedLockStatusNotification | SmartSafeSettingsNotification | SmartSafeStatusNotification | ESLBleV12P2PThroughData | string;
40
- payloadLen?: number;
41
- }
42
- export interface ESLStationP2PThroughData {
43
- channel?: number;
44
- lock_cmd: number;
45
- lock_payload: string;
46
- seq_num?: number;
47
- stationSn?: string;
48
- }
49
- export interface ESLAdvancedLockStatusNotification {
50
- code: number;
51
- slBattery: string;
52
- slState: string;
53
- trigger: number;
54
- }
55
- export interface SmartSafeSettingsNotification {
56
- data: string;
57
- prj_id: number;
58
- }
59
- export interface SmartSafeStatusNotification {
60
- event_type: number;
61
- event_time: number;
62
- event_value: number | SmartSafeEventValueDetail;
63
- }
64
- export interface SmartSafeNotificationResponse {
65
- versionCode: number;
66
- commandCode: number;
67
- packageFlag: number;
68
- dataType: number;
69
- responseCode: number;
70
- data: Buffer;
71
- }
72
- export interface LockAdvancedOnOffRequestPayload {
73
- shortUserId: string;
74
- slOperation: number;
75
- userId: string;
76
- userName: string;
77
- seq_num: number;
78
- }
79
- export interface AdvancedLockSetParamsType {
80
- [index: string]: unknown;
81
- autoLockTime: number;
82
- isAutoLock: number;
83
- isLockNotification: number;
84
- isNotification: number;
85
- isOneTouchLock: number;
86
- isSchedule: number;
87
- isScramblePasscode: number;
88
- isUnLockNotification: number;
89
- isWrongTryProtect: number;
90
- lockDownTime: number;
91
- lockSound: number;
92
- paramType: number;
93
- scheduleEnd: string;
94
- scheduleStart: string;
95
- wrongTryTime: number;
96
- seq_num: number;
97
- }
98
- export interface LockP2PCommandType {
99
- commandType: CommandType;
100
- value: string;
101
- channel: number;
102
- aesKey: string;
103
- }
104
- export interface LockP2PCommandPayloadType {
105
- key: string;
106
- account_id: string;
107
- cmd: CommandType;
108
- mChannel: number;
109
- mValue3: number;
110
- payload: string;
111
- }
112
- export interface ESLBleV12P2PThroughData {
113
- dev_sn: string;
114
- lock_payload: string;
115
- }
116
- export interface LockV12P2PCommandPayloadType {
117
- account_id: string;
118
- cmd: CommandType;
119
- mChannel: number;
120
- mValue3: number;
121
- payload: {
122
- apiCommand: number;
123
- lock_payload: string;
124
- seq_num: number;
125
- };
126
- }
127
- export interface LockV12P2PCommandType {
128
- commandType: CommandType;
129
- value: string;
130
- }
131
- export interface SmartSafeP2PCommandPayloadType {
132
- account_id: string;
133
- cmd: CommandType;
134
- mChannel: number;
135
- mValue3: number;
136
- payload: {
137
- data: string;
138
- prj_id: CommandType;
139
- seq_num: number;
140
- };
141
- }
142
- export interface SmartSafeP2PCommandType {
143
- commandType: CommandType;
144
- value: string;
145
- channel: number;
146
- }
1
+ /// <reference types="node" />
2
+ import { PropertyValue } from "../http";
3
+ import { CommandName, PropertyName } from "../http/types";
4
+ import { SmartSafeEventValueDetail } from "../push/models";
5
+ import { CommandType } from "./types";
6
+ export interface Address {
7
+ host: string;
8
+ port: number;
9
+ }
10
+ export interface CmdCameraInfoResponse {
11
+ params: Array<{
12
+ dev_type: number;
13
+ param_type: number;
14
+ param_value: string;
15
+ }>;
16
+ main_sw_version: string;
17
+ sec_sw_version: string;
18
+ }
19
+ export interface PropertyData {
20
+ name: PropertyName;
21
+ value: PropertyValue;
22
+ }
23
+ export interface CommandData {
24
+ name: CommandName;
25
+ value?: any;
26
+ }
27
+ export interface CustomData {
28
+ property?: PropertyData;
29
+ command?: CommandData;
30
+ }
31
+ export interface CommandResult {
32
+ customData?: CustomData;
33
+ command_type: CommandType;
34
+ channel: number;
35
+ return_code: number;
36
+ }
37
+ export interface CmdNotifyPayload {
38
+ cmd: number;
39
+ payload: ESLStationP2PThroughData | ESLAdvancedLockStatusNotification | SmartSafeSettingsNotification | SmartSafeStatusNotification | ESLBleV12P2PThroughData | string;
40
+ payloadLen?: number;
41
+ }
42
+ export interface ESLStationP2PThroughData {
43
+ channel?: number;
44
+ lock_cmd: number;
45
+ lock_payload: string;
46
+ seq_num?: number;
47
+ stationSn?: string;
48
+ }
49
+ export interface ESLAdvancedLockStatusNotification {
50
+ code: number;
51
+ slBattery: string;
52
+ slState: string;
53
+ trigger: number;
54
+ }
55
+ export interface SmartSafeSettingsNotification {
56
+ data: string;
57
+ prj_id: number;
58
+ }
59
+ export interface SmartSafeStatusNotification {
60
+ event_type: number;
61
+ event_time: number;
62
+ event_value: number | SmartSafeEventValueDetail;
63
+ }
64
+ export interface SmartSafeNotificationResponse {
65
+ versionCode: number;
66
+ commandCode: number;
67
+ packageFlag: number;
68
+ dataType: number;
69
+ responseCode: number;
70
+ data: Buffer;
71
+ }
72
+ export interface LockAdvancedOnOffRequestPayload {
73
+ shortUserId: string;
74
+ slOperation: number;
75
+ userId: string;
76
+ userName: string;
77
+ seq_num: number;
78
+ }
79
+ export interface AdvancedLockSetParamsType {
80
+ [index: string]: unknown;
81
+ autoLockTime: number;
82
+ isAutoLock: number;
83
+ isLockNotification: number;
84
+ isNotification: number;
85
+ isOneTouchLock: number;
86
+ isSchedule: number;
87
+ isScramblePasscode: number;
88
+ isUnLockNotification: number;
89
+ isWrongTryProtect: number;
90
+ lockDownTime: number;
91
+ lockSound: number;
92
+ paramType: number;
93
+ scheduleEnd: string;
94
+ scheduleStart: string;
95
+ wrongTryTime: number;
96
+ seq_num: number;
97
+ }
98
+ export interface LockP2PCommandType {
99
+ commandType: CommandType;
100
+ value: string;
101
+ channel: number;
102
+ aesKey: string;
103
+ }
104
+ export interface LockP2PCommandPayloadType {
105
+ key: string;
106
+ account_id: string;
107
+ cmd: CommandType;
108
+ mChannel: number;
109
+ mValue3: number;
110
+ payload: string;
111
+ }
112
+ export interface ESLBleV12P2PThroughData {
113
+ dev_sn: string;
114
+ lock_payload: string;
115
+ }
116
+ export interface LockV12P2PCommandPayloadType {
117
+ account_id: string;
118
+ cmd: CommandType;
119
+ mChannel: number;
120
+ mValue3: number;
121
+ payload: {
122
+ apiCommand: number;
123
+ lock_payload: string;
124
+ seq_num: number;
125
+ };
126
+ }
127
+ export interface LockV12P2PCommandType {
128
+ commandType: CommandType;
129
+ value: string;
130
+ }
131
+ export interface SmartSafeP2PCommandPayloadType {
132
+ account_id: string;
133
+ cmd: CommandType;
134
+ mChannel: number;
135
+ mValue3: number;
136
+ payload: {
137
+ data: string;
138
+ prj_id: CommandType;
139
+ seq_num: number;
140
+ };
141
+ }
142
+ export interface SmartSafeP2PCommandType {
143
+ commandType: CommandType;
144
+ value: string;
145
+ channel: number;
146
+ }
@@ -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,168 +1,168 @@
1
- import { TypedEmitter } from "tiny-typed-emitter";
2
- import * as NodeRSA from "node-rsa";
3
- import { Address, CustomData } from "./models";
4
- import { CommandType, P2PDataType, P2PConnectionType } from "./types";
5
- import { P2PClientProtocolEvents, P2PCommand } from "./interfaces";
6
- import { StationListResponse } from "../http/models";
7
- import { HTTPApi } from "../http/api";
8
- export declare class P2PClientProtocol extends TypedEmitter<P2PClientProtocolEvents> {
9
- private readonly MAX_RETRIES;
10
- private readonly MAX_COMMAND_RESULT_WAIT;
11
- private readonly MAX_AKNOWLEDGE_TIMEOUT;
12
- private readonly MAX_LOOKUP_TIMEOUT;
13
- private readonly LOOKUP_RETRY_TIMEOUT;
14
- private readonly MAX_EXPECTED_SEQNO_WAIT;
15
- private readonly HEARTBEAT_INTERVAL;
16
- private readonly MAX_COMMAND_QUEUE_TIMEOUT;
17
- private readonly AUDIO_CODEC_ANALYZE_TIMEOUT;
18
- private readonly KEEPALIVE_INTERVAL;
19
- private readonly ESD_DISCONNECT_TIMEOUT;
20
- private readonly MAX_STREAM_DATA_WAIT;
21
- private readonly RESEND_NOT_ACKNOWLEDGED_COMMAND;
22
- private readonly UDP_RECVBUFFERSIZE_BYTES;
23
- private readonly MAX_PAYLOAD_BYTES;
24
- private readonly MAX_PACKET_BYTES;
25
- private readonly MAX_VIDEO_PACKET_BYTES;
26
- private readonly P2P_DATA_HEADER_BYTES;
27
- private readonly MAX_SEQUENCE_NUMBER;
28
- private readonly SEQUENCE_PROCESSING_BOUNDARY;
29
- private socket;
30
- private binded;
31
- private connected;
32
- private connecting;
33
- private terminating;
34
- private seqNumber;
35
- private offsetDataSeqNumber;
36
- private videoSeqNumber;
37
- private lockSeqNumber;
38
- private expectedSeqNo;
39
- private currentMessageBuilder;
40
- private currentMessageState;
41
- private talkbackStream?;
42
- private downloadTotalBytes;
43
- private downloadReceivedBytes;
44
- private cloudAddresses;
45
- private messageStates;
46
- private messageVideoStates;
47
- private sendQueue;
48
- private connectTimeout?;
49
- private lookupTimeout?;
50
- private lookupRetryTimeout?;
51
- private heartbeatTimeout?;
52
- private keepaliveTimeout?;
53
- private esdDisconnectTimeout?;
54
- private secondaryCommandTimeout?;
55
- private connectTime;
56
- private lastPong;
57
- private lastPongData;
58
- private connectionType;
59
- private energySavingDevice;
60
- private energySavingDeviceP2PSeqMapping;
61
- private energySavingDeviceP2PDataSeqNumber;
62
- private connectAddress;
63
- private localIPAddress;
64
- private preferredIPAddress;
65
- private dskKey;
66
- private dskExpiration;
67
- private log;
68
- private deviceSNs;
69
- private api;
70
- private rawStation;
71
- private lastCustomData?;
72
- private lastChannel?;
73
- private lockPublicKey;
74
- private lockAESKeys;
75
- private channel;
76
- constructor(rawStation: StationListResponse, api: HTTPApi, ipAddress?: string, publicKey?: string);
77
- private _incrementSequence;
78
- private _isBetween;
79
- private _wasSequenceNumberAlreadyProcessed;
80
- private _initialize;
81
- private initializeMessageBuilder;
82
- private initializeMessageState;
83
- private _clearTimeout;
84
- private _clearMessageStateTimeouts;
85
- private _clearMessageVideoStateTimeouts;
86
- private _clearHeartbeatTimeout;
87
- private _clearKeepaliveTimeout;
88
- private _clearConnectTimeout;
89
- private _clearLookupTimeout;
90
- private _clearLookupRetryTimeout;
91
- private _clearESDDisconnectTimeout;
92
- private _clearSecondaryCommandTimeout;
93
- private sendMessage;
94
- private _disconnected;
95
- private closeEnergySavingDevice;
96
- private renewDSKKey;
97
- private localLookup;
98
- private cloudLookup;
99
- private cloudLookup2;
100
- private localLookupByAddress;
101
- private cloudLookupByAddress;
102
- private cloudLookupByAddress2;
103
- private cloudLookupByAddress3;
104
- isConnected(): boolean;
105
- private _startConnectTimeout;
106
- private _connect;
107
- private lookup;
108
- connect(host?: string): Promise<void>;
109
- private sendCamCheck;
110
- private sendCamCheck2;
111
- sendPing(address: Address): Promise<void>;
112
- sendCommandWithIntString(p2pcommand: P2PCommand, customData?: CustomData): void;
113
- sendCommandWithInt(p2pcommand: P2PCommand, customData?: CustomData): void;
114
- sendCommandWithStringPayload(p2pcommand: P2PCommand, customData?: CustomData): void;
115
- sendCommandWithString(p2pcommand: P2PCommand, customData?: CustomData): void;
116
- sendCommandPing(channel?: number): void;
117
- sendCommandDevicePing(channel?: number): void;
118
- sendCommandWithoutData(commandType: CommandType, channel?: number): void;
119
- private sendQueuedMessage;
120
- private sendCommand;
121
- private resendNotAcknowledgedCommand;
122
- private _sendCommand;
123
- private handleMsg;
124
- private parseDataMessage;
125
- private handleData;
126
- private isIFrame;
127
- private waitForStreamData;
128
- private handleDataBinaryAndVideo;
129
- private handleDataControl;
130
- private sendAck;
131
- private getDataType;
132
- close(): Promise<void>;
133
- private getHeartbeatInterval;
134
- private onClose;
135
- private onError;
136
- private scheduleHeartbeat;
137
- private scheduleP2PKeepalive;
138
- getDownloadRSAPrivateKey(): NodeRSA;
139
- setDownloadRSAPrivateKeyPem(pem: string): void;
140
- getRSAPrivateKey(): NodeRSA | null;
141
- private initializeStream;
142
- private endStream;
143
- private endRTSPStream;
144
- private emitStreamStartEvent;
145
- private emitStreamStopEvent;
146
- isStreaming(channel: number, datatype: P2PDataType): boolean;
147
- isLiveStreaming(channel: number): boolean;
148
- private isCurrentlyStreaming;
149
- isRTSPLiveStreaming(channel: number): boolean;
150
- isDownloading(channel: number): boolean;
151
- getLockSequenceNumber(): number;
152
- incLockSequenceNumber(): number;
153
- setConnectionType(type: P2PConnectionType): void;
154
- getConnectionType(): P2PConnectionType;
155
- isEnergySavingDevice(): boolean;
156
- private getDSKKeys;
157
- updateRawStation(value: StationListResponse): void;
158
- private initializeTalkbackStream;
159
- private sendTalkbackAudioFrame;
160
- private onTalkbackStreamClose;
161
- private onTalkbackStreamError;
162
- private _sendVideoData;
163
- isTalkbackOngoing(channel: number): boolean;
164
- startTalkback(channel?: number): void;
165
- stopTalkback(channel?: number): void;
166
- setLockAESKey(commandCode: number, aesKey: string): void;
167
- getLockAESKey(commandCode: number): string | undefined;
168
- }
1
+ import { TypedEmitter } from "tiny-typed-emitter";
2
+ import * as NodeRSA from "node-rsa";
3
+ import { Address, CustomData } from "./models";
4
+ import { CommandType, P2PDataType, P2PConnectionType } from "./types";
5
+ import { P2PClientProtocolEvents, P2PCommand } from "./interfaces";
6
+ import { StationListResponse } from "../http/models";
7
+ import { HTTPApi } from "../http/api";
8
+ export declare class P2PClientProtocol extends TypedEmitter<P2PClientProtocolEvents> {
9
+ private readonly MAX_RETRIES;
10
+ private readonly MAX_COMMAND_RESULT_WAIT;
11
+ private readonly MAX_AKNOWLEDGE_TIMEOUT;
12
+ private readonly MAX_LOOKUP_TIMEOUT;
13
+ private readonly LOOKUP_RETRY_TIMEOUT;
14
+ private readonly MAX_EXPECTED_SEQNO_WAIT;
15
+ private readonly HEARTBEAT_INTERVAL;
16
+ private readonly MAX_COMMAND_QUEUE_TIMEOUT;
17
+ private readonly AUDIO_CODEC_ANALYZE_TIMEOUT;
18
+ private readonly KEEPALIVE_INTERVAL;
19
+ private readonly ESD_DISCONNECT_TIMEOUT;
20
+ private readonly MAX_STREAM_DATA_WAIT;
21
+ private readonly RESEND_NOT_ACKNOWLEDGED_COMMAND;
22
+ private readonly UDP_RECVBUFFERSIZE_BYTES;
23
+ private readonly MAX_PAYLOAD_BYTES;
24
+ private readonly MAX_PACKET_BYTES;
25
+ private readonly MAX_VIDEO_PACKET_BYTES;
26
+ private readonly P2P_DATA_HEADER_BYTES;
27
+ private readonly MAX_SEQUENCE_NUMBER;
28
+ private readonly SEQUENCE_PROCESSING_BOUNDARY;
29
+ private socket;
30
+ private binded;
31
+ private connected;
32
+ private connecting;
33
+ private terminating;
34
+ private seqNumber;
35
+ private offsetDataSeqNumber;
36
+ private videoSeqNumber;
37
+ private lockSeqNumber;
38
+ private expectedSeqNo;
39
+ private currentMessageBuilder;
40
+ private currentMessageState;
41
+ private talkbackStream?;
42
+ private downloadTotalBytes;
43
+ private downloadReceivedBytes;
44
+ private cloudAddresses;
45
+ private messageStates;
46
+ private messageVideoStates;
47
+ private sendQueue;
48
+ private connectTimeout?;
49
+ private lookupTimeout?;
50
+ private lookupRetryTimeout?;
51
+ private heartbeatTimeout?;
52
+ private keepaliveTimeout?;
53
+ private esdDisconnectTimeout?;
54
+ private secondaryCommandTimeout?;
55
+ private connectTime;
56
+ private lastPong;
57
+ private lastPongData;
58
+ private connectionType;
59
+ private energySavingDevice;
60
+ private energySavingDeviceP2PSeqMapping;
61
+ private energySavingDeviceP2PDataSeqNumber;
62
+ private connectAddress;
63
+ private localIPAddress;
64
+ private preferredIPAddress;
65
+ private dskKey;
66
+ private dskExpiration;
67
+ private log;
68
+ private deviceSNs;
69
+ private api;
70
+ private rawStation;
71
+ private lastCustomData?;
72
+ private lastChannel?;
73
+ private lockPublicKey;
74
+ private lockAESKeys;
75
+ private channel;
76
+ constructor(rawStation: StationListResponse, api: HTTPApi, ipAddress?: string, publicKey?: string);
77
+ private _incrementSequence;
78
+ private _isBetween;
79
+ private _wasSequenceNumberAlreadyProcessed;
80
+ private _initialize;
81
+ private initializeMessageBuilder;
82
+ private initializeMessageState;
83
+ private _clearTimeout;
84
+ private _clearMessageStateTimeouts;
85
+ private _clearMessageVideoStateTimeouts;
86
+ private _clearHeartbeatTimeout;
87
+ private _clearKeepaliveTimeout;
88
+ private _clearConnectTimeout;
89
+ private _clearLookupTimeout;
90
+ private _clearLookupRetryTimeout;
91
+ private _clearESDDisconnectTimeout;
92
+ private _clearSecondaryCommandTimeout;
93
+ private sendMessage;
94
+ private _disconnected;
95
+ private closeEnergySavingDevice;
96
+ private renewDSKKey;
97
+ private localLookup;
98
+ private cloudLookup;
99
+ private cloudLookup2;
100
+ private localLookupByAddress;
101
+ private cloudLookupByAddress;
102
+ private cloudLookupByAddress2;
103
+ private cloudLookupByAddress3;
104
+ isConnected(): boolean;
105
+ private _startConnectTimeout;
106
+ private _connect;
107
+ private lookup;
108
+ connect(host?: string): Promise<void>;
109
+ private sendCamCheck;
110
+ private sendCamCheck2;
111
+ sendPing(address: Address): Promise<void>;
112
+ sendCommandWithIntString(p2pcommand: P2PCommand, customData?: CustomData): void;
113
+ sendCommandWithInt(p2pcommand: P2PCommand, customData?: CustomData): void;
114
+ sendCommandWithStringPayload(p2pcommand: P2PCommand, customData?: CustomData): void;
115
+ sendCommandWithString(p2pcommand: P2PCommand, customData?: CustomData): void;
116
+ sendCommandPing(channel?: number): void;
117
+ sendCommandDevicePing(channel?: number): void;
118
+ sendCommandWithoutData(commandType: CommandType, channel?: number): void;
119
+ private sendQueuedMessage;
120
+ private sendCommand;
121
+ private resendNotAcknowledgedCommand;
122
+ private _sendCommand;
123
+ private handleMsg;
124
+ private parseDataMessage;
125
+ private handleData;
126
+ private isIFrame;
127
+ private waitForStreamData;
128
+ private handleDataBinaryAndVideo;
129
+ private handleDataControl;
130
+ private sendAck;
131
+ private getDataType;
132
+ close(): Promise<void>;
133
+ private getHeartbeatInterval;
134
+ private onClose;
135
+ private onError;
136
+ private scheduleHeartbeat;
137
+ private scheduleP2PKeepalive;
138
+ getDownloadRSAPrivateKey(): NodeRSA;
139
+ setDownloadRSAPrivateKeyPem(pem: string): void;
140
+ getRSAPrivateKey(): NodeRSA | null;
141
+ private initializeStream;
142
+ private endStream;
143
+ private endRTSPStream;
144
+ private emitStreamStartEvent;
145
+ private emitStreamStopEvent;
146
+ isStreaming(channel: number, datatype: P2PDataType): boolean;
147
+ isLiveStreaming(channel: number): boolean;
148
+ private isCurrentlyStreaming;
149
+ isRTSPLiveStreaming(channel: number): boolean;
150
+ isDownloading(channel: number): boolean;
151
+ getLockSequenceNumber(): number;
152
+ incLockSequenceNumber(): number;
153
+ setConnectionType(type: P2PConnectionType): void;
154
+ getConnectionType(): P2PConnectionType;
155
+ isEnergySavingDevice(): boolean;
156
+ private getDSKKeys;
157
+ updateRawStation(value: StationListResponse): void;
158
+ private initializeTalkbackStream;
159
+ private sendTalkbackAudioFrame;
160
+ private onTalkbackStreamClose;
161
+ private onTalkbackStreamError;
162
+ private _sendVideoData;
163
+ isTalkbackOngoing(channel: number): boolean;
164
+ startTalkback(channel?: number): void;
165
+ stopTalkback(channel?: number): void;
166
+ setLockAESKey(commandCode: number, aesKey: string): void;
167
+ getLockAESKey(commandCode: number): string | undefined;
168
+ }