eufy-security-client 2.4.0 → 2.4.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.
@@ -9,6 +9,9 @@ import { CommandResult } from "./p2p/models";
9
9
  import { TalkbackStream } from "./p2p/talkback";
10
10
  import { AlarmEvent, SmartSafeAlarm911Event, SmartSafeShakeAlarmEvent } from "./p2p/types";
11
11
  import { Credentials, PushMessage } from "./push/models";
12
+ export interface StationIPAddresses {
13
+ [index: string]: string;
14
+ }
12
15
  export interface EufySecurityConfig {
13
16
  username: string;
14
17
  password: string;
@@ -20,6 +23,7 @@ export interface EufySecurityConfig {
20
23
  pollingIntervalMinutes: number;
21
24
  eventDurationSeconds: number;
22
25
  acceptInvitations?: boolean;
26
+ stationIPAddresses?: StationIPAddresses;
23
27
  }
24
28
  export interface EufySecurityPersistentData {
25
29
  country: string;
@@ -40,6 +40,7 @@ export interface P2PClientProtocolEvents {
40
40
  "shake alarm": (channel: number, detail: SmartSafeShakeAlarmEvent) => void;
41
41
  "911 alarm": (channel: number, detail: SmartSafeAlarm911Event) => void;
42
42
  "wrong try-protect alarm": (channel: number) => void;
43
+ "sd info ex": (sdStatus: number, sdCapacity: number, sdCapacityAvailable: number) => void;
43
44
  }
44
45
  export interface P2PQueueMessage {
45
46
  commandType: CommandType;
@@ -54,12 +54,14 @@ export declare class P2PClientProtocol extends TypedEmitter<P2PClientProtocolEve
54
54
  private secondaryCommandTimeout?;
55
55
  private connectTime;
56
56
  private lastPong;
57
+ private lastPongData;
57
58
  private connectionType;
58
59
  private energySavingDevice;
59
60
  private energySavingDeviceP2PSeqMapping;
60
61
  private energySavingDeviceP2PDataSeqNumber;
61
62
  private connectAddress;
62
63
  private localIPAddress;
64
+ private preferredIPAddress;
63
65
  private dskKey;
64
66
  private dskExpiration;
65
67
  private log;
@@ -71,7 +73,7 @@ export declare class P2PClientProtocol extends TypedEmitter<P2PClientProtocolEve
71
73
  private lockPublicKey;
72
74
  private lockAESKeys;
73
75
  private channel;
74
- constructor(rawStation: StationListResponse, api: HTTPApi, publicKey?: string);
76
+ constructor(rawStation: StationListResponse, api: HTTPApi, ipAddress?: string, publicKey?: string);
75
77
  private _incrementSequence;
76
78
  private _isBetween;
77
79
  private _wasSequenceNumberAlreadyProcessed;