@camstack/types 1.2.384 → 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 +51 -3
- package/dist/addon.mjs +51 -3
- package/dist/capabilities/alerts.cap.d.ts +20 -0
- package/dist/capabilities/dishwasher.cap.d.ts +352 -30
- 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 +76 -7
- package/dist/client.mjs +76 -7
- 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 +21 -0
- package/dist/generated/addon-cap-facts.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/generated/system-proxy.d.ts +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +519 -45
- package/dist/index.mjs +499 -46
- 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-REHQvLV6.js → sleep-BE7_6UnC.js} +3 -1
- package/dist/{sleep-BegKjwUu.mjs → sleep-BxjU_fJM.mjs} +3 -1
- 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",
|
|
@@ -42824,6 +42866,9 @@ var NcSystemEventKindSchema = zod.z.enum([
|
|
|
42824
42866
|
"server-updated",
|
|
42825
42867
|
"export-completed",
|
|
42826
42868
|
"backup-completed",
|
|
42869
|
+
"alert-critical",
|
|
42870
|
+
"alert-error",
|
|
42871
|
+
"alert-critical-resolved",
|
|
42827
42872
|
"camera-online",
|
|
42828
42873
|
"camera-offline",
|
|
42829
42874
|
"camera-disabled",
|
|
@@ -44466,6 +44511,18 @@ var NC_CONDITION_CATALOG = [
|
|
|
44466
44511
|
value: "backup-completed",
|
|
44467
44512
|
label: "Backup completed"
|
|
44468
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
|
+
},
|
|
44469
44526
|
{
|
|
44470
44527
|
value: "alarm-arm-refused",
|
|
44471
44528
|
label: "Alarm arm refused"
|
|
@@ -55487,6 +55544,18 @@ var storageMigrationCapability = {
|
|
|
55487
55544
|
*/
|
|
55488
55545
|
movers: require_sleep.method(zod.z.object({}), zod.z.array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }),
|
|
55489
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
|
+
/**
|
|
55490
55559
|
* What each class's SOURCE still holds, from the archive — never from the
|
|
55491
55560
|
* resident index (D295). Only classes with something left (or something
|
|
55492
55561
|
* unknown) are listed, so an empty list means there is nothing to drain and
|
|
@@ -61222,6 +61291,11 @@ onStatusChanged: { data: zod.z.object({
|
|
|
61222
61291
|
*
|
|
61223
61292
|
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
61224
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.
|
|
61225
61299
|
*/
|
|
61226
61300
|
var DishwasherStateSchema = zod.z.enum([
|
|
61227
61301
|
"idle",
|
|
@@ -61231,43 +61305,155 @@ var DishwasherStateSchema = zod.z.enum([
|
|
|
61231
61305
|
"error",
|
|
61232
61306
|
"unavailable"
|
|
61233
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
|
+
]);
|
|
61234
61335
|
var DishwasherConsumableLevelSchema = zod.z.enum([
|
|
61235
61336
|
"ok",
|
|
61236
61337
|
"low",
|
|
61237
61338
|
"empty"
|
|
61238
61339
|
]);
|
|
61239
61340
|
var DishwasherStatusSchema = zod.z.object({
|
|
61341
|
+
availability: DishwasherAvailabilitySchema,
|
|
61342
|
+
/** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
|
|
61240
61343
|
state: DishwasherStateSchema,
|
|
61241
|
-
/**
|
|
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. */
|
|
61242
61347
|
program: zod.z.string().nullable(),
|
|
61243
|
-
/**
|
|
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. */
|
|
61244
61351
|
availablePrograms: zod.z.array(zod.z.string()),
|
|
61245
|
-
/**
|
|
61246
|
-
|
|
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(),
|
|
61247
61356
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
61248
61357
|
progressPercent: zod.z.number().min(0).max(100).nullable(),
|
|
61249
|
-
/** True when the door is reported open. */
|
|
61250
|
-
doorOpen: zod.z.boolean(),
|
|
61251
|
-
/** True when
|
|
61252
|
-
|
|
61253
|
-
/**
|
|
61254
|
-
|
|
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(),
|
|
61255
61372
|
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
61256
61373
|
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
61257
|
-
|
|
61258
|
-
|
|
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(),
|
|
61259
61377
|
/** Extra dry option when the appliance exposes it. */
|
|
61260
|
-
extraDry: zod.z.boolean(),
|
|
61378
|
+
extraDry: zod.z.boolean().nullable(),
|
|
61261
61379
|
/** Intensive zone (lower basket) when the appliance exposes it. */
|
|
61262
|
-
intensiveZone: zod.z.boolean(),
|
|
61380
|
+
intensiveZone: zod.z.boolean().nullable(),
|
|
61263
61381
|
/** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
|
|
61264
|
-
varioSpeedPlus: zod.z.boolean(),
|
|
61265
|
-
/** Child lock (controls disabled on the appliance). */
|
|
61266
|
-
childLock: zod.z.boolean(),
|
|
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. */
|
|
61267
61388
|
errorCode: zod.z.number().nullable(),
|
|
61389
|
+
/** Name of the raised alert-level event while the appliance is in error; null otherwise. */
|
|
61268
61390
|
errorLabel: zod.z.string().nullable(),
|
|
61391
|
+
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
61269
61392
|
lastFetchedAt: zod.z.number()
|
|
61270
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
|
+
});
|
|
61271
61457
|
var dishwasherCapability = {
|
|
61272
61458
|
name: "dishwasher",
|
|
61273
61459
|
scope: "device",
|
|
@@ -61275,86 +61461,102 @@ var dishwasherCapability = {
|
|
|
61275
61461
|
mode: "singleton",
|
|
61276
61462
|
deviceTypes: [require_err_msg.DeviceType.Dishwasher],
|
|
61277
61463
|
methods: {
|
|
61278
|
-
|
|
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(), {
|
|
61279
61473
|
kind: "mutation",
|
|
61280
61474
|
auth: "protected"
|
|
61281
61475
|
}),
|
|
61282
|
-
pause: require_sleep.method(zod.z.object({ deviceId:
|
|
61476
|
+
pause: require_sleep.method(zod.z.object({ deviceId: DeviceIdSchema }), zod.z.void(), {
|
|
61283
61477
|
kind: "mutation",
|
|
61284
61478
|
auth: "protected"
|
|
61285
61479
|
}),
|
|
61286
|
-
|
|
61480
|
+
resume: require_sleep.method(zod.z.object({ deviceId: DeviceIdSchema }), zod.z.void(), {
|
|
61287
61481
|
kind: "mutation",
|
|
61288
61482
|
auth: "protected"
|
|
61289
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. */
|
|
61290
61489
|
setProgram: require_sleep.method(zod.z.object({
|
|
61291
|
-
deviceId:
|
|
61490
|
+
deviceId: DeviceIdSchema,
|
|
61292
61491
|
program: zod.z.string().min(1)
|
|
61293
61492
|
}), zod.z.void(), {
|
|
61294
61493
|
kind: "mutation",
|
|
61295
61494
|
auth: "protected"
|
|
61296
61495
|
}),
|
|
61297
61496
|
setPower: require_sleep.method(zod.z.object({
|
|
61298
|
-
deviceId:
|
|
61497
|
+
deviceId: DeviceIdSchema,
|
|
61299
61498
|
on: zod.z.boolean()
|
|
61300
61499
|
}), zod.z.void(), {
|
|
61301
61500
|
kind: "mutation",
|
|
61302
61501
|
auth: "protected"
|
|
61303
61502
|
}),
|
|
61304
61503
|
setHalfLoad: require_sleep.method(zod.z.object({
|
|
61305
|
-
deviceId:
|
|
61504
|
+
deviceId: DeviceIdSchema,
|
|
61306
61505
|
on: zod.z.boolean()
|
|
61307
61506
|
}), zod.z.void(), {
|
|
61308
61507
|
kind: "mutation",
|
|
61309
61508
|
auth: "protected"
|
|
61310
61509
|
}),
|
|
61311
61510
|
setHygienePlus: require_sleep.method(zod.z.object({
|
|
61312
|
-
deviceId:
|
|
61511
|
+
deviceId: DeviceIdSchema,
|
|
61313
61512
|
on: zod.z.boolean()
|
|
61314
61513
|
}), zod.z.void(), {
|
|
61315
61514
|
kind: "mutation",
|
|
61316
61515
|
auth: "protected"
|
|
61317
61516
|
}),
|
|
61318
61517
|
setExtraDry: require_sleep.method(zod.z.object({
|
|
61319
|
-
deviceId:
|
|
61518
|
+
deviceId: DeviceIdSchema,
|
|
61320
61519
|
on: zod.z.boolean()
|
|
61321
61520
|
}), zod.z.void(), {
|
|
61322
61521
|
kind: "mutation",
|
|
61323
61522
|
auth: "protected"
|
|
61324
61523
|
}),
|
|
61325
61524
|
setIntensiveZone: require_sleep.method(zod.z.object({
|
|
61326
|
-
deviceId:
|
|
61525
|
+
deviceId: DeviceIdSchema,
|
|
61327
61526
|
on: zod.z.boolean()
|
|
61328
61527
|
}), zod.z.void(), {
|
|
61329
61528
|
kind: "mutation",
|
|
61330
61529
|
auth: "protected"
|
|
61331
61530
|
}),
|
|
61332
61531
|
setVarioSpeedPlus: require_sleep.method(zod.z.object({
|
|
61333
|
-
deviceId:
|
|
61532
|
+
deviceId: DeviceIdSchema,
|
|
61334
61533
|
on: zod.z.boolean()
|
|
61335
61534
|
}), zod.z.void(), {
|
|
61336
61535
|
kind: "mutation",
|
|
61337
61536
|
auth: "protected"
|
|
61338
61537
|
}),
|
|
61339
61538
|
setChildLock: require_sleep.method(zod.z.object({
|
|
61340
|
-
deviceId:
|
|
61539
|
+
deviceId: DeviceIdSchema,
|
|
61341
61540
|
on: zod.z.boolean()
|
|
61342
61541
|
}), zod.z.void(), {
|
|
61343
61542
|
kind: "mutation",
|
|
61344
61543
|
auth: "protected"
|
|
61345
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
|
+
*/
|
|
61346
61550
|
setOption: require_sleep.method(zod.z.object({
|
|
61347
|
-
deviceId:
|
|
61551
|
+
deviceId: DeviceIdSchema,
|
|
61348
61552
|
key: zod.z.string().min(1),
|
|
61349
|
-
value:
|
|
61350
|
-
zod.z.boolean(),
|
|
61351
|
-
zod.z.string(),
|
|
61352
|
-
zod.z.number()
|
|
61353
|
-
])
|
|
61553
|
+
value: DishwasherValueSchema
|
|
61354
61554
|
}), zod.z.void(), {
|
|
61355
61555
|
kind: "mutation",
|
|
61356
61556
|
auth: "protected"
|
|
61357
|
-
})
|
|
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" })
|
|
61358
61560
|
},
|
|
61359
61561
|
status: {
|
|
61360
61562
|
schema: DishwasherStatusSchema,
|
|
@@ -79838,6 +80040,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
79838
80040
|
addonId: null,
|
|
79839
80041
|
access: "view"
|
|
79840
80042
|
},
|
|
80043
|
+
"dishwasher.getOptions": {
|
|
80044
|
+
capName: "dishwasher",
|
|
80045
|
+
capScope: "device",
|
|
80046
|
+
addonId: null,
|
|
80047
|
+
access: "view"
|
|
80048
|
+
},
|
|
79841
80049
|
"dishwasher.getStatus": {
|
|
79842
80050
|
capName: "dishwasher",
|
|
79843
80051
|
capScope: "device",
|
|
@@ -79850,6 +80058,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
79850
80058
|
addonId: null,
|
|
79851
80059
|
access: "create"
|
|
79852
80060
|
},
|
|
80061
|
+
"dishwasher.resume": {
|
|
80062
|
+
capName: "dishwasher",
|
|
80063
|
+
capScope: "device",
|
|
80064
|
+
addonId: null,
|
|
80065
|
+
access: "create"
|
|
80066
|
+
},
|
|
79853
80067
|
"dishwasher.setChildLock": {
|
|
79854
80068
|
capName: "dishwasher",
|
|
79855
80069
|
capScope: "device",
|
|
@@ -84350,6 +84564,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
84350
84564
|
addonId: null,
|
|
84351
84565
|
access: "view"
|
|
84352
84566
|
},
|
|
84567
|
+
"storageMigration.moverClearance": {
|
|
84568
|
+
capName: "storage-migration",
|
|
84569
|
+
capScope: "system",
|
|
84570
|
+
addonId: null,
|
|
84571
|
+
access: "view"
|
|
84572
|
+
},
|
|
84353
84573
|
"storageMigration.movers": {
|
|
84354
84574
|
capName: "storage-migration",
|
|
84355
84575
|
capScope: "system",
|
|
@@ -89955,6 +90175,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
89955
90175
|
form: "single",
|
|
89956
90176
|
optional: false
|
|
89957
90177
|
}],
|
|
90178
|
+
"dishwasher.getOptions": [{
|
|
90179
|
+
name: "deviceId",
|
|
90180
|
+
form: "single",
|
|
90181
|
+
optional: false
|
|
90182
|
+
}],
|
|
89958
90183
|
"dishwasher.getStatus": [{
|
|
89959
90184
|
name: "deviceId",
|
|
89960
90185
|
form: "single",
|
|
@@ -89965,6 +90190,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
89965
90190
|
form: "single",
|
|
89966
90191
|
optional: false
|
|
89967
90192
|
}],
|
|
90193
|
+
"dishwasher.resume": [{
|
|
90194
|
+
name: "deviceId",
|
|
90195
|
+
form: "single",
|
|
90196
|
+
optional: false
|
|
90197
|
+
}],
|
|
89968
90198
|
"dishwasher.setChildLock": [{
|
|
89969
90199
|
name: "deviceId",
|
|
89970
90200
|
form: "single",
|
|
@@ -93652,6 +93882,7 @@ function createSystemProxy(api) {
|
|
|
93652
93882
|
status: (input) => dispatch("storageMigration", "status", "query", input),
|
|
93653
93883
|
cancel: (input) => dispatch("storageMigration", "cancel", "mutation", input),
|
|
93654
93884
|
movers: (input) => dispatch("storageMigration", "movers", "query", input),
|
|
93885
|
+
moverClearance: (input) => dispatch("storageMigration", "moverClearance", "query", input),
|
|
93655
93886
|
residue: (input) => dispatch("storageMigration", "residue", "query", input),
|
|
93656
93887
|
drain: (input) => dispatch("storageMigration", "drain", "mutation", input),
|
|
93657
93888
|
cleanupStart: (input) => dispatch("storageMigration", "cleanupStart", "mutation", input),
|
|
@@ -94595,7 +94826,7 @@ function systemEventFilterApplies(kind, filter) {
|
|
|
94595
94826
|
switch (filter) {
|
|
94596
94827
|
case "deviceIds": return kind.startsWith("device-") || kind.startsWith("stream-") || kind === "detection-blind" || kind.startsWith("recording-") || kind === "alarm-triggered";
|
|
94597
94828
|
case "deviceTypes": return kind.startsWith("device-") || kind === "detection-blind";
|
|
94598
|
-
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-");
|
|
94599
94830
|
case "packageNames": return kind.endsWith("update-available") || kind === "addon-updated" || kind === "node-updating" || kind === "server-updated";
|
|
94600
94831
|
case "consumableLowPercent": return NC_CONSUMABLE_SYSTEM_EVENT_KINDS.includes(kind);
|
|
94601
94832
|
}
|
|
@@ -94668,6 +94899,9 @@ var NC_SYSTEM_EVENT_FAMILY = {
|
|
|
94668
94899
|
"wrapper-update-available": "system",
|
|
94669
94900
|
"backup-completed": "system",
|
|
94670
94901
|
"export-completed": "system",
|
|
94902
|
+
"alert-critical": "system",
|
|
94903
|
+
"alert-error": "system",
|
|
94904
|
+
"alert-critical-resolved": "system",
|
|
94671
94905
|
"storage-location-low": "system",
|
|
94672
94906
|
"storage-location-critical": "system",
|
|
94673
94907
|
"storage-location-ok": "system",
|
|
@@ -94810,6 +95044,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
94810
95044
|
"storage-location-ok"
|
|
94811
95045
|
]
|
|
94812
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
|
+
},
|
|
94813
95057
|
{
|
|
94814
95058
|
id: "alarm",
|
|
94815
95059
|
family: "alarm",
|
|
@@ -96213,6 +96457,98 @@ function sensorTransitionOffered(sensorKinds) {
|
|
|
96213
96457
|
/** What an editor tells the operator when it is about to prune the choice. */
|
|
96214
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.";
|
|
96215
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
|
|
96216
96552
|
//#region src/notification/template-vars.ts
|
|
96217
96553
|
var RULE_BODY_ONLY = ["body"];
|
|
96218
96554
|
var RULE_TEXT = ["title", "body"];
|
|
@@ -96223,6 +96559,11 @@ var TANK = [
|
|
|
96223
96559
|
"device-tank-full",
|
|
96224
96560
|
"device-tank-normal"
|
|
96225
96561
|
];
|
|
96562
|
+
var ALERT_EPISODE = [
|
|
96563
|
+
"alert-critical",
|
|
96564
|
+
"alert-error",
|
|
96565
|
+
"alert-critical-resolved"
|
|
96566
|
+
];
|
|
96226
96567
|
var UPDATES = [
|
|
96227
96568
|
"addon-update-available",
|
|
96228
96569
|
"server-update-available",
|
|
@@ -96747,7 +97088,8 @@ var NC_TEMPLATE_VARS = [
|
|
|
96747
97088
|
"server-updated",
|
|
96748
97089
|
"storage-location-low",
|
|
96749
97090
|
"storage-location-critical",
|
|
96750
|
-
"storage-location-ok"
|
|
97091
|
+
"storage-location-ok",
|
|
97092
|
+
...ALERT_EPISODE
|
|
96751
97093
|
]
|
|
96752
97094
|
},
|
|
96753
97095
|
{
|
|
@@ -96769,7 +97111,8 @@ var NC_TEMPLATE_VARS = [
|
|
|
96769
97111
|
"server-updated",
|
|
96770
97112
|
"storage-location-low",
|
|
96771
97113
|
"storage-location-critical",
|
|
96772
|
-
"storage-location-ok"
|
|
97114
|
+
"storage-location-ok",
|
|
97115
|
+
...ALERT_EPISODE
|
|
96773
97116
|
]
|
|
96774
97117
|
},
|
|
96775
97118
|
{
|
|
@@ -96836,7 +97179,7 @@ var NC_TEMPLATE_VARS = [
|
|
|
96836
97179
|
families: ["rule"],
|
|
96837
97180
|
fields: [...RULE_TEXT],
|
|
96838
97181
|
kinds: ["system"],
|
|
96839
|
-
systemEventKinds: ["recording-degraded"]
|
|
97182
|
+
systemEventKinds: ["recording-degraded", ...ALERT_EPISODE]
|
|
96840
97183
|
},
|
|
96841
97184
|
{
|
|
96842
97185
|
name: "locationName",
|
|
@@ -97033,13 +97376,53 @@ var NC_TEMPLATE_VARS = [
|
|
|
97033
97376
|
},
|
|
97034
97377
|
{
|
|
97035
97378
|
name: "title",
|
|
97036
|
-
label: "Export title",
|
|
97379
|
+
label: "Export or alert title",
|
|
97037
97380
|
example: "Ingresso 08:00",
|
|
97038
97381
|
group: "system",
|
|
97039
97382
|
families: ["rule"],
|
|
97040
97383
|
fields: [...RULE_TEXT],
|
|
97041
97384
|
kinds: ["system"],
|
|
97042
|
-
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]
|
|
97043
97426
|
},
|
|
97044
97427
|
{
|
|
97045
97428
|
name: "exportId",
|
|
@@ -97250,7 +97633,10 @@ var NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS = [
|
|
|
97250
97633
|
"device-tank-full",
|
|
97251
97634
|
"device-tank-normal",
|
|
97252
97635
|
"node-restarting",
|
|
97253
|
-
"node-updating"
|
|
97636
|
+
"node-updating",
|
|
97637
|
+
"alert-critical",
|
|
97638
|
+
"alert-error",
|
|
97639
|
+
"alert-critical-resolved"
|
|
97254
97640
|
];
|
|
97255
97641
|
/**
|
|
97256
97642
|
* The catalog as `getTemplateCatalog` SERVES it: every descriptor, with the
|
|
@@ -101414,6 +101800,73 @@ function setNestedValue(obj, path, value) {
|
|
|
101414
101800
|
current[parts[parts.length - 1]] = value;
|
|
101415
101801
|
}
|
|
101416
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
|
|
101417
101870
|
//#region src/utils/pool-memory-watchdog.ts
|
|
101418
101871
|
var MB = 1024 * 1024;
|
|
101419
101872
|
var DEFAULT_POOL_MEMORY_POLICY = {
|
|
@@ -102482,6 +102935,7 @@ exports.AirQualitySensorStatusSchema = AirQualitySensorStatusSchema;
|
|
|
102482
102935
|
exports.AlarmArmModeSchema = AlarmArmModeSchema;
|
|
102483
102936
|
exports.AlarmPanelStatusSchema = AlarmPanelStatusSchema;
|
|
102484
102937
|
exports.AlarmStateSchema = AlarmStateSchema;
|
|
102938
|
+
exports.AlertEpisodePayloadSchema = AlertEpisodePayloadSchema;
|
|
102485
102939
|
exports.AlertSchema = AlertSchema;
|
|
102486
102940
|
exports.AlertSeveritySchema = AlertSeveritySchema;
|
|
102487
102941
|
exports.AlertSourceSchema = AlertSourceSchema;
|
|
@@ -102960,9 +103414,16 @@ exports.DiscoveredChildDeviceSchema = DiscoveredChildDeviceSchema;
|
|
|
102960
103414
|
exports.DiscoveredChildStatusSchema = DiscoveredChildStatusSchema;
|
|
102961
103415
|
exports.DiscoveredDeviceSchema = DiscoveredDeviceSchema;
|
|
102962
103416
|
exports.DiscoveredTargetSchema = DiscoveredTargetSchema;
|
|
103417
|
+
exports.DishwasherAccessSchema = DishwasherAccessSchema;
|
|
103418
|
+
exports.DishwasherAvailabilitySchema = DishwasherAvailabilitySchema;
|
|
102963
103419
|
exports.DishwasherConsumableLevelSchema = DishwasherConsumableLevelSchema;
|
|
103420
|
+
exports.DishwasherOperationStateSchema = DishwasherOperationStateSchema;
|
|
103421
|
+
exports.DishwasherOptionDescriptorSchema = DishwasherOptionDescriptorSchema;
|
|
103422
|
+
exports.DishwasherOptionsSchema = DishwasherOptionsSchema;
|
|
103423
|
+
exports.DishwasherProgramSchema = DishwasherProgramSchema;
|
|
102964
103424
|
exports.DishwasherStateSchema = DishwasherStateSchema;
|
|
102965
103425
|
exports.DishwasherStatusSchema = DishwasherStatusSchema;
|
|
103426
|
+
exports.DishwasherValueSchema = DishwasherValueSchema;
|
|
102966
103427
|
exports.DiskReconcileJobSchema = DiskReconcileJobSchema;
|
|
102967
103428
|
exports.DisposerChain = require_sleep.DisposerChain;
|
|
102968
103429
|
exports.DoorbellPressEventSchema = DoorbellPressEventSchema;
|
|
@@ -103630,6 +104091,8 @@ exports.NotificationFormatSchema = NotificationFormatSchema;
|
|
|
103630
104091
|
exports.NotificationSchema = NotificationSchema;
|
|
103631
104092
|
exports.NotifierStatusSchema = NotifierStatusSchema;
|
|
103632
104093
|
exports.NumericSensorStatusSchema = NumericSensorStatusSchema;
|
|
104094
|
+
exports.OAUTH_LANDING_PATH = OAUTH_LANDING_PATH;
|
|
104095
|
+
exports.OAUTH_LANDING_REASONS = OAUTH_LANDING_REASONS;
|
|
103633
104096
|
exports.OPERATOR_WRITTEN_STALE_MS = OPERATOR_WRITTEN_STALE_MS;
|
|
103634
104097
|
exports.OPS_LOG_DEFAULT_LIMIT = OPS_LOG_DEFAULT_LIMIT;
|
|
103635
104098
|
exports.OPS_LOG_RING_DEFAULT_MAX = OPS_LOG_RING_DEFAULT_MAX;
|
|
@@ -104310,6 +104773,10 @@ exports.alarmDeviceSecureOnArm = alarmDeviceSecureOnArm;
|
|
|
104310
104773
|
exports.alarmPanelCapability = alarmPanelCapability;
|
|
104311
104774
|
exports.alarmPatchLanded = alarmPatchLanded;
|
|
104312
104775
|
exports.alarmProfileById = alarmProfileById;
|
|
104776
|
+
exports.alertEpisodeId = alertEpisodeId;
|
|
104777
|
+
exports.alertEpisodeKind = alertEpisodeKind;
|
|
104778
|
+
exports.alertEpisodePayload = alertEpisodePayload;
|
|
104779
|
+
exports.alertNodeId = alertNodeId;
|
|
104313
104780
|
exports.alertsCapability = alertsCapability;
|
|
104314
104781
|
exports.allDoActions = allDoActions;
|
|
104315
104782
|
exports.allowedSuppliedEffect = allowedSuppliedEffect;
|
|
@@ -104666,6 +105133,8 @@ exports.invertPresetFeature = invertPresetFeature;
|
|
|
104666
105133
|
exports.invocationFromEncodeProfile = require_composition.invocationFromEncodeProfile;
|
|
104667
105134
|
exports.isAgentOnlyPlacement = isAgentOnlyPlacement;
|
|
104668
105135
|
exports.isAlarmControllableCap = isAlarmControllableCap;
|
|
105136
|
+
exports.isAlertEpisodeOpen = isAlertEpisodeOpen;
|
|
105137
|
+
exports.isAlertEpisodeSeverity = isAlertEpisodeSeverity;
|
|
104669
105138
|
exports.isAppLinkBase = isAppLinkBase;
|
|
104670
105139
|
exports.isAppStartRefusal = isAppStartRefusal;
|
|
104671
105140
|
exports.isArrayOutputSchema = isArrayOutputSchema;
|
|
@@ -104701,6 +105170,7 @@ exports.isLabelSupplyStepId = isLabelSupplyStepId;
|
|
|
104701
105170
|
exports.isLocationEnabled = isLocationEnabled;
|
|
104702
105171
|
exports.isMediaOwnerType = isMediaOwnerType;
|
|
104703
105172
|
exports.isNode = isNode;
|
|
105173
|
+
exports.isOauthLandingReason = isOauthLandingReason;
|
|
104704
105174
|
exports.isObjectInput = isObjectInput;
|
|
104705
105175
|
exports.isOccupancyRule = isOccupancyRule;
|
|
104706
105176
|
exports.isOwnerOnlyEventCategory = require_event_category.isOwnerOnlyEventCategory;
|
|
@@ -104824,6 +105294,7 @@ exports.notificationRulesCapability = notificationRulesCapability;
|
|
|
104824
105294
|
exports.notifierCapability = notifierCapability;
|
|
104825
105295
|
exports.numericSensorCapability = numericSensorCapability;
|
|
104826
105296
|
exports.oauthIntegrationCapability = oauthIntegrationCapability;
|
|
105297
|
+
exports.oauthLandingUrl = oauthLandingUrl;
|
|
104827
105298
|
exports.objectInputDeclaresAddonId = objectInputDeclaresAddonId;
|
|
104828
105299
|
exports.objectInputDeclaresRequiredDeviceId = objectInputDeclaresRequiredDeviceId;
|
|
104829
105300
|
exports.occupancyScope = occupancyScope;
|
|
@@ -104836,6 +105307,7 @@ exports.osdManagerCapability = osdManagerCapability;
|
|
|
104836
105307
|
exports.overlayClusterStepSettings = overlayClusterStepSettings;
|
|
104837
105308
|
exports.packagePickerItems = packagePickerItems;
|
|
104838
105309
|
exports.parseAdminBase = parseAdminBase;
|
|
105310
|
+
exports.parseAlertEpisodePayload = parseAlertEpisodePayload;
|
|
104839
105311
|
exports.parseAppAuthCallback = parseAppAuthCallback;
|
|
104840
105312
|
exports.parseAppFlowRequest = parseAppFlowRequest;
|
|
104841
105313
|
exports.parseAppPageLang = parseAppPageLang;
|
|
@@ -104846,6 +105318,7 @@ exports.parseJsonArray = require_sleep.parseJsonArray;
|
|
|
104846
105318
|
exports.parseJsonObject = require_sleep.parseJsonObject;
|
|
104847
105319
|
exports.parseJsonUnknown = require_sleep.parseJsonUnknown;
|
|
104848
105320
|
exports.parseMediaOwnerKey = parseMediaOwnerKey;
|
|
105321
|
+
exports.parseOauthLandingFragment = parseOauthLandingFragment;
|
|
104849
105322
|
exports.parseOccupancyScope = parseOccupancyScope;
|
|
104850
105323
|
exports.parseProcStatus = parseProcStatus;
|
|
104851
105324
|
exports.parseProfileBrokerId = require_sleep.parseProfileBrokerId;
|
|
@@ -105048,6 +105521,7 @@ exports.smtpProviderCapability = smtpProviderCapability;
|
|
|
105048
105521
|
exports.snapshotCapability = snapshotCapability;
|
|
105049
105522
|
exports.splitTranslationRef = splitTranslationRef;
|
|
105050
105523
|
exports.ssoBridgeCapability = ssoBridgeCapability;
|
|
105524
|
+
exports.startMoverUnderClearance = startMoverUnderClearance;
|
|
105051
105525
|
exports.startReachabilityPoll = startReachabilityPoll;
|
|
105052
105526
|
exports.stateLabel = stateLabel;
|
|
105053
105527
|
exports.stateVocabularyFor = stateVocabularyFor;
|