@mega-yfue/eufy-sdk 0.5.0-beta.1 → 0.5.0-beta.10
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 +18 -6
- package/dist/core/store.d.ts +2 -0
- package/dist/index.js +1379 -39
- package/dist/index.js.map +4 -4
- package/dist/model/device-family.d.ts +2 -0
- package/dist/model/registry.d.ts +3 -2
- package/dist/model/types.d.ts +6 -0
- package/dist/transport/http/mega-client.d.ts +17 -0
- package/dist/transport/p2p/command-router.d.ts +8 -5
- package/dist/transport/p2p/live-stream.d.ts +3 -0
- package/dist/transport/p2p/p2p-session.d.ts +7 -2
- package/dist/transport/p2p/video.d.ts +3 -2
- package/dist/transport/rtc/command-router.d.ts +72 -0
- package/dist/transport/rtc/peer.d.ts +93 -0
- package/dist/transport/rtc/portal-packet.d.ts +66 -0
- package/dist/transport/rtc/ptcs-framer.d.ts +85 -0
- package/dist/transport/rtc/scall-sdp.d.ts +42 -0
- package/dist/transport/rtc/session.d.ts +78 -0
- package/dist/transport/rtc/signaling.d.ts +137 -0
- package/package.json +9 -1
|
@@ -98,6 +98,8 @@ export declare class EufyMega extends EventEmitter {
|
|
|
98
98
|
private readonly prewarmTiers;
|
|
99
99
|
/** Transport-side owner of the P2P sessions + all wire senders. */
|
|
100
100
|
private readonly p2p;
|
|
101
|
+
/** Transport-side owner of the T9000 station sessions (sibling of {@link p2p}). */
|
|
102
|
+
private readonly rtc;
|
|
101
103
|
/** Transport-side owner of the secure-MQTT ff09 lock/garage command path (sibling of {@link p2p}). */
|
|
102
104
|
private readonly mqtt;
|
|
103
105
|
/** Transport-side owner of the legacy Tuya REST command path for non-AIoT vacuums (G-series). */
|
|
@@ -234,6 +236,11 @@ export declare class EufyMega extends EventEmitter {
|
|
|
234
236
|
*
|
|
235
237
|
* The evidence set is widened, never replaced: the ids come back through the cloud record, and a
|
|
236
238
|
* record that omits a realtime-only id would otherwise un-know it and re-trigger on the next report.
|
|
239
|
+
*
|
|
240
|
+
* The device is re-resolved against the fresh record before binding. A property gated on a
|
|
241
|
+
* realtime-only param enters the schema only once that param is evidence, and the value that made it
|
|
242
|
+
* evidence was stored before the property existed, so the record's realtime params are applied again
|
|
243
|
+
* to land it under the property's name.
|
|
237
244
|
*/
|
|
238
245
|
private rebindReads;
|
|
239
246
|
/** The distinct credential scopes the current MQTT roster needs — no devices on a scope, no connection. */
|
|
@@ -409,8 +416,9 @@ export declare class EufyMega extends EventEmitter {
|
|
|
409
416
|
* The `eufy_life` DP writes (smart lights) are secure-MQTT-only. `aiot-dp` routes to either the
|
|
410
417
|
* Anker AIoT MQTT stack or the legacy Tuya REST router depending on the device's category
|
|
411
418
|
* (`eufy_home_tuya` → Tuya, everything else → MQTT). The capability layer emits a single `aiot-dp`
|
|
412
|
-
* kind and stays transport-agnostic; only the facade sees both sides and decides here.
|
|
413
|
-
*
|
|
419
|
+
* kind and stays transport-agnostic; only the facade sees both sides and decides here. A T9000
|
|
420
|
+
* station and the devices attached to it go over RTC, with an attached device's command refused
|
|
421
|
+
* unless its channel resolves back to it on the station. Everything else is P2P.
|
|
414
422
|
*/
|
|
415
423
|
private routeCommand;
|
|
416
424
|
/**
|
|
@@ -835,11 +843,14 @@ export declare class EufyMega extends EventEmitter {
|
|
|
835
843
|
*/
|
|
836
844
|
setProperty(sn: string, name: string, value: boolean | number | string): Promise<void>;
|
|
837
845
|
/**
|
|
838
|
-
* Restart a HomeBase.
|
|
846
|
+
* Restart a station: a HomeBase, or a camera-family device that is its own station.
|
|
839
847
|
*
|
|
840
|
-
*
|
|
841
|
-
*
|
|
842
|
-
*
|
|
848
|
+
* The restart is `RESTART_HUB` on the station's broadcast channel, so it reaches whatever owns the
|
|
849
|
+
* P2P session. A standalone camera or doorbell owns its own session and is the station it restarts.
|
|
850
|
+
* A camera attached to a HomeBase is not — the same frame would restart its HomeBase — so its serial
|
|
851
|
+
* throws, as does any non-camera serial, rather than doing nothing. The device drops its connection
|
|
852
|
+
* and returns after a minute or two; a HomeBase takes everything behind it offline meanwhile.
|
|
853
|
+
* Verified on real hardware against a HomeBase and a standalone indoor camera.
|
|
843
854
|
*/
|
|
844
855
|
reboot(sn: string): Promise<void>;
|
|
845
856
|
/**
|
|
@@ -857,6 +868,7 @@ export declare class EufyMega extends EventEmitter {
|
|
|
857
868
|
* exactly the reads it has.
|
|
858
869
|
*/
|
|
859
870
|
private fetchDpCatalog;
|
|
871
|
+
/** The {@link CommandContext} for a device, built from `known` when that record is already in hand. */
|
|
860
872
|
private commandContext;
|
|
861
873
|
/**
|
|
862
874
|
* **Generic P2P request/reply query** — sends a `SET_PAYLOAD` sub-command and resolves with the
|
package/dist/core/store.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ export interface PersistedSession {
|
|
|
16
16
|
authToken: string;
|
|
17
17
|
geoKey?: string;
|
|
18
18
|
region: RegionShard;
|
|
19
|
+
/** The host `estimate_domain` answered; it names shards the region classification cannot (`ie`). */
|
|
20
|
+
estimatedDomain?: string;
|
|
19
21
|
openudid: string;
|
|
20
22
|
/** This install's reported device model + media user-agent, generated once and reused. */
|
|
21
23
|
phoneModel?: string;
|