@mega-yfue/eufy-sdk 0.5.0-beta.72 → 0.5.0-beta.73

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.
@@ -182,6 +182,11 @@ export interface AiDetectFlags {
182
182
  export declare function encodeAiDetectType(flags: AiDetectFlags): number;
183
183
  /** Decode an `ai_detect_type` bitmask → which detection types are on. */
184
184
  export declare function decodeAiDetectType(value: number): AiDetectFlags;
185
+ /**
186
+ * The `ai_detect_type` bitmask from a stored 1298 value: the bare number, or the numeric
187
+ * `ai_detect_type` field of the JSON object form. Answers `undefined` for any other shape.
188
+ */
189
+ declare function decodeAiDetectTypeParam(raw: unknown): number | undefined;
185
190
  /**
186
191
  * Decode a `radar_wd_switch` (2706, loitering) read the way the app does:
187
192
  * `typeof v === "object" ? v.radar_wd_switch : v`. The device may store it as a JSON object
@@ -245,11 +250,15 @@ export declare const MOTION_MEMBERS: {
245
250
  * 1298 holds the detailed AI-type BITMASK (live-observed: `0x30000` enabled-base | type bits, e.g. a
246
251
  * T8425 reads `0x3000f`). Cams also report 1299 (`hbAiDetectType`) but that is a separate, simpler
247
252
  * value (1) — NOT this bitmask, so 1298 is the read/write id.
253
+ *
254
+ * The value arrives in two shapes, both read by the app's 1298 parser: a bare bitmask, or a JSON
255
+ * object carrying the same bitmask as `ai_detect_type` (see {@link decodeAiDetectTypeParam}).
248
256
  */
249
257
  readonly aiDetectType: {
250
258
  readonly param: 1298;
251
- readonly type: "number";
252
- readonly kind: "bitfield";
259
+ readonly type: "string";
260
+ readonly decode: typeof decodeAiDetectTypeParam;
261
+ readonly decodedKind: "bitfield";
253
262
  readonly provenance: "verified";
254
263
  readonly description: string;
255
264
  readonly write: (v: string | number | boolean, ctx: CommandContext) => Command | undefined;
@@ -379,3 +388,4 @@ export declare const MOTION_MEMBERS: {
379
388
  };
380
389
  };
381
390
  export declare const MOTION: CapabilityModule;
391
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mega-yfue/eufy-sdk",
3
- "version": "0.5.0-beta.72",
3
+ "version": "0.5.0-beta.73",
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",