@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.
@@ -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, never transport
52
- * fields a live session hasn't produced.
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[];
@@ -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 a HomeBase. `RESTART_HUB` (1034) is a station-scalar on the broadcast channel 255: a
262
- * level-2 frame whose body is `[u32 value][account_id padded]` — the same shape as the hub
263
- * alarm-volume control. ✅ Wire-confirmed byte-exact from a capture of the app's own Restart
264
- * (2026-08-03) and HW-tested: the captured frame carried value `0` and rebooted the hub. Replays
265
- * like every other level-2 control, so a single dropped datagram doesn't lose it.
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.7",
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",