@mega-yfue/eufy-sdk 0.5.0-beta.9 → 0.5.0-beta.90

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.
Files changed (65) hide show
  1. package/dist/client/device-registry.d.ts +24 -2
  2. package/dist/client/eufy-mega.d.ts +73 -8
  3. package/dist/client/types.d.ts +1 -1
  4. package/dist/core/contracts.d.ts +96 -41
  5. package/dist/core/store.d.ts +4 -0
  6. package/dist/core/types.d.ts +2 -0
  7. package/dist/index.js +4152 -719
  8. package/dist/index.js.map +4 -4
  9. package/dist/model/capabilities/arming.d.ts +39 -4
  10. package/dist/model/capabilities/battery.d.ts +6 -1
  11. package/dist/model/capabilities/camera.d.ts +61 -18
  12. package/dist/model/capabilities/dp-catalog.d.ts +4 -3
  13. package/dist/model/capabilities/index.d.ts +17 -4
  14. package/dist/model/capabilities/keypad.d.ts +20 -23
  15. package/dist/model/capabilities/light.d.ts +3 -0
  16. package/dist/model/capabilities/lock.d.ts +42 -16
  17. package/dist/model/capabilities/motion.d.ts +17 -2
  18. package/dist/model/capabilities/mower.d.ts +230 -0
  19. package/dist/model/capabilities/rtsp.d.ts +16 -3
  20. package/dist/model/capabilities/smart-drop.d.ts +20 -0
  21. package/dist/model/capabilities/suction.d.ts +5 -5
  22. package/dist/model/capabilities/types.d.ts +10 -0
  23. package/dist/model/capabilities/vacuum-clean.d.ts +19 -13
  24. package/dist/model/classify.d.ts +1 -2
  25. package/dist/model/device-family.d.ts +24 -0
  26. package/dist/model/param-dictionary.d.ts +6 -0
  27. package/dist/model/param-namespace.d.ts +1 -1
  28. package/dist/model/types.d.ts +20 -12
  29. package/dist/transport/abortable.d.ts +8 -0
  30. package/dist/transport/http/mega-client.d.ts +43 -2
  31. package/dist/transport/mqtt/broker-discovery.d.ts +2 -1
  32. package/dist/transport/mqtt/command-router.d.ts +3 -2
  33. package/dist/transport/p2p/audio-frame.d.ts +14 -0
  34. package/dist/transport/p2p/codec.d.ts +32 -0
  35. package/dist/transport/p2p/command-router.d.ts +93 -31
  36. package/dist/transport/p2p/fmp4.d.ts +12 -2
  37. package/dist/transport/p2p/keyed-payload.d.ts +112 -0
  38. package/dist/transport/p2p/live-trace.d.ts +25 -2
  39. package/dist/transport/p2p/media.d.ts +3 -5
  40. package/dist/transport/p2p/p2p-session.d.ts +81 -12
  41. package/dist/transport/p2p/readable-egress.d.ts +3 -0
  42. package/dist/transport/p2p/recording-download.d.ts +4 -3
  43. package/dist/transport/p2p/shared-live-source.d.ts +44 -56
  44. package/dist/transport/p2p/talkback.d.ts +21 -10
  45. package/dist/transport/p2p/video.d.ts +2 -0
  46. package/dist/transport/push/push-client.d.ts +5 -0
  47. package/dist/transport/rtc/call-live.d.ts +41 -0
  48. package/dist/transport/rtc/command-router.d.ts +145 -0
  49. package/dist/transport/rtc/live.d.ts +76 -0
  50. package/dist/transport/rtc/peer.d.ts +122 -0
  51. package/dist/transport/rtc/portal-keepalive.d.ts +11 -0
  52. package/dist/transport/rtc/portal-packet.d.ts +72 -0
  53. package/dist/transport/rtc/ptcs-framer.d.ts +86 -0
  54. package/dist/transport/rtc/scall-sdp.d.ts +50 -0
  55. package/dist/transport/rtc/session.d.ts +99 -0
  56. package/dist/transport/rtc/signaling.d.ts +139 -0
  57. package/dist/transport/token-echo.d.ts +8 -0
  58. package/dist/transport/tuya/account.d.ts +8 -5
  59. package/dist/transport/tuya/client.d.ts +19 -5
  60. package/dist/transport/tuya/command-router.d.ts +10 -14
  61. package/dist/transport/tuya/dp-codec.d.ts +2 -23
  62. package/dist/transport/tuya/et3.d.ts +22 -0
  63. package/dist/transport/tuya/request.d.ts +18 -8
  64. package/dist/transport/tuya/sign.d.ts +7 -0
  65. package/package.json +7 -6
