@camstack/addon-provider-unraid 0.2.128 → 0.2.130
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 +493 -240
- package/dist/addon.mjs +493 -240
- package/package.json +1 -1
package/dist/addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../types/dist/event-category-
|
|
1
|
+
//#region ../types/dist/event-category-DOl51-Ij.mjs
|
|
2
2
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
3
3
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4
4
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -77,9 +77,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
77
77
|
/**
|
|
78
78
|
* The node's one-shot runner boot check (D877): planned runners against the
|
|
79
79
|
* process service, `degraded` when any is failed, refused or missing. The
|
|
80
|
-
* alert centre turns it into one
|
|
80
|
+
* alert centre turns it into one critical alert.
|
|
81
81
|
*/
|
|
82
82
|
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
83
|
+
/**
|
|
84
|
+
* An alert EPISODE opened or closed, emitted by the alert centre for alerts
|
|
85
|
+
* of severity `critical` or `error` (`AlertEpisodePayload`). The alert
|
|
86
|
+
* centre sends no notification of its own: Notification Center turns this
|
|
87
|
+
* into the `alert-critical` / `alert-error` / `alert-critical-resolved`
|
|
88
|
+
* system-event kinds, and reconciles from the alerts store because a bus
|
|
89
|
+
* event may be dropped (D8, D11).
|
|
90
|
+
*/
|
|
91
|
+
EventCategory["AlertEpisode"] = "alert.episode";
|
|
83
92
|
EventCategory["AddonError"] = "addon.error";
|
|
84
93
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
85
94
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -5404,7 +5413,7 @@ var ZodIssueCode = {
|
|
|
5404
5413
|
var ZodFirstPartyTypeKind;
|
|
5405
5414
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5406
5415
|
//#endregion
|
|
5407
|
-
//#region ../types/dist/sleep-
|
|
5416
|
+
//#region ../types/dist/sleep-BxjU_fJM.mjs
|
|
5408
5417
|
/**
|
|
5409
5418
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5410
5419
|
* window to float samples (D455).
|
|
@@ -7786,6 +7795,12 @@ function normalizeAddonInitResult(result) {
|
|
|
7786
7795
|
if (Array.isArray(result)) return { providers: result };
|
|
7787
7796
|
return result;
|
|
7788
7797
|
}
|
|
7798
|
+
/**
|
|
7799
|
+
* The share-view scope kinds a `csv_*` share token can carry. The hub mints
|
|
7800
|
+
* and validates them (`share-token.service.ts` builds its enum from this
|
|
7801
|
+
* list); a data plane names the kinds it ACCEPTS in `share`.
|
|
7802
|
+
*/
|
|
7803
|
+
var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
|
|
7789
7804
|
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
7790
7805
|
var PeerBytesTicketSchema = object({
|
|
7791
7806
|
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
@@ -12465,6 +12480,229 @@ var ConvertResultSchema = object({
|
|
|
12465
12480
|
files: array(string()).readonly()
|
|
12466
12481
|
})).readonly()
|
|
12467
12482
|
});
|
|
12483
|
+
/**
|
|
12484
|
+
* Zod schemas for persisted record types.
|
|
12485
|
+
*
|
|
12486
|
+
* These schemas serve as the single source of truth for types that are
|
|
12487
|
+
* stored in the settings-store backend and retrieved via tRPC. They
|
|
12488
|
+
* replace the manual TypeScript interfaces with schema-derived types,
|
|
12489
|
+
* enabling runtime validation when reading from the backend.
|
|
12490
|
+
*
|
|
12491
|
+
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
12492
|
+
* keeps the original name for backward compatibility.
|
|
12493
|
+
*/
|
|
12494
|
+
/**
|
|
12495
|
+
* Auth model (v2 — 2026-05-12 caps-only):
|
|
12496
|
+
*
|
|
12497
|
+
* Two principals:
|
|
12498
|
+
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
12499
|
+
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
12500
|
+
*
|
|
12501
|
+
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
12502
|
+
* `super_admin` — collapsed onto the single boolean because every
|
|
12503
|
+
* non-admin caller is governed by the same scope-check rules; the
|
|
12504
|
+
* distinction was only ever used to route role-specific procedures
|
|
12505
|
+
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
12506
|
+
* with `isAdmin: false` + an explicit scope list.
|
|
12507
|
+
*/
|
|
12508
|
+
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
12509
|
+
var MethodAccessSchema = _enum([
|
|
12510
|
+
"view",
|
|
12511
|
+
"create",
|
|
12512
|
+
"delete"
|
|
12513
|
+
]);
|
|
12514
|
+
/**
|
|
12515
|
+
* A single scope grant. Three forms — checked in matcher with OR
|
|
12516
|
+
* semantics; the first match decides whether the call passes:
|
|
12517
|
+
*
|
|
12518
|
+
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
12519
|
+
* cap with the matching `scope` declaration. New caps inherit grants
|
|
12520
|
+
* automatically — adding a device cap to the codebase makes it
|
|
12521
|
+
* reachable to every user with `category:device [...]` without a
|
|
12522
|
+
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
12523
|
+
*
|
|
12524
|
+
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
12525
|
+
* useful when an integration needs to interact with one specific
|
|
12526
|
+
* addon's surface regardless of how many caps it exports.
|
|
12527
|
+
*
|
|
12528
|
+
* - `capability` — the most precise form. Single cap name. Use for
|
|
12529
|
+
* integration tokens where you want to grant `addons.installPackage`
|
|
12530
|
+
* and nothing else.
|
|
12531
|
+
*
|
|
12532
|
+
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
12533
|
+
* "give me everything" escape; there is no wildcard scope.
|
|
12534
|
+
*/
|
|
12535
|
+
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
12536
|
+
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
12537
|
+
var CapScopeSchema = _enum(["device", "system"]);
|
|
12538
|
+
/**
|
|
12539
|
+
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
12540
|
+
*
|
|
12541
|
+
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
12542
|
+
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
12543
|
+
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
12544
|
+
* AFTER the grant was minted — no re-grant, no re-login.
|
|
12545
|
+
*
|
|
12546
|
+
* - `all` — every device in the deployment. The broad viewer/operator
|
|
12547
|
+
* lever without a `category` grant (a `category` grant also covers device
|
|
12548
|
+
* caps that carry no deviceId; `all` is specifically the device set).
|
|
12549
|
+
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
12550
|
+
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
12551
|
+
* is NOT covered until the grant is edited.
|
|
12552
|
+
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
12553
|
+
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
12554
|
+
* re-resolves on the next request.
|
|
12555
|
+
* - `locations` — every device whose operator-assigned `location` label is
|
|
12556
|
+
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
12557
|
+
* null/unset location matches NO `locations` selector.
|
|
12558
|
+
*/
|
|
12559
|
+
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
12560
|
+
object({ kind: literal("all") }),
|
|
12561
|
+
object({
|
|
12562
|
+
kind: literal("ids"),
|
|
12563
|
+
ids: array(number().int()).min(1)
|
|
12564
|
+
}),
|
|
12565
|
+
object({
|
|
12566
|
+
kind: literal("types"),
|
|
12567
|
+
types: array(_enum(DeviceType)).min(1)
|
|
12568
|
+
}),
|
|
12569
|
+
object({
|
|
12570
|
+
kind: literal("locations"),
|
|
12571
|
+
locations: array(string().min(1)).min(1)
|
|
12572
|
+
})
|
|
12573
|
+
]);
|
|
12574
|
+
var DeviceTokenScopeSchema = object({
|
|
12575
|
+
type: literal("device"),
|
|
12576
|
+
/** The device SET this grant covers — resolved against the live fleet. */
|
|
12577
|
+
selector: DeviceSelectorSchema,
|
|
12578
|
+
access: array(MethodAccessSchema).min(1),
|
|
12579
|
+
/**
|
|
12580
|
+
* Whether a grant on a PARENT device transparently covers its accessory
|
|
12581
|
+
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
12582
|
+
* Direction is parent → children ONLY.
|
|
12583
|
+
*
|
|
12584
|
+
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
12585
|
+
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
12586
|
+
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
12587
|
+
* operator must grant on the child, not inherit from the parent). Set it
|
|
12588
|
+
* explicitly to override that default per grant.
|
|
12589
|
+
*/
|
|
12590
|
+
includeLinked: boolean().optional()
|
|
12591
|
+
});
|
|
12592
|
+
/**
|
|
12593
|
+
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
12594
|
+
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
12595
|
+
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
12596
|
+
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
12597
|
+
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
12598
|
+
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
12599
|
+
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
12600
|
+
* migration covers both without a flag day. No cast — the raw object is read
|
|
12601
|
+
* through `Reflect.get` (its static type is `unknown`).
|
|
12602
|
+
*/
|
|
12603
|
+
function migrateLegacyTokenScope(raw) {
|
|
12604
|
+
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
12605
|
+
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
12606
|
+
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
12607
|
+
const targets = Reflect.get(raw, "targets");
|
|
12608
|
+
if (!Array.isArray(targets)) return raw;
|
|
12609
|
+
return {
|
|
12610
|
+
type: "device",
|
|
12611
|
+
selector: {
|
|
12612
|
+
kind: "ids",
|
|
12613
|
+
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
12614
|
+
},
|
|
12615
|
+
access: Reflect.get(raw, "access")
|
|
12616
|
+
};
|
|
12617
|
+
}
|
|
12618
|
+
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
12619
|
+
object({
|
|
12620
|
+
type: literal("category"),
|
|
12621
|
+
target: CapScopeSchema,
|
|
12622
|
+
access: array(MethodAccessSchema).min(1)
|
|
12623
|
+
}),
|
|
12624
|
+
object({
|
|
12625
|
+
type: literal("capability"),
|
|
12626
|
+
target: string(),
|
|
12627
|
+
access: array(MethodAccessSchema).min(1)
|
|
12628
|
+
}),
|
|
12629
|
+
object({
|
|
12630
|
+
type: literal("addon"),
|
|
12631
|
+
target: string(),
|
|
12632
|
+
access: array(MethodAccessSchema).min(1)
|
|
12633
|
+
}),
|
|
12634
|
+
DeviceTokenScopeSchema
|
|
12635
|
+
]));
|
|
12636
|
+
object({
|
|
12637
|
+
id: string(),
|
|
12638
|
+
username: string(),
|
|
12639
|
+
passwordHash: string(),
|
|
12640
|
+
/**
|
|
12641
|
+
* Admin bypass. When true, the middleware skips the scope-access
|
|
12642
|
+
* check entirely. There is no other axis of privilege; the legacy
|
|
12643
|
+
* role enum collapsed onto this boolean in v2.
|
|
12644
|
+
*/
|
|
12645
|
+
isAdmin: boolean().default(false),
|
|
12646
|
+
allowedProviders: AllowedProviderSchema,
|
|
12647
|
+
allowedDevices: AllowedDevicesSchema,
|
|
12648
|
+
/**
|
|
12649
|
+
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
12650
|
+
* ignored. Non-admins without scopes are locked out of every
|
|
12651
|
+
* protected call.
|
|
12652
|
+
*/
|
|
12653
|
+
scopes: array(TokenScopeSchema).default([]),
|
|
12654
|
+
createdAt: number(),
|
|
12655
|
+
updatedAt: number()
|
|
12656
|
+
});
|
|
12657
|
+
object({
|
|
12658
|
+
id: string(),
|
|
12659
|
+
label: string(),
|
|
12660
|
+
isAdmin: boolean().default(false),
|
|
12661
|
+
allowedProviders: AllowedProviderSchema,
|
|
12662
|
+
allowedDevices: AllowedDevicesSchema,
|
|
12663
|
+
tokenHash: string(),
|
|
12664
|
+
tokenPrefix: string(),
|
|
12665
|
+
createdAt: number(),
|
|
12666
|
+
lastUsedAt: number().optional()
|
|
12667
|
+
});
|
|
12668
|
+
object({
|
|
12669
|
+
id: string(),
|
|
12670
|
+
userId: string(),
|
|
12671
|
+
name: string(),
|
|
12672
|
+
tokenHash: string(),
|
|
12673
|
+
tokenPrefix: string(),
|
|
12674
|
+
scopes: array(TokenScopeSchema),
|
|
12675
|
+
expiresAt: number().nullish(),
|
|
12676
|
+
lastUsedAt: number().nullish(),
|
|
12677
|
+
createdAt: number()
|
|
12678
|
+
});
|
|
12679
|
+
/** What a share-view grant lets its holder see. */
|
|
12680
|
+
var ShareViewGrantSchema = object({
|
|
12681
|
+
kind: _enum(SHARE_VIEW_KINDS),
|
|
12682
|
+
deviceIds: array(number().int().nonnegative()).min(1).max(64),
|
|
12683
|
+
/** Talk-back, opt-in at mint time; absent means off. */
|
|
12684
|
+
talk: boolean().optional()
|
|
12685
|
+
});
|
|
12686
|
+
var ShareViewScopeSchema = object({
|
|
12687
|
+
type: literal("share-view"),
|
|
12688
|
+
grant: ShareViewGrantSchema
|
|
12689
|
+
});
|
|
12690
|
+
var AddonRoutesScopeSchema = object({
|
|
12691
|
+
type: literal("addon-routes"),
|
|
12692
|
+
access: array(MethodAccessSchema).min(1)
|
|
12693
|
+
});
|
|
12694
|
+
var CredentialScopeSchema = union([
|
|
12695
|
+
literal("*"),
|
|
12696
|
+
ShareViewScopeSchema,
|
|
12697
|
+
AddonRoutesScopeSchema,
|
|
12698
|
+
TokenScopeSchema
|
|
12699
|
+
]);
|
|
12700
|
+
object({
|
|
12701
|
+
kind: literal("credential"),
|
|
12702
|
+
sub: string().min(1),
|
|
12703
|
+
jti: string().min(16),
|
|
12704
|
+
scopes: array(CredentialScopeSchema).min(1)
|
|
12705
|
+
});
|
|
12468
12706
|
_enum(["new-session", "step-up"]);
|
|
12469
12707
|
/** The languages the hub's app landing pages are written in (D858). */
|
|
12470
12708
|
var AppPageLangSchema = _enum(["en", "it"]);
|
|
@@ -13181,7 +13419,14 @@ var AlertSeveritySchema = _enum([
|
|
|
13181
13419
|
]);
|
|
13182
13420
|
var AlertActionSchema = object({
|
|
13183
13421
|
label: string(),
|
|
13184
|
-
href: string().optional()
|
|
13422
|
+
href: string().optional(),
|
|
13423
|
+
/**
|
|
13424
|
+
* How `href` is followed. Absent / `app`: an admin-ui route (client-side).
|
|
13425
|
+
* `server`: a route the HUB serves (an addon HTTP route such as an OAuth
|
|
13426
|
+
* start) — the browser must leave the SPA with a full navigation, because
|
|
13427
|
+
* the SPA has no such route and would bounce to the home page.
|
|
13428
|
+
*/
|
|
13429
|
+
navigation: _enum(["app", "server"]).optional()
|
|
13185
13430
|
});
|
|
13186
13431
|
var AlertStatusSchema = _enum([
|
|
13187
13432
|
"active",
|
|
@@ -42010,6 +42255,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
42010
42255
|
"server-updated",
|
|
42011
42256
|
"export-completed",
|
|
42012
42257
|
"backup-completed",
|
|
42258
|
+
"alert-critical",
|
|
42259
|
+
"alert-error",
|
|
42260
|
+
"alert-critical-resolved",
|
|
42013
42261
|
"camera-online",
|
|
42014
42262
|
"camera-offline",
|
|
42015
42263
|
"camera-disabled",
|
|
@@ -44045,202 +44293,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
44045
44293
|
auth: "admin"
|
|
44046
44294
|
}), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
|
|
44047
44295
|
/**
|
|
44048
|
-
* Zod schemas for persisted record types.
|
|
44049
|
-
*
|
|
44050
|
-
* These schemas serve as the single source of truth for types that are
|
|
44051
|
-
* stored in the settings-store backend and retrieved via tRPC. They
|
|
44052
|
-
* replace the manual TypeScript interfaces with schema-derived types,
|
|
44053
|
-
* enabling runtime validation when reading from the backend.
|
|
44054
|
-
*
|
|
44055
|
-
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
44056
|
-
* keeps the original name for backward compatibility.
|
|
44057
|
-
*/
|
|
44058
|
-
/**
|
|
44059
|
-
* Auth model (v2 — 2026-05-12 caps-only):
|
|
44060
|
-
*
|
|
44061
|
-
* Two principals:
|
|
44062
|
-
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
44063
|
-
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
44064
|
-
*
|
|
44065
|
-
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
44066
|
-
* `super_admin` — collapsed onto the single boolean because every
|
|
44067
|
-
* non-admin caller is governed by the same scope-check rules; the
|
|
44068
|
-
* distinction was only ever used to route role-specific procedures
|
|
44069
|
-
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
44070
|
-
* with `isAdmin: false` + an explicit scope list.
|
|
44071
|
-
*/
|
|
44072
|
-
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
44073
|
-
var MethodAccessSchema = _enum([
|
|
44074
|
-
"view",
|
|
44075
|
-
"create",
|
|
44076
|
-
"delete"
|
|
44077
|
-
]);
|
|
44078
|
-
/**
|
|
44079
|
-
* A single scope grant. Three forms — checked in matcher with OR
|
|
44080
|
-
* semantics; the first match decides whether the call passes:
|
|
44081
|
-
*
|
|
44082
|
-
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
44083
|
-
* cap with the matching `scope` declaration. New caps inherit grants
|
|
44084
|
-
* automatically — adding a device cap to the codebase makes it
|
|
44085
|
-
* reachable to every user with `category:device [...]` without a
|
|
44086
|
-
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
44087
|
-
*
|
|
44088
|
-
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
44089
|
-
* useful when an integration needs to interact with one specific
|
|
44090
|
-
* addon's surface regardless of how many caps it exports.
|
|
44091
|
-
*
|
|
44092
|
-
* - `capability` — the most precise form. Single cap name. Use for
|
|
44093
|
-
* integration tokens where you want to grant `addons.installPackage`
|
|
44094
|
-
* and nothing else.
|
|
44095
|
-
*
|
|
44096
|
-
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
44097
|
-
* "give me everything" escape; there is no wildcard scope.
|
|
44098
|
-
*/
|
|
44099
|
-
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
44100
|
-
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
44101
|
-
var CapScopeSchema = _enum(["device", "system"]);
|
|
44102
|
-
/**
|
|
44103
|
-
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
44104
|
-
*
|
|
44105
|
-
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
44106
|
-
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
44107
|
-
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
44108
|
-
* AFTER the grant was minted — no re-grant, no re-login.
|
|
44109
|
-
*
|
|
44110
|
-
* - `all` — every device in the deployment. The broad viewer/operator
|
|
44111
|
-
* lever without a `category` grant (a `category` grant also covers device
|
|
44112
|
-
* caps that carry no deviceId; `all` is specifically the device set).
|
|
44113
|
-
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
44114
|
-
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
44115
|
-
* is NOT covered until the grant is edited.
|
|
44116
|
-
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
44117
|
-
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
44118
|
-
* re-resolves on the next request.
|
|
44119
|
-
* - `locations` — every device whose operator-assigned `location` label is
|
|
44120
|
-
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
44121
|
-
* null/unset location matches NO `locations` selector.
|
|
44122
|
-
*/
|
|
44123
|
-
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
44124
|
-
object({ kind: literal("all") }),
|
|
44125
|
-
object({
|
|
44126
|
-
kind: literal("ids"),
|
|
44127
|
-
ids: array(number().int()).min(1)
|
|
44128
|
-
}),
|
|
44129
|
-
object({
|
|
44130
|
-
kind: literal("types"),
|
|
44131
|
-
types: array(_enum(DeviceType)).min(1)
|
|
44132
|
-
}),
|
|
44133
|
-
object({
|
|
44134
|
-
kind: literal("locations"),
|
|
44135
|
-
locations: array(string().min(1)).min(1)
|
|
44136
|
-
})
|
|
44137
|
-
]);
|
|
44138
|
-
var DeviceTokenScopeSchema = object({
|
|
44139
|
-
type: literal("device"),
|
|
44140
|
-
/** The device SET this grant covers — resolved against the live fleet. */
|
|
44141
|
-
selector: DeviceSelectorSchema,
|
|
44142
|
-
access: array(MethodAccessSchema).min(1),
|
|
44143
|
-
/**
|
|
44144
|
-
* Whether a grant on a PARENT device transparently covers its accessory
|
|
44145
|
-
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
44146
|
-
* Direction is parent → children ONLY.
|
|
44147
|
-
*
|
|
44148
|
-
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
44149
|
-
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
44150
|
-
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
44151
|
-
* operator must grant on the child, not inherit from the parent). Set it
|
|
44152
|
-
* explicitly to override that default per grant.
|
|
44153
|
-
*/
|
|
44154
|
-
includeLinked: boolean().optional()
|
|
44155
|
-
});
|
|
44156
|
-
/**
|
|
44157
|
-
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
44158
|
-
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
44159
|
-
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
44160
|
-
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
44161
|
-
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
44162
|
-
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
44163
|
-
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
44164
|
-
* migration covers both without a flag day. No cast — the raw object is read
|
|
44165
|
-
* through `Reflect.get` (its static type is `unknown`).
|
|
44166
|
-
*/
|
|
44167
|
-
function migrateLegacyTokenScope(raw) {
|
|
44168
|
-
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
44169
|
-
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
44170
|
-
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
44171
|
-
const targets = Reflect.get(raw, "targets");
|
|
44172
|
-
if (!Array.isArray(targets)) return raw;
|
|
44173
|
-
return {
|
|
44174
|
-
type: "device",
|
|
44175
|
-
selector: {
|
|
44176
|
-
kind: "ids",
|
|
44177
|
-
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
44178
|
-
},
|
|
44179
|
-
access: Reflect.get(raw, "access")
|
|
44180
|
-
};
|
|
44181
|
-
}
|
|
44182
|
-
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
44183
|
-
object({
|
|
44184
|
-
type: literal("category"),
|
|
44185
|
-
target: CapScopeSchema,
|
|
44186
|
-
access: array(MethodAccessSchema).min(1)
|
|
44187
|
-
}),
|
|
44188
|
-
object({
|
|
44189
|
-
type: literal("capability"),
|
|
44190
|
-
target: string(),
|
|
44191
|
-
access: array(MethodAccessSchema).min(1)
|
|
44192
|
-
}),
|
|
44193
|
-
object({
|
|
44194
|
-
type: literal("addon"),
|
|
44195
|
-
target: string(),
|
|
44196
|
-
access: array(MethodAccessSchema).min(1)
|
|
44197
|
-
}),
|
|
44198
|
-
DeviceTokenScopeSchema
|
|
44199
|
-
]));
|
|
44200
|
-
object({
|
|
44201
|
-
id: string(),
|
|
44202
|
-
username: string(),
|
|
44203
|
-
passwordHash: string(),
|
|
44204
|
-
/**
|
|
44205
|
-
* Admin bypass. When true, the middleware skips the scope-access
|
|
44206
|
-
* check entirely. There is no other axis of privilege; the legacy
|
|
44207
|
-
* role enum collapsed onto this boolean in v2.
|
|
44208
|
-
*/
|
|
44209
|
-
isAdmin: boolean().default(false),
|
|
44210
|
-
allowedProviders: AllowedProviderSchema,
|
|
44211
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44212
|
-
/**
|
|
44213
|
-
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
44214
|
-
* ignored. Non-admins without scopes are locked out of every
|
|
44215
|
-
* protected call.
|
|
44216
|
-
*/
|
|
44217
|
-
scopes: array(TokenScopeSchema).default([]),
|
|
44218
|
-
createdAt: number(),
|
|
44219
|
-
updatedAt: number()
|
|
44220
|
-
});
|
|
44221
|
-
object({
|
|
44222
|
-
id: string(),
|
|
44223
|
-
label: string(),
|
|
44224
|
-
isAdmin: boolean().default(false),
|
|
44225
|
-
allowedProviders: AllowedProviderSchema,
|
|
44226
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44227
|
-
tokenHash: string(),
|
|
44228
|
-
tokenPrefix: string(),
|
|
44229
|
-
createdAt: number(),
|
|
44230
|
-
lastUsedAt: number().optional()
|
|
44231
|
-
});
|
|
44232
|
-
object({
|
|
44233
|
-
id: string(),
|
|
44234
|
-
userId: string(),
|
|
44235
|
-
name: string(),
|
|
44236
|
-
tokenHash: string(),
|
|
44237
|
-
tokenPrefix: string(),
|
|
44238
|
-
scopes: array(TokenScopeSchema),
|
|
44239
|
-
expiresAt: number().nullish(),
|
|
44240
|
-
lastUsedAt: number().nullish(),
|
|
44241
|
-
createdAt: number()
|
|
44242
|
-
});
|
|
44243
|
-
/**
|
|
44244
44296
|
* `oauth-integration` — a collection cap by which an addon declares
|
|
44245
44297
|
* itself a linkable OAuth client of the hub's core `/oauth2/*` server.
|
|
44246
44298
|
* Each provider returns a static descriptor; the core enumerates them
|
|
@@ -51086,7 +51138,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
51086
51138
|
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
51087
51139
|
kind: "mutation",
|
|
51088
51140
|
auth: "admin"
|
|
51089
|
-
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({
|
|
51141
|
+
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
|
|
51142
|
+
clear: boolean(),
|
|
51143
|
+
repointLocationId: string().optional()
|
|
51144
|
+
}), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
|
|
51090
51145
|
kind: "mutation",
|
|
51091
51146
|
auth: "admin"
|
|
51092
51147
|
}), method(StorageCleanupInputSchema, object({ jobId: string() }), {
|
|
@@ -55359,6 +55414,11 @@ onStatusChanged: { data: object({
|
|
|
55359
55414
|
*
|
|
55360
55415
|
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
55361
55416
|
* provider refreshes the slice on an interval and eagerly after commands.
|
|
55417
|
+
*
|
|
55418
|
+
* UNKNOWN IS NOT OFF. Every field the appliance reports separately is
|
|
55419
|
+
* nullable: `null` means "not known right now" (the appliance has not said,
|
|
55420
|
+
* the link is down, or the description does not carry it) and is never
|
|
55421
|
+
* rendered or exported as `false` / `0`. `availability` says why.
|
|
55362
55422
|
*/
|
|
55363
55423
|
var DishwasherStateSchema = _enum([
|
|
55364
55424
|
"idle",
|
|
@@ -55368,43 +55428,155 @@ var DishwasherStateSchema = _enum([
|
|
|
55368
55428
|
"error",
|
|
55369
55429
|
"unavailable"
|
|
55370
55430
|
]);
|
|
55431
|
+
/**
|
|
55432
|
+
* The appliance's own operation state, uncollapsed. `state` above is the coarse
|
|
55433
|
+
* view for compact surfaces; this is what the appliance said.
|
|
55434
|
+
*/
|
|
55435
|
+
var DishwasherOperationStateSchema = _enum([
|
|
55436
|
+
"Inactive",
|
|
55437
|
+
"Ready",
|
|
55438
|
+
"DelayedStart",
|
|
55439
|
+
"Run",
|
|
55440
|
+
"Pause",
|
|
55441
|
+
"ActionRequired",
|
|
55442
|
+
"Finished",
|
|
55443
|
+
"Error",
|
|
55444
|
+
"Aborting"
|
|
55445
|
+
]);
|
|
55446
|
+
/**
|
|
55447
|
+
* Why fields may be `null`:
|
|
55448
|
+
* - `available` — the link is up and the description is loaded;
|
|
55449
|
+
* - `offline` — the local link is down (values are unknown, not last-known);
|
|
55450
|
+
* - `description-missing` — the link is up but the appliance's description could not
|
|
55451
|
+
* be loaded, so its values cannot be decoded.
|
|
55452
|
+
*/
|
|
55453
|
+
var DishwasherAvailabilitySchema = _enum([
|
|
55454
|
+
"available",
|
|
55455
|
+
"offline",
|
|
55456
|
+
"description-missing"
|
|
55457
|
+
]);
|
|
55371
55458
|
var DishwasherConsumableLevelSchema = _enum([
|
|
55372
55459
|
"ok",
|
|
55373
55460
|
"low",
|
|
55374
55461
|
"empty"
|
|
55375
55462
|
]);
|
|
55376
55463
|
var DishwasherStatusSchema = object({
|
|
55464
|
+
availability: DishwasherAvailabilitySchema,
|
|
55465
|
+
/** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
|
|
55377
55466
|
state: DishwasherStateSchema,
|
|
55378
|
-
/**
|
|
55467
|
+
/** The appliance's operation state as reported; null when not known. */
|
|
55468
|
+
operationState: DishwasherOperationStateSchema.nullable(),
|
|
55469
|
+
/** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
|
|
55379
55470
|
program: string().nullable(),
|
|
55380
|
-
/**
|
|
55471
|
+
/** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
|
|
55472
|
+
selectedProgram: string().nullable(),
|
|
55473
|
+
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
55381
55474
|
availablePrograms: array(string()),
|
|
55382
|
-
/**
|
|
55383
|
-
|
|
55475
|
+
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
55476
|
+
remainingSeconds: number().int().nonnegative().nullable(),
|
|
55477
|
+
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
55478
|
+
delayedStartSeconds: number().int().nonnegative().nullable(),
|
|
55384
55479
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
55385
55480
|
progressPercent: number().min(0).max(100).nullable(),
|
|
55386
|
-
/** True when the door is reported open. */
|
|
55387
|
-
doorOpen: boolean(),
|
|
55388
|
-
/** True when
|
|
55389
|
-
|
|
55390
|
-
/**
|
|
55391
|
-
|
|
55481
|
+
/** True when the door is reported open; null when the door state is not known. */
|
|
55482
|
+
doorOpen: boolean().nullable(),
|
|
55483
|
+
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
55484
|
+
doorLocked: boolean().nullable(),
|
|
55485
|
+
/** True when remote start is allowed (door closed, power on, etc.); null when not known. */
|
|
55486
|
+
remoteStartAllowed: boolean().nullable(),
|
|
55487
|
+
/** True when the appliance accepts remote control now; null when not known. */
|
|
55488
|
+
remoteControlActive: boolean().nullable(),
|
|
55489
|
+
/** True while somebody operates the appliance at its panel; null when not reported. */
|
|
55490
|
+
localControlActive: boolean().nullable(),
|
|
55491
|
+
/** Main power / switched-on state; null when not known. */
|
|
55492
|
+
powerOn: boolean().nullable(),
|
|
55493
|
+
/** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
|
|
55494
|
+
powerState: string().nullable(),
|
|
55392
55495
|
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55393
55496
|
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55394
|
-
|
|
55395
|
-
|
|
55497
|
+
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
55498
|
+
halfLoad: boolean().nullable(),
|
|
55499
|
+
hygienePlus: boolean().nullable(),
|
|
55396
55500
|
/** Extra dry option when the appliance exposes it. */
|
|
55397
|
-
extraDry: boolean(),
|
|
55501
|
+
extraDry: boolean().nullable(),
|
|
55398
55502
|
/** Intensive zone (lower basket) when the appliance exposes it. */
|
|
55399
|
-
intensiveZone: boolean(),
|
|
55503
|
+
intensiveZone: boolean().nullable(),
|
|
55400
55504
|
/** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
|
|
55401
|
-
varioSpeedPlus: boolean(),
|
|
55402
|
-
/** Child lock (controls disabled on the appliance). */
|
|
55403
|
-
childLock: boolean(),
|
|
55505
|
+
varioSpeedPlus: boolean().nullable(),
|
|
55506
|
+
/** Child lock (controls disabled on the appliance); null when not known. */
|
|
55507
|
+
childLock: boolean().nullable(),
|
|
55508
|
+
/** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
|
|
55509
|
+
activeEvents: array(string()),
|
|
55510
|
+
/** Numeric error code when the appliance reports one; null otherwise. */
|
|
55404
55511
|
errorCode: number().nullable(),
|
|
55512
|
+
/** Name of the raised alert-level event while the appliance is in error; null otherwise. */
|
|
55405
55513
|
errorLabel: string().nullable(),
|
|
55514
|
+
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
55406
55515
|
lastFetchedAt: number()
|
|
55407
55516
|
});
|
|
55517
|
+
var DeviceIdSchema = number().int().nonnegative();
|
|
55518
|
+
/** A value a program option or setting can take. */
|
|
55519
|
+
var DishwasherValueSchema = union([
|
|
55520
|
+
boolean(),
|
|
55521
|
+
string(),
|
|
55522
|
+
number()
|
|
55523
|
+
]);
|
|
55524
|
+
var DishwasherAccessSchema = _enum([
|
|
55525
|
+
"none",
|
|
55526
|
+
"read",
|
|
55527
|
+
"readWrite",
|
|
55528
|
+
"writeOnly",
|
|
55529
|
+
"readStatic"
|
|
55530
|
+
]);
|
|
55531
|
+
/**
|
|
55532
|
+
* One option or setting the appliance declares, with the constraints its description
|
|
55533
|
+
* gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
|
|
55534
|
+
*/
|
|
55535
|
+
var DishwasherOptionDescriptorSchema = object({
|
|
55536
|
+
/** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
|
|
55537
|
+
key: string(),
|
|
55538
|
+
/** Last segment of the key, for display. */
|
|
55539
|
+
name: string(),
|
|
55540
|
+
type: _enum([
|
|
55541
|
+
"boolean",
|
|
55542
|
+
"number",
|
|
55543
|
+
"enum",
|
|
55544
|
+
"string"
|
|
55545
|
+
]),
|
|
55546
|
+
access: DishwasherAccessSchema,
|
|
55547
|
+
/** The appliance reports this entity as currently available. */
|
|
55548
|
+
available: boolean(),
|
|
55549
|
+
/** Unit the description declares for a number; null when it declares none. */
|
|
55550
|
+
unit: string().nullable(),
|
|
55551
|
+
min: number().nullable(),
|
|
55552
|
+
max: number().nullable(),
|
|
55553
|
+
step: number().nullable(),
|
|
55554
|
+
/** Allowed members of an enum; null for other types. */
|
|
55555
|
+
enumValues: array(string()).nullable(),
|
|
55556
|
+
defaultValue: DishwasherValueSchema.nullable()
|
|
55557
|
+
});
|
|
55558
|
+
var DishwasherProgramSchema = object({
|
|
55559
|
+
/** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
|
|
55560
|
+
key: string(),
|
|
55561
|
+
name: string(),
|
|
55562
|
+
/** The appliance currently offers this program. */
|
|
55563
|
+
available: boolean(),
|
|
55564
|
+
/** The options this program lists, with the program-level access / availability / default. */
|
|
55565
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
55566
|
+
});
|
|
55567
|
+
var DishwasherOptionsSchema = object({
|
|
55568
|
+
availability: DishwasherAvailabilitySchema,
|
|
55569
|
+
/** What the appliance can be told to do, from the commands its description declares. */
|
|
55570
|
+
supportsStart: boolean(),
|
|
55571
|
+
supportsPause: boolean(),
|
|
55572
|
+
supportsResume: boolean(),
|
|
55573
|
+
supportsStop: boolean(),
|
|
55574
|
+
supportsPower: boolean(),
|
|
55575
|
+
/** Every program the description lists, with its options. */
|
|
55576
|
+
programs: array(DishwasherProgramSchema),
|
|
55577
|
+
/** Every option and setting entity the description lists (programs reference these by key). */
|
|
55578
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
55579
|
+
});
|
|
55408
55580
|
var dishwasherCapability = {
|
|
55409
55581
|
name: "dishwasher",
|
|
55410
55582
|
scope: "device",
|
|
@@ -55412,86 +55584,102 @@ var dishwasherCapability = {
|
|
|
55412
55584
|
mode: "singleton",
|
|
55413
55585
|
deviceTypes: [DeviceType.Dishwasher],
|
|
55414
55586
|
methods: {
|
|
55415
|
-
|
|
55587
|
+
/**
|
|
55588
|
+
* Start a program. Without `program` the selected one starts. `options` are
|
|
55589
|
+
* option feature keys; each is checked against the program's constraints.
|
|
55590
|
+
*/
|
|
55591
|
+
start: method(object({
|
|
55592
|
+
deviceId: DeviceIdSchema,
|
|
55593
|
+
program: string().min(1).optional(),
|
|
55594
|
+
options: record(string(), DishwasherValueSchema).optional()
|
|
55595
|
+
}), _void(), {
|
|
55416
55596
|
kind: "mutation",
|
|
55417
55597
|
auth: "protected"
|
|
55418
55598
|
}),
|
|
55419
|
-
pause: method(object({ deviceId:
|
|
55599
|
+
pause: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55420
55600
|
kind: "mutation",
|
|
55421
55601
|
auth: "protected"
|
|
55422
55602
|
}),
|
|
55423
|
-
|
|
55603
|
+
resume: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55604
|
+
kind: "mutation",
|
|
55605
|
+
auth: "protected"
|
|
55606
|
+
}),
|
|
55607
|
+
stop: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55424
55608
|
kind: "mutation",
|
|
55425
55609
|
auth: "protected"
|
|
55426
55610
|
}),
|
|
55611
|
+
/** Select (not start) a program; refused when the appliance does not offer it. */
|
|
55427
55612
|
setProgram: method(object({
|
|
55428
|
-
deviceId:
|
|
55613
|
+
deviceId: DeviceIdSchema,
|
|
55429
55614
|
program: string().min(1)
|
|
55430
55615
|
}), _void(), {
|
|
55431
55616
|
kind: "mutation",
|
|
55432
55617
|
auth: "protected"
|
|
55433
55618
|
}),
|
|
55434
55619
|
setPower: method(object({
|
|
55435
|
-
deviceId:
|
|
55620
|
+
deviceId: DeviceIdSchema,
|
|
55436
55621
|
on: boolean()
|
|
55437
55622
|
}), _void(), {
|
|
55438
55623
|
kind: "mutation",
|
|
55439
55624
|
auth: "protected"
|
|
55440
55625
|
}),
|
|
55441
55626
|
setHalfLoad: method(object({
|
|
55442
|
-
deviceId:
|
|
55627
|
+
deviceId: DeviceIdSchema,
|
|
55443
55628
|
on: boolean()
|
|
55444
55629
|
}), _void(), {
|
|
55445
55630
|
kind: "mutation",
|
|
55446
55631
|
auth: "protected"
|
|
55447
55632
|
}),
|
|
55448
55633
|
setHygienePlus: method(object({
|
|
55449
|
-
deviceId:
|
|
55634
|
+
deviceId: DeviceIdSchema,
|
|
55450
55635
|
on: boolean()
|
|
55451
55636
|
}), _void(), {
|
|
55452
55637
|
kind: "mutation",
|
|
55453
55638
|
auth: "protected"
|
|
55454
55639
|
}),
|
|
55455
55640
|
setExtraDry: method(object({
|
|
55456
|
-
deviceId:
|
|
55641
|
+
deviceId: DeviceIdSchema,
|
|
55457
55642
|
on: boolean()
|
|
55458
55643
|
}), _void(), {
|
|
55459
55644
|
kind: "mutation",
|
|
55460
55645
|
auth: "protected"
|
|
55461
55646
|
}),
|
|
55462
55647
|
setIntensiveZone: method(object({
|
|
55463
|
-
deviceId:
|
|
55648
|
+
deviceId: DeviceIdSchema,
|
|
55464
55649
|
on: boolean()
|
|
55465
55650
|
}), _void(), {
|
|
55466
55651
|
kind: "mutation",
|
|
55467
55652
|
auth: "protected"
|
|
55468
55653
|
}),
|
|
55469
55654
|
setVarioSpeedPlus: method(object({
|
|
55470
|
-
deviceId:
|
|
55655
|
+
deviceId: DeviceIdSchema,
|
|
55471
55656
|
on: boolean()
|
|
55472
55657
|
}), _void(), {
|
|
55473
55658
|
kind: "mutation",
|
|
55474
55659
|
auth: "protected"
|
|
55475
55660
|
}),
|
|
55476
55661
|
setChildLock: method(object({
|
|
55477
|
-
deviceId:
|
|
55662
|
+
deviceId: DeviceIdSchema,
|
|
55478
55663
|
on: boolean()
|
|
55479
55664
|
}), _void(), {
|
|
55480
55665
|
kind: "mutation",
|
|
55481
55666
|
auth: "protected"
|
|
55482
55667
|
}),
|
|
55668
|
+
/**
|
|
55669
|
+
* Write any option or setting by feature key. Refused when the description does
|
|
55670
|
+
* not list it, it is not writable or not available now, or the value is outside
|
|
55671
|
+
* its declared range / members.
|
|
55672
|
+
*/
|
|
55483
55673
|
setOption: method(object({
|
|
55484
|
-
deviceId:
|
|
55674
|
+
deviceId: DeviceIdSchema,
|
|
55485
55675
|
key: string().min(1),
|
|
55486
|
-
value:
|
|
55487
|
-
boolean(),
|
|
55488
|
-
string(),
|
|
55489
|
-
number()
|
|
55490
|
-
])
|
|
55676
|
+
value: DishwasherValueSchema
|
|
55491
55677
|
}), _void(), {
|
|
55492
55678
|
kind: "mutation",
|
|
55493
55679
|
auth: "protected"
|
|
55494
|
-
})
|
|
55680
|
+
}),
|
|
55681
|
+
/** What this appliance can do, from its own description — the UI is derived from it. */
|
|
55682
|
+
getOptions: method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" })
|
|
55495
55683
|
},
|
|
55496
55684
|
status: {
|
|
55497
55685
|
schema: DishwasherStatusSchema,
|
|
@@ -69440,6 +69628,12 @@ Object.freeze({
|
|
|
69440
69628
|
addonId: null,
|
|
69441
69629
|
access: "view"
|
|
69442
69630
|
},
|
|
69631
|
+
"dishwasher.getOptions": {
|
|
69632
|
+
capName: "dishwasher",
|
|
69633
|
+
capScope: "device",
|
|
69634
|
+
addonId: null,
|
|
69635
|
+
access: "view"
|
|
69636
|
+
},
|
|
69443
69637
|
"dishwasher.getStatus": {
|
|
69444
69638
|
capName: "dishwasher",
|
|
69445
69639
|
capScope: "device",
|
|
@@ -69452,6 +69646,12 @@ Object.freeze({
|
|
|
69452
69646
|
addonId: null,
|
|
69453
69647
|
access: "create"
|
|
69454
69648
|
},
|
|
69649
|
+
"dishwasher.resume": {
|
|
69650
|
+
capName: "dishwasher",
|
|
69651
|
+
capScope: "device",
|
|
69652
|
+
addonId: null,
|
|
69653
|
+
access: "create"
|
|
69654
|
+
},
|
|
69455
69655
|
"dishwasher.setChildLock": {
|
|
69456
69656
|
capName: "dishwasher",
|
|
69457
69657
|
capScope: "device",
|
|
@@ -73952,6 +74152,12 @@ Object.freeze({
|
|
|
73952
74152
|
addonId: null,
|
|
73953
74153
|
access: "view"
|
|
73954
74154
|
},
|
|
74155
|
+
"storageMigration.moverClearance": {
|
|
74156
|
+
capName: "storage-migration",
|
|
74157
|
+
capScope: "system",
|
|
74158
|
+
addonId: null,
|
|
74159
|
+
access: "view"
|
|
74160
|
+
},
|
|
73955
74161
|
"storageMigration.movers": {
|
|
73956
74162
|
capName: "storage-migration",
|
|
73957
74163
|
capScope: "system",
|
|
@@ -76145,6 +76351,11 @@ Object.freeze({
|
|
|
76145
76351
|
form: "single",
|
|
76146
76352
|
optional: false
|
|
76147
76353
|
}],
|
|
76354
|
+
"dishwasher.getOptions": [{
|
|
76355
|
+
name: "deviceId",
|
|
76356
|
+
form: "single",
|
|
76357
|
+
optional: false
|
|
76358
|
+
}],
|
|
76148
76359
|
"dishwasher.getStatus": [{
|
|
76149
76360
|
name: "deviceId",
|
|
76150
76361
|
form: "single",
|
|
@@ -76155,6 +76366,11 @@ Object.freeze({
|
|
|
76155
76366
|
form: "single",
|
|
76156
76367
|
optional: false
|
|
76157
76368
|
}],
|
|
76369
|
+
"dishwasher.resume": [{
|
|
76370
|
+
name: "deviceId",
|
|
76371
|
+
form: "single",
|
|
76372
|
+
optional: false
|
|
76373
|
+
}],
|
|
76158
76374
|
"dishwasher.setChildLock": [{
|
|
76159
76375
|
name: "deviceId",
|
|
76160
76376
|
form: "single",
|
|
@@ -78241,6 +78457,9 @@ new Map(Object.entries({
|
|
|
78241
78457
|
"wrapper-update-available": "system",
|
|
78242
78458
|
"backup-completed": "system",
|
|
78243
78459
|
"export-completed": "system",
|
|
78460
|
+
"alert-critical": "system",
|
|
78461
|
+
"alert-error": "system",
|
|
78462
|
+
"alert-critical-resolved": "system",
|
|
78244
78463
|
"storage-location-low": "system",
|
|
78245
78464
|
"storage-location-critical": "system",
|
|
78246
78465
|
"storage-location-ok": "system",
|
|
@@ -78365,6 +78584,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
78365
78584
|
"storage-location-ok"
|
|
78366
78585
|
]
|
|
78367
78586
|
},
|
|
78587
|
+
{
|
|
78588
|
+
id: "alerts",
|
|
78589
|
+
family: "system",
|
|
78590
|
+
label: "Alerts",
|
|
78591
|
+
kinds: [
|
|
78592
|
+
"alert-critical",
|
|
78593
|
+
"alert-error",
|
|
78594
|
+
"alert-critical-resolved"
|
|
78595
|
+
]
|
|
78596
|
+
},
|
|
78368
78597
|
{
|
|
78369
78598
|
id: "alarm",
|
|
78370
78599
|
family: "alarm",
|
|
@@ -78409,6 +78638,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
|
|
|
78409
78638
|
return [[descriptor.kind, field]];
|
|
78410
78639
|
})));
|
|
78411
78640
|
Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
|
|
78641
|
+
object({
|
|
78642
|
+
phase: _enum(["raised", "resolved"]),
|
|
78643
|
+
episodeId: string().min(1),
|
|
78644
|
+
alertId: string().min(1),
|
|
78645
|
+
severity: AlertSeveritySchema,
|
|
78646
|
+
category: string(),
|
|
78647
|
+
title: string(),
|
|
78648
|
+
message: string(),
|
|
78649
|
+
sourceType: string().optional(),
|
|
78650
|
+
sourceId: string().optional(),
|
|
78651
|
+
nodeId: string().optional(),
|
|
78652
|
+
/** The alert's own action link (where the operator acts on it), when it has one. */
|
|
78653
|
+
actionUrl: string().optional(),
|
|
78654
|
+
at: number()
|
|
78655
|
+
});
|
|
78412
78656
|
var RULE_BODY_ONLY = ["body"];
|
|
78413
78657
|
var RULE_TEXT = ["title", "body"];
|
|
78414
78658
|
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
@@ -78418,6 +78662,11 @@ var TANK = [
|
|
|
78418
78662
|
"device-tank-full",
|
|
78419
78663
|
"device-tank-normal"
|
|
78420
78664
|
];
|
|
78665
|
+
var ALERT_EPISODE = [
|
|
78666
|
+
"alert-critical",
|
|
78667
|
+
"alert-error",
|
|
78668
|
+
"alert-critical-resolved"
|
|
78669
|
+
];
|
|
78421
78670
|
var UPDATES = [
|
|
78422
78671
|
"addon-update-available",
|
|
78423
78672
|
"server-update-available",
|
|
@@ -78610,14 +78859,14 @@ var STATE_SUMMARY_VARS = [
|
|
|
78610
78859
|
([...RULE_TEXT], [...CONSUMABLE]),
|
|
78611
78860
|
([...RULE_TEXT], [...TANK]),
|
|
78612
78861
|
[...RULE_TEXT],
|
|
78613
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
78614
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
78615
|
-
[...RULE_TEXT],
|
|
78862
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
78863
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
78616
78864
|
[...RULE_TEXT],
|
|
78617
78865
|
[...RULE_TEXT],
|
|
78618
78866
|
[...RULE_TEXT],
|
|
78619
78867
|
[...RULE_TEXT],
|
|
78620
78868
|
[...RULE_TEXT],
|
|
78869
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78621
78870
|
[...RULE_TEXT],
|
|
78622
78871
|
[...RULE_TEXT],
|
|
78623
78872
|
[...RULE_TEXT],
|
|
@@ -78635,7 +78884,11 @@ var STATE_SUMMARY_VARS = [
|
|
|
78635
78884
|
[...RULE_TEXT],
|
|
78636
78885
|
[...RULE_TEXT],
|
|
78637
78886
|
[...RULE_TEXT],
|
|
78638
|
-
[...RULE_TEXT],
|
|
78887
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78888
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78889
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78890
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78891
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78639
78892
|
[...RULE_TEXT],
|
|
78640
78893
|
[...RULE_TEXT],
|
|
78641
78894
|
[...RULE_TEXT],
|