@mega-yfue/eufy-sdk 0.5.0-beta.87 → 0.5.0-beta.89
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/client/eufy-mega.d.ts +4 -2
- package/dist/core/contracts.d.ts +13 -4
- package/dist/index.js +338 -57
- package/dist/index.js.map +4 -4
- package/dist/model/capabilities/battery.d.ts +6 -1
- package/dist/model/capabilities/index.d.ts +1 -1
- package/dist/model/capabilities/keypad.d.ts +20 -23
- package/dist/model/capabilities/lock.d.ts +23 -11
- package/dist/model/device-family.d.ts +12 -0
- package/dist/transport/http/mega-client.d.ts +9 -0
- package/dist/transport/p2p/codec.d.ts +16 -0
- package/dist/transport/p2p/command-router.d.ts +73 -0
- package/dist/transport/p2p/keyed-payload.d.ts +112 -0
- package/dist/transport/p2p/p2p-session.d.ts +5 -0
- package/package.json +1 -1
|
@@ -435,8 +435,10 @@ export declare class EufyMega extends EventEmitter {
|
|
|
435
435
|
* Choose the transport stack for one command — the routing half of {@link commandSinkFor}.
|
|
436
436
|
*
|
|
437
437
|
* The `ff09-*` kinds share ONE frame that rides either transport, so each stack is asked whether it
|
|
438
|
-
* drives this device (`claimsDevice`) rather than inferring from the kind
|
|
439
|
-
*
|
|
438
|
+
* drives this device (`claimsDevice`) rather than inferring from the kind; `keyed-payload-actuate` (the
|
|
439
|
+
* classic Wi-Fi lock) is routed the same way, a channel-less actuation claimed by the stack that drives
|
|
440
|
+
* the lock. `registry.require` throws on an unloaded serial, so a routing decision never silently falls
|
|
441
|
+
* through to the wrong transport.
|
|
440
442
|
* The `eufy_life` DP writes (smart lights) are secure-MQTT-only. `aiot-dp` routes to either the
|
|
441
443
|
* Anker AIoT MQTT stack or the legacy Tuya REST router depending on the device's category
|
|
442
444
|
* (`eufy_home_tuya` → Tuya, everything else → MQTT). The capability layer emits a single `aiot-dp`
|
package/dist/core/contracts.d.ts
CHANGED
|
@@ -264,10 +264,11 @@ export declare class StateConvergenceError extends Error {
|
|
|
264
264
|
*/
|
|
265
265
|
export type ScalarForm = "auto" | "int-string" | "direct-binary";
|
|
266
266
|
/**
|
|
267
|
-
* The identity fields
|
|
268
|
-
* plus the frame's own direction bit and user-attribution fields
|
|
269
|
-
*
|
|
270
|
-
*
|
|
267
|
+
* The identity fields an actuation frame is built from — for `ff09`, the AES key/IV inputs
|
|
268
|
+
* (`adminUserId`/`deviceSn`) plus the frame's own direction bit and user-attribution fields
|
|
269
|
+
* (`A3`/`A4`/`A5`); for the keyed-payload envelope, the same five fields, sealed into its inner JSON.
|
|
270
|
+
* Shared by both actuate intents; the `ff09` settings intents carry a narrower subset (the GET/SET frames
|
|
271
|
+
* omit the user-attribution fields).
|
|
271
272
|
*/
|
|
272
273
|
export interface Ff09Identity {
|
|
273
274
|
/** Actuation direction: `true` = engage (lock / close), `false` = release (unlock / open) — the frame's `A3` byte. */
|
|
@@ -353,6 +354,14 @@ export type Command = {
|
|
|
353
354
|
channel: number;
|
|
354
355
|
} | ({
|
|
355
356
|
kind: "ff09-actuate";
|
|
357
|
+
} & Ff09Identity)
|
|
358
|
+
/**
|
|
359
|
+
* `keyed-payload-actuate` — a `SET_PAYLOAD` envelope whose inner JSON is sealed with a fresh AES key
|
|
360
|
+
* that the envelope itself carries, wrapped for the device's own public key. P2P-only; the router
|
|
361
|
+
* resolves the device key and the member display name from the device record.
|
|
362
|
+
*/
|
|
363
|
+
| ({
|
|
364
|
+
kind: "keyed-payload-actuate";
|
|
356
365
|
} & Ff09Identity) | {
|
|
357
366
|
kind: "ff09-autolock";
|
|
358
367
|
adminUserId: string;
|