@mega-yfue/eufy-sdk 0.4.0-beta.19 → 0.4.0-beta.20

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/index.js CHANGED
@@ -3428,11 +3428,17 @@ var unreflectedMembers = (surface) => statement(surface, UNREFLECTED);
3428
3428
  // dist/model/capabilities/manifest.js
3429
3429
  function describeBound(modules, bound, ctx) {
3430
3430
  const out = [];
3431
+ const anyBound = Object.values(bound).some((obj) => obj && typeof obj === "object");
3431
3432
  for (const m of modules) {
3432
3433
  const accessor = camelCase(m.capability);
3433
3434
  const obj = bound[accessor];
3434
- if (!obj || typeof obj !== "object")
3435
+ if (!obj || typeof obj !== "object") {
3436
+ const events = anyBound ? emitsOf(m, [], ctx) : [];
3437
+ if (events.length && ctx?.capabilities?.has(m.capability)) {
3438
+ out.push({ capability: m.capability, reads: [], actions: [], undescribedActions: [], events });
3439
+ }
3435
3440
  continue;
3441
+ }
3436
3442
  const descriptors = Object.getOwnPropertyDescriptors(obj);
3437
3443
  const reads2 = [];
3438
3444
  const actions = [];
@@ -4414,6 +4420,7 @@ var MOTION = {
4414
4420
  };
4415
4421
 
4416
4422
  // dist/model/capabilities/person-detection.js
4423
+ var IDENTIFIED_PERSON_CLAIM = { homeBaseAttached: true };
4417
4424
  var PERSON_DETECTION = {
4418
4425
  capability: "person_detection",
4419
4426
  description: "AI human detection enable switch and live detected state.",
@@ -4430,8 +4437,18 @@ var PERSON_DETECTION = {
4430
4437
  */
4431
4438
  events: [
4432
4439
  { source: "push", match: DoorbellPushEvent.FACE_DETECTION, emit: "personDetected" },
4433
- { source: "push", match: HB3PairedDevicePushEvent.IDENTITY_PERSON_DETECTION, emit: "personDetected" },
4434
- { source: "push", match: HB3PairedDevicePushEvent.STRANGER_PERSON_DETECTION, emit: "strangerDetected" }
4440
+ {
4441
+ source: "push",
4442
+ match: HB3PairedDevicePushEvent.IDENTITY_PERSON_DETECTION,
4443
+ emit: "personDetected",
4444
+ claim: IDENTIFIED_PERSON_CLAIM
4445
+ },
4446
+ {
4447
+ source: "push",
4448
+ match: HB3PairedDevicePushEvent.STRANGER_PERSON_DETECTION,
4449
+ emit: "strangerDetected",
4450
+ claim: IDENTIFIED_PERSON_CLAIM
4451
+ }
4435
4452
  ]
4436
4453
  };
4437
4454