@mega-yfue/eufy-sdk 0.6.0-beta.25 → 0.6.0-beta.27

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.
@@ -144,6 +144,9 @@ export declare const BATTERY_MEMBERS: {
144
144
  * The headline percentage, and this capability's detection evidence: reporting 1101 is what proves a
145
145
  * device is battery-powered, which is also the fact `MediaProvider` reads to decide a stream needs a
146
146
  * power budget. Published flat as `battery` — `level` alone is claimed by `suction` too.
147
+ *
148
+ * Withheld on a device that resolved `lock`, whose own `battery` member reads the same param 1101 and
149
+ * owns the `battery` property there, so the two do not both claim it.
147
150
  */
148
151
  readonly level: {
149
152
  readonly param: 1101;
@@ -152,6 +155,7 @@ export declare const BATTERY_MEMBERS: {
152
155
  readonly unit: "%";
153
156
  readonly kind: "percent";
154
157
  readonly provenance: "verified";
158
+ readonly available: (ctx: AvailabilityContext) => boolean;
155
159
  readonly description: "Battery level 0-100 (verified: param 1101).";
156
160
  };
157
161
  /**
@@ -170,7 +174,7 @@ export declare const BATTERY_MEMBERS: {
170
174
  /**
171
175
  * 1293 is the READABLE indicator (6445 is write-only/cloud-hidden). Verified live on a T8124R via an
172
176
  * app-toggle before/after diff: 0 = Battery, 1 = External Solar Panel. Values beyond 0/1 (some models
173
- * report 5) are shown raw — `enumValues` only labels the two that are confirmed.
177
+ * report 5) read as `undefined` — `enumValues` holds only the two that are confirmed.
174
178
  *
175
179
  * The write is a `1350` SET_PAYLOAD, inner cmd 1293, `{charge_mode:N}`, `mValue3` 0 (the app uses 0,
176
180
  * not the cmd id), and the setter accepts a NAME as well as the index the getter answers.
@@ -439,6 +439,10 @@ export declare const CAMERA_MEMBERS: {
439
439
  * sensor omits it, and the wire accepts the value regardless — the device's own reported set is the
440
440
  * only statement of which of the three it has. `coerceEnumValue` rejects a value outside
441
441
  * {@link NightVision} rather than coercing it. The payload key on the wire is `night_sion`.
442
+ *
443
+ * 1277 carries more than these three on some models: the V6 app's per-model mappings put modes on
444
+ * 3, 5, 6 and 8 as well, and which model takes which mapping is not in the app bundle. A reported value
445
+ * outside the published options reads as `undefined` rather than as an unnamed number.
442
446
  */
443
447
  readonly nightVision: {
444
448
  readonly param: 1277;
@@ -576,12 +576,14 @@ export declare function memberWrite(name: string, m: ValueMember, value: boolean
576
576
  * is stored as a decoded object. Handing either through a getter typed `number` is the one lie this
577
577
  * table exists to prevent.
578
578
  *
579
+ * A number outside `values`, the options published for this device, answers `undefined`.
580
+ *
579
581
  * Exported so the ONE narrowing the getters use is also the one a property-change announcement carries.
580
582
  * A second conversion of the wire value is precisely how a payload comes to disagree with the getter
581
583
  * beside it, which would defeat the point of announcing the change at all.
582
584
  * @internal
583
585
  */
584
- export declare function narrow(type: PropertyValueType, read: CapabilityStateReader, prop: string): boolean | number | string | undefined;
586
+ export declare function narrow(type: PropertyValueType, read: CapabilityStateReader, prop: string, values?: Record<number, string>): boolean | number | string | undefined;
585
587
  /**
586
588
  * Both presence gates at once: the params a member requires, and its own {@link ValueMember.available}.
587
589
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mega-yfue/eufy-sdk",
3
- "version": "0.6.0-beta.25",
3
+ "version": "0.6.0-beta.27",
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",