@camstack/types 1.2.566 → 1.2.568
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 +19 -0
- package/dist/addon.js +14 -4
- package/dist/addon.mjs +14 -4
- package/dist/capabilities/climate-control.cap.d.ts +48 -0
- package/dist/capabilities/control-select-navigation.d.ts +59 -0
- package/dist/capabilities/control.cap.d.ts +32 -0
- package/dist/capabilities/core-blocks.cap.d.ts +11 -0
- package/dist/capabilities/index.d.ts +2 -1
- package/dist/capabilities/notification-rules.cap.d.ts +46 -0
- package/dist/capabilities/osd-manager.cap.d.ts +12 -0
- package/dist/client.js +55 -4
- package/dist/client.mjs +55 -4
- package/dist/enums/event-category.d.ts +12 -0
- package/dist/enums.js +1 -1
- package/dist/enums.mjs +1 -1
- package/dist/{event-category-Dv-Gcv1f.mjs → event-category-Dhcd0TRH.mjs} +12 -0
- package/dist/{event-category-Ps2LC8dN.js → event-category-d9kiqCqC.js} +12 -0
- package/dist/generated/addon-api.d.ts +28 -0
- package/dist/generated/addon-cap-facts.d.ts +1 -1
- package/dist/generated/cap-input-defaults.d.ts +1 -1
- package/dist/generated/collection-array-methods.d.ts +1 -1
- package/dist/generated/customize-catalog.d.ts +54 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +1 -1
- package/dist/index.js +369 -16
- package/dist/index.mjs +367 -17
- package/dist/{sleep-mEzgbYFJ.js → sleep-BTb3-IPb.js} +87 -1
- package/dist/{sleep-B5XPl2YP.mjs → sleep-DEd_klYQ.mjs} +87 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-
|
|
3
|
-
const require_event_category = require("./event-category-
|
|
2
|
+
const require_sleep = require("./sleep-BTb3-IPb.js");
|
|
3
|
+
const require_event_category = require("./event-category-d9kiqCqC.js");
|
|
4
4
|
const require_composed_stable_id = require("./composed-stable-id-BzXh1Swk.js");
|
|
5
5
|
const require_implemented_methods = require("./implemented-methods-D4F6RWkO.js");
|
|
6
6
|
const require_node_color = require("./node-color.js");
|
|
@@ -45819,9 +45819,26 @@ var HvacModeSchema = zod.z.enum([
|
|
|
45819
45819
|
"fan_only",
|
|
45820
45820
|
"dry"
|
|
45821
45821
|
]);
|
|
45822
|
+
/**
|
|
45823
|
+
* What the device is DOING right now, as opposed to the mode it is set to
|
|
45824
|
+
* (`mode: 'heat'` with the valve shut is `idle`). Optional and nullable: a
|
|
45825
|
+
* device that does not say leaves it absent or null, and a consumer reads that
|
|
45826
|
+
* as "unknown", never as `idle` (D393).
|
|
45827
|
+
*/
|
|
45828
|
+
var ClimateActionSchema = zod.z.enum([
|
|
45829
|
+
"heating",
|
|
45830
|
+
"cooling",
|
|
45831
|
+
"drying",
|
|
45832
|
+
"fan",
|
|
45833
|
+
"idle",
|
|
45834
|
+
"off"
|
|
45835
|
+
]);
|
|
45822
45836
|
var ClimateControlStatusSchema = zod.z.object({
|
|
45823
45837
|
/** Active HVAC mode. */
|
|
45824
45838
|
mode: HvacModeSchema,
|
|
45839
|
+
/** What the device is doing now (`heating` while the valve is open, `idle`
|
|
45840
|
+
* at setpoint). Absent or null = the device does not say; never a guess (D393). */
|
|
45841
|
+
action: ClimateActionSchema.nullable().optional(),
|
|
45825
45842
|
/** Available HVAC modes the device accepts. Subset of HvacMode. */
|
|
45826
45843
|
availableModes: zod.z.array(HvacModeSchema),
|
|
45827
45844
|
/** Active fan mode (`auto` / `low` / `medium` / `high` / `on` / `off`
|
|
@@ -45875,6 +45892,40 @@ var ClimateControlStatusSchema = zod.z.object({
|
|
|
45875
45892
|
/** Ms epoch when the slice was last updated (push or command). */
|
|
45876
45893
|
lastFetchedAt: zod.z.number()
|
|
45877
45894
|
});
|
|
45895
|
+
/**
|
|
45896
|
+
* Linked room sensor (Customize): the OPERATOR may replace the thermostat's own
|
|
45897
|
+
* `currentTemp` / `currentHumidity` with a sensor in the room. Never linked on
|
|
45898
|
+
* its own (D356). Once linked it ALWAYS replaces the native value, a null
|
|
45899
|
+
* native included — the operator chose the better reading.
|
|
45900
|
+
*/
|
|
45901
|
+
var CLIMATE_CUSTOMIZE_DEVICE_TYPES = [require_composed_stable_id.DeviceType.Climate];
|
|
45902
|
+
function roomSensorTarget(id, path) {
|
|
45903
|
+
return {
|
|
45904
|
+
id,
|
|
45905
|
+
cardinality: "scalar",
|
|
45906
|
+
vocabulary: {
|
|
45907
|
+
cap: "climate-control",
|
|
45908
|
+
stateField: path
|
|
45909
|
+
},
|
|
45910
|
+
deviceTypes: CLIMATE_CUSTOMIZE_DEVICE_TYPES,
|
|
45911
|
+
apply: "replace",
|
|
45912
|
+
path,
|
|
45913
|
+
sources: [{
|
|
45914
|
+
kind: "numeric",
|
|
45915
|
+
transforms: [{ kind: "identity" }]
|
|
45916
|
+
}],
|
|
45917
|
+
sourceReport: { status: "assignment-status" }
|
|
45918
|
+
};
|
|
45919
|
+
}
|
|
45920
|
+
var CLIMATE_CONTROL_TARGETS = [roomSensorTarget("room-temperature", "currentTemp"), roomSensorTarget("room-humidity", "currentHumidity")];
|
|
45921
|
+
var climateControlCustomize = {
|
|
45922
|
+
version: 1,
|
|
45923
|
+
overridable: CLIMATE_CONTROL_TARGETS.map((target) => ({
|
|
45924
|
+
path: target.path,
|
|
45925
|
+
by: target.id
|
|
45926
|
+
})),
|
|
45927
|
+
targets: CLIMATE_CONTROL_TARGETS
|
|
45928
|
+
};
|
|
45878
45929
|
var climateControlCapability = {
|
|
45879
45930
|
name: "climate-control",
|
|
45880
45931
|
scope: "device",
|
|
@@ -46185,6 +46236,7 @@ var climateControlCapability = {
|
|
|
46185
46236
|
* on every push without re-querying the provider.
|
|
46186
46237
|
*/
|
|
46187
46238
|
runtimeState: ClimateControlStatusSchema,
|
|
46239
|
+
customize: climateControlCustomize,
|
|
46188
46240
|
/**
|
|
46189
46241
|
* Runtime-state durability: **session** — as `brightness`; `currentTemp` moves continuously and is re-published on connect.
|
|
46190
46242
|
*
|
|
@@ -47620,20 +47672,95 @@ var ControlSetValueInputSchema = zod.z.discriminatedUnion("kind", [
|
|
|
47620
47672
|
value: zod.z.string().min(1)
|
|
47621
47673
|
})
|
|
47622
47674
|
]);
|
|
47675
|
+
/**
|
|
47676
|
+
* `next` / `previous` input (#544, operator scripts driving a selector).
|
|
47677
|
+
* `cycle` is a TOP-LEVEL default so a direct `ctx.api.control.next` call
|
|
47678
|
+
* (which skips the tRPC router's Zod parse) still gets `true` via
|
|
47679
|
+
* `CAP_INPUT_DEFAULTS` — matching HA's own `select_next` / `select_previous`
|
|
47680
|
+
* default.
|
|
47681
|
+
*/
|
|
47682
|
+
var ControlStepInputSchema = zod.z.object({
|
|
47683
|
+
deviceId: zod.z.number().int().nonnegative(),
|
|
47684
|
+
cycle: zod.z.boolean().default(true)
|
|
47685
|
+
});
|
|
47686
|
+
/** `first` / `last` input — no `cycle`, there is no boundary to stop at. */
|
|
47687
|
+
var ControlBoundaryInputSchema = zod.z.object({ deviceId: zod.z.number().int().nonnegative() });
|
|
47623
47688
|
var controlCapability = {
|
|
47624
47689
|
name: "control",
|
|
47625
47690
|
scope: "device",
|
|
47626
47691
|
deviceNative: true,
|
|
47627
47692
|
mode: "singleton",
|
|
47628
47693
|
deviceTypes: [require_composed_stable_id.DeviceType.Control],
|
|
47629
|
-
methods: {
|
|
47630
|
-
|
|
47631
|
-
|
|
47632
|
-
|
|
47633
|
-
|
|
47634
|
-
|
|
47635
|
-
|
|
47636
|
-
|
|
47694
|
+
methods: {
|
|
47695
|
+
setValue: require_sleep.method(zod.z.object({
|
|
47696
|
+
deviceId: zod.z.number().int().nonnegative(),
|
|
47697
|
+
control: ControlSetValueInputSchema
|
|
47698
|
+
}), zod.z.void(), {
|
|
47699
|
+
kind: "mutation",
|
|
47700
|
+
auth: "protected",
|
|
47701
|
+
notOperatorFacing: "the value shape depends on the control kind (numeric / select / text / datetime) read from status; a typed picker for it is a follow-up of the automations rework"
|
|
47702
|
+
}),
|
|
47703
|
+
/**
|
|
47704
|
+
* Select one step forward through `options` (#544). `providerOptional`
|
|
47705
|
+
* (hence `optionalMethod`): only a `kind: 'select'` provider implements
|
|
47706
|
+
* it — the stepping math is NOT re-derived per provider, it is the one
|
|
47707
|
+
* shared helper `selectNavigationMethods` (`control-select-navigation.ts`)
|
|
47708
|
+
* every select-kind driver spreads in.
|
|
47709
|
+
*/
|
|
47710
|
+
next: require_sleep.optionalMethod(ControlStepInputSchema, zod.z.void(), {
|
|
47711
|
+
kind: "mutation",
|
|
47712
|
+
auth: "protected",
|
|
47713
|
+
actions: [{
|
|
47714
|
+
id: "select.next",
|
|
47715
|
+
label: require_sleep.t("Next option", "Opzione successiva"),
|
|
47716
|
+
phrase: require_sleep.t("Select the next option on {device}", "Seleziona l’opzione successiva su {device}"),
|
|
47717
|
+
icon: "skip-forward",
|
|
47718
|
+
openArgs: [{
|
|
47719
|
+
key: "cycle",
|
|
47720
|
+
label: require_sleep.t("Wrap to the first option", "Ricomincia dalla prima opzione"),
|
|
47721
|
+
offer: { kind: "boolean" }
|
|
47722
|
+
}]
|
|
47723
|
+
}]
|
|
47724
|
+
}),
|
|
47725
|
+
/** Select one step backward through `options` (#544) — mirrors `next`. */
|
|
47726
|
+
previous: require_sleep.optionalMethod(ControlStepInputSchema, zod.z.void(), {
|
|
47727
|
+
kind: "mutation",
|
|
47728
|
+
auth: "protected",
|
|
47729
|
+
actions: [{
|
|
47730
|
+
id: "select.previous",
|
|
47731
|
+
label: require_sleep.t("Previous option", "Opzione precedente"),
|
|
47732
|
+
phrase: require_sleep.t("Select the previous option on {device}", "Seleziona l’opzione precedente su {device}"),
|
|
47733
|
+
icon: "skip-back",
|
|
47734
|
+
openArgs: [{
|
|
47735
|
+
key: "cycle",
|
|
47736
|
+
label: require_sleep.t("Wrap to the last option", "Ricomincia dall’ultima opzione"),
|
|
47737
|
+
offer: { kind: "boolean" }
|
|
47738
|
+
}]
|
|
47739
|
+
}]
|
|
47740
|
+
}),
|
|
47741
|
+
/** Select the first entry of `options` (#544). */
|
|
47742
|
+
first: require_sleep.optionalMethod(ControlBoundaryInputSchema, zod.z.void(), {
|
|
47743
|
+
kind: "mutation",
|
|
47744
|
+
auth: "protected",
|
|
47745
|
+
actions: [{
|
|
47746
|
+
id: "select.first",
|
|
47747
|
+
label: require_sleep.t("First option", "Prima opzione"),
|
|
47748
|
+
phrase: require_sleep.t("Select the first option on {device}", "Seleziona la prima opzione su {device}"),
|
|
47749
|
+
icon: "chevron-first"
|
|
47750
|
+
}]
|
|
47751
|
+
}),
|
|
47752
|
+
/** Select the last entry of `options` (#544). */
|
|
47753
|
+
last: require_sleep.optionalMethod(ControlBoundaryInputSchema, zod.z.void(), {
|
|
47754
|
+
kind: "mutation",
|
|
47755
|
+
auth: "protected",
|
|
47756
|
+
actions: [{
|
|
47757
|
+
id: "select.last",
|
|
47758
|
+
label: require_sleep.t("Last option", "Ultima opzione"),
|
|
47759
|
+
phrase: require_sleep.t("Select the last option on {device}", "Seleziona l’ultima opzione su {device}"),
|
|
47760
|
+
icon: "chevron-last"
|
|
47761
|
+
}]
|
|
47762
|
+
})
|
|
47763
|
+
},
|
|
47637
47764
|
status: {
|
|
47638
47765
|
schema: ControlStatusSchema,
|
|
47639
47766
|
kind: "push"
|
|
@@ -48669,7 +48796,7 @@ var mediaPlayerCapability = {
|
|
|
48669
48796
|
//#region src/generated/customize-catalog.ts
|
|
48670
48797
|
/**
|
|
48671
48798
|
* Customize catalog, projected from every `*.cap.ts` `customize` block.
|
|
48672
|
-
*
|
|
48799
|
+
* 12 caps. Field keys are `runtimeState` paths. No Zod.
|
|
48673
48800
|
*/
|
|
48674
48801
|
var CAP_CUSTOMIZE_CATALOG = {
|
|
48675
48802
|
"battery": {
|
|
@@ -48728,6 +48855,51 @@ var CAP_CUSTOMIZE_CATALOG = {
|
|
|
48728
48855
|
]
|
|
48729
48856
|
}]
|
|
48730
48857
|
},
|
|
48858
|
+
"climate-control": {
|
|
48859
|
+
version: 1,
|
|
48860
|
+
targets: [{
|
|
48861
|
+
id: "room-temperature",
|
|
48862
|
+
cardinality: "scalar",
|
|
48863
|
+
deviceTypes: [require_composed_stable_id.DeviceType.Climate],
|
|
48864
|
+
apply: "replace",
|
|
48865
|
+
vocabularyCap: "climate-control",
|
|
48866
|
+
vocabularyStateField: "currentTemp",
|
|
48867
|
+
sources: [{
|
|
48868
|
+
kind: "numeric",
|
|
48869
|
+
transformKinds: ["identity"],
|
|
48870
|
+
transforms: [{ kind: "identity" }]
|
|
48871
|
+
}],
|
|
48872
|
+
sourceReport: { status: "assignment-status" },
|
|
48873
|
+
advancedExpression: false,
|
|
48874
|
+
path: "currentTemp",
|
|
48875
|
+
valueKind: "number",
|
|
48876
|
+
nullable: true
|
|
48877
|
+
}, {
|
|
48878
|
+
id: "room-humidity",
|
|
48879
|
+
cardinality: "scalar",
|
|
48880
|
+
deviceTypes: [require_composed_stable_id.DeviceType.Climate],
|
|
48881
|
+
apply: "replace",
|
|
48882
|
+
vocabularyCap: "climate-control",
|
|
48883
|
+
vocabularyStateField: "currentHumidity",
|
|
48884
|
+
sources: [{
|
|
48885
|
+
kind: "numeric",
|
|
48886
|
+
transformKinds: ["identity"],
|
|
48887
|
+
transforms: [{ kind: "identity" }]
|
|
48888
|
+
}],
|
|
48889
|
+
sourceReport: { status: "assignment-status" },
|
|
48890
|
+
advancedExpression: false,
|
|
48891
|
+
path: "currentHumidity",
|
|
48892
|
+
valueKind: "number",
|
|
48893
|
+
nullable: true
|
|
48894
|
+
}],
|
|
48895
|
+
overridable: [{
|
|
48896
|
+
path: "currentTemp",
|
|
48897
|
+
by: "room-temperature"
|
|
48898
|
+
}, {
|
|
48899
|
+
path: "currentHumidity",
|
|
48900
|
+
by: "room-humidity"
|
|
48901
|
+
}]
|
|
48902
|
+
},
|
|
48731
48903
|
"consumables": {
|
|
48732
48904
|
version: 1,
|
|
48733
48905
|
targets: [{
|
|
@@ -53209,6 +53381,17 @@ var RawSecretMigrationReportSchema = zod.z.object({
|
|
|
53209
53381
|
* so a block that throws or never returns is marked `failed` and visible
|
|
53210
53382
|
* instead of taking the hub with it (D6). Every method here is admin-only, and
|
|
53211
53383
|
* must stay so.
|
|
53384
|
+
*
|
|
53385
|
+
* **Calling a device cap from a block.** `ctx.api.<cap>.<method>.mutate(...)`
|
|
53386
|
+
* is the same call an addon makes — e.g. driving a `select` / `input_select`
|
|
53387
|
+
* device through `control` (#544, a UniFi-triggered script cycling a scene
|
|
53388
|
+
* selector):
|
|
53389
|
+
*
|
|
53390
|
+
* ```ts
|
|
53391
|
+
* await ctx.api.control.next.mutate({ deviceId, cycle: true })
|
|
53392
|
+
* await ctx.api.control.first.mutate({ deviceId })
|
|
53393
|
+
* const status = await ctx.api.control.getStatus.query({ deviceId })
|
|
53394
|
+
* ```
|
|
53212
53395
|
*/
|
|
53213
53396
|
/**
|
|
53214
53397
|
* Prefix for a block's generated addon id AND its runner id — one addon, one
|
|
@@ -79564,6 +79747,8 @@ var NcSystemEventKindSchema = zod.z.enum([
|
|
|
79564
79747
|
"storage-location-low",
|
|
79565
79748
|
"storage-location-critical",
|
|
79566
79749
|
"storage-location-ok",
|
|
79750
|
+
"storage-drain-progress",
|
|
79751
|
+
"storage-drain-complete",
|
|
79567
79752
|
"addon-crash-loop",
|
|
79568
79753
|
"addon-update-available",
|
|
79569
79754
|
"server-update-available",
|
|
@@ -81325,6 +81510,14 @@ var NC_CONDITION_CATALOG = [
|
|
|
81325
81510
|
value: "storage-location-ok",
|
|
81326
81511
|
label: "Storage location ok again"
|
|
81327
81512
|
},
|
|
81513
|
+
{
|
|
81514
|
+
value: "storage-drain-progress",
|
|
81515
|
+
label: "Storage drain progress"
|
|
81516
|
+
},
|
|
81517
|
+
{
|
|
81518
|
+
value: "storage-drain-complete",
|
|
81519
|
+
label: "Storage drain complete"
|
|
81520
|
+
},
|
|
81328
81521
|
{
|
|
81329
81522
|
value: "addon-crash-loop",
|
|
81330
81523
|
label: "Addon stopped after repeated crashes"
|
|
@@ -91928,7 +92121,10 @@ var RemoteAssumedStateSchema = zod.z.object({
|
|
|
91928
92121
|
value: zod.z.boolean(),
|
|
91929
92122
|
at: zod.z.number()
|
|
91930
92123
|
}).nullable(),
|
|
91931
|
-
/**
|
|
92124
|
+
/**
|
|
92125
|
+
* Retired: a sent source is never a state (an infrared set cannot report its
|
|
92126
|
+
* input). Kept only so records written before parse; nothing writes or reads it.
|
|
92127
|
+
*/
|
|
91932
92128
|
source: zod.z.object({
|
|
91933
92129
|
name: zod.z.string(),
|
|
91934
92130
|
at: zod.z.number()
|
|
@@ -103952,6 +104148,67 @@ function buildEventKindDescriptor(kind, source) {
|
|
|
103952
104148
|
};
|
|
103953
104149
|
}
|
|
103954
104150
|
//#endregion
|
|
104151
|
+
//#region src/capabilities/control-select-navigation.ts
|
|
104152
|
+
/**
|
|
104153
|
+
* Resolve the option a step lands on, given the select's current option
|
|
104154
|
+
* list and value.
|
|
104155
|
+
*
|
|
104156
|
+
* - `first` / `last` ignore `current` entirely — they only need a non-empty
|
|
104157
|
+
* option list.
|
|
104158
|
+
* - `next` / `previous` walk from `current`'s index. Past either end:
|
|
104159
|
+
* `cycle: true` wraps to the other end (HA `select_next` / `select_previous`
|
|
104160
|
+
* default); `cycle: false` STOPS — returns `null`, a no-op the caller must
|
|
104161
|
+
* not mistake for an error.
|
|
104162
|
+
*
|
|
104163
|
+
* Throws when the list is empty (nothing to select) or — for `next` /
|
|
104164
|
+
* `previous` only — when `current` is not one of `options` (there is no
|
|
104165
|
+
* index to step from; `first` / `last` never throw this one).
|
|
104166
|
+
*/
|
|
104167
|
+
function resolveSelectStep(options, current, direction, cycle) {
|
|
104168
|
+
if (options.length === 0) throw new Error("control: cannot step a select with no options");
|
|
104169
|
+
if (direction === "first") return options[0] ?? null;
|
|
104170
|
+
if (direction === "last") return options[options.length - 1] ?? null;
|
|
104171
|
+
const index = options.indexOf(current);
|
|
104172
|
+
if (index === -1) throw new Error(`control: current value "${current}" is not one of the select's options`);
|
|
104173
|
+
const raw = index + (direction === "next" ? 1 : -1);
|
|
104174
|
+
if (raw >= 0 && raw < options.length) return options[raw] ?? null;
|
|
104175
|
+
if (!cycle) return null;
|
|
104176
|
+
return options[(raw % options.length + options.length) % options.length] ?? null;
|
|
104177
|
+
}
|
|
104178
|
+
/**
|
|
104179
|
+
* The generic `next` / `previous` / `first` / `last` native-provider
|
|
104180
|
+
* implementation. A select-kind `control` provider calls this with its OWN
|
|
104181
|
+
* `getStatus` / `setValue` (every provider already has both) instead of
|
|
104182
|
+
* re-implementing the stepping math:
|
|
104183
|
+
*
|
|
104184
|
+
* ```ts
|
|
104185
|
+
* const provider: InferNativeProvider<typeof controlCapability> = {
|
|
104186
|
+
* getStatus,
|
|
104187
|
+
* setValue,
|
|
104188
|
+
* ...selectNavigationMethods(getStatus, (value) => setValue({ control: { kind: 'select', value } })),
|
|
104189
|
+
* }
|
|
104190
|
+
* ```
|
|
104191
|
+
*
|
|
104192
|
+
* Throws when `getStatus` answers a non-`select` slice — that is a provider
|
|
104193
|
+
* wiring mistake (only select-kind providers should spread this in), never a
|
|
104194
|
+
* runtime condition a script should handle.
|
|
104195
|
+
*/
|
|
104196
|
+
function selectNavigationMethods(getStatus, setValue) {
|
|
104197
|
+
const step = async (direction, cycle) => {
|
|
104198
|
+
const status = await getStatus();
|
|
104199
|
+
if (status.kind !== "select" || typeof status.value !== "string") throw new Error(`control.${direction}: not a select control (kind=${status.kind})`);
|
|
104200
|
+
const target = resolveSelectStep(status.options, status.value, direction, cycle);
|
|
104201
|
+
if (target === null) return;
|
|
104202
|
+
await setValue(target);
|
|
104203
|
+
};
|
|
104204
|
+
return {
|
|
104205
|
+
next: ({ cycle }) => step("next", cycle),
|
|
104206
|
+
previous: ({ cycle }) => step("previous", cycle),
|
|
104207
|
+
first: () => step("first", true),
|
|
104208
|
+
last: () => step("last", true)
|
|
104209
|
+
};
|
|
104210
|
+
}
|
|
104211
|
+
//#endregion
|
|
103955
104212
|
//#region src/capabilities/recording-onboard-rules.ts
|
|
103956
104213
|
/** Minutes in a day. `endMinute === 1440` means "to end of day". */
|
|
103957
104214
|
var MINUTES_PER_DAY = 1440;
|
|
@@ -117462,6 +117719,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
117462
117719
|
access: "view",
|
|
117463
117720
|
role: "viewer"
|
|
117464
117721
|
},
|
|
117722
|
+
"control.first": {
|
|
117723
|
+
capName: "control",
|
|
117724
|
+
capScope: "device",
|
|
117725
|
+
addonId: null,
|
|
117726
|
+
access: "create",
|
|
117727
|
+
role: "viewer"
|
|
117728
|
+
},
|
|
117465
117729
|
"control.getStatus": {
|
|
117466
117730
|
capName: "control",
|
|
117467
117731
|
capScope: "device",
|
|
@@ -117469,6 +117733,27 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
117469
117733
|
access: "view",
|
|
117470
117734
|
role: "viewer"
|
|
117471
117735
|
},
|
|
117736
|
+
"control.last": {
|
|
117737
|
+
capName: "control",
|
|
117738
|
+
capScope: "device",
|
|
117739
|
+
addonId: null,
|
|
117740
|
+
access: "create",
|
|
117741
|
+
role: "viewer"
|
|
117742
|
+
},
|
|
117743
|
+
"control.next": {
|
|
117744
|
+
capName: "control",
|
|
117745
|
+
capScope: "device",
|
|
117746
|
+
addonId: null,
|
|
117747
|
+
access: "create",
|
|
117748
|
+
role: "viewer"
|
|
117749
|
+
},
|
|
117750
|
+
"control.previous": {
|
|
117751
|
+
capName: "control",
|
|
117752
|
+
capScope: "device",
|
|
117753
|
+
addonId: null,
|
|
117754
|
+
access: "create",
|
|
117755
|
+
role: "viewer"
|
|
117756
|
+
},
|
|
117472
117757
|
"control.setValue": {
|
|
117473
117758
|
capName: "control",
|
|
117474
117759
|
capScope: "device",
|
|
@@ -129339,11 +129624,31 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
129339
129624
|
form: "single",
|
|
129340
129625
|
optional: false
|
|
129341
129626
|
}],
|
|
129627
|
+
"control.first": [{
|
|
129628
|
+
name: "deviceId",
|
|
129629
|
+
form: "single",
|
|
129630
|
+
optional: false
|
|
129631
|
+
}],
|
|
129342
129632
|
"control.getStatus": [{
|
|
129343
129633
|
name: "deviceId",
|
|
129344
129634
|
form: "single",
|
|
129345
129635
|
optional: false
|
|
129346
129636
|
}],
|
|
129637
|
+
"control.last": [{
|
|
129638
|
+
name: "deviceId",
|
|
129639
|
+
form: "single",
|
|
129640
|
+
optional: false
|
|
129641
|
+
}],
|
|
129642
|
+
"control.next": [{
|
|
129643
|
+
name: "deviceId",
|
|
129644
|
+
form: "single",
|
|
129645
|
+
optional: false
|
|
129646
|
+
}],
|
|
129647
|
+
"control.previous": [{
|
|
129648
|
+
name: "deviceId",
|
|
129649
|
+
form: "single",
|
|
129650
|
+
optional: false
|
|
129651
|
+
}],
|
|
129347
129652
|
"control.setValue": [{
|
|
129348
129653
|
name: "deviceId",
|
|
129349
129654
|
form: "single",
|
|
@@ -135289,7 +135594,7 @@ function systemEventFilterApplies(kind, filter) {
|
|
|
135289
135594
|
switch (filter) {
|
|
135290
135595
|
case "deviceIds": return kind.startsWith("device-") || kind.startsWith("stream-") || kind === "detection-blind" || kind.startsWith("motion-") || kind.startsWith("package-llm-") || kind.startsWith("recording-") || kind === "alarm-triggered";
|
|
135291
135596
|
case "deviceTypes": return kind.startsWith("device-") || kind === "detection-blind" || kind.startsWith("motion-") || kind.startsWith("package-llm-");
|
|
135292
|
-
case "nodeIds": return kind.startsWith("node-") || kind === "addon-crash-loop" || kind === "addon-update-available" || kind === "addon-updated" || kind === "server-update-available" || kind === "wrapper-update-available" || kind === "server-updated" || kind.startsWith("storage-location-") || kind.startsWith("alert-");
|
|
135597
|
+
case "nodeIds": return kind.startsWith("node-") || kind === "addon-crash-loop" || kind === "addon-update-available" || kind === "addon-updated" || kind === "server-update-available" || kind === "wrapper-update-available" || kind === "server-updated" || kind.startsWith("storage-location-") || kind.startsWith("storage-drain-") || kind.startsWith("alert-");
|
|
135293
135598
|
case "packageNames": return kind.endsWith("update-available") || kind === "addon-updated" || kind === "node-updating" || kind === "server-updated";
|
|
135294
135599
|
case "consumableLowPercent": return NC_CONSUMABLE_SYSTEM_EVENT_KINDS.includes(kind);
|
|
135295
135600
|
case "commandActions":
|
|
@@ -135377,6 +135682,8 @@ var NC_SYSTEM_EVENT_FAMILY = {
|
|
|
135377
135682
|
"storage-location-low": "system",
|
|
135378
135683
|
"storage-location-critical": "system",
|
|
135379
135684
|
"storage-location-ok": "system",
|
|
135685
|
+
"storage-drain-progress": "system",
|
|
135686
|
+
"storage-drain-complete": "system",
|
|
135380
135687
|
"alarm-triggered": "alarm",
|
|
135381
135688
|
"alarm-armed": "alarm",
|
|
135382
135689
|
"alarm-disarmed": "alarm",
|
|
@@ -135533,6 +135840,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
135533
135840
|
"storage-location-ok"
|
|
135534
135841
|
]
|
|
135535
135842
|
},
|
|
135843
|
+
{
|
|
135844
|
+
id: "storage-drain",
|
|
135845
|
+
family: "system",
|
|
135846
|
+
label: "Storage drain progress",
|
|
135847
|
+
kinds: ["storage-drain-progress", "storage-drain-complete"]
|
|
135848
|
+
},
|
|
135536
135849
|
{
|
|
135537
135850
|
id: "alerts",
|
|
135538
135851
|
family: "system",
|
|
@@ -137524,6 +137837,7 @@ var ALERT_EPISODE = [
|
|
|
137524
137837
|
"alert-error",
|
|
137525
137838
|
"alert-critical-resolved"
|
|
137526
137839
|
];
|
|
137840
|
+
var STORAGE_DRAIN = ["storage-drain-progress", "storage-drain-complete"];
|
|
137527
137841
|
var DEVICE_ATTENTION = ["device-attention-required", "device-attention-resolved"];
|
|
137528
137842
|
var UPDATES = [
|
|
137529
137843
|
"addon-update-available",
|
|
@@ -138168,6 +138482,7 @@ var NC_TEMPLATE_VARS = [
|
|
|
138168
138482
|
"storage-location-low",
|
|
138169
138483
|
"storage-location-critical",
|
|
138170
138484
|
"storage-location-ok",
|
|
138485
|
+
...STORAGE_DRAIN,
|
|
138171
138486
|
...ALERT_EPISODE
|
|
138172
138487
|
]
|
|
138173
138488
|
},
|
|
@@ -138191,6 +138506,7 @@ var NC_TEMPLATE_VARS = [
|
|
|
138191
138506
|
"storage-location-low",
|
|
138192
138507
|
"storage-location-critical",
|
|
138193
138508
|
"storage-location-ok",
|
|
138509
|
+
...STORAGE_DRAIN,
|
|
138194
138510
|
...ALERT_EPISODE
|
|
138195
138511
|
]
|
|
138196
138512
|
},
|
|
@@ -138356,7 +138672,8 @@ var NC_TEMPLATE_VARS = [
|
|
|
138356
138672
|
systemEventKinds: [
|
|
138357
138673
|
"storage-location-low",
|
|
138358
138674
|
"storage-location-critical",
|
|
138359
|
-
"storage-location-ok"
|
|
138675
|
+
"storage-location-ok",
|
|
138676
|
+
...STORAGE_DRAIN
|
|
138360
138677
|
]
|
|
138361
138678
|
},
|
|
138362
138679
|
{
|
|
@@ -138370,9 +138687,40 @@ var NC_TEMPLATE_VARS = [
|
|
|
138370
138687
|
systemEventKinds: [
|
|
138371
138688
|
"storage-location-low",
|
|
138372
138689
|
"storage-location-critical",
|
|
138373
|
-
"storage-location-ok"
|
|
138690
|
+
"storage-location-ok",
|
|
138691
|
+
...STORAGE_DRAIN
|
|
138374
138692
|
]
|
|
138375
138693
|
},
|
|
138694
|
+
{
|
|
138695
|
+
name: "bytesRemainingGb",
|
|
138696
|
+
label: "Bytes remaining (GB)",
|
|
138697
|
+
example: "42.3",
|
|
138698
|
+
group: "system",
|
|
138699
|
+
families: ["rule"],
|
|
138700
|
+
fields: [...RULE_TEXT],
|
|
138701
|
+
kinds: ["system"],
|
|
138702
|
+
systemEventKinds: ["storage-drain-progress"]
|
|
138703
|
+
},
|
|
138704
|
+
{
|
|
138705
|
+
name: "rateGbPerDay",
|
|
138706
|
+
label: "Drain rate (GB/day)",
|
|
138707
|
+
example: "1.20",
|
|
138708
|
+
group: "system",
|
|
138709
|
+
families: ["rule"],
|
|
138710
|
+
fields: [...RULE_TEXT],
|
|
138711
|
+
kinds: ["system"],
|
|
138712
|
+
systemEventKinds: ["storage-drain-progress"]
|
|
138713
|
+
},
|
|
138714
|
+
{
|
|
138715
|
+
name: "etaDate",
|
|
138716
|
+
label: "Estimated empty date",
|
|
138717
|
+
example: "2026-12-01",
|
|
138718
|
+
group: "system",
|
|
138719
|
+
families: ["rule"],
|
|
138720
|
+
fields: [...RULE_TEXT],
|
|
138721
|
+
kinds: ["system"],
|
|
138722
|
+
systemEventKinds: ["storage-drain-progress"]
|
|
138723
|
+
},
|
|
138376
138724
|
{
|
|
138377
138725
|
name: "freePercent",
|
|
138378
138726
|
label: "Free space (%)",
|
|
@@ -138807,7 +139155,9 @@ var NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS = [
|
|
|
138807
139155
|
"rule-repaired",
|
|
138808
139156
|
"package-llm-silent",
|
|
138809
139157
|
"package-llm-answered",
|
|
138810
|
-
"device-command"
|
|
139158
|
+
"device-command",
|
|
139159
|
+
"storage-drain-progress",
|
|
139160
|
+
"storage-drain-complete"
|
|
138811
139161
|
];
|
|
138812
139162
|
/**
|
|
138813
139163
|
* The catalog as `getTemplateCatalog` SERVES it: every descriptor, with the
|
|
@@ -146587,6 +146937,7 @@ exports.CleanupDeletedDevicesResultSchema = CleanupDeletedDevicesResultSchema;
|
|
|
146587
146937
|
exports.ClearTrackRelationInputSchema = ClearTrackRelationInputSchema;
|
|
146588
146938
|
exports.ClearTrackRelationResultSchema = ClearTrackRelationResultSchema;
|
|
146589
146939
|
exports.ClientNetworkStatsSchema = ClientNetworkStatsSchema;
|
|
146940
|
+
exports.ClimateActionSchema = ClimateActionSchema;
|
|
146590
146941
|
exports.ClimateControlStatusSchema = ClimateControlStatusSchema;
|
|
146591
146942
|
exports.ClipBytesOfferSchema = ClipBytesOfferSchema;
|
|
146592
146943
|
exports.ClipBytesSchema = ClipBytesSchema;
|
|
@@ -149988,6 +150339,7 @@ exports.resolveRootSupply = resolveRootSupply;
|
|
|
149988
150339
|
exports.resolveRunnerId = resolveRunnerId;
|
|
149989
150340
|
exports.resolveSecretMarkers = require_sleep.resolveSecretMarkers;
|
|
149990
150341
|
exports.resolveSecretViewsIn = require_sleep.resolveSecretViewsIn;
|
|
150342
|
+
exports.resolveSelectStep = resolveSelectStep;
|
|
149991
150343
|
exports.resolveServerName = resolveServerName;
|
|
149992
150344
|
exports.resolveStepArgs = resolveStepArgs;
|
|
149993
150345
|
exports.resolveStepArgsWithTemplates = resolveStepArgsWithTemplates;
|
|
@@ -150077,6 +150429,7 @@ exports.seekPatch = seekPatch;
|
|
|
150077
150429
|
exports.selectAppConnectionEndpoints = selectAppConnectionEndpoints;
|
|
150078
150430
|
exports.selectAssignedProfileSlots = require_sleep.selectAssignedProfileSlots;
|
|
150079
150431
|
exports.selectFewShots = selectFewShots;
|
|
150432
|
+
exports.selectNavigationMethods = selectNavigationMethods;
|
|
150080
150433
|
exports.selectRecoveryStep = selectRecoveryStep;
|
|
150081
150434
|
exports.sendTimesForEditor = sendTimesForEditor;
|
|
150082
150435
|
exports.sendTimesOfSchedule = sendTimesOfSchedule;
|