@camstack/addon-smtp-nodemailer 1.2.152 → 1.2.153
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/smtp.addon.js +575 -604
- package/dist/smtp.addon.mjs +575 -604
- package/package.json +2 -2
package/dist/smtp.addon.js
CHANGED
|
@@ -841,7 +841,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
841
841
|
return EventCategory;
|
|
842
842
|
}({});
|
|
843
843
|
//#endregion
|
|
844
|
-
//#region ../types/dist/device-type-
|
|
844
|
+
//#region ../types/dist/device-type-DxCT0krO.mjs
|
|
845
845
|
/**
|
|
846
846
|
import { errMsg } from '@camstack/types'
|
|
847
847
|
* Extract a human-readable message from an unknown error value.
|
|
@@ -1003,6 +1003,13 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
|
1003
1003
|
* filters that want "all devices with on-motion behaviour".
|
|
1004
1004
|
*/
|
|
1005
1005
|
DeviceFeature["MotionTrigger"] = "motion-trigger";
|
|
1006
|
+
/**
|
|
1007
|
+
* Device can be run for a chosen time and then stopped. Mirrors the
|
|
1008
|
+
* `timed-run` wrapper cap — the cap is bound by the core-blocks addon, not by
|
|
1009
|
+
* a driver, so the flag is derived from the device's bindings
|
|
1010
|
+
* (`featuresOfBoundCaps`). Gates the quick-run control in the viewer.
|
|
1011
|
+
*/
|
|
1012
|
+
DeviceFeature["TimedRun"] = "timed-run";
|
|
1006
1013
|
/** Light supports rgb-triplet color via `color` cap. */
|
|
1007
1014
|
DeviceFeature["LightColorRgb"] = "light-color-rgb";
|
|
1008
1015
|
/** Light supports HSV color via `color` cap. */
|
|
@@ -6037,7 +6044,7 @@ var ZodIssueCode = {
|
|
|
6037
6044
|
var ZodFirstPartyTypeKind;
|
|
6038
6045
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
6039
6046
|
//#endregion
|
|
6040
|
-
//#region ../types/dist/sleep-
|
|
6047
|
+
//#region ../types/dist/sleep-7El4r5Bl.mjs
|
|
6041
6048
|
/**
|
|
6042
6049
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
6043
6050
|
* window to float samples (D455).
|
|
@@ -8406,7 +8413,7 @@ function boundOf(list) {
|
|
|
8406
8413
|
* Base class for CamStack addons. Eliminates settings boilerplate:
|
|
8407
8414
|
*
|
|
8408
8415
|
* - Typed `config` property with automatic resolution from store + defaults
|
|
8409
|
-
* -
|
|
8416
|
+
* - the scoped settings API (`clusterSettings` / `nodeSettings` / `deviceDefaults`) auto-implemented
|
|
8410
8417
|
* - `getAddonSettings()` / `updateAddonSettings()` auto-implemented
|
|
8411
8418
|
* - `getDeviceSettings()` / `updateDeviceSettings()` auto-implemented
|
|
8412
8419
|
* - `ctx` accessor for the AddonContext (no manual `this.ctxRef` storage)
|
|
@@ -8416,7 +8423,7 @@ function boundOf(list) {
|
|
|
8416
8423
|
* Subclasses override:
|
|
8417
8424
|
* - `onInitialize()` — addon-specific init logic, return ProviderRegistration[]
|
|
8418
8425
|
* - `onShutdown()` — cleanup
|
|
8419
|
-
* - `
|
|
8426
|
+
* - `clusterSettingsSchema()` / `nodeSettingsSchema()` / `deviceSettingsSchema()` — UI schemas
|
|
8420
8427
|
*
|
|
8421
8428
|
* @example
|
|
8422
8429
|
* ```ts
|
|
@@ -8430,7 +8437,7 @@ function boundOf(list) {
|
|
|
8430
8437
|
* super({ maxRetries: 3, endpoint: 'http://localhost' })
|
|
8431
8438
|
* }
|
|
8432
8439
|
*
|
|
8433
|
-
* protected
|
|
8440
|
+
* protected clusterSettingsSchema() {
|
|
8434
8441
|
* return this.schema({
|
|
8435
8442
|
* sections: [{
|
|
8436
8443
|
* id: 'main', title: 'Settings',
|
|
@@ -8473,7 +8480,7 @@ var BaseAddon = class {
|
|
|
8473
8480
|
defaults;
|
|
8474
8481
|
/**
|
|
8475
8482
|
* Hidden-state paths that hold secrets (D787) — values the addon writes
|
|
8476
|
-
* itself (`
|
|
8483
|
+
* itself (`state()`, the scoped writers) that no form field declares.
|
|
8477
8484
|
* Stored in the keychain exactly like a `password` field. Syntax:
|
|
8478
8485
|
* `'snapshotSigningKey'`, `'identity.pincode'`, `'tokens[userId].accessToken'`
|
|
8479
8486
|
* (`key[<id field>]` addresses array items by id, never by index).
|
|
@@ -8483,7 +8490,7 @@ var BaseAddon = class {
|
|
|
8483
8490
|
/**
|
|
8484
8491
|
* D986 M4: the scoped schemas this addon declared, resolved once per capability
|
|
8485
8492
|
* (`loadScopedSchemas`) so the sync readers (`perNodeKeys`, the secret tree, the restart check)
|
|
8486
|
-
* see them. Empty until loaded
|
|
8493
|
+
* see them. Empty until loaded.
|
|
8487
8494
|
*/
|
|
8488
8495
|
_scopedByCap = /* @__PURE__ */ new Map();
|
|
8489
8496
|
_nodeKeysByCap = /* @__PURE__ */ new Map();
|
|
@@ -8669,7 +8676,7 @@ var BaseAddon = class {
|
|
|
8669
8676
|
/** Addon-specific cleanup. Override if needed. */
|
|
8670
8677
|
async onShutdown() {}
|
|
8671
8678
|
/**
|
|
8672
|
-
* Called after config is resolved during
|
|
8679
|
+
* Called after config is resolved during a settings write.
|
|
8673
8680
|
* Override to react to config changes (e.g. restart a sampler, reconnect a service).
|
|
8674
8681
|
* Not called during initialize() — use onInitialize() for initial setup.
|
|
8675
8682
|
*/
|
|
@@ -8698,82 +8705,12 @@ var BaseAddon = class {
|
|
|
8698
8705
|
scopedSettingsCapabilities() {
|
|
8699
8706
|
return [];
|
|
8700
8707
|
}
|
|
8701
|
-
/** Override to provide global-level settings UI schema. */
|
|
8702
|
-
globalSettingsSchema(_cap) {
|
|
8703
|
-
return null;
|
|
8704
|
-
}
|
|
8705
8708
|
/** Override to provide device-level settings UI schema. */
|
|
8706
8709
|
deviceSettingsSchema() {
|
|
8707
8710
|
return null;
|
|
8708
8711
|
}
|
|
8709
8712
|
/**
|
|
8710
|
-
*
|
|
8711
|
-
* ARE the configuration of its integration.
|
|
8712
|
-
*
|
|
8713
|
-
* Return the `ConfigSection.id`s, from {@link globalSettingsSchema}, that an
|
|
8714
|
-
* operator should find on the addon's integration page (System →
|
|
8715
|
-
* Integrations → <name>) rather than only in the cluster-wide list of every
|
|
8716
|
-
* addon. Empty (the default) means the addon has no integration-level
|
|
8717
|
-
* settings and no such surface is offered — this is opt-in, because whether
|
|
8718
|
-
* an addon's configuration IS its integration's configuration depends on the
|
|
8719
|
-
* nature of the integration.
|
|
8720
|
-
*
|
|
8721
|
-
* WHAT THIS IS NOT. It is not a scope. The selected sections keep living in
|
|
8722
|
-
* the ONE global schema, in the ONE addon store, written by the ONE
|
|
8723
|
-
* `updateGlobalSettings` path. There is deliberately no
|
|
8724
|
-
* `updateIntegrationSettings`: a second write path is how a surface acquires
|
|
8725
|
-
* a second store key, and this repo has shipped that twice (`btmPath@hub`,
|
|
8726
|
-
* D266). Selecting sections cannot introduce a key that selecting cannot.
|
|
8727
|
-
*
|
|
8728
|
-
* WHY IT IS A LIST OF SECTION IDS AND NOT A MARKER ON THE SECTION.
|
|
8729
|
-
* `ConfigFieldBase` used to carry `scope?: 'device' | 'global'` and it was
|
|
8730
|
-
* removed with the reason recorded at
|
|
8731
|
-
* `packages/types/src/interfaces/config-ui.ts:249` — *"a field's scope is
|
|
8732
|
-
* determined by WHICH schema it lives in, not by a field-level marker."* A
|
|
8733
|
-
* marker sprinkled across sections also has to borrow a field that already
|
|
8734
|
-
* means something else; borrowing `section.tab` put the literal word
|
|
8735
|
-
* "integration" into an operator-facing tab bar, because `tab` means "how to
|
|
8736
|
-
* GROUP this visually" and cannot also mean "where this lives" (D269
|
|
8737
|
-
* supersedes D268). One declaration, in one place, next to the schema whose
|
|
8738
|
-
* ids it names.
|
|
8739
|
-
*/
|
|
8740
|
-
integrationSettingSections() {
|
|
8741
|
-
return [];
|
|
8742
|
-
}
|
|
8743
|
-
async getGlobalSettings(overlay, cap, nodeId) {
|
|
8744
|
-
await this.loadScopedSchemas(cap);
|
|
8745
|
-
const schema = this.globalSettingsSchema(cap) ?? this.scopedFormSchema(cap);
|
|
8746
|
-
if (!schema) return { sections: [] };
|
|
8747
|
-
const projected = await this.readRawProjectedStore(nodeId, cap);
|
|
8748
|
-
return hydrateSchema(schema, overlay ? await this.overlayKeepingMarkers(projected, overlay) : projected, { inlineSecretsAsViews: true });
|
|
8749
|
-
}
|
|
8750
|
-
/**
|
|
8751
|
-
* The integration-level view of this addon's settings: exactly the sections
|
|
8752
|
-
* named by {@link integrationSettingSections}, hydrated from the SAME store
|
|
8753
|
-
* `getGlobalSettings` reads, and narrowed to cluster-scoped fields.
|
|
8754
|
-
*
|
|
8755
|
-
* Returns `null` when the addon declared nothing — an addon that opts out has
|
|
8756
|
-
* no integration settings surface at all, rather than an empty one that reads
|
|
8757
|
-
* as a failed load.
|
|
8758
|
-
*
|
|
8759
|
-
* Three properties hold BY CONSTRUCTION, which is why they are here in core
|
|
8760
|
-
* and not in whichever UI happens to render this:
|
|
8761
|
-
*
|
|
8762
|
-
* 1. **One key.** The payload is a SUBSET of the global schema, so a field
|
|
8763
|
-
* shown here is the same field, with the same bare key, that the addon's
|
|
8764
|
-
* own page shows. There is no integration-specific writer — callers save
|
|
8765
|
-
* through `updateGlobalSettings` — so a second store key is unreachable,
|
|
8766
|
-
* not merely discouraged.
|
|
8767
|
-
* 2. **No node scope.** `perNode: true` fields are DROPPED. Their store key
|
|
8768
|
-
* is `<key>@<nodeId>` and an integration is not a node; whichever node
|
|
8769
|
-
* such a field silently picked would be a wrong answer for the operator
|
|
8770
|
-
* who opened the page (D266).
|
|
8771
|
-
* 3. **No silent typo.** A declared id that names no section throws. The
|
|
8772
|
-
* alternative — skip it — turns a rename into a surface that quietly
|
|
8773
|
-
* empties, which looks exactly like an addon with nothing to configure.
|
|
8774
|
-
*/
|
|
8775
|
-
/**
|
|
8776
|
-
* The form schema of ONE integration instance, or `null` to use {@link globalSettingsSchema}.
|
|
8713
|
+
* The form schema of ONE integration instance, or `null` to use the scoped form.
|
|
8777
8714
|
*
|
|
8778
8715
|
* Override it only when an `instanceMode: multiple` addon's instances differ: an NVR integration
|
|
8779
8716
|
* needs its connection fields, the default integration the addon's own sections. It is the
|
|
@@ -8946,6 +8883,19 @@ var BaseAddon = class {
|
|
|
8946
8883
|
const overlay = await this.scopedSettingsOverlay(scope, cap, nodeId);
|
|
8947
8884
|
return hydrateSchema(schema, overlay ? await this.overlayKeepingMarkers(stored, overlay) : stored, { inlineSecretsAsViews: true });
|
|
8948
8885
|
}
|
|
8886
|
+
/**
|
|
8887
|
+
* The scoped schemas this addon serves: one entry per loaded (capability, scope), capabilities
|
|
8888
|
+
* in declaration order, scopes in {@link SCOPED_SETTINGS_SCOPES} order. `[]` when it declares
|
|
8889
|
+
* nothing.
|
|
8890
|
+
*/
|
|
8891
|
+
async listScopedSettings() {
|
|
8892
|
+
await this.loadScopedSchemas();
|
|
8893
|
+
return [...this._scopedByCap].flatMap(([cap, entries]) => entries.map((entry) => ({
|
|
8894
|
+
cap,
|
|
8895
|
+
scope: entry.scope,
|
|
8896
|
+
sectionIds: entry.schema.sections.map((section) => section.id)
|
|
8897
|
+
})));
|
|
8898
|
+
}
|
|
8949
8899
|
/** The OPERATOR's write of declared keys of one scope (D787 secret semantics). */
|
|
8950
8900
|
async updateScopedSettings(scope, cap, patch, nodeId) {
|
|
8951
8901
|
this._operatorWriteDepth++;
|
|
@@ -8971,32 +8921,15 @@ var BaseAddon = class {
|
|
|
8971
8921
|
*/
|
|
8972
8922
|
async getIntegrationFormSchema(instance, nodeId) {
|
|
8973
8923
|
const scoped = await this.integrationFormSchema(instance);
|
|
8974
|
-
if (scoped === null) return this.
|
|
8924
|
+
if (scoped === null) return this.scopedForm(nodeId);
|
|
8975
8925
|
return hydrateSchema(scoped, {}, { inlineSecretsAsViews: true });
|
|
8976
8926
|
}
|
|
8977
|
-
|
|
8978
|
-
|
|
8979
|
-
|
|
8980
|
-
const schema = this.
|
|
8981
|
-
if (!schema)
|
|
8982
|
-
|
|
8983
|
-
const sections = [];
|
|
8984
|
-
for (const id of declared) {
|
|
8985
|
-
const section = byId.get(id);
|
|
8986
|
-
if (!section) throw new Error(`${this.constructor.name}: integrationSettingSections() names unknown section "${id}". Known sections: [${[...byId.keys()].join(", ")}].`);
|
|
8987
|
-
const fields = dropPerNodeFields(section.fields);
|
|
8988
|
-
if (fields.length === 0) continue;
|
|
8989
|
-
sections.push({
|
|
8990
|
-
...section,
|
|
8991
|
-
fields
|
|
8992
|
-
});
|
|
8993
|
-
}
|
|
8994
|
-
if (sections.length === 0) return null;
|
|
8995
|
-
const projected = await this.readRawProjectedStore(nodeId);
|
|
8996
|
-
return hydrateSchema({
|
|
8997
|
-
...schema,
|
|
8998
|
-
sections
|
|
8999
|
-
}, projected, { inlineSecretsAsViews: true });
|
|
8927
|
+
/** The form of the scoped schemas this addon declared, hydrated from its store. */
|
|
8928
|
+
async scopedForm(nodeId) {
|
|
8929
|
+
await this.loadScopedSchemas();
|
|
8930
|
+
const schema = this.scopedFormSchema();
|
|
8931
|
+
if (!schema) return { sections: [] };
|
|
8932
|
+
return hydrateSchema(schema, await this.readRawProjectedStore(nodeId), { inlineSecretsAsViews: true });
|
|
9000
8933
|
}
|
|
9001
8934
|
/**
|
|
9002
8935
|
* The raw addon store PROJECTED onto the target node's bare per-node keys:
|
|
@@ -9005,8 +8938,8 @@ var BaseAddon = class {
|
|
|
9005
8938
|
* bare fallback), all `@`-scoped and stray bare per-node keys are dropped.
|
|
9006
8939
|
* A no-op passthrough when the schema declares no `perNode` field.
|
|
9007
8940
|
*
|
|
9008
|
-
* This is the sanctioned way for
|
|
9009
|
-
* the store for custom
|
|
8941
|
+
* This is the sanctioned way for an addon that needs
|
|
8942
|
+
* the store for custom logic (option narrowing, value snapping) to
|
|
9010
8943
|
* read it per-node — never `ctx.settings.readAddonStore()` directly.
|
|
9011
8944
|
* `nodeId` omitted ⇒ the local node (node-blind injection from ctx).
|
|
9012
8945
|
*
|
|
@@ -9058,7 +8991,7 @@ var BaseAddon = class {
|
|
|
9058
8991
|
}
|
|
9059
8992
|
/**
|
|
9060
8993
|
* Whether ONE global key of this addon's store was written, read three-way
|
|
9061
|
-
* (D651). For a question a hydrated view cannot answer:
|
|
8994
|
+
* (D651). For a question a hydrated view cannot answer: a hydrated form
|
|
9062
8995
|
* reports `value ?? default`, so "the operator chose the default" and "nobody
|
|
9063
8996
|
* chose" look the same, and a failed read looks like both. A `perNode` key is
|
|
9064
8997
|
* not supported here: its stored name is scoped.
|
|
@@ -9092,7 +9025,7 @@ var BaseAddon = class {
|
|
|
9092
9025
|
}
|
|
9093
9026
|
/**
|
|
9094
9027
|
* The OPERATOR's write — a settings form or an admin API call, dispatched by
|
|
9095
|
-
* the kernel.
|
|
9028
|
+
* the kernel. The one in-process write of the addon blob that is not a scoped write; a secret
|
|
9096
9029
|
* the operator sends is stored as sent even when it equals a pre-keychain
|
|
9097
9030
|
* inline value: the operator re-entering a password is a change, an addon
|
|
9098
9031
|
* writing back what it read is not (D787).
|
|
@@ -9105,9 +9038,6 @@ var BaseAddon = class {
|
|
|
9105
9038
|
this._operatorWriteDepth--;
|
|
9106
9039
|
}
|
|
9107
9040
|
}
|
|
9108
|
-
async updateGlobalSettings(patch, nodeId) {
|
|
9109
|
-
await this.applyGlobalPatch(patch, nodeId);
|
|
9110
|
-
}
|
|
9111
9041
|
/**
|
|
9112
9042
|
* REMOVE stored secrets — their keychain values and their markers (D787).
|
|
9113
9043
|
*
|
|
@@ -9150,8 +9080,7 @@ var BaseAddon = class {
|
|
|
9150
9080
|
await this.resolveConfig();
|
|
9151
9081
|
await this.onConfigChanged();
|
|
9152
9082
|
this.emitLifecycle(EventCategory.AddonUpdated, { level: "global" });
|
|
9153
|
-
|
|
9154
|
-
this.maybeAutoRestart(Object.keys(barePatch), [...legacy === null ? [] : [legacy], ...this.loadedScopedSchemas().map((entry) => entry.schema)]);
|
|
9083
|
+
this.maybeAutoRestart(Object.keys(barePatch), this.loadedScopedSchemas().map((entry) => entry.schema));
|
|
9155
9084
|
return true;
|
|
9156
9085
|
}
|
|
9157
9086
|
/**
|
|
@@ -9189,10 +9118,7 @@ var BaseAddon = class {
|
|
|
9189
9118
|
this._nodeKeysByCap = /* @__PURE__ */ new Map();
|
|
9190
9119
|
this._addonSecretTree = null;
|
|
9191
9120
|
}
|
|
9192
|
-
/**
|
|
9193
|
-
* The form the settings API serves while an addon declares no {@link globalSettingsSchema}: the
|
|
9194
|
-
* sections of its scoped schemas, so dropping the old hook does not blank the form.
|
|
9195
|
-
*/
|
|
9121
|
+
/** The form of an addon's scoped schemas: their sections, each shown once. */
|
|
9196
9122
|
scopedFormSchema(cap) {
|
|
9197
9123
|
const byId = /* @__PURE__ */ new Map();
|
|
9198
9124
|
for (const entry of this.loadedScopedSchemas(cap)) for (const section of entry.schema.sections) if (!byId.has(section.id)) byId.set(section.id, section);
|
|
@@ -9204,8 +9130,7 @@ var BaseAddon = class {
|
|
|
9204
9130
|
return [...this._scopedByCap.values()].flat();
|
|
9205
9131
|
}
|
|
9206
9132
|
/**
|
|
9207
|
-
* The field keys that are stored per node: every field of a {@link nodeSettingsSchema}
|
|
9208
|
-
* the fields the legacy {@link globalSettingsSchema} still marks `perNode: true`. Derived once
|
|
9133
|
+
* The field keys that are stored per node: every field of a {@link nodeSettingsSchema}. Derived once
|
|
9209
9134
|
* per `cap` argument and memoized (schemas are static declarations). Empty set ⇒ every
|
|
9210
9135
|
* per-node code path is bypassed and the settings API behaves like the node-agnostic one.
|
|
9211
9136
|
* Call {@link loadScopedSchemas} first (the async seams do).
|
|
@@ -9214,8 +9139,7 @@ var BaseAddon = class {
|
|
|
9214
9139
|
const cacheKey = cap ?? "";
|
|
9215
9140
|
const cached = this._nodeKeysByCap.get(cacheKey);
|
|
9216
9141
|
if (cached) return cached;
|
|
9217
|
-
const
|
|
9218
|
-
const keys = new Set(legacy ? legacy.sections.flatMap((section) => collectPerNodeFieldKeys(section.fields)) : []);
|
|
9142
|
+
const keys = /* @__PURE__ */ new Set();
|
|
9219
9143
|
for (const { scope, schema } of this.loadedScopedSchemas(cap)) {
|
|
9220
9144
|
if (scope !== "node") continue;
|
|
9221
9145
|
for (const section of schema.sections) for (const key of collectValueFieldKeys(section.fields)) keys.add(key);
|
|
@@ -9433,8 +9357,6 @@ var BaseAddon = class {
|
|
|
9433
9357
|
}
|
|
9434
9358
|
declaredKeySet() {
|
|
9435
9359
|
const keys = new Set(Object.keys(this.defaults));
|
|
9436
|
-
const schema = this.globalSettingsSchema();
|
|
9437
|
-
if (schema) for (const section of schema.sections) for (const key of collectFieldKeys(section.fields)) keys.add(key);
|
|
9438
9360
|
for (const { schema: scoped } of this.loadedScopedSchemas()) for (const section of scoped.sections) for (const key of collectFieldKeys(section.fields)) keys.add(key);
|
|
9439
9361
|
for (const key of this._declaredStateKeys) keys.add(key);
|
|
9440
9362
|
for (const path of this.secretStatePaths) {
|
|
@@ -9532,7 +9454,7 @@ var BaseAddon = class {
|
|
|
9532
9454
|
/** The addon store's secret tree: schema fields by TYPE, plus `secretStatePaths`. */
|
|
9533
9455
|
addonSecretTree() {
|
|
9534
9456
|
if (this._addonSecretTree === null) {
|
|
9535
|
-
const tree = new Map(
|
|
9457
|
+
const tree = /* @__PURE__ */ new Map();
|
|
9536
9458
|
for (const { schema } of this.loadedScopedSchemas()) for (const [key, node] of secretTreeFromSchema(schema)) tree.set(key, node);
|
|
9537
9459
|
this._addonSecretTree = mergeSecretStatePaths(tree, this.secretStatePaths);
|
|
9538
9460
|
}
|
|
@@ -9744,47 +9666,6 @@ function classifyStoreError(err) {
|
|
|
9744
9666
|
if (TRANSPORT_PHRASES.some((f) => message.includes(f))) return "transport";
|
|
9745
9667
|
return "permanent";
|
|
9746
9668
|
}
|
|
9747
|
-
/**
|
|
9748
|
-
* Collect the keys of every field marked `perNode: true`, recursing into
|
|
9749
|
-
* layout containers (`group` fields and `sub-tabs` tabs) the same way
|
|
9750
|
-
* `hydrateSchema` does. Valueless structural fields (separator/info/…)
|
|
9751
|
-
* don't declare `perNode` and are excluded by the `in` narrowing.
|
|
9752
|
-
*/
|
|
9753
|
-
/**
|
|
9754
|
-
* The same fields with every `perNode: true` one removed, recursing into layout
|
|
9755
|
-
* containers exactly as {@link collectPerNodeFieldKeys} does. A container left
|
|
9756
|
-
* with no child is dropped rather than rendered empty.
|
|
9757
|
-
*
|
|
9758
|
-
* Used by `getIntegrationSettings`: an integration is not a node, so a field
|
|
9759
|
-
* whose store key is `<key>@<nodeId>` has no node to belong to there.
|
|
9760
|
-
*/
|
|
9761
|
-
function dropPerNodeFields(fields) {
|
|
9762
|
-
const kept = [];
|
|
9763
|
-
for (const field of fields) {
|
|
9764
|
-
if (field.type === "group") {
|
|
9765
|
-
const inner = dropPerNodeFields(field.fields);
|
|
9766
|
-
if (inner.length > 0) kept.push({
|
|
9767
|
-
...field,
|
|
9768
|
-
fields: inner
|
|
9769
|
-
});
|
|
9770
|
-
continue;
|
|
9771
|
-
}
|
|
9772
|
-
if (field.type === "sub-tabs") {
|
|
9773
|
-
const tabs = field.tabs.map((tab) => ({
|
|
9774
|
-
...tab,
|
|
9775
|
-
fields: dropPerNodeFields(tab.fields)
|
|
9776
|
-
})).filter((tab) => tab.fields.length > 0);
|
|
9777
|
-
if (tabs.length > 0) kept.push({
|
|
9778
|
-
...field,
|
|
9779
|
-
tabs
|
|
9780
|
-
});
|
|
9781
|
-
continue;
|
|
9782
|
-
}
|
|
9783
|
-
if ("perNode" in field && field.perNode === true) continue;
|
|
9784
|
-
kept.push(field);
|
|
9785
|
-
}
|
|
9786
|
-
return kept;
|
|
9787
|
-
}
|
|
9788
9669
|
/** The keys of the value-holding fields, recursing into layout containers. */
|
|
9789
9670
|
function collectValueFieldKeys(fields) {
|
|
9790
9671
|
const collected = [];
|
|
@@ -9817,21 +9698,6 @@ function collectFieldKeys(fields) {
|
|
|
9817
9698
|
}
|
|
9818
9699
|
return collected;
|
|
9819
9700
|
}
|
|
9820
|
-
function collectPerNodeFieldKeys(fields) {
|
|
9821
|
-
const collected = [];
|
|
9822
|
-
for (const field of fields) {
|
|
9823
|
-
if (field.type === "group") {
|
|
9824
|
-
collected.push(...collectPerNodeFieldKeys(field.fields));
|
|
9825
|
-
continue;
|
|
9826
|
-
}
|
|
9827
|
-
if (field.type === "sub-tabs") {
|
|
9828
|
-
for (const tab of field.tabs) collected.push(...collectPerNodeFieldKeys(tab.fields));
|
|
9829
|
-
continue;
|
|
9830
|
-
}
|
|
9831
|
-
if ("perNode" in field && field.perNode === true) collected.push(field.key);
|
|
9832
|
-
}
|
|
9833
|
-
return collected;
|
|
9834
|
-
}
|
|
9835
9701
|
/**
|
|
9836
9702
|
* Normalize an `ICamstackAddon.initialize()` return value into the
|
|
9837
9703
|
* `AddonInitResult` envelope. Arrays are wrapped into `{ providers }`;
|
|
@@ -12588,13 +12454,25 @@ Object.freeze({
|
|
|
12588
12454
|
"path": "temperature",
|
|
12589
12455
|
"valueType": "number"
|
|
12590
12456
|
}],
|
|
12591
|
-
"timed-run": [
|
|
12592
|
-
|
|
12593
|
-
|
|
12594
|
-
|
|
12595
|
-
|
|
12596
|
-
|
|
12597
|
-
|
|
12457
|
+
"timed-run": [
|
|
12458
|
+
{
|
|
12459
|
+
"path": "activeUntil",
|
|
12460
|
+
"valueType": "number"
|
|
12461
|
+
},
|
|
12462
|
+
{
|
|
12463
|
+
"path": "requestedBy",
|
|
12464
|
+
"valueType": "string"
|
|
12465
|
+
},
|
|
12466
|
+
{
|
|
12467
|
+
"path": "quickRun.duration",
|
|
12468
|
+
"valueType": "number"
|
|
12469
|
+
},
|
|
12470
|
+
{
|
|
12471
|
+
"path": "quickRun.unit",
|
|
12472
|
+
"valueType": "enum",
|
|
12473
|
+
"enumValues": ["s", "min"]
|
|
12474
|
+
}
|
|
12475
|
+
],
|
|
12598
12476
|
"update": [
|
|
12599
12477
|
{
|
|
12600
12478
|
"path": "currentVersion",
|
|
@@ -12832,7 +12710,7 @@ function userError(code, params, englishFallback) {
|
|
|
12832
12710
|
return new CamstackError(code, params, englishFallback);
|
|
12833
12711
|
}
|
|
12834
12712
|
//#endregion
|
|
12835
|
-
//#region ../types/dist/composition-
|
|
12713
|
+
//#region ../types/dist/composition-Bx0JvKUU.mjs
|
|
12836
12714
|
/**
|
|
12837
12715
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
12838
12716
|
*
|
|
@@ -13994,6 +13872,387 @@ var NodeColorIdSchema = _enum([
|
|
|
13994
13872
|
"node-h"
|
|
13995
13873
|
]);
|
|
13996
13874
|
//#endregion
|
|
13875
|
+
//#region ../types/dist/convert-BAzH15HU.mjs
|
|
13876
|
+
/**
|
|
13877
|
+
* Frozen unit → spec table. `•` in the doc marks each dimension's canonical
|
|
13878
|
+
* unit (`factor: 1, offset: 0`). °F derives from `°C = (°F − 32) × 5/9` ⇒
|
|
13879
|
+
* `factor = 5/9`, `offset = -160/9` (kept as exact expressions, not rounded
|
|
13880
|
+
* decimals). K derives from `°C = K − 273.15`.
|
|
13881
|
+
*/
|
|
13882
|
+
var UNIT_TABLE = {
|
|
13883
|
+
"°C": {
|
|
13884
|
+
dimension: "temperature",
|
|
13885
|
+
factor: 1,
|
|
13886
|
+
offset: 0
|
|
13887
|
+
},
|
|
13888
|
+
"°F": {
|
|
13889
|
+
dimension: "temperature",
|
|
13890
|
+
factor: 5 / 9,
|
|
13891
|
+
offset: -160 / 9
|
|
13892
|
+
},
|
|
13893
|
+
K: {
|
|
13894
|
+
dimension: "temperature",
|
|
13895
|
+
factor: 1,
|
|
13896
|
+
offset: -273.15
|
|
13897
|
+
},
|
|
13898
|
+
hPa: {
|
|
13899
|
+
dimension: "pressure",
|
|
13900
|
+
factor: 1,
|
|
13901
|
+
offset: 0
|
|
13902
|
+
},
|
|
13903
|
+
kPa: {
|
|
13904
|
+
dimension: "pressure",
|
|
13905
|
+
factor: 10,
|
|
13906
|
+
offset: 0
|
|
13907
|
+
},
|
|
13908
|
+
Pa: {
|
|
13909
|
+
dimension: "pressure",
|
|
13910
|
+
factor: .01,
|
|
13911
|
+
offset: 0
|
|
13912
|
+
},
|
|
13913
|
+
mbar: {
|
|
13914
|
+
dimension: "pressure",
|
|
13915
|
+
factor: 1,
|
|
13916
|
+
offset: 0
|
|
13917
|
+
},
|
|
13918
|
+
bar: {
|
|
13919
|
+
dimension: "pressure",
|
|
13920
|
+
factor: 1e3,
|
|
13921
|
+
offset: 0
|
|
13922
|
+
},
|
|
13923
|
+
inHg: {
|
|
13924
|
+
dimension: "pressure",
|
|
13925
|
+
factor: 33.8639,
|
|
13926
|
+
offset: 0
|
|
13927
|
+
},
|
|
13928
|
+
mmHg: {
|
|
13929
|
+
dimension: "pressure",
|
|
13930
|
+
factor: 1.33322,
|
|
13931
|
+
offset: 0
|
|
13932
|
+
},
|
|
13933
|
+
psi: {
|
|
13934
|
+
dimension: "pressure",
|
|
13935
|
+
factor: 68.9476,
|
|
13936
|
+
offset: 0
|
|
13937
|
+
},
|
|
13938
|
+
"m/s": {
|
|
13939
|
+
dimension: "speed",
|
|
13940
|
+
factor: 1,
|
|
13941
|
+
offset: 0
|
|
13942
|
+
},
|
|
13943
|
+
"km/h": {
|
|
13944
|
+
dimension: "speed",
|
|
13945
|
+
factor: 1 / 3.6,
|
|
13946
|
+
offset: 0
|
|
13947
|
+
},
|
|
13948
|
+
mph: {
|
|
13949
|
+
dimension: "speed",
|
|
13950
|
+
factor: .44704,
|
|
13951
|
+
offset: 0
|
|
13952
|
+
},
|
|
13953
|
+
kn: {
|
|
13954
|
+
dimension: "speed",
|
|
13955
|
+
factor: .514444,
|
|
13956
|
+
offset: 0
|
|
13957
|
+
},
|
|
13958
|
+
"mm/h": {
|
|
13959
|
+
dimension: "precipitation-rate",
|
|
13960
|
+
factor: 1,
|
|
13961
|
+
offset: 0
|
|
13962
|
+
},
|
|
13963
|
+
"in/h": {
|
|
13964
|
+
dimension: "precipitation-rate",
|
|
13965
|
+
factor: 25.4,
|
|
13966
|
+
offset: 0
|
|
13967
|
+
},
|
|
13968
|
+
m: {
|
|
13969
|
+
dimension: "length",
|
|
13970
|
+
factor: 1,
|
|
13971
|
+
offset: 0
|
|
13972
|
+
},
|
|
13973
|
+
mm: {
|
|
13974
|
+
dimension: "length",
|
|
13975
|
+
factor: .001,
|
|
13976
|
+
offset: 0
|
|
13977
|
+
},
|
|
13978
|
+
cm: {
|
|
13979
|
+
dimension: "length",
|
|
13980
|
+
factor: .01,
|
|
13981
|
+
offset: 0
|
|
13982
|
+
},
|
|
13983
|
+
km: {
|
|
13984
|
+
dimension: "length",
|
|
13985
|
+
factor: 1e3,
|
|
13986
|
+
offset: 0
|
|
13987
|
+
},
|
|
13988
|
+
in: {
|
|
13989
|
+
dimension: "length",
|
|
13990
|
+
factor: .0254,
|
|
13991
|
+
offset: 0
|
|
13992
|
+
},
|
|
13993
|
+
ft: {
|
|
13994
|
+
dimension: "length",
|
|
13995
|
+
factor: .3048,
|
|
13996
|
+
offset: 0
|
|
13997
|
+
},
|
|
13998
|
+
mi: {
|
|
13999
|
+
dimension: "length",
|
|
14000
|
+
factor: 1609.344,
|
|
14001
|
+
offset: 0
|
|
14002
|
+
},
|
|
14003
|
+
"m²": {
|
|
14004
|
+
dimension: "area",
|
|
14005
|
+
factor: 1,
|
|
14006
|
+
offset: 0
|
|
14007
|
+
},
|
|
14008
|
+
lx: {
|
|
14009
|
+
dimension: "illuminance",
|
|
14010
|
+
factor: 1,
|
|
14011
|
+
offset: 0
|
|
14012
|
+
},
|
|
14013
|
+
"W/m²": {
|
|
14014
|
+
dimension: "irradiance",
|
|
14015
|
+
factor: 1,
|
|
14016
|
+
offset: 0
|
|
14017
|
+
},
|
|
14018
|
+
W: {
|
|
14019
|
+
dimension: "power",
|
|
14020
|
+
factor: 1,
|
|
14021
|
+
offset: 0
|
|
14022
|
+
},
|
|
14023
|
+
kW: {
|
|
14024
|
+
dimension: "power",
|
|
14025
|
+
factor: 1e3,
|
|
14026
|
+
offset: 0
|
|
14027
|
+
},
|
|
14028
|
+
VA: {
|
|
14029
|
+
dimension: "apparent-power",
|
|
14030
|
+
factor: 1,
|
|
14031
|
+
offset: 0
|
|
14032
|
+
},
|
|
14033
|
+
Wh: {
|
|
14034
|
+
dimension: "energy",
|
|
14035
|
+
factor: 1,
|
|
14036
|
+
offset: 0
|
|
14037
|
+
},
|
|
14038
|
+
kWh: {
|
|
14039
|
+
dimension: "energy",
|
|
14040
|
+
factor: 1e3,
|
|
14041
|
+
offset: 0
|
|
14042
|
+
},
|
|
14043
|
+
MWh: {
|
|
14044
|
+
dimension: "energy",
|
|
14045
|
+
factor: 1e6,
|
|
14046
|
+
offset: 0
|
|
14047
|
+
},
|
|
14048
|
+
V: {
|
|
14049
|
+
dimension: "voltage",
|
|
14050
|
+
factor: 1,
|
|
14051
|
+
offset: 0
|
|
14052
|
+
},
|
|
14053
|
+
mV: {
|
|
14054
|
+
dimension: "voltage",
|
|
14055
|
+
factor: .001,
|
|
14056
|
+
offset: 0
|
|
14057
|
+
},
|
|
14058
|
+
A: {
|
|
14059
|
+
dimension: "current",
|
|
14060
|
+
factor: 1,
|
|
14061
|
+
offset: 0
|
|
14062
|
+
},
|
|
14063
|
+
mA: {
|
|
14064
|
+
dimension: "current",
|
|
14065
|
+
factor: .001,
|
|
14066
|
+
offset: 0
|
|
14067
|
+
},
|
|
14068
|
+
ppm: {
|
|
14069
|
+
dimension: "concentration-volume",
|
|
14070
|
+
factor: 1,
|
|
14071
|
+
offset: 0
|
|
14072
|
+
},
|
|
14073
|
+
ppb: {
|
|
14074
|
+
dimension: "concentration-volume",
|
|
14075
|
+
factor: .001,
|
|
14076
|
+
offset: 0
|
|
14077
|
+
},
|
|
14078
|
+
"µg/m³": {
|
|
14079
|
+
dimension: "concentration-mass",
|
|
14080
|
+
factor: 1,
|
|
14081
|
+
offset: 0
|
|
14082
|
+
},
|
|
14083
|
+
"mg/m³": {
|
|
14084
|
+
dimension: "concentration-mass",
|
|
14085
|
+
factor: 1e3,
|
|
14086
|
+
offset: 0
|
|
14087
|
+
},
|
|
14088
|
+
kg: {
|
|
14089
|
+
dimension: "mass",
|
|
14090
|
+
factor: 1,
|
|
14091
|
+
offset: 0
|
|
14092
|
+
},
|
|
14093
|
+
g: {
|
|
14094
|
+
dimension: "mass",
|
|
14095
|
+
factor: .001,
|
|
14096
|
+
offset: 0
|
|
14097
|
+
},
|
|
14098
|
+
lb: {
|
|
14099
|
+
dimension: "mass",
|
|
14100
|
+
factor: .453592,
|
|
14101
|
+
offset: 0
|
|
14102
|
+
},
|
|
14103
|
+
oz: {
|
|
14104
|
+
dimension: "mass",
|
|
14105
|
+
factor: .0283495,
|
|
14106
|
+
offset: 0
|
|
14107
|
+
},
|
|
14108
|
+
"%": {
|
|
14109
|
+
dimension: "percentage",
|
|
14110
|
+
factor: 1,
|
|
14111
|
+
offset: 0
|
|
14112
|
+
},
|
|
14113
|
+
L: {
|
|
14114
|
+
dimension: "volume",
|
|
14115
|
+
factor: 1,
|
|
14116
|
+
offset: 0
|
|
14117
|
+
},
|
|
14118
|
+
mL: {
|
|
14119
|
+
dimension: "volume",
|
|
14120
|
+
factor: .001,
|
|
14121
|
+
offset: 0
|
|
14122
|
+
},
|
|
14123
|
+
gal: {
|
|
14124
|
+
dimension: "volume",
|
|
14125
|
+
factor: 3.785411784,
|
|
14126
|
+
offset: 0
|
|
14127
|
+
},
|
|
14128
|
+
s: {
|
|
14129
|
+
dimension: "duration",
|
|
14130
|
+
factor: 1,
|
|
14131
|
+
offset: 0
|
|
14132
|
+
},
|
|
14133
|
+
ms: {
|
|
14134
|
+
dimension: "duration",
|
|
14135
|
+
factor: .001,
|
|
14136
|
+
offset: 0
|
|
14137
|
+
},
|
|
14138
|
+
min: {
|
|
14139
|
+
dimension: "duration",
|
|
14140
|
+
factor: 60,
|
|
14141
|
+
offset: 0
|
|
14142
|
+
},
|
|
14143
|
+
h: {
|
|
14144
|
+
dimension: "duration",
|
|
14145
|
+
factor: 3600,
|
|
14146
|
+
offset: 0
|
|
14147
|
+
},
|
|
14148
|
+
d: {
|
|
14149
|
+
dimension: "duration",
|
|
14150
|
+
factor: 86400,
|
|
14151
|
+
offset: 0
|
|
14152
|
+
},
|
|
14153
|
+
B: {
|
|
14154
|
+
dimension: "information",
|
|
14155
|
+
factor: 1,
|
|
14156
|
+
offset: 0
|
|
14157
|
+
},
|
|
14158
|
+
KiB: {
|
|
14159
|
+
dimension: "information",
|
|
14160
|
+
factor: 1024,
|
|
14161
|
+
offset: 0
|
|
14162
|
+
},
|
|
14163
|
+
MiB: {
|
|
14164
|
+
dimension: "information",
|
|
14165
|
+
factor: 1024 ** 2,
|
|
14166
|
+
offset: 0
|
|
14167
|
+
},
|
|
14168
|
+
GiB: {
|
|
14169
|
+
dimension: "information",
|
|
14170
|
+
factor: 1024 ** 3,
|
|
14171
|
+
offset: 0
|
|
14172
|
+
},
|
|
14173
|
+
TiB: {
|
|
14174
|
+
dimension: "information",
|
|
14175
|
+
factor: 1024 ** 4,
|
|
14176
|
+
offset: 0
|
|
14177
|
+
},
|
|
14178
|
+
kB: {
|
|
14179
|
+
dimension: "information",
|
|
14180
|
+
factor: 1e3,
|
|
14181
|
+
offset: 0
|
|
14182
|
+
},
|
|
14183
|
+
MB: {
|
|
14184
|
+
dimension: "information",
|
|
14185
|
+
factor: 1e6,
|
|
14186
|
+
offset: 0
|
|
14187
|
+
},
|
|
14188
|
+
GB: {
|
|
14189
|
+
dimension: "information",
|
|
14190
|
+
factor: 1e9,
|
|
14191
|
+
offset: 0
|
|
14192
|
+
},
|
|
14193
|
+
"°": {
|
|
14194
|
+
dimension: "angle",
|
|
14195
|
+
factor: 1,
|
|
14196
|
+
offset: 0
|
|
14197
|
+
},
|
|
14198
|
+
dBFS: {
|
|
14199
|
+
dimension: "sound-level",
|
|
14200
|
+
factor: 1,
|
|
14201
|
+
offset: 0
|
|
14202
|
+
},
|
|
14203
|
+
dBm: {
|
|
14204
|
+
dimension: "signal-level",
|
|
14205
|
+
factor: 1,
|
|
14206
|
+
offset: 0
|
|
14207
|
+
},
|
|
14208
|
+
mired: {
|
|
14209
|
+
dimension: "colour-temperature",
|
|
14210
|
+
factor: 1,
|
|
14211
|
+
offset: 0
|
|
14212
|
+
},
|
|
14213
|
+
kbps: {
|
|
14214
|
+
dimension: "bitrate",
|
|
14215
|
+
factor: 1,
|
|
14216
|
+
offset: 0
|
|
14217
|
+
},
|
|
14218
|
+
Mbps: {
|
|
14219
|
+
dimension: "bitrate",
|
|
14220
|
+
factor: 1e3,
|
|
14221
|
+
offset: 0
|
|
14222
|
+
},
|
|
14223
|
+
fps: {
|
|
14224
|
+
dimension: "rate",
|
|
14225
|
+
factor: 1,
|
|
14226
|
+
offset: 0
|
|
14227
|
+
}
|
|
14228
|
+
};
|
|
14229
|
+
/** Resolve a unit's `UnitSpec`, or `undefined` when the spelling is unknown. */
|
|
14230
|
+
function specFor(unit) {
|
|
14231
|
+
return Object.hasOwn(UNIT_TABLE, unit) ? UNIT_TABLE[unit] : void 0;
|
|
14232
|
+
}
|
|
14233
|
+
/** Value in `spec`'s unit → its dimension's canonical unit. */
|
|
14234
|
+
function toCanonical(value, spec) {
|
|
14235
|
+
return value * spec.factor + spec.offset;
|
|
14236
|
+
}
|
|
14237
|
+
/** Canonical-unit value → the unit described by `spec`. */
|
|
14238
|
+
function fromCanonical(canonical, spec) {
|
|
14239
|
+
return (canonical - spec.offset) / spec.factor;
|
|
14240
|
+
}
|
|
14241
|
+
/**
|
|
14242
|
+
* Graceful variant for the render path: returns the converted value, or
|
|
14243
|
+
* `undefined` when the conversion is refused (unknown unit / cross-dimension).
|
|
14244
|
+
* Never throws — a render caller falls back to the raw value + source unit.
|
|
14245
|
+
*/
|
|
14246
|
+
function tryConvertUnit(value, from, to) {
|
|
14247
|
+
if (from === to) return value;
|
|
14248
|
+
const fromSpec = specFor(from);
|
|
14249
|
+
if (!fromSpec) return void 0;
|
|
14250
|
+
const toSpec = specFor(to);
|
|
14251
|
+
if (!toSpec) return void 0;
|
|
14252
|
+
if (fromSpec.dimension !== toSpec.dimension) return void 0;
|
|
14253
|
+
return fromCanonical(toCanonical(value, fromSpec), toSpec);
|
|
14254
|
+
}
|
|
14255
|
+
//#endregion
|
|
13997
14256
|
//#region ../types/dist/index.mjs
|
|
13998
14257
|
/**
|
|
13999
14258
|
* The `smtp-inbound` broker kind (D999): a mailbox a device can send mail to.
|
|
@@ -42976,6 +43235,7 @@ var ExpressionBindingSourceSchema = union([
|
|
|
42976
43235
|
object({
|
|
42977
43236
|
kind: literal("global"),
|
|
42978
43237
|
sourceStableId: string(),
|
|
43238
|
+
addonId: string().optional(),
|
|
42979
43239
|
cap: string(),
|
|
42980
43240
|
fieldPath: string()
|
|
42981
43241
|
})
|
|
@@ -43042,385 +43302,6 @@ var SourceInfoSchema = object({
|
|
|
43042
43302
|
raw: record(string(), unknown()).optional()
|
|
43043
43303
|
});
|
|
43044
43304
|
/**
|
|
43045
|
-
* Frozen unit → spec table. `•` in the doc marks each dimension's canonical
|
|
43046
|
-
* unit (`factor: 1, offset: 0`). °F derives from `°C = (°F − 32) × 5/9` ⇒
|
|
43047
|
-
* `factor = 5/9`, `offset = -160/9` (kept as exact expressions, not rounded
|
|
43048
|
-
* decimals). K derives from `°C = K − 273.15`.
|
|
43049
|
-
*/
|
|
43050
|
-
var UNIT_TABLE = {
|
|
43051
|
-
"°C": {
|
|
43052
|
-
dimension: "temperature",
|
|
43053
|
-
factor: 1,
|
|
43054
|
-
offset: 0
|
|
43055
|
-
},
|
|
43056
|
-
"°F": {
|
|
43057
|
-
dimension: "temperature",
|
|
43058
|
-
factor: 5 / 9,
|
|
43059
|
-
offset: -160 / 9
|
|
43060
|
-
},
|
|
43061
|
-
K: {
|
|
43062
|
-
dimension: "temperature",
|
|
43063
|
-
factor: 1,
|
|
43064
|
-
offset: -273.15
|
|
43065
|
-
},
|
|
43066
|
-
hPa: {
|
|
43067
|
-
dimension: "pressure",
|
|
43068
|
-
factor: 1,
|
|
43069
|
-
offset: 0
|
|
43070
|
-
},
|
|
43071
|
-
kPa: {
|
|
43072
|
-
dimension: "pressure",
|
|
43073
|
-
factor: 10,
|
|
43074
|
-
offset: 0
|
|
43075
|
-
},
|
|
43076
|
-
Pa: {
|
|
43077
|
-
dimension: "pressure",
|
|
43078
|
-
factor: .01,
|
|
43079
|
-
offset: 0
|
|
43080
|
-
},
|
|
43081
|
-
mbar: {
|
|
43082
|
-
dimension: "pressure",
|
|
43083
|
-
factor: 1,
|
|
43084
|
-
offset: 0
|
|
43085
|
-
},
|
|
43086
|
-
bar: {
|
|
43087
|
-
dimension: "pressure",
|
|
43088
|
-
factor: 1e3,
|
|
43089
|
-
offset: 0
|
|
43090
|
-
},
|
|
43091
|
-
inHg: {
|
|
43092
|
-
dimension: "pressure",
|
|
43093
|
-
factor: 33.8639,
|
|
43094
|
-
offset: 0
|
|
43095
|
-
},
|
|
43096
|
-
mmHg: {
|
|
43097
|
-
dimension: "pressure",
|
|
43098
|
-
factor: 1.33322,
|
|
43099
|
-
offset: 0
|
|
43100
|
-
},
|
|
43101
|
-
psi: {
|
|
43102
|
-
dimension: "pressure",
|
|
43103
|
-
factor: 68.9476,
|
|
43104
|
-
offset: 0
|
|
43105
|
-
},
|
|
43106
|
-
"m/s": {
|
|
43107
|
-
dimension: "speed",
|
|
43108
|
-
factor: 1,
|
|
43109
|
-
offset: 0
|
|
43110
|
-
},
|
|
43111
|
-
"km/h": {
|
|
43112
|
-
dimension: "speed",
|
|
43113
|
-
factor: 1 / 3.6,
|
|
43114
|
-
offset: 0
|
|
43115
|
-
},
|
|
43116
|
-
mph: {
|
|
43117
|
-
dimension: "speed",
|
|
43118
|
-
factor: .44704,
|
|
43119
|
-
offset: 0
|
|
43120
|
-
},
|
|
43121
|
-
kn: {
|
|
43122
|
-
dimension: "speed",
|
|
43123
|
-
factor: .514444,
|
|
43124
|
-
offset: 0
|
|
43125
|
-
},
|
|
43126
|
-
"mm/h": {
|
|
43127
|
-
dimension: "precipitation-rate",
|
|
43128
|
-
factor: 1,
|
|
43129
|
-
offset: 0
|
|
43130
|
-
},
|
|
43131
|
-
"in/h": {
|
|
43132
|
-
dimension: "precipitation-rate",
|
|
43133
|
-
factor: 25.4,
|
|
43134
|
-
offset: 0
|
|
43135
|
-
},
|
|
43136
|
-
m: {
|
|
43137
|
-
dimension: "length",
|
|
43138
|
-
factor: 1,
|
|
43139
|
-
offset: 0
|
|
43140
|
-
},
|
|
43141
|
-
mm: {
|
|
43142
|
-
dimension: "length",
|
|
43143
|
-
factor: .001,
|
|
43144
|
-
offset: 0
|
|
43145
|
-
},
|
|
43146
|
-
cm: {
|
|
43147
|
-
dimension: "length",
|
|
43148
|
-
factor: .01,
|
|
43149
|
-
offset: 0
|
|
43150
|
-
},
|
|
43151
|
-
km: {
|
|
43152
|
-
dimension: "length",
|
|
43153
|
-
factor: 1e3,
|
|
43154
|
-
offset: 0
|
|
43155
|
-
},
|
|
43156
|
-
in: {
|
|
43157
|
-
dimension: "length",
|
|
43158
|
-
factor: .0254,
|
|
43159
|
-
offset: 0
|
|
43160
|
-
},
|
|
43161
|
-
ft: {
|
|
43162
|
-
dimension: "length",
|
|
43163
|
-
factor: .3048,
|
|
43164
|
-
offset: 0
|
|
43165
|
-
},
|
|
43166
|
-
mi: {
|
|
43167
|
-
dimension: "length",
|
|
43168
|
-
factor: 1609.344,
|
|
43169
|
-
offset: 0
|
|
43170
|
-
},
|
|
43171
|
-
"m²": {
|
|
43172
|
-
dimension: "area",
|
|
43173
|
-
factor: 1,
|
|
43174
|
-
offset: 0
|
|
43175
|
-
},
|
|
43176
|
-
lx: {
|
|
43177
|
-
dimension: "illuminance",
|
|
43178
|
-
factor: 1,
|
|
43179
|
-
offset: 0
|
|
43180
|
-
},
|
|
43181
|
-
"W/m²": {
|
|
43182
|
-
dimension: "irradiance",
|
|
43183
|
-
factor: 1,
|
|
43184
|
-
offset: 0
|
|
43185
|
-
},
|
|
43186
|
-
W: {
|
|
43187
|
-
dimension: "power",
|
|
43188
|
-
factor: 1,
|
|
43189
|
-
offset: 0
|
|
43190
|
-
},
|
|
43191
|
-
kW: {
|
|
43192
|
-
dimension: "power",
|
|
43193
|
-
factor: 1e3,
|
|
43194
|
-
offset: 0
|
|
43195
|
-
},
|
|
43196
|
-
VA: {
|
|
43197
|
-
dimension: "apparent-power",
|
|
43198
|
-
factor: 1,
|
|
43199
|
-
offset: 0
|
|
43200
|
-
},
|
|
43201
|
-
Wh: {
|
|
43202
|
-
dimension: "energy",
|
|
43203
|
-
factor: 1,
|
|
43204
|
-
offset: 0
|
|
43205
|
-
},
|
|
43206
|
-
kWh: {
|
|
43207
|
-
dimension: "energy",
|
|
43208
|
-
factor: 1e3,
|
|
43209
|
-
offset: 0
|
|
43210
|
-
},
|
|
43211
|
-
MWh: {
|
|
43212
|
-
dimension: "energy",
|
|
43213
|
-
factor: 1e6,
|
|
43214
|
-
offset: 0
|
|
43215
|
-
},
|
|
43216
|
-
V: {
|
|
43217
|
-
dimension: "voltage",
|
|
43218
|
-
factor: 1,
|
|
43219
|
-
offset: 0
|
|
43220
|
-
},
|
|
43221
|
-
mV: {
|
|
43222
|
-
dimension: "voltage",
|
|
43223
|
-
factor: .001,
|
|
43224
|
-
offset: 0
|
|
43225
|
-
},
|
|
43226
|
-
A: {
|
|
43227
|
-
dimension: "current",
|
|
43228
|
-
factor: 1,
|
|
43229
|
-
offset: 0
|
|
43230
|
-
},
|
|
43231
|
-
mA: {
|
|
43232
|
-
dimension: "current",
|
|
43233
|
-
factor: .001,
|
|
43234
|
-
offset: 0
|
|
43235
|
-
},
|
|
43236
|
-
ppm: {
|
|
43237
|
-
dimension: "concentration-volume",
|
|
43238
|
-
factor: 1,
|
|
43239
|
-
offset: 0
|
|
43240
|
-
},
|
|
43241
|
-
ppb: {
|
|
43242
|
-
dimension: "concentration-volume",
|
|
43243
|
-
factor: .001,
|
|
43244
|
-
offset: 0
|
|
43245
|
-
},
|
|
43246
|
-
"µg/m³": {
|
|
43247
|
-
dimension: "concentration-mass",
|
|
43248
|
-
factor: 1,
|
|
43249
|
-
offset: 0
|
|
43250
|
-
},
|
|
43251
|
-
"mg/m³": {
|
|
43252
|
-
dimension: "concentration-mass",
|
|
43253
|
-
factor: 1e3,
|
|
43254
|
-
offset: 0
|
|
43255
|
-
},
|
|
43256
|
-
kg: {
|
|
43257
|
-
dimension: "mass",
|
|
43258
|
-
factor: 1,
|
|
43259
|
-
offset: 0
|
|
43260
|
-
},
|
|
43261
|
-
g: {
|
|
43262
|
-
dimension: "mass",
|
|
43263
|
-
factor: .001,
|
|
43264
|
-
offset: 0
|
|
43265
|
-
},
|
|
43266
|
-
lb: {
|
|
43267
|
-
dimension: "mass",
|
|
43268
|
-
factor: .453592,
|
|
43269
|
-
offset: 0
|
|
43270
|
-
},
|
|
43271
|
-
oz: {
|
|
43272
|
-
dimension: "mass",
|
|
43273
|
-
factor: .0283495,
|
|
43274
|
-
offset: 0
|
|
43275
|
-
},
|
|
43276
|
-
"%": {
|
|
43277
|
-
dimension: "percentage",
|
|
43278
|
-
factor: 1,
|
|
43279
|
-
offset: 0
|
|
43280
|
-
},
|
|
43281
|
-
L: {
|
|
43282
|
-
dimension: "volume",
|
|
43283
|
-
factor: 1,
|
|
43284
|
-
offset: 0
|
|
43285
|
-
},
|
|
43286
|
-
mL: {
|
|
43287
|
-
dimension: "volume",
|
|
43288
|
-
factor: .001,
|
|
43289
|
-
offset: 0
|
|
43290
|
-
},
|
|
43291
|
-
gal: {
|
|
43292
|
-
dimension: "volume",
|
|
43293
|
-
factor: 3.785411784,
|
|
43294
|
-
offset: 0
|
|
43295
|
-
},
|
|
43296
|
-
s: {
|
|
43297
|
-
dimension: "duration",
|
|
43298
|
-
factor: 1,
|
|
43299
|
-
offset: 0
|
|
43300
|
-
},
|
|
43301
|
-
ms: {
|
|
43302
|
-
dimension: "duration",
|
|
43303
|
-
factor: .001,
|
|
43304
|
-
offset: 0
|
|
43305
|
-
},
|
|
43306
|
-
min: {
|
|
43307
|
-
dimension: "duration",
|
|
43308
|
-
factor: 60,
|
|
43309
|
-
offset: 0
|
|
43310
|
-
},
|
|
43311
|
-
h: {
|
|
43312
|
-
dimension: "duration",
|
|
43313
|
-
factor: 3600,
|
|
43314
|
-
offset: 0
|
|
43315
|
-
},
|
|
43316
|
-
d: {
|
|
43317
|
-
dimension: "duration",
|
|
43318
|
-
factor: 86400,
|
|
43319
|
-
offset: 0
|
|
43320
|
-
},
|
|
43321
|
-
B: {
|
|
43322
|
-
dimension: "information",
|
|
43323
|
-
factor: 1,
|
|
43324
|
-
offset: 0
|
|
43325
|
-
},
|
|
43326
|
-
KiB: {
|
|
43327
|
-
dimension: "information",
|
|
43328
|
-
factor: 1024,
|
|
43329
|
-
offset: 0
|
|
43330
|
-
},
|
|
43331
|
-
MiB: {
|
|
43332
|
-
dimension: "information",
|
|
43333
|
-
factor: 1024 ** 2,
|
|
43334
|
-
offset: 0
|
|
43335
|
-
},
|
|
43336
|
-
GiB: {
|
|
43337
|
-
dimension: "information",
|
|
43338
|
-
factor: 1024 ** 3,
|
|
43339
|
-
offset: 0
|
|
43340
|
-
},
|
|
43341
|
-
TiB: {
|
|
43342
|
-
dimension: "information",
|
|
43343
|
-
factor: 1024 ** 4,
|
|
43344
|
-
offset: 0
|
|
43345
|
-
},
|
|
43346
|
-
kB: {
|
|
43347
|
-
dimension: "information",
|
|
43348
|
-
factor: 1e3,
|
|
43349
|
-
offset: 0
|
|
43350
|
-
},
|
|
43351
|
-
MB: {
|
|
43352
|
-
dimension: "information",
|
|
43353
|
-
factor: 1e6,
|
|
43354
|
-
offset: 0
|
|
43355
|
-
},
|
|
43356
|
-
GB: {
|
|
43357
|
-
dimension: "information",
|
|
43358
|
-
factor: 1e9,
|
|
43359
|
-
offset: 0
|
|
43360
|
-
},
|
|
43361
|
-
"°": {
|
|
43362
|
-
dimension: "angle",
|
|
43363
|
-
factor: 1,
|
|
43364
|
-
offset: 0
|
|
43365
|
-
},
|
|
43366
|
-
dBFS: {
|
|
43367
|
-
dimension: "sound-level",
|
|
43368
|
-
factor: 1,
|
|
43369
|
-
offset: 0
|
|
43370
|
-
},
|
|
43371
|
-
dBm: {
|
|
43372
|
-
dimension: "signal-level",
|
|
43373
|
-
factor: 1,
|
|
43374
|
-
offset: 0
|
|
43375
|
-
},
|
|
43376
|
-
mired: {
|
|
43377
|
-
dimension: "colour-temperature",
|
|
43378
|
-
factor: 1,
|
|
43379
|
-
offset: 0
|
|
43380
|
-
},
|
|
43381
|
-
kbps: {
|
|
43382
|
-
dimension: "bitrate",
|
|
43383
|
-
factor: 1,
|
|
43384
|
-
offset: 0
|
|
43385
|
-
},
|
|
43386
|
-
Mbps: {
|
|
43387
|
-
dimension: "bitrate",
|
|
43388
|
-
factor: 1e3,
|
|
43389
|
-
offset: 0
|
|
43390
|
-
},
|
|
43391
|
-
fps: {
|
|
43392
|
-
dimension: "rate",
|
|
43393
|
-
factor: 1,
|
|
43394
|
-
offset: 0
|
|
43395
|
-
}
|
|
43396
|
-
};
|
|
43397
|
-
/** Resolve a unit's `UnitSpec`, or `undefined` when the spelling is unknown. */
|
|
43398
|
-
function specFor(unit) {
|
|
43399
|
-
return Object.hasOwn(UNIT_TABLE, unit) ? UNIT_TABLE[unit] : void 0;
|
|
43400
|
-
}
|
|
43401
|
-
/** Value in `spec`'s unit → its dimension's canonical unit. */
|
|
43402
|
-
function toCanonical(value, spec) {
|
|
43403
|
-
return value * spec.factor + spec.offset;
|
|
43404
|
-
}
|
|
43405
|
-
/** Canonical-unit value → the unit described by `spec`. */
|
|
43406
|
-
function fromCanonical(canonical, spec) {
|
|
43407
|
-
return (canonical - spec.offset) / spec.factor;
|
|
43408
|
-
}
|
|
43409
|
-
/**
|
|
43410
|
-
* Graceful variant for the render path: returns the converted value, or
|
|
43411
|
-
* `undefined` when the conversion is refused (unknown unit / cross-dimension).
|
|
43412
|
-
* Never throws — a render caller falls back to the raw value + source unit.
|
|
43413
|
-
*/
|
|
43414
|
-
function tryConvertUnit(value, from, to) {
|
|
43415
|
-
if (from === to) return value;
|
|
43416
|
-
const fromSpec = specFor(from);
|
|
43417
|
-
if (!fromSpec) return void 0;
|
|
43418
|
-
const toSpec = specFor(to);
|
|
43419
|
-
if (!toSpec) return void 0;
|
|
43420
|
-
if (fromSpec.dimension !== toSpec.dimension) return void 0;
|
|
43421
|
-
return fromCanonical(toCanonical(value, fromSpec), toSpec);
|
|
43422
|
-
}
|
|
43423
|
-
/**
|
|
43424
43305
|
* A number a person types for a physical quantity — the input side of the
|
|
43425
43306
|
* value + unit contract (D972).
|
|
43426
43307
|
*
|
|
@@ -45099,26 +44980,23 @@ var SettingsSchemaWithValuesSchema = object({
|
|
|
45099
44980
|
var SettingsPatchSchema = record(string(), unknown());
|
|
45100
44981
|
/** The scope of a scoped-settings call (D986): where the capability declared the values. */
|
|
45101
44982
|
var ScopedSettingsScopeSchema = _enum(SCOPED_SETTINGS_SCOPES);
|
|
44983
|
+
/** One scoped schema an addon serves: its capability, scope and section ids. */
|
|
44984
|
+
var ScopedSettingsDeclarationSchema = object({
|
|
44985
|
+
cap: string(),
|
|
44986
|
+
scope: ScopedSettingsScopeSchema,
|
|
44987
|
+
sectionIds: array(string())
|
|
44988
|
+
});
|
|
45102
44989
|
/** Standard success response for update operations. */
|
|
45103
44990
|
var SettingsUpdateResultSchema = object({ success: literal(true) });
|
|
45104
44991
|
method(object({
|
|
45105
|
-
addonId: string(),
|
|
45106
|
-
nodeId: string().optional(),
|
|
45107
|
-
overlay: record(string(), unknown()).optional(),
|
|
45108
|
-
cap: string().optional()
|
|
45109
|
-
}), SettingsSchemaWithValuesSchema.nullable()), method(object({
|
|
45110
|
-
addonId: string(),
|
|
45111
|
-
nodeId: string().optional(),
|
|
45112
|
-
patch: SettingsPatchSchema
|
|
45113
|
-
}), SettingsUpdateResultSchema, {
|
|
45114
|
-
kind: "mutation",
|
|
45115
|
-
auth: "admin"
|
|
45116
|
-
}), method(object({
|
|
45117
44992
|
addonId: string(),
|
|
45118
44993
|
cap: string(),
|
|
45119
44994
|
scope: ScopedSettingsScopeSchema,
|
|
45120
44995
|
nodeId: string().optional()
|
|
45121
44996
|
}), SettingsSchemaWithValuesSchema.nullable()), method(object({
|
|
44997
|
+
addonId: string(),
|
|
44998
|
+
nodeId: string().optional()
|
|
44999
|
+
}), array(ScopedSettingsDeclarationSchema).nullable()), method(object({
|
|
45122
45000
|
addonId: string(),
|
|
45123
45001
|
cap: string(),
|
|
45124
45002
|
scope: ScopedSettingsScopeSchema,
|
|
@@ -45133,9 +45011,6 @@ method(object({
|
|
|
45133
45011
|
scope: ScopedSettingsScopeSchema,
|
|
45134
45012
|
nodeId: string().optional()
|
|
45135
45013
|
}), record(string(), unknown()).nullable()), method(object({
|
|
45136
|
-
addonId: string(),
|
|
45137
|
-
nodeId: string().optional()
|
|
45138
|
-
}), SettingsSchemaWithValuesSchema.nullable()), method(object({
|
|
45139
45014
|
addonId: string(),
|
|
45140
45015
|
nodeId: string().optional(),
|
|
45141
45016
|
instance: IntegrationInstanceRefSchema
|
|
@@ -46475,7 +46350,7 @@ var BackupDestinationInfoSchema = object({
|
|
|
46475
46350
|
id: string(),
|
|
46476
46351
|
/**
|
|
46477
46352
|
* Manifest id of the owning addon. The Settings button on the
|
|
46478
|
-
* destination card opens that addon's
|
|
46353
|
+
* destination card opens that addon's scoped settings panel.
|
|
46479
46354
|
*/
|
|
46480
46355
|
addonId: string(),
|
|
46481
46356
|
/** Operator-toggled enable flag from the destination-policy table. */
|
|
@@ -50945,6 +50820,7 @@ method(InstancePinSchema, DeviceExportStatusSchema), method(_void(), array(Expor
|
|
|
50945
50820
|
kind: "mutation",
|
|
50946
50821
|
auth: "admin"
|
|
50947
50822
|
});
|
|
50823
|
+
var DeviceAliasSchema = string().max(64).regex(/^[a-z][a-z0-9_]*$/);
|
|
50948
50824
|
/**
|
|
50949
50825
|
* A SITE ZONE — a named part of the property that several locations belong to.
|
|
50950
50826
|
*
|
|
@@ -51338,6 +51214,12 @@ var DeviceInfoSchema = object({
|
|
|
51338
51214
|
addonId: string(),
|
|
51339
51215
|
type: _enum(DeviceType),
|
|
51340
51216
|
name: string(),
|
|
51217
|
+
/** The name a value template uses for this device (`{{ stufa_veranda.temperature }}`),
|
|
51218
|
+
* entity_id style. Generated once from the name at first registration, unique
|
|
51219
|
+
* cluster-wide, editable through `setAlias`, NOT changed by a rename (D1021).
|
|
51220
|
+
* Optional: a record produced by an older build omits it until the boot
|
|
51221
|
+
* backfill has run. */
|
|
51222
|
+
alias: DeviceAliasSchema.optional(),
|
|
51341
51223
|
/** Operator-organisational location label. `null` when unset. */
|
|
51342
51224
|
location: string().nullable(),
|
|
51343
51225
|
/** Soft-disabled flag. */
|
|
@@ -51657,6 +51539,25 @@ method(object({
|
|
|
51657
51539
|
}), _void(), {
|
|
51658
51540
|
kind: "mutation",
|
|
51659
51541
|
auth: "admin"
|
|
51542
|
+
}), method(object({
|
|
51543
|
+
deviceId: number(),
|
|
51544
|
+
alias: string()
|
|
51545
|
+
}), discriminatedUnion("ok", [object({
|
|
51546
|
+
ok: literal(true),
|
|
51547
|
+
alias: DeviceAliasSchema
|
|
51548
|
+
}), object({
|
|
51549
|
+
ok: literal(false),
|
|
51550
|
+
reason: _enum([
|
|
51551
|
+
"empty",
|
|
51552
|
+
"too-long",
|
|
51553
|
+
"grammar",
|
|
51554
|
+
"reserved",
|
|
51555
|
+
"taken"
|
|
51556
|
+
]),
|
|
51557
|
+
takenBy: number().optional()
|
|
51558
|
+
})]), {
|
|
51559
|
+
kind: "mutation",
|
|
51560
|
+
auth: "admin"
|
|
51660
51561
|
}), method(object({
|
|
51661
51562
|
deviceId: number(),
|
|
51662
51563
|
location: string().nullable()
|
|
@@ -64388,6 +64289,11 @@ var NcScheduleSchema = object({
|
|
|
64388
64289
|
* as a STATE SUMMARY at the end of each window of `schedule`.
|
|
64389
64290
|
*/
|
|
64390
64291
|
var NcSystemEventDeliveryModeSchema = _enum(["instant", "summary"]);
|
|
64292
|
+
_enum([
|
|
64293
|
+
"activation",
|
|
64294
|
+
"deactivation",
|
|
64295
|
+
"schedule"
|
|
64296
|
+
]);
|
|
64391
64297
|
/**
|
|
64392
64298
|
* How a summary window is SENT (D698): `rule` (absent) = ONE notification with
|
|
64393
64299
|
* every section; `section` = one notification per section with something to
|
|
@@ -64404,11 +64310,26 @@ var NcStateSummarySplitSchema = _enum(["rule", "section"]);
|
|
|
64404
64310
|
* midnight crossing); the send time is each window's END. Refused on the
|
|
64405
64311
|
* `alarm` family, which stays instant (`systemEventDeliveryProblems`).
|
|
64406
64312
|
*/
|
|
64407
|
-
var NcSystemEventDeliverySchema = discriminatedUnion("mode", [
|
|
64408
|
-
mode: literal("
|
|
64409
|
-
|
|
64410
|
-
|
|
64411
|
-
|
|
64313
|
+
var NcSystemEventDeliverySchema = discriminatedUnion("mode", [
|
|
64314
|
+
object({ mode: literal("instant") }),
|
|
64315
|
+
object({
|
|
64316
|
+
mode: literal("summary"),
|
|
64317
|
+
schedule: NcScheduleSchema,
|
|
64318
|
+
split: NcStateSummarySplitSchema.optional()
|
|
64319
|
+
}),
|
|
64320
|
+
object({
|
|
64321
|
+
mode: literal("modes"),
|
|
64322
|
+
/** The bad edge, and every kind that has a single edge. */
|
|
64323
|
+
onActivation: boolean(),
|
|
64324
|
+
/** The recovery edges of the classes of the selected kinds (derived, never stored per kind). */
|
|
64325
|
+
onDeactivation: boolean(),
|
|
64326
|
+
/** A state summary at the end of each window; absent = no summary. */
|
|
64327
|
+
onSchedule: object({
|
|
64328
|
+
schedule: NcScheduleSchema,
|
|
64329
|
+
grouping: NcStateSummarySplitSchema
|
|
64330
|
+
}).optional()
|
|
64331
|
+
})
|
|
64332
|
+
]);
|
|
64412
64333
|
/** Fuzzy plate matcher — OCR noise makes exact match useless (spec row 12/13). */
|
|
64413
64334
|
var NcPlateMatcherSchema = object({
|
|
64414
64335
|
/**
|
|
@@ -74269,6 +74190,11 @@ var TimedRunUnitSchema = _enum(["s", "min"]);
|
|
|
74269
74190
|
_enum(["switch", "pet-fountain"]);
|
|
74270
74191
|
DeviceType.Heater, DeviceType.PetFountain;
|
|
74271
74192
|
DeviceType.Heater, DeviceType.PetFountain;
|
|
74193
|
+
/** One duration, as the one-tap run asks for it. */
|
|
74194
|
+
var TimedRunQuickRunSchema = object({
|
|
74195
|
+
duration: number().positive().finite(),
|
|
74196
|
+
unit: TimedRunUnitSchema
|
|
74197
|
+
});
|
|
74272
74198
|
/** Why a request was not carried out. Typed, so a caller can say it in words. */
|
|
74273
74199
|
var TimedRunRefusalSchema = _enum([
|
|
74274
74200
|
"unsupported-device",
|
|
@@ -74289,9 +74215,30 @@ object({
|
|
|
74289
74215
|
activeUntil: number().nullable(),
|
|
74290
74216
|
/** Who asked for the run (a user id or an addon id); `null` when nothing is armed or it did not say. */
|
|
74291
74217
|
requestedBy: string().nullable(),
|
|
74218
|
+
/**
|
|
74219
|
+
* The one-tap run of THIS device: what a "Run" button on any surface starts. `null` when
|
|
74220
|
+
* the device is gone or its type has no timed run; a status from before this field
|
|
74221
|
+
* existed has none, and a surface falls back to the type's default.
|
|
74222
|
+
*/
|
|
74223
|
+
quickRun: TimedRunQuickRunSchema.nullable(),
|
|
74292
74224
|
lastFetchedAt: number()
|
|
74293
74225
|
});
|
|
74294
|
-
|
|
74226
|
+
/** What the settings form needs: the unit, the bounds and the type's default. */
|
|
74227
|
+
var TimedRunOptionsSchema = object({
|
|
74228
|
+
unit: TimedRunUnitSchema,
|
|
74229
|
+
/** The longest run, in `unit`. */
|
|
74230
|
+
maxDuration: number(),
|
|
74231
|
+
defaultDuration: number()
|
|
74232
|
+
});
|
|
74233
|
+
/** The one-tap run duration, in the type's unit; `null` returns to the type's default. */
|
|
74234
|
+
var TimedRunSettingsPatchSchema = object({ quickRunDuration: number().positive().finite().nullable().optional() });
|
|
74235
|
+
method(object({ deviceId: number().int() }), TimedRunOptionsSchema), method(object({
|
|
74236
|
+
deviceId: number().int(),
|
|
74237
|
+
settings: TimedRunSettingsPatchSchema
|
|
74238
|
+
}), _void(), {
|
|
74239
|
+
kind: "mutation",
|
|
74240
|
+
auth: "admin"
|
|
74241
|
+
}), method(object({
|
|
74295
74242
|
deviceId: number().int(),
|
|
74296
74243
|
duration: number().positive().finite(),
|
|
74297
74244
|
unit: TimedRunUnitSchema
|
|
@@ -76997,13 +76944,6 @@ Object.freeze({
|
|
|
76997
76944
|
access: "view",
|
|
76998
76945
|
role: "admin"
|
|
76999
76946
|
},
|
|
77000
|
-
"addonSettings.getGlobalSettings": {
|
|
77001
|
-
capName: "addon-settings",
|
|
77002
|
-
capScope: "system",
|
|
77003
|
-
addonId: null,
|
|
77004
|
-
access: "view",
|
|
77005
|
-
role: "admin"
|
|
77006
|
-
},
|
|
77007
76947
|
"addonSettings.getIntegrationFormSchema": {
|
|
77008
76948
|
capName: "addon-settings",
|
|
77009
76949
|
capScope: "system",
|
|
@@ -77011,14 +76951,14 @@ Object.freeze({
|
|
|
77011
76951
|
access: "view",
|
|
77012
76952
|
role: "admin"
|
|
77013
76953
|
},
|
|
77014
|
-
"addonSettings.
|
|
76954
|
+
"addonSettings.getScopedSettings": {
|
|
77015
76955
|
capName: "addon-settings",
|
|
77016
76956
|
capScope: "system",
|
|
77017
76957
|
addonId: null,
|
|
77018
76958
|
access: "view",
|
|
77019
76959
|
role: "admin"
|
|
77020
76960
|
},
|
|
77021
|
-
"addonSettings.
|
|
76961
|
+
"addonSettings.listScopedSettings": {
|
|
77022
76962
|
capName: "addon-settings",
|
|
77023
76963
|
capScope: "system",
|
|
77024
76964
|
addonId: null,
|
|
@@ -77046,13 +76986,6 @@ Object.freeze({
|
|
|
77046
76986
|
access: "create",
|
|
77047
76987
|
role: "admin"
|
|
77048
76988
|
},
|
|
77049
|
-
"addonSettings.updateGlobalSettings": {
|
|
77050
|
-
capName: "addon-settings",
|
|
77051
|
-
capScope: "system",
|
|
77052
|
-
addonId: null,
|
|
77053
|
-
access: "create",
|
|
77054
|
-
role: "admin"
|
|
77055
|
-
},
|
|
77056
76989
|
"addonSettings.updateScopedSettings": {
|
|
77057
76990
|
capName: "addon-settings",
|
|
77058
76991
|
capScope: "system",
|
|
@@ -79223,6 +79156,13 @@ Object.freeze({
|
|
|
79223
79156
|
access: "create",
|
|
79224
79157
|
role: "admin"
|
|
79225
79158
|
},
|
|
79159
|
+
"deviceManager.setAlias": {
|
|
79160
|
+
capName: "device-manager",
|
|
79161
|
+
capScope: "system",
|
|
79162
|
+
addonId: null,
|
|
79163
|
+
access: "create",
|
|
79164
|
+
role: "admin"
|
|
79165
|
+
},
|
|
79226
79166
|
"deviceManager.setChildLayout": {
|
|
79227
79167
|
capName: "device-manager",
|
|
79228
79168
|
capScope: "system",
|
|
@@ -86006,6 +85946,13 @@ Object.freeze({
|
|
|
86006
85946
|
access: "create",
|
|
86007
85947
|
role: "viewer"
|
|
86008
85948
|
},
|
|
85949
|
+
"timedRun.getOptions": {
|
|
85950
|
+
capName: "timed-run",
|
|
85951
|
+
capScope: "device",
|
|
85952
|
+
addonId: null,
|
|
85953
|
+
access: "view",
|
|
85954
|
+
role: "viewer"
|
|
85955
|
+
},
|
|
86009
85956
|
"timedRun.getStatus": {
|
|
86010
85957
|
capName: "timed-run",
|
|
86011
85958
|
capScope: "device",
|
|
@@ -86020,6 +85967,13 @@ Object.freeze({
|
|
|
86020
85967
|
access: "create",
|
|
86021
85968
|
role: "viewer"
|
|
86022
85969
|
},
|
|
85970
|
+
"timedRun.setSettings": {
|
|
85971
|
+
capName: "timed-run",
|
|
85972
|
+
capScope: "device",
|
|
85973
|
+
addonId: null,
|
|
85974
|
+
access: "create",
|
|
85975
|
+
role: "admin"
|
|
85976
|
+
},
|
|
86023
85977
|
"toast.onToast": {
|
|
86024
85978
|
capName: "toast",
|
|
86025
85979
|
capScope: "system",
|
|
@@ -86950,6 +86904,7 @@ function offered(received) {
|
|
|
86950
86904
|
};
|
|
86951
86905
|
}
|
|
86952
86906
|
offered(HA_AS), withheld(HOMEKIT_REASON), withheld(ALEXA_REASON), withheld(GOOGLE_REASON), withheld(MATTER_REASON);
|
|
86907
|
+
string().min(1).max(4096);
|
|
86953
86908
|
Object.freeze({
|
|
86954
86909
|
"accessories.getStatus": [{
|
|
86955
86910
|
name: "deviceId",
|
|
@@ -87633,6 +87588,11 @@ Object.freeze({
|
|
|
87633
87588
|
form: "single",
|
|
87634
87589
|
optional: false
|
|
87635
87590
|
}],
|
|
87591
|
+
"deviceManager.setAlias": [{
|
|
87592
|
+
name: "deviceId",
|
|
87593
|
+
form: "single",
|
|
87594
|
+
optional: false
|
|
87595
|
+
}],
|
|
87636
87596
|
"deviceManager.setChildLayout": [{
|
|
87637
87597
|
name: "deviceId",
|
|
87638
87598
|
form: "single",
|
|
@@ -89697,6 +89657,11 @@ Object.freeze({
|
|
|
89697
89657
|
form: "single",
|
|
89698
89658
|
optional: false
|
|
89699
89659
|
}],
|
|
89660
|
+
"timedRun.getOptions": [{
|
|
89661
|
+
name: "deviceId",
|
|
89662
|
+
form: "single",
|
|
89663
|
+
optional: false
|
|
89664
|
+
}],
|
|
89700
89665
|
"timedRun.getStatus": [{
|
|
89701
89666
|
name: "deviceId",
|
|
89702
89667
|
form: "single",
|
|
@@ -89707,6 +89672,11 @@ Object.freeze({
|
|
|
89707
89672
|
form: "single",
|
|
89708
89673
|
optional: false
|
|
89709
89674
|
}],
|
|
89675
|
+
"timedRun.setSettings": [{
|
|
89676
|
+
name: "deviceId",
|
|
89677
|
+
form: "single",
|
|
89678
|
+
optional: false
|
|
89679
|
+
}],
|
|
89710
89680
|
"update.getStatus": [{
|
|
89711
89681
|
name: "deviceId",
|
|
89712
89682
|
form: "single",
|
|
@@ -90569,6 +90539,7 @@ var STATE_SUMMARY_VARS = [
|
|
|
90569
90539
|
[...RULE_TEXT],
|
|
90570
90540
|
[...RULE_TEXT],
|
|
90571
90541
|
[...RULE_TEXT],
|
|
90542
|
+
[...RULE_TEXT],
|
|
90572
90543
|
[...RULE_BODY_ONLY],
|
|
90573
90544
|
[...RULE_TEXT],
|
|
90574
90545
|
([...RULE_TEXT], [...DEVICE_EVENTS]),
|