@mega-yfue/eufy-sdk 0.5.0-beta.7 → 0.5.0-beta.9
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 +13 -4
- package/dist/index.js +54 -17
- package/dist/index.js.map +2 -2
- package/dist/model/registry.d.ts +3 -2
- package/dist/model/types.d.ts +6 -0
- package/dist/transport/p2p/command-router.d.ts +8 -5
- package/dist/transport/p2p/p2p-session.d.ts +5 -0
- package/package.json +1 -1
package/dist/model/registry.d.ts
CHANGED
|
@@ -48,7 +48,8 @@ export declare function resolveDevice(rec: CloudRecord): ResolvedDevice;
|
|
|
48
48
|
* The property manifest for a device, from its capabilities and the record's facts. The single place
|
|
49
49
|
* an {@link AvailabilityContext} is built — so a family-gate (`available`) and a per-model enum
|
|
50
50
|
* (`enumValuesFor`) are decided from the same truthful, session-free view on every path (initial
|
|
51
|
-
* resolve and {@link Device.reresolve}). Populated only from what a record carries
|
|
52
|
-
*
|
|
51
|
+
* resolve and {@link Device.reresolve}). Populated only from what a record carries: its cloud params and
|
|
52
|
+
* the params its device reported over realtime, the same evidence a bound getter is gated on. Never
|
|
53
|
+
* transport fields a live session hasn't produced.
|
|
53
54
|
*/
|
|
54
55
|
export declare function resolveProperties(rec: CloudRecord, codec: Codec, capabilities: Capability[]): PropertySpec[];
|
package/dist/model/types.d.ts
CHANGED
|
@@ -286,6 +286,12 @@ export interface CloudRecord {
|
|
|
286
286
|
parentSn?: string;
|
|
287
287
|
/** Reported param_type → raw value. Presence of a param is a capability signal. */
|
|
288
288
|
params?: Record<number, string>;
|
|
289
|
+
/**
|
|
290
|
+
* Params the device reported over its realtime channel, keyed in the device's own namespace. A line
|
|
291
|
+
* whose state exists only on that channel carries none of it in {@link params}, so this is the
|
|
292
|
+
* evidence an availability gate on such a param is decided from.
|
|
293
|
+
*/
|
|
294
|
+
dpParams?: Record<number, string>;
|
|
289
295
|
}
|
|
290
296
|
/** The fully-resolved device shape produced by the 3-tier resolver. */
|
|
291
297
|
export interface ResolvedDevice {
|
|
@@ -258,11 +258,14 @@ export declare class P2PCommandRouter {
|
|
|
258
258
|
*/
|
|
259
259
|
dispatchCommand(sn: string, cmd: Command): Promise<void>;
|
|
260
260
|
/**
|
|
261
|
-
* Restart
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
*
|
|
261
|
+
* Restart the station that owns `sn`'s P2P session. `RESTART_HUB` (1034) is a station-scalar on the
|
|
262
|
+
* broadcast channel 255 whose body is `[u32 value][account_id padded]`, value `0`. ✅ Wire-confirmed
|
|
263
|
+
* byte-exact as a level-2 frame from a capture of the app's own HomeBase Restart (2026-08-03).
|
|
264
|
+
*
|
|
265
|
+
* The seal follows the session, as {@link sendBySessionLevel} defines it: a keyed session takes the
|
|
266
|
+
* level-2 frame, a keyless one — a standalone camera, which never negotiates a key — the same body
|
|
267
|
+
* sealed level-1. Both are replayed {@link DIRECT_CMD_SENDS}× at 200ms, as every other unacknowledged
|
|
268
|
+
* control here is.
|
|
266
269
|
*/
|
|
267
270
|
rebootStation(sn: string): Promise<void>;
|
|
268
271
|
/**
|
|
@@ -435,6 +435,11 @@ export declare class P2PSession extends EventEmitter {
|
|
|
435
435
|
* "direct" commands (e.g. CAMERA_SWITCH 1035) carry a binary struct, not JSON.
|
|
436
436
|
*/
|
|
437
437
|
sendRawLevel2Bytes(payload: Buffer, channel: number, outerCmd?: number, signCode?: number): boolean;
|
|
438
|
+
/**
|
|
439
|
+
* The level-1 twin of {@link sendRawLevel2Bytes}: the plaintext `payload` sealed AES-128-ECB under the
|
|
440
|
+
* level-1 key, signCode 1 — the seal of the level-1 media start. Returns `false` when not connected.
|
|
441
|
+
*/
|
|
442
|
+
sendRawLevel1Bytes(payload: Buffer, channel: number, outerCmd: number): boolean;
|
|
438
443
|
/**
|
|
439
444
|
* Stop the realtime media stream (`CMD_STOP_REALTIME_MEDIA`, 1004) on a camera `channel`, in the shape
|
|
440
445
|
* its runtime topology takes, as {@link startLiveMedia} selects its start:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mega-yfue/eufy-sdk",
|
|
3
|
-
"version": "0.5.0-beta.
|
|
3
|
+
"version": "0.5.0-beta.9",
|
|
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",
|