@mega-yfue/eufy-sdk 0.6.0-beta.5 → 0.6.0-beta.6
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.
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The bound a caller waits for the level-2 negotiation to SETTLE, measured from connect.
|
|
3
|
+
*
|
|
4
|
+
* For a caller that picks its seal once from `P2PSession.hasLevel2Key` and has no second chance. A media
|
|
5
|
+
* start reads the key on every send and is re-issued by the warm-up, so it needs no wait; a property write
|
|
6
|
+
* framed level-1 to a family that only accepts level-2 is ignored, and nothing re-frames it. Session-scoped,
|
|
7
|
+
* so a station that offers no key does not charge this to every later command.
|
|
8
|
+
*/
|
|
9
|
+
export declare const LEVEL2_SETTLE_MS = 8000;
|
|
@@ -676,6 +676,12 @@ export declare class P2PSession extends EventEmitter {
|
|
|
676
676
|
query?: Record<string, unknown>;
|
|
677
677
|
innerCmd?: number;
|
|
678
678
|
}): void;
|
|
679
|
+
/**
|
|
680
|
+
* The `CMD_SET_PAYLOAD` payload of a database read or stored-image request: the JSON level-1 encrypted, or
|
|
681
|
+
* in the clear with header bytes from {@link nextClearCommandBytes} on a session that {@link sendsInTheClear}
|
|
682
|
+
* and holds no level-2 key.
|
|
683
|
+
*/
|
|
684
|
+
private databasePayload;
|
|
679
685
|
/**
|
|
680
686
|
* Standard "give me the whole table" query params the eufy app uses for a direct
|
|
681
687
|
* `CMD_DATABASE` read (inner `cmd 10000`). `count` bounds the row count.
|
|
@@ -719,6 +725,9 @@ export declare class P2PSession extends EventEmitter {
|
|
|
719
725
|
*
|
|
720
726
|
* One read at a time per session: while one is accumulating, every {@link queryDatabase} on the
|
|
721
727
|
* session throws, so a second reply cannot land in this buffer.
|
|
728
|
+
*
|
|
729
|
+
* The query's framing follows the cipher the gateway-info reply names, so on a session still negotiating
|
|
730
|
+
* its level-2 key the query waits for that to settle, up to {@link LEVEL2_SETTLE_MS} from connect.
|
|
722
731
|
*/
|
|
723
732
|
readDatabase(table: string, opts?: {
|
|
724
733
|
accountId?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mega-yfue/eufy-sdk",
|
|
3
|
-
"version": "0.6.0-beta.
|
|
3
|
+
"version": "0.6.0-beta.6",
|
|
4
4
|
"description": "One typed TypeScript client for the Anker eufy v6 cloud — capability-driven devices, realtime events over P2P/MQTT/push, and live media",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "mega-yfue",
|