@mega-yfue/eufy-sdk 0.6.0-beta.0 → 0.6.0-beta.10
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 +4 -1
- package/dist/index.js +1890 -1847
- package/dist/index.js.map +4 -4
- package/dist/model/capabilities/arming.d.ts +1 -0
- package/dist/model/capabilities/camera.d.ts +3 -1
- package/dist/model/device-family.d.ts +1 -1
- package/dist/transport/p2p/command-router.d.ts +5 -1
- package/dist/transport/p2p/level2-settle.d.ts +9 -0
- package/dist/transport/p2p/p2p-session.d.ts +9 -0
- package/dist/transport/p2p/shared-live-source.d.ts +7 -2
- package/package.json +1 -1
|
@@ -204,6 +204,7 @@ export declare const ARMING_MEMBERS: {
|
|
|
204
204
|
* MODE_SWITCH carries no value. Live qualification on a standalone camera showed that authoritative
|
|
205
205
|
* readback requires a bounded cloud-list refresh, and that its P2P session must be reset after
|
|
206
206
|
* convergence before a following mode write; an attached device must never reset its shared HomeBase.
|
|
207
|
+
* A standalone T8423's level-1 session is kept open instead.
|
|
207
208
|
*/
|
|
208
209
|
readonly mode: {
|
|
209
210
|
readonly accepts: ArmingMode;
|
|
@@ -475,6 +475,8 @@ export declare const CAMERA_MEMBERS: {
|
|
|
475
475
|
*
|
|
476
476
|
* `transaction` is part of the frame that was captured, so it is sent. The recording sibling's own
|
|
477
477
|
* confirmed frame carries no such field; neither is inferred from the other.
|
|
478
|
+
*
|
|
479
|
+
* Not offered where the device reports the doorbell's own live-view quality (1705).
|
|
478
480
|
*/
|
|
479
481
|
readonly streamingQuality: {
|
|
480
482
|
readonly accepts: StreamingQualityName;
|
|
@@ -483,7 +485,7 @@ export declare const CAMERA_MEMBERS: {
|
|
|
483
485
|
readonly kind: "enum";
|
|
484
486
|
readonly enumValues: Readonly<Record<number, string>>;
|
|
485
487
|
readonly provenance: "verified";
|
|
486
|
-
readonly available:
|
|
488
|
+
readonly available: (ctx: AvailabilityContext) => boolean;
|
|
487
489
|
readonly args: readonly [{
|
|
488
490
|
readonly name: "quality";
|
|
489
491
|
readonly kind: "enum";
|
|
@@ -52,7 +52,7 @@ export declare const isHomeBase: (ctx: FamilyContext) => boolean;
|
|
|
52
52
|
export declare const isStation9000: (ctx: FamilyContext) => boolean;
|
|
53
53
|
/** T8N00 NVR, identified by its reported model. */
|
|
54
54
|
export declare const isNvrT8N00: (ctx: FamilyContext) => boolean;
|
|
55
|
-
/**
|
|
55
|
+
/** A camera attached to a T8N00 whose media the NVR's call serves. */
|
|
56
56
|
export declare const isNvrMediaCamera: (ctx: FamilyContext) => boolean;
|
|
57
57
|
/** PoE S4 camera with independently streamed fixed and movable optical views. */
|
|
58
58
|
export declare const isNvrDualLensCamera: (ctx: FamilyContext) => boolean;
|
|
@@ -171,7 +171,11 @@ export declare class P2PCommandRouter {
|
|
|
171
171
|
* serial itself if the device isn't loaded (a standalone device is its own station).
|
|
172
172
|
*/
|
|
173
173
|
stationKeyOf(sn: string): string;
|
|
174
|
-
/**
|
|
174
|
+
/**
|
|
175
|
+
* Reset only a standalone device's session; an attached device must not close its shared HomeBase.
|
|
176
|
+
*
|
|
177
|
+
* A {@link KEEP_LEVEL1_SESSION_MODELS} station whose open session holds no level-2 key is left open.
|
|
178
|
+
*/
|
|
175
179
|
resetStandaloneSession(sn: string): Promise<void>;
|
|
176
180
|
/**
|
|
177
181
|
* Open (or reuse) the P2P session for a station **on demand**, coalescing concurrent cold opens via
|
|
@@ -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;
|
|
@@ -376,8 +376,13 @@ export declare class SharedLiveSource {
|
|
|
376
376
|
private isKeyframe;
|
|
377
377
|
/**
|
|
378
378
|
* Handle a consumer leaving. When the last one detaches (1→0), release the station-session user via
|
|
379
|
-
* {@link SharedLiveSourceOptions.onIdle} (its own longer idle timer then arms) and
|
|
380
|
-
* linger teardown.
|
|
379
|
+
* {@link SharedLiveSourceOptions.onIdle} (its own longer idle timer then arms) and, while a stream is
|
|
380
|
+
* still running, arm its linger teardown.
|
|
381
|
+
*
|
|
382
|
+
* A source that ended its own stream ends its consumers before tearing down, and a Readable consumer
|
|
383
|
+
* detaches only once it has reached EOF — after that teardown. The source is then already `stopped`,
|
|
384
|
+
* with its session claim released, and stays so: lingering would make the owner hand it out again
|
|
385
|
+
* instead of building a source that holds a session.
|
|
381
386
|
*/
|
|
382
387
|
private onDetach;
|
|
383
388
|
/** Refcount hit zero — arm the linger teardown. A new attach in the window cancels it. */
|
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.10",
|
|
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",
|