@@ -76,10 +76,13 @@ export declare const ARMING_CMD: {
76
76
  * The ENCRYPTION LEVEL is the session's to pick (`"auto"`), not this command's: the T8030 the envelope
77
77
  * was captured on holds a level-2 key and seals it level-2, while an own-session camera that never
78
78
  * negotiates one carries the same envelope level-1. See `armingCommand`.
79
+ *
80
+ * A T8410C takes the mode as a direct frame instead of this envelope; see {@link DIRECT_ARMING_MODELS}.
79
81
  */
80
82
  readonly SET_ARMING: 1224;
81
83
  /**
82
- * The per-mode alarm/arm-delay configuration write. ✅ WIRE CAPTURED live on a T8030 (
84
+ * One guard mode's per-device action table (app `CMD_SET_ALL_ACTION`), which carries the alarm delays
85
+ * and each device's actions in that mode. ✅ WIRE CAPTURED live on a T8030 (
83
86
  * 2026-07-23, both directions): a **bare
84
87
  * JSON frame, no `1350`/`1700` envelope** — outer P2P cmd IS `1255` itself, station channel 255,
85
88
  * plaintext `{account_id, count_down_alarm:{channel_list,delay_time},
@@ -96,15 +99,26 @@ export declare const ARMING_CMD: {
96
99
  * corresponding GET command (`1310`/inner cmd `40003`, sent by the app right before editing) always
97
100
  * replied `{count:0,data:null}` in every capture — genuinely empty, not a decrypt failure (confirmed
98
101
  * via the same bidirectional decrypt this finding used) — so the app does NOT read the current
99
- * config this way; how it does is still unknown. Without a working GET, safely PATCHING just one
100
- * channel in or out of an existing list isn't possible without risking clobbering the rest — so
102
+ * config this way; a T8010 reports it on its own params instead, see below. Without a working GET,
103
+ * safely PATCHING just one channel in or out of an existing list isn't possible without risking
104
+ * clobbering the rest — so
101
105
  * this ships as a caller-supplies-everything write instead of guessing a merge.
102
106
  * `devices`/`siren_sensor_action` are even less understood (raw per-device action codes, meaning
103
107
  * unconfirmed) and MUST come from a value independently read/captured for the target mode —
104
108
  * see `AlarmDelayConfig`'s field docs.
109
+ *
110
+ * ✅ On a T8010 the app writes the same command for the Device Control screen: header channel 0, the
111
+ * whole table of the mode `{mode_id, devices, count_down_alarm, count_down_arm}`, acked by an all-zero
112
+ * 1255 reply. The T8010 reports each table on its own params, Home on 1157 and Away on 1158, and the
113
+ * reported table follows a write within 15 s. See {@link DEVICE_NOTIFY_FLAG}.
105
114
  */
106
- readonly ALARM_DELAY_CONFIG: 1255;
115
+ readonly SET_ALL_ACTION: 1255;
107
116
  };
117
+ /**
118
+ * The guard modes whose device notification is read and written. Home and away are replayed on a T8010;
119
+ * `custom1` (wire 3) is captured on a T8170, whose own params report it on 1148.
120
+ */
121
+ export type DeviceNotificationMode = Extract<ArmingMode, "home" | "away" | "custom1">;
108
122
  /**
109
123
  * Alarm-delay durations the app's OWN picker UI offers — `AlarmDelaySeconds` is both the const
110
124
  * value-object (`AlarmDelaySeconds.sec45`) and the union type of its values, so callers pass the
@@ -225,6 +239,27 @@ export declare const ARMING_MEMBERS: {
225
239
  * would be the same unverified guess `setMode` refuses.
226
240
  */
227
241
  readonly setAlarmDelayConfig: import("./members.js").MethodMember<(mode: AlarmDelayMode, config: AlarmDelayConfig) => Promise<void>>;
242
+ /**
243
+ * Whether the device on `channel` sends a push notification in `mode`: its {@link DEVICE_NOTIFY_FLAG}
244
+ * in the action table the station reports for that mode. `undefined` where the station reports no table
245
+ * or the table does not list `channel`. A standalone camera answers from its own 1225/1239/1148 flags,
246
+ * for its own channel only. A device's channel is `EufyDevice.channel`.
247
+ */
248
+ readonly deviceNotification: import("./members.js").MethodMember<(mode: DeviceNotificationMode, channel: number) => boolean | undefined> & {
249
+ available: (ctx: CommandContext) => boolean;
250
+ };
251
+ /**
252
+ * Turn the push notification of the device on `channel` on or off in `mode` (cmd
253
+ * {@link ARMING_CMD.SET_ALL_ACTION}): the station's reported table written back with that one flag
254
+ * changed. A standalone camera is sent a one-entry `{mode_id, devices}` table built from its own flags,
255
+ * for its own channel only. Rejects, sending nothing, where the table does not list `channel`. A write
256
+ * builds on the last one sent for that mode until the device reports a table (`${mode}Action` on a
257
+ * standalone camera) observed 15 s after it, so a second write does not revert it; a write whose dispatch
258
+ * rejects is not built on.
259
+ */
260
+ readonly setDeviceNotification: import("./members.js").MethodMember<(mode: DeviceNotificationMode, channel: number, on: boolean) => Promise<void>> & {
261
+ available: (ctx: CommandContext) => boolean;
262
+ };
228
263
  };
229
264
  /**
230
265
  * `arming` — guard/arming mode. `armingMode` (see {@link ARMING_CMD.SET_ARMING}) has a verified read/write
@@ -122,6 +122,11 @@ export declare function cameraPowerTier(model: string | undefined, capabilities:
122
122
  * harvest to report either.
123
123
  */
124
124
  export declare const CELL_PARAMS: readonly number[];
125
+ /**
126
+ * The app's charger-state decode: `charging = value ∉ {0,2}`. The app applies this one rule both to a
127
+ * camera's `BATTERY_STATUS` (2111) and to a keypad's `APP_CMD_KEYPAD_BATTERY_CHARGER_STATE` (1655).
128
+ */
129
+ export declare function isChargingState(v: string | number | boolean): boolean;
125
130
  /**
126
131
  * Every `battery` feature, declared once — the property schema, the evidence-gated getters, the derived
127
132
  * setters, the intent routes and the descriptions all come out of this table. Order is schema order.
@@ -159,7 +164,7 @@ export declare const BATTERY_MEMBERS: {
159
164
  readonly type: "bool";
160
165
  readonly kind: "boolean";
161
166
  readonly provenance: "apk";
162
- readonly coerce: (v: string | number | boolean) => boolean;
167
+ readonly coerce: typeof isChargingState;
163
168
  readonly description: string;
164
169
  };
165
170
  /**
@@ -1,3 +1,4 @@
1
+ import { isCameraCodec } from "./access.js";
1
2
  import { type Surface } from "./members.js";
2
3
  import type { AvailabilityContext, CapabilityModule, CommandContext } from "./types.js";
3
4
  import { type Command, type MediaProvider } from "../../core/contracts.js";
@@ -8,6 +9,8 @@ import { type Command, type MediaProvider } from "../../core/contracts.js";
8
9
  * `transport/p2p/commands.ts`). Each entry notes its app `CommandType` name.
9
10
  */
