@camstack/types 1.2.383 → 1.2.385
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +67 -3
- package/dist/addon.mjs +67 -3
- package/dist/capabilities/alerts.cap.d.ts +20 -0
- package/dist/capabilities/device-adoption.cap.d.ts +6 -2
- package/dist/capabilities/device-manager.cap.d.ts +1 -1
- package/dist/capabilities/dishwasher.cap.d.ts +368 -18
- package/dist/capabilities/index.d.ts +1 -1
- package/dist/capabilities/notification-rules.cap.d.ts +69 -0
- package/dist/capabilities/osd-manager.cap.d.ts +18 -0
- package/dist/capabilities/storage-migration.cap.d.ts +14 -0
- package/dist/client.js +88 -10
- package/dist/client.mjs +88 -10
- package/dist/enums/event-category.d.ts +10 -1
- package/dist/enums.js +1 -1
- package/dist/enums.mjs +1 -1
- package/dist/{event-category-BvOFi6PY.mjs → event-category-DOl51-Ij.mjs} +10 -1
- package/dist/{event-category-Hoe-mqbd.js → event-category-eSqkye-K.js} +10 -1
- package/dist/generated/addon-api.d.ts +49 -0
- package/dist/generated/addon-cap-facts.d.ts +1 -1
- package/dist/generated/capability-router-map.d.ts +4 -4
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +598 -39
- package/dist/index.mjs +578 -40
- package/dist/interfaces/event-bus.d.ts +2 -0
- package/dist/interfaces/relocate.d.ts +25 -0
- package/dist/notification/alert-episode.d.ts +62 -0
- package/dist/{sleep--L6qY125.js → sleep-BE7_6UnC.js} +15 -4
- package/dist/{sleep-BOjuyoPC.mjs → sleep-BxjU_fJM.mjs} +15 -4
- package/dist/utils/oauth-landing.d.ts +38 -0
- 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-BE7_6UnC.js");
|
|
3
|
+
const require_event_category = require("./event-category-eSqkye-K.js");
|
|
4
4
|
const require_composition = require("./composition-eoYYVfOp.js");
|
|
5
5
|
const require_node_color = require("./node-color.js");
|
|
6
6
|
const require_err_msg = require("./err-msg-BhVbr0NX.js");
|
|
@@ -3951,6 +3951,41 @@ var StorageCleanupJobSchema = zod.z.object({
|
|
|
3951
3951
|
error: zod.z.string().nullable()
|
|
3952
3952
|
});
|
|
3953
3953
|
var StorageCleanupStatusInputSchema = zod.z.object({ jobId: zod.z.string().optional() });
|
|
3954
|
+
/**
|
|
3955
|
+
* Start a mover only when no single-location repoint holds an overlapping
|
|
3956
|
+
* physical root. Asks BEFORE (cheap refusal, no job) and AFTER registering the
|
|
3957
|
+
* job: the repoint announces its claim and then lists movers, so a mover that
|
|
3958
|
+
* registers first is seen by it and one that registers second sees the claim —
|
|
3959
|
+
* neither side can miss the other (2026-10-20: a repoint and a relocate job
|
|
3960
|
+
* moved and deleted the same event media with no lock between them).
|
|
3961
|
+
*
|
|
3962
|
+
* Fail CLOSED: a clearance that cannot be asked refuses the start.
|
|
3963
|
+
*/
|
|
3964
|
+
async function startMoverUnderClearance(deps) {
|
|
3965
|
+
const refuse = (detail) => {
|
|
3966
|
+
throw new Error(`mover refused: ${detail}`);
|
|
3967
|
+
};
|
|
3968
|
+
const ask = async () => {
|
|
3969
|
+
try {
|
|
3970
|
+
return await deps.clearance(deps.locationIds);
|
|
3971
|
+
} catch (err) {
|
|
3972
|
+
return refuse(`the storage orchestrator could not be asked (${err instanceof Error ? err.message : String(err)})`);
|
|
3973
|
+
}
|
|
3974
|
+
};
|
|
3975
|
+
const blocked = (answer) => `a re-point of "${answer.repointLocationId ?? "a location"}" holds an overlapping storage root`;
|
|
3976
|
+
const before = await ask();
|
|
3977
|
+
if (!before.clear) return refuse(blocked(before));
|
|
3978
|
+
const jobId = deps.start();
|
|
3979
|
+
const after = await ask().catch((err) => {
|
|
3980
|
+
deps.cancel(jobId);
|
|
3981
|
+
throw err;
|
|
3982
|
+
});
|
|
3983
|
+
if (!after.clear) {
|
|
3984
|
+
deps.cancel(jobId);
|
|
3985
|
+
return refuse(blocked(after));
|
|
3986
|
+
}
|
|
3987
|
+
return jobId;
|
|
3988
|
+
}
|
|
3954
3989
|
//#endregion
|
|
3955
3990
|
//#region src/interfaces/server-analysis.ts
|
|
3956
3991
|
var SUB_DETECTION_TYPES = ["face", "plate"];
|
|
@@ -8285,7 +8320,14 @@ var AlertSeveritySchema = zod.z.enum([
|
|
|
8285
8320
|
]);
|
|
8286
8321
|
var AlertActionSchema = zod.z.object({
|
|
8287
8322
|
label: zod.z.string(),
|
|
8288
|
-
href: zod.z.string().optional()
|
|
8323
|
+
href: zod.z.string().optional(),
|
|
8324
|
+
/**
|
|
8325
|
+
* How `href` is followed. Absent / `app`: an admin-ui route (client-side).
|
|
8326
|
+
* `server`: a route the HUB serves (an addon HTTP route such as an OAuth
|
|
8327
|
+
* start) — the browser must leave the SPA with a full navigation, because
|
|
8328
|
+
* the SPA has no such route and would bounce to the home page.
|
|
8329
|
+
*/
|
|
8330
|
+
navigation: zod.z.enum(["app", "server"]).optional()
|
|
8289
8331
|
});
|
|
8290
8332
|
var AlertStatusSchema = zod.z.enum([
|
|
8291
8333
|
"active",
|
|
@@ -15962,7 +16004,11 @@ var deviceDiscoveryCapability = {
|
|
|
15962
16004
|
//#region src/capabilities/device-adoption.cap.ts
|
|
15963
16005
|
/**
|
|
15964
16006
|
* `device-adoption` — generic discovery + adoption surface,
|
|
15965
|
-
* system-scoped
|
|
16007
|
+
* system-scoped collection (one provider per integration addon), routed
|
|
16008
|
+
* by explicit `{ addonId }` on direct `deviceAdoption.*` calls — the same
|
|
16009
|
+
* pin model as `connection-test`. The admin UI keeps using
|
|
16010
|
+
* `deviceManager.adoption*` (which already threads `addonId`). The de-HA-ified
|
|
16011
|
+
* successor to `ha-discovery`:
|
|
15966
16012
|
* keyed by `integrationId` (the addon resolves integrationId → broker
|
|
15967
16013
|
* internally) rather than a connection-specific `brokerId`, and it
|
|
15968
16014
|
* REUSES the shared `DiscoveredChildDevice` candidate type from
|
|
@@ -16127,7 +16173,7 @@ var ResyncResultSchema = zod.z.object({
|
|
|
16127
16173
|
var deviceAdoptionCapability = {
|
|
16128
16174
|
name: "device-adoption",
|
|
16129
16175
|
scope: "system",
|
|
16130
|
-
mode: "
|
|
16176
|
+
mode: "collection",
|
|
16131
16177
|
status: {
|
|
16132
16178
|
schema: AdoptionStatusSchema,
|
|
16133
16179
|
kind: "poll"
|
|
@@ -37851,7 +37897,7 @@ var deviceManagerCapability = {
|
|
|
37851
37897
|
auth: "admin"
|
|
37852
37898
|
}),
|
|
37853
37899
|
/** List candidate filter chips for an integration via its device-adoption
|
|
37854
|
-
* provider — addonId-routed
|
|
37900
|
+
* provider — addonId-routed via the collection pin. */
|
|
37855
37901
|
adoptionListCandidateFilters: require_sleep.method(zod.z.object({
|
|
37856
37902
|
addonId: zod.z.string(),
|
|
37857
37903
|
integrationId: zod.z.string()
|
|
@@ -42820,6 +42866,9 @@ var NcSystemEventKindSchema = zod.z.enum([
|
|
|
42820
42866
|
"server-updated",
|
|
42821
42867
|
"export-completed",
|
|
42822
42868
|
"backup-completed",
|
|
42869
|
+
"alert-critical",
|
|
42870
|
+
"alert-error",
|
|
42871
|
+
"alert-critical-resolved",
|
|
42823
42872
|
"camera-online",
|
|
42824
42873
|
"camera-offline",
|
|
42825
42874
|
"camera-disabled",
|
|
@@ -44462,6 +44511,18 @@ var NC_CONDITION_CATALOG = [
|
|
|
44462
44511
|
value: "backup-completed",
|
|
44463
44512
|
label: "Backup completed"
|
|
44464
44513
|
},
|
|
44514
|
+
{
|
|
44515
|
+
value: "alert-critical",
|
|
44516
|
+
label: "Critical alert raised"
|
|
44517
|
+
},
|
|
44518
|
+
{
|
|
44519
|
+
value: "alert-error",
|
|
44520
|
+
label: "Error alert raised"
|
|
44521
|
+
},
|
|
44522
|
+
{
|
|
44523
|
+
value: "alert-critical-resolved",
|
|
44524
|
+
label: "Critical alert resolved"
|
|
44525
|
+
},
|
|
44465
44526
|
{
|
|
44466
44527
|
value: "alarm-arm-refused",
|
|
44467
44528
|
label: "Alarm arm refused"
|
|
@@ -55483,6 +55544,18 @@ var storageMigrationCapability = {
|
|
|
55483
55544
|
*/
|
|
55484
55545
|
movers: require_sleep.method(zod.z.object({}), zod.z.array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }),
|
|
55485
55546
|
/**
|
|
55547
|
+
* May a mover that touches these locations run NOW? One claim per physical
|
|
55548
|
+
* root is owned by the storage orchestrator: a single-location repoint holds
|
|
55549
|
+
* it while it carries its subtree, and a mover (`relocateMedia`,
|
|
55550
|
+
* `relocateFootage`, a migration move) asks here AFTER registering its job and
|
|
55551
|
+
* cancels itself on `clear: false`. The repoint, in turn, refuses while a
|
|
55552
|
+
* registered mover touches its root. Asked, never polled (D3).
|
|
55553
|
+
*/
|
|
55554
|
+
moverClearance: require_sleep.method(zod.z.object({ locationIds: zod.z.array(zod.z.string()).readonly() }), zod.z.object({
|
|
55555
|
+
clear: zod.z.boolean(),
|
|
55556
|
+
repointLocationId: zod.z.string().optional()
|
|
55557
|
+
}), { auth: "admin" }),
|
|
55558
|
+
/**
|
|
55486
55559
|
* What each class's SOURCE still holds, from the archive — never from the
|
|
55487
55560
|
* resident index (D295). Only classes with something left (or something
|
|
55488
55561
|
* unknown) are listed, so an empty list means there is nothing to drain and
|
|
@@ -61218,6 +61291,11 @@ onStatusChanged: { data: zod.z.object({
|
|
|
61218
61291
|
*
|
|
61219
61292
|
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
61220
61293
|
* provider refreshes the slice on an interval and eagerly after commands.
|
|
61294
|
+
*
|
|
61295
|
+
* UNKNOWN IS NOT OFF. Every field the appliance reports separately is
|
|
61296
|
+
* nullable: `null` means "not known right now" (the appliance has not said,
|
|
61297
|
+
* the link is down, or the description does not carry it) and is never
|
|
61298
|
+
* rendered or exported as `false` / `0`. `availability` says why.
|
|
61221
61299
|
*/
|
|
61222
61300
|
var DishwasherStateSchema = zod.z.enum([
|
|
61223
61301
|
"idle",
|
|
@@ -61227,35 +61305,155 @@ var DishwasherStateSchema = zod.z.enum([
|
|
|
61227
61305
|
"error",
|
|
61228
61306
|
"unavailable"
|
|
61229
61307
|
]);
|
|
61308
|
+
/**
|
|
61309
|
+
* The appliance's own operation state, uncollapsed. `state` above is the coarse
|
|
61310
|
+
* view for compact surfaces; this is what the appliance said.
|
|
61311
|
+
*/
|
|
61312
|
+
var DishwasherOperationStateSchema = zod.z.enum([
|
|
61313
|
+
"Inactive",
|
|
61314
|
+
"Ready",
|
|
61315
|
+
"DelayedStart",
|
|
61316
|
+
"Run",
|
|
61317
|
+
"Pause",
|
|
61318
|
+
"ActionRequired",
|
|
61319
|
+
"Finished",
|
|
61320
|
+
"Error",
|
|
61321
|
+
"Aborting"
|
|
61322
|
+
]);
|
|
61323
|
+
/**
|
|
61324
|
+
* Why fields may be `null`:
|
|
61325
|
+
* - `available` — the link is up and the description is loaded;
|
|
61326
|
+
* - `offline` — the local link is down (values are unknown, not last-known);
|
|
61327
|
+
* - `description-missing` — the link is up but the appliance's description could not
|
|
61328
|
+
* be loaded, so its values cannot be decoded.
|
|
61329
|
+
*/
|
|
61330
|
+
var DishwasherAvailabilitySchema = zod.z.enum([
|
|
61331
|
+
"available",
|
|
61332
|
+
"offline",
|
|
61333
|
+
"description-missing"
|
|
61334
|
+
]);
|
|
61230
61335
|
var DishwasherConsumableLevelSchema = zod.z.enum([
|
|
61231
61336
|
"ok",
|
|
61232
61337
|
"low",
|
|
61233
61338
|
"empty"
|
|
61234
61339
|
]);
|
|
61235
61340
|
var DishwasherStatusSchema = zod.z.object({
|
|
61341
|
+
availability: DishwasherAvailabilitySchema,
|
|
61342
|
+
/** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
|
|
61236
61343
|
state: DishwasherStateSchema,
|
|
61237
|
-
/**
|
|
61344
|
+
/** The appliance's operation state as reported; null when not known. */
|
|
61345
|
+
operationState: DishwasherOperationStateSchema.nullable(),
|
|
61346
|
+
/** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
|
|
61238
61347
|
program: zod.z.string().nullable(),
|
|
61239
|
-
/**
|
|
61348
|
+
/** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
|
|
61349
|
+
selectedProgram: zod.z.string().nullable(),
|
|
61350
|
+
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
61240
61351
|
availablePrograms: zod.z.array(zod.z.string()),
|
|
61241
|
-
/**
|
|
61242
|
-
|
|
61352
|
+
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
61353
|
+
remainingSeconds: zod.z.number().int().nonnegative().nullable(),
|
|
61354
|
+
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
61355
|
+
delayedStartSeconds: zod.z.number().int().nonnegative().nullable(),
|
|
61243
61356
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
61244
61357
|
progressPercent: zod.z.number().min(0).max(100).nullable(),
|
|
61245
|
-
/** True when the door is reported open. */
|
|
61246
|
-
doorOpen: zod.z.boolean(),
|
|
61247
|
-
/** True when
|
|
61248
|
-
|
|
61249
|
-
/**
|
|
61250
|
-
|
|
61358
|
+
/** True when the door is reported open; null when the door state is not known. */
|
|
61359
|
+
doorOpen: zod.z.boolean().nullable(),
|
|
61360
|
+
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
61361
|
+
doorLocked: zod.z.boolean().nullable(),
|
|
61362
|
+
/** True when remote start is allowed (door closed, power on, etc.); null when not known. */
|
|
61363
|
+
remoteStartAllowed: zod.z.boolean().nullable(),
|
|
61364
|
+
/** True when the appliance accepts remote control now; null when not known. */
|
|
61365
|
+
remoteControlActive: zod.z.boolean().nullable(),
|
|
61366
|
+
/** True while somebody operates the appliance at its panel; null when not reported. */
|
|
61367
|
+
localControlActive: zod.z.boolean().nullable(),
|
|
61368
|
+
/** Main power / switched-on state; null when not known. */
|
|
61369
|
+
powerOn: zod.z.boolean().nullable(),
|
|
61370
|
+
/** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
|
|
61371
|
+
powerState: zod.z.string().nullable(),
|
|
61251
61372
|
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
61252
61373
|
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
61253
|
-
|
|
61254
|
-
|
|
61374
|
+
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
61375
|
+
halfLoad: zod.z.boolean().nullable(),
|
|
61376
|
+
hygienePlus: zod.z.boolean().nullable(),
|
|
61377
|
+
/** Extra dry option when the appliance exposes it. */
|
|
61378
|
+
extraDry: zod.z.boolean().nullable(),
|
|
61379
|
+
/** Intensive zone (lower basket) when the appliance exposes it. */
|
|
61380
|
+
intensiveZone: zod.z.boolean().nullable(),
|
|
61381
|
+
/** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
|
|
61382
|
+
varioSpeedPlus: zod.z.boolean().nullable(),
|
|
61383
|
+
/** Child lock (controls disabled on the appliance); null when not known. */
|
|
61384
|
+
childLock: zod.z.boolean().nullable(),
|
|
61385
|
+
/** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
|
|
61386
|
+
activeEvents: zod.z.array(zod.z.string()),
|
|
61387
|
+
/** Numeric error code when the appliance reports one; null otherwise. */
|
|
61255
61388
|
errorCode: zod.z.number().nullable(),
|
|
61389
|
+
/** Name of the raised alert-level event while the appliance is in error; null otherwise. */
|
|
61256
61390
|
errorLabel: zod.z.string().nullable(),
|
|
61391
|
+
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
61257
61392
|
lastFetchedAt: zod.z.number()
|
|
61258
61393
|
});
|
|
61394
|
+
var DeviceIdSchema = zod.z.number().int().nonnegative();
|
|
61395
|
+
/** A value a program option or setting can take. */
|
|
61396
|
+
var DishwasherValueSchema = zod.z.union([
|
|
61397
|
+
zod.z.boolean(),
|
|
61398
|
+
zod.z.string(),
|
|
61399
|
+
zod.z.number()
|
|
61400
|
+
]);
|
|
61401
|
+
var DishwasherAccessSchema = zod.z.enum([
|
|
61402
|
+
"none",
|
|
61403
|
+
"read",
|
|
61404
|
+
"readWrite",
|
|
61405
|
+
"writeOnly",
|
|
61406
|
+
"readStatic"
|
|
61407
|
+
]);
|
|
61408
|
+
/**
|
|
61409
|
+
* One option or setting the appliance declares, with the constraints its description
|
|
61410
|
+
* gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
|
|
61411
|
+
*/
|
|
61412
|
+
var DishwasherOptionDescriptorSchema = zod.z.object({
|
|
61413
|
+
/** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
|
|
61414
|
+
key: zod.z.string(),
|
|
61415
|
+
/** Last segment of the key, for display. */
|
|
61416
|
+
name: zod.z.string(),
|
|
61417
|
+
type: zod.z.enum([
|
|
61418
|
+
"boolean",
|
|
61419
|
+
"number",
|
|
61420
|
+
"enum",
|
|
61421
|
+
"string"
|
|
61422
|
+
]),
|
|
61423
|
+
access: DishwasherAccessSchema,
|
|
61424
|
+
/** The appliance reports this entity as currently available. */
|
|
61425
|
+
available: zod.z.boolean(),
|
|
61426
|
+
/** Unit the description declares for a number; null when it declares none. */
|
|
61427
|
+
unit: zod.z.string().nullable(),
|
|
61428
|
+
min: zod.z.number().nullable(),
|
|
61429
|
+
max: zod.z.number().nullable(),
|
|
61430
|
+
step: zod.z.number().nullable(),
|
|
61431
|
+
/** Allowed members of an enum; null for other types. */
|
|
61432
|
+
enumValues: zod.z.array(zod.z.string()).nullable(),
|
|
61433
|
+
defaultValue: DishwasherValueSchema.nullable()
|
|
61434
|
+
});
|
|
61435
|
+
var DishwasherProgramSchema = zod.z.object({
|
|
61436
|
+
/** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
|
|
61437
|
+
key: zod.z.string(),
|
|
61438
|
+
name: zod.z.string(),
|
|
61439
|
+
/** The appliance currently offers this program. */
|
|
61440
|
+
available: zod.z.boolean(),
|
|
61441
|
+
/** The options this program lists, with the program-level access / availability / default. */
|
|
61442
|
+
options: zod.z.array(DishwasherOptionDescriptorSchema)
|
|
61443
|
+
});
|
|
61444
|
+
var DishwasherOptionsSchema = zod.z.object({
|
|
61445
|
+
availability: DishwasherAvailabilitySchema,
|
|
61446
|
+
/** What the appliance can be told to do, from the commands its description declares. */
|
|
61447
|
+
supportsStart: zod.z.boolean(),
|
|
61448
|
+
supportsPause: zod.z.boolean(),
|
|
61449
|
+
supportsResume: zod.z.boolean(),
|
|
61450
|
+
supportsStop: zod.z.boolean(),
|
|
61451
|
+
supportsPower: zod.z.boolean(),
|
|
61452
|
+
/** Every program the description lists, with its options. */
|
|
61453
|
+
programs: zod.z.array(DishwasherProgramSchema),
|
|
61454
|
+
/** Every option and setting entity the description lists (programs reference these by key). */
|
|
61455
|
+
options: zod.z.array(DishwasherOptionDescriptorSchema)
|
|
61456
|
+
});
|
|
61259
61457
|
var dishwasherCapability = {
|
|
61260
61458
|
name: "dishwasher",
|
|
61261
61459
|
scope: "device",
|
|
@@ -61263,58 +61461,102 @@ var dishwasherCapability = {
|
|
|
61263
61461
|
mode: "singleton",
|
|
61264
61462
|
deviceTypes: [require_err_msg.DeviceType.Dishwasher],
|
|
61265
61463
|
methods: {
|
|
61266
|
-
|
|
61464
|
+
/**
|
|
61465
|
+
* Start a program. Without `program` the selected one starts. `options` are
|
|
61466
|
+
* option feature keys; each is checked against the program's constraints.
|
|
61467
|
+
*/
|
|
61468
|
+
start: require_sleep.method(zod.z.object({
|
|
61469
|
+
deviceId: DeviceIdSchema,
|
|
61470
|
+
program: zod.z.string().min(1).optional(),
|
|
61471
|
+
options: zod.z.record(zod.z.string(), DishwasherValueSchema).optional()
|
|
61472
|
+
}), zod.z.void(), {
|
|
61267
61473
|
kind: "mutation",
|
|
61268
61474
|
auth: "protected"
|
|
61269
61475
|
}),
|
|
61270
|
-
pause: require_sleep.method(zod.z.object({ deviceId:
|
|
61476
|
+
pause: require_sleep.method(zod.z.object({ deviceId: DeviceIdSchema }), zod.z.void(), {
|
|
61271
61477
|
kind: "mutation",
|
|
61272
61478
|
auth: "protected"
|
|
61273
61479
|
}),
|
|
61274
|
-
|
|
61480
|
+
resume: require_sleep.method(zod.z.object({ deviceId: DeviceIdSchema }), zod.z.void(), {
|
|
61275
61481
|
kind: "mutation",
|
|
61276
61482
|
auth: "protected"
|
|
61277
61483
|
}),
|
|
61484
|
+
stop: require_sleep.method(zod.z.object({ deviceId: DeviceIdSchema }), zod.z.void(), {
|
|
61485
|
+
kind: "mutation",
|
|
61486
|
+
auth: "protected"
|
|
61487
|
+
}),
|
|
61488
|
+
/** Select (not start) a program; refused when the appliance does not offer it. */
|
|
61278
61489
|
setProgram: require_sleep.method(zod.z.object({
|
|
61279
|
-
deviceId:
|
|
61490
|
+
deviceId: DeviceIdSchema,
|
|
61280
61491
|
program: zod.z.string().min(1)
|
|
61281
61492
|
}), zod.z.void(), {
|
|
61282
61493
|
kind: "mutation",
|
|
61283
61494
|
auth: "protected"
|
|
61284
61495
|
}),
|
|
61285
61496
|
setPower: require_sleep.method(zod.z.object({
|
|
61286
|
-
deviceId:
|
|
61497
|
+
deviceId: DeviceIdSchema,
|
|
61287
61498
|
on: zod.z.boolean()
|
|
61288
61499
|
}), zod.z.void(), {
|
|
61289
61500
|
kind: "mutation",
|
|
61290
61501
|
auth: "protected"
|
|
61291
61502
|
}),
|
|
61292
61503
|
setHalfLoad: require_sleep.method(zod.z.object({
|
|
61293
|
-
deviceId:
|
|
61504
|
+
deviceId: DeviceIdSchema,
|
|
61294
61505
|
on: zod.z.boolean()
|
|
61295
61506
|
}), zod.z.void(), {
|
|
61296
61507
|
kind: "mutation",
|
|
61297
61508
|
auth: "protected"
|
|
61298
61509
|
}),
|
|
61299
61510
|
setHygienePlus: require_sleep.method(zod.z.object({
|
|
61300
|
-
deviceId:
|
|
61511
|
+
deviceId: DeviceIdSchema,
|
|
61512
|
+
on: zod.z.boolean()
|
|
61513
|
+
}), zod.z.void(), {
|
|
61514
|
+
kind: "mutation",
|
|
61515
|
+
auth: "protected"
|
|
61516
|
+
}),
|
|
61517
|
+
setExtraDry: require_sleep.method(zod.z.object({
|
|
61518
|
+
deviceId: DeviceIdSchema,
|
|
61519
|
+
on: zod.z.boolean()
|
|
61520
|
+
}), zod.z.void(), {
|
|
61521
|
+
kind: "mutation",
|
|
61522
|
+
auth: "protected"
|
|
61523
|
+
}),
|
|
61524
|
+
setIntensiveZone: require_sleep.method(zod.z.object({
|
|
61525
|
+
deviceId: DeviceIdSchema,
|
|
61526
|
+
on: zod.z.boolean()
|
|
61527
|
+
}), zod.z.void(), {
|
|
61528
|
+
kind: "mutation",
|
|
61529
|
+
auth: "protected"
|
|
61530
|
+
}),
|
|
61531
|
+
setVarioSpeedPlus: require_sleep.method(zod.z.object({
|
|
61532
|
+
deviceId: DeviceIdSchema,
|
|
61533
|
+
on: zod.z.boolean()
|
|
61534
|
+
}), zod.z.void(), {
|
|
61535
|
+
kind: "mutation",
|
|
61536
|
+
auth: "protected"
|
|
61537
|
+
}),
|
|
61538
|
+
setChildLock: require_sleep.method(zod.z.object({
|
|
61539
|
+
deviceId: DeviceIdSchema,
|
|
61301
61540
|
on: zod.z.boolean()
|
|
61302
61541
|
}), zod.z.void(), {
|
|
61303
61542
|
kind: "mutation",
|
|
61304
61543
|
auth: "protected"
|
|
61305
61544
|
}),
|
|
61545
|
+
/**
|
|
61546
|
+
* Write any option or setting by feature key. Refused when the description does
|
|
61547
|
+
* not list it, it is not writable or not available now, or the value is outside
|
|
61548
|
+
* its declared range / members.
|
|
61549
|
+
*/
|
|
61306
61550
|
setOption: require_sleep.method(zod.z.object({
|
|
61307
|
-
deviceId:
|
|
61551
|
+
deviceId: DeviceIdSchema,
|
|
61308
61552
|
key: zod.z.string().min(1),
|
|
61309
|
-
value:
|
|
61310
|
-
zod.z.boolean(),
|
|
61311
|
-
zod.z.string(),
|
|
61312
|
-
zod.z.number()
|
|
61313
|
-
])
|
|
61553
|
+
value: DishwasherValueSchema
|
|
61314
61554
|
}), zod.z.void(), {
|
|
61315
61555
|
kind: "mutation",
|
|
61316
61556
|
auth: "protected"
|
|
61317
|
-
})
|
|
61557
|
+
}),
|
|
61558
|
+
/** What this appliance can do, from its own description — the UI is derived from it. */
|
|
61559
|
+
getOptions: require_sleep.method(zod.z.object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" })
|
|
61318
61560
|
},
|
|
61319
61561
|
status: {
|
|
61320
61562
|
schema: DishwasherStatusSchema,
|
|
@@ -76658,6 +76900,7 @@ var CONTAINER_CHILD_PRIORITY = [
|
|
|
76658
76900
|
"fan",
|
|
76659
76901
|
"vacuum",
|
|
76660
76902
|
"lawn-mower",
|
|
76903
|
+
"dishwasher",
|
|
76661
76904
|
"light",
|
|
76662
76905
|
"switch",
|
|
76663
76906
|
"siren",
|
|
@@ -79797,6 +80040,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
79797
80040
|
addonId: null,
|
|
79798
80041
|
access: "view"
|
|
79799
80042
|
},
|
|
80043
|
+
"dishwasher.getOptions": {
|
|
80044
|
+
capName: "dishwasher",
|
|
80045
|
+
capScope: "device",
|
|
80046
|
+
addonId: null,
|
|
80047
|
+
access: "view"
|
|
80048
|
+
},
|
|
79800
80049
|
"dishwasher.getStatus": {
|
|
79801
80050
|
capName: "dishwasher",
|
|
79802
80051
|
capScope: "device",
|
|
@@ -79809,6 +80058,24 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
79809
80058
|
addonId: null,
|
|
79810
80059
|
access: "create"
|
|
79811
80060
|
},
|
|
80061
|
+
"dishwasher.resume": {
|
|
80062
|
+
capName: "dishwasher",
|
|
80063
|
+
capScope: "device",
|
|
80064
|
+
addonId: null,
|
|
80065
|
+
access: "create"
|
|
80066
|
+
},
|
|
80067
|
+
"dishwasher.setChildLock": {
|
|
80068
|
+
capName: "dishwasher",
|
|
80069
|
+
capScope: "device",
|
|
80070
|
+
addonId: null,
|
|
80071
|
+
access: "create"
|
|
80072
|
+
},
|
|
80073
|
+
"dishwasher.setExtraDry": {
|
|
80074
|
+
capName: "dishwasher",
|
|
80075
|
+
capScope: "device",
|
|
80076
|
+
addonId: null,
|
|
80077
|
+
access: "create"
|
|
80078
|
+
},
|
|
79812
80079
|
"dishwasher.setHalfLoad": {
|
|
79813
80080
|
capName: "dishwasher",
|
|
79814
80081
|
capScope: "device",
|
|
@@ -79821,6 +80088,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
79821
80088
|
addonId: null,
|
|
79822
80089
|
access: "create"
|
|
79823
80090
|
},
|
|
80091
|
+
"dishwasher.setIntensiveZone": {
|
|
80092
|
+
capName: "dishwasher",
|
|
80093
|
+
capScope: "device",
|
|
80094
|
+
addonId: null,
|
|
80095
|
+
access: "create"
|
|
80096
|
+
},
|
|
79824
80097
|
"dishwasher.setOption": {
|
|
79825
80098
|
capName: "dishwasher",
|
|
79826
80099
|
capScope: "device",
|
|
@@ -79839,6 +80112,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
79839
80112
|
addonId: null,
|
|
79840
80113
|
access: "create"
|
|
79841
80114
|
},
|
|
80115
|
+
"dishwasher.setVarioSpeedPlus": {
|
|
80116
|
+
capName: "dishwasher",
|
|
80117
|
+
capScope: "device",
|
|
80118
|
+
addonId: null,
|
|
80119
|
+
access: "create"
|
|
80120
|
+
},
|
|
79842
80121
|
"dishwasher.start": {
|
|
79843
80122
|
capName: "dishwasher",
|
|
79844
80123
|
capScope: "device",
|
|
@@ -84285,6 +84564,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
84285
84564
|
addonId: null,
|
|
84286
84565
|
access: "view"
|
|
84287
84566
|
},
|
|
84567
|
+
"storageMigration.moverClearance": {
|
|
84568
|
+
capName: "storage-migration",
|
|
84569
|
+
capScope: "system",
|
|
84570
|
+
addonId: null,
|
|
84571
|
+
access: "view"
|
|
84572
|
+
},
|
|
84288
84573
|
"storageMigration.movers": {
|
|
84289
84574
|
capName: "storage-migration",
|
|
84290
84575
|
capScope: "system",
|
|
@@ -89890,6 +90175,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
89890
90175
|
form: "single",
|
|
89891
90176
|
optional: false
|
|
89892
90177
|
}],
|
|
90178
|
+
"dishwasher.getOptions": [{
|
|
90179
|
+
name: "deviceId",
|
|
90180
|
+
form: "single",
|
|
90181
|
+
optional: false
|
|
90182
|
+
}],
|
|
89893
90183
|
"dishwasher.getStatus": [{
|
|
89894
90184
|
name: "deviceId",
|
|
89895
90185
|
form: "single",
|
|
@@ -89900,6 +90190,21 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
89900
90190
|
form: "single",
|
|
89901
90191
|
optional: false
|
|
89902
90192
|
}],
|
|
90193
|
+
"dishwasher.resume": [{
|
|
90194
|
+
name: "deviceId",
|
|
90195
|
+
form: "single",
|
|
90196
|
+
optional: false
|
|
90197
|
+
}],
|
|
90198
|
+
"dishwasher.setChildLock": [{
|
|
90199
|
+
name: "deviceId",
|
|
90200
|
+
form: "single",
|
|
90201
|
+
optional: false
|
|
90202
|
+
}],
|
|
90203
|
+
"dishwasher.setExtraDry": [{
|
|
90204
|
+
name: "deviceId",
|
|
90205
|
+
form: "single",
|
|
90206
|
+
optional: false
|
|
90207
|
+
}],
|
|
89903
90208
|
"dishwasher.setHalfLoad": [{
|
|
89904
90209
|
name: "deviceId",
|
|
89905
90210
|
form: "single",
|
|
@@ -89910,6 +90215,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
89910
90215
|
form: "single",
|
|
89911
90216
|
optional: false
|
|
89912
90217
|
}],
|
|
90218
|
+
"dishwasher.setIntensiveZone": [{
|
|
90219
|
+
name: "deviceId",
|
|
90220
|
+
form: "single",
|
|
90221
|
+
optional: false
|
|
90222
|
+
}],
|
|
89913
90223
|
"dishwasher.setOption": [{
|
|
89914
90224
|
name: "deviceId",
|
|
89915
90225
|
form: "single",
|
|
@@ -89925,6 +90235,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
89925
90235
|
form: "single",
|
|
89926
90236
|
optional: false
|
|
89927
90237
|
}],
|
|
90238
|
+
"dishwasher.setVarioSpeedPlus": [{
|
|
90239
|
+
name: "deviceId",
|
|
90240
|
+
form: "single",
|
|
90241
|
+
optional: false
|
|
90242
|
+
}],
|
|
89928
90243
|
"dishwasher.start": [{
|
|
89929
90244
|
name: "deviceId",
|
|
89930
90245
|
form: "single",
|
|
@@ -93567,6 +93882,7 @@ function createSystemProxy(api) {
|
|
|
93567
93882
|
status: (input) => dispatch("storageMigration", "status", "query", input),
|
|
93568
93883
|
cancel: (input) => dispatch("storageMigration", "cancel", "mutation", input),
|
|
93569
93884
|
movers: (input) => dispatch("storageMigration", "movers", "query", input),
|
|
93885
|
+
moverClearance: (input) => dispatch("storageMigration", "moverClearance", "query", input),
|
|
93570
93886
|
residue: (input) => dispatch("storageMigration", "residue", "query", input),
|
|
93571
93887
|
drain: (input) => dispatch("storageMigration", "drain", "mutation", input),
|
|
93572
93888
|
cleanupStart: (input) => dispatch("storageMigration", "cleanupStart", "mutation", input),
|
|
@@ -94510,7 +94826,7 @@ function systemEventFilterApplies(kind, filter) {
|
|
|
94510
94826
|
switch (filter) {
|
|
94511
94827
|
case "deviceIds": return kind.startsWith("device-") || kind.startsWith("stream-") || kind === "detection-blind" || kind.startsWith("recording-") || kind === "alarm-triggered";
|
|
94512
94828
|
case "deviceTypes": return kind.startsWith("device-") || kind === "detection-blind";
|
|
94513
|
-
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-");
|
|
94829
|
+
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-");
|
|
94514
94830
|
case "packageNames": return kind.endsWith("update-available") || kind === "addon-updated" || kind === "node-updating" || kind === "server-updated";
|
|
94515
94831
|
case "consumableLowPercent": return NC_CONSUMABLE_SYSTEM_EVENT_KINDS.includes(kind);
|
|
94516
94832
|
}
|
|
@@ -94583,6 +94899,9 @@ var NC_SYSTEM_EVENT_FAMILY = {
|
|
|
94583
94899
|
"wrapper-update-available": "system",
|
|
94584
94900
|
"backup-completed": "system",
|
|
94585
94901
|
"export-completed": "system",
|
|
94902
|
+
"alert-critical": "system",
|
|
94903
|
+
"alert-error": "system",
|
|
94904
|
+
"alert-critical-resolved": "system",
|
|
94586
94905
|
"storage-location-low": "system",
|
|
94587
94906
|
"storage-location-critical": "system",
|
|
94588
94907
|
"storage-location-ok": "system",
|
|
@@ -94725,6 +95044,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
94725
95044
|
"storage-location-ok"
|
|
94726
95045
|
]
|
|
94727
95046
|
},
|
|
95047
|
+
{
|
|
95048
|
+
id: "alerts",
|
|
95049
|
+
family: "system",
|
|
95050
|
+
label: "Alerts",
|
|
95051
|
+
kinds: [
|
|
95052
|
+
"alert-critical",
|
|
95053
|
+
"alert-error",
|
|
95054
|
+
"alert-critical-resolved"
|
|
95055
|
+
]
|
|
95056
|
+
},
|
|
94728
95057
|
{
|
|
94729
95058
|
id: "alarm",
|
|
94730
95059
|
family: "alarm",
|
|
@@ -96128,6 +96457,98 @@ function sensorTransitionOffered(sensorKinds) {
|
|
|
96128
96457
|
/** What an editor tells the operator when it is about to prune the choice. */
|
|
96129
96458
|
var NC_SENSOR_TRANSITION_UNSUPPORTED_REASON = "Only a sensor that raises and clears (water, smoke, gas, CO, vibration, tamper, motion, contact) can fire on one edge. Pick only such sensor kinds, or the rule fires on every change.";
|
|
96130
96459
|
//#endregion
|
|
96460
|
+
//#region src/notification/alert-episode.ts
|
|
96461
|
+
/**
|
|
96462
|
+
* An alert EPISODE as a notification subject.
|
|
96463
|
+
*
|
|
96464
|
+
* The alert centre sends nothing of its own. A critical or error alert reaches
|
|
96465
|
+
* the operator through Notification Center system-event rules, and this file is
|
|
96466
|
+
* the one vocabulary the two sides share: the alert centre mints the episode
|
|
96467
|
+
* identity and announces its two edges on the bus (`alert.episode`), and
|
|
96468
|
+
* Notification Center derives the same identity when it RECONCILES from the
|
|
96469
|
+
* alerts store, because a bus event may be dropped (D8, D11).
|
|
96470
|
+
*
|
|
96471
|
+
* ## Episode identity
|
|
96472
|
+
*
|
|
96473
|
+
* `metadata.episodeId`, minted by the alert centre when an alert opens (new, or
|
|
96474
|
+
* re-opened after it was completed/dismissed, or its emitter changed
|
|
96475
|
+
* `metadata.episodeKey`) and kept through every re-emit while it stays open. An
|
|
96476
|
+
* alert row written before the alert centre minted ids has none: its episode is
|
|
96477
|
+
* `<id>@<createdAt>`, derived here so both sides agree.
|
|
96478
|
+
*/
|
|
96479
|
+
/** The bus payload of `EventCategory.AlertEpisode`. */
|
|
96480
|
+
var AlertEpisodePayloadSchema = zod.z.object({
|
|
96481
|
+
phase: zod.z.enum(["raised", "resolved"]),
|
|
96482
|
+
episodeId: zod.z.string().min(1),
|
|
96483
|
+
alertId: zod.z.string().min(1),
|
|
96484
|
+
severity: AlertSeveritySchema,
|
|
96485
|
+
category: zod.z.string(),
|
|
96486
|
+
title: zod.z.string(),
|
|
96487
|
+
message: zod.z.string(),
|
|
96488
|
+
sourceType: zod.z.string().optional(),
|
|
96489
|
+
sourceId: zod.z.string().optional(),
|
|
96490
|
+
nodeId: zod.z.string().optional(),
|
|
96491
|
+
/** The alert's own action link (where the operator acts on it), when it has one. */
|
|
96492
|
+
actionUrl: zod.z.string().optional(),
|
|
96493
|
+
at: zod.z.number()
|
|
96494
|
+
});
|
|
96495
|
+
/** The payload of an `alert.episode` event's `data`, or `null` when it is not one. */
|
|
96496
|
+
function parseAlertEpisodePayload(data) {
|
|
96497
|
+
const parsed = AlertEpisodePayloadSchema.safeParse(data);
|
|
96498
|
+
return parsed.success ? parsed.data : null;
|
|
96499
|
+
}
|
|
96500
|
+
/** An episode is closed once its alert is completed or dismissed. */
|
|
96501
|
+
function isAlertEpisodeOpen(status) {
|
|
96502
|
+
return status !== "completed" && status !== "dismissed";
|
|
96503
|
+
}
|
|
96504
|
+
/** Only these severities are ever announced. */
|
|
96505
|
+
function isAlertEpisodeSeverity(severity) {
|
|
96506
|
+
return severity === "critical" || severity === "error";
|
|
96507
|
+
}
|
|
96508
|
+
function alertEpisodeId(alert) {
|
|
96509
|
+
const minted = alert.metadata?.["episodeId"];
|
|
96510
|
+
return typeof minted === "string" && minted.length > 0 ? minted : `${alert.id}@${String(alert.createdAt)}`;
|
|
96511
|
+
}
|
|
96512
|
+
/** The node an alert is about, from the places emitters put it. */
|
|
96513
|
+
function alertNodeId(alert) {
|
|
96514
|
+
const direct = alert.metadata?.["nodeId"];
|
|
96515
|
+
if (typeof direct === "string") return direct;
|
|
96516
|
+
const runner = alert.metadata?.["runner"];
|
|
96517
|
+
if (typeof runner === "object" && runner !== null && "nodeId" in runner) {
|
|
96518
|
+
const id = runner.nodeId;
|
|
96519
|
+
if (typeof id === "string") return id;
|
|
96520
|
+
}
|
|
96521
|
+
return alert.source?.type === "node" ? alert.source.id : void 0;
|
|
96522
|
+
}
|
|
96523
|
+
/**
|
|
96524
|
+
* The system-event kind of an episode edge, or `null` when none is announced
|
|
96525
|
+
* (an `error` episode announces its opening only).
|
|
96526
|
+
*/
|
|
96527
|
+
function alertEpisodeKind(severity, phase) {
|
|
96528
|
+
if (severity === "critical") return phase === "raised" ? "alert-critical" : "alert-critical-resolved";
|
|
96529
|
+
if (severity === "error" && phase === "raised") return "alert-error";
|
|
96530
|
+
return null;
|
|
96531
|
+
}
|
|
96532
|
+
function alertEpisodePayload(alert, phase, at) {
|
|
96533
|
+
const nodeId = alertNodeId(alert);
|
|
96534
|
+
return {
|
|
96535
|
+
phase,
|
|
96536
|
+
episodeId: alertEpisodeId(alert),
|
|
96537
|
+
alertId: alert.id,
|
|
96538
|
+
severity: alert.severity,
|
|
96539
|
+
category: alert.category,
|
|
96540
|
+
title: alert.title,
|
|
96541
|
+
message: alert.message,
|
|
96542
|
+
...alert.source !== void 0 ? {
|
|
96543
|
+
sourceType: alert.source.type,
|
|
96544
|
+
sourceId: alert.source.id
|
|
96545
|
+
} : {},
|
|
96546
|
+
...nodeId !== void 0 ? { nodeId } : {},
|
|
96547
|
+
...alert.action?.href !== void 0 ? { actionUrl: alert.action.href } : {},
|
|
96548
|
+
at
|
|
96549
|
+
};
|
|
96550
|
+
}
|
|
96551
|
+
//#endregion
|
|
96131
96552
|
//#region src/notification/template-vars.ts
|
|
96132
96553
|
var RULE_BODY_ONLY = ["body"];
|
|
96133
96554
|
var RULE_TEXT = ["title", "body"];
|
|
@@ -96138,6 +96559,11 @@ var TANK = [
|
|
|
96138
96559
|
"device-tank-full",
|
|
96139
96560
|
"device-tank-normal"
|
|
96140
96561
|
];
|
|
96562
|
+
var ALERT_EPISODE = [
|
|
96563
|
+
"alert-critical",
|
|
96564
|
+
"alert-error",
|
|
96565
|
+
"alert-critical-resolved"
|
|
96566
|
+
];
|
|
96141
96567
|
var UPDATES = [
|
|
96142
96568
|
"addon-update-available",
|
|
96143
96569
|
"server-update-available",
|
|
@@ -96662,7 +97088,8 @@ var NC_TEMPLATE_VARS = [
|
|
|
96662
97088
|
"server-updated",
|
|
96663
97089
|
"storage-location-low",
|
|
96664
97090
|
"storage-location-critical",
|
|
96665
|
-
"storage-location-ok"
|
|
97091
|
+
"storage-location-ok",
|
|
97092
|
+
...ALERT_EPISODE
|
|
96666
97093
|
]
|
|
96667
97094
|
},
|
|
96668
97095
|
{
|
|
@@ -96684,7 +97111,8 @@ var NC_TEMPLATE_VARS = [
|
|
|
96684
97111
|
"server-updated",
|
|
96685
97112
|
"storage-location-low",
|
|
96686
97113
|
"storage-location-critical",
|
|
96687
|
-
"storage-location-ok"
|
|
97114
|
+
"storage-location-ok",
|
|
97115
|
+
...ALERT_EPISODE
|
|
96688
97116
|
]
|
|
96689
97117
|
},
|
|
96690
97118
|
{
|
|
@@ -96751,7 +97179,7 @@ var NC_TEMPLATE_VARS = [
|
|
|
96751
97179
|
families: ["rule"],
|
|
96752
97180
|
fields: [...RULE_TEXT],
|
|
96753
97181
|
kinds: ["system"],
|
|
96754
|
-
systemEventKinds: ["recording-degraded"]
|
|
97182
|
+
systemEventKinds: ["recording-degraded", ...ALERT_EPISODE]
|
|
96755
97183
|
},
|
|
96756
97184
|
{
|
|
96757
97185
|
name: "locationName",
|
|
@@ -96948,13 +97376,53 @@ var NC_TEMPLATE_VARS = [
|
|
|
96948
97376
|
},
|
|
96949
97377
|
{
|
|
96950
97378
|
name: "title",
|
|
96951
|
-
label: "Export title",
|
|
97379
|
+
label: "Export or alert title",
|
|
96952
97380
|
example: "Ingresso 08:00",
|
|
96953
97381
|
group: "system",
|
|
96954
97382
|
families: ["rule"],
|
|
96955
97383
|
fields: [...RULE_TEXT],
|
|
96956
97384
|
kinds: ["system"],
|
|
96957
|
-
systemEventKinds: ["export-completed"]
|
|
97385
|
+
systemEventKinds: ["export-completed", ...ALERT_EPISODE]
|
|
97386
|
+
},
|
|
97387
|
+
{
|
|
97388
|
+
name: "severity",
|
|
97389
|
+
label: "Alert severity",
|
|
97390
|
+
example: "critical",
|
|
97391
|
+
group: "system",
|
|
97392
|
+
families: ["rule"],
|
|
97393
|
+
fields: [...RULE_TEXT],
|
|
97394
|
+
kinds: ["system"],
|
|
97395
|
+
systemEventKinds: [...ALERT_EPISODE]
|
|
97396
|
+
},
|
|
97397
|
+
{
|
|
97398
|
+
name: "category",
|
|
97399
|
+
label: "Alert category",
|
|
97400
|
+
example: "addon.runner-failed",
|
|
97401
|
+
group: "system",
|
|
97402
|
+
families: ["rule"],
|
|
97403
|
+
fields: [...RULE_TEXT],
|
|
97404
|
+
kinds: ["system"],
|
|
97405
|
+
systemEventKinds: [...ALERT_EPISODE]
|
|
97406
|
+
},
|
|
97407
|
+
{
|
|
97408
|
+
name: "source",
|
|
97409
|
+
label: "Alert source (addon, node or runner)",
|
|
97410
|
+
example: "recorder",
|
|
97411
|
+
group: "system",
|
|
97412
|
+
families: ["rule"],
|
|
97413
|
+
fields: [...RULE_TEXT],
|
|
97414
|
+
kinds: ["system"],
|
|
97415
|
+
systemEventKinds: [...ALERT_EPISODE]
|
|
97416
|
+
},
|
|
97417
|
+
{
|
|
97418
|
+
name: "actionUrl",
|
|
97419
|
+
label: "Alert action link",
|
|
97420
|
+
example: "/system/addons",
|
|
97421
|
+
group: "system",
|
|
97422
|
+
families: ["rule"],
|
|
97423
|
+
fields: [...RULE_TEXT],
|
|
97424
|
+
kinds: ["system"],
|
|
97425
|
+
systemEventKinds: [...ALERT_EPISODE]
|
|
96958
97426
|
},
|
|
96959
97427
|
{
|
|
96960
97428
|
name: "exportId",
|
|
@@ -97165,7 +97633,10 @@ var NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS = [
|
|
|
97165
97633
|
"device-tank-full",
|
|
97166
97634
|
"device-tank-normal",
|
|
97167
97635
|
"node-restarting",
|
|
97168
|
-
"node-updating"
|
|
97636
|
+
"node-updating",
|
|
97637
|
+
"alert-critical",
|
|
97638
|
+
"alert-error",
|
|
97639
|
+
"alert-critical-resolved"
|
|
97169
97640
|
];
|
|
97170
97641
|
/**
|
|
97171
97642
|
* The catalog as `getTemplateCatalog` SERVES it: every descriptor, with the
|
|
@@ -101329,6 +101800,73 @@ function setNestedValue(obj, path, value) {
|
|
|
101329
101800
|
current[parts[parts.length - 1]] = value;
|
|
101330
101801
|
}
|
|
101331
101802
|
//#endregion
|
|
101803
|
+
//#region src/utils/oauth-landing.ts
|
|
101804
|
+
/**
|
|
101805
|
+
* Where an OAuth round-trip ends: the admin-ui completion route
|
|
101806
|
+
* (`/sso-complete`, the page every popup sign-in already lands on), with the
|
|
101807
|
+
* OUTCOME in the URL fragment.
|
|
101808
|
+
*
|
|
101809
|
+
* The outcome is a status plus a reason CODE from a closed list. It never
|
|
101810
|
+
* carries a token, a code, a client secret or a free-form error message: the
|
|
101811
|
+
* page words each code itself, and an unknown code reads as `unknown` rather
|
|
101812
|
+
* than being echoed. Fragment only, so nothing here reaches a server log.
|
|
101813
|
+
*
|
|
101814
|
+
* Pure and browser-safe.
|
|
101815
|
+
*/
|
|
101816
|
+
/** The admin-ui route the hub's OAuth completions land on (relative to its mount). */
|
|
101817
|
+
var OAUTH_LANDING_PATH = "/sso-complete";
|
|
101818
|
+
var OAUTH_LANDING_REASONS = [
|
|
101819
|
+
"access_denied",
|
|
101820
|
+
"invalid_state",
|
|
101821
|
+
"invalid_request",
|
|
101822
|
+
"unknown_broker",
|
|
101823
|
+
"not_configured",
|
|
101824
|
+
"exchange_failed",
|
|
101825
|
+
"no_refresh_token",
|
|
101826
|
+
"unavailable",
|
|
101827
|
+
"unknown"
|
|
101828
|
+
];
|
|
101829
|
+
function isOauthLandingReason(value) {
|
|
101830
|
+
return OAUTH_LANDING_REASONS.some((reason) => reason === value);
|
|
101831
|
+
}
|
|
101832
|
+
/**
|
|
101833
|
+
* The landing URL for `outcome`. `origin` is the hub address the flow already
|
|
101834
|
+
* runs on (from the `local-network` palette role, never a literal); `null`
|
|
101835
|
+
* gives a hub-relative URL.
|
|
101836
|
+
*/
|
|
101837
|
+
function oauthLandingUrl(origin, outcome) {
|
|
101838
|
+
const params = new URLSearchParams({
|
|
101839
|
+
return: "oauth",
|
|
101840
|
+
status: outcome.status
|
|
101841
|
+
});
|
|
101842
|
+
if (outcome.addonId !== void 0) params.set("addon", outcome.addonId);
|
|
101843
|
+
if (outcome.brokerId !== void 0) params.set("broker", outcome.brokerId);
|
|
101844
|
+
if (outcome.integration !== void 0) params.set("integration", outcome.integration);
|
|
101845
|
+
if (outcome.status === "error") params.set("reason", outcome.reason ?? "unknown");
|
|
101846
|
+
if (outcome.action === "disconnect") params.set("action", "disconnect");
|
|
101847
|
+
return `${origin === null ? "" : origin.replace(/\/+$/, "")}${OAUTH_LANDING_PATH}#${params.toString()}`;
|
|
101848
|
+
}
|
|
101849
|
+
/** Parse the fragment of a landing URL; `null` for anything that is not one. */
|
|
101850
|
+
function parseOauthLandingFragment(hash) {
|
|
101851
|
+
if (!hash.startsWith("#")) return null;
|
|
101852
|
+
const params = new URLSearchParams(hash.slice(1));
|
|
101853
|
+
if (params.get("return") !== "oauth") return null;
|
|
101854
|
+
const status = params.get("status");
|
|
101855
|
+
if (status !== "success" && status !== "error") return null;
|
|
101856
|
+
const addonId = params.get("addon");
|
|
101857
|
+
const brokerId = params.get("broker");
|
|
101858
|
+
const integration = params.get("integration");
|
|
101859
|
+
const reasonRaw = params.get("reason");
|
|
101860
|
+
return {
|
|
101861
|
+
status,
|
|
101862
|
+
...addonId !== null && addonId.length > 0 ? { addonId } : {},
|
|
101863
|
+
...brokerId !== null && brokerId.length > 0 ? { brokerId } : {},
|
|
101864
|
+
...integration !== null && integration.length > 0 ? { integration } : {},
|
|
101865
|
+
...status === "error" ? { reason: isOauthLandingReason(reasonRaw) ? reasonRaw : "unknown" } : {},
|
|
101866
|
+
...params.get("action") === "disconnect" ? { action: "disconnect" } : {}
|
|
101867
|
+
};
|
|
101868
|
+
}
|
|
101869
|
+
//#endregion
|
|
101332
101870
|
//#region src/utils/pool-memory-watchdog.ts
|
|
101333
101871
|
var MB = 1024 * 1024;
|
|
101334
101872
|
var DEFAULT_POOL_MEMORY_POLICY = {
|
|
@@ -102397,6 +102935,7 @@ exports.AirQualitySensorStatusSchema = AirQualitySensorStatusSchema;
|
|
|
102397
102935
|
exports.AlarmArmModeSchema = AlarmArmModeSchema;
|
|
102398
102936
|
exports.AlarmPanelStatusSchema = AlarmPanelStatusSchema;
|
|
102399
102937
|
exports.AlarmStateSchema = AlarmStateSchema;
|
|
102938
|
+
exports.AlertEpisodePayloadSchema = AlertEpisodePayloadSchema;
|
|
102400
102939
|
exports.AlertSchema = AlertSchema;
|
|
102401
102940
|
exports.AlertSeveritySchema = AlertSeveritySchema;
|
|
102402
102941
|
exports.AlertSourceSchema = AlertSourceSchema;
|
|
@@ -102875,9 +103414,16 @@ exports.DiscoveredChildDeviceSchema = DiscoveredChildDeviceSchema;
|
|
|
102875
103414
|
exports.DiscoveredChildStatusSchema = DiscoveredChildStatusSchema;
|
|
102876
103415
|
exports.DiscoveredDeviceSchema = DiscoveredDeviceSchema;
|
|
102877
103416
|
exports.DiscoveredTargetSchema = DiscoveredTargetSchema;
|
|
103417
|
+
exports.DishwasherAccessSchema = DishwasherAccessSchema;
|
|
103418
|
+
exports.DishwasherAvailabilitySchema = DishwasherAvailabilitySchema;
|
|
102878
103419
|
exports.DishwasherConsumableLevelSchema = DishwasherConsumableLevelSchema;
|
|
103420
|
+
exports.DishwasherOperationStateSchema = DishwasherOperationStateSchema;
|
|
103421
|
+
exports.DishwasherOptionDescriptorSchema = DishwasherOptionDescriptorSchema;
|
|
103422
|
+
exports.DishwasherOptionsSchema = DishwasherOptionsSchema;
|
|
103423
|
+
exports.DishwasherProgramSchema = DishwasherProgramSchema;
|
|
102879
103424
|
exports.DishwasherStateSchema = DishwasherStateSchema;
|
|
102880
103425
|
exports.DishwasherStatusSchema = DishwasherStatusSchema;
|
|
103426
|
+
exports.DishwasherValueSchema = DishwasherValueSchema;
|
|
102881
103427
|
exports.DiskReconcileJobSchema = DiskReconcileJobSchema;
|
|
102882
103428
|
exports.DisposerChain = require_sleep.DisposerChain;
|
|
102883
103429
|
exports.DoorbellPressEventSchema = DoorbellPressEventSchema;
|
|
@@ -103545,6 +104091,8 @@ exports.NotificationFormatSchema = NotificationFormatSchema;
|
|
|
103545
104091
|
exports.NotificationSchema = NotificationSchema;
|
|
103546
104092
|
exports.NotifierStatusSchema = NotifierStatusSchema;
|
|
103547
104093
|
exports.NumericSensorStatusSchema = NumericSensorStatusSchema;
|
|
104094
|
+
exports.OAUTH_LANDING_PATH = OAUTH_LANDING_PATH;
|
|
104095
|
+
exports.OAUTH_LANDING_REASONS = OAUTH_LANDING_REASONS;
|
|
103548
104096
|
exports.OPERATOR_WRITTEN_STALE_MS = OPERATOR_WRITTEN_STALE_MS;
|
|
103549
104097
|
exports.OPS_LOG_DEFAULT_LIMIT = OPS_LOG_DEFAULT_LIMIT;
|
|
103550
104098
|
exports.OPS_LOG_RING_DEFAULT_MAX = OPS_LOG_RING_DEFAULT_MAX;
|
|
@@ -104225,6 +104773,10 @@ exports.alarmDeviceSecureOnArm = alarmDeviceSecureOnArm;
|
|
|
104225
104773
|
exports.alarmPanelCapability = alarmPanelCapability;
|
|
104226
104774
|
exports.alarmPatchLanded = alarmPatchLanded;
|
|
104227
104775
|
exports.alarmProfileById = alarmProfileById;
|
|
104776
|
+
exports.alertEpisodeId = alertEpisodeId;
|
|
104777
|
+
exports.alertEpisodeKind = alertEpisodeKind;
|
|
104778
|
+
exports.alertEpisodePayload = alertEpisodePayload;
|
|
104779
|
+
exports.alertNodeId = alertNodeId;
|
|
104228
104780
|
exports.alertsCapability = alertsCapability;
|
|
104229
104781
|
exports.allDoActions = allDoActions;
|
|
104230
104782
|
exports.allowedSuppliedEffect = allowedSuppliedEffect;
|
|
@@ -104581,6 +105133,8 @@ exports.invertPresetFeature = invertPresetFeature;
|
|
|
104581
105133
|
exports.invocationFromEncodeProfile = require_composition.invocationFromEncodeProfile;
|
|
104582
105134
|
exports.isAgentOnlyPlacement = isAgentOnlyPlacement;
|
|
104583
105135
|
exports.isAlarmControllableCap = isAlarmControllableCap;
|
|
105136
|
+
exports.isAlertEpisodeOpen = isAlertEpisodeOpen;
|
|
105137
|
+
exports.isAlertEpisodeSeverity = isAlertEpisodeSeverity;
|
|
104584
105138
|
exports.isAppLinkBase = isAppLinkBase;
|
|
104585
105139
|
exports.isAppStartRefusal = isAppStartRefusal;
|
|
104586
105140
|
exports.isArrayOutputSchema = isArrayOutputSchema;
|
|
@@ -104616,6 +105170,7 @@ exports.isLabelSupplyStepId = isLabelSupplyStepId;
|
|
|
104616
105170
|
exports.isLocationEnabled = isLocationEnabled;
|
|
104617
105171
|
exports.isMediaOwnerType = isMediaOwnerType;
|
|
104618
105172
|
exports.isNode = isNode;
|
|
105173
|
+
exports.isOauthLandingReason = isOauthLandingReason;
|
|
104619
105174
|
exports.isObjectInput = isObjectInput;
|
|
104620
105175
|
exports.isOccupancyRule = isOccupancyRule;
|
|
104621
105176
|
exports.isOwnerOnlyEventCategory = require_event_category.isOwnerOnlyEventCategory;
|
|
@@ -104739,6 +105294,7 @@ exports.notificationRulesCapability = notificationRulesCapability;
|
|
|
104739
105294
|
exports.notifierCapability = notifierCapability;
|
|
104740
105295
|
exports.numericSensorCapability = numericSensorCapability;
|
|
104741
105296
|
exports.oauthIntegrationCapability = oauthIntegrationCapability;
|
|
105297
|
+
exports.oauthLandingUrl = oauthLandingUrl;
|
|
104742
105298
|
exports.objectInputDeclaresAddonId = objectInputDeclaresAddonId;
|
|
104743
105299
|
exports.objectInputDeclaresRequiredDeviceId = objectInputDeclaresRequiredDeviceId;
|
|
104744
105300
|
exports.occupancyScope = occupancyScope;
|
|
@@ -104751,6 +105307,7 @@ exports.osdManagerCapability = osdManagerCapability;
|
|
|
104751
105307
|
exports.overlayClusterStepSettings = overlayClusterStepSettings;
|
|
104752
105308
|
exports.packagePickerItems = packagePickerItems;
|
|
104753
105309
|
exports.parseAdminBase = parseAdminBase;
|
|
105310
|
+
exports.parseAlertEpisodePayload = parseAlertEpisodePayload;
|
|
104754
105311
|
exports.parseAppAuthCallback = parseAppAuthCallback;
|
|
104755
105312
|
exports.parseAppFlowRequest = parseAppFlowRequest;
|
|
104756
105313
|
exports.parseAppPageLang = parseAppPageLang;
|
|
@@ -104761,6 +105318,7 @@ exports.parseJsonArray = require_sleep.parseJsonArray;
|
|
|
104761
105318
|
exports.parseJsonObject = require_sleep.parseJsonObject;
|
|
104762
105319
|
exports.parseJsonUnknown = require_sleep.parseJsonUnknown;
|
|
104763
105320
|
exports.parseMediaOwnerKey = parseMediaOwnerKey;
|
|
105321
|
+
exports.parseOauthLandingFragment = parseOauthLandingFragment;
|
|
104764
105322
|
exports.parseOccupancyScope = parseOccupancyScope;
|
|
104765
105323
|
exports.parseProcStatus = parseProcStatus;
|
|
104766
105324
|
exports.parseProfileBrokerId = require_sleep.parseProfileBrokerId;
|
|
@@ -104963,6 +105521,7 @@ exports.smtpProviderCapability = smtpProviderCapability;
|
|
|
104963
105521
|
exports.snapshotCapability = snapshotCapability;
|
|
104964
105522
|
exports.splitTranslationRef = splitTranslationRef;
|
|
104965
105523
|
exports.ssoBridgeCapability = ssoBridgeCapability;
|
|
105524
|
+
exports.startMoverUnderClearance = startMoverUnderClearance;
|
|
104966
105525
|
exports.startReachabilityPoll = startReachabilityPoll;
|
|
104967
105526
|
exports.stateLabel = stateLabel;
|
|
104968
105527
|
exports.stateVocabularyFor = stateVocabularyFor;
|