@camstack/addon-provider-onvif 1.2.130 → 1.2.132
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 +480 -240
- package/dist/addon.mjs +480 -240
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
//#region \0rolldown/runtime.js
|
|
3
3
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
4
4
|
//#endregion
|
|
5
|
-
//#region ../types/dist/event-category-
|
|
5
|
+
//#region ../types/dist/event-category-DOl51-Ij.mjs
|
|
6
6
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
7
7
|
EventCategory["SystemBoot"] = "system.boot";
|
|
8
8
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -81,9 +81,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
81
81
|
/**
|
|
82
82
|
* The node's one-shot runner boot check (D877): planned runners against the
|
|
83
83
|
* process service, `degraded` when any is failed, refused or missing. The
|
|
84
|
-
* alert centre turns it into one
|
|
84
|
+
* alert centre turns it into one critical alert.
|
|
85
85
|
*/
|
|
86
86
|
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
87
|
+
/**
|
|
88
|
+
* An alert EPISODE opened or closed, emitted by the alert centre for alerts
|
|
89
|
+
* of severity `critical` or `error` (`AlertEpisodePayload`). The alert
|
|
90
|
+
* centre sends no notification of its own: Notification Center turns this
|
|
91
|
+
* into the `alert-critical` / `alert-error` / `alert-critical-resolved`
|
|
92
|
+
* system-event kinds, and reconciles from the alerts store because a bus
|
|
93
|
+
* event may be dropped (D8, D11).
|
|
94
|
+
*/
|
|
95
|
+
EventCategory["AlertEpisode"] = "alert.episode";
|
|
87
96
|
EventCategory["AddonError"] = "addon.error";
|
|
88
97
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
89
98
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -5408,7 +5417,7 @@ var ZodIssueCode = {
|
|
|
5408
5417
|
var ZodFirstPartyTypeKind;
|
|
5409
5418
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5410
5419
|
//#endregion
|
|
5411
|
-
//#region ../types/dist/sleep-
|
|
5420
|
+
//#region ../types/dist/sleep-BxjU_fJM.mjs
|
|
5412
5421
|
/**
|
|
5413
5422
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5414
5423
|
* window to float samples (D455).
|
|
@@ -7790,6 +7799,12 @@ function normalizeAddonInitResult(result) {
|
|
|
7790
7799
|
if (Array.isArray(result)) return { providers: result };
|
|
7791
7800
|
return result;
|
|
7792
7801
|
}
|
|
7802
|
+
/**
|
|
7803
|
+
* The share-view scope kinds a `csv_*` share token can carry. The hub mints
|
|
7804
|
+
* and validates them (`share-token.service.ts` builds its enum from this
|
|
7805
|
+
* list); a data plane names the kinds it ACCEPTS in `share`.
|
|
7806
|
+
*/
|
|
7807
|
+
var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
|
|
7793
7808
|
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
7794
7809
|
var PeerBytesTicketSchema = object({
|
|
7795
7810
|
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
@@ -12384,6 +12399,229 @@ var ConvertResultSchema = object({
|
|
|
12384
12399
|
files: array(string()).readonly()
|
|
12385
12400
|
})).readonly()
|
|
12386
12401
|
});
|
|
12402
|
+
/**
|
|
12403
|
+
* Zod schemas for persisted record types.
|
|
12404
|
+
*
|
|
12405
|
+
* These schemas serve as the single source of truth for types that are
|
|
12406
|
+
* stored in the settings-store backend and retrieved via tRPC. They
|
|
12407
|
+
* replace the manual TypeScript interfaces with schema-derived types,
|
|
12408
|
+
* enabling runtime validation when reading from the backend.
|
|
12409
|
+
*
|
|
12410
|
+
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
12411
|
+
* keeps the original name for backward compatibility.
|
|
12412
|
+
*/
|
|
12413
|
+
/**
|
|
12414
|
+
* Auth model (v2 — 2026-05-12 caps-only):
|
|
12415
|
+
*
|
|
12416
|
+
* Two principals:
|
|
12417
|
+
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
12418
|
+
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
12419
|
+
*
|
|
12420
|
+
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
12421
|
+
* `super_admin` — collapsed onto the single boolean because every
|
|
12422
|
+
* non-admin caller is governed by the same scope-check rules; the
|
|
12423
|
+
* distinction was only ever used to route role-specific procedures
|
|
12424
|
+
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
12425
|
+
* with `isAdmin: false` + an explicit scope list.
|
|
12426
|
+
*/
|
|
12427
|
+
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
12428
|
+
var MethodAccessSchema = _enum([
|
|
12429
|
+
"view",
|
|
12430
|
+
"create",
|
|
12431
|
+
"delete"
|
|
12432
|
+
]);
|
|
12433
|
+
/**
|
|
12434
|
+
* A single scope grant. Three forms — checked in matcher with OR
|
|
12435
|
+
* semantics; the first match decides whether the call passes:
|
|
12436
|
+
*
|
|
12437
|
+
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
12438
|
+
* cap with the matching `scope` declaration. New caps inherit grants
|
|
12439
|
+
* automatically — adding a device cap to the codebase makes it
|
|
12440
|
+
* reachable to every user with `category:device [...]` without a
|
|
12441
|
+
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
12442
|
+
*
|
|
12443
|
+
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
12444
|
+
* useful when an integration needs to interact with one specific
|
|
12445
|
+
* addon's surface regardless of how many caps it exports.
|
|
12446
|
+
*
|
|
12447
|
+
* - `capability` — the most precise form. Single cap name. Use for
|
|
12448
|
+
* integration tokens where you want to grant `addons.installPackage`
|
|
12449
|
+
* and nothing else.
|
|
12450
|
+
*
|
|
12451
|
+
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
12452
|
+
* "give me everything" escape; there is no wildcard scope.
|
|
12453
|
+
*/
|
|
12454
|
+
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
12455
|
+
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
12456
|
+
var CapScopeSchema = _enum(["device", "system"]);
|
|
12457
|
+
/**
|
|
12458
|
+
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
12459
|
+
*
|
|
12460
|
+
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
12461
|
+
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
12462
|
+
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
12463
|
+
* AFTER the grant was minted — no re-grant, no re-login.
|
|
12464
|
+
*
|
|
12465
|
+
* - `all` — every device in the deployment. The broad viewer/operator
|
|
12466
|
+
* lever without a `category` grant (a `category` grant also covers device
|
|
12467
|
+
* caps that carry no deviceId; `all` is specifically the device set).
|
|
12468
|
+
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
12469
|
+
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
12470
|
+
* is NOT covered until the grant is edited.
|
|
12471
|
+
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
12472
|
+
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
12473
|
+
* re-resolves on the next request.
|
|
12474
|
+
* - `locations` — every device whose operator-assigned `location` label is
|
|
12475
|
+
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
12476
|
+
* null/unset location matches NO `locations` selector.
|
|
12477
|
+
*/
|
|
12478
|
+
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
12479
|
+
object({ kind: literal("all") }),
|
|
12480
|
+
object({
|
|
12481
|
+
kind: literal("ids"),
|
|
12482
|
+
ids: array(number().int()).min(1)
|
|
12483
|
+
}),
|
|
12484
|
+
object({
|
|
12485
|
+
kind: literal("types"),
|
|
12486
|
+
types: array(_enum(DeviceType)).min(1)
|
|
12487
|
+
}),
|
|
12488
|
+
object({
|
|
12489
|
+
kind: literal("locations"),
|
|
12490
|
+
locations: array(string().min(1)).min(1)
|
|
12491
|
+
})
|
|
12492
|
+
]);
|
|
12493
|
+
var DeviceTokenScopeSchema = object({
|
|
12494
|
+
type: literal("device"),
|
|
12495
|
+
/** The device SET this grant covers — resolved against the live fleet. */
|
|
12496
|
+
selector: DeviceSelectorSchema,
|
|
12497
|
+
access: array(MethodAccessSchema).min(1),
|
|
12498
|
+
/**
|
|
12499
|
+
* Whether a grant on a PARENT device transparently covers its accessory
|
|
12500
|
+
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
12501
|
+
* Direction is parent → children ONLY.
|
|
12502
|
+
*
|
|
12503
|
+
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
12504
|
+
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
12505
|
+
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
12506
|
+
* operator must grant on the child, not inherit from the parent). Set it
|
|
12507
|
+
* explicitly to override that default per grant.
|
|
12508
|
+
*/
|
|
12509
|
+
includeLinked: boolean().optional()
|
|
12510
|
+
});
|
|
12511
|
+
/**
|
|
12512
|
+
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
12513
|
+
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
12514
|
+
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
12515
|
+
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
12516
|
+
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
12517
|
+
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
12518
|
+
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
12519
|
+
* migration covers both without a flag day. No cast — the raw object is read
|
|
12520
|
+
* through `Reflect.get` (its static type is `unknown`).
|
|
12521
|
+
*/
|
|
12522
|
+
function migrateLegacyTokenScope(raw) {
|
|
12523
|
+
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
12524
|
+
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
12525
|
+
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
12526
|
+
const targets = Reflect.get(raw, "targets");
|
|
12527
|
+
if (!Array.isArray(targets)) return raw;
|
|
12528
|
+
return {
|
|
12529
|
+
type: "device",
|
|
12530
|
+
selector: {
|
|
12531
|
+
kind: "ids",
|
|
12532
|
+
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
12533
|
+
},
|
|
12534
|
+
access: Reflect.get(raw, "access")
|
|
12535
|
+
};
|
|
12536
|
+
}
|
|
12537
|
+
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
12538
|
+
object({
|
|
12539
|
+
type: literal("category"),
|
|
12540
|
+
target: CapScopeSchema,
|
|
12541
|
+
access: array(MethodAccessSchema).min(1)
|
|
12542
|
+
}),
|
|
12543
|
+
object({
|
|
12544
|
+
type: literal("capability"),
|
|
12545
|
+
target: string(),
|
|
12546
|
+
access: array(MethodAccessSchema).min(1)
|
|
12547
|
+
}),
|
|
12548
|
+
object({
|
|
12549
|
+
type: literal("addon"),
|
|
12550
|
+
target: string(),
|
|
12551
|
+
access: array(MethodAccessSchema).min(1)
|
|
12552
|
+
}),
|
|
12553
|
+
DeviceTokenScopeSchema
|
|
12554
|
+
]));
|
|
12555
|
+
object({
|
|
12556
|
+
id: string(),
|
|
12557
|
+
username: string(),
|
|
12558
|
+
passwordHash: string(),
|
|
12559
|
+
/**
|
|
12560
|
+
* Admin bypass. When true, the middleware skips the scope-access
|
|
12561
|
+
* check entirely. There is no other axis of privilege; the legacy
|
|
12562
|
+
* role enum collapsed onto this boolean in v2.
|
|
12563
|
+
*/
|
|
12564
|
+
isAdmin: boolean().default(false),
|
|
12565
|
+
allowedProviders: AllowedProviderSchema,
|
|
12566
|
+
allowedDevices: AllowedDevicesSchema,
|
|
12567
|
+
/**
|
|
12568
|
+
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
12569
|
+
* ignored. Non-admins without scopes are locked out of every
|
|
12570
|
+
* protected call.
|
|
12571
|
+
*/
|
|
12572
|
+
scopes: array(TokenScopeSchema).default([]),
|
|
12573
|
+
createdAt: number(),
|
|
12574
|
+
updatedAt: number()
|
|
12575
|
+
});
|
|
12576
|
+
object({
|
|
12577
|
+
id: string(),
|
|
12578
|
+
label: string(),
|
|
12579
|
+
isAdmin: boolean().default(false),
|
|
12580
|
+
allowedProviders: AllowedProviderSchema,
|
|
12581
|
+
allowedDevices: AllowedDevicesSchema,
|
|
12582
|
+
tokenHash: string(),
|
|
12583
|
+
tokenPrefix: string(),
|
|
12584
|
+
createdAt: number(),
|
|
12585
|
+
lastUsedAt: number().optional()
|
|
12586
|
+
});
|
|
12587
|
+
object({
|
|
12588
|
+
id: string(),
|
|
12589
|
+
userId: string(),
|
|
12590
|
+
name: string(),
|
|
12591
|
+
tokenHash: string(),
|
|
12592
|
+
tokenPrefix: string(),
|
|
12593
|
+
scopes: array(TokenScopeSchema),
|
|
12594
|
+
expiresAt: number().nullish(),
|
|
12595
|
+
lastUsedAt: number().nullish(),
|
|
12596
|
+
createdAt: number()
|
|
12597
|
+
});
|
|
12598
|
+
/** What a share-view grant lets its holder see. */
|
|
12599
|
+
var ShareViewGrantSchema = object({
|
|
12600
|
+
kind: _enum(SHARE_VIEW_KINDS),
|
|
12601
|
+
deviceIds: array(number().int().nonnegative()).min(1).max(64),
|
|
12602
|
+
/** Talk-back, opt-in at mint time; absent means off. */
|
|
12603
|
+
talk: boolean().optional()
|
|
12604
|
+
});
|
|
12605
|
+
var ShareViewScopeSchema = object({
|
|
12606
|
+
type: literal("share-view"),
|
|
12607
|
+
grant: ShareViewGrantSchema
|
|
12608
|
+
});
|
|
12609
|
+
var AddonRoutesScopeSchema = object({
|
|
12610
|
+
type: literal("addon-routes"),
|
|
12611
|
+
access: array(MethodAccessSchema).min(1)
|
|
12612
|
+
});
|
|
12613
|
+
var CredentialScopeSchema = union([
|
|
12614
|
+
literal("*"),
|
|
12615
|
+
ShareViewScopeSchema,
|
|
12616
|
+
AddonRoutesScopeSchema,
|
|
12617
|
+
TokenScopeSchema
|
|
12618
|
+
]);
|
|
12619
|
+
object({
|
|
12620
|
+
kind: literal("credential"),
|
|
12621
|
+
sub: string().min(1),
|
|
12622
|
+
jti: string().min(16),
|
|
12623
|
+
scopes: array(CredentialScopeSchema).min(1)
|
|
12624
|
+
});
|
|
12387
12625
|
_enum(["new-session", "step-up"]);
|
|
12388
12626
|
/** The languages the hub's app landing pages are written in (D858). */
|
|
12389
12627
|
var AppPageLangSchema = _enum(["en", "it"]);
|
|
@@ -13100,7 +13338,14 @@ var AlertSeveritySchema = _enum([
|
|
|
13100
13338
|
]);
|
|
13101
13339
|
var AlertActionSchema = object({
|
|
13102
13340
|
label: string(),
|
|
13103
|
-
href: string().optional()
|
|
13341
|
+
href: string().optional(),
|
|
13342
|
+
/**
|
|
13343
|
+
* How `href` is followed. Absent / `app`: an admin-ui route (client-side).
|
|
13344
|
+
* `server`: a route the HUB serves (an addon HTTP route such as an OAuth
|
|
13345
|
+
* start) — the browser must leave the SPA with a full navigation, because
|
|
13346
|
+
* the SPA has no such route and would bounce to the home page.
|
|
13347
|
+
*/
|
|
13348
|
+
navigation: _enum(["app", "server"]).optional()
|
|
13104
13349
|
});
|
|
13105
13350
|
var AlertStatusSchema = _enum([
|
|
13106
13351
|
"active",
|
|
@@ -41670,6 +41915,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
41670
41915
|
"server-updated",
|
|
41671
41916
|
"export-completed",
|
|
41672
41917
|
"backup-completed",
|
|
41918
|
+
"alert-critical",
|
|
41919
|
+
"alert-error",
|
|
41920
|
+
"alert-critical-resolved",
|
|
41673
41921
|
"camera-online",
|
|
41674
41922
|
"camera-offline",
|
|
41675
41923
|
"camera-disabled",
|
|
@@ -43705,202 +43953,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
43705
43953
|
auth: "admin"
|
|
43706
43954
|
}), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
|
|
43707
43955
|
/**
|
|
43708
|
-
* Zod schemas for persisted record types.
|
|
43709
|
-
*
|
|
43710
|
-
* These schemas serve as the single source of truth for types that are
|
|
43711
|
-
* stored in the settings-store backend and retrieved via tRPC. They
|
|
43712
|
-
* replace the manual TypeScript interfaces with schema-derived types,
|
|
43713
|
-
* enabling runtime validation when reading from the backend.
|
|
43714
|
-
*
|
|
43715
|
-
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
43716
|
-
* keeps the original name for backward compatibility.
|
|
43717
|
-
*/
|
|
43718
|
-
/**
|
|
43719
|
-
* Auth model (v2 — 2026-05-12 caps-only):
|
|
43720
|
-
*
|
|
43721
|
-
* Two principals:
|
|
43722
|
-
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
43723
|
-
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
43724
|
-
*
|
|
43725
|
-
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
43726
|
-
* `super_admin` — collapsed onto the single boolean because every
|
|
43727
|
-
* non-admin caller is governed by the same scope-check rules; the
|
|
43728
|
-
* distinction was only ever used to route role-specific procedures
|
|
43729
|
-
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
43730
|
-
* with `isAdmin: false` + an explicit scope list.
|
|
43731
|
-
*/
|
|
43732
|
-
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
43733
|
-
var MethodAccessSchema = _enum([
|
|
43734
|
-
"view",
|
|
43735
|
-
"create",
|
|
43736
|
-
"delete"
|
|
43737
|
-
]);
|
|
43738
|
-
/**
|
|
43739
|
-
* A single scope grant. Three forms — checked in matcher with OR
|
|
43740
|
-
* semantics; the first match decides whether the call passes:
|
|
43741
|
-
*
|
|
43742
|
-
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
43743
|
-
* cap with the matching `scope` declaration. New caps inherit grants
|
|
43744
|
-
* automatically — adding a device cap to the codebase makes it
|
|
43745
|
-
* reachable to every user with `category:device [...]` without a
|
|
43746
|
-
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
43747
|
-
*
|
|
43748
|
-
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
43749
|
-
* useful when an integration needs to interact with one specific
|
|
43750
|
-
* addon's surface regardless of how many caps it exports.
|
|
43751
|
-
*
|
|
43752
|
-
* - `capability` — the most precise form. Single cap name. Use for
|
|
43753
|
-
* integration tokens where you want to grant `addons.installPackage`
|
|
43754
|
-
* and nothing else.
|
|
43755
|
-
*
|
|
43756
|
-
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
43757
|
-
* "give me everything" escape; there is no wildcard scope.
|
|
43758
|
-
*/
|
|
43759
|
-
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
43760
|
-
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
43761
|
-
var CapScopeSchema = _enum(["device", "system"]);
|
|
43762
|
-
/**
|
|
43763
|
-
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
43764
|
-
*
|
|
43765
|
-
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
43766
|
-
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
43767
|
-
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
43768
|
-
* AFTER the grant was minted — no re-grant, no re-login.
|
|
43769
|
-
*
|
|
43770
|
-
* - `all` — every device in the deployment. The broad viewer/operator
|
|
43771
|
-
* lever without a `category` grant (a `category` grant also covers device
|
|
43772
|
-
* caps that carry no deviceId; `all` is specifically the device set).
|
|
43773
|
-
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
43774
|
-
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
43775
|
-
* is NOT covered until the grant is edited.
|
|
43776
|
-
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
43777
|
-
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
43778
|
-
* re-resolves on the next request.
|
|
43779
|
-
* - `locations` — every device whose operator-assigned `location` label is
|
|
43780
|
-
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
43781
|
-
* null/unset location matches NO `locations` selector.
|
|
43782
|
-
*/
|
|
43783
|
-
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
43784
|
-
object({ kind: literal("all") }),
|
|
43785
|
-
object({
|
|
43786
|
-
kind: literal("ids"),
|
|
43787
|
-
ids: array(number().int()).min(1)
|
|
43788
|
-
}),
|
|
43789
|
-
object({
|
|
43790
|
-
kind: literal("types"),
|
|
43791
|
-
types: array(_enum(DeviceType)).min(1)
|
|
43792
|
-
}),
|
|
43793
|
-
object({
|
|
43794
|
-
kind: literal("locations"),
|
|
43795
|
-
locations: array(string().min(1)).min(1)
|
|
43796
|
-
})
|
|
43797
|
-
]);
|
|
43798
|
-
var DeviceTokenScopeSchema = object({
|
|
43799
|
-
type: literal("device"),
|
|
43800
|
-
/** The device SET this grant covers — resolved against the live fleet. */
|
|
43801
|
-
selector: DeviceSelectorSchema,
|
|
43802
|
-
access: array(MethodAccessSchema).min(1),
|
|
43803
|
-
/**
|
|
43804
|
-
* Whether a grant on a PARENT device transparently covers its accessory
|
|
43805
|
-
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
43806
|
-
* Direction is parent → children ONLY.
|
|
43807
|
-
*
|
|
43808
|
-
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
43809
|
-
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
43810
|
-
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
43811
|
-
* operator must grant on the child, not inherit from the parent). Set it
|
|
43812
|
-
* explicitly to override that default per grant.
|
|
43813
|
-
*/
|
|
43814
|
-
includeLinked: boolean().optional()
|
|
43815
|
-
});
|
|
43816
|
-
/**
|
|
43817
|
-
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
43818
|
-
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
43819
|
-
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
43820
|
-
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
43821
|
-
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
43822
|
-
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
43823
|
-
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
43824
|
-
* migration covers both without a flag day. No cast — the raw object is read
|
|
43825
|
-
* through `Reflect.get` (its static type is `unknown`).
|
|
43826
|
-
*/
|
|
43827
|
-
function migrateLegacyTokenScope(raw) {
|
|
43828
|
-
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
43829
|
-
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
43830
|
-
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
43831
|
-
const targets = Reflect.get(raw, "targets");
|
|
43832
|
-
if (!Array.isArray(targets)) return raw;
|
|
43833
|
-
return {
|
|
43834
|
-
type: "device",
|
|
43835
|
-
selector: {
|
|
43836
|
-
kind: "ids",
|
|
43837
|
-
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
43838
|
-
},
|
|
43839
|
-
access: Reflect.get(raw, "access")
|
|
43840
|
-
};
|
|
43841
|
-
}
|
|
43842
|
-
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
43843
|
-
object({
|
|
43844
|
-
type: literal("category"),
|
|
43845
|
-
target: CapScopeSchema,
|
|
43846
|
-
access: array(MethodAccessSchema).min(1)
|
|
43847
|
-
}),
|
|
43848
|
-
object({
|
|
43849
|
-
type: literal("capability"),
|
|
43850
|
-
target: string(),
|
|
43851
|
-
access: array(MethodAccessSchema).min(1)
|
|
43852
|
-
}),
|
|
43853
|
-
object({
|
|
43854
|
-
type: literal("addon"),
|
|
43855
|
-
target: string(),
|
|
43856
|
-
access: array(MethodAccessSchema).min(1)
|
|
43857
|
-
}),
|
|
43858
|
-
DeviceTokenScopeSchema
|
|
43859
|
-
]));
|
|
43860
|
-
object({
|
|
43861
|
-
id: string(),
|
|
43862
|
-
username: string(),
|
|
43863
|
-
passwordHash: string(),
|
|
43864
|
-
/**
|
|
43865
|
-
* Admin bypass. When true, the middleware skips the scope-access
|
|
43866
|
-
* check entirely. There is no other axis of privilege; the legacy
|
|
43867
|
-
* role enum collapsed onto this boolean in v2.
|
|
43868
|
-
*/
|
|
43869
|
-
isAdmin: boolean().default(false),
|
|
43870
|
-
allowedProviders: AllowedProviderSchema,
|
|
43871
|
-
allowedDevices: AllowedDevicesSchema,
|
|
43872
|
-
/**
|
|
43873
|
-
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
43874
|
-
* ignored. Non-admins without scopes are locked out of every
|
|
43875
|
-
* protected call.
|
|
43876
|
-
*/
|
|
43877
|
-
scopes: array(TokenScopeSchema).default([]),
|
|
43878
|
-
createdAt: number(),
|
|
43879
|
-
updatedAt: number()
|
|
43880
|
-
});
|
|
43881
|
-
object({
|
|
43882
|
-
id: string(),
|
|
43883
|
-
label: string(),
|
|
43884
|
-
isAdmin: boolean().default(false),
|
|
43885
|
-
allowedProviders: AllowedProviderSchema,
|
|
43886
|
-
allowedDevices: AllowedDevicesSchema,
|
|
43887
|
-
tokenHash: string(),
|
|
43888
|
-
tokenPrefix: string(),
|
|
43889
|
-
createdAt: number(),
|
|
43890
|
-
lastUsedAt: number().optional()
|
|
43891
|
-
});
|
|
43892
|
-
object({
|
|
43893
|
-
id: string(),
|
|
43894
|
-
userId: string(),
|
|
43895
|
-
name: string(),
|
|
43896
|
-
tokenHash: string(),
|
|
43897
|
-
tokenPrefix: string(),
|
|
43898
|
-
scopes: array(TokenScopeSchema),
|
|
43899
|
-
expiresAt: number().nullish(),
|
|
43900
|
-
lastUsedAt: number().nullish(),
|
|
43901
|
-
createdAt: number()
|
|
43902
|
-
});
|
|
43903
|
-
/**
|
|
43904
43956
|
* `oauth-integration` — a collection cap by which an addon declares
|
|
43905
43957
|
* itself a linkable OAuth client of the hub's core `/oauth2/*` server.
|
|
43906
43958
|
* Each provider returns a static descriptor; the core enumerates them
|
|
@@ -50806,7 +50858,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
50806
50858
|
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
50807
50859
|
kind: "mutation",
|
|
50808
50860
|
auth: "admin"
|
|
50809
|
-
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({
|
|
50861
|
+
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
|
|
50862
|
+
clear: boolean(),
|
|
50863
|
+
repointLocationId: string().optional()
|
|
50864
|
+
}), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
|
|
50810
50865
|
kind: "mutation",
|
|
50811
50866
|
auth: "admin"
|
|
50812
50867
|
}), method(StorageCleanupInputSchema, object({ jobId: string() }), {
|
|
@@ -54241,6 +54296,11 @@ object({
|
|
|
54241
54296
|
*
|
|
54242
54297
|
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
54243
54298
|
* provider refreshes the slice on an interval and eagerly after commands.
|
|
54299
|
+
*
|
|
54300
|
+
* UNKNOWN IS NOT OFF. Every field the appliance reports separately is
|
|
54301
|
+
* nullable: `null` means "not known right now" (the appliance has not said,
|
|
54302
|
+
* the link is down, or the description does not carry it) and is never
|
|
54303
|
+
* rendered or exported as `false` / `0`. `availability` says why.
|
|
54244
54304
|
*/
|
|
54245
54305
|
var DishwasherStateSchema = _enum([
|
|
54246
54306
|
"idle",
|
|
@@ -54250,112 +54310,227 @@ var DishwasherStateSchema = _enum([
|
|
|
54250
54310
|
"error",
|
|
54251
54311
|
"unavailable"
|
|
54252
54312
|
]);
|
|
54313
|
+
/**
|
|
54314
|
+
* The appliance's own operation state, uncollapsed. `state` above is the coarse
|
|
54315
|
+
* view for compact surfaces; this is what the appliance said.
|
|
54316
|
+
*/
|
|
54317
|
+
var DishwasherOperationStateSchema = _enum([
|
|
54318
|
+
"Inactive",
|
|
54319
|
+
"Ready",
|
|
54320
|
+
"DelayedStart",
|
|
54321
|
+
"Run",
|
|
54322
|
+
"Pause",
|
|
54323
|
+
"ActionRequired",
|
|
54324
|
+
"Finished",
|
|
54325
|
+
"Error",
|
|
54326
|
+
"Aborting"
|
|
54327
|
+
]);
|
|
54328
|
+
/**
|
|
54329
|
+
* Why fields may be `null`:
|
|
54330
|
+
* - `available` — the link is up and the description is loaded;
|
|
54331
|
+
* - `offline` — the local link is down (values are unknown, not last-known);
|
|
54332
|
+
* - `description-missing` — the link is up but the appliance's description could not
|
|
54333
|
+
* be loaded, so its values cannot be decoded.
|
|
54334
|
+
*/
|
|
54335
|
+
var DishwasherAvailabilitySchema = _enum([
|
|
54336
|
+
"available",
|
|
54337
|
+
"offline",
|
|
54338
|
+
"description-missing"
|
|
54339
|
+
]);
|
|
54253
54340
|
var DishwasherConsumableLevelSchema = _enum([
|
|
54254
54341
|
"ok",
|
|
54255
54342
|
"low",
|
|
54256
54343
|
"empty"
|
|
54257
54344
|
]);
|
|
54258
54345
|
object({
|
|
54346
|
+
availability: DishwasherAvailabilitySchema,
|
|
54347
|
+
/** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
|
|
54259
54348
|
state: DishwasherStateSchema,
|
|
54260
|
-
/**
|
|
54349
|
+
/** The appliance's operation state as reported; null when not known. */
|
|
54350
|
+
operationState: DishwasherOperationStateSchema.nullable(),
|
|
54351
|
+
/** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
|
|
54261
54352
|
program: string().nullable(),
|
|
54262
|
-
/**
|
|
54353
|
+
/** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
|
|
54354
|
+
selectedProgram: string().nullable(),
|
|
54355
|
+
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
54263
54356
|
availablePrograms: array(string()),
|
|
54264
|
-
/**
|
|
54265
|
-
|
|
54357
|
+
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
54358
|
+
remainingSeconds: number().int().nonnegative().nullable(),
|
|
54359
|
+
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
54360
|
+
delayedStartSeconds: number().int().nonnegative().nullable(),
|
|
54266
54361
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
54267
54362
|
progressPercent: number().min(0).max(100).nullable(),
|
|
54268
|
-
/** True when the door is reported open. */
|
|
54269
|
-
doorOpen: boolean(),
|
|
54270
|
-
/** True when
|
|
54271
|
-
|
|
54272
|
-
/**
|
|
54273
|
-
|
|
54363
|
+
/** True when the door is reported open; null when the door state is not known. */
|
|
54364
|
+
doorOpen: boolean().nullable(),
|
|
54365
|
+
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
54366
|
+
doorLocked: boolean().nullable(),
|
|
54367
|
+
/** True when remote start is allowed (door closed, power on, etc.); null when not known. */
|
|
54368
|
+
remoteStartAllowed: boolean().nullable(),
|
|
54369
|
+
/** True when the appliance accepts remote control now; null when not known. */
|
|
54370
|
+
remoteControlActive: boolean().nullable(),
|
|
54371
|
+
/** True while somebody operates the appliance at its panel; null when not reported. */
|
|
54372
|
+
localControlActive: boolean().nullable(),
|
|
54373
|
+
/** Main power / switched-on state; null when not known. */
|
|
54374
|
+
powerOn: boolean().nullable(),
|
|
54375
|
+
/** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
|
|
54376
|
+
powerState: string().nullable(),
|
|
54274
54377
|
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
54275
54378
|
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
54276
|
-
|
|
54277
|
-
|
|
54379
|
+
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
54380
|
+
halfLoad: boolean().nullable(),
|
|
54381
|
+
hygienePlus: boolean().nullable(),
|
|
54278
54382
|
/** Extra dry option when the appliance exposes it. */
|
|
54279
|
-
extraDry: boolean(),
|
|
54383
|
+
extraDry: boolean().nullable(),
|
|
54280
54384
|
/** Intensive zone (lower basket) when the appliance exposes it. */
|
|
54281
|
-
intensiveZone: boolean(),
|
|
54385
|
+
intensiveZone: boolean().nullable(),
|
|
54282
54386
|
/** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
|
|
54283
|
-
varioSpeedPlus: boolean(),
|
|
54284
|
-
/** Child lock (controls disabled on the appliance). */
|
|
54285
|
-
childLock: boolean(),
|
|
54387
|
+
varioSpeedPlus: boolean().nullable(),
|
|
54388
|
+
/** Child lock (controls disabled on the appliance); null when not known. */
|
|
54389
|
+
childLock: boolean().nullable(),
|
|
54390
|
+
/** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
|
|
54391
|
+
activeEvents: array(string()),
|
|
54392
|
+
/** Numeric error code when the appliance reports one; null otherwise. */
|
|
54286
54393
|
errorCode: number().nullable(),
|
|
54394
|
+
/** Name of the raised alert-level event while the appliance is in error; null otherwise. */
|
|
54287
54395
|
errorLabel: string().nullable(),
|
|
54396
|
+
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
54288
54397
|
lastFetchedAt: number()
|
|
54289
54398
|
});
|
|
54290
|
-
|
|
54399
|
+
var DeviceIdSchema = number().int().nonnegative();
|
|
54400
|
+
/** A value a program option or setting can take. */
|
|
54401
|
+
var DishwasherValueSchema = union([
|
|
54402
|
+
boolean(),
|
|
54403
|
+
string(),
|
|
54404
|
+
number()
|
|
54405
|
+
]);
|
|
54406
|
+
var DishwasherAccessSchema = _enum([
|
|
54407
|
+
"none",
|
|
54408
|
+
"read",
|
|
54409
|
+
"readWrite",
|
|
54410
|
+
"writeOnly",
|
|
54411
|
+
"readStatic"
|
|
54412
|
+
]);
|
|
54413
|
+
/**
|
|
54414
|
+
* One option or setting the appliance declares, with the constraints its description
|
|
54415
|
+
* gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
|
|
54416
|
+
*/
|
|
54417
|
+
var DishwasherOptionDescriptorSchema = object({
|
|
54418
|
+
/** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
|
|
54419
|
+
key: string(),
|
|
54420
|
+
/** Last segment of the key, for display. */
|
|
54421
|
+
name: string(),
|
|
54422
|
+
type: _enum([
|
|
54423
|
+
"boolean",
|
|
54424
|
+
"number",
|
|
54425
|
+
"enum",
|
|
54426
|
+
"string"
|
|
54427
|
+
]),
|
|
54428
|
+
access: DishwasherAccessSchema,
|
|
54429
|
+
/** The appliance reports this entity as currently available. */
|
|
54430
|
+
available: boolean(),
|
|
54431
|
+
/** Unit the description declares for a number; null when it declares none. */
|
|
54432
|
+
unit: string().nullable(),
|
|
54433
|
+
min: number().nullable(),
|
|
54434
|
+
max: number().nullable(),
|
|
54435
|
+
step: number().nullable(),
|
|
54436
|
+
/** Allowed members of an enum; null for other types. */
|
|
54437
|
+
enumValues: array(string()).nullable(),
|
|
54438
|
+
defaultValue: DishwasherValueSchema.nullable()
|
|
54439
|
+
});
|
|
54440
|
+
var DishwasherProgramSchema = object({
|
|
54441
|
+
/** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
|
|
54442
|
+
key: string(),
|
|
54443
|
+
name: string(),
|
|
54444
|
+
/** The appliance currently offers this program. */
|
|
54445
|
+
available: boolean(),
|
|
54446
|
+
/** The options this program lists, with the program-level access / availability / default. */
|
|
54447
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
54448
|
+
});
|
|
54449
|
+
var DishwasherOptionsSchema = object({
|
|
54450
|
+
availability: DishwasherAvailabilitySchema,
|
|
54451
|
+
/** What the appliance can be told to do, from the commands its description declares. */
|
|
54452
|
+
supportsStart: boolean(),
|
|
54453
|
+
supportsPause: boolean(),
|
|
54454
|
+
supportsResume: boolean(),
|
|
54455
|
+
supportsStop: boolean(),
|
|
54456
|
+
supportsPower: boolean(),
|
|
54457
|
+
/** Every program the description lists, with its options. */
|
|
54458
|
+
programs: array(DishwasherProgramSchema),
|
|
54459
|
+
/** Every option and setting entity the description lists (programs reference these by key). */
|
|
54460
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
54461
|
+
});
|
|
54462
|
+
DeviceType.Dishwasher, method(object({
|
|
54463
|
+
deviceId: DeviceIdSchema,
|
|
54464
|
+
program: string().min(1).optional(),
|
|
54465
|
+
options: record(string(), DishwasherValueSchema).optional()
|
|
54466
|
+
}), _void(), {
|
|
54291
54467
|
kind: "mutation",
|
|
54292
54468
|
auth: "protected"
|
|
54293
|
-
}), method(object({ deviceId:
|
|
54469
|
+
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
54294
54470
|
kind: "mutation",
|
|
54295
54471
|
auth: "protected"
|
|
54296
|
-
}), method(object({ deviceId:
|
|
54472
|
+
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
54473
|
+
kind: "mutation",
|
|
54474
|
+
auth: "protected"
|
|
54475
|
+
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
54297
54476
|
kind: "mutation",
|
|
54298
54477
|
auth: "protected"
|
|
54299
54478
|
}), method(object({
|
|
54300
|
-
deviceId:
|
|
54479
|
+
deviceId: DeviceIdSchema,
|
|
54301
54480
|
program: string().min(1)
|
|
54302
54481
|
}), _void(), {
|
|
54303
54482
|
kind: "mutation",
|
|
54304
54483
|
auth: "protected"
|
|
54305
54484
|
}), method(object({
|
|
54306
|
-
deviceId:
|
|
54485
|
+
deviceId: DeviceIdSchema,
|
|
54307
54486
|
on: boolean()
|
|
54308
54487
|
}), _void(), {
|
|
54309
54488
|
kind: "mutation",
|
|
54310
54489
|
auth: "protected"
|
|
54311
54490
|
}), method(object({
|
|
54312
|
-
deviceId:
|
|
54491
|
+
deviceId: DeviceIdSchema,
|
|
54313
54492
|
on: boolean()
|
|
54314
54493
|
}), _void(), {
|
|
54315
54494
|
kind: "mutation",
|
|
54316
54495
|
auth: "protected"
|
|
54317
54496
|
}), method(object({
|
|
54318
|
-
deviceId:
|
|
54497
|
+
deviceId: DeviceIdSchema,
|
|
54319
54498
|
on: boolean()
|
|
54320
54499
|
}), _void(), {
|
|
54321
54500
|
kind: "mutation",
|
|
54322
54501
|
auth: "protected"
|
|
54323
54502
|
}), method(object({
|
|
54324
|
-
deviceId:
|
|
54503
|
+
deviceId: DeviceIdSchema,
|
|
54325
54504
|
on: boolean()
|
|
54326
54505
|
}), _void(), {
|
|
54327
54506
|
kind: "mutation",
|
|
54328
54507
|
auth: "protected"
|
|
54329
54508
|
}), method(object({
|
|
54330
|
-
deviceId:
|
|
54509
|
+
deviceId: DeviceIdSchema,
|
|
54331
54510
|
on: boolean()
|
|
54332
54511
|
}), _void(), {
|
|
54333
54512
|
kind: "mutation",
|
|
54334
54513
|
auth: "protected"
|
|
54335
54514
|
}), method(object({
|
|
54336
|
-
deviceId:
|
|
54515
|
+
deviceId: DeviceIdSchema,
|
|
54337
54516
|
on: boolean()
|
|
54338
54517
|
}), _void(), {
|
|
54339
54518
|
kind: "mutation",
|
|
54340
54519
|
auth: "protected"
|
|
54341
54520
|
}), method(object({
|
|
54342
|
-
deviceId:
|
|
54521
|
+
deviceId: DeviceIdSchema,
|
|
54343
54522
|
on: boolean()
|
|
54344
54523
|
}), _void(), {
|
|
54345
54524
|
kind: "mutation",
|
|
54346
54525
|
auth: "protected"
|
|
54347
54526
|
}), method(object({
|
|
54348
|
-
deviceId:
|
|
54527
|
+
deviceId: DeviceIdSchema,
|
|
54349
54528
|
key: string().min(1),
|
|
54350
|
-
value:
|
|
54351
|
-
boolean(),
|
|
54352
|
-
string(),
|
|
54353
|
-
number()
|
|
54354
|
-
])
|
|
54529
|
+
value: DishwasherValueSchema
|
|
54355
54530
|
}), _void(), {
|
|
54356
54531
|
kind: "mutation",
|
|
54357
54532
|
auth: "protected"
|
|
54358
|
-
});
|
|
54533
|
+
}), method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" });
|
|
54359
54534
|
object({
|
|
54360
54535
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
54361
54536
|
lastPressedAt: number().nullable(),
|
|
@@ -65332,6 +65507,12 @@ Object.freeze({
|
|
|
65332
65507
|
addonId: null,
|
|
65333
65508
|
access: "view"
|
|
65334
65509
|
},
|
|
65510
|
+
"dishwasher.getOptions": {
|
|
65511
|
+
capName: "dishwasher",
|
|
65512
|
+
capScope: "device",
|
|
65513
|
+
addonId: null,
|
|
65514
|
+
access: "view"
|
|
65515
|
+
},
|
|
65335
65516
|
"dishwasher.getStatus": {
|
|
65336
65517
|
capName: "dishwasher",
|
|
65337
65518
|
capScope: "device",
|
|
@@ -65344,6 +65525,12 @@ Object.freeze({
|
|
|
65344
65525
|
addonId: null,
|
|
65345
65526
|
access: "create"
|
|
65346
65527
|
},
|
|
65528
|
+
"dishwasher.resume": {
|
|
65529
|
+
capName: "dishwasher",
|
|
65530
|
+
capScope: "device",
|
|
65531
|
+
addonId: null,
|
|
65532
|
+
access: "create"
|
|
65533
|
+
},
|
|
65347
65534
|
"dishwasher.setChildLock": {
|
|
65348
65535
|
capName: "dishwasher",
|
|
65349
65536
|
capScope: "device",
|
|
@@ -69844,6 +70031,12 @@ Object.freeze({
|
|
|
69844
70031
|
addonId: null,
|
|
69845
70032
|
access: "view"
|
|
69846
70033
|
},
|
|
70034
|
+
"storageMigration.moverClearance": {
|
|
70035
|
+
capName: "storage-migration",
|
|
70036
|
+
capScope: "system",
|
|
70037
|
+
addonId: null,
|
|
70038
|
+
access: "view"
|
|
70039
|
+
},
|
|
69847
70040
|
"storageMigration.movers": {
|
|
69848
70041
|
capName: "storage-migration",
|
|
69849
70042
|
capScope: "system",
|
|
@@ -72103,6 +72296,11 @@ Object.freeze({
|
|
|
72103
72296
|
form: "single",
|
|
72104
72297
|
optional: false
|
|
72105
72298
|
}],
|
|
72299
|
+
"dishwasher.getOptions": [{
|
|
72300
|
+
name: "deviceId",
|
|
72301
|
+
form: "single",
|
|
72302
|
+
optional: false
|
|
72303
|
+
}],
|
|
72106
72304
|
"dishwasher.getStatus": [{
|
|
72107
72305
|
name: "deviceId",
|
|
72108
72306
|
form: "single",
|
|
@@ -72113,6 +72311,11 @@ Object.freeze({
|
|
|
72113
72311
|
form: "single",
|
|
72114
72312
|
optional: false
|
|
72115
72313
|
}],
|
|
72314
|
+
"dishwasher.resume": [{
|
|
72315
|
+
name: "deviceId",
|
|
72316
|
+
form: "single",
|
|
72317
|
+
optional: false
|
|
72318
|
+
}],
|
|
72116
72319
|
"dishwasher.setChildLock": [{
|
|
72117
72320
|
name: "deviceId",
|
|
72118
72321
|
form: "single",
|
|
@@ -74199,6 +74402,9 @@ new Map(Object.entries({
|
|
|
74199
74402
|
"wrapper-update-available": "system",
|
|
74200
74403
|
"backup-completed": "system",
|
|
74201
74404
|
"export-completed": "system",
|
|
74405
|
+
"alert-critical": "system",
|
|
74406
|
+
"alert-error": "system",
|
|
74407
|
+
"alert-critical-resolved": "system",
|
|
74202
74408
|
"storage-location-low": "system",
|
|
74203
74409
|
"storage-location-critical": "system",
|
|
74204
74410
|
"storage-location-ok": "system",
|
|
@@ -74323,6 +74529,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
74323
74529
|
"storage-location-ok"
|
|
74324
74530
|
]
|
|
74325
74531
|
},
|
|
74532
|
+
{
|
|
74533
|
+
id: "alerts",
|
|
74534
|
+
family: "system",
|
|
74535
|
+
label: "Alerts",
|
|
74536
|
+
kinds: [
|
|
74537
|
+
"alert-critical",
|
|
74538
|
+
"alert-error",
|
|
74539
|
+
"alert-critical-resolved"
|
|
74540
|
+
]
|
|
74541
|
+
},
|
|
74326
74542
|
{
|
|
74327
74543
|
id: "alarm",
|
|
74328
74544
|
family: "alarm",
|
|
@@ -74367,6 +74583,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
|
|
|
74367
74583
|
return [[descriptor.kind, field]];
|
|
74368
74584
|
})));
|
|
74369
74585
|
Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
|
|
74586
|
+
object({
|
|
74587
|
+
phase: _enum(["raised", "resolved"]),
|
|
74588
|
+
episodeId: string().min(1),
|
|
74589
|
+
alertId: string().min(1),
|
|
74590
|
+
severity: AlertSeveritySchema,
|
|
74591
|
+
category: string(),
|
|
74592
|
+
title: string(),
|
|
74593
|
+
message: string(),
|
|
74594
|
+
sourceType: string().optional(),
|
|
74595
|
+
sourceId: string().optional(),
|
|
74596
|
+
nodeId: string().optional(),
|
|
74597
|
+
/** The alert's own action link (where the operator acts on it), when it has one. */
|
|
74598
|
+
actionUrl: string().optional(),
|
|
74599
|
+
at: number()
|
|
74600
|
+
});
|
|
74370
74601
|
var RULE_BODY_ONLY = ["body"];
|
|
74371
74602
|
var RULE_TEXT = ["title", "body"];
|
|
74372
74603
|
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
@@ -74376,6 +74607,11 @@ var TANK = [
|
|
|
74376
74607
|
"device-tank-full",
|
|
74377
74608
|
"device-tank-normal"
|
|
74378
74609
|
];
|
|
74610
|
+
var ALERT_EPISODE = [
|
|
74611
|
+
"alert-critical",
|
|
74612
|
+
"alert-error",
|
|
74613
|
+
"alert-critical-resolved"
|
|
74614
|
+
];
|
|
74379
74615
|
var UPDATES = [
|
|
74380
74616
|
"addon-update-available",
|
|
74381
74617
|
"server-update-available",
|
|
@@ -74568,14 +74804,14 @@ var STATE_SUMMARY_VARS = [
|
|
|
74568
74804
|
([...RULE_TEXT], [...CONSUMABLE]),
|
|
74569
74805
|
([...RULE_TEXT], [...TANK]),
|
|
74570
74806
|
[...RULE_TEXT],
|
|
74571
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
74572
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
74573
|
-
[...RULE_TEXT],
|
|
74807
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
74808
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
74574
74809
|
[...RULE_TEXT],
|
|
74575
74810
|
[...RULE_TEXT],
|
|
74576
74811
|
[...RULE_TEXT],
|
|
74577
74812
|
[...RULE_TEXT],
|
|
74578
74813
|
[...RULE_TEXT],
|
|
74814
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74579
74815
|
[...RULE_TEXT],
|
|
74580
74816
|
[...RULE_TEXT],
|
|
74581
74817
|
[...RULE_TEXT],
|
|
@@ -74593,7 +74829,11 @@ var STATE_SUMMARY_VARS = [
|
|
|
74593
74829
|
[...RULE_TEXT],
|
|
74594
74830
|
[...RULE_TEXT],
|
|
74595
74831
|
[...RULE_TEXT],
|
|
74596
|
-
[...RULE_TEXT],
|
|
74832
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74833
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74834
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74835
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74836
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74597
74837
|
[...RULE_TEXT],
|
|
74598
74838
|
[...RULE_TEXT],
|
|
74599
74839
|
[...RULE_TEXT],
|