@camstack/addon-export-hap 1.2.197 → 1.2.198
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/hap-export.addon.js +607 -685
- package/dist/hap-export.addon.mjs +607 -685
- package/package.json +2 -2
package/dist/hap-export.addon.js
CHANGED
|
@@ -852,7 +852,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
852
852
|
return EventCategory;
|
|
853
853
|
}({});
|
|
854
854
|
//#endregion
|
|
855
|
-
//#region ../types/dist/device-type-
|
|
855
|
+
//#region ../types/dist/device-type-DxCT0krO.mjs
|
|
856
856
|
/**
|
|
857
857
|
import { errMsg } from '@camstack/types'
|
|
858
858
|
* Extract a human-readable message from an unknown error value.
|
|
@@ -1014,6 +1014,13 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
|
1014
1014
|
* filters that want "all devices with on-motion behaviour".
|
|
1015
1015
|
*/
|
|
1016
1016
|
DeviceFeature["MotionTrigger"] = "motion-trigger";
|
|
1017
|
+
/**
|
|
1018
|
+
* Device can be run for a chosen time and then stopped. Mirrors the
|
|
1019
|
+
* `timed-run` wrapper cap — the cap is bound by the core-blocks addon, not by
|
|
1020
|
+
* a driver, so the flag is derived from the device's bindings
|
|
1021
|
+
* (`featuresOfBoundCaps`). Gates the quick-run control in the viewer.
|
|
1022
|
+
*/
|
|
1023
|
+
DeviceFeature["TimedRun"] = "timed-run";
|
|
1017
1024
|
/** Light supports rgb-triplet color via `color` cap. */
|
|
1018
1025
|
DeviceFeature["LightColorRgb"] = "light-color-rgb";
|
|
1019
1026
|
/** Light supports HSV color via `color` cap. */
|
|
@@ -6048,7 +6055,7 @@ var ZodIssueCode = {
|
|
|
6048
6055
|
var ZodFirstPartyTypeKind;
|
|
6049
6056
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
6050
6057
|
//#endregion
|
|
6051
|
-
//#region ../types/dist/sleep-
|
|
6058
|
+
//#region ../types/dist/sleep-CGPZyzB5.mjs
|
|
6052
6059
|
/**
|
|
6053
6060
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
6054
6061
|
* window to float samples (D455).
|
|
@@ -7264,6 +7271,7 @@ var RecordIntegrationInstances = class {
|
|
|
7264
7271
|
this.secretKeys = topLevelSecretKeys(kind.declaration.secretPaths);
|
|
7265
7272
|
this.secretMaps = secretMapKeys(kind.declaration.secretPaths);
|
|
7266
7273
|
this.nameField = kind.declaration.entry?.nameField ?? "name";
|
|
7274
|
+
if (hooks.kindOf === void 0 && hooks.description.kinds.length !== 1) throw new Error(`record kind '${kind.name}': describe().kinds has ${hooks.description.kinds.length} entries, so kindOf is required to say which one an instance is`);
|
|
7267
7275
|
}
|
|
7268
7276
|
/**
|
|
7269
7277
|
* One instance read for the addon's own runtime; null when absent. When the keychain is
|
|
@@ -7305,10 +7313,21 @@ var RecordIntegrationInstances = class {
|
|
|
7305
7313
|
}
|
|
7306
7314
|
return out;
|
|
7307
7315
|
}
|
|
7316
|
+
/** The kind an instance body is of: the provider's `kindOf`, else its one declared kind. */
|
|
7317
|
+
kindOfBody(body) {
|
|
7318
|
+
if (this.hooks.kindOf !== void 0) {
|
|
7319
|
+
const id = this.hooks.kindOf(body);
|
|
7320
|
+
if (!this.hooks.description.kinds.some((declared) => declared.id === id)) throw new Error(`record kind '${this.kind.name}': kindOf returned '${id}', which describe().kinds does not declare (D1013)`);
|
|
7321
|
+
return id;
|
|
7322
|
+
}
|
|
7323
|
+
const only = this.hooks.description.kinds[0];
|
|
7324
|
+
if (only === void 0) throw new Error(`record kind '${this.kind.name}' declares no kinds`);
|
|
7325
|
+
return only.id;
|
|
7326
|
+
}
|
|
7308
7327
|
viewOf(record) {
|
|
7309
7328
|
const shown = secretViewsOf(this.records.owner, this.kind.name, record.id, this.kind.declaration, record.data);
|
|
7310
7329
|
const rawName = record.data[this.nameField];
|
|
7311
|
-
const kind = this.
|
|
7330
|
+
const kind = this.kindOfBody(record.data);
|
|
7312
7331
|
const health = this.hooks.health?.(record.data, record.id);
|
|
7313
7332
|
return {
|
|
7314
7333
|
id: record.id,
|
|
@@ -7316,7 +7335,7 @@ var RecordIntegrationInstances = class {
|
|
|
7316
7335
|
configured: this.hooks.configured(record.data),
|
|
7317
7336
|
enabled: isInstanceEnabled(record.data),
|
|
7318
7337
|
formValues: shown,
|
|
7319
|
-
|
|
7338
|
+
kind,
|
|
7320
7339
|
...health?.status !== void 0 ? { status: health.status } : {},
|
|
7321
7340
|
...health?.lastCheckedAt !== void 0 ? { lastCheckedAt: health.lastCheckedAt } : {}
|
|
7322
7341
|
};
|
|
@@ -8417,7 +8436,7 @@ function boundOf(list) {
|
|
|
8417
8436
|
* Base class for CamStack addons. Eliminates settings boilerplate:
|
|
8418
8437
|
*
|
|
8419
8438
|
* - Typed `config` property with automatic resolution from store + defaults
|
|
8420
|
-
* -
|
|
8439
|
+
* - the scoped settings API (`clusterSettings` / `nodeSettings` / `deviceDefaults`) auto-implemented
|
|
8421
8440
|
* - `getAddonSettings()` / `updateAddonSettings()` auto-implemented
|
|
8422
8441
|
* - `getDeviceSettings()` / `updateDeviceSettings()` auto-implemented
|
|
8423
8442
|
* - `ctx` accessor for the AddonContext (no manual `this.ctxRef` storage)
|
|
@@ -8427,7 +8446,7 @@ function boundOf(list) {
|
|
|
8427
8446
|
* Subclasses override:
|
|
8428
8447
|
* - `onInitialize()` — addon-specific init logic, return ProviderRegistration[]
|
|
8429
8448
|
* - `onShutdown()` — cleanup
|
|
8430
|
-
* - `
|
|
8449
|
+
* - `clusterSettingsSchema()` / `nodeSettingsSchema()` / `deviceSettingsSchema()` — UI schemas
|
|
8431
8450
|
*
|
|
8432
8451
|
* @example
|
|
8433
8452
|
* ```ts
|
|
@@ -8441,7 +8460,7 @@ function boundOf(list) {
|
|
|
8441
8460
|
* super({ maxRetries: 3, endpoint: 'http://localhost' })
|
|
8442
8461
|
* }
|
|
8443
8462
|
*
|
|
8444
|
-
* protected
|
|
8463
|
+
* protected clusterSettingsSchema() {
|
|
8445
8464
|
* return this.schema({
|
|
8446
8465
|
* sections: [{
|
|
8447
8466
|
* id: 'main', title: 'Settings',
|
|
@@ -8484,7 +8503,7 @@ var BaseAddon = class {
|
|
|
8484
8503
|
defaults;
|
|
8485
8504
|
/**
|
|
8486
8505
|
* Hidden-state paths that hold secrets (D787) — values the addon writes
|
|
8487
|
-
* itself (`
|
|
8506
|
+
* itself (`state()`, the scoped writers) that no form field declares.
|
|
8488
8507
|
* Stored in the keychain exactly like a `password` field. Syntax:
|
|
8489
8508
|
* `'snapshotSigningKey'`, `'identity.pincode'`, `'tokens[userId].accessToken'`
|
|
8490
8509
|
* (`key[<id field>]` addresses array items by id, never by index).
|
|
@@ -8494,7 +8513,7 @@ var BaseAddon = class {
|
|
|
8494
8513
|
/**
|
|
8495
8514
|
* D986 M4: the scoped schemas this addon declared, resolved once per capability
|
|
8496
8515
|
* (`loadScopedSchemas`) so the sync readers (`perNodeKeys`, the secret tree, the restart check)
|
|
8497
|
-
* see them. Empty until loaded
|
|
8516
|
+
* see them. Empty until loaded.
|
|
8498
8517
|
*/
|
|
8499
8518
|
_scopedByCap = /* @__PURE__ */ new Map();
|
|
8500
8519
|
_nodeKeysByCap = /* @__PURE__ */ new Map();
|
|
@@ -8680,7 +8699,7 @@ var BaseAddon = class {
|
|
|
8680
8699
|
/** Addon-specific cleanup. Override if needed. */
|
|
8681
8700
|
async onShutdown() {}
|
|
8682
8701
|
/**
|
|
8683
|
-
* Called after config is resolved during
|
|
8702
|
+
* Called after config is resolved during a settings write.
|
|
8684
8703
|
* Override to react to config changes (e.g. restart a sampler, reconnect a service).
|
|
8685
8704
|
* Not called during initialize() — use onInitialize() for initial setup.
|
|
8686
8705
|
*/
|
|
@@ -8709,82 +8728,12 @@ var BaseAddon = class {
|
|
|
8709
8728
|
scopedSettingsCapabilities() {
|
|
8710
8729
|
return [];
|
|
8711
8730
|
}
|
|
8712
|
-
/** Override to provide global-level settings UI schema. */
|
|
8713
|
-
globalSettingsSchema(_cap) {
|
|
8714
|
-
return null;
|
|
8715
|
-
}
|
|
8716
8731
|
/** Override to provide device-level settings UI schema. */
|
|
8717
8732
|
deviceSettingsSchema() {
|
|
8718
8733
|
return null;
|
|
8719
8734
|
}
|
|
8720
8735
|
/**
|
|
8721
|
-
*
|
|
8722
|
-
* ARE the configuration of its integration.
|
|
8723
|
-
*
|
|
8724
|
-
* Return the `ConfigSection.id`s, from {@link globalSettingsSchema}, that an
|
|
8725
|
-
* operator should find on the addon's integration page (System →
|
|
8726
|
-
* Integrations → <name>) rather than only in the cluster-wide list of every
|
|
8727
|
-
* addon. Empty (the default) means the addon has no integration-level
|
|
8728
|
-
* settings and no such surface is offered — this is opt-in, because whether
|
|
8729
|
-
* an addon's configuration IS its integration's configuration depends on the
|
|
8730
|
-
* nature of the integration.
|
|
8731
|
-
*
|
|
8732
|
-
* WHAT THIS IS NOT. It is not a scope. The selected sections keep living in
|
|
8733
|
-
* the ONE global schema, in the ONE addon store, written by the ONE
|
|
8734
|
-
* `updateGlobalSettings` path. There is deliberately no
|
|
8735
|
-
* `updateIntegrationSettings`: a second write path is how a surface acquires
|
|
8736
|
-
* a second store key, and this repo has shipped that twice (`btmPath@hub`,
|
|
8737
|
-
* D266). Selecting sections cannot introduce a key that selecting cannot.
|
|
8738
|
-
*
|
|
8739
|
-
* WHY IT IS A LIST OF SECTION IDS AND NOT A MARKER ON THE SECTION.
|
|
8740
|
-
* `ConfigFieldBase` used to carry `scope?: 'device' | 'global'` and it was
|
|
8741
|
-
* removed with the reason recorded at
|
|
8742
|
-
* `packages/types/src/interfaces/config-ui.ts:249` — *"a field's scope is
|
|
8743
|
-
* determined by WHICH schema it lives in, not by a field-level marker."* A
|
|
8744
|
-
* marker sprinkled across sections also has to borrow a field that already
|
|
8745
|
-
* means something else; borrowing `section.tab` put the literal word
|
|
8746
|
-
* "integration" into an operator-facing tab bar, because `tab` means "how to
|
|
8747
|
-
* GROUP this visually" and cannot also mean "where this lives" (D269
|
|
8748
|
-
* supersedes D268). One declaration, in one place, next to the schema whose
|
|
8749
|
-
* ids it names.
|
|
8750
|
-
*/
|
|
8751
|
-
integrationSettingSections() {
|
|
8752
|
-
return [];
|
|
8753
|
-
}
|
|
8754
|
-
async getGlobalSettings(overlay, cap, nodeId) {
|
|
8755
|
-
await this.loadScopedSchemas(cap);
|
|
8756
|
-
const schema = this.globalSettingsSchema(cap) ?? this.scopedFormSchema(cap);
|
|
8757
|
-
if (!schema) return { sections: [] };
|
|
8758
|
-
const projected = await this.readRawProjectedStore(nodeId, cap);
|
|
8759
|
-
return hydrateSchema(schema, overlay ? await this.overlayKeepingMarkers(projected, overlay) : projected, { inlineSecretsAsViews: true });
|
|
8760
|
-
}
|
|
8761
|
-
/**
|
|
8762
|
-
* The integration-level view of this addon's settings: exactly the sections
|
|
8763
|
-
* named by {@link integrationSettingSections}, hydrated from the SAME store
|
|
8764
|
-
* `getGlobalSettings` reads, and narrowed to cluster-scoped fields.
|
|
8765
|
-
*
|
|
8766
|
-
* Returns `null` when the addon declared nothing — an addon that opts out has
|
|
8767
|
-
* no integration settings surface at all, rather than an empty one that reads
|
|
8768
|
-
* as a failed load.
|
|
8769
|
-
*
|
|
8770
|
-
* Three properties hold BY CONSTRUCTION, which is why they are here in core
|
|
8771
|
-
* and not in whichever UI happens to render this:
|
|
8772
|
-
*
|
|
8773
|
-
* 1. **One key.** The payload is a SUBSET of the global schema, so a field
|
|
8774
|
-
* shown here is the same field, with the same bare key, that the addon's
|
|
8775
|
-
* own page shows. There is no integration-specific writer — callers save
|
|
8776
|
-
* through `updateGlobalSettings` — so a second store key is unreachable,
|
|
8777
|
-
* not merely discouraged.
|
|
8778
|
-
* 2. **No node scope.** `perNode: true` fields are DROPPED. Their store key
|
|
8779
|
-
* is `<key>@<nodeId>` and an integration is not a node; whichever node
|
|
8780
|
-
* such a field silently picked would be a wrong answer for the operator
|
|
8781
|
-
* who opened the page (D266).
|
|
8782
|
-
* 3. **No silent typo.** A declared id that names no section throws. The
|
|
8783
|
-
* alternative — skip it — turns a rename into a surface that quietly
|
|
8784
|
-
* empties, which looks exactly like an addon with nothing to configure.
|
|
8785
|
-
*/
|
|
8786
|
-
/**
|
|
8787
|
-
* The form schema of ONE integration instance, or `null` to use {@link globalSettingsSchema}.
|
|
8736
|
+
* The form schema of ONE integration instance, or `null` to use the scoped form.
|
|
8788
8737
|
*
|
|
8789
8738
|
* Override it only when an `instanceMode: multiple` addon's instances differ: an NVR integration
|
|
8790
8739
|
* needs its connection fields, the default integration the addon's own sections. It is the
|
|
@@ -8957,6 +8906,19 @@ var BaseAddon = class {
|
|
|
8957
8906
|
const overlay = await this.scopedSettingsOverlay(scope, cap, nodeId);
|
|
8958
8907
|
return hydrateSchema(schema, overlay ? await this.overlayKeepingMarkers(stored, overlay) : stored, { inlineSecretsAsViews: true });
|
|
8959
8908
|
}
|
|
8909
|
+
/**
|
|
8910
|
+
* The scoped schemas this addon serves: one entry per loaded (capability, scope), capabilities
|
|
8911
|
+
* in declaration order, scopes in {@link SCOPED_SETTINGS_SCOPES} order. `[]` when it declares
|
|
8912
|
+
* nothing.
|
|
8913
|
+
*/
|
|
8914
|
+
async listScopedSettings() {
|
|
8915
|
+
await this.loadScopedSchemas();
|
|
8916
|
+
return [...this._scopedByCap].flatMap(([cap, entries]) => entries.map((entry) => ({
|
|
8917
|
+
cap,
|
|
8918
|
+
scope: entry.scope,
|
|
8919
|
+
sectionIds: entry.schema.sections.map((section) => section.id)
|
|
8920
|
+
})));
|
|
8921
|
+
}
|
|
8960
8922
|
/** The OPERATOR's write of declared keys of one scope (D787 secret semantics). */
|
|
8961
8923
|
async updateScopedSettings(scope, cap, patch, nodeId) {
|
|
8962
8924
|
this._operatorWriteDepth++;
|
|
@@ -8982,32 +8944,15 @@ var BaseAddon = class {
|
|
|
8982
8944
|
*/
|
|
8983
8945
|
async getIntegrationFormSchema(instance, nodeId) {
|
|
8984
8946
|
const scoped = await this.integrationFormSchema(instance);
|
|
8985
|
-
if (scoped === null) return this.
|
|
8947
|
+
if (scoped === null) return this.scopedForm(nodeId);
|
|
8986
8948
|
return hydrateSchema(scoped, {}, { inlineSecretsAsViews: true });
|
|
8987
8949
|
}
|
|
8988
|
-
|
|
8989
|
-
|
|
8990
|
-
|
|
8991
|
-
const schema = this.
|
|
8992
|
-
if (!schema)
|
|
8993
|
-
|
|
8994
|
-
const sections = [];
|
|
8995
|
-
for (const id of declared) {
|
|
8996
|
-
const section = byId.get(id);
|
|
8997
|
-
if (!section) throw new Error(`${this.constructor.name}: integrationSettingSections() names unknown section "${id}". Known sections: [${[...byId.keys()].join(", ")}].`);
|
|
8998
|
-
const fields = dropPerNodeFields(section.fields);
|
|
8999
|
-
if (fields.length === 0) continue;
|
|
9000
|
-
sections.push({
|
|
9001
|
-
...section,
|
|
9002
|
-
fields
|
|
9003
|
-
});
|
|
9004
|
-
}
|
|
9005
|
-
if (sections.length === 0) return null;
|
|
9006
|
-
const projected = await this.readRawProjectedStore(nodeId);
|
|
9007
|
-
return hydrateSchema({
|
|
9008
|
-
...schema,
|
|
9009
|
-
sections
|
|
9010
|
-
}, projected, { inlineSecretsAsViews: true });
|
|
8950
|
+
/** The form of the scoped schemas this addon declared, hydrated from its store. */
|
|
8951
|
+
async scopedForm(nodeId) {
|
|
8952
|
+
await this.loadScopedSchemas();
|
|
8953
|
+
const schema = this.scopedFormSchema();
|
|
8954
|
+
if (!schema) return { sections: [] };
|
|
8955
|
+
return hydrateSchema(schema, await this.readRawProjectedStore(nodeId), { inlineSecretsAsViews: true });
|
|
9011
8956
|
}
|
|
9012
8957
|
/**
|
|
9013
8958
|
* The raw addon store PROJECTED onto the target node's bare per-node keys:
|
|
@@ -9016,8 +8961,8 @@ var BaseAddon = class {
|
|
|
9016
8961
|
* bare fallback), all `@`-scoped and stray bare per-node keys are dropped.
|
|
9017
8962
|
* A no-op passthrough when the schema declares no `perNode` field.
|
|
9018
8963
|
*
|
|
9019
|
-
* This is the sanctioned way for
|
|
9020
|
-
* the store for custom
|
|
8964
|
+
* This is the sanctioned way for an addon that needs
|
|
8965
|
+
* the store for custom logic (option narrowing, value snapping) to
|
|
9021
8966
|
* read it per-node — never `ctx.settings.readAddonStore()` directly.
|
|
9022
8967
|
* `nodeId` omitted ⇒ the local node (node-blind injection from ctx).
|
|
9023
8968
|
*
|
|
@@ -9069,7 +9014,7 @@ var BaseAddon = class {
|
|
|
9069
9014
|
}
|
|
9070
9015
|
/**
|
|
9071
9016
|
* Whether ONE global key of this addon's store was written, read three-way
|
|
9072
|
-
* (D651). For a question a hydrated view cannot answer:
|
|
9017
|
+
* (D651). For a question a hydrated view cannot answer: a hydrated form
|
|
9073
9018
|
* reports `value ?? default`, so "the operator chose the default" and "nobody
|
|
9074
9019
|
* chose" look the same, and a failed read looks like both. A `perNode` key is
|
|
9075
9020
|
* not supported here: its stored name is scoped.
|
|
@@ -9103,7 +9048,7 @@ var BaseAddon = class {
|
|
|
9103
9048
|
}
|
|
9104
9049
|
/**
|
|
9105
9050
|
* The OPERATOR's write — a settings form or an admin API call, dispatched by
|
|
9106
|
-
* the kernel.
|
|
9051
|
+
* the kernel. The one in-process write of the addon blob that is not a scoped write; a secret
|
|
9107
9052
|
* the operator sends is stored as sent even when it equals a pre-keychain
|
|
9108
9053
|
* inline value: the operator re-entering a password is a change, an addon
|
|
9109
9054
|
* writing back what it read is not (D787).
|
|
@@ -9116,9 +9061,6 @@ var BaseAddon = class {
|
|
|
9116
9061
|
this._operatorWriteDepth--;
|
|
9117
9062
|
}
|
|
9118
9063
|
}
|
|
9119
|
-
async updateGlobalSettings(patch, nodeId) {
|
|
9120
|
-
await this.applyGlobalPatch(patch, nodeId);
|
|
9121
|
-
}
|
|
9122
9064
|
/**
|
|
9123
9065
|
* REMOVE stored secrets — their keychain values and their markers (D787).
|
|
9124
9066
|
*
|
|
@@ -9161,8 +9103,7 @@ var BaseAddon = class {
|
|
|
9161
9103
|
await this.resolveConfig();
|
|
9162
9104
|
await this.onConfigChanged();
|
|
9163
9105
|
this.emitLifecycle(EventCategory.AddonUpdated, { level: "global" });
|
|
9164
|
-
|
|
9165
|
-
this.maybeAutoRestart(Object.keys(barePatch), [...legacy === null ? [] : [legacy], ...this.loadedScopedSchemas().map((entry) => entry.schema)]);
|
|
9106
|
+
this.maybeAutoRestart(Object.keys(barePatch), this.loadedScopedSchemas().map((entry) => entry.schema));
|
|
9166
9107
|
return true;
|
|
9167
9108
|
}
|
|
9168
9109
|
/**
|
|
@@ -9200,10 +9141,7 @@ var BaseAddon = class {
|
|
|
9200
9141
|
this._nodeKeysByCap = /* @__PURE__ */ new Map();
|
|
9201
9142
|
this._addonSecretTree = null;
|
|
9202
9143
|
}
|
|
9203
|
-
/**
|
|
9204
|
-
* The form the settings API serves while an addon declares no {@link globalSettingsSchema}: the
|
|
9205
|
-
* sections of its scoped schemas, so dropping the old hook does not blank the form.
|
|
9206
|
-
*/
|
|
9144
|
+
/** The form of an addon's scoped schemas: their sections, each shown once. */
|
|
9207
9145
|
scopedFormSchema(cap) {
|
|
9208
9146
|
const byId = /* @__PURE__ */ new Map();
|
|
9209
9147
|
for (const entry of this.loadedScopedSchemas(cap)) for (const section of entry.schema.sections) if (!byId.has(section.id)) byId.set(section.id, section);
|
|
@@ -9215,8 +9153,7 @@ var BaseAddon = class {
|
|
|
9215
9153
|
return [...this._scopedByCap.values()].flat();
|
|
9216
9154
|
}
|
|
9217
9155
|
/**
|
|
9218
|
-
* The field keys that are stored per node: every field of a {@link nodeSettingsSchema}
|
|
9219
|
-
* the fields the legacy {@link globalSettingsSchema} still marks `perNode: true`. Derived once
|
|
9156
|
+
* The field keys that are stored per node: every field of a {@link nodeSettingsSchema}. Derived once
|
|
9220
9157
|
* per `cap` argument and memoized (schemas are static declarations). Empty set ⇒ every
|
|
9221
9158
|
* per-node code path is bypassed and the settings API behaves like the node-agnostic one.
|
|
9222
9159
|
* Call {@link loadScopedSchemas} first (the async seams do).
|
|
@@ -9225,8 +9162,7 @@ var BaseAddon = class {
|
|
|
9225
9162
|
const cacheKey = cap ?? "";
|
|
9226
9163
|
const cached = this._nodeKeysByCap.get(cacheKey);
|
|
9227
9164
|
if (cached) return cached;
|
|
9228
|
-
const
|
|
9229
|
-
const keys = new Set(legacy ? legacy.sections.flatMap((section) => collectPerNodeFieldKeys(section.fields)) : []);
|
|
9165
|
+
const keys = /* @__PURE__ */ new Set();
|
|
9230
9166
|
for (const { scope, schema } of this.loadedScopedSchemas(cap)) {
|
|
9231
9167
|
if (scope !== "node") continue;
|
|
9232
9168
|
for (const section of schema.sections) for (const key of collectValueFieldKeys(section.fields)) keys.add(key);
|
|
@@ -9444,8 +9380,6 @@ var BaseAddon = class {
|
|
|
9444
9380
|
}
|
|
9445
9381
|
declaredKeySet() {
|
|
9446
9382
|
const keys = new Set(Object.keys(this.defaults));
|
|
9447
|
-
const schema = this.globalSettingsSchema();
|
|
9448
|
-
if (schema) for (const section of schema.sections) for (const key of collectFieldKeys(section.fields)) keys.add(key);
|
|
9449
9383
|
for (const { schema: scoped } of this.loadedScopedSchemas()) for (const section of scoped.sections) for (const key of collectFieldKeys(section.fields)) keys.add(key);
|
|
9450
9384
|
for (const key of this._declaredStateKeys) keys.add(key);
|
|
9451
9385
|
for (const path of this.secretStatePaths) {
|
|
@@ -9543,7 +9477,7 @@ var BaseAddon = class {
|
|
|
9543
9477
|
/** The addon store's secret tree: schema fields by TYPE, plus `secretStatePaths`. */
|
|
9544
9478
|
addonSecretTree() {
|
|
9545
9479
|
if (this._addonSecretTree === null) {
|
|
9546
|
-
const tree = new Map(
|
|
9480
|
+
const tree = /* @__PURE__ */ new Map();
|
|
9547
9481
|
for (const { schema } of this.loadedScopedSchemas()) for (const [key, node] of secretTreeFromSchema(schema)) tree.set(key, node);
|
|
9548
9482
|
this._addonSecretTree = mergeSecretStatePaths(tree, this.secretStatePaths);
|
|
9549
9483
|
}
|
|
@@ -9755,47 +9689,6 @@ function classifyStoreError(err) {
|
|
|
9755
9689
|
if (TRANSPORT_PHRASES.some((f) => message.includes(f))) return "transport";
|
|
9756
9690
|
return "permanent";
|
|
9757
9691
|
}
|
|
9758
|
-
/**
|
|
9759
|
-
* Collect the keys of every field marked `perNode: true`, recursing into
|
|
9760
|
-
* layout containers (`group` fields and `sub-tabs` tabs) the same way
|
|
9761
|
-
* `hydrateSchema` does. Valueless structural fields (separator/info/…)
|
|
9762
|
-
* don't declare `perNode` and are excluded by the `in` narrowing.
|
|
9763
|
-
*/
|
|
9764
|
-
/**
|
|
9765
|
-
* The same fields with every `perNode: true` one removed, recursing into layout
|
|
9766
|
-
* containers exactly as {@link collectPerNodeFieldKeys} does. A container left
|
|
9767
|
-
* with no child is dropped rather than rendered empty.
|
|
9768
|
-
*
|
|
9769
|
-
* Used by `getIntegrationSettings`: an integration is not a node, so a field
|
|
9770
|
-
* whose store key is `<key>@<nodeId>` has no node to belong to there.
|
|
9771
|
-
*/
|
|
9772
|
-
function dropPerNodeFields(fields) {
|
|
9773
|
-
const kept = [];
|
|
9774
|
-
for (const field of fields) {
|
|
9775
|
-
if (field.type === "group") {
|
|
9776
|
-
const inner = dropPerNodeFields(field.fields);
|
|
9777
|
-
if (inner.length > 0) kept.push({
|
|
9778
|
-
...field,
|
|
9779
|
-
fields: inner
|
|
9780
|
-
});
|
|
9781
|
-
continue;
|
|
9782
|
-
}
|
|
9783
|
-
if (field.type === "sub-tabs") {
|
|
9784
|
-
const tabs = field.tabs.map((tab) => ({
|
|
9785
|
-
...tab,
|
|
9786
|
-
fields: dropPerNodeFields(tab.fields)
|
|
9787
|
-
})).filter((tab) => tab.fields.length > 0);
|
|
9788
|
-
if (tabs.length > 0) kept.push({
|
|
9789
|
-
...field,
|
|
9790
|
-
tabs
|
|
9791
|
-
});
|
|
9792
|
-
continue;
|
|
9793
|
-
}
|
|
9794
|
-
if ("perNode" in field && field.perNode === true) continue;
|
|
9795
|
-
kept.push(field);
|
|
9796
|
-
}
|
|
9797
|
-
return kept;
|
|
9798
|
-
}
|
|
9799
9692
|
/** The keys of the value-holding fields, recursing into layout containers. */
|
|
9800
9693
|
function collectValueFieldKeys(fields) {
|
|
9801
9694
|
const collected = [];
|
|
@@ -9828,21 +9721,6 @@ function collectFieldKeys(fields) {
|
|
|
9828
9721
|
}
|
|
9829
9722
|
return collected;
|
|
9830
9723
|
}
|
|
9831
|
-
function collectPerNodeFieldKeys(fields) {
|
|
9832
|
-
const collected = [];
|
|
9833
|
-
for (const field of fields) {
|
|
9834
|
-
if (field.type === "group") {
|
|
9835
|
-
collected.push(...collectPerNodeFieldKeys(field.fields));
|
|
9836
|
-
continue;
|
|
9837
|
-
}
|
|
9838
|
-
if (field.type === "sub-tabs") {
|
|
9839
|
-
for (const tab of field.tabs) collected.push(...collectPerNodeFieldKeys(tab.fields));
|
|
9840
|
-
continue;
|
|
9841
|
-
}
|
|
9842
|
-
if ("perNode" in field && field.perNode === true) collected.push(field.key);
|
|
9843
|
-
}
|
|
9844
|
-
return collected;
|
|
9845
|
-
}
|
|
9846
9724
|
/**
|
|
9847
9725
|
* Normalize an `ICamstackAddon.initialize()` return value into the
|
|
9848
9726
|
* `AddonInitResult` envelope. Arrays are wrapped into `{ providers }`;
|
|
@@ -12665,13 +12543,25 @@ Object.freeze({
|
|
|
12665
12543
|
"path": "temperature",
|
|
12666
12544
|
"valueType": "number"
|
|
12667
12545
|
}],
|
|
12668
|
-
"timed-run": [
|
|
12669
|
-
|
|
12670
|
-
|
|
12671
|
-
|
|
12672
|
-
|
|
12673
|
-
|
|
12674
|
-
|
|
12546
|
+
"timed-run": [
|
|
12547
|
+
{
|
|
12548
|
+
"path": "activeUntil",
|
|
12549
|
+
"valueType": "number"
|
|
12550
|
+
},
|
|
12551
|
+
{
|
|
12552
|
+
"path": "requestedBy",
|
|
12553
|
+
"valueType": "string"
|
|
12554
|
+
},
|
|
12555
|
+
{
|
|
12556
|
+
"path": "quickRun.duration",
|
|
12557
|
+
"valueType": "number"
|
|
12558
|
+
},
|
|
12559
|
+
{
|
|
12560
|
+
"path": "quickRun.unit",
|
|
12561
|
+
"valueType": "enum",
|
|
12562
|
+
"enumValues": ["s", "min"]
|
|
12563
|
+
}
|
|
12564
|
+
],
|
|
12675
12565
|
"update": [
|
|
12676
12566
|
{
|
|
12677
12567
|
"path": "currentVersion",
|
|
@@ -12895,7 +12785,7 @@ object({
|
|
|
12895
12785
|
params: record(string(), union([string(), number()])).optional()
|
|
12896
12786
|
});
|
|
12897
12787
|
//#endregion
|
|
12898
|
-
//#region ../types/dist/composition-
|
|
12788
|
+
//#region ../types/dist/composition-Bx0JvKUU.mjs
|
|
12899
12789
|
var AUDIO_ENCODER_BY_CODEC = {
|
|
12900
12790
|
opus: "libopus",
|
|
12901
12791
|
aac: "aac",
|
|
@@ -14653,6 +14543,387 @@ var NodeColorIdSchema = _enum([
|
|
|
14653
14543
|
"node-h"
|
|
14654
14544
|
]);
|
|
14655
14545
|
//#endregion
|
|
14546
|
+
//#region ../types/dist/convert-BAzH15HU.mjs
|
|
14547
|
+
/**
|
|
14548
|
+
* Frozen unit → spec table. `•` in the doc marks each dimension's canonical
|
|
14549
|
+
* unit (`factor: 1, offset: 0`). °F derives from `°C = (°F − 32) × 5/9` ⇒
|
|
14550
|
+
* `factor = 5/9`, `offset = -160/9` (kept as exact expressions, not rounded
|
|
14551
|
+
* decimals). K derives from `°C = K − 273.15`.
|
|
14552
|
+
*/
|
|
14553
|
+
var UNIT_TABLE = {
|
|
14554
|
+
"°C": {
|
|
14555
|
+
dimension: "temperature",
|
|
14556
|
+
factor: 1,
|
|
14557
|
+
offset: 0
|
|
14558
|
+
},
|
|
14559
|
+
"°F": {
|
|
14560
|
+
dimension: "temperature",
|
|
14561
|
+
factor: 5 / 9,
|
|
14562
|
+
offset: -160 / 9
|
|
14563
|
+
},
|
|
14564
|
+
K: {
|
|
14565
|
+
dimension: "temperature",
|
|
14566
|
+
factor: 1,
|
|
14567
|
+
offset: -273.15
|
|
14568
|
+
},
|
|
14569
|
+
hPa: {
|
|
14570
|
+
dimension: "pressure",
|
|
14571
|
+
factor: 1,
|
|
14572
|
+
offset: 0
|
|
14573
|
+
},
|
|
14574
|
+
kPa: {
|
|
14575
|
+
dimension: "pressure",
|
|
14576
|
+
factor: 10,
|
|
14577
|
+
offset: 0
|
|
14578
|
+
},
|
|
14579
|
+
Pa: {
|
|
14580
|
+
dimension: "pressure",
|
|
14581
|
+
factor: .01,
|
|
14582
|
+
offset: 0
|
|
14583
|
+
},
|
|
14584
|
+
mbar: {
|
|
14585
|
+
dimension: "pressure",
|
|
14586
|
+
factor: 1,
|
|
14587
|
+
offset: 0
|
|
14588
|
+
},
|
|
14589
|
+
bar: {
|
|
14590
|
+
dimension: "pressure",
|
|
14591
|
+
factor: 1e3,
|
|
14592
|
+
offset: 0
|
|
14593
|
+
},
|
|
14594
|
+
inHg: {
|
|
14595
|
+
dimension: "pressure",
|
|
14596
|
+
factor: 33.8639,
|
|
14597
|
+
offset: 0
|
|
14598
|
+
},
|
|
14599
|
+
mmHg: {
|
|
14600
|
+
dimension: "pressure",
|
|
14601
|
+
factor: 1.33322,
|
|
14602
|
+
offset: 0
|
|
14603
|
+
},
|
|
14604
|
+
psi: {
|
|
14605
|
+
dimension: "pressure",
|
|
14606
|
+
factor: 68.9476,
|
|
14607
|
+
offset: 0
|
|
14608
|
+
},
|
|
14609
|
+
"m/s": {
|
|
14610
|
+
dimension: "speed",
|
|
14611
|
+
factor: 1,
|
|
14612
|
+
offset: 0
|
|
14613
|
+
},
|
|
14614
|
+
"km/h": {
|
|
14615
|
+
dimension: "speed",
|
|
14616
|
+
factor: 1 / 3.6,
|
|
14617
|
+
offset: 0
|
|
14618
|
+
},
|
|
14619
|
+
mph: {
|
|
14620
|
+
dimension: "speed",
|
|
14621
|
+
factor: .44704,
|
|
14622
|
+
offset: 0
|
|
14623
|
+
},
|
|
14624
|
+
kn: {
|
|
14625
|
+
dimension: "speed",
|
|
14626
|
+
factor: .514444,
|
|
14627
|
+
offset: 0
|
|
14628
|
+
},
|
|
14629
|
+
"mm/h": {
|
|
14630
|
+
dimension: "precipitation-rate",
|
|
14631
|
+
factor: 1,
|
|
14632
|
+
offset: 0
|
|
14633
|
+
},
|
|
14634
|
+
"in/h": {
|
|
14635
|
+
dimension: "precipitation-rate",
|
|
14636
|
+
factor: 25.4,
|
|
14637
|
+
offset: 0
|
|
14638
|
+
},
|
|
14639
|
+
m: {
|
|
14640
|
+
dimension: "length",
|
|
14641
|
+
factor: 1,
|
|
14642
|
+
offset: 0
|
|
14643
|
+
},
|
|
14644
|
+
mm: {
|
|
14645
|
+
dimension: "length",
|
|
14646
|
+
factor: .001,
|
|
14647
|
+
offset: 0
|
|
14648
|
+
},
|
|
14649
|
+
cm: {
|
|
14650
|
+
dimension: "length",
|
|
14651
|
+
factor: .01,
|
|
14652
|
+
offset: 0
|
|
14653
|
+
},
|
|
14654
|
+
km: {
|
|
14655
|
+
dimension: "length",
|
|
14656
|
+
factor: 1e3,
|
|
14657
|
+
offset: 0
|
|
14658
|
+
},
|
|
14659
|
+
in: {
|
|
14660
|
+
dimension: "length",
|
|
14661
|
+
factor: .0254,
|
|
14662
|
+
offset: 0
|
|
14663
|
+
},
|
|
14664
|
+
ft: {
|
|
14665
|
+
dimension: "length",
|
|
14666
|
+
factor: .3048,
|
|
14667
|
+
offset: 0
|
|
14668
|
+
},
|
|
14669
|
+
mi: {
|
|
14670
|
+
dimension: "length",
|
|
14671
|
+
factor: 1609.344,
|
|
14672
|
+
offset: 0
|
|
14673
|
+
},
|
|
14674
|
+
"m²": {
|
|
14675
|
+
dimension: "area",
|
|
14676
|
+
factor: 1,
|
|
14677
|
+
offset: 0
|
|
14678
|
+
},
|
|
14679
|
+
lx: {
|
|
14680
|
+
dimension: "illuminance",
|
|
14681
|
+
factor: 1,
|
|
14682
|
+
offset: 0
|
|
14683
|
+
},
|
|
14684
|
+
"W/m²": {
|
|
14685
|
+
dimension: "irradiance",
|
|
14686
|
+
factor: 1,
|
|
14687
|
+
offset: 0
|
|
14688
|
+
},
|
|
14689
|
+
W: {
|
|
14690
|
+
dimension: "power",
|
|
14691
|
+
factor: 1,
|
|
14692
|
+
offset: 0
|
|
14693
|
+
},
|
|
14694
|
+
kW: {
|
|
14695
|
+
dimension: "power",
|
|
14696
|
+
factor: 1e3,
|
|
14697
|
+
offset: 0
|
|
14698
|
+
},
|
|
14699
|
+
VA: {
|
|
14700
|
+
dimension: "apparent-power",
|
|
14701
|
+
factor: 1,
|
|
14702
|
+
offset: 0
|
|
14703
|
+
},
|
|
14704
|
+
Wh: {
|
|
14705
|
+
dimension: "energy",
|
|
14706
|
+
factor: 1,
|
|
14707
|
+
offset: 0
|
|
14708
|
+
},
|
|
14709
|
+
kWh: {
|
|
14710
|
+
dimension: "energy",
|
|
14711
|
+
factor: 1e3,
|
|
14712
|
+
offset: 0
|
|
14713
|
+
},
|
|
14714
|
+
MWh: {
|
|
14715
|
+
dimension: "energy",
|
|
14716
|
+
factor: 1e6,
|
|
14717
|
+
offset: 0
|
|
14718
|
+
},
|
|
14719
|
+
V: {
|
|
14720
|
+
dimension: "voltage",
|
|
14721
|
+
factor: 1,
|
|
14722
|
+
offset: 0
|
|
14723
|
+
},
|
|
14724
|
+
mV: {
|
|
14725
|
+
dimension: "voltage",
|
|
14726
|
+
factor: .001,
|
|
14727
|
+
offset: 0
|
|
14728
|
+
},
|
|
14729
|
+
A: {
|
|
14730
|
+
dimension: "current",
|
|
14731
|
+
factor: 1,
|
|
14732
|
+
offset: 0
|
|
14733
|
+
},
|
|
14734
|
+
mA: {
|
|
14735
|
+
dimension: "current",
|
|
14736
|
+
factor: .001,
|
|
14737
|
+
offset: 0
|
|
14738
|
+
},
|
|
14739
|
+
ppm: {
|
|
14740
|
+
dimension: "concentration-volume",
|
|
14741
|
+
factor: 1,
|
|
14742
|
+
offset: 0
|
|
14743
|
+
},
|
|
14744
|
+
ppb: {
|
|
14745
|
+
dimension: "concentration-volume",
|
|
14746
|
+
factor: .001,
|
|
14747
|
+
offset: 0
|
|
14748
|
+
},
|
|
14749
|
+
"µg/m³": {
|
|
14750
|
+
dimension: "concentration-mass",
|
|
14751
|
+
factor: 1,
|
|
14752
|
+
offset: 0
|
|
14753
|
+
},
|
|
14754
|
+
"mg/m³": {
|
|
14755
|
+
dimension: "concentration-mass",
|
|
14756
|
+
factor: 1e3,
|
|
14757
|
+
offset: 0
|
|
14758
|
+
},
|
|
14759
|
+
kg: {
|
|
14760
|
+
dimension: "mass",
|
|
14761
|
+
factor: 1,
|
|
14762
|
+
offset: 0
|
|
14763
|
+
},
|
|
14764
|
+
g: {
|
|
14765
|
+
dimension: "mass",
|
|
14766
|
+
factor: .001,
|
|
14767
|
+
offset: 0
|
|
14768
|
+
},
|
|
14769
|
+
lb: {
|
|
14770
|
+
dimension: "mass",
|
|
14771
|
+
factor: .453592,
|
|
14772
|
+
offset: 0
|
|
14773
|
+
},
|
|
14774
|
+
oz: {
|
|
14775
|
+
dimension: "mass",
|
|
14776
|
+
factor: .0283495,
|
|
14777
|
+
offset: 0
|
|
14778
|
+
},
|
|
14779
|
+
"%": {
|
|
14780
|
+
dimension: "percentage",
|
|
14781
|
+
factor: 1,
|
|
14782
|
+
offset: 0
|
|
14783
|
+
},
|
|
14784
|
+
L: {
|
|
14785
|
+
dimension: "volume",
|
|
14786
|
+
factor: 1,
|
|
14787
|
+
offset: 0
|
|
14788
|
+
},
|
|
14789
|
+
mL: {
|
|
14790
|
+
dimension: "volume",
|
|
14791
|
+
factor: .001,
|
|
14792
|
+
offset: 0
|
|
14793
|
+
},
|
|
14794
|
+
gal: {
|
|
14795
|
+
dimension: "volume",
|
|
14796
|
+
factor: 3.785411784,
|
|
14797
|
+
offset: 0
|
|
14798
|
+
},
|
|
14799
|
+
s: {
|
|
14800
|
+
dimension: "duration",
|
|
14801
|
+
factor: 1,
|
|
14802
|
+
offset: 0
|
|
14803
|
+
},
|
|
14804
|
+
ms: {
|
|
14805
|
+
dimension: "duration",
|
|
14806
|
+
factor: .001,
|
|
14807
|
+
offset: 0
|
|
14808
|
+
},
|
|
14809
|
+
min: {
|
|
14810
|
+
dimension: "duration",
|
|
14811
|
+
factor: 60,
|
|
14812
|
+
offset: 0
|
|
14813
|
+
},
|
|
14814
|
+
h: {
|
|
14815
|
+
dimension: "duration",
|
|
14816
|
+
factor: 3600,
|
|
14817
|
+
offset: 0
|
|
14818
|
+
},
|
|
14819
|
+
d: {
|
|
14820
|
+
dimension: "duration",
|
|
14821
|
+
factor: 86400,
|
|
14822
|
+
offset: 0
|
|
14823
|
+
},
|
|
14824
|
+
B: {
|
|
14825
|
+
dimension: "information",
|
|
14826
|
+
factor: 1,
|
|
14827
|
+
offset: 0
|
|
14828
|
+
},
|
|
14829
|
+
KiB: {
|
|
14830
|
+
dimension: "information",
|
|
14831
|
+
factor: 1024,
|
|
14832
|
+
offset: 0
|
|
14833
|
+
},
|
|
14834
|
+
MiB: {
|
|
14835
|
+
dimension: "information",
|
|
14836
|
+
factor: 1024 ** 2,
|
|
14837
|
+
offset: 0
|
|
14838
|
+
},
|
|
14839
|
+
GiB: {
|
|
14840
|
+
dimension: "information",
|
|
14841
|
+
factor: 1024 ** 3,
|
|
14842
|
+
offset: 0
|
|
14843
|
+
},
|
|
14844
|
+
TiB: {
|
|
14845
|
+
dimension: "information",
|
|
14846
|
+
factor: 1024 ** 4,
|
|
14847
|
+
offset: 0
|
|
14848
|
+
},
|
|
14849
|
+
kB: {
|
|
14850
|
+
dimension: "information",
|
|
14851
|
+
factor: 1e3,
|
|
14852
|
+
offset: 0
|
|
14853
|
+
},
|
|
14854
|
+
MB: {
|
|
14855
|
+
dimension: "information",
|
|
14856
|
+
factor: 1e6,
|
|
14857
|
+
offset: 0
|
|
14858
|
+
},
|
|
14859
|
+
GB: {
|
|
14860
|
+
dimension: "information",
|
|
14861
|
+
factor: 1e9,
|
|
14862
|
+
offset: 0
|
|
14863
|
+
},
|
|
14864
|
+
"°": {
|
|
14865
|
+
dimension: "angle",
|
|
14866
|
+
factor: 1,
|
|
14867
|
+
offset: 0
|
|
14868
|
+
},
|
|
14869
|
+
dBFS: {
|
|
14870
|
+
dimension: "sound-level",
|
|
14871
|
+
factor: 1,
|
|
14872
|
+
offset: 0
|
|
14873
|
+
},
|
|
14874
|
+
dBm: {
|
|
14875
|
+
dimension: "signal-level",
|
|
14876
|
+
factor: 1,
|
|
14877
|
+
offset: 0
|
|
14878
|
+
},
|
|
14879
|
+
mired: {
|
|
14880
|
+
dimension: "colour-temperature",
|
|
14881
|
+
factor: 1,
|
|
14882
|
+
offset: 0
|
|
14883
|
+
},
|
|
14884
|
+
kbps: {
|
|
14885
|
+
dimension: "bitrate",
|
|
14886
|
+
factor: 1,
|
|
14887
|
+
offset: 0
|
|
14888
|
+
},
|
|
14889
|
+
Mbps: {
|
|
14890
|
+
dimension: "bitrate",
|
|
14891
|
+
factor: 1e3,
|
|
14892
|
+
offset: 0
|
|
14893
|
+
},
|
|
14894
|
+
fps: {
|
|
14895
|
+
dimension: "rate",
|
|
14896
|
+
factor: 1,
|
|
14897
|
+
offset: 0
|
|
14898
|
+
}
|
|
14899
|
+
};
|
|
14900
|
+
/** Resolve a unit's `UnitSpec`, or `undefined` when the spelling is unknown. */
|
|
14901
|
+
function specFor(unit) {
|
|
14902
|
+
return Object.hasOwn(UNIT_TABLE, unit) ? UNIT_TABLE[unit] : void 0;
|
|
14903
|
+
}
|
|
14904
|
+
/** Value in `spec`'s unit → its dimension's canonical unit. */
|
|
14905
|
+
function toCanonical(value, spec) {
|
|
14906
|
+
return value * spec.factor + spec.offset;
|
|
14907
|
+
}
|
|
14908
|
+
/** Canonical-unit value → the unit described by `spec`. */
|
|
14909
|
+
function fromCanonical(canonical, spec) {
|
|
14910
|
+
return (canonical - spec.offset) / spec.factor;
|
|
14911
|
+
}
|
|
14912
|
+
/**
|
|
14913
|
+
* Graceful variant for the render path: returns the converted value, or
|
|
14914
|
+
* `undefined` when the conversion is refused (unknown unit / cross-dimension).
|
|
14915
|
+
* Never throws — a render caller falls back to the raw value + source unit.
|
|
14916
|
+
*/
|
|
14917
|
+
function tryConvertUnit(value, from, to) {
|
|
14918
|
+
if (from === to) return value;
|
|
14919
|
+
const fromSpec = specFor(from);
|
|
14920
|
+
if (!fromSpec) return void 0;
|
|
14921
|
+
const toSpec = specFor(to);
|
|
14922
|
+
if (!toSpec) return void 0;
|
|
14923
|
+
if (fromSpec.dimension !== toSpec.dimension) return void 0;
|
|
14924
|
+
return fromCanonical(toCanonical(value, fromSpec), toSpec);
|
|
14925
|
+
}
|
|
14926
|
+
//#endregion
|
|
14656
14927
|
//#region ../types/dist/index.mjs
|
|
14657
14928
|
var SMTP_INBOUND_DEFAULT_PORT = 2525;
|
|
14658
14929
|
var SMTP_INBOUND_DEFAULT_DOMAIN = "camstack.local";
|
|
@@ -43751,6 +44022,7 @@ var ExpressionBindingSourceSchema = union([
|
|
|
43751
44022
|
object({
|
|
43752
44023
|
kind: literal("global"),
|
|
43753
44024
|
sourceStableId: string(),
|
|
44025
|
+
addonId: string().optional(),
|
|
43754
44026
|
cap: string(),
|
|
43755
44027
|
fieldPath: string()
|
|
43756
44028
|
})
|
|
@@ -43817,385 +44089,6 @@ var SourceInfoSchema = object({
|
|
|
43817
44089
|
raw: record(string(), unknown()).optional()
|
|
43818
44090
|
});
|
|
43819
44091
|
/**
|
|
43820
|
-
* Frozen unit → spec table. `•` in the doc marks each dimension's canonical
|
|
43821
|
-
* unit (`factor: 1, offset: 0`). °F derives from `°C = (°F − 32) × 5/9` ⇒
|
|
43822
|
-
* `factor = 5/9`, `offset = -160/9` (kept as exact expressions, not rounded
|
|
43823
|
-
* decimals). K derives from `°C = K − 273.15`.
|
|
43824
|
-
*/
|
|
43825
|
-
var UNIT_TABLE = {
|
|
43826
|
-
"°C": {
|
|
43827
|
-
dimension: "temperature",
|
|
43828
|
-
factor: 1,
|
|
43829
|
-
offset: 0
|
|
43830
|
-
},
|
|
43831
|
-
"°F": {
|
|
43832
|
-
dimension: "temperature",
|
|
43833
|
-
factor: 5 / 9,
|
|
43834
|
-
offset: -160 / 9
|
|
43835
|
-
},
|
|
43836
|
-
K: {
|
|
43837
|
-
dimension: "temperature",
|
|
43838
|
-
factor: 1,
|
|
43839
|
-
offset: -273.15
|
|
43840
|
-
},
|
|
43841
|
-
hPa: {
|
|
43842
|
-
dimension: "pressure",
|
|
43843
|
-
factor: 1,
|
|
43844
|
-
offset: 0
|
|
43845
|
-
},
|
|
43846
|
-
kPa: {
|
|
43847
|
-
dimension: "pressure",
|
|
43848
|
-
factor: 10,
|
|
43849
|
-
offset: 0
|
|
43850
|
-
},
|
|
43851
|
-
Pa: {
|
|
43852
|
-
dimension: "pressure",
|
|
43853
|
-
factor: .01,
|
|
43854
|
-
offset: 0
|
|
43855
|
-
},
|
|
43856
|
-
mbar: {
|
|
43857
|
-
dimension: "pressure",
|
|
43858
|
-
factor: 1,
|
|
43859
|
-
offset: 0
|
|
43860
|
-
},
|
|
43861
|
-
bar: {
|
|
43862
|
-
dimension: "pressure",
|
|
43863
|
-
factor: 1e3,
|
|
43864
|
-
offset: 0
|
|
43865
|
-
},
|
|
43866
|
-
inHg: {
|
|
43867
|
-
dimension: "pressure",
|
|
43868
|
-
factor: 33.8639,
|
|
43869
|
-
offset: 0
|
|
43870
|
-
},
|
|
43871
|
-
mmHg: {
|
|
43872
|
-
dimension: "pressure",
|
|
43873
|
-
factor: 1.33322,
|
|
43874
|
-
offset: 0
|
|
43875
|
-
},
|
|
43876
|
-
psi: {
|
|
43877
|
-
dimension: "pressure",
|
|
43878
|
-
factor: 68.9476,
|
|
43879
|
-
offset: 0
|
|
43880
|
-
},
|
|
43881
|
-
"m/s": {
|
|
43882
|
-
dimension: "speed",
|
|
43883
|
-
factor: 1,
|
|
43884
|
-
offset: 0
|
|
43885
|
-
},
|
|
43886
|
-
"km/h": {
|
|
43887
|
-
dimension: "speed",
|
|
43888
|
-
factor: 1 / 3.6,
|
|
43889
|
-
offset: 0
|
|
43890
|
-
},
|
|
43891
|
-
mph: {
|
|
43892
|
-
dimension: "speed",
|
|
43893
|
-
factor: .44704,
|
|
43894
|
-
offset: 0
|
|
43895
|
-
},
|
|
43896
|
-
kn: {
|
|
43897
|
-
dimension: "speed",
|
|
43898
|
-
factor: .514444,
|
|
43899
|
-
offset: 0
|
|
43900
|
-
},
|
|
43901
|
-
"mm/h": {
|
|
43902
|
-
dimension: "precipitation-rate",
|
|
43903
|
-
factor: 1,
|
|
43904
|
-
offset: 0
|
|
43905
|
-
},
|
|
43906
|
-
"in/h": {
|
|
43907
|
-
dimension: "precipitation-rate",
|
|
43908
|
-
factor: 25.4,
|
|
43909
|
-
offset: 0
|
|
43910
|
-
},
|
|
43911
|
-
m: {
|
|
43912
|
-
dimension: "length",
|
|
43913
|
-
factor: 1,
|
|
43914
|
-
offset: 0
|
|
43915
|
-
},
|
|
43916
|
-
mm: {
|
|
43917
|
-
dimension: "length",
|
|
43918
|
-
factor: .001,
|
|
43919
|
-
offset: 0
|
|
43920
|
-
},
|
|
43921
|
-
cm: {
|
|
43922
|
-
dimension: "length",
|
|
43923
|
-
factor: .01,
|
|
43924
|
-
offset: 0
|
|
43925
|
-
},
|
|
43926
|
-
km: {
|
|
43927
|
-
dimension: "length",
|
|
43928
|
-
factor: 1e3,
|
|
43929
|
-
offset: 0
|
|
43930
|
-
},
|
|
43931
|
-
in: {
|
|
43932
|
-
dimension: "length",
|
|
43933
|
-
factor: .0254,
|
|
43934
|
-
offset: 0
|
|
43935
|
-
},
|
|
43936
|
-
ft: {
|
|
43937
|
-
dimension: "length",
|
|
43938
|
-
factor: .3048,
|
|
43939
|
-
offset: 0
|
|
43940
|
-
},
|
|
43941
|
-
mi: {
|
|
43942
|
-
dimension: "length",
|
|
43943
|
-
factor: 1609.344,
|
|
43944
|
-
offset: 0
|
|
43945
|
-
},
|
|
43946
|
-
"m²": {
|
|
43947
|
-
dimension: "area",
|
|
43948
|
-
factor: 1,
|
|
43949
|
-
offset: 0
|
|
43950
|
-
},
|
|
43951
|
-
lx: {
|
|
43952
|
-
dimension: "illuminance",
|
|
43953
|
-
factor: 1,
|
|
43954
|
-
offset: 0
|
|
43955
|
-
},
|
|
43956
|
-
"W/m²": {
|
|
43957
|
-
dimension: "irradiance",
|
|
43958
|
-
factor: 1,
|
|
43959
|
-
offset: 0
|
|
43960
|
-
},
|
|
43961
|
-
W: {
|
|
43962
|
-
dimension: "power",
|
|
43963
|
-
factor: 1,
|
|
43964
|
-
offset: 0
|
|
43965
|
-
},
|
|
43966
|
-
kW: {
|
|
43967
|
-
dimension: "power",
|
|
43968
|
-
factor: 1e3,
|
|
43969
|
-
offset: 0
|
|
43970
|
-
},
|
|
43971
|
-
VA: {
|
|
43972
|
-
dimension: "apparent-power",
|
|
43973
|
-
factor: 1,
|
|
43974
|
-
offset: 0
|
|
43975
|
-
},
|
|
43976
|
-
Wh: {
|
|
43977
|
-
dimension: "energy",
|
|
43978
|
-
factor: 1,
|
|
43979
|
-
offset: 0
|
|
43980
|
-
},
|
|
43981
|
-
kWh: {
|
|
43982
|
-
dimension: "energy",
|
|
43983
|
-
factor: 1e3,
|
|
43984
|
-
offset: 0
|
|
43985
|
-
},
|
|
43986
|
-
MWh: {
|
|
43987
|
-
dimension: "energy",
|
|
43988
|
-
factor: 1e6,
|
|
43989
|
-
offset: 0
|
|
43990
|
-
},
|
|
43991
|
-
V: {
|
|
43992
|
-
dimension: "voltage",
|
|
43993
|
-
factor: 1,
|
|
43994
|
-
offset: 0
|
|
43995
|
-
},
|
|
43996
|
-
mV: {
|
|
43997
|
-
dimension: "voltage",
|
|
43998
|
-
factor: .001,
|
|
43999
|
-
offset: 0
|
|
44000
|
-
},
|
|
44001
|
-
A: {
|
|
44002
|
-
dimension: "current",
|
|
44003
|
-
factor: 1,
|
|
44004
|
-
offset: 0
|
|
44005
|
-
},
|
|
44006
|
-
mA: {
|
|
44007
|
-
dimension: "current",
|
|
44008
|
-
factor: .001,
|
|
44009
|
-
offset: 0
|
|
44010
|
-
},
|
|
44011
|
-
ppm: {
|
|
44012
|
-
dimension: "concentration-volume",
|
|
44013
|
-
factor: 1,
|
|
44014
|
-
offset: 0
|
|
44015
|
-
},
|
|
44016
|
-
ppb: {
|
|
44017
|
-
dimension: "concentration-volume",
|
|
44018
|
-
factor: .001,
|
|
44019
|
-
offset: 0
|
|
44020
|
-
},
|
|
44021
|
-
"µg/m³": {
|
|
44022
|
-
dimension: "concentration-mass",
|
|
44023
|
-
factor: 1,
|
|
44024
|
-
offset: 0
|
|
44025
|
-
},
|
|
44026
|
-
"mg/m³": {
|
|
44027
|
-
dimension: "concentration-mass",
|
|
44028
|
-
factor: 1e3,
|
|
44029
|
-
offset: 0
|
|
44030
|
-
},
|
|
44031
|
-
kg: {
|
|
44032
|
-
dimension: "mass",
|
|
44033
|
-
factor: 1,
|
|
44034
|
-
offset: 0
|
|
44035
|
-
},
|
|
44036
|
-
g: {
|
|
44037
|
-
dimension: "mass",
|
|
44038
|
-
factor: .001,
|
|
44039
|
-
offset: 0
|
|
44040
|
-
},
|
|
44041
|
-
lb: {
|
|
44042
|
-
dimension: "mass",
|
|
44043
|
-
factor: .453592,
|
|
44044
|
-
offset: 0
|
|
44045
|
-
},
|
|
44046
|
-
oz: {
|
|
44047
|
-
dimension: "mass",
|
|
44048
|
-
factor: .0283495,
|
|
44049
|
-
offset: 0
|
|
44050
|
-
},
|
|
44051
|
-
"%": {
|
|
44052
|
-
dimension: "percentage",
|
|
44053
|
-
factor: 1,
|
|
44054
|
-
offset: 0
|
|
44055
|
-
},
|
|
44056
|
-
L: {
|
|
44057
|
-
dimension: "volume",
|
|
44058
|
-
factor: 1,
|
|
44059
|
-
offset: 0
|
|
44060
|
-
},
|
|
44061
|
-
mL: {
|
|
44062
|
-
dimension: "volume",
|
|
44063
|
-
factor: .001,
|
|
44064
|
-
offset: 0
|
|
44065
|
-
},
|
|
44066
|
-
gal: {
|
|
44067
|
-
dimension: "volume",
|
|
44068
|
-
factor: 3.785411784,
|
|
44069
|
-
offset: 0
|
|
44070
|
-
},
|
|
44071
|
-
s: {
|
|
44072
|
-
dimension: "duration",
|
|
44073
|
-
factor: 1,
|
|
44074
|
-
offset: 0
|
|
44075
|
-
},
|
|
44076
|
-
ms: {
|
|
44077
|
-
dimension: "duration",
|
|
44078
|
-
factor: .001,
|
|
44079
|
-
offset: 0
|
|
44080
|
-
},
|
|
44081
|
-
min: {
|
|
44082
|
-
dimension: "duration",
|
|
44083
|
-
factor: 60,
|
|
44084
|
-
offset: 0
|
|
44085
|
-
},
|
|
44086
|
-
h: {
|
|
44087
|
-
dimension: "duration",
|
|
44088
|
-
factor: 3600,
|
|
44089
|
-
offset: 0
|
|
44090
|
-
},
|
|
44091
|
-
d: {
|
|
44092
|
-
dimension: "duration",
|
|
44093
|
-
factor: 86400,
|
|
44094
|
-
offset: 0
|
|
44095
|
-
},
|
|
44096
|
-
B: {
|
|
44097
|
-
dimension: "information",
|
|
44098
|
-
factor: 1,
|
|
44099
|
-
offset: 0
|
|
44100
|
-
},
|
|
44101
|
-
KiB: {
|
|
44102
|
-
dimension: "information",
|
|
44103
|
-
factor: 1024,
|
|
44104
|
-
offset: 0
|
|
44105
|
-
},
|
|
44106
|
-
MiB: {
|
|
44107
|
-
dimension: "information",
|
|
44108
|
-
factor: 1024 ** 2,
|
|
44109
|
-
offset: 0
|
|
44110
|
-
},
|
|
44111
|
-
GiB: {
|
|
44112
|
-
dimension: "information",
|
|
44113
|
-
factor: 1024 ** 3,
|
|
44114
|
-
offset: 0
|
|
44115
|
-
},
|
|
44116
|
-
TiB: {
|
|
44117
|
-
dimension: "information",
|
|
44118
|
-
factor: 1024 ** 4,
|
|
44119
|
-
offset: 0
|
|
44120
|
-
},
|
|
44121
|
-
kB: {
|
|
44122
|
-
dimension: "information",
|
|
44123
|
-
factor: 1e3,
|
|
44124
|
-
offset: 0
|
|
44125
|
-
},
|
|
44126
|
-
MB: {
|
|
44127
|
-
dimension: "information",
|
|
44128
|
-
factor: 1e6,
|
|
44129
|
-
offset: 0
|
|
44130
|
-
},
|
|
44131
|
-
GB: {
|
|
44132
|
-
dimension: "information",
|
|
44133
|
-
factor: 1e9,
|
|
44134
|
-
offset: 0
|
|
44135
|
-
},
|
|
44136
|
-
"°": {
|
|
44137
|
-
dimension: "angle",
|
|
44138
|
-
factor: 1,
|
|
44139
|
-
offset: 0
|
|
44140
|
-
},
|
|
44141
|
-
dBFS: {
|
|
44142
|
-
dimension: "sound-level",
|
|
44143
|
-
factor: 1,
|
|
44144
|
-
offset: 0
|
|
44145
|
-
},
|
|
44146
|
-
dBm: {
|
|
44147
|
-
dimension: "signal-level",
|
|
44148
|
-
factor: 1,
|
|
44149
|
-
offset: 0
|
|
44150
|
-
},
|
|
44151
|
-
mired: {
|
|
44152
|
-
dimension: "colour-temperature",
|
|
44153
|
-
factor: 1,
|
|
44154
|
-
offset: 0
|
|
44155
|
-
},
|
|
44156
|
-
kbps: {
|
|
44157
|
-
dimension: "bitrate",
|
|
44158
|
-
factor: 1,
|
|
44159
|
-
offset: 0
|
|
44160
|
-
},
|
|
44161
|
-
Mbps: {
|
|
44162
|
-
dimension: "bitrate",
|
|
44163
|
-
factor: 1e3,
|
|
44164
|
-
offset: 0
|
|
44165
|
-
},
|
|
44166
|
-
fps: {
|
|
44167
|
-
dimension: "rate",
|
|
44168
|
-
factor: 1,
|
|
44169
|
-
offset: 0
|
|
44170
|
-
}
|
|
44171
|
-
};
|
|
44172
|
-
/** Resolve a unit's `UnitSpec`, or `undefined` when the spelling is unknown. */
|
|
44173
|
-
function specFor(unit) {
|
|
44174
|
-
return Object.hasOwn(UNIT_TABLE, unit) ? UNIT_TABLE[unit] : void 0;
|
|
44175
|
-
}
|
|
44176
|
-
/** Value in `spec`'s unit → its dimension's canonical unit. */
|
|
44177
|
-
function toCanonical(value, spec) {
|
|
44178
|
-
return value * spec.factor + spec.offset;
|
|
44179
|
-
}
|
|
44180
|
-
/** Canonical-unit value → the unit described by `spec`. */
|
|
44181
|
-
function fromCanonical(canonical, spec) {
|
|
44182
|
-
return (canonical - spec.offset) / spec.factor;
|
|
44183
|
-
}
|
|
44184
|
-
/**
|
|
44185
|
-
* Graceful variant for the render path: returns the converted value, or
|
|
44186
|
-
* `undefined` when the conversion is refused (unknown unit / cross-dimension).
|
|
44187
|
-
* Never throws — a render caller falls back to the raw value + source unit.
|
|
44188
|
-
*/
|
|
44189
|
-
function tryConvertUnit(value, from, to) {
|
|
44190
|
-
if (from === to) return value;
|
|
44191
|
-
const fromSpec = specFor(from);
|
|
44192
|
-
if (!fromSpec) return void 0;
|
|
44193
|
-
const toSpec = specFor(to);
|
|
44194
|
-
if (!toSpec) return void 0;
|
|
44195
|
-
if (fromSpec.dimension !== toSpec.dimension) return void 0;
|
|
44196
|
-
return fromCanonical(toCanonical(value, fromSpec), toSpec);
|
|
44197
|
-
}
|
|
44198
|
-
/**
|
|
44199
44092
|
* A number a person types for a physical quantity — the input side of the
|
|
44200
44093
|
* value + unit contract (D972).
|
|
44201
44094
|
*
|
|
@@ -45957,26 +45850,23 @@ var SettingsSchemaWithValuesSchema = object({
|
|
|
45957
45850
|
var SettingsPatchSchema = record(string(), unknown());
|
|
45958
45851
|
/** The scope of a scoped-settings call (D986): where the capability declared the values. */
|
|
45959
45852
|
var ScopedSettingsScopeSchema = _enum(SCOPED_SETTINGS_SCOPES);
|
|
45853
|
+
/** One scoped schema an addon serves: its capability, scope and section ids. */
|
|
45854
|
+
var ScopedSettingsDeclarationSchema = object({
|
|
45855
|
+
cap: string(),
|
|
45856
|
+
scope: ScopedSettingsScopeSchema,
|
|
45857
|
+
sectionIds: array(string())
|
|
45858
|
+
});
|
|
45960
45859
|
/** Standard success response for update operations. */
|
|
45961
45860
|
var SettingsUpdateResultSchema = object({ success: literal(true) });
|
|
45962
45861
|
method(object({
|
|
45963
|
-
addonId: string(),
|
|
45964
|
-
nodeId: string().optional(),
|
|
45965
|
-
overlay: record(string(), unknown()).optional(),
|
|
45966
|
-
cap: string().optional()
|
|
45967
|
-
}), SettingsSchemaWithValuesSchema.nullable()), method(object({
|
|
45968
|
-
addonId: string(),
|
|
45969
|
-
nodeId: string().optional(),
|
|
45970
|
-
patch: SettingsPatchSchema
|
|
45971
|
-
}), SettingsUpdateResultSchema, {
|
|
45972
|
-
kind: "mutation",
|
|
45973
|
-
auth: "admin"
|
|
45974
|
-
}), method(object({
|
|
45975
45862
|
addonId: string(),
|
|
45976
45863
|
cap: string(),
|
|
45977
45864
|
scope: ScopedSettingsScopeSchema,
|
|
45978
45865
|
nodeId: string().optional()
|
|
45979
45866
|
}), SettingsSchemaWithValuesSchema.nullable()), method(object({
|
|
45867
|
+
addonId: string(),
|
|
45868
|
+
nodeId: string().optional()
|
|
45869
|
+
}), array(ScopedSettingsDeclarationSchema).nullable()), method(object({
|
|
45980
45870
|
addonId: string(),
|
|
45981
45871
|
cap: string(),
|
|
45982
45872
|
scope: ScopedSettingsScopeSchema,
|
|
@@ -45991,9 +45881,6 @@ method(object({
|
|
|
45991
45881
|
scope: ScopedSettingsScopeSchema,
|
|
45992
45882
|
nodeId: string().optional()
|
|
45993
45883
|
}), record(string(), unknown()).nullable()), method(object({
|
|
45994
|
-
addonId: string(),
|
|
45995
|
-
nodeId: string().optional()
|
|
45996
|
-
}), SettingsSchemaWithValuesSchema.nullable()), method(object({
|
|
45997
45884
|
addonId: string(),
|
|
45998
45885
|
nodeId: string().optional(),
|
|
45999
45886
|
instance: IntegrationInstanceRefSchema
|
|
@@ -47337,7 +47224,7 @@ var BackupDestinationInfoSchema = object({
|
|
|
47337
47224
|
id: string(),
|
|
47338
47225
|
/**
|
|
47339
47226
|
* Manifest id of the owning addon. The Settings button on the
|
|
47340
|
-
* destination card opens that addon's
|
|
47227
|
+
* destination card opens that addon's scoped settings panel.
|
|
47341
47228
|
*/
|
|
47342
47229
|
addonId: string(),
|
|
47343
47230
|
/** Operator-toggled enable flag from the destination-policy table. */
|
|
@@ -49924,7 +49811,7 @@ DeviceType.MediaPlayer, method(deviceOnly, _void(), {
|
|
|
49924
49811
|
kind: "mutation",
|
|
49925
49812
|
auth: "protected"
|
|
49926
49813
|
});
|
|
49927
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway, DeviceType.Camera, DeviceType.Fan, DeviceType.Lock, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Gateway, DeviceType.Hub, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder, DeviceType.Heater;
|
|
49814
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway, DeviceType.Camera, DeviceType.Fan, DeviceType.Lock, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Gateway, DeviceType.Hub, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.MediaPlayer;
|
|
49928
49815
|
var NUMBER = {
|
|
49929
49816
|
kind: "fixed",
|
|
49930
49817
|
result: ["number"]
|
|
@@ -51217,7 +51104,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), DayNightOptionsSchema)
|
|
|
51217
51104
|
});
|
|
51218
51105
|
/**
|
|
51219
51106
|
* Stable UI option list for the `hwaccel` setting. Decoder addons
|
|
51220
|
-
* reuse this
|
|
51107
|
+
* reuse this in their scoped settings form so the dropdown is
|
|
51221
51108
|
* identical everywhere. Order: auto → off → common backends by
|
|
51222
51109
|
* platform affinity (macOS, NVIDIA, Intel/AMD, Windows, Linux).
|
|
51223
51110
|
*/
|
|
@@ -51900,6 +51787,7 @@ var deviceExportCapability = {
|
|
|
51900
51787
|
})
|
|
51901
51788
|
}
|
|
51902
51789
|
};
|
|
51790
|
+
var DeviceAliasSchema = string().max(64).regex(/^[a-z][a-z0-9_]*$/);
|
|
51903
51791
|
/**
|
|
51904
51792
|
* A SITE ZONE — a named part of the property that several locations belong to.
|
|
51905
51793
|
*
|
|
@@ -52293,6 +52181,12 @@ var DeviceInfoSchema = object({
|
|
|
52293
52181
|
addonId: string(),
|
|
52294
52182
|
type: _enum(DeviceType),
|
|
52295
52183
|
name: string(),
|
|
52184
|
+
/** The name a value template uses for this device (`{{ stufa_veranda.temperature }}`),
|
|
52185
|
+
* entity_id style. Generated once from the name at first registration, unique
|
|
52186
|
+
* cluster-wide, editable through `setAlias`, NOT changed by a rename (D1021).
|
|
52187
|
+
* Optional: a record produced by an older build omits it until the boot
|
|
52188
|
+
* backfill has run. */
|
|
52189
|
+
alias: DeviceAliasSchema.optional(),
|
|
52296
52190
|
/** Operator-organisational location label. `null` when unset. */
|
|
52297
52191
|
location: string().nullable(),
|
|
52298
52192
|
/** Soft-disabled flag. */
|
|
@@ -52612,6 +52506,25 @@ method(object({
|
|
|
52612
52506
|
}), _void(), {
|
|
52613
52507
|
kind: "mutation",
|
|
52614
52508
|
auth: "admin"
|
|
52509
|
+
}), method(object({
|
|
52510
|
+
deviceId: number(),
|
|
52511
|
+
alias: string()
|
|
52512
|
+
}), discriminatedUnion("ok", [object({
|
|
52513
|
+
ok: literal(true),
|
|
52514
|
+
alias: DeviceAliasSchema
|
|
52515
|
+
}), object({
|
|
52516
|
+
ok: literal(false),
|
|
52517
|
+
reason: _enum([
|
|
52518
|
+
"empty",
|
|
52519
|
+
"too-long",
|
|
52520
|
+
"grammar",
|
|
52521
|
+
"reserved",
|
|
52522
|
+
"taken"
|
|
52523
|
+
]),
|
|
52524
|
+
takenBy: number().optional()
|
|
52525
|
+
})]), {
|
|
52526
|
+
kind: "mutation",
|
|
52527
|
+
auth: "admin"
|
|
52615
52528
|
}), method(object({
|
|
52616
52529
|
deviceId: number(),
|
|
52617
52530
|
location: string().nullable()
|
|
@@ -55749,10 +55662,11 @@ var IntegrationInstanceDescriptionSchema = object({
|
|
|
55749
55662
|
/** True when `testInstance` really probes the remote. */
|
|
55750
55663
|
canTest: boolean(),
|
|
55751
55664
|
/**
|
|
55752
|
-
* The kinds an instance can be of
|
|
55753
|
-
* Add flow asks which first and sends it as
|
|
55665
|
+
* The kinds an instance can be of (D1013 rule 1), each naming its `functionCap`. One entry:
|
|
55666
|
+
* nothing to choose; more than one: the Add flow asks which first and sends it as
|
|
55667
|
+
* `createInstance.kind`. Never empty: every instance belongs to exactly one kind.
|
|
55754
55668
|
*/
|
|
55755
|
-
kinds: array(IntegrationInstanceKindSchema).
|
|
55669
|
+
kinds: array(IntegrationInstanceKindSchema).min(1),
|
|
55756
55670
|
/**
|
|
55757
55671
|
* The provider accepts `createInstance.id` for an id that once existed (an adopted id, because
|
|
55758
55672
|
* devices carry it). The UI then offers "restore under its old id" on Add. Absent means no.
|
|
@@ -55788,8 +55702,8 @@ var IntegrationInstanceSchema = object({
|
|
|
55788
55702
|
* the body is the one store, `setInstanceEnabled` the one writer (epic #440, step 3).
|
|
55789
55703
|
*/
|
|
55790
55704
|
enabled: boolean().optional(),
|
|
55791
|
-
/** The kind of this instance
|
|
55792
|
-
kind: string().
|
|
55705
|
+
/** The kind of this instance: exactly one of `describe().kinds[].id` (D1013 rule 2). */
|
|
55706
|
+
kind: string().min(1),
|
|
55793
55707
|
/** Values for the instance form; a secret is a `SecretFieldView`, never text. */
|
|
55794
55708
|
formValues: record(string(), unknown()),
|
|
55795
55709
|
status: IntegrationInstanceStatusSchema.optional(),
|
|
@@ -65359,6 +65273,11 @@ var NcScheduleSchema = object({
|
|
|
65359
65273
|
* as a STATE SUMMARY at the end of each window of `schedule`.
|
|
65360
65274
|
*/
|
|
65361
65275
|
var NcSystemEventDeliveryModeSchema = _enum(["instant", "summary"]);
|
|
65276
|
+
_enum([
|
|
65277
|
+
"activation",
|
|
65278
|
+
"deactivation",
|
|
65279
|
+
"schedule"
|
|
65280
|
+
]);
|
|
65362
65281
|
/**
|
|
65363
65282
|
* How a summary window is SENT (D698): `rule` (absent) = ONE notification with
|
|
65364
65283
|
* every section; `section` = one notification per section with something to
|
|
@@ -65375,11 +65294,26 @@ var NcStateSummarySplitSchema = _enum(["rule", "section"]);
|
|
|
65375
65294
|
* midnight crossing); the send time is each window's END. Refused on the
|
|
65376
65295
|
* `alarm` family, which stays instant (`systemEventDeliveryProblems`).
|
|
65377
65296
|
*/
|
|
65378
|
-
var NcSystemEventDeliverySchema = discriminatedUnion("mode", [
|
|
65379
|
-
mode: literal("
|
|
65380
|
-
|
|
65381
|
-
|
|
65382
|
-
|
|
65297
|
+
var NcSystemEventDeliverySchema = discriminatedUnion("mode", [
|
|
65298
|
+
object({ mode: literal("instant") }),
|
|
65299
|
+
object({
|
|
65300
|
+
mode: literal("summary"),
|
|
65301
|
+
schedule: NcScheduleSchema,
|
|
65302
|
+
split: NcStateSummarySplitSchema.optional()
|
|
65303
|
+
}),
|
|
65304
|
+
object({
|
|
65305
|
+
mode: literal("modes"),
|
|
65306
|
+
/** The bad edge, and every kind that has a single edge. */
|
|
65307
|
+
onActivation: boolean(),
|
|
65308
|
+
/** The recovery edges of the classes of the selected kinds (derived, never stored per kind). */
|
|
65309
|
+
onDeactivation: boolean(),
|
|
65310
|
+
/** A state summary at the end of each window; absent = no summary. */
|
|
65311
|
+
onSchedule: object({
|
|
65312
|
+
schedule: NcScheduleSchema,
|
|
65313
|
+
grouping: NcStateSummarySplitSchema
|
|
65314
|
+
}).optional()
|
|
65315
|
+
})
|
|
65316
|
+
]);
|
|
65383
65317
|
/** Fuzzy plate matcher — OCR noise makes exact match useless (spec row 12/13). */
|
|
65384
65318
|
var NcPlateMatcherSchema = object({
|
|
65385
65319
|
/**
|
|
@@ -72899,6 +72833,7 @@ var RemoteLayoutComponentSchema = object({
|
|
|
72899
72833
|
});
|
|
72900
72834
|
});
|
|
72901
72835
|
method(object({}), array(RemoteLayoutComponentSchema), { auth: "protected" });
|
|
72836
|
+
DeviceType.MediaPlayer;
|
|
72902
72837
|
var RunningStateSourceSchema = _enum(["native", "assigned"]);
|
|
72903
72838
|
object({
|
|
72904
72839
|
/** null = unknown — never coerced to false (D393). */
|
|
@@ -75334,7 +75269,7 @@ var TerminalInstanceInfoSchema = object({
|
|
|
75334
75269
|
/**
|
|
75335
75270
|
* False while the node the instance is bound to is not in the cluster
|
|
75336
75271
|
* topology (forgotten, renamed, re-paired). The instance is kept; the
|
|
75337
|
-
* operator re-points it
|
|
75272
|
+
* operator re-points it on the Terminal page.
|
|
75338
75273
|
*/
|
|
75339
75274
|
nodeInCluster: boolean(),
|
|
75340
75275
|
profileId: string(),
|
|
@@ -75372,41 +75307,7 @@ var TerminalOutputBatchSchema = object({
|
|
|
75372
75307
|
snapshot: string().optional(),
|
|
75373
75308
|
events: array(TerminalOutputEventSchema).readonly()
|
|
75374
75309
|
});
|
|
75375
|
-
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(
|
|
75376
|
-
targetNodeId: string().min(1),
|
|
75377
|
-
profileId: string().min(1),
|
|
75378
|
-
name: string().trim().min(1).max(160).optional(),
|
|
75379
|
-
executable: string().max(1024).optional(),
|
|
75380
|
-
args: array(string().max(2048)).max(64).optional(),
|
|
75381
|
-
cwd: string().max(1024).optional(),
|
|
75382
|
-
environment: array(string().max(4096)).max(64).optional(),
|
|
75383
|
-
profileSettings: ProfileSettingsBagSchema.optional()
|
|
75384
|
-
}), TerminalInstanceInfoSchema, {
|
|
75385
|
-
kind: "mutation",
|
|
75386
|
-
auth: "admin"
|
|
75387
|
-
}), method(object({
|
|
75388
|
-
instanceId: string().min(1),
|
|
75389
|
-
/** Re-point the instance to another node; the profile must exist there. */
|
|
75390
|
-
targetNodeId: string().min(1).max(256).optional(),
|
|
75391
|
-
name: string().trim().min(1).max(160).optional(),
|
|
75392
|
-
executable: string().max(1024).optional(),
|
|
75393
|
-
args: array(string().max(2048)).max(64).optional(),
|
|
75394
|
-
cwd: string().max(1024).optional(),
|
|
75395
|
-
environment: array(string().max(4096)).max(64).optional(),
|
|
75396
|
-
profileSettings: ProfileSettingsBagSchema.optional()
|
|
75397
|
-
}), TerminalInstanceInfoSchema, {
|
|
75398
|
-
kind: "mutation",
|
|
75399
|
-
auth: "admin"
|
|
75400
|
-
}), method(object({ instanceId: string().min(1) }), _void(), {
|
|
75401
|
-
kind: "mutation",
|
|
75402
|
-
auth: "admin"
|
|
75403
|
-
}), method(object({
|
|
75404
|
-
instanceId: string().min(1),
|
|
75405
|
-
enabled: boolean()
|
|
75406
|
-
}), TerminalInstanceInfoSchema, {
|
|
75407
|
-
kind: "mutation",
|
|
75408
|
-
auth: "admin"
|
|
75409
|
-
}), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
|
|
75310
|
+
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
|
|
75410
75311
|
stableId: string().min(1),
|
|
75411
75312
|
name: string().trim().min(1).max(160).optional()
|
|
75412
75313
|
}), TerminalInstanceInfoSchema, {
|
|
@@ -75475,6 +75376,11 @@ var TimedRunUnitSchema = _enum(["s", "min"]);
|
|
|
75475
75376
|
_enum(["switch", "pet-fountain"]);
|
|
75476
75377
|
DeviceType.Heater, DeviceType.PetFountain;
|
|
75477
75378
|
DeviceType.Heater, DeviceType.PetFountain;
|
|
75379
|
+
/** One duration, as the one-tap run asks for it. */
|
|
75380
|
+
var TimedRunQuickRunSchema = object({
|
|
75381
|
+
duration: number().positive().finite(),
|
|
75382
|
+
unit: TimedRunUnitSchema
|
|
75383
|
+
});
|
|
75478
75384
|
/** Why a request was not carried out. Typed, so a caller can say it in words. */
|
|
75479
75385
|
var TimedRunRefusalSchema = _enum([
|
|
75480
75386
|
"unsupported-device",
|
|
@@ -75495,9 +75401,30 @@ object({
|
|
|
75495
75401
|
activeUntil: number().nullable(),
|
|
75496
75402
|
/** Who asked for the run (a user id or an addon id); `null` when nothing is armed or it did not say. */
|
|
75497
75403
|
requestedBy: string().nullable(),
|
|
75404
|
+
/**
|
|
75405
|
+
* The one-tap run of THIS device: what a "Run" button on any surface starts. `null` when
|
|
75406
|
+
* the device is gone or its type has no timed run; a status from before this field
|
|
75407
|
+
* existed has none, and a surface falls back to the type's default.
|
|
75408
|
+
*/
|
|
75409
|
+
quickRun: TimedRunQuickRunSchema.nullable(),
|
|
75498
75410
|
lastFetchedAt: number()
|
|
75499
75411
|
});
|
|
75500
|
-
|
|
75412
|
+
/** What the settings form needs: the unit, the bounds and the type's default. */
|
|
75413
|
+
var TimedRunOptionsSchema = object({
|
|
75414
|
+
unit: TimedRunUnitSchema,
|
|
75415
|
+
/** The longest run, in `unit`. */
|
|
75416
|
+
maxDuration: number(),
|
|
75417
|
+
defaultDuration: number()
|
|
75418
|
+
});
|
|
75419
|
+
/** The one-tap run duration, in the type's unit; `null` returns to the type's default. */
|
|
75420
|
+
var TimedRunSettingsPatchSchema = object({ quickRunDuration: number().positive().finite().nullable().optional() });
|
|
75421
|
+
method(object({ deviceId: number().int() }), TimedRunOptionsSchema), method(object({
|
|
75422
|
+
deviceId: number().int(),
|
|
75423
|
+
settings: TimedRunSettingsPatchSchema
|
|
75424
|
+
}), _void(), {
|
|
75425
|
+
kind: "mutation",
|
|
75426
|
+
auth: "admin"
|
|
75427
|
+
}), method(object({
|
|
75501
75428
|
deviceId: number().int(),
|
|
75502
75429
|
duration: number().positive().finite(),
|
|
75503
75430
|
unit: TimedRunUnitSchema
|
|
@@ -78203,13 +78130,6 @@ Object.freeze({
|
|
|
78203
78130
|
access: "view",
|
|
78204
78131
|
role: "admin"
|
|
78205
78132
|
},
|
|
78206
|
-
"addonSettings.getGlobalSettings": {
|
|
78207
|
-
capName: "addon-settings",
|
|
78208
|
-
capScope: "system",
|
|
78209
|
-
addonId: null,
|
|
78210
|
-
access: "view",
|
|
78211
|
-
role: "admin"
|
|
78212
|
-
},
|
|
78213
78133
|
"addonSettings.getIntegrationFormSchema": {
|
|
78214
78134
|
capName: "addon-settings",
|
|
78215
78135
|
capScope: "system",
|
|
@@ -78217,14 +78137,14 @@ Object.freeze({
|
|
|
78217
78137
|
access: "view",
|
|
78218
78138
|
role: "admin"
|
|
78219
78139
|
},
|
|
78220
|
-
"addonSettings.
|
|
78140
|
+
"addonSettings.getScopedSettings": {
|
|
78221
78141
|
capName: "addon-settings",
|
|
78222
78142
|
capScope: "system",
|
|
78223
78143
|
addonId: null,
|
|
78224
78144
|
access: "view",
|
|
78225
78145
|
role: "admin"
|
|
78226
78146
|
},
|
|
78227
|
-
"addonSettings.
|
|
78147
|
+
"addonSettings.listScopedSettings": {
|
|
78228
78148
|
capName: "addon-settings",
|
|
78229
78149
|
capScope: "system",
|
|
78230
78150
|
addonId: null,
|
|
@@ -78252,13 +78172,6 @@ Object.freeze({
|
|
|
78252
78172
|
access: "create",
|
|
78253
78173
|
role: "admin"
|
|
78254
78174
|
},
|
|
78255
|
-
"addonSettings.updateGlobalSettings": {
|
|
78256
|
-
capName: "addon-settings",
|
|
78257
|
-
capScope: "system",
|
|
78258
|
-
addonId: null,
|
|
78259
|
-
access: "create",
|
|
78260
|
-
role: "admin"
|
|
78261
|
-
},
|
|
78262
78175
|
"addonSettings.updateScopedSettings": {
|
|
78263
78176
|
capName: "addon-settings",
|
|
78264
78177
|
capScope: "system",
|
|
@@ -80429,6 +80342,13 @@ Object.freeze({
|
|
|
80429
80342
|
access: "create",
|
|
80430
80343
|
role: "admin"
|
|
80431
80344
|
},
|
|
80345
|
+
"deviceManager.setAlias": {
|
|
80346
|
+
capName: "device-manager",
|
|
80347
|
+
capScope: "system",
|
|
80348
|
+
addonId: null,
|
|
80349
|
+
access: "create",
|
|
80350
|
+
role: "admin"
|
|
80351
|
+
},
|
|
80432
80352
|
"deviceManager.setChildLayout": {
|
|
80433
80353
|
capName: "device-manager",
|
|
80434
80354
|
capScope: "system",
|
|
@@ -87156,27 +87076,6 @@ Object.freeze({
|
|
|
87156
87076
|
access: "create",
|
|
87157
87077
|
role: "admin"
|
|
87158
87078
|
},
|
|
87159
|
-
"terminalSession.createInstance": {
|
|
87160
|
-
capName: "terminal-session",
|
|
87161
|
-
capScope: "system",
|
|
87162
|
-
addonId: null,
|
|
87163
|
-
access: "create",
|
|
87164
|
-
role: "admin"
|
|
87165
|
-
},
|
|
87166
|
-
"terminalSession.deleteInstance": {
|
|
87167
|
-
capName: "terminal-session",
|
|
87168
|
-
capScope: "system",
|
|
87169
|
-
addonId: null,
|
|
87170
|
-
access: "delete",
|
|
87171
|
-
role: "admin"
|
|
87172
|
-
},
|
|
87173
|
-
"terminalSession.listInstances": {
|
|
87174
|
-
capName: "terminal-session",
|
|
87175
|
-
capScope: "system",
|
|
87176
|
-
addonId: null,
|
|
87177
|
-
access: "view",
|
|
87178
|
-
role: "admin"
|
|
87179
|
-
},
|
|
87180
87079
|
"terminalSession.listLegacyCameras": {
|
|
87181
87080
|
capName: "terminal-session",
|
|
87182
87081
|
capScope: "system",
|
|
@@ -87219,20 +87118,6 @@ Object.freeze({
|
|
|
87219
87118
|
access: "create",
|
|
87220
87119
|
role: "admin"
|
|
87221
87120
|
},
|
|
87222
|
-
"terminalSession.setInstanceEnabled": {
|
|
87223
|
-
capName: "terminal-session",
|
|
87224
|
-
capScope: "system",
|
|
87225
|
-
addonId: null,
|
|
87226
|
-
access: "create",
|
|
87227
|
-
role: "admin"
|
|
87228
|
-
},
|
|
87229
|
-
"terminalSession.updateInstance": {
|
|
87230
|
-
capName: "terminal-session",
|
|
87231
|
-
capScope: "system",
|
|
87232
|
-
addonId: null,
|
|
87233
|
-
access: "create",
|
|
87234
|
-
role: "admin"
|
|
87235
|
-
},
|
|
87236
87121
|
"terminalSession.writeInput": {
|
|
87237
87122
|
capName: "terminal-session",
|
|
87238
87123
|
capScope: "system",
|
|
@@ -87247,6 +87132,13 @@ Object.freeze({
|
|
|
87247
87132
|
access: "create",
|
|
87248
87133
|
role: "viewer"
|
|
87249
87134
|
},
|
|
87135
|
+
"timedRun.getOptions": {
|
|
87136
|
+
capName: "timed-run",
|
|
87137
|
+
capScope: "device",
|
|
87138
|
+
addonId: null,
|
|
87139
|
+
access: "view",
|
|
87140
|
+
role: "viewer"
|
|
87141
|
+
},
|
|
87250
87142
|
"timedRun.getStatus": {
|
|
87251
87143
|
capName: "timed-run",
|
|
87252
87144
|
capScope: "device",
|
|
@@ -87261,6 +87153,13 @@ Object.freeze({
|
|
|
87261
87153
|
access: "create",
|
|
87262
87154
|
role: "viewer"
|
|
87263
87155
|
},
|
|
87156
|
+
"timedRun.setSettings": {
|
|
87157
|
+
capName: "timed-run",
|
|
87158
|
+
capScope: "device",
|
|
87159
|
+
addonId: null,
|
|
87160
|
+
access: "create",
|
|
87161
|
+
role: "admin"
|
|
87162
|
+
},
|
|
87264
87163
|
"toast.onToast": {
|
|
87265
87164
|
capName: "toast",
|
|
87266
87165
|
capScope: "system",
|
|
@@ -88216,6 +88115,7 @@ function applianceExport(ecosystem, deviceType) {
|
|
|
88216
88115
|
if (!isPlugApplianceType(deviceType)) return null;
|
|
88217
88116
|
return APPLIANCE_EXPORT[ecosystem][deviceType];
|
|
88218
88117
|
}
|
|
88118
|
+
string().min(1).max(4096);
|
|
88219
88119
|
Object.freeze({
|
|
88220
88120
|
"accessories.getStatus": [{
|
|
88221
88121
|
name: "deviceId",
|
|
@@ -88899,6 +88799,11 @@ Object.freeze({
|
|
|
88899
88799
|
form: "single",
|
|
88900
88800
|
optional: false
|
|
88901
88801
|
}],
|
|
88802
|
+
"deviceManager.setAlias": [{
|
|
88803
|
+
name: "deviceId",
|
|
88804
|
+
form: "single",
|
|
88805
|
+
optional: false
|
|
88806
|
+
}],
|
|
88902
88807
|
"deviceManager.setChildLayout": [{
|
|
88903
88808
|
name: "deviceId",
|
|
88904
88809
|
form: "single",
|
|
@@ -90963,6 +90868,11 @@ Object.freeze({
|
|
|
90963
90868
|
form: "single",
|
|
90964
90869
|
optional: false
|
|
90965
90870
|
}],
|
|
90871
|
+
"timedRun.getOptions": [{
|
|
90872
|
+
name: "deviceId",
|
|
90873
|
+
form: "single",
|
|
90874
|
+
optional: false
|
|
90875
|
+
}],
|
|
90966
90876
|
"timedRun.getStatus": [{
|
|
90967
90877
|
name: "deviceId",
|
|
90968
90878
|
form: "single",
|
|
@@ -90973,6 +90883,11 @@ Object.freeze({
|
|
|
90973
90883
|
form: "single",
|
|
90974
90884
|
optional: false
|
|
90975
90885
|
}],
|
|
90886
|
+
"timedRun.setSettings": [{
|
|
90887
|
+
name: "deviceId",
|
|
90888
|
+
form: "single",
|
|
90889
|
+
optional: false
|
|
90890
|
+
}],
|
|
90976
90891
|
"update.getStatus": [{
|
|
90977
90892
|
name: "deviceId",
|
|
90978
90893
|
form: "single",
|
|
@@ -91835,6 +91750,7 @@ var STATE_SUMMARY_VARS = [
|
|
|
91835
91750
|
[...RULE_TEXT],
|
|
91836
91751
|
[...RULE_TEXT],
|
|
91837
91752
|
[...RULE_TEXT],
|
|
91753
|
+
[...RULE_TEXT],
|
|
91838
91754
|
[...RULE_BODY_ONLY],
|
|
91839
91755
|
[...RULE_TEXT],
|
|
91840
91756
|
([...RULE_TEXT], [...DEVICE_EVENTS]),
|
|
@@ -159860,7 +159776,13 @@ var ExportHapAddon = class extends BaseAddon {
|
|
|
159860
159776
|
role: "services",
|
|
159861
159777
|
instanceMode: "multiple",
|
|
159862
159778
|
kind: "bridge",
|
|
159863
|
-
canTest: false
|
|
159779
|
+
canTest: false,
|
|
159780
|
+
kinds: [{
|
|
159781
|
+
id: "bridge",
|
|
159782
|
+
label: "HomeKit bridge",
|
|
159783
|
+
functionCap: "device-export",
|
|
159784
|
+
role: "services"
|
|
159785
|
+
}]
|
|
159864
159786
|
},
|
|
159865
159787
|
formSchema: (id) => this.bridgeForm(id),
|
|
159866
159788
|
initialBody: (name) => ({
|