10
11
  export declare const CAMERA_CMD: {
12
+ /** Camera-reported Wi-Fi signal (app `CMD_GET_WIFI_RSSI`). */
13
+ readonly WIFI_RSSI: 1142;
11
14
  /** Camera on/off. Read and write polarity depend on the family and topology. */
12
15
  readonly CAMERA_ENABLE: 1035;
13
16
  /** Wrapped T8410 power switch on HomeBase 3. */
@@ -46,6 +49,8 @@ export declare const CAMERA_CMD: {
46
49
  * (1013). (Some models omit full colour; enum in {@link NightVision}.)
47
50
  */
48
51
  readonly NIGHT_VISION_TYPE: 1277;
52
+ /** T8442 infrared night vision on/off: direct L1 int-string, hardware verified (0/1). */
53
+ readonly IC_NIGHT_VISION_TYPE: 1013;
49
54
  /**
50
55
  * Push-notification STYLE — how much a detection push carries: text alone, a thumbnail, or text
51
56
  * followed by a thumbnail. App `CMD_INDOOR_PUSH_NOTIFY_TYPE`, and the "indoor" is a misnomer: the
@@ -256,6 +261,8 @@ export type CameraActions = Surface<typeof CAMERA_MEMBERS> & {
256
261
  /** Power the camera off. */
257
262
  off(): Promise<void>;
258
263
  };
264
+ /** T8442 has a binary night-vision wire, unlike cameras with the three-mode 1277 control. */
265
+ declare function isT8442(ctx: AvailabilityContext): boolean;
259
266
  /**
260
267
  * Every `camera` feature, declared once. The property schema, the typed getters, the derived setters,
261
268
  * the intent routes, the media methods and the descriptions all come out of this table.
@@ -271,6 +278,14 @@ export type CameraActions = Surface<typeof CAMERA_MEMBERS> & {
271
278
  * @internal
272
279
  */
273
280
  export declare const CAMERA_MEMBERS: {
281
+ /** Reads the latest cached report and exposes no setter. */
282
+ readonly wifiRssi: {
283
+ readonly param: 1142;
284
+ readonly type: "number";
285
+ readonly kind: "scalar";
286
+ readonly provenance: "apk";
287
+ readonly description: "Camera-reported Wi-Fi signal; physical units and a quality scale are unspecified.";
288
+ };
274
289
  /**
275
290
  * The default READ is the *disable*-bit convention (1035 "0" ⇒ ON, 2001 direct); the WRITE polarity is
276
291
  * family-dependent — see `powerValue` / `isEnableBitPolarity`. Battery/solo cams report the state under
@@ -290,6 +305,7 @@ export declare const CAMERA_MEMBERS: {
290
305
  readonly type: "bool";
291
306
  readonly kind: "boolean";
292
307
  readonly provenance: "verified";
308
+ readonly available: typeof isCameraCodec;
293
309
  readonly invert: true;
294
310
  readonly invertFor: (ctx: AvailabilityContext) => false | undefined;
295
311
  readonly readAliases: readonly [{
@@ -324,6 +340,7 @@ export declare const CAMERA_MEMBERS: {
324
340
  readonly type: "bool";
325
341
  readonly kind: "boolean";
326
342
  readonly provenance: "apk";
343
+ readonly available: typeof isCameraCodec;
327
344
  readonly description: string;
328
345
  readonly write: (v: string | number | boolean, ctx: CommandContext) => Command;
329
346
  };
@@ -343,6 +360,7 @@ export declare const CAMERA_MEMBERS: {
343
360
  readonly 2: "Timestamp + Logo";
344
361
  };
345
362
  readonly provenance: "verified";
363
+ readonly available: typeof isCameraCodec;
346
364
  readonly description: string;
347
365
  readonly write: (v: string | number | boolean, ctx: CommandContext) => Command | undefined;
348
366
  };
@@ -356,6 +374,7 @@ export declare const CAMERA_MEMBERS: {
356
374
  readonly type: "bool";
357
375
  readonly kind: "boolean";
358
376
  readonly provenance: "verified";
377
+ readonly available: typeof isCameraCodec;
359
378
  readonly description: string;
360
379
  readonly write: (v: string | number | boolean, ctx: CommandContext) => Command;
361
380
  };
@@ -371,6 +390,7 @@ export declare const CAMERA_MEMBERS: {
371
390
  readonly type: "number";
372
391
  readonly kind: "scalar";
373
392
  readonly provenance: "verified";
393
+ readonly available: typeof isCameraCodec;
374
394
  readonly description: string;
375
395
  readonly write: (v: string | number | boolean, ctx: CommandContext) => Command | undefined;
376
396
  };
@@ -388,6 +408,7 @@ export declare const CAMERA_MEMBERS: {
388
408
  readonly 2: "All Sound";
389
409
  };
390
410
  readonly provenance: "verified";
411
+ readonly available: typeof isCameraCodec;
391
412
  readonly description: string;
392
413
  readonly write: (v: string | number | boolean, ctx: CommandContext) => Command | undefined;
393
414
  };
@@ -409,6 +430,7 @@ export declare const CAMERA_MEMBERS: {
409
430
  readonly 3: "Text First, Then Thumbnail";
410
431
  };
411
432
  readonly provenance: "verified";
433
+ readonly available: typeof isCameraCodec;
412
434
  readonly description: string;
413
435
  readonly write: (v: string | number | boolean, ctx: CommandContext) => Command | undefined;
414
436
  };
@@ -427,7 +449,17 @@ export declare const CAMERA_MEMBERS: {
427
449
  readonly 1: "Infrared";
428
450
  readonly 2: "Full Color";
429
451
  };
452
+ readonly enumValuesFor: (ctx: AvailabilityContext) => {
453
+ 0: string;
454
+ 1: string;
455
+ } | undefined;
430
456
  readonly provenance: "verified";
457
+ readonly available: typeof isCameraCodec;
458
+ readonly readAvailable: (ctx: AvailabilityContext) => boolean;
459
+ readonly readAliases: readonly [{
460
+ readonly paramType: 2002;
461
+ readonly available: typeof isT8442;
462
+ }];
431
463
  readonly description: string;
432
464
  readonly write: (v: string | number | boolean, ctx: CommandContext) => Command | undefined;
433
465
  };
@@ -435,25 +467,30 @@ export declare const CAMERA_MEMBERS: {
435
467
  * Live-view quality, the pair to {@link CAMERA_MEMBERS.recordingQuality} and a different setting on a
436
468
  * different wire: changing one leaves the other's parameter untouched.
437
469
  *
438
- * The READ is 1020, which reports the resolved tier as a plain integer. 1020 is also the name the
439
- * param dictionary already gives that id, and `Device` keys state by NAME — a member claiming 2730
440
- * under this name would collide with it on a device reporting both.
470
+ * The READ is 1020, which reports the resolved tier as a plain integer, while the WRITE rides 2730's
471
+ * `1350` payload. They are two ids for one setting because 2730 carries a per-mode config and 1020
472
+ * carries the tier in force; the tier is what this property means. 1020 is also the name the param
473
+ * dictionary already gives that id, and `Device` keys state by NAME — a member claiming 2730 under
474
+ * this name would collide with it on a device reporting both.
441
475
  *
442
- * `unverified: true` with no `write`: the app's 2730 frame is captured byte-exact, but replaying it
443
- * from this SDK produced no observable change on a standalone T8171, where the recording sibling's
444
- * 2731 write on the same envelope and the same session does land. The one difference the capture
445
- * shows is that the app's frame carries no `mChannel`/`mValue3`, which this envelope always emits.
446
- * Until a send is confirmed, the setter is absent — a control that silently does nothing is worse
447
- * than none — and the read ships ahead of it, which verification per direction allows.
476
+ * `transaction` is part of the frame that was captured, so it is sent. The recording sibling's own
477
+ * confirmed frame carries no such field; neither is inferred from the other.
448
478
  */
449
479
  readonly streamingQuality: {
480
+ readonly accepts: StreamingQualityName;
450
481
  readonly param: 1020;
451
482
  readonly type: "number";
452
483
  readonly kind: "enum";
453
484
  readonly enumValues: Readonly<Record<number, string>>;
454
485
  readonly provenance: "verified";
455
- readonly unverified: true;
486
+ readonly available: typeof isCameraCodec;
487
+ readonly args: readonly [{
488
+ readonly name: "quality";
489
+ readonly kind: "enum";
490
+ readonly description: "A tier, or the name it maps to. 0 is Auto.";
491
+ }];
456
492
  readonly description: string;
493
+ readonly write: (v: string | number | boolean, ctx: CommandContext) => Command | undefined;
457
494
  };
458
495
  /**
459
496
  * `type` is how the value is STORED, and 2731 stores the whole config — the ACTIVE tier is lifted out
@@ -465,6 +502,7 @@ export declare const CAMERA_MEMBERS: {
465
502
  readonly param: 2731;
466
503
  readonly type: "string";
467
504
  readonly provenance: "verified";
505
+ readonly available: typeof isCameraCodec;
468
506
  readonly decode: (raw: unknown) => number | undefined;
469
507
  readonly decodedKind: "enum";
470
508
  readonly decodedValues: number[];
@@ -486,6 +524,7 @@ export declare const CAMERA_MEMBERS: {
486
524
  readonly type: "bool";
487
525
  readonly kind: "boolean";
488
526
  readonly provenance: "apk";
527
+ readonly available: typeof isCameraCodec;
489
528
  readonly description: string;
490
529
  readonly requires: readonly [1015];
491
530
  readonly write: (v: string | number | boolean, ctx: CommandContext) => Command;
@@ -503,6 +542,7 @@ export declare const CAMERA_MEMBERS: {
503
542
  readonly kind: "boolean";
504
543
  readonly writeOnly: true;
505
544
  readonly provenance: "verified";
545
+ readonly available: typeof isCameraCodec;
506
546
  readonly description: "Privacy mode (PRIVACY_MODE 6250) — the multi-frame burst the sink plays.";
507
547
  readonly write: (v: string | number | boolean, ctx: CommandContext) => Command;
508
548
  };
@@ -516,6 +556,7 @@ export declare const CAMERA_MEMBERS: {
516
556
  readonly type: "bool";
517
557
  readonly kind: "boolean";
518
558
  readonly provenance: "verified";
559
+ readonly available: typeof isCameraCodec;
519
560
  readonly readAvailable: (ctx: AvailabilityContext) => boolean;
520
561
  readonly readAliases: readonly [{
521
562
  readonly paramType: 1716;
@@ -525,6 +566,7 @@ export declare const CAMERA_MEMBERS: {
525
566
  readonly description: "Camera status LED. Video doorbells report the same state under their button-ring LED parameter.";
526
567
  readonly write: (v: string | number | boolean, ctx: CommandContext) => Command;
527
568
  };
569
+ readonly views: import("./members.js").ProvidedMember<"media", (() => readonly number[]) | undefined>;
528
570
  /**
529
571
  * Media is not a property: it returns DATA rather than moving state, its options are richer than a
530
572
  * value, and it exists only on a device bound to a provider. Each is declared once, with its
@@ -542,21 +584,21 @@ export declare const CAMERA_MEMBERS: {
542
584
  * The refusal REJECTS on the four that answer with a promise, and THROWS on
543
585
  * {@link CAMERA_MEMBERS.recordFragments}, which answers with a handle.
544
586
  */
545
- readonly snapshotStored: import("./members.js").ProvidedMember<"media", (() => Promise<Buffer<ArrayBufferLike>>) | undefined>;
546
- readonly snapshotLive: import("./members.js").ProvidedMember<"media", (opts?: Parameters<MediaProvider["snapshotLive"]>[0]) => Promise<{
587
+ readonly snapshotStored: import("./members.js").ProvidedMember<"media", false | (() => Promise<Buffer<ArrayBufferLike>>) | undefined>;
588
+ readonly snapshotLive: import("./members.js").ProvidedMember<"media", false | ((opts?: Parameters<MediaProvider["snapshotLive"]>[0]) => Promise<{
547
589
  jpeg: Buffer;
548
590
  width: number;
549
591
  height: number;
550
592
  retained?: true;
551
- }>>;
593
+ }>)>;
552
594
  readonly live: import("./members.js").ProvidedMember<"media", (opts?: Parameters<MediaProvider["live"]>[0]) => Promise<import("../../core/contracts.js").LiveStreamConsumer>>;
553
- readonly record: import("./members.js").ProvidedMember<"media", (seconds: number, opts?: {
595
+ readonly record: import("./members.js").ProvidedMember<"media", false | ((seconds: number, opts?: {
554
596
  timeoutMs?: number;
555
597
  skipKeyframes?: number;
556
- } | undefined) => Promise<Buffer<ArrayBufferLike>>>;
557
- readonly openReadable: import("./members.js").ProvidedMember<"media", ((opts?: Parameters<NonNullable<MediaProvider["openReadable"]>>[0]) => Promise<import("node:stream").Readable>) | undefined>;
558
- readonly recordFragments: import("./members.js").ProvidedMember<"media", ((opts?: Parameters<NonNullable<MediaProvider["recordFragments"]>>[0]) => import("../../core/contracts.js").FragmentRecordingHandle) | undefined>;
559
- readonly downloadRecording: import("./members.js").ProvidedMember<"media", ((opts: Parameters<NonNullable<MediaProvider["downloadRecording"]>>[0]) => Promise<import("../../core/contracts.js").RecordingDownload>) | undefined>;
598
+ } | undefined) => Promise<Buffer<ArrayBufferLike>>)>;
599
+ readonly openReadable: import("./members.js").ProvidedMember<"media", false | ((opts?: Parameters<NonNullable<MediaProvider["openReadable"]>>[0]) => Promise<import("node:stream").Readable>) | undefined>;
600
+ readonly recordFragments: import("./members.js").ProvidedMember<"media", false | ((opts?: Parameters<NonNullable<MediaProvider["recordFragments"]>>[0]) => import("../../core/contracts.js").FragmentRecordingHandle) | undefined>;
601
+ readonly downloadRecording: import("./members.js").ProvidedMember<"media", false | ((opts: Parameters<NonNullable<MediaProvider["downloadRecording"]>>[0]) => Promise<import("../../core/contracts.js").RecordingDownload>) | undefined>;
560
602
  /**
561
603
  * Push audio from the host to this camera's speaker. Gated on the **speaker** param specifically —
562
604
  * not the `audio` capability, which resolves on a microphone alone and would advertise a speaker the
@@ -567,3 +609,4 @@ export declare const CAMERA_MEMBERS: {
567
609
  readonly talkback: import("./members.js").ProvidedMember<"media", false | ((opts?: Parameters<NonNullable<MediaProvider["talkback"]>>[0]) => Promise<import("../../core/contracts.js").TalkbackHandle>) | undefined>;
568
610
  };
569
611
  export declare const CAMERA: CapabilityModule;
612
+ export {};
@@ -15,10 +15,11 @@
15
15
  /** The parsed DP capability catalog for one product SKU. */
16
16
  export interface DpCatalog {
17
17
  /**
18
- * For enum-type DPs: the valid integer values as declared in the catalog.
19
- * Absent for non-enum DPs (bool, raw, integer, string).
18
+ * For enum-type DPs: the range members exactly as the catalog lists them, as strings — value names
19
+ * (`"Quiet"`) or numeric strings (`"0"`), whichever the SKU's catalog uses. What a member means is
20
+ * the reading capability's to decide. Absent for non-enum DPs (bool, raw, integer, string).
20
21
  */
21
- readonly enumRanges: ReadonlyMap<number, readonly number[]>;
22
+ readonly enumRanges: ReadonlyMap<number, readonly string[]>;
22
23
  }
23
24
  /** Returned whenever the API call fails or the response shape is not recognised. */
24
25
  export declare const EMPTY_DP_CATALOG: DpCatalog;
@@ -42,8 +42,11 @@ import type { VacuumCleanActions } from "./vacuum-clean.js";
42
42
  import type { VacuumDockActions } from "./vacuum-dock.js";
43
43
  import type { DisplayActions } from "./display.js";
44
44
  import type { SuctionActions } from "./suction.js";
45
+ import type { MowerActions } from "./mower.js";
45
46
  import type { LocateActions } from "./locate.js";
47
+ import type { SmartDropActions } from "./smart-drop.js";
46
48
  import type { DeviceInfo } from "./info.js";
49
+ import type { CusPushAlarmType } from "../push-events.js";
47
50
  /**
48
51
  * Look up the {@link CapabilityModule} for a capability, or `undefined` if none is registered.
49
52
  * @internal
@@ -296,9 +299,13 @@ export interface DeviceEventMap {
296
299
  * can be known about a value nothing pushes.
297
300
  */
298
301
  cameraEnabledChanged: PushSemanticEvent;
299
- /** Station alarm lifecycle; `phase` says whether it fired or is counting down. */
302
+ /**
303
+ * Station alarm lifecycle; `phase` says whether it fired, is counting down, or was stopped. `type` is
304
+ * the push's alarm source or stop reason, absent when the push carried none.
305
+ */
300
306
  alarm: PushSemanticEvent & {
301
- phase?: "triggered" | "delayed";
307
+ phase?: "triggered" | "delayed" | "stopped";
308
+ type?: CusPushAlarmType;
302
309
  };
303
310
  /** Lock (un)locked or a lock alarm fired. */
304
311
  lockState: PushSemanticEvent;
@@ -411,7 +418,7 @@ export interface DeviceActionMap {
411
418
  smoke: SmokeActions;
412
419
  /** CO-detector reads (read-only): `coDetected`, `lastSeen`. */
413
420
  co: CoActions;
414
- /** Security-keypad reads (read-only): `rssi`. */
421
+ /** Security-keypad reads (read-only): `charging`, `rssi`. */
415
422
  keypad: KeypadActions;
416
423
  /** RTSP publish for a NAS/NVR: `publish`/`withdraw` + `published`, `requireAuth`/`allowAnonymous`, `recordingMode`/`setRecordingMode`. One camera at a time per station. */
417
424
  rtsp: RtspActions;
@@ -421,8 +428,12 @@ export interface DeviceActionMap {
421
428
  vacuumDock: VacuumDockActions;
422
429
  /** RoboVac suction: `level`, `boostIq`, `supportedLevels`; `setSuctionLevel`, `setBoostIq`. */
423
430
  suction: SuctionActions;
431
+ /** Robot mower (read-only): `battery`, `cutHeight`, `network`, `wifiSignal`, wear timers and settings. No write is captured. */
432
+ mower: MowerActions;
424
433
  /** RoboVac locate (find-robot beep): `locating`; `locate(on?)`. */
425
434
  locate: LocateActions;
435
+ /** SmartDrop parcel box: `openLid()`. */
436
+ smartDrop: SmartDropActions;
426
437
  /** Smart Display (read-only): `battery`. No display write is captured. */
427
438
  display: DisplayActions;
428
439
  /** Identity metadata (read-only): `{ manufacturer, model, serialNumber, name, deviceType?, firmwareVersion?, hardwareVersion? }`. */
@@ -516,7 +527,7 @@ export type { ActionSpec } from "./types.js";
516
527
  * `undefined` for an action nothing describes.
517
528
  */
518
529
  export { actionSpecOf } from "./access.js";
519
- export type { PtzActions, LightActions, SmartLightActions, RgbColor, CameraActions, LockActions, SirenActions, ArmingActions, BatteryActions, MotionActions, ContactActions, LeakActions, SmokeActions, CoActions, KeypadActions, RtspActions, VacuumCleanActions, SuctionActions, LocateActions, };
530
+ export type { PtzActions, LightActions, SmartLightActions, RgbColor, CameraActions, LockActions, SirenActions, ArmingActions, BatteryActions, MotionActions, ContactActions, LeakActions, SmokeActions, CoActions, KeypadActions, RtspActions, VacuumCleanActions, SuctionActions, MowerActions, LocateActions, SmartDropActions, };
520
531
  /**
521
532
  * The member table each `*Actions` type is DERIVED from (`LockActions = Surface<typeof LOCK_MEMBERS>`),
522
533
  * so the type names the table and the table is part of the published surface.
@@ -541,10 +552,12 @@ export { MOTION_MEMBERS } from "./motion.js";
541
552
  export { PTZ_MEMBERS } from "./ptz.js";
542
553
  export { RTSP_MEMBERS } from "./rtsp.js";
543
554
  export { SIREN_MEMBERS } from "./siren.js";
555
+ export { SMART_DROP_MEMBERS } from "./smart-drop.js";
544
556
  export { SMART_LIGHT_MEMBERS } from "./smart-light.js";
545
557
  export { SMOKE_MEMBERS } from "./smoke.js";
546
558
  export { DISPLAY_MEMBERS, type DisplayActions } from "./display.js";
547
559
  export { SUCTION_MEMBERS } from "./suction.js";
560
+ export { MOWER_MEMBERS } from "./mower.js";
548
561
  export { VACUUM_CLEAN_MEMBERS } from "./vacuum-clean.js";
549
562
  export type { DeviceInfo } from "./info.js";
550
563
  export type { AutoSpotlightOptions } from "./light.js";
@@ -1,13 +1,12 @@
1
+ import { isChargingState } from "./battery.js";
1
2
  import { type Surface } from "./members.js";
2
3
  import type { CapabilityModule } from "./types.js";
3
4
  /**
4
- * Every `keypad` feature, declared once. Only `rssi` is a verified read.
5
+ * Every `keypad` feature, declared once. `rssi` is a verified read and `charging` follows the app's own
6
+ * decode of the keypad's charger state.
5
7
  *
6
- * The battery pair is `unexposed`: both ids are placeholders, and the keypad's real battery state is
7
- * reported under model-specific params (`keypadBatteryCapState` / `keypadBatteryChargerState`, seen
8
- * live) whose low/charging semantics are not confirmed. They stay in the schema so a diagnosis can
9
- * reach them through `getProperty`, with no typed getter asserting a meaning this SDK cannot back.
10
- * A live probe of the fleet's T8960 confirms neither is reported at all today.
8
+ * `batteryLow` is `unexposed`: the app maps its param to the same low-battery field the entry and motion
9
+ * sensors feed, but its value decode is absent from the app's parser, so the polarity is not evidenced.
11
10
  *
12
11
  * Exported but NOT published: each entry states its wire id and the evidence it was confirmed on,
13
12
  * which the reference site does not carry.
@@ -15,36 +14,34 @@ import type { CapabilityModule } from "./types.js";
15
14
  */
16
15
  export declare const KEYPAD_MEMBERS: {
17
16
  /**
18
- * `unexposed`, so it reaches a diagnosis through `getProperty` but gets no typed getter. 1103 is a
19
- * placeholder AND a likely collision — the app's own param table names 1103 GET_CAMERA_INFO — so a
20
- * getter here would be asserting a meaning nothing backs. The keypad's real battery state arrives
21
- * under `keypadBatteryCapState`, whose low/charging semantics are not confirmed.
17
+ * `APP_CMD_KEYPAD_BATTERY_CAP_STATE` (1653). The app's sensor parser maps it to `sensor_is_low_power`,
18
+ * the field `APP_CMD_ENTRY_SENSOR_BAT_STATE` and `APP_CMD_MOTION_SENSOR_BAT_STATE` decode as a boolean,
19
+ * yet gives 1653 itself no decode case. `unexposed` until a device confirms which value means low; in
20
+ * the schema for `getProperty`, absent from the typed surface.
22
21
  */
23
22
  readonly batteryLow: {
24
- readonly param: 1103;
23
+ readonly param: 1653;
25
24
  readonly type: "bool";
26
25
  readonly kind: "boolean";
27
- readonly provenance: "guessed";
26
+ readonly provenance: "apk";
28
27
  readonly unexposed: true;
29
28
  readonly description: string;
30
29
  };
31
30
  /**
32
- * The charging half of the battery pair, `unexposed` for the same reason as `batteryLow`: 1102 is a
33
- * placeholder id, and the state the keypad actually reports (`keypadBatteryChargerState`) has no
34
- * confirmed value space. In the schema for `getProperty`, absent from the typed surface.
31
+ * `APP_CMD_KEYPAD_BATTERY_CHARGER_STATE` (1655), decoded the way the app's sensor parser decodes it:
32
+ * `charging = value ∉ {0,2}` ({@link isChargingState}).
35
33
  */
36
34
  readonly charging: {
37
- readonly param: 1102;
35
+ readonly param: 1655;
38
36
  readonly type: "bool";
39
37
  readonly kind: "boolean";
40
- readonly provenance: "guessed";
41
- readonly unexposed: true;
42
- readonly description: "Keypad charging flag. UNVERIFIED: placeholder id pending verification.";
38
+ readonly provenance: "apk";
39
+ readonly coerce: typeof isChargingState;
40
+ readonly description: string;
43
41
  };
44
42
  /**
45
- * The keypad's link quality in dBm — the one verified read in this table, on the same param 1141 the
46
- * other sub-1G sensors report signal strength on. Reported as the device measures it: raw dBm, never
47
- * normalised to a bar count.
43
+ * The keypad's link quality in dBm, on the same param 1141 the other sub-1G sensors report signal
44
+ * strength on. Reported as the device measures it: raw dBm, never normalised to a bar count.
48
45
  */
49
46
  readonly rssi: {
50
47
  readonly param: 1141;
@@ -57,5 +54,5 @@ export declare const KEYPAD_MEMBERS: {
57
54
  };
58
55
  /** Bound keypad reads — the object returned by `dev.keypad()`. Read-only. */
59
56
  export type KeypadActions = Surface<typeof KEYPAD_MEMBERS>;
60
- /** `keypad` — security keypad. Battery low/charging and signal. Param ids here are placeholders apart from RSSI. */
57
+ /** `keypad` — security keypad. Charging, battery-low and signal. */
61
58
  export declare const KEYPAD: CapabilityModule;
@@ -160,6 +160,9 @@ export declare const LIGHT_MEMBERS: {
160
160
  * This is the switch a user changes and expects to STAY changed. {@link isOn} is a different fact:
161
161
  * the lamp being lit right now, driven by whichever
162
162
  * client is streaming — the vendor app lights it for a live view and drops it on quitting.
163
+ *
164
+ * The T8423 write takes the session-chosen level; level-1 int+string was verified live on a standalone
165
+ * unit.
163
166
  */
164
167
  readonly spotlightEnabled: {
165
168
  readonly param: 1403;
@@ -1,6 +1,6 @@
1
1
  import { type Surface } from "./members.js";
2
2
  import type { AvailabilityContext, CapabilityModule, CommandContext } from "./types.js";
3
- import type { Command, AutoLockSnapshot } from "../../core/contracts.js";
3
+ import type { Command, AutoLockSnapshot, MediaProvider } from "../../core/contracts.js";
4
4
  /**
5
5
  * Setting-id selectors for the compact `ff09-setting-toggle` write — this capability's OWN wire
6
6
  * vocabulary, named not inlined per the capability wire-id convention, so `setRainMode`
@@ -33,13 +33,19 @@ export declare const LOCK_SETTING_ID: {
33
33
  /**
34
34
  * Bound lock controls — the object returned by `dev.lock()`.
35
35
  *
36
- * Everything is DERIVED from `LOCK_MEMBERS`. `lock`/`unlock` and the setting toggles drive any
37
- * lock-family actuator — currently the T8531 video smart lock and the T85D0 garage door, which share one
38
- * actuation frame. This module emits ONE transport-neutral intent (identity fields only, no wire bytes,
39
- * no cipher, no routing key) and names no transport: the command sink routes P2P vs MQTT by the device's
40
- * topology, and the chosen transport's command router builds the frame + envelope and re-resolves its own
41
- * routing tail. Which pipe it is does not reach `dev.lock()` — its surface is identical either way,
42
- * the same way P2P-vs-cloud is hidden for live media.
36
+ * Everything is DERIVED from `LOCK_MEMBERS`. `lock`/`unlock` drive every lock-family actuator over the
37
+ * wire its family takes: the shared `ff09` frame on the T8531 video smart lock and the T85D0 garage door,
38
+ * the T8530 video lock's own `set-payload`, and the keyed-payload envelope on the classic Wi-Fi lock (the
39
+ * `T8520`-range unit that never negotiates a session key). The setting toggles ride `ff09` only. This
40
+ * module emits ONE transport-neutral intent per wire (identity fields only, no wire bytes, no cipher, no
41
+ * routing key) and names no transport: the command sink routes P2P vs MQTT by the device's topology, and
42
+ * the chosen transport's command router builds the frame + envelope and re-resolves its own routing tail.
43
+ * Which pipe it is does not reach `dev.lock()` — its surface is identical either way, the same way
44
+ * P2P-vs-cloud is hidden for live media.
45
+ *
46
+ * Classic Wi-Fi lock: `lock()` and `unlock()` are both confirmed on hardware — the bolt moved each way, the
47
+ * device answered result code 0, and the cloud status followed. That device answers every command, so on it
48
+ * the two reject on a refusal or an unanswered command as well as on missing identity.
43
49
  */
44
50
  export type LockActions = Surface<typeof LOCK_MEMBERS>;
45
51
  /**
@@ -96,8 +102,8 @@ export declare const LOCK_MEMBERS: {
96
102
  readonly description: "Lock battery level 0-100 (verified: param 1101, alias 6001).";
97
103
  };
98
104
  /**
99
- * Link quality in dBm as the lock measures it, on the shared param 1141. Both actuation methods here
100
- * are fire-and-forget, so a weak link is silent rather than an error.
105
+ * Link quality in dBm as the lock measures it, on the shared param 1141. On the `ff09` wire the
106
+ * actuations are fire-and-forget, so a weak link is silent rather than an error.
101
107
  */
102
108
  readonly rssi: {
103
109
  readonly param: 1141;
@@ -107,10 +113,20 @@ export declare const LOCK_MEMBERS: {
107
113
  readonly provenance: "verified";
108
114
  readonly description: "Lock signal strength (verified: param 1141 = RSSI).";
109
115
  };
110
- /** Lock the deadbolt/door. Fire-and-forget — rejects only on missing member identity, never on a device timeout. */
111
- readonly lock: import("./members.js").MethodMember<() => Promise<void>>;
112
- /** Unlock the deadbolt/door. Fire-and-forget — rejects only on missing member identity. */
113
- readonly unlock: import("./members.js").MethodMember<() => Promise<void>>;
116
+ /**
117
+ * Lock the deadbolt/door. Resolves after sending, without confirming physical state — except on the
118
+ * classic Wi-Fi lock, which answers: there it rejects on a device refusal or no reply as well.
119
+ */
120
+ readonly lock: import("./members.js").MethodMember<() => Promise<void>> & {
121
+ available: (ctx: CommandContext) => boolean;
122
+ };
123
+ /**
124
+ * Unlock the deadbolt/door. Resolves after sending, without confirming physical state — except on the
125
+ * classic Wi-Fi lock, which answers: there it rejects on a device refusal or no reply as well.
126
+ */
127
+ readonly unlock: import("./members.js").MethodMember<() => Promise<void>> & {
128
+ available: (ctx: CommandContext) => boolean;
129
+ };
114
130
  /**
115
131
  * Read-modify-write the auto-lock setting: the transport GETs the device's current settings, changes
116
132
  * only `enabled` (+ `delaySeconds` if given — otherwise the current delay is preserved), and writes the
@@ -120,7 +136,9 @@ export declare const LOCK_MEMBERS: {
120
136
  * **Unlike `lock`/`unlock` this can reject on a device TIMEOUT**, not just missing identity — the GET
121
137
  * step is a genuine precondition, so this one is not fire-and-forget.
122
138
  */
123
- readonly setAutoLock: import("./members.js").MethodMember<(enabled: boolean, delaySeconds?: number) => Promise<void>>;
139
+ readonly setAutoLock: import("./members.js").MethodMember<(enabled: boolean, delaySeconds?: number) => Promise<void>> & {
140
+ available: (ctx: CommandContext) => boolean;
141
+ };
124
142
  /**
125
143
  * Toggle Rain Mode — a pure blind write, unlike `setAutoLock`: the compact frame carries only this one
126
144
  * field, so there is no GET pass and it is fire-and-forget. Confirmed on-device end-to-end in both
@@ -220,6 +238,14 @@ export declare const LOCK_MEMBERS: {
220
238
  readonly description: "One-touch rear locking (setting-id 11). Wire shape confirmed in the app's own JS, NOT captured.";
221
239
  readonly write: (v: string | number | boolean, ctx: CommandContext) => Command;
222
240
  };
241
+ /** Read the current device-reported state; undefined means no settled locked/unlocked state. */
242
+ readonly refreshStatus: {
243
+ readonly needs: "media";
244
+ readonly provided: (provider: MediaProvider, deps: import("./members.js").MemberDeps) => (() => Promise<boolean | undefined>) | undefined;
245
+ readonly description: string;
246
+ readonly requiredCapabilities?: readonly import("../types.js").Capability[];
247
+ readonly answers: true;
248
+ };
223
249
  /**
224
250
  * Read the device's current auto-lock settings via a live `GET_SETTINGS` round-trip — the SAME read
225
251
  * `setAutoLock` does internally, exposed standalone with no write attached. Works over BOTH transports.
@@ -230,7 +256,7 @@ export declare const LOCK_MEMBERS: {
230
256
  */
231
257
  readonly getAutoLockState: {
232
258
  readonly needs: "ff09Settings";
233
- readonly provided: (provider: import("../../core/contracts.js").Ff09SettingsReader, deps: import("./members.js").MemberDeps) => () => Promise<AutoLockSnapshot>;
259
+ readonly provided: (provider: import("../../core/contracts.js").Ff09SettingsReader, deps: import("./members.js").MemberDeps) => (() => Promise<AutoLockSnapshot>) | undefined;
234
260
  readonly description: string;
235
261
  readonly requiredCapabilities?: readonly import("../types.js").Capability[];
236
262
  readonly answers: true;