@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 +20 -3
- package/dist/index.js.map +2 -2
- package/dist/model/capabilities/manifest.d.ts +18 -2
- package/package.json +1 -1
|
@@ -61,8 +61,14 @@ export interface ActionDescriptor extends ActionSpec {
|
|
|
61
61
|
/** What one capability exposes on a device — the join of its bound object and its own declaration. */
|
|
62
62
|
export interface CapabilityDescriptor {
|
|
63
63
|
capability: Capability;
|
|
64
|
-
/**
|
|
65
|
-
|
|
64
|
+
/**
|
|
65
|
+
* The fluent accessor this capability is reached under: `dev[accessor]()`.
|
|
66
|
+
*
|
|
67
|
+
* Absent for a capability with nothing to bind — one whose whole surface is inbound events, so it
|
|
68
|
+
* declares no members and no `actions()` and therefore has no object to reach. Such a capability is
|
|
69
|
+
* described for its {@link events} alone; every other field is empty.
|
|
70
|
+
*/
|
|
71
|
+
accessor?: string;
|
|
66
72
|
/** The reads INSTALLED on this device, never the theoretical set. */
|
|
67
73
|
reads: readonly ReadDescriptor[];
|
|
68
74
|
/** The installed actions that carry a description. */
|
|
@@ -102,6 +108,16 @@ export interface DeviceManifest {
|
|
|
102
108
|
* Parameterised over the module list; the barrel binds it to the real one. A capability the device did
|
|
103
109
|
* not bind — because it does not have it, or because nothing is bound yet — contributes no descriptor
|
|
104
110
|
* at all.
|
|
111
|
+
*
|
|
112
|
+
* With ONE exception, and it is not a bound object: a capability whose whole surface is inbound events
|
|
113
|
+
* declares no members and no `actions()`, so `buildActions` builds nothing for it and there is no
|
|
114
|
+
* object here to walk. Its events are still device truth, and the resolved set in {@link
|
|
115
|
+
* AvailabilityContext.capabilities} is what says this device has it — so it is described from its own
|
|
116
|
+
* declaration, with no {@link CapabilityDescriptor.accessor} and every other field empty, and only on
|
|
117
|
+
* a device with at least one bound object.
|
|
118
|
+
*
|
|
119
|
+
* Claims resolve against an empty read set there, which is the truthful evidence — a module that binds
|
|
120
|
+
* nothing installs no getter, so a `reads` claim cannot hold. A topology claim still applies.
|
|
105
121
|
* @internal
|
|
106
122
|
*/
|
|
107
123
|
export declare function describeBound(modules: readonly CapabilityModule[], bound: Readonly<Record<string, unknown>>, ctx?: AvailabilityContext): CapabilityDescriptor[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mega-yfue/eufy-sdk",
|
|
3
|
-
"version": "0.4.0-beta.
|
|
3
|
+
"version": "0.4.0-beta.20",
|
|
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",
|