@camstack/types 1.2.554 → 1.2.556
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 +18 -4
- package/dist/addon.js +4 -3
- package/dist/addon.mjs +4 -3
- package/dist/audit/device-transition.d.ts +53 -0
- package/dist/capabilities/index.d.ts +2 -2
- package/dist/capabilities/ir-transmitter.cap.d.ts +47 -2
- package/dist/capabilities/notification-rules.cap.d.ts +237 -0
- package/dist/capabilities/osd-manager.cap.d.ts +96 -0
- package/dist/capabilities/remote.cap.d.ts +24 -0
- package/dist/client.js +76 -8
- package/dist/client.mjs +76 -8
- package/dist/device/hero/hero-row.d.ts +6 -1
- package/dist/enums/event-category.d.ts +9 -0
- package/dist/enums.js +1 -1
- package/dist/enums.mjs +1 -1
- package/dist/{event-category-78tcBemo.mjs → event-category-Dv-Gcv1f.mjs} +9 -0
- package/dist/{event-category-BC4RRerT.js → event-category-Ps2LC8dN.js} +9 -0
- package/dist/generated/addon-api.d.ts +7 -0
- package/dist/generated/cap-input-defaults.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +1 -1
- package/dist/index.js +354 -24
- package/dist/index.mjs +343 -25
- package/dist/ir/fastlz.d.ts +7 -0
- package/dist/ir/index.d.ts +2 -0
- package/dist/ir/ir-error.d.ts +1 -1
- package/dist/ir/ir-payload.d.ts +7 -1
- package/dist/ir/native.d.ts +24 -0
- package/dist/ir/tuya.d.ts +5 -0
- package/dist/notification/system-event-families.d.ts +5 -0
- package/dist/notification/system-event-filters.d.ts +1 -1
- package/dist/remote/remote-config.d.ts +6 -0
- package/dist/remote/remote-sources.d.ts +12 -0
- package/dist/{sleep-dcR4vBFG.js → sleep-BRGFFgr9.js} +46 -2
- package/dist/{sleep-D0roI_CZ.mjs → sleep-Czv-4wFH.mjs} +41 -3
- package/package.json +1 -1
|
@@ -155,6 +155,7 @@ export declare const OsdSlotBindingSchema: z.ZodObject<{
|
|
|
155
155
|
"device-attention-resolved": "device-attention-resolved";
|
|
156
156
|
"device-battery-low": "device-battery-low";
|
|
157
157
|
"device-battery-normal": "device-battery-normal";
|
|
158
|
+
"device-command": "device-command";
|
|
158
159
|
"device-consumable-low": "device-consumable-low";
|
|
159
160
|
"device-consumable-normal": "device-consumable-normal";
|
|
160
161
|
"device-disabled": "device-disabled";
|
|
@@ -190,6 +191,21 @@ export declare const OsdSlotBindingSchema: z.ZodObject<{
|
|
|
190
191
|
excludeDeviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
191
192
|
nodeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
192
193
|
packageNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
194
|
+
commandActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
195
|
+
commandOutcomes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
196
|
+
already: "already";
|
|
197
|
+
confirmed: "confirmed";
|
|
198
|
+
failed: "failed";
|
|
199
|
+
unconfirmed: "unconfirmed";
|
|
200
|
+
}>>>;
|
|
201
|
+
commandActorKinds: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
202
|
+
action: "action";
|
|
203
|
+
addon: "addon";
|
|
204
|
+
composition: "composition";
|
|
205
|
+
node: "node";
|
|
206
|
+
scheduler: "scheduler";
|
|
207
|
+
user: "user";
|
|
208
|
+
}>>>;
|
|
193
209
|
consumableLowPercent: z.ZodOptional<z.ZodNumber>;
|
|
194
210
|
}, z.core.$strip>>;
|
|
195
211
|
customZones: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -340,6 +356,7 @@ export declare const OsdSlotViewSchema: z.ZodObject<{
|
|
|
340
356
|
"device-attention-resolved": "device-attention-resolved";
|
|
341
357
|
"device-battery-low": "device-battery-low";
|
|
342
358
|
"device-battery-normal": "device-battery-normal";
|
|
359
|
+
"device-command": "device-command";
|
|
343
360
|
"device-consumable-low": "device-consumable-low";
|
|
344
361
|
"device-consumable-normal": "device-consumable-normal";
|
|
345
362
|
"device-disabled": "device-disabled";
|
|
@@ -375,6 +392,21 @@ export declare const OsdSlotViewSchema: z.ZodObject<{
|
|
|
375
392
|
excludeDeviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
376
393
|
nodeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
377
394
|
packageNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
395
|
+
commandActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
396
|
+
commandOutcomes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
397
|
+
already: "already";
|
|
398
|
+
confirmed: "confirmed";
|
|
399
|
+
failed: "failed";
|
|
400
|
+
unconfirmed: "unconfirmed";
|
|
401
|
+
}>>>;
|
|
402
|
+
commandActorKinds: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
403
|
+
action: "action";
|
|
404
|
+
addon: "addon";
|
|
405
|
+
composition: "composition";
|
|
406
|
+
node: "node";
|
|
407
|
+
scheduler: "scheduler";
|
|
408
|
+
user: "user";
|
|
409
|
+
}>>>;
|
|
378
410
|
consumableLowPercent: z.ZodOptional<z.ZodNumber>;
|
|
379
411
|
}, z.core.$strip>>;
|
|
380
412
|
customZones: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -581,6 +613,7 @@ export declare const osdManagerCapability: {
|
|
|
581
613
|
"device-attention-resolved": "device-attention-resolved";
|
|
582
614
|
"device-battery-low": "device-battery-low";
|
|
583
615
|
"device-battery-normal": "device-battery-normal";
|
|
616
|
+
"device-command": "device-command";
|
|
584
617
|
"device-consumable-low": "device-consumable-low";
|
|
585
618
|
"device-consumable-normal": "device-consumable-normal";
|
|
586
619
|
"device-disabled": "device-disabled";
|
|
@@ -616,6 +649,21 @@ export declare const osdManagerCapability: {
|
|
|
616
649
|
excludeDeviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
617
650
|
nodeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
618
651
|
packageNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
652
|
+
commandActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
653
|
+
commandOutcomes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
654
|
+
already: "already";
|
|
655
|
+
confirmed: "confirmed";
|
|
656
|
+
failed: "failed";
|
|
657
|
+
unconfirmed: "unconfirmed";
|
|
658
|
+
}>>>;
|
|
659
|
+
commandActorKinds: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
660
|
+
action: "action";
|
|
661
|
+
addon: "addon";
|
|
662
|
+
composition: "composition";
|
|
663
|
+
node: "node";
|
|
664
|
+
scheduler: "scheduler";
|
|
665
|
+
user: "user";
|
|
666
|
+
}>>>;
|
|
619
667
|
consumableLowPercent: z.ZodOptional<z.ZodNumber>;
|
|
620
668
|
}, z.core.$strip>>;
|
|
621
669
|
customZones: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -834,6 +882,7 @@ export declare const osdManagerCapability: {
|
|
|
834
882
|
"device-attention-resolved": "device-attention-resolved";
|
|
835
883
|
"device-battery-low": "device-battery-low";
|
|
836
884
|
"device-battery-normal": "device-battery-normal";
|
|
885
|
+
"device-command": "device-command";
|
|
837
886
|
"device-consumable-low": "device-consumable-low";
|
|
838
887
|
"device-consumable-normal": "device-consumable-normal";
|
|
839
888
|
"device-disabled": "device-disabled";
|
|
@@ -869,6 +918,21 @@ export declare const osdManagerCapability: {
|
|
|
869
918
|
excludeDeviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
870
919
|
nodeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
871
920
|
packageNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
921
|
+
commandActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
922
|
+
commandOutcomes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
923
|
+
already: "already";
|
|
924
|
+
confirmed: "confirmed";
|
|
925
|
+
failed: "failed";
|
|
926
|
+
unconfirmed: "unconfirmed";
|
|
927
|
+
}>>>;
|
|
928
|
+
commandActorKinds: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
929
|
+
action: "action";
|
|
930
|
+
addon: "addon";
|
|
931
|
+
composition: "composition";
|
|
932
|
+
node: "node";
|
|
933
|
+
scheduler: "scheduler";
|
|
934
|
+
user: "user";
|
|
935
|
+
}>>>;
|
|
872
936
|
consumableLowPercent: z.ZodOptional<z.ZodNumber>;
|
|
873
937
|
}, z.core.$strip>>;
|
|
874
938
|
customZones: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -1018,6 +1082,7 @@ export declare const osdManagerCapability: {
|
|
|
1018
1082
|
"device-attention-resolved": "device-attention-resolved";
|
|
1019
1083
|
"device-battery-low": "device-battery-low";
|
|
1020
1084
|
"device-battery-normal": "device-battery-normal";
|
|
1085
|
+
"device-command": "device-command";
|
|
1021
1086
|
"device-consumable-low": "device-consumable-low";
|
|
1022
1087
|
"device-consumable-normal": "device-consumable-normal";
|
|
1023
1088
|
"device-disabled": "device-disabled";
|
|
@@ -1053,6 +1118,21 @@ export declare const osdManagerCapability: {
|
|
|
1053
1118
|
excludeDeviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
1054
1119
|
nodeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1055
1120
|
packageNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1121
|
+
commandActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1122
|
+
commandOutcomes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1123
|
+
already: "already";
|
|
1124
|
+
confirmed: "confirmed";
|
|
1125
|
+
failed: "failed";
|
|
1126
|
+
unconfirmed: "unconfirmed";
|
|
1127
|
+
}>>>;
|
|
1128
|
+
commandActorKinds: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1129
|
+
action: "action";
|
|
1130
|
+
addon: "addon";
|
|
1131
|
+
composition: "composition";
|
|
1132
|
+
node: "node";
|
|
1133
|
+
scheduler: "scheduler";
|
|
1134
|
+
user: "user";
|
|
1135
|
+
}>>>;
|
|
1056
1136
|
consumableLowPercent: z.ZodOptional<z.ZodNumber>;
|
|
1057
1137
|
}, z.core.$strip>>;
|
|
1058
1138
|
customZones: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -1246,6 +1326,7 @@ export declare const osdManagerCapability: {
|
|
|
1246
1326
|
"device-attention-resolved": "device-attention-resolved";
|
|
1247
1327
|
"device-battery-low": "device-battery-low";
|
|
1248
1328
|
"device-battery-normal": "device-battery-normal";
|
|
1329
|
+
"device-command": "device-command";
|
|
1249
1330
|
"device-consumable-low": "device-consumable-low";
|
|
1250
1331
|
"device-consumable-normal": "device-consumable-normal";
|
|
1251
1332
|
"device-disabled": "device-disabled";
|
|
@@ -1281,6 +1362,21 @@ export declare const osdManagerCapability: {
|
|
|
1281
1362
|
excludeDeviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
1282
1363
|
nodeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1283
1364
|
packageNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1365
|
+
commandActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1366
|
+
commandOutcomes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1367
|
+
already: "already";
|
|
1368
|
+
confirmed: "confirmed";
|
|
1369
|
+
failed: "failed";
|
|
1370
|
+
unconfirmed: "unconfirmed";
|
|
1371
|
+
}>>>;
|
|
1372
|
+
commandActorKinds: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1373
|
+
action: "action";
|
|
1374
|
+
addon: "addon";
|
|
1375
|
+
composition: "composition";
|
|
1376
|
+
node: "node";
|
|
1377
|
+
scheduler: "scheduler";
|
|
1378
|
+
user: "user";
|
|
1379
|
+
}>>>;
|
|
1284
1380
|
consumableLowPercent: z.ZodOptional<z.ZodNumber>;
|
|
1285
1381
|
}, z.core.$strip>>;
|
|
1286
1382
|
customZones: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -61,6 +61,12 @@ export declare const RemoteCommandListSchema: z.ZodObject<{
|
|
|
61
61
|
}, z.core.$strip>, z.ZodObject<{
|
|
62
62
|
kind: z.ZodLiteral<"pronto">;
|
|
63
63
|
code: z.ZodString;
|
|
64
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
65
|
+
kind: z.ZodLiteral<"native">;
|
|
66
|
+
format: z.ZodEnum<{
|
|
67
|
+
tuya: "tuya";
|
|
68
|
+
}>;
|
|
69
|
+
code: z.ZodString;
|
|
64
70
|
}, z.core.$strip>], "kind">;
|
|
65
71
|
}, z.core.$strip>], "kind">>;
|
|
66
72
|
}, z.core.$strip>;
|
|
@@ -220,6 +226,12 @@ export declare const remoteCapability: {
|
|
|
220
226
|
}, z.core.$strip>, z.ZodObject<{
|
|
221
227
|
kind: z.ZodLiteral<"pronto">;
|
|
222
228
|
code: z.ZodString;
|
|
229
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
230
|
+
kind: z.ZodLiteral<"native">;
|
|
231
|
+
format: z.ZodEnum<{
|
|
232
|
+
tuya: "tuya";
|
|
233
|
+
}>;
|
|
234
|
+
code: z.ZodString;
|
|
223
235
|
}, z.core.$strip>], "kind">;
|
|
224
236
|
}, z.core.$strip>], "kind">>>;
|
|
225
237
|
stepDelayMs: z.ZodDefault<z.ZodNumber>;
|
|
@@ -276,6 +288,12 @@ export declare const remoteCapability: {
|
|
|
276
288
|
}, z.core.$strip>, z.ZodObject<{
|
|
277
289
|
kind: z.ZodLiteral<"pronto">;
|
|
278
290
|
code: z.ZodString;
|
|
291
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
292
|
+
kind: z.ZodLiteral<"native">;
|
|
293
|
+
format: z.ZodEnum<{
|
|
294
|
+
tuya: "tuya";
|
|
295
|
+
}>;
|
|
296
|
+
code: z.ZodString;
|
|
279
297
|
}, z.core.$strip>], "kind">;
|
|
280
298
|
}, z.core.$strip>], "kind">>>;
|
|
281
299
|
stepDelayMs: z.ZodDefault<z.ZodNumber>;
|
|
@@ -332,6 +350,12 @@ export declare const remoteCapability: {
|
|
|
332
350
|
}, z.core.$strip>, z.ZodObject<{
|
|
333
351
|
kind: z.ZodLiteral<"pronto">;
|
|
334
352
|
code: z.ZodString;
|
|
353
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
354
|
+
kind: z.ZodLiteral<"native">;
|
|
355
|
+
format: z.ZodEnum<{
|
|
356
|
+
tuya: "tuya";
|
|
357
|
+
}>;
|
|
358
|
+
code: z.ZodString;
|
|
335
359
|
}, z.core.$strip>], "kind">;
|
|
336
360
|
}, z.core.$strip>], "kind">>;
|
|
337
361
|
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
package/dist/client.js
CHANGED
|
@@ -23041,6 +23041,7 @@ var NcSystemEventKindSchema = zod.z.enum([
|
|
|
23041
23041
|
"recording-degraded",
|
|
23042
23042
|
"device-attention-required",
|
|
23043
23043
|
"device-attention-resolved",
|
|
23044
|
+
"device-command",
|
|
23044
23045
|
"storage-location-low",
|
|
23045
23046
|
"storage-location-critical",
|
|
23046
23047
|
"storage-location-ok",
|
|
@@ -23137,11 +23138,6 @@ var NC_CONSUMABLE_LOW_PERCENT_DEFAULT = 15;
|
|
|
23137
23138
|
* part just replaced. A spec in the notification centre pins the sum.
|
|
23138
23139
|
*/
|
|
23139
23140
|
var NC_CONSUMABLE_LOW_PERCENT_MAX = 95;
|
|
23140
|
-
/**
|
|
23141
|
-
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
23142
|
-
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
23143
|
-
* selected kinds.
|
|
23144
|
-
*/
|
|
23145
23141
|
var NcSystemEventConditionSchema = zod.z.object({
|
|
23146
23142
|
kinds: zod.z.array(NcSystemEventKindSchema).min(1),
|
|
23147
23143
|
deviceIds: zod.z.array(zod.z.number().int()).min(1).optional(),
|
|
@@ -23173,6 +23169,28 @@ var NcSystemEventConditionSchema = zod.z.object({
|
|
|
23173
23169
|
nodeIds: zod.z.array(zod.z.string().min(1)).min(1).optional(),
|
|
23174
23170
|
packageNames: zod.z.array(zod.z.string().min(1)).min(1).optional(),
|
|
23175
23171
|
/**
|
|
23172
|
+
* `device-command` only: the vocabulary ACTION IDS (D983, `powerSource.forceRestart`)
|
|
23173
|
+
* this rule speaks about - the same dictionary the automation action blocks
|
|
23174
|
+
* pick from. The hub refuses an id the action index does not know.
|
|
23175
|
+
*/
|
|
23176
|
+
commandActions: zod.z.array(zod.z.string().min(1)).min(1).optional(),
|
|
23177
|
+
/** `device-command` only: how the command settled. A device's own change is not a command. */
|
|
23178
|
+
commandOutcomes: zod.z.array(zod.z.enum([
|
|
23179
|
+
"confirmed",
|
|
23180
|
+
"already",
|
|
23181
|
+
"unconfirmed",
|
|
23182
|
+
"failed"
|
|
23183
|
+
])).min(1).optional(),
|
|
23184
|
+
/** `device-command` only: who asked (`user`, `addon`, `action`, `scheduler`, `composition`, `node`). */
|
|
23185
|
+
commandActorKinds: zod.z.array(zod.z.enum([
|
|
23186
|
+
"user",
|
|
23187
|
+
"addon",
|
|
23188
|
+
"action",
|
|
23189
|
+
"scheduler",
|
|
23190
|
+
"composition",
|
|
23191
|
+
"node"
|
|
23192
|
+
])).min(1).optional(),
|
|
23193
|
+
/**
|
|
23176
23194
|
* At or below this remaining-life %, a consumable is LOW for THIS rule
|
|
23177
23195
|
* (D642). Absent = {@link NC_CONSUMABLE_LOW_PERCENT_DEFAULT}; at most
|
|
23178
23196
|
* {@link NC_CONSUMABLE_LOW_PERCENT_MAX}, so every episode can recover. Scoped to the
|
|
@@ -27272,6 +27290,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
27272
27290
|
};
|
|
27273
27291
|
const irTransmitterInterface = {
|
|
27274
27292
|
send: (input) => dispatch("ir-transmitter", "irTransmitter", "send", "mutation", input),
|
|
27293
|
+
learn: (input) => dispatch("ir-transmitter", "irTransmitter", "learn", "mutation", input),
|
|
27275
27294
|
getInfo: (input) => dispatch("ir-transmitter", "irTransmitter", "getInfo", "query", input)
|
|
27276
27295
|
};
|
|
27277
27296
|
const lawnMowerControlInterface = {
|
|
@@ -29860,7 +29879,10 @@ var NC_SYSTEM_EVENT_FILTER_KEYS = [
|
|
|
29860
29879
|
"deviceTypes",
|
|
29861
29880
|
"nodeIds",
|
|
29862
29881
|
"packageNames",
|
|
29863
|
-
"consumableLowPercent"
|
|
29882
|
+
"consumableLowPercent",
|
|
29883
|
+
"commandActions",
|
|
29884
|
+
"commandOutcomes",
|
|
29885
|
+
"commandActorKinds"
|
|
29864
29886
|
];
|
|
29865
29887
|
/**
|
|
29866
29888
|
* Does `filter` say anything about `kind`?
|
|
@@ -29876,6 +29898,9 @@ function systemEventFilterApplies(kind, filter) {
|
|
|
29876
29898
|
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-");
|
|
29877
29899
|
case "packageNames": return kind.endsWith("update-available") || kind === "addon-updated" || kind === "node-updating" || kind === "server-updated";
|
|
29878
29900
|
case "consumableLowPercent": return NC_CONSUMABLE_SYSTEM_EVENT_KINDS.includes(kind);
|
|
29901
|
+
case "commandActions":
|
|
29902
|
+
case "commandOutcomes":
|
|
29903
|
+
case "commandActorKinds": return kind === "device-command";
|
|
29879
29904
|
}
|
|
29880
29905
|
}
|
|
29881
29906
|
/**
|
|
@@ -29936,6 +29961,7 @@ var NC_SYSTEM_EVENT_FAMILY = {
|
|
|
29936
29961
|
"recording-degraded": "device-events",
|
|
29937
29962
|
"device-attention-required": "device-events",
|
|
29938
29963
|
"device-attention-resolved": "device-events",
|
|
29964
|
+
"device-command": "device-events",
|
|
29939
29965
|
"node-online": "system",
|
|
29940
29966
|
"node-offline": "system",
|
|
29941
29967
|
"node-restarting": "system",
|
|
@@ -29985,7 +30011,10 @@ var NC_SYSTEM_EVENT_FAMILY_FILTERS = {
|
|
|
29985
30011
|
"deviceIds",
|
|
29986
30012
|
"excludeDeviceIds",
|
|
29987
30013
|
"deviceTypes",
|
|
29988
|
-
"consumableLowPercent"
|
|
30014
|
+
"consumableLowPercent",
|
|
30015
|
+
"commandActions",
|
|
30016
|
+
"commandOutcomes",
|
|
30017
|
+
"commandActorKinds"
|
|
29989
30018
|
],
|
|
29990
30019
|
system: ["nodeIds", "packageNames"],
|
|
29991
30020
|
alarm: ["deviceIds"]
|
|
@@ -30054,6 +30083,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
30054
30083
|
label: "Needs attention",
|
|
30055
30084
|
kinds: ["device-attention-required", "device-attention-resolved"]
|
|
30056
30085
|
},
|
|
30086
|
+
{
|
|
30087
|
+
id: "device-command",
|
|
30088
|
+
family: "device-events",
|
|
30089
|
+
label: "Commands given to devices",
|
|
30090
|
+
kinds: ["device-command"]
|
|
30091
|
+
},
|
|
30057
30092
|
{
|
|
30058
30093
|
id: "nodes",
|
|
30059
30094
|
family: "system",
|
|
@@ -31047,6 +31082,7 @@ var DEVICE_EVENTS = [
|
|
|
31047
31082
|
"recording-healthy",
|
|
31048
31083
|
"recording-degraded",
|
|
31049
31084
|
...DEVICE_ATTENTION,
|
|
31085
|
+
"device-command",
|
|
31050
31086
|
...ALARM
|
|
31051
31087
|
];
|
|
31052
31088
|
/** Every kind a summary may speak about — the two summarisable families. */
|
|
@@ -31503,6 +31539,37 @@ var NC_TEMPLATE_VARS = [
|
|
|
31503
31539
|
kinds: ["system"],
|
|
31504
31540
|
systemEventKinds: [...DEVICE_EVENTS]
|
|
31505
31541
|
},
|
|
31542
|
+
{
|
|
31543
|
+
name: "actionLabel",
|
|
31544
|
+
label: "Command",
|
|
31545
|
+
example: "Force restart",
|
|
31546
|
+
group: "system",
|
|
31547
|
+
families: ["rule"],
|
|
31548
|
+
fields: [...RULE_TEXT],
|
|
31549
|
+
kinds: ["system"],
|
|
31550
|
+
systemEventKinds: ["device-command"]
|
|
31551
|
+
},
|
|
31552
|
+
{
|
|
31553
|
+
name: "actorLabel",
|
|
31554
|
+
label: "Who asked",
|
|
31555
|
+
example: "velux",
|
|
31556
|
+
group: "system",
|
|
31557
|
+
families: ["rule"],
|
|
31558
|
+
fields: [...RULE_TEXT],
|
|
31559
|
+
kinds: ["system"],
|
|
31560
|
+
systemEventKinds: ["device-command"]
|
|
31561
|
+
},
|
|
31562
|
+
{
|
|
31563
|
+
name: "deviceLabel",
|
|
31564
|
+
label: "Device with type",
|
|
31565
|
+
description: "The device name with its type in parentheses. {{deviceName}} stays the bare name.",
|
|
31566
|
+
example: "Front door (Camera)",
|
|
31567
|
+
group: "system",
|
|
31568
|
+
families: ["rule"],
|
|
31569
|
+
fields: [...RULE_TEXT],
|
|
31570
|
+
kinds: ["system"],
|
|
31571
|
+
systemEventKinds: [...DEVICE_EVENTS]
|
|
31572
|
+
},
|
|
31506
31573
|
{
|
|
31507
31574
|
name: "locations",
|
|
31508
31575
|
label: "Intrusion locations",
|
|
@@ -32223,7 +32290,8 @@ var NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS = [
|
|
|
32223
32290
|
"rule-broken",
|
|
32224
32291
|
"rule-repaired",
|
|
32225
32292
|
"package-llm-silent",
|
|
32226
|
-
"package-llm-answered"
|
|
32293
|
+
"package-llm-answered",
|
|
32294
|
+
"device-command"
|
|
32227
32295
|
];
|
|
32228
32296
|
/**
|
|
32229
32297
|
* Is this descriptor held back from the SERVED catalog as a whole (D647)?
|
package/dist/client.mjs
CHANGED
|
@@ -23040,6 +23040,7 @@ var NcSystemEventKindSchema = z.enum([
|
|
|
23040
23040
|
"recording-degraded",
|
|
23041
23041
|
"device-attention-required",
|
|
23042
23042
|
"device-attention-resolved",
|
|
23043
|
+
"device-command",
|
|
23043
23044
|
"storage-location-low",
|
|
23044
23045
|
"storage-location-critical",
|
|
23045
23046
|
"storage-location-ok",
|
|
@@ -23136,11 +23137,6 @@ var NC_CONSUMABLE_LOW_PERCENT_DEFAULT = 15;
|
|
|
23136
23137
|
* part just replaced. A spec in the notification centre pins the sum.
|
|
23137
23138
|
*/
|
|
23138
23139
|
var NC_CONSUMABLE_LOW_PERCENT_MAX = 95;
|
|
23139
|
-
/**
|
|
23140
|
-
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
23141
|
-
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
23142
|
-
* selected kinds.
|
|
23143
|
-
*/
|
|
23144
23140
|
var NcSystemEventConditionSchema = z.object({
|
|
23145
23141
|
kinds: z.array(NcSystemEventKindSchema).min(1),
|
|
23146
23142
|
deviceIds: z.array(z.number().int()).min(1).optional(),
|
|
@@ -23172,6 +23168,28 @@ var NcSystemEventConditionSchema = z.object({
|
|
|
23172
23168
|
nodeIds: z.array(z.string().min(1)).min(1).optional(),
|
|
23173
23169
|
packageNames: z.array(z.string().min(1)).min(1).optional(),
|
|
23174
23170
|
/**
|
|
23171
|
+
* `device-command` only: the vocabulary ACTION IDS (D983, `powerSource.forceRestart`)
|
|
23172
|
+
* this rule speaks about - the same dictionary the automation action blocks
|
|
23173
|
+
* pick from. The hub refuses an id the action index does not know.
|
|
23174
|
+
*/
|
|
23175
|
+
commandActions: z.array(z.string().min(1)).min(1).optional(),
|
|
23176
|
+
/** `device-command` only: how the command settled. A device's own change is not a command. */
|
|
23177
|
+
commandOutcomes: z.array(z.enum([
|
|
23178
|
+
"confirmed",
|
|
23179
|
+
"already",
|
|
23180
|
+
"unconfirmed",
|
|
23181
|
+
"failed"
|
|
23182
|
+
])).min(1).optional(),
|
|
23183
|
+
/** `device-command` only: who asked (`user`, `addon`, `action`, `scheduler`, `composition`, `node`). */
|
|
23184
|
+
commandActorKinds: z.array(z.enum([
|
|
23185
|
+
"user",
|
|
23186
|
+
"addon",
|
|
23187
|
+
"action",
|
|
23188
|
+
"scheduler",
|
|
23189
|
+
"composition",
|
|
23190
|
+
"node"
|
|
23191
|
+
])).min(1).optional(),
|
|
23192
|
+
/**
|
|
23175
23193
|
* At or below this remaining-life %, a consumable is LOW for THIS rule
|
|
23176
23194
|
* (D642). Absent = {@link NC_CONSUMABLE_LOW_PERCENT_DEFAULT}; at most
|
|
23177
23195
|
* {@link NC_CONSUMABLE_LOW_PERCENT_MAX}, so every episode can recover. Scoped to the
|
|
@@ -27271,6 +27289,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
27271
27289
|
};
|
|
27272
27290
|
const irTransmitterInterface = {
|
|
27273
27291
|
send: (input) => dispatch("ir-transmitter", "irTransmitter", "send", "mutation", input),
|
|
27292
|
+
learn: (input) => dispatch("ir-transmitter", "irTransmitter", "learn", "mutation", input),
|
|
27274
27293
|
getInfo: (input) => dispatch("ir-transmitter", "irTransmitter", "getInfo", "query", input)
|
|
27275
27294
|
};
|
|
27276
27295
|
const lawnMowerControlInterface = {
|
|
@@ -29859,7 +29878,10 @@ var NC_SYSTEM_EVENT_FILTER_KEYS = [
|
|
|
29859
29878
|
"deviceTypes",
|
|
29860
29879
|
"nodeIds",
|
|
29861
29880
|
"packageNames",
|
|
29862
|
-
"consumableLowPercent"
|
|
29881
|
+
"consumableLowPercent",
|
|
29882
|
+
"commandActions",
|
|
29883
|
+
"commandOutcomes",
|
|
29884
|
+
"commandActorKinds"
|
|
29863
29885
|
];
|
|
29864
29886
|
/**
|
|
29865
29887
|
* Does `filter` say anything about `kind`?
|
|
@@ -29875,6 +29897,9 @@ function systemEventFilterApplies(kind, filter) {
|
|
|
29875
29897
|
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-");
|
|
29876
29898
|
case "packageNames": return kind.endsWith("update-available") || kind === "addon-updated" || kind === "node-updating" || kind === "server-updated";
|
|
29877
29899
|
case "consumableLowPercent": return NC_CONSUMABLE_SYSTEM_EVENT_KINDS.includes(kind);
|
|
29900
|
+
case "commandActions":
|
|
29901
|
+
case "commandOutcomes":
|
|
29902
|
+
case "commandActorKinds": return kind === "device-command";
|
|
29878
29903
|
}
|
|
29879
29904
|
}
|
|
29880
29905
|
/**
|
|
@@ -29935,6 +29960,7 @@ var NC_SYSTEM_EVENT_FAMILY = {
|
|
|
29935
29960
|
"recording-degraded": "device-events",
|
|
29936
29961
|
"device-attention-required": "device-events",
|
|
29937
29962
|
"device-attention-resolved": "device-events",
|
|
29963
|
+
"device-command": "device-events",
|
|
29938
29964
|
"node-online": "system",
|
|
29939
29965
|
"node-offline": "system",
|
|
29940
29966
|
"node-restarting": "system",
|
|
@@ -29984,7 +30010,10 @@ var NC_SYSTEM_EVENT_FAMILY_FILTERS = {
|
|
|
29984
30010
|
"deviceIds",
|
|
29985
30011
|
"excludeDeviceIds",
|
|
29986
30012
|
"deviceTypes",
|
|
29987
|
-
"consumableLowPercent"
|
|
30013
|
+
"consumableLowPercent",
|
|
30014
|
+
"commandActions",
|
|
30015
|
+
"commandOutcomes",
|
|
30016
|
+
"commandActorKinds"
|
|
29988
30017
|
],
|
|
29989
30018
|
system: ["nodeIds", "packageNames"],
|
|
29990
30019
|
alarm: ["deviceIds"]
|
|
@@ -30053,6 +30082,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
30053
30082
|
label: "Needs attention",
|
|
30054
30083
|
kinds: ["device-attention-required", "device-attention-resolved"]
|
|
30055
30084
|
},
|
|
30085
|
+
{
|
|
30086
|
+
id: "device-command",
|
|
30087
|
+
family: "device-events",
|
|
30088
|
+
label: "Commands given to devices",
|
|
30089
|
+
kinds: ["device-command"]
|
|
30090
|
+
},
|
|
30056
30091
|
{
|
|
30057
30092
|
id: "nodes",
|
|
30058
30093
|
family: "system",
|
|
@@ -31046,6 +31081,7 @@ var DEVICE_EVENTS = [
|
|
|
31046
31081
|
"recording-healthy",
|
|
31047
31082
|
"recording-degraded",
|
|
31048
31083
|
...DEVICE_ATTENTION,
|
|
31084
|
+
"device-command",
|
|
31049
31085
|
...ALARM
|
|
31050
31086
|
];
|
|
31051
31087
|
/** Every kind a summary may speak about — the two summarisable families. */
|
|
@@ -31502,6 +31538,37 @@ var NC_TEMPLATE_VARS = [
|
|
|
31502
31538
|
kinds: ["system"],
|
|
31503
31539
|
systemEventKinds: [...DEVICE_EVENTS]
|
|
31504
31540
|
},
|
|
31541
|
+
{
|
|
31542
|
+
name: "actionLabel",
|
|
31543
|
+
label: "Command",
|
|
31544
|
+
example: "Force restart",
|
|
31545
|
+
group: "system",
|
|
31546
|
+
families: ["rule"],
|
|
31547
|
+
fields: [...RULE_TEXT],
|
|
31548
|
+
kinds: ["system"],
|
|
31549
|
+
systemEventKinds: ["device-command"]
|
|
31550
|
+
},
|
|
31551
|
+
{
|
|
31552
|
+
name: "actorLabel",
|
|
31553
|
+
label: "Who asked",
|
|
31554
|
+
example: "velux",
|
|
31555
|
+
group: "system",
|
|
31556
|
+
families: ["rule"],
|
|
31557
|
+
fields: [...RULE_TEXT],
|
|
31558
|
+
kinds: ["system"],
|
|
31559
|
+
systemEventKinds: ["device-command"]
|
|
31560
|
+
},
|
|
31561
|
+
{
|
|
31562
|
+
name: "deviceLabel",
|
|
31563
|
+
label: "Device with type",
|
|
31564
|
+
description: "The device name with its type in parentheses. {{deviceName}} stays the bare name.",
|
|
31565
|
+
example: "Front door (Camera)",
|
|
31566
|
+
group: "system",
|
|
31567
|
+
families: ["rule"],
|
|
31568
|
+
fields: [...RULE_TEXT],
|
|
31569
|
+
kinds: ["system"],
|
|
31570
|
+
systemEventKinds: [...DEVICE_EVENTS]
|
|
31571
|
+
},
|
|
31505
31572
|
{
|
|
31506
31573
|
name: "locations",
|
|
31507
31574
|
label: "Intrusion locations",
|
|
@@ -32222,7 +32289,8 @@ var NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS = [
|
|
|
32222
32289
|
"rule-broken",
|
|
32223
32290
|
"rule-repaired",
|
|
32224
32291
|
"package-llm-silent",
|
|
32225
|
-
"package-llm-answered"
|
|
32292
|
+
"package-llm-answered",
|
|
32293
|
+
"device-command"
|
|
32226
32294
|
];
|
|
32227
32295
|
/**
|
|
32228
32296
|
* Is this descriptor held back from the SERVED catalog as a whole (D647)?
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
* model is missing it, so the fix goes in the model.
|
|
34
34
|
*/
|
|
35
35
|
import { z } from 'zod';
|
|
36
|
-
import { type HeroModel } from './hero-model.js';
|
|
36
|
+
import { type HeroFact, type HeroModel } from './hero-model.js';
|
|
37
37
|
/**
|
|
38
38
|
* The row's timed-run control. `id` is `timed-run.run` while idle and
|
|
39
39
|
* `timed-run.cancel` while armed; `duration` and `unit` are the one-tap run
|
|
@@ -312,6 +312,11 @@ export declare const HeroRowModelSchema: z.ZodObject<{
|
|
|
312
312
|
export type HeroRowModel = z.infer<typeof HeroRowModelSchema>;
|
|
313
313
|
/** The most facts a row's status line carries after its head: the line never wraps. */
|
|
314
314
|
export declare const ROW_STATUS_FACTS_MAX = 3;
|
|
315
|
+
/**
|
|
316
|
+
* A measurement that IS the headline. The row trails it so a client that paints only
|
|
317
|
+
* `trailing` still shows the reading. Power, battery and consumables stay ahead of these.
|
|
318
|
+
*/
|
|
319
|
+
export declare const ROW_READING_FACT_IDS: readonly HeroFact['id'][];
|
|
315
320
|
/**
|
|
316
321
|
* A type whose primary is a named control, not its power: a climate row is the mode
|
|
317
322
|
* (which carries "off") and the setpoint, with no power toggle.
|
|
@@ -437,6 +437,15 @@ export declare enum EventCategory {
|
|
|
437
437
|
* without filtering on `capName`.
|
|
438
438
|
*/
|
|
439
439
|
DeviceStateChanged = "device.state-changed",
|
|
440
|
+
/**
|
|
441
|
+
* A device COMMAND (a vocabulary action, D920/D983) settled in the hub's
|
|
442
|
+
* transition audit (D1022): confirmed, already in place, unconfirmed or
|
|
443
|
+
* failed. Never a device's own change. Payload: `DeviceCommandSettledEvent`
|
|
444
|
+
* (`{deviceId, action, outcome, actor, at}`, no arguments). It feeds
|
|
445
|
+
* the Notification Center `device-command` kind. Telemetry (D8): losing one
|
|
446
|
+
* costs a notification, never state; the audit row is the record.
|
|
447
|
+
*/
|
|
448
|
+
DeviceCommandSettled = "device.command-settled",
|
|
440
449
|
/**
|
|
441
450
|
* The NATIVE shadow of a cap a composition has claimed fields of moved
|
|
442
451
|
* (D663). Payload: `{ deviceId, capName, native }` — what the provider
|
package/dist/enums.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_event_category = require("./event-category-
|
|
2
|
+
const require_event_category = require("./event-category-Ps2LC8dN.js");
|
|
3
3
|
//#region src/enums/event-source-type.ts
|
|
4
4
|
var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
|
|
5
5
|
EventSourceType["Addon"] = "addon";
|
package/dist/enums.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as EventCategory } from "./event-category-
|
|
1
|
+
import { t as EventCategory } from "./event-category-Dv-Gcv1f.mjs";
|
|
2
2
|
//#region src/enums/event-source-type.ts
|
|
3
3
|
var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
|
|
4
4
|
EventSourceType["Addon"] = "addon";
|
|
@@ -439,6 +439,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
439
439
|
*/
|
|
440
440
|
EventCategory["DeviceStateChanged"] = "device.state-changed";
|
|
441
441
|
/**
|
|
442
|
+
* A device COMMAND (a vocabulary action, D920/D983) settled in the hub's
|
|
443
|
+
* transition audit (D1022): confirmed, already in place, unconfirmed or
|
|
444
|
+
* failed. Never a device's own change. Payload: `DeviceCommandSettledEvent`
|
|
445
|
+
* (`{deviceId, action, outcome, actor, at}`, no arguments). It feeds
|
|
446
|
+
* the Notification Center `device-command` kind. Telemetry (D8): losing one
|
|
447
|
+
* costs a notification, never state; the audit row is the record.
|
|
448
|
+
*/
|
|
449
|
+
EventCategory["DeviceCommandSettled"] = "device.command-settled";
|
|
450
|
+
/**
|
|
442
451
|
* The NATIVE shadow of a cap a composition has claimed fields of moved
|
|
443
452
|
* (D663). Payload: `{ deviceId, capName, native }` — what the provider
|
|
444
453
|
* wrote, BEFORE the owned fields are overlaid. Owner-only (D224): it is for
|
|
@@ -439,6 +439,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
439
439
|
*/
|
|
440
440
|
EventCategory["DeviceStateChanged"] = "device.state-changed";
|
|
441
441
|
/**
|
|
442
|
+
* A device COMMAND (a vocabulary action, D920/D983) settled in the hub's
|
|
443
|
+
* transition audit (D1022): confirmed, already in place, unconfirmed or
|
|
444
|
+
* failed. Never a device's own change. Payload: `DeviceCommandSettledEvent`
|
|
445
|
+
* (`{deviceId, action, outcome, actor, at}`, no arguments). It feeds
|
|
446
|
+
* the Notification Center `device-command` kind. Telemetry (D8): losing one
|
|
447
|
+
* costs a notification, never state; the audit row is the record.
|
|
448
|
+
*/
|
|
449
|
+
EventCategory["DeviceCommandSettled"] = "device.command-settled";
|
|
450
|
+
/**
|
|
442
451
|
* The NATIVE shadow of a cap a composition has claimed fields of moved
|
|
443
452
|
* (D663). Payload: `{ deviceId, capName, native }` — what the provider
|
|
444
453
|
* wrote, BEFORE the owned fields are overlaid. Owner-only (D224): it is for
|
|
@@ -4658,6 +4658,13 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
4658
4658
|
output: z.infer<typeof irTransmitterCapability.methods.send.output>;
|
|
4659
4659
|
meta: object;
|
|
4660
4660
|
}>;
|
|
4661
|
+
learn: TRPCMutationProcedure<{
|
|
4662
|
+
input: {
|
|
4663
|
+
[x: string]: unknown;
|
|
4664
|
+
} & z.input<typeof irTransmitterCapability.methods.learn.input>;
|
|
4665
|
+
output: z.infer<typeof irTransmitterCapability.methods.learn.output>;
|
|
4666
|
+
meta: object;
|
|
4667
|
+
}>;
|
|
4661
4668
|
getInfo: TRPCQueryProcedure<{
|
|
4662
4669
|
input: {
|
|
4663
4670
|
[x: string]: unknown;
|