@camstack/system 1.2.314 → 1.2.316
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/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/alerts/alerts.addon.js +1 -1
- package/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/dist/builtins/autotrack/index.js +1 -1
- package/dist/builtins/autotrack/index.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
- package/dist/builtins/camera-grid/index.js +1 -1
- package/dist/builtins/camera-grid/index.mjs +1 -1
- package/dist/builtins/composer/composer-plan.d.ts +8 -1
- package/dist/builtins/composer/composer.addon.js +191 -29
- package/dist/builtins/composer/composer.addon.mjs +195 -33
- package/dist/builtins/composer/composer.d.ts +5 -1
- package/dist/builtins/composer/composition-runtime.d.ts +10 -1
- package/dist/builtins/composer/existing-target.d.ts +9 -0
- package/dist/builtins/composer/field-record.d.ts +12 -3
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/core-blocks/composition-sources.d.ts +3 -1
- package/dist/builtins/core-blocks/core-blocks.addon.js +3 -103
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -102
- package/dist/builtins/device-manager/device-manager.addon.js +2 -2
- package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
- package/dist/builtins/doorbell/binding-mirror.d.ts +1 -0
- package/dist/builtins/doorbell/doorbell-composition-migration.d.ts +59 -0
- package/dist/builtins/doorbell/virtual-doorbell.addon.d.ts +3 -0
- package/dist/builtins/doorbell/virtual-doorbell.addon.js +315 -8
- package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +315 -8
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/dist/builtins/local-auth/local-auth.addon.js +1 -1
- package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
- package/dist/builtins/local-network/local-network.addon.js +1 -1
- package/dist/builtins/local-network/local-network.addon.mjs +1 -1
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/dist/builtins/platform-probe/index.js +1 -1
- package/dist/builtins/platform-probe/index.mjs +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/dist/builtins/snapshot/index.js +1 -1
- package/dist/builtins/snapshot/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/dist/builtins/system-config/system-config.addon.js +1 -1
- package/dist/builtins/system-config/system-config.addon.mjs +1 -1
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/composition-sources-BwE1POnF.js +122 -0
- package/dist/composition-sources-fUyF4z39.mjs +111 -0
- package/dist/{dist-cH4t1ZEm.mjs → dist-BPvku43i.mjs} +596 -305
- package/dist/{dist-BtNkk3Qz.js → dist-RAl10EfG.js} +625 -304
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{retired-settings-keys-B7imb-qH.js → retired-settings-keys-D3rGTGq5.js} +1 -1
- package/dist/{retired-settings-keys-DQYHfZ0S.mjs → retired-settings-keys-DqVWSrVw.mjs} +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("../../dist-
|
|
3
|
+
const require_dist = require("../../dist-RAl10EfG.js");
|
|
4
|
+
const require_composition_sources = require("../../composition-sources-BwE1POnF.js");
|
|
4
5
|
let node_crypto = require("node:crypto");
|
|
5
6
|
let _camstack_types_node = require("@camstack/types/node");
|
|
6
7
|
let node_fs_promises = require("node:fs/promises");
|
|
@@ -1410,107 +1411,6 @@ function buildCompositionApi(deps) {
|
|
|
1410
1411
|
};
|
|
1411
1412
|
}
|
|
1412
1413
|
//#endregion
|
|
1413
|
-
//#region src/builtins/core-blocks/composition-sources.ts
|
|
1414
|
-
/**
|
|
1415
|
-
* Describe what a composition reads and writes for SAVE-time validation
|
|
1416
|
-
* (D659, D663): one `listAll` per owning addon, one `getBindings` per found
|
|
1417
|
-
* device — shared by a device that is both a source and a target. A read that
|
|
1418
|
-
* fails makes the device `unreadable`, and the save is REFUSED rather than
|
|
1419
|
-
* stored unchecked. Refusing a save destroys nothing (D49).
|
|
1420
|
-
*
|
|
1421
|
-
* A SOURCE is described by the caps bound to it; an EXISTING TARGET by its row
|
|
1422
|
-
* type and each bound cap with the addon serving it — what `planComposition`
|
|
1423
|
-
* needs to tell a replace from an add (the composer reads it the same way, from
|
|
1424
|
-
* the same two reads: the slim row and `getBindings`).
|
|
1425
|
-
*
|
|
1426
|
-
* Devices are keyed by `{addonId, stableId}` — never a numeric device id,
|
|
1427
|
-
* which is this node's allocation and not the composition's identity.
|
|
1428
|
-
*/
|
|
1429
|
-
async function listOwners(ports, refs) {
|
|
1430
|
-
const addons = [...new Set(refs.map((r) => r.addonId))];
|
|
1431
|
-
const listed = await Promise.all(addons.map(async (addonId) => {
|
|
1432
|
-
try {
|
|
1433
|
-
return [addonId, await ports.listByAddon(addonId)];
|
|
1434
|
-
} catch (err) {
|
|
1435
|
-
return [addonId, { error: require_dist.errMsg(err) }];
|
|
1436
|
-
}
|
|
1437
|
-
}));
|
|
1438
|
-
return new Map(listed);
|
|
1439
|
-
}
|
|
1440
|
-
function rowOf(ref, listing) {
|
|
1441
|
-
if (listing === void 0) return {
|
|
1442
|
-
kind: "unreadable",
|
|
1443
|
-
error: `\`${ref.addonId}\` was not listed`
|
|
1444
|
-
};
|
|
1445
|
-
if ("error" in listing) return {
|
|
1446
|
-
kind: "unreadable",
|
|
1447
|
-
error: listing.error
|
|
1448
|
-
};
|
|
1449
|
-
const row = listing.find((r) => r.stableId === ref.stableId);
|
|
1450
|
-
return row === void 0 ? { kind: "absent" } : {
|
|
1451
|
-
kind: "row",
|
|
1452
|
-
row
|
|
1453
|
-
};
|
|
1454
|
-
}
|
|
1455
|
-
/** ONE `getBindings` per found device, whether it is read as a source, a target, or both. */
|
|
1456
|
-
async function readBindings(ports, deviceIds) {
|
|
1457
|
-
const read = await Promise.all([...new Set(deviceIds)].map(async (deviceId) => {
|
|
1458
|
-
try {
|
|
1459
|
-
return [deviceId, await ports.bindings(deviceId)];
|
|
1460
|
-
} catch (err) {
|
|
1461
|
-
return [deviceId, { error: require_dist.errMsg(err) }];
|
|
1462
|
-
}
|
|
1463
|
-
}));
|
|
1464
|
-
return new Map(read);
|
|
1465
|
-
}
|
|
1466
|
-
function describeSource(lookup, bindings) {
|
|
1467
|
-
if (lookup.kind !== "row") return lookup;
|
|
1468
|
-
const bound = bindings.get(lookup.row.id);
|
|
1469
|
-
if (bound === void 0) return {
|
|
1470
|
-
kind: "unreadable",
|
|
1471
|
-
error: "its bindings were not read"
|
|
1472
|
-
};
|
|
1473
|
-
if ("error" in bound) return {
|
|
1474
|
-
kind: "unreadable",
|
|
1475
|
-
error: bound.error
|
|
1476
|
-
};
|
|
1477
|
-
return {
|
|
1478
|
-
kind: "found",
|
|
1479
|
-
deviceId: lookup.row.id,
|
|
1480
|
-
caps: new Set(bound.map((b) => b.capName))
|
|
1481
|
-
};
|
|
1482
|
-
}
|
|
1483
|
-
function describeTarget(lookup, bindings) {
|
|
1484
|
-
if (lookup.kind !== "row") return lookup;
|
|
1485
|
-
const { id, type } = lookup.row;
|
|
1486
|
-
const bound = bindings.get(id);
|
|
1487
|
-
if (bound === void 0) return {
|
|
1488
|
-
kind: "unreadable",
|
|
1489
|
-
error: "its bindings were not read"
|
|
1490
|
-
};
|
|
1491
|
-
if ("error" in bound) return {
|
|
1492
|
-
kind: "unreadable",
|
|
1493
|
-
error: bound.error
|
|
1494
|
-
};
|
|
1495
|
-
return {
|
|
1496
|
-
kind: "found",
|
|
1497
|
-
deviceId: id,
|
|
1498
|
-
type,
|
|
1499
|
-
nativeCaps: new Map(bound.map((b) => [b.capName, b.nativeAddonId]))
|
|
1500
|
-
};
|
|
1501
|
-
}
|
|
1502
|
-
async function describeCompositionSources(ports, sources, targets = []) {
|
|
1503
|
-
const owners = await listOwners(ports, [...sources, ...targets]);
|
|
1504
|
-
const lookup = (ref) => [require_dist.compositionSourceKey(ref), rowOf(ref, owners.get(ref.addonId))];
|
|
1505
|
-
const sourceRows = sources.map(lookup);
|
|
1506
|
-
const targetRows = targets.map(lookup);
|
|
1507
|
-
const bindings = await readBindings(ports, [...sourceRows, ...targetRows].flatMap(([, l]) => l.kind === "row" ? [l.row.id] : []));
|
|
1508
|
-
return {
|
|
1509
|
-
sources: new Map(sourceRows.map(([key, l]) => [key, describeSource(l, bindings)])),
|
|
1510
|
-
targets: new Map(targetRows.map(([key, l]) => [key, describeTarget(l, bindings)]))
|
|
1511
|
-
};
|
|
1512
|
-
}
|
|
1513
|
-
//#endregion
|
|
1514
1414
|
//#region src/builtins/core-blocks/core-blocks.addon.ts
|
|
1515
1415
|
/**
|
|
1516
1416
|
* The `core-blocks` provider — CRUD over user-authored TypeScript, with the
|
|
@@ -1795,7 +1695,7 @@ var CoreBlocksAddon = class extends require_dist.BaseAddon {
|
|
|
1795
1695
|
};
|
|
1796
1696
|
return buildCompositionApi({
|
|
1797
1697
|
store: this.requireStore(),
|
|
1798
|
-
describe: (sources, targets) => describeCompositionSources({
|
|
1698
|
+
describe: (sources, targets) => require_composition_sources.describeCompositionSources({
|
|
1799
1699
|
listByAddon: async (addonId) => requireApi().deviceManager.listAll.query({
|
|
1800
1700
|
addonId,
|
|
1801
1701
|
projection: "slim"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ as coreBlockAddonId, Gn as BaseAddon, In as compositionSourceKey, K as buildCapabilityLookup, Q as compositionSourceRefs, Wn as errMsg, Xt as planComposition, d as CORE_BLOCK_ADDON_PREFIX, et as coreBlockComposition, f as CoreBlockSchema, h as DeclaredDevices, jn as composedDeviceRef, l as COMPOSER_RUNNER_ID, nt as coreBlockSourceKind, rt as coreBlocksCapability, t as ALL_CAPABILITY_DEFINITIONS, tn as replacedFieldKeys, tt as coreBlockIdFromAddonId, u as CORE_BLOCKS_ADDON_ID, yn as validateComposition } from "../../dist-BPvku43i.mjs";
|
|
2
|
+
import { t as describeCompositionSources } from "../../composition-sources-fUyF4z39.mjs";
|
|
2
3
|
import { randomUUID } from "node:crypto";
|
|
3
4
|
import { customizationBlockName } from "@camstack/types/node";
|
|
4
5
|
import * as fs from "node:fs/promises";
|
|
@@ -1406,107 +1407,6 @@ function buildCompositionApi(deps) {
|
|
|
1406
1407
|
};
|
|
1407
1408
|
}
|
|
1408
1409
|
//#endregion
|
|
1409
|
-
//#region src/builtins/core-blocks/composition-sources.ts
|
|
1410
|
-
/**
|
|
1411
|
-
* Describe what a composition reads and writes for SAVE-time validation
|
|
1412
|
-
* (D659, D663): one `listAll` per owning addon, one `getBindings` per found
|
|
1413
|
-
* device — shared by a device that is both a source and a target. A read that
|
|
1414
|
-
* fails makes the device `unreadable`, and the save is REFUSED rather than
|
|
1415
|
-
* stored unchecked. Refusing a save destroys nothing (D49).
|
|
1416
|
-
*
|
|
1417
|
-
* A SOURCE is described by the caps bound to it; an EXISTING TARGET by its row
|
|
1418
|
-
* type and each bound cap with the addon serving it — what `planComposition`
|
|
1419
|
-
* needs to tell a replace from an add (the composer reads it the same way, from
|
|
1420
|
-
* the same two reads: the slim row and `getBindings`).
|
|
1421
|
-
*
|
|
1422
|
-
* Devices are keyed by `{addonId, stableId}` — never a numeric device id,
|
|
1423
|
-
* which is this node's allocation and not the composition's identity.
|
|
1424
|
-
*/
|
|
1425
|
-
async function listOwners(ports, refs) {
|
|
1426
|
-
const addons = [...new Set(refs.map((r) => r.addonId))];
|
|
1427
|
-
const listed = await Promise.all(addons.map(async (addonId) => {
|
|
1428
|
-
try {
|
|
1429
|
-
return [addonId, await ports.listByAddon(addonId)];
|
|
1430
|
-
} catch (err) {
|
|
1431
|
-
return [addonId, { error: errMsg(err) }];
|
|
1432
|
-
}
|
|
1433
|
-
}));
|
|
1434
|
-
return new Map(listed);
|
|
1435
|
-
}
|
|
1436
|
-
function rowOf(ref, listing) {
|
|
1437
|
-
if (listing === void 0) return {
|
|
1438
|
-
kind: "unreadable",
|
|
1439
|
-
error: `\`${ref.addonId}\` was not listed`
|
|
1440
|
-
};
|
|
1441
|
-
if ("error" in listing) return {
|
|
1442
|
-
kind: "unreadable",
|
|
1443
|
-
error: listing.error
|
|
1444
|
-
};
|
|
1445
|
-
const row = listing.find((r) => r.stableId === ref.stableId);
|
|
1446
|
-
return row === void 0 ? { kind: "absent" } : {
|
|
1447
|
-
kind: "row",
|
|
1448
|
-
row
|
|
1449
|
-
};
|
|
1450
|
-
}
|
|
1451
|
-
/** ONE `getBindings` per found device, whether it is read as a source, a target, or both. */
|
|
1452
|
-
async function readBindings(ports, deviceIds) {
|
|
1453
|
-
const read = await Promise.all([...new Set(deviceIds)].map(async (deviceId) => {
|
|
1454
|
-
try {
|
|
1455
|
-
return [deviceId, await ports.bindings(deviceId)];
|
|
1456
|
-
} catch (err) {
|
|
1457
|
-
return [deviceId, { error: errMsg(err) }];
|
|
1458
|
-
}
|
|
1459
|
-
}));
|
|
1460
|
-
return new Map(read);
|
|
1461
|
-
}
|
|
1462
|
-
function describeSource(lookup, bindings) {
|
|
1463
|
-
if (lookup.kind !== "row") return lookup;
|
|
1464
|
-
const bound = bindings.get(lookup.row.id);
|
|
1465
|
-
if (bound === void 0) return {
|
|
1466
|
-
kind: "unreadable",
|
|
1467
|
-
error: "its bindings were not read"
|
|
1468
|
-
};
|
|
1469
|
-
if ("error" in bound) return {
|
|
1470
|
-
kind: "unreadable",
|
|
1471
|
-
error: bound.error
|
|
1472
|
-
};
|
|
1473
|
-
return {
|
|
1474
|
-
kind: "found",
|
|
1475
|
-
deviceId: lookup.row.id,
|
|
1476
|
-
caps: new Set(bound.map((b) => b.capName))
|
|
1477
|
-
};
|
|
1478
|
-
}
|
|
1479
|
-
function describeTarget(lookup, bindings) {
|
|
1480
|
-
if (lookup.kind !== "row") return lookup;
|
|
1481
|
-
const { id, type } = lookup.row;
|
|
1482
|
-
const bound = bindings.get(id);
|
|
1483
|
-
if (bound === void 0) return {
|
|
1484
|
-
kind: "unreadable",
|
|
1485
|
-
error: "its bindings were not read"
|
|
1486
|
-
};
|
|
1487
|
-
if ("error" in bound) return {
|
|
1488
|
-
kind: "unreadable",
|
|
1489
|
-
error: bound.error
|
|
1490
|
-
};
|
|
1491
|
-
return {
|
|
1492
|
-
kind: "found",
|
|
1493
|
-
deviceId: id,
|
|
1494
|
-
type,
|
|
1495
|
-
nativeCaps: new Map(bound.map((b) => [b.capName, b.nativeAddonId]))
|
|
1496
|
-
};
|
|
1497
|
-
}
|
|
1498
|
-
async function describeCompositionSources(ports, sources, targets = []) {
|
|
1499
|
-
const owners = await listOwners(ports, [...sources, ...targets]);
|
|
1500
|
-
const lookup = (ref) => [compositionSourceKey(ref), rowOf(ref, owners.get(ref.addonId))];
|
|
1501
|
-
const sourceRows = sources.map(lookup);
|
|
1502
|
-
const targetRows = targets.map(lookup);
|
|
1503
|
-
const bindings = await readBindings(ports, [...sourceRows, ...targetRows].flatMap(([, l]) => l.kind === "row" ? [l.row.id] : []));
|
|
1504
|
-
return {
|
|
1505
|
-
sources: new Map(sourceRows.map(([key, l]) => [key, describeSource(l, bindings)])),
|
|
1506
|
-
targets: new Map(targetRows.map(([key, l]) => [key, describeTarget(l, bindings)]))
|
|
1507
|
-
};
|
|
1508
|
-
}
|
|
1509
|
-
//#endregion
|
|
1510
1410
|
//#region src/builtins/core-blocks/core-blocks.addon.ts
|
|
1511
1411
|
/**
|
|
1512
1412
|
* The `core-blocks` provider — CRUD over user-authored TypeScript, with the
|
|
@@ -3,8 +3,8 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
7
|
-
const require_retired_settings_keys = require("../../retired-settings-keys-
|
|
6
|
+
const require_dist = require("../../dist-RAl10EfG.js");
|
|
7
|
+
const require_retired_settings_keys = require("../../retired-settings-keys-D3rGTGq5.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
10
10
|
let _camstack_types_node = require("@camstack/types/node");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-
|
|
1
|
+
import { Gn as BaseAddon, Hn as DeviceRole, Kt as normalizeUnit, Lt as locationIconKey, Nt as legacyAutoLinkIds, S as LocationIconIdSchema, Un as DeviceType, Vn as DeviceFeature, Wn as errMsg, Yt as parseStreamParamsFormPatch, Zn as WELL_KNOWN_TAB_MAP, _t as enumerateSchemaFields, an as runtimeStatePolicyFor, bt as expandContainer, ct as defineExtensionSlotProvider, dt as deviceManagerCapability, ft as deviceStateCapability, g as DeviceStatusSchema, gt as enumerateItemArrayFields, hr as EventCategory, it as createDeviceExtensionProvider, j as STREAM_PROFILE_META, mr as sleep$1, o as CAMERA_SWITCH_ORDER, or as isDeviceConfigCap, p as DAY_NAMES, pt as deviceStatusCapability, q as buildStreamParamsConfigSchema, s as CAP_NAMES_WITH_STATUS, t as ALL_CAPABILITY_DEFINITIONS, un as siteZoneKey, ut as deviceExtensionCapability, v as FieldClaimModeSchema, w as MINUTES_PER_DAY, wt as formatMinutes, y as FieldClaimSchema } from "../../dist-BPvku43i.mjs";
|
|
2
|
+
import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-DqVWSrVw.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
import { canonicalDeviceFingerprint } from "@camstack/types/node";
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { CompositionFieldsFeature, CompositionSourceRef, DeviceType, ICoreBlocksProvider, IScopedLogger } from '@camstack/types';
|
|
2
|
+
import { BindingEntryView } from './binding-mirror.js';
|
|
3
|
+
import { DoorbellSource } from './doorbell-settings.js';
|
|
4
|
+
export declare const DOORBELL_COMPOSITION_MIGRATION_STATE_KEY = "doorbell-source-composition-migration-v1";
|
|
5
|
+
export declare const DOORBELL_COMPOSITION_MIGRATION_CALLER: {
|
|
6
|
+
readonly userId: "system:doorbell-source-migration";
|
|
7
|
+
readonly isAdmin: true;
|
|
8
|
+
};
|
|
9
|
+
export interface DoorbellMigrationDevice {
|
|
10
|
+
readonly id: number;
|
|
11
|
+
readonly addonId: string;
|
|
12
|
+
readonly stableId: string;
|
|
13
|
+
readonly type: DeviceType;
|
|
14
|
+
}
|
|
15
|
+
export interface DoorbellMigrationBindingRow {
|
|
16
|
+
readonly deviceId: number;
|
|
17
|
+
readonly entries: readonly BindingEntryView[];
|
|
18
|
+
}
|
|
19
|
+
export interface DoorbellCompositionMigrationDeps {
|
|
20
|
+
readonly logger: IScopedLogger;
|
|
21
|
+
readonly listCameras: () => Promise<readonly DoorbellMigrationDevice[]>;
|
|
22
|
+
readonly listSourceDevices: (deviceIds: readonly number[]) => Promise<readonly DoorbellMigrationDevice[]>;
|
|
23
|
+
readonly readSources: (cameraId: number) => Promise<readonly DoorbellSource[]>;
|
|
24
|
+
readonly getBindingsBatch: (deviceIds: readonly number[]) => Promise<readonly DoorbellMigrationBindingRow[]>;
|
|
25
|
+
readonly coreBlocks: () => ICoreBlocksProvider | null;
|
|
26
|
+
readonly setWrapperActive: (input: {
|
|
27
|
+
readonly deviceId: number;
|
|
28
|
+
readonly capName: 'doorbell';
|
|
29
|
+
readonly wrapperAddonId: 'virtual-doorbell';
|
|
30
|
+
readonly active: false;
|
|
31
|
+
}) => Promise<void>;
|
|
32
|
+
readonly isComplete: () => Promise<boolean>;
|
|
33
|
+
readonly markComplete: () => Promise<void>;
|
|
34
|
+
}
|
|
35
|
+
interface DoorbellFeatureSource {
|
|
36
|
+
readonly source: CompositionSourceRef;
|
|
37
|
+
readonly cap: string;
|
|
38
|
+
readonly activeField: string;
|
|
39
|
+
readonly changedAtField: string;
|
|
40
|
+
}
|
|
41
|
+
export declare function buildDoorbellCompositionFeature(input: {
|
|
42
|
+
readonly camera: CompositionSourceRef;
|
|
43
|
+
readonly sources: readonly DoorbellFeatureSource[];
|
|
44
|
+
readonly enabled: boolean;
|
|
45
|
+
}): CompositionFieldsFeature;
|
|
46
|
+
export declare class DoorbellCompositionMigration {
|
|
47
|
+
private readonly deps;
|
|
48
|
+
private rerunRequested;
|
|
49
|
+
private inFlight;
|
|
50
|
+
private stopped;
|
|
51
|
+
constructor(deps: DoorbellCompositionMigrationDeps);
|
|
52
|
+
request(reason: string): void;
|
|
53
|
+
waitForIdle(): Promise<void>;
|
|
54
|
+
shutdown(): void;
|
|
55
|
+
private runUntilQuiet;
|
|
56
|
+
private runAttempt;
|
|
57
|
+
private warnCamera;
|
|
58
|
+
}
|
|
59
|
+
export {};
|
|
@@ -42,6 +42,8 @@ interface VirtualDoorbellAddonConfig {
|
|
|
42
42
|
*/
|
|
43
43
|
export declare class VirtualDoorbellAddon extends BaseAddon<VirtualDoorbellAddonConfig> {
|
|
44
44
|
private engine;
|
|
45
|
+
private compositionMigration;
|
|
46
|
+
private providerRegisteredUnsubscribe;
|
|
45
47
|
/** Monotonic guard: assignments are reloaded lazily on trigger traffic. */
|
|
46
48
|
private assignmentsLoadedAt;
|
|
47
49
|
private assignmentsLoading;
|
|
@@ -53,6 +55,7 @@ export declare class VirtualDoorbellAddon extends BaseAddon<VirtualDoorbellAddon
|
|
|
53
55
|
private readonly bindingMirror;
|
|
54
56
|
constructor();
|
|
55
57
|
protected onInitialize(): Promise<ProviderRegistration[]>;
|
|
58
|
+
protected onShutdown(): Promise<void>;
|
|
56
59
|
/**
|
|
57
60
|
* The `device-extension` provider: the only editor of a camera's trigger
|
|
58
61
|
* devices since D655 (see `doorbell-extension-slot.ts`).
|