@camstack/types 1.2.589 → 1.2.590
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/CHANGELOG.md +6 -0
- package/dist/addon.js +4 -4
- package/dist/addon.mjs +4 -4
- package/dist/capabilities/battery.cap.d.ts +7 -41
- package/dist/capabilities/index.d.ts +5 -1
- package/dist/capabilities/low-power-sleep.cap.d.ts +83 -0
- package/dist/capabilities/resync.cap.d.ts +40 -0
- package/dist/client.js +9 -4
- package/dist/client.mjs +9 -4
- package/dist/{composed-stable-id-Kt5VKzGZ.mjs → composed-stable-id-BNTaDZEh.mjs} +9 -8
- package/dist/{composed-stable-id-DDv-Og0u.js → composed-stable-id-BdeYe5dD.js} +9 -8
- package/dist/device/device-feature-requirements.d.ts +3 -4
- package/dist/device/device-profile.d.ts +1 -1
- package/dist/device/device-type.d.ts +9 -8
- package/dist/device/low-power-sleep.d.ts +19 -0
- package/dist/device/resync-through-adoption.d.ts +12 -0
- package/dist/enums/event-category.d.ts +1 -1
- package/dist/enums.js +1 -1
- package/dist/enums.mjs +1 -1
- package/dist/{event-category-CE_VCE2G.js → event-category-BKxXXxnV.js} +1 -1
- package/dist/{event-category-Hwx_JSCU.mjs → event-category-CY27-fF0.mjs} +1 -1
- package/dist/generated/addon-api.d.ts +37 -8
- package/dist/generated/addon-cap-facts.d.ts +1 -1
- package/dist/generated/cap-status-types.d.ts +3 -1
- package/dist/generated/cap-vocabulary.d.ts +1 -1
- package/dist/generated/capability-router-map.d.ts +8 -2
- package/dist/generated/device-local-state.d.ts +3 -0
- package/dist/generated/device-proxy.d.ts +5 -0
- package/dist/generated/device-scoped-caps.d.ts +1 -1
- package/dist/generated/history-catalog.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +1 -1
- package/dist/generated/runtime-state-durability.d.ts +1 -1
- package/dist/{implemented-methods-CbdShcW1.js → implemented-methods-BarLh7tc.js} +1 -1
- package/dist/{implemented-methods-BiV3Y-40.mjs → implemented-methods-k3KProJd.mjs} +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +252 -66
- package/dist/index.mjs +246 -67
- package/dist/interfaces/event-bus.d.ts +1 -1
- package/dist/node.js +2 -2
- package/dist/node.mjs +2 -2
- package/dist/{sleep-CICYFVJf.js → sleep-BA_SIc0O.js} +47 -9
- package/dist/{sleep-CFN40XWx.mjs → sleep-BT1bLgPq.mjs} +47 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-
|
|
3
|
-
const require_event_category = require("./event-category-
|
|
4
|
-
const require_composed_stable_id = require("./composed-stable-id-
|
|
5
|
-
const require_implemented_methods = require("./implemented-methods-
|
|
2
|
+
const require_sleep = require("./sleep-BA_SIc0O.js");
|
|
3
|
+
const require_event_category = require("./event-category-BKxXXxnV.js");
|
|
4
|
+
const require_composed_stable_id = require("./composed-stable-id-BdeYe5dD.js");
|
|
5
|
+
const require_implemented_methods = require("./implemented-methods-BarLh7tc.js");
|
|
6
6
|
const require_node_color = require("./node-color.js");
|
|
7
7
|
const require_convert = require("./convert-BI8iTXn6.js");
|
|
8
8
|
const require_device_template_catalogue = require("./device-template-catalogue.js");
|
|
@@ -43428,9 +43428,9 @@ var backupCapability = {
|
|
|
43428
43428
|
//#endregion
|
|
43429
43429
|
//#region src/capabilities/battery.cap.ts
|
|
43430
43430
|
/**
|
|
43431
|
-
* Battery status snapshot. Emitted by providers whose device
|
|
43432
|
-
* battery
|
|
43433
|
-
*
|
|
43431
|
+
* Battery status snapshot. Emitted by providers whose device reports a
|
|
43432
|
+
* battery (`DeviceFeature.BatteryOperated`): battery cameras, sensors,
|
|
43433
|
+
* buttons. Whether the device SLEEPS is `low-power-sleep`, not this cap. Consumers build their own "low
|
|
43434
43434
|
* battery" alerting on top — the cap deliberately does NOT enforce a
|
|
43435
43435
|
* threshold.
|
|
43436
43436
|
*/
|
|
@@ -43587,47 +43587,12 @@ var batteryCapability = {
|
|
|
43587
43587
|
deviceNative: true,
|
|
43588
43588
|
mode: "singleton",
|
|
43589
43589
|
deviceTypes: BATTERY_DEVICE_TYPES,
|
|
43590
|
-
methods: {
|
|
43591
|
-
/**
|
|
43592
|
-
* Explicitly wake the camera from low-power sleep ahead of a
|
|
43593
|
-
* streaming session start. Consumers that initiate a stream
|
|
43594
|
-
* against a sleeping battery cam (HomeKit Secure Video, Alexa
|
|
43595
|
-
* RTCSession, snapshot wrappers) call this with a short timeout
|
|
43596
|
-
* before establishing the media pipeline — the broker's own
|
|
43597
|
-
* passive wake-on-dial works but adds 5–7 seconds to first-frame,
|
|
43598
|
-
* during which the consumer renders a black screen. Pre-waking
|
|
43599
|
-
* compresses that gap.
|
|
43600
|
-
*
|
|
43601
|
-
* Returns `awoke: true` when the firmware acknowledged the wake
|
|
43602
|
-
* before `timeoutMs`. Returns `awoke: false` when it timed out OR
|
|
43603
|
-
* the cap surface is unavailable (no Baichuan / firmware
|
|
43604
|
-
* channel); the caller should still attempt the stream — the
|
|
43605
|
-
* passive broker wake remains as fallback.
|
|
43606
|
-
*/
|
|
43607
|
-
wakeForStream: require_sleep.method(zod.z.object({
|
|
43608
|
-
deviceId: zod.z.number(),
|
|
43609
|
-
/** Bound on the wait. Sensible range 3000–10000ms. */
|
|
43610
|
-
timeoutMs: zod.z.number().int().min(500).max(3e4).default(8e3)
|
|
43611
|
-
}), zod.z.object({
|
|
43612
|
-
awoke: zod.z.boolean(),
|
|
43613
|
-
durationMs: zod.z.number()
|
|
43614
|
-
}), {
|
|
43615
|
-
kind: "mutation",
|
|
43616
|
-
notOperatorFacing: "a stream consumer wakes a sleeping camera to watch it; an automation that wants footage asks for the footage"
|
|
43617
|
-
}) },
|
|
43618
43590
|
/**
|
|
43619
|
-
*
|
|
43620
|
-
*
|
|
43621
|
-
*
|
|
43622
|
-
* … the cap surface is unavailable." (D663).
|
|
43591
|
+
* No methods: waking a sleeping camera is `low-power-sleep.wakeUp`
|
|
43592
|
+
* (#459, Q2). A battery reading says nothing about sleep — a battery sensor
|
|
43593
|
+
* reports charge and never needs waking.
|
|
43623
43594
|
*/
|
|
43624
|
-
|
|
43625
|
-
kind: "answer",
|
|
43626
|
-
value: {
|
|
43627
|
-
awoke: false,
|
|
43628
|
-
durationMs: 0
|
|
43629
|
-
}
|
|
43630
|
-
} },
|
|
43595
|
+
methods: {},
|
|
43631
43596
|
events: {
|
|
43632
43597
|
/**
|
|
43633
43598
|
* Emitted whenever the cached status changes (firmware push OR
|
|
@@ -51529,7 +51494,7 @@ function groupTemplate(id) {
|
|
|
51529
51494
|
//#region src/generated/history-catalog.ts
|
|
51530
51495
|
/**
|
|
51531
51496
|
* Cap history catalog, projected from every `*.cap.ts` `history` block.
|
|
51532
|
-
* 47 caps with series (130 series),
|
|
51497
|
+
* 47 caps with series (130 series), 40 caps answered `'none'`.
|
|
51533
51498
|
* Field keys are `runtimeState` paths (`a.b` into fixed objects only).
|
|
51534
51499
|
*/
|
|
51535
51500
|
var HISTORY_CATALOG = {
|
|
@@ -52318,6 +52283,7 @@ var HISTORY_NONE_CAPS = [
|
|
|
52318
52283
|
"image-settings",
|
|
52319
52284
|
"intercom",
|
|
52320
52285
|
"ir-transmitter",
|
|
52286
|
+
"low-power-sleep",
|
|
52321
52287
|
"motion-trigger",
|
|
52322
52288
|
"motion-zones",
|
|
52323
52289
|
"native-object-detection",
|
|
@@ -70536,6 +70502,92 @@ var loginMethodCapability = {
|
|
|
70536
70502
|
vocabulary: { notOperatorFacing: require_sleep.NOT_A_DEVICE.IDENTITY }
|
|
70537
70503
|
};
|
|
70538
70504
|
//#endregion
|
|
70505
|
+
//#region src/capabilities/low-power-sleep.cap.ts
|
|
70506
|
+
/**
|
|
70507
|
+
* low-power-sleep — a device that goes into low-power sleep and must be WOKEN
|
|
70508
|
+
* before it streams (#459, Q2). A battery camera (Reolink Argus, a robot's
|
|
70509
|
+
* on-board camera) is one; a battery SENSOR is not: it reports charge on the
|
|
70510
|
+
* `battery` cap and never sleeps. The two meanings used to share
|
|
70511
|
+
* `DeviceFeature.BatteryOperated`; this cap is the one that answers "sleeps",
|
|
70512
|
+
* and `DeviceFeature.Sleeps` is derived from it being bound with
|
|
70513
|
+
* `wakeUp` implemented.
|
|
70514
|
+
*
|
|
70515
|
+
* The state is the sleep inputs (`deriveBatteryPresence`): whether the device
|
|
70516
|
+
* is asleep, and the last time it PROVED it was reachable. Read from this slice
|
|
70517
|
+
* by the stream broker (`readBatterySleepFacts`), the recorder
|
|
70518
|
+
* (`recordingWakeDeps`) and the snapshot builtin. The broker's per-device
|
|
70519
|
+
* mirror is still also fed by `BatteryOnStatusChanged` events.
|
|
70520
|
+
*/
|
|
70521
|
+
var LowPowerSleepStatusSchema = zod.z.object({
|
|
70522
|
+
/**
|
|
70523
|
+
* True while the firmware is in low-power mode. A provider MUST avoid polling
|
|
70524
|
+
* during sleep — a read wakes the device and drains charge.
|
|
70525
|
+
*/
|
|
70526
|
+
sleeping: zod.z.boolean().meta({ label: "Sleeping" }),
|
|
70527
|
+
/**
|
|
70528
|
+
* Ms epoch of the last time the device proved it was reachable, from
|
|
70529
|
+
* PASSIVE signals only (a completed round-trip, an observed wake, a push).
|
|
70530
|
+
* Absent = never since this slice was born. The only input that separates
|
|
70531
|
+
* "asleep" from "gone".
|
|
70532
|
+
*/
|
|
70533
|
+
lastContactAt: zod.z.number().optional(),
|
|
70534
|
+
/** Ms epoch of the last observation. */
|
|
70535
|
+
lastUpdated: zod.z.number().meta(require_sleep.readingMeta("none"))
|
|
70536
|
+
});
|
|
70537
|
+
var lowPowerSleepCapability = {
|
|
70538
|
+
name: "low-power-sleep",
|
|
70539
|
+
scope: "device",
|
|
70540
|
+
deviceNative: true,
|
|
70541
|
+
mode: "singleton",
|
|
70542
|
+
deviceTypes: [require_composed_stable_id.DeviceType.Camera],
|
|
70543
|
+
methods: {
|
|
70544
|
+
/**
|
|
70545
|
+
* Explicitly wake the device from low-power sleep ahead of a streaming
|
|
70546
|
+
* session start. Consumers that initiate a stream against a sleeping
|
|
70547
|
+
* camera (wake-on-play, the recorder, HomeKit, Alexa, snapshot wrappers)
|
|
70548
|
+
* call this with a short timeout before establishing the media pipeline —
|
|
70549
|
+
* the broker's own passive wake-on-dial works but adds 5–7 seconds to
|
|
70550
|
+
* first-frame. Pre-waking compresses that gap.
|
|
70551
|
+
*
|
|
70552
|
+
* Returns `awoke: true` when the firmware acknowledged the wake before
|
|
70553
|
+
* `timeoutMs`, `awoke: false` when it timed out; the caller should still
|
|
70554
|
+
* attempt the stream — the passive broker wake remains as fallback.
|
|
70555
|
+
*/
|
|
70556
|
+
wakeUp: require_sleep.method(zod.z.object({
|
|
70557
|
+
deviceId: zod.z.number(),
|
|
70558
|
+
/** Bound on the wait. Sensible range 3000–10000ms. */
|
|
70559
|
+
timeoutMs: zod.z.number().int().min(500).max(3e4).default(8e3)
|
|
70560
|
+
}), zod.z.object({
|
|
70561
|
+
awoke: zod.z.boolean(),
|
|
70562
|
+
durationMs: zod.z.number()
|
|
70563
|
+
}), {
|
|
70564
|
+
kind: "mutation",
|
|
70565
|
+
notOperatorFacing: "a stream consumer wakes a sleeping camera to watch it; an automation that wants footage asks for the footage"
|
|
70566
|
+
}) },
|
|
70567
|
+
status: {
|
|
70568
|
+
schema: LowPowerSleepStatusSchema,
|
|
70569
|
+
kind: "push",
|
|
70570
|
+
empty: {
|
|
70571
|
+
sleeping: false,
|
|
70572
|
+
lastUpdated: 0
|
|
70573
|
+
}
|
|
70574
|
+
},
|
|
70575
|
+
runtimeState: LowPowerSleepStatusSchema,
|
|
70576
|
+
/**
|
|
70577
|
+
* Runtime-state durability: **restored** — a sleeping camera may not report
|
|
70578
|
+
* for hours; the restored sleep inputs are the only thing the sleep gate and
|
|
70579
|
+
* the presence derivation have (the same argument as `battery`).
|
|
70580
|
+
*/
|
|
70581
|
+
durability: "restored",
|
|
70582
|
+
/** History (D850): none — battery never recorded a sleep series either. */
|
|
70583
|
+
history: "none",
|
|
70584
|
+
volatileStateFields: ["lastUpdated"],
|
|
70585
|
+
vocabulary: {
|
|
70586
|
+
noun: require_sleep.t("Low-power sleep", "Sospensione a basso consumo"),
|
|
70587
|
+
order: 5245
|
|
70588
|
+
}
|
|
70589
|
+
};
|
|
70590
|
+
//#endregion
|
|
70539
70591
|
//#region src/capabilities/mesh-network.cap.ts
|
|
70540
70592
|
/**
|
|
70541
70593
|
* mesh-network — collection cap for mesh-VPN providers.
|
|
@@ -94435,6 +94487,44 @@ var remoteLayoutComponentsCapability = {
|
|
|
94435
94487
|
vocabulary: { notOperatorFacing: "the palette of the remote template editor — read-only data, never actuated" }
|
|
94436
94488
|
};
|
|
94437
94489
|
//#endregion
|
|
94490
|
+
//#region src/capabilities/resync.cap.ts
|
|
94491
|
+
/**
|
|
94492
|
+
* resync — a device whose derived spec can be re-aligned on demand with its
|
|
94493
|
+
* upstream source (#459, Q6). Registered by the containers an integration
|
|
94494
|
+
* adopted; `DeviceFeature.Resyncable` (the generic Re-sync button) is derived
|
|
94495
|
+
* from it being bound with `resync` implemented.
|
|
94496
|
+
*
|
|
94497
|
+
* The work itself stays where it is: the owning addon's `device-adoption`
|
|
94498
|
+
* provider, reached through `deviceManager.adoptionResync` (which also owns
|
|
94499
|
+
* the "resync from zero" child purge). A provider answers this method by
|
|
94500
|
+
* asking for exactly that — see `resyncThroughAdoption`.
|
|
94501
|
+
*/
|
|
94502
|
+
var ResyncDeviceInputSchema = zod.z.object({
|
|
94503
|
+
deviceId: zod.z.number().int().nonnegative(),
|
|
94504
|
+
/** "Resync from zero": purge the accessory children before re-deriving. */
|
|
94505
|
+
resetToSource: zod.z.boolean().optional()
|
|
94506
|
+
});
|
|
94507
|
+
var resyncCapability = {
|
|
94508
|
+
name: "resync",
|
|
94509
|
+
scope: "device",
|
|
94510
|
+
deviceNative: true,
|
|
94511
|
+
mode: "singleton",
|
|
94512
|
+
deviceTypes: [
|
|
94513
|
+
require_composed_stable_id.DeviceType.Container,
|
|
94514
|
+
require_composed_stable_id.DeviceType.Workload,
|
|
94515
|
+
require_composed_stable_id.DeviceType.WeatherStation
|
|
94516
|
+
],
|
|
94517
|
+
methods: { resync: require_sleep.method(ResyncDeviceInputSchema, ResyncResultSchema, {
|
|
94518
|
+
kind: "mutation",
|
|
94519
|
+
auth: "admin",
|
|
94520
|
+
notOperatorFacing: "device adoption — re-aligning a device with its source is an onboarding step, not an automation action"
|
|
94521
|
+
}) },
|
|
94522
|
+
vocabulary: {
|
|
94523
|
+
noun: require_sleep.t("Re-sync", "Risincronizzazione"),
|
|
94524
|
+
order: 3245
|
|
94525
|
+
}
|
|
94526
|
+
};
|
|
94527
|
+
//#endregion
|
|
94438
94528
|
//#region src/running-state/defaults.ts
|
|
94439
94529
|
var RUNNING_POWER_THRESHOLD_WATTS = 5;
|
|
94440
94530
|
/**
|
|
@@ -104290,6 +104380,7 @@ var CAPABILITY_NAMES = {
|
|
|
104290
104380
|
logChannels: "log-channels",
|
|
104291
104381
|
logDestination: "log-destination",
|
|
104292
104382
|
loginMethod: "login-method",
|
|
104383
|
+
lowPowerSleep: "low-power-sleep",
|
|
104293
104384
|
mediaPlayer: "media-player",
|
|
104294
104385
|
meshNetwork: "mesh-network",
|
|
104295
104386
|
meter: "meter",
|
|
@@ -104343,6 +104434,7 @@ var CAPABILITY_NAMES = {
|
|
|
104343
104434
|
records: "records",
|
|
104344
104435
|
remote: "remote",
|
|
104345
104436
|
remoteLayoutComponents: "remote-layout-components",
|
|
104437
|
+
resync: "resync",
|
|
104346
104438
|
runningState: "running-state",
|
|
104347
104439
|
sceneMonitor: "scene-monitor",
|
|
104348
104440
|
schedulers: "schedulers",
|
|
@@ -104828,6 +104920,10 @@ var CAPABILITY_ROUTER_KEYS = [
|
|
|
104828
104920
|
key: "loginMethod",
|
|
104829
104921
|
name: "login-method"
|
|
104830
104922
|
},
|
|
104923
|
+
{
|
|
104924
|
+
key: "lowPowerSleep",
|
|
104925
|
+
name: "low-power-sleep"
|
|
104926
|
+
},
|
|
104831
104927
|
{
|
|
104832
104928
|
key: "mediaPlayer",
|
|
104833
104929
|
name: "media-player"
|
|
@@ -105040,6 +105136,10 @@ var CAPABILITY_ROUTER_KEYS = [
|
|
|
105040
105136
|
key: "remoteLayoutComponents",
|
|
105041
105137
|
name: "remote-layout-components"
|
|
105042
105138
|
},
|
|
105139
|
+
{
|
|
105140
|
+
key: "resync",
|
|
105141
|
+
name: "resync"
|
|
105142
|
+
},
|
|
105043
105143
|
{
|
|
105044
105144
|
key: "runningState",
|
|
105045
105145
|
name: "running-state"
|
|
@@ -105359,6 +105459,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
105359
105459
|
logChannelsCapability,
|
|
105360
105460
|
logDestinationCapability,
|
|
105361
105461
|
loginMethodCapability,
|
|
105462
|
+
lowPowerSleepCapability,
|
|
105362
105463
|
mediaPlayerCapability,
|
|
105363
105464
|
meshNetworkCapability,
|
|
105364
105465
|
meterCapability,
|
|
@@ -105412,6 +105513,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
105412
105513
|
recordsCapability,
|
|
105413
105514
|
remoteCapability,
|
|
105414
105515
|
remoteLayoutComponentsCapability,
|
|
105516
|
+
resyncCapability,
|
|
105415
105517
|
runningStateCapability,
|
|
105416
105518
|
sceneMonitorCapability,
|
|
105417
105519
|
schedulersCapability,
|
|
@@ -113551,6 +113653,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
113551
113653
|
irTransmitter: irTransmitterCapability,
|
|
113552
113654
|
lawnMowerControl: lawnMowerControlCapability,
|
|
113553
113655
|
lockControl: lockControlCapability,
|
|
113656
|
+
lowPowerSleep: lowPowerSleepCapability,
|
|
113554
113657
|
mediaPlayer: mediaPlayerCapability,
|
|
113555
113658
|
meter: meterCapability,
|
|
113556
113659
|
motion: motionCapability,
|
|
@@ -115101,6 +115204,50 @@ function isBatteryPresenceFault(presence) {
|
|
|
115101
115204
|
return presence === "unreachable";
|
|
115102
115205
|
}
|
|
115103
115206
|
//#endregion
|
|
115207
|
+
//#region src/device/low-power-sleep.ts
|
|
115208
|
+
/**
|
|
115209
|
+
* Does this device SLEEP and need waking before it streams (#459, Q2)?
|
|
115210
|
+
*
|
|
115211
|
+
* The one predicate every data-plane consumer asks (prebuffer, wake-on-play,
|
|
115212
|
+
* the recorder, sentry, the snapshot wrapper, the detection profile). It reads
|
|
115213
|
+
* `DeviceFeature.Sleeps`, derived from the `low-power-sleep` cap — never
|
|
115214
|
+
* `DeviceFeature.BatteryOperated`, which only says the device reports a
|
|
115215
|
+
* battery: a battery sensor reports charge and never sleeps.
|
|
115216
|
+
*/
|
|
115217
|
+
function deviceSleeps(features) {
|
|
115218
|
+
return features.includes(require_composed_stable_id.DeviceFeature.Sleeps);
|
|
115219
|
+
}
|
|
115220
|
+
/**
|
|
115221
|
+
* The `low-power-sleep` slice a provider projects from the `battery` slice it
|
|
115222
|
+
* already keeps: the sleep inputs, nothing else. One fact, one writer — the
|
|
115223
|
+
* provider's battery bookkeeping stays the source until the sleep state gets
|
|
115224
|
+
* its own writer.
|
|
115225
|
+
*/
|
|
115226
|
+
function sleepSliceOfBattery(status) {
|
|
115227
|
+
return {
|
|
115228
|
+
sleeping: status.sleeping,
|
|
115229
|
+
...status.lastContactAt !== void 0 ? { lastContactAt: status.lastContactAt } : {},
|
|
115230
|
+
lastUpdated: status.lastUpdated
|
|
115231
|
+
};
|
|
115232
|
+
}
|
|
115233
|
+
//#endregion
|
|
115234
|
+
//#region src/device/resync-through-adoption.ts
|
|
115235
|
+
/**
|
|
115236
|
+
* The `resync` provider of an adopted container (#459, Q6): the work is the
|
|
115237
|
+
* owning addon's `device-adoption.resync`, reached through
|
|
115238
|
+
* `deviceManager.adoptionResync`, which also owns the "resync from zero" child
|
|
115239
|
+
* purge. Registering this is what makes `DeviceFeature.Resyncable` true.
|
|
115240
|
+
*/
|
|
115241
|
+
function resyncThroughAdoption(deviceManager, ownDeviceId) {
|
|
115242
|
+
return { resync: async ({ deviceId, resetToSource }) => {
|
|
115243
|
+
if (deviceId !== ownDeviceId) throw new Error(`resync: deviceId mismatch, expected ${ownDeviceId}, got ${deviceId}`);
|
|
115244
|
+
return deviceManager.adoptionResync.mutate({
|
|
115245
|
+
camDeviceId: deviceId,
|
|
115246
|
+
...resetToSource !== void 0 ? { resetToSource } : {}
|
|
115247
|
+
});
|
|
115248
|
+
} };
|
|
115249
|
+
}
|
|
115250
|
+
//#endregion
|
|
115104
115251
|
//#region src/device/container-primary-child.ts
|
|
115105
115252
|
/**
|
|
115106
115253
|
* WHICH child a container stands for — one definition, for every consumer.
|
|
@@ -120809,13 +120956,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
120809
120956
|
access: "view",
|
|
120810
120957
|
role: "viewer"
|
|
120811
120958
|
},
|
|
120812
|
-
"battery.wakeForStream": {
|
|
120813
|
-
capName: "battery",
|
|
120814
|
-
capScope: "device",
|
|
120815
|
-
addonId: null,
|
|
120816
|
-
access: "create",
|
|
120817
|
-
role: "viewer"
|
|
120818
|
-
},
|
|
120819
120959
|
"binary.getStatus": {
|
|
120820
120960
|
capName: "binary",
|
|
120821
120961
|
capScope: "device",
|
|
@@ -124470,6 +124610,20 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
124470
124610
|
access: "view",
|
|
124471
124611
|
role: "admin"
|
|
124472
124612
|
},
|
|
124613
|
+
"lowPowerSleep.getStatus": {
|
|
124614
|
+
capName: "low-power-sleep",
|
|
124615
|
+
capScope: "device",
|
|
124616
|
+
addonId: null,
|
|
124617
|
+
access: "view",
|
|
124618
|
+
role: "viewer"
|
|
124619
|
+
},
|
|
124620
|
+
"lowPowerSleep.wakeUp": {
|
|
124621
|
+
capName: "low-power-sleep",
|
|
124622
|
+
capScope: "device",
|
|
124623
|
+
addonId: null,
|
|
124624
|
+
access: "create",
|
|
124625
|
+
role: "viewer"
|
|
124626
|
+
},
|
|
124473
124627
|
"mediaPlayer.channelDown": {
|
|
124474
124628
|
capName: "media-player",
|
|
124475
124629
|
capScope: "device",
|
|
@@ -128145,6 +128299,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
128145
128299
|
access: "view",
|
|
128146
128300
|
role: "admin"
|
|
128147
128301
|
},
|
|
128302
|
+
"resync.resync": {
|
|
128303
|
+
capName: "resync",
|
|
128304
|
+
capScope: "device",
|
|
128305
|
+
addonId: null,
|
|
128306
|
+
access: "create",
|
|
128307
|
+
role: "admin"
|
|
128308
|
+
},
|
|
128148
128309
|
"runningState.getStatus": {
|
|
128149
128310
|
capName: "running-state",
|
|
128150
128311
|
capScope: "device",
|
|
@@ -130650,6 +130811,7 @@ var KNOWN_CAP_NAMES = [
|
|
|
130650
130811
|
"log-channels",
|
|
130651
130812
|
"log-destination",
|
|
130652
130813
|
"login-method",
|
|
130814
|
+
"low-power-sleep",
|
|
130653
130815
|
"media-player",
|
|
130654
130816
|
"mesh-network",
|
|
130655
130817
|
"meter",
|
|
@@ -130703,6 +130865,7 @@ var KNOWN_CAP_NAMES = [
|
|
|
130703
130865
|
"records",
|
|
130704
130866
|
"remote",
|
|
130705
130867
|
"remote-layout-components",
|
|
130868
|
+
"resync",
|
|
130706
130869
|
"running-state",
|
|
130707
130870
|
"scene-monitor",
|
|
130708
130871
|
"schedulers",
|
|
@@ -130812,6 +130975,7 @@ var DEVICE_CAP_NAMES = [
|
|
|
130812
130975
|
"ir-transmitter",
|
|
130813
130976
|
"lawn-mower-control",
|
|
130814
130977
|
"lock-control",
|
|
130978
|
+
"low-power-sleep",
|
|
130815
130979
|
"media-player",
|
|
130816
130980
|
"meter",
|
|
130817
130981
|
"motion",
|
|
@@ -130839,6 +131003,7 @@ var DEVICE_CAP_NAMES = [
|
|
|
130839
131003
|
"recording",
|
|
130840
131004
|
"recording-onboard",
|
|
130841
131005
|
"recording-signal",
|
|
131006
|
+
"resync",
|
|
130842
131007
|
"running-state",
|
|
130843
131008
|
"scene-monitor",
|
|
130844
131009
|
"script-runner",
|
|
@@ -131283,7 +131448,7 @@ function deviceMatchesProfile(features, profile) {
|
|
|
131283
131448
|
var BATTERY_DEVICE_PROFILE = {
|
|
131284
131449
|
id: "battery",
|
|
131285
131450
|
label: "Battery-operated camera",
|
|
131286
|
-
when: { hasFeature: require_composed_stable_id.DeviceFeature.
|
|
131451
|
+
when: { hasFeature: require_composed_stable_id.DeviceFeature.Sleeps },
|
|
131287
131452
|
defaults: {
|
|
131288
131453
|
audioMode: "disabled",
|
|
131289
131454
|
detectionMode: "on-motion"
|
|
@@ -131322,13 +131487,13 @@ function reported(reason) {
|
|
|
131322
131487
|
reason
|
|
131323
131488
|
};
|
|
131324
131489
|
}
|
|
131325
|
-
var SLEEP_PENDING = "splits into a sleeping cap in a later phase of #459";
|
|
131326
131490
|
var CAP_PENDING = "becomes a cap or is dropped in a later phase of #459";
|
|
131327
131491
|
/** Exhaustive: a new `DeviceFeature` without a row does not compile. */
|
|
131328
131492
|
var DEVICE_FEATURE_REQUIREMENTS = {
|
|
131329
|
-
[require_composed_stable_id.DeviceFeature.BatteryOperated]:
|
|
131493
|
+
[require_composed_stable_id.DeviceFeature.BatteryOperated]: bound("battery"),
|
|
131494
|
+
[require_composed_stable_id.DeviceFeature.Sleeps]: derived("low-power-sleep", ["wakeUp"]),
|
|
131330
131495
|
[require_composed_stable_id.DeviceFeature.Rebootable]: derived("reboot", ["reboot"]),
|
|
131331
|
-
[require_composed_stable_id.DeviceFeature.Resyncable]:
|
|
131496
|
+
[require_composed_stable_id.DeviceFeature.Resyncable]: derived("resync", ["resync"]),
|
|
131332
131497
|
[require_composed_stable_id.DeviceFeature.NativeSnapshot]: reported(CAP_PENDING),
|
|
131333
131498
|
[require_composed_stable_id.DeviceFeature.DoorbellButton]: derived("doorbell"),
|
|
131334
131499
|
[require_composed_stable_id.DeviceFeature.TwoWayAudio]: derived("intercom", [
|
|
@@ -131380,9 +131545,7 @@ var DEVICE_FEATURE_REQUIREMENTS = {
|
|
|
131380
131545
|
[require_composed_stable_id.DeviceFeature.NotifierRecipients]: reported(CAP_PENDING),
|
|
131381
131546
|
[require_composed_stable_id.DeviceFeature.ScriptVariables]: reported(CAP_PENDING),
|
|
131382
131547
|
[require_composed_stable_id.DeviceFeature.AutomationSkipCondition]: reported(CAP_PENDING),
|
|
131383
|
-
[require_composed_stable_id.DeviceFeature.VacuumHasMap]: reported(CAP_PENDING),
|
|
131384
131548
|
[require_composed_stable_id.DeviceFeature.VacuumHasAi]: reported(CAP_PENDING),
|
|
131385
|
-
[require_composed_stable_id.DeviceFeature.MowerHasMap]: reported(CAP_PENDING),
|
|
131386
131549
|
[require_composed_stable_id.DeviceFeature.MowerHasTargetedMowing]: reported(CAP_PENDING),
|
|
131387
131550
|
[require_composed_stable_id.DeviceFeature.Navigation]: derived("navigation"),
|
|
131388
131551
|
[require_composed_stable_id.DeviceFeature.NetworkLink]: derived("network-link")
|
|
@@ -132984,6 +133147,7 @@ var CAP_NAMES_WITH_STATUS = [
|
|
|
132984
133147
|
"intercom",
|
|
132985
133148
|
"lawn-mower-control",
|
|
132986
133149
|
"lock-control",
|
|
133150
|
+
"low-power-sleep",
|
|
132987
133151
|
"media-player",
|
|
132988
133152
|
"meter",
|
|
132989
133153
|
"motion",
|
|
@@ -133180,11 +133344,6 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
133180
133344
|
form: "single",
|
|
133181
133345
|
optional: false
|
|
133182
133346
|
}],
|
|
133183
|
-
"battery.wakeForStream": [{
|
|
133184
|
-
name: "deviceId",
|
|
133185
|
-
form: "single",
|
|
133186
|
-
optional: false
|
|
133187
|
-
}],
|
|
133188
133347
|
"binary.getStatus": [{
|
|
133189
133348
|
name: "deviceId",
|
|
133190
133349
|
form: "single",
|
|
@@ -134368,6 +134527,16 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
134368
134527
|
form: "single",
|
|
134369
134528
|
optional: true
|
|
134370
134529
|
}],
|
|
134530
|
+
"lowPowerSleep.getStatus": [{
|
|
134531
|
+
name: "deviceId",
|
|
134532
|
+
form: "single",
|
|
134533
|
+
optional: false
|
|
134534
|
+
}],
|
|
134535
|
+
"lowPowerSleep.wakeUp": [{
|
|
134536
|
+
name: "deviceId",
|
|
134537
|
+
form: "single",
|
|
134538
|
+
optional: false
|
|
134539
|
+
}],
|
|
134371
134540
|
"mediaPlayer.channelDown": [{
|
|
134372
134541
|
name: "deviceId",
|
|
134373
134542
|
form: "single",
|
|
@@ -135653,6 +135822,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
135653
135822
|
form: "single",
|
|
135654
135823
|
optional: false
|
|
135655
135824
|
}],
|
|
135825
|
+
"resync.resync": [{
|
|
135826
|
+
name: "deviceId",
|
|
135827
|
+
form: "single",
|
|
135828
|
+
optional: false
|
|
135829
|
+
}],
|
|
135656
135830
|
"runningState.getStatus": [{
|
|
135657
135831
|
name: "deviceId",
|
|
135658
135832
|
form: "single",
|
|
@@ -136505,7 +136679,7 @@ function getCapsByProviderKind(kind) {
|
|
|
136505
136679
|
//#region src/generated/runtime-state-durability.ts
|
|
136506
136680
|
/**
|
|
136507
136681
|
* Per-cap runtime-state policy, projected from every `*.cap.ts` that declares
|
|
136508
|
-
* `runtimeState`.
|
|
136682
|
+
* `runtimeState`. 88 caps: 44 `restored`, 44 `session`.
|
|
136509
136683
|
*
|
|
136510
136684
|
* A cap absent from this map has no runtime-state slice at all. A cap PRESENT
|
|
136511
136685
|
* with `durability: 'session'` has one and has decided not to keep it.
|
|
@@ -136685,6 +136859,10 @@ var RUNTIME_STATE_POLICY = {
|
|
|
136685
136859
|
durability: "restored",
|
|
136686
136860
|
volatileFields: ["lastChangedAt"]
|
|
136687
136861
|
},
|
|
136862
|
+
"low-power-sleep": {
|
|
136863
|
+
durability: "restored",
|
|
136864
|
+
volatileFields: ["lastUpdated"]
|
|
136865
|
+
},
|
|
136688
136866
|
"media-player": {
|
|
136689
136867
|
durability: "session",
|
|
136690
136868
|
volatileFields: []
|
|
@@ -136906,6 +137084,7 @@ var RESTORED_CAP_NAMES = [
|
|
|
136906
137084
|
"image-settings",
|
|
136907
137085
|
"ir-transmitter",
|
|
136908
137086
|
"lock-control",
|
|
137087
|
+
"low-power-sleep",
|
|
136909
137088
|
"meter",
|
|
136910
137089
|
"motion-zones",
|
|
136911
137090
|
"native-object-detection",
|
|
@@ -151867,6 +152046,7 @@ exports.LoggingSettingsPatchSchema = LoggingSettingsPatchSchema;
|
|
|
151867
152046
|
exports.LoggingSettingsStateSchema = LoggingSettingsStateSchema;
|
|
151868
152047
|
exports.LoginMethodContributionSchema = LoginMethodContributionSchema;
|
|
151869
152048
|
exports.LoginStageEnum = LoginStageEnum;
|
|
152049
|
+
exports.LowPowerSleepStatusSchema = LowPowerSleepStatusSchema;
|
|
151870
152050
|
exports.LtsBucketSchema = LtsBucketSchema;
|
|
151871
152051
|
exports.MACRO_LABELS = MACRO_LABELS;
|
|
151872
152052
|
exports.MASK_EMITTING_POSTPROCESSORS = MASK_EMITTING_POSTPROCESSORS;
|
|
@@ -152709,6 +152889,7 @@ exports.RequestCensusProcedureSchema = RequestCensusProcedureSchema;
|
|
|
152709
152889
|
exports.RequestCensusSnapshotSchema = RequestCensusSnapshotSchema;
|
|
152710
152890
|
exports.RequestCensusStatusSchema = RequestCensusStatusSchema;
|
|
152711
152891
|
exports.RequiredAddonUpdateSchema = RequiredAddonUpdateSchema;
|
|
152892
|
+
exports.ResyncDeviceInputSchema = ResyncDeviceInputSchema;
|
|
152712
152893
|
exports.RetrainAnnotationDraftSchema = RetrainAnnotationDraftSchema;
|
|
152713
152894
|
exports.RetrainAnnotationKindSchema = RetrainAnnotationKindSchema;
|
|
152714
152895
|
exports.RetrainAnnotationSchema = RetrainAnnotationSchema;
|
|
@@ -153707,6 +153888,7 @@ exports.deviceRemovalHookCapability = deviceRemovalHookCapability;
|
|
|
153707
153888
|
exports.deviceRoleIconKey = deviceRoleIconKey;
|
|
153708
153889
|
exports.deviceRunsCapability = deviceRunsCapability;
|
|
153709
153890
|
exports.deviceSelectorMatches = deviceSelectorMatches;
|
|
153891
|
+
exports.deviceSleeps = deviceSleeps;
|
|
153710
153892
|
exports.deviceStateCapability = deviceStateCapability;
|
|
153711
153893
|
exports.deviceStatusCapability = deviceStatusCapability;
|
|
153712
153894
|
exports.deviceTemplateCallableBounds = require_device_template_catalogue.deviceTemplateCallableBounds;
|
|
@@ -154128,6 +154310,7 @@ exports.logDestinationCapability = logDestinationCapability;
|
|
|
154128
154310
|
exports.logLevelAtMost = logLevelAtMost;
|
|
154129
154311
|
exports.loginMethodCapability = loginMethodCapability;
|
|
154130
154312
|
exports.looseSchema = looseSchema;
|
|
154313
|
+
exports.lowPowerSleepCapability = lowPowerSleepCapability;
|
|
154131
154314
|
exports.makeInMemoryRecords = require_sleep.makeInMemoryRecords;
|
|
154132
154315
|
exports.makeProfileBrokerId = require_sleep.makeProfileBrokerId;
|
|
154133
154316
|
exports.makeSecretMarker = require_sleep.makeSecretMarker;
|
|
@@ -154519,6 +154702,8 @@ exports.resolveViewableDeviceIds = resolveViewableDeviceIds;
|
|
|
154519
154702
|
exports.resolvedValues = require_sleep.resolvedValues;
|
|
154520
154703
|
exports.resultCellKey = resultCellKey;
|
|
154521
154704
|
exports.resultStandings = resultStandings;
|
|
154705
|
+
exports.resyncCapability = resyncCapability;
|
|
154706
|
+
exports.resyncThroughAdoption = resyncThroughAdoption;
|
|
154522
154707
|
exports.retiredTargetsOver = retiredTargetsOver;
|
|
154523
154708
|
exports.retrainBoxIou = retrainBoxIou;
|
|
154524
154709
|
exports.retrainRevisionConflictMessage = retrainRevisionConflictMessage;
|
|
@@ -154640,6 +154825,7 @@ exports.siteZoneKey = siteZoneKey;
|
|
|
154640
154825
|
exports.skipSignature = skipSignature;
|
|
154641
154826
|
exports.sleep = require_sleep.sleep;
|
|
154642
154827
|
exports.sleepCancellable = require_sleep.sleepCancellable;
|
|
154828
|
+
exports.sleepSliceOfBattery = sleepSliceOfBattery;
|
|
154643
154829
|
exports.sliceActiveValue = require_implemented_methods.sliceActiveValue;
|
|
154644
154830
|
exports.sliceCapOf = sliceCapOf;
|
|
154645
154831
|
exports.sliceChangedAt = require_implemented_methods.sliceChangedAt;
|