@mega-yfue/eufy-sdk 0.5.0-beta.92 → 0.5.0-beta.93
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.
|
@@ -416,7 +416,7 @@ export declare class EufyMega extends EventEmitter {
|
|
|
416
416
|
/**
|
|
417
417
|
* The station a device's commands go through: the device itself, or the HomeBase the registry links it
|
|
418
418
|
* to. Answers the target record, the station record and serial, the station's `device_type`, and the
|
|
419
|
-
* `t9000` / `t8n00` / `
|
|
419
|
+
* `t9000` / `t8n00` / `callDoorbell` family flags.
|
|
420
420
|
*/
|
|
421
421
|
private stationOf;
|
|
422
422
|
/** The vendor DeviceType of the station a device hangs off; `undefined` for a station itself. */
|
|
@@ -445,14 +445,14 @@ export declare class EufyMega extends EventEmitter {
|
|
|
445
445
|
* kind and stays transport-agnostic; only the facade sees both sides and decides here. A T9000 or T8N00
|
|
446
446
|
* station and the devices attached to it go over RTC, with an attached device's command refused
|
|
447
447
|
* unless its channel resolves back to it on the station. T8N00 uses full SDP and admits direct and
|
|
448
|
-
* relay candidates; T9000 retains compact SDP and relay-only candidates. A
|
|
448
|
+
* relay candidates; T9000 retains compact SDP and relay-only candidates. A call doorbell's route serves
|
|
449
449
|
* media only, and the RTC router refuses a command on it. Everything else is P2P.
|
|
450
450
|
*/
|
|
451
451
|
private routeCommand;
|
|
452
452
|
/**
|
|
453
|
-
* The RTC route for a T9000 or T8N00 station or a device attached to one, or a
|
|
453
|
+
* The RTC route for a T9000 or T8N00 station or a device attached to one, or a call doorbell that is its
|
|
454
454
|
* own station, decided by the station's model classification; `undefined` for any other device. A T8N00
|
|
455
|
-
* route carries its native `call` signalling; a
|
|
455
|
+
* route carries its native `call` signalling; a doorbell route does too, and streams its video on a media
|
|
456
456
|
* track. The admin id is the station's `member.admin_user_id`, else the logged-in user.
|
|
457
457
|
*/
|
|
458
458
|
private rtcRouteFor;
|
package/dist/index.js
CHANGED
|
@@ -3683,7 +3683,7 @@ var isStation9000 = (ctx) => ctx.deviceType === DeviceType.STATION_9000;
|
|
|
3683
3683
|
var isNvrT8N00 = (ctx) => ctx.model === "T8N00";
|
|
3684
3684
|
var isNvrMediaCamera = (ctx) => ctx.model === "T8E00" || ctx.model === "T8P00";
|
|
3685
3685
|
var isNvrDualLensCamera = (ctx) => ctx.model === "T8E00";
|
|
3686
|
-
var
|
|
3686
|
+
var isCallDoorbell = (ctx) => ctx.model === "T8223" || ctx.model === "T8224";
|
|
3687
3687
|
var isAiotVacuum = (ctx) => ctx.category !== "eufy_home_tuya";
|
|
3688
3688
|
var isTuyaVacuum = (ctx) => ctx.category === "eufy_home_tuya";
|
|
3689
3689
|
var isVideoSmartLock = (ctx) => ctx.deviceType === DeviceType.LOCK_8530;
|
|
@@ -29751,7 +29751,7 @@ var EufyMega = class extends EventEmitter14 {
|
|
|
29751
29751
|
/**
|
|
29752
29752
|
* The station a device's commands go through: the device itself, or the HomeBase the registry links it
|
|
29753
29753
|
* to. Answers the target record, the station record and serial, the station's `device_type`, and the
|
|
29754
|
-
* `t9000` / `t8n00` / `
|
|
29754
|
+
* `t9000` / `t8n00` / `callDoorbell` family flags.
|
|
29755
29755
|
*/
|
|
29756
29756
|
stationOf(sn) {
|
|
29757
29757
|
const devices = this.registry.list();
|
|
@@ -29769,7 +29769,7 @@ var EufyMega = class extends EventEmitter14 {
|
|
|
29769
29769
|
deviceType,
|
|
29770
29770
|
t9000: isStation9000(family),
|
|
29771
29771
|
t8n00: isNvrT8N00(family),
|
|
29772
|
-
|
|
29772
|
+
callDoorbell: isCallDoorbell(family)
|
|
29773
29773
|
};
|
|
29774
29774
|
}
|
|
29775
29775
|
/** The vendor DeviceType of the station a device hangs off; `undefined` for a station itself. */
|
|
@@ -29831,7 +29831,7 @@ var EufyMega = class extends EventEmitter14 {
|
|
|
29831
29831
|
* kind and stays transport-agnostic; only the facade sees both sides and decides here. A T9000 or T8N00
|
|
29832
29832
|
* station and the devices attached to it go over RTC, with an attached device's command refused
|
|
29833
29833
|
* unless its channel resolves back to it on the station. T8N00 uses full SDP and admits direct and
|
|
29834
|
-
* relay candidates; T9000 retains compact SDP and relay-only candidates. A
|
|
29834
|
+
* relay candidates; T9000 retains compact SDP and relay-only candidates. A call doorbell's route serves
|
|
29835
29835
|
* media only, and the RTC router refuses a command on it. Everything else is P2P.
|
|
29836
29836
|
*/
|
|
29837
29837
|
routeCommand(sn, cmd) {
|
|
@@ -29861,14 +29861,14 @@ var EufyMega = class extends EventEmitter14 {
|
|
|
29861
29861
|
return this.p2p.dispatchCommand(sn, cmd);
|
|
29862
29862
|
}
|
|
29863
29863
|
/**
|
|
29864
|
-
* The RTC route for a T9000 or T8N00 station or a device attached to one, or a
|
|
29864
|
+
* The RTC route for a T9000 or T8N00 station or a device attached to one, or a call doorbell that is its
|
|
29865
29865
|
* own station, decided by the station's model classification; `undefined` for any other device. A T8N00
|
|
29866
|
-
* route carries its native `call` signalling; a
|
|
29866
|
+
* route carries its native `call` signalling; a doorbell route does too, and streams its video on a media
|
|
29867
29867
|
* track. The admin id is the station's `member.admin_user_id`, else the logged-in user.
|
|
29868
29868
|
*/
|
|
29869
29869
|
rtcRouteFor(sn) {
|
|
29870
|
-
const { target, station, stationSn, raw, t9000, t8n00: native,
|
|
29871
|
-
const doorbell =
|
|
29870
|
+
const { target, station, stationSn, raw, t9000, t8n00: native, callDoorbell } = this.stationOf(sn);
|
|
29871
|
+
const doorbell = callDoorbell && stationSn === sn;
|
|
29872
29872
|
if (!target || !station || !(t9000 || native || doorbell))
|
|
29873
29873
|
return void 0;
|
|
29874
29874
|
const member = raw.member?.admin_user_id;
|