@mega-yfue/eufy-sdk 0.4.0-beta.16 → 0.4.0-beta.17
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/dist/client/eufy-mega.d.ts +18 -2
- package/dist/client/types.d.ts +25 -0
- package/dist/index.js +129 -7
- package/dist/index.js.map +3 -3
- package/dist/transport/p2p/p2p-session.d.ts +23 -0
- package/package.json +1 -1
|
@@ -566,6 +566,10 @@ export declare class P2PSession extends EventEmitter {
|
|
|
566
566
|
* The HomeBase streams back `CMD_DATABASE` (1306) frames `{cmd:10000,count,data:[…]}`,
|
|
567
567
|
* level-1-encrypted — decoded and emitted as `dbChunk` (decrypted text) per frame.
|
|
568
568
|
* Tables: `familiar_faces`, `person_basic_info`, `event_person_list`, `history_record_info`.
|
|
569
|
+
*
|
|
570
|
+
* Throws while a {@link readDatabase} is accumulating: every table answers `{data:[…]}` and the
|
|
571
|
+
* frames tie no chunk to its request, so a second query's reply would be assembled into the first
|
|
572
|
+
* one's buffer and answered as its rows.
|
|
569
573
|
*/
|
|
570
574
|
queryDatabase(table: string, opts?: {
|
|
571
575
|
accountId?: string;
|
|
@@ -593,6 +597,25 @@ export declare class P2PSession extends EventEmitter {
|
|
|
593
597
|
accountId?: string;
|
|
594
598
|
channel?: number;
|
|
595
599
|
}): void;
|
|
600
|
+
/**
|
|
601
|
+
* Query one on-station table and answer its rows, once the reply is whole.
|
|
602
|
+
*
|
|
603
|
+
* The request half of {@link queryDatabase} with its reply assembled: `CMD_DATABASE` arrives as
|
|
604
|
+
* several frames whose decrypted text is a fragment of one document, so the fragments are
|
|
605
|
+
* accumulated here and scanned after each one. Answers that document's `data` rows. Rejects when
|
|
606
|
+
* `signal` aborts, and when `timeoutMs` (default {@link DB_TABLE_TIMEOUT_MS}) elapses with no
|
|
607
|
+
* complete reply.
|
|
608
|
+
*
|
|
609
|
+
* One read at a time per session: while one is accumulating, every {@link queryDatabase} on the
|
|
610
|
+
* session throws, so a second reply cannot land in this buffer.
|
|
611
|
+
*/
|
|
612
|
+
readDatabase(table: string, opts?: {
|
|
613
|
+
accountId?: string;
|
|
614
|
+
timeoutMs?: number;
|
|
615
|
+
signal?: AbortSignal;
|
|
616
|
+
}): Promise<unknown[]>;
|
|
617
|
+
/** Whether a {@link readDatabase} is accumulating; see {@link queryDatabase} for what it bars. */
|
|
618
|
+
private dbReadInFlight;
|
|
596
619
|
/**
|
|
597
620
|
* Request the **face feature rows** over P2P (`face_feature_info`, inner `cmd 10000`). Each row
|
|
598
621
|
* carries `{person_id, face_name, face_id, face_picture_content, face_feature_file_path}` — where
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mega-yfue/eufy-sdk",
|
|
3
|
-
"version": "0.4.0-beta.
|
|
3
|
+
"version": "0.4.0-beta.17",
|
|
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",
|