@camstack/addon-provider-dreo 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.js
CHANGED
|
@@ -35,7 +35,7 @@ var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["modu
|
|
|
35
35
|
//#endregion
|
|
36
36
|
let crypto$1 = require("crypto");
|
|
37
37
|
let events = require("events");
|
|
38
|
-
//#region ../types/dist/event-category-
|
|
38
|
+
//#region ../types/dist/event-category-DOl51-Ij.mjs
|
|
39
39
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
40
40
|
EventCategory["SystemBoot"] = "system.boot";
|
|
41
41
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -114,9 +114,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
114
114
|
/**
|
|
115
115
|
* The node's one-shot runner boot check (D877): planned runners against the
|
|
116
116
|
* process service, `degraded` when any is failed, refused or missing. The
|
|
117
|
-
* alert centre turns it into one
|
|
117
|
+
* alert centre turns it into one critical alert.
|
|
118
118
|
*/
|
|
119
119
|
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
120
|
+
/**
|
|
121
|
+
* An alert EPISODE opened or closed, emitted by the alert centre for alerts
|
|
122
|
+
* of severity `critical` or `error` (`AlertEpisodePayload`). The alert
|
|
123
|
+
* centre sends no notification of its own: Notification Center turns this
|
|
124
|
+
* into the `alert-critical` / `alert-error` / `alert-critical-resolved`
|
|
125
|
+
* system-event kinds, and reconciles from the alerts store because a bus
|
|
126
|
+
* event may be dropped (D8, D11).
|
|
127
|
+
*/
|
|
128
|
+
EventCategory["AlertEpisode"] = "alert.episode";
|
|
120
129
|
EventCategory["AddonError"] = "addon.error";
|
|
121
130
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
122
131
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -5441,7 +5450,7 @@ var ZodIssueCode = {
|
|
|
5441
5450
|
var ZodFirstPartyTypeKind;
|
|
5442
5451
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5443
5452
|
//#endregion
|
|
5444
|
-
//#region ../types/dist/sleep-
|
|
5453
|
+
//#region ../types/dist/sleep-BxjU_fJM.mjs
|
|
5445
5454
|
/**
|
|
5446
5455
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5447
5456
|
* window to float samples (D455).
|
|
@@ -7823,6 +7832,12 @@ function normalizeAddonInitResult(result) {
|
|
|
7823
7832
|
if (Array.isArray(result)) return { providers: result };
|
|
7824
7833
|
return result;
|
|
7825
7834
|
}
|
|
7835
|
+
/**
|
|
7836
|
+
* The share-view scope kinds a `csv_*` share token can carry. The hub mints
|
|
7837
|
+
* and validates them (`share-token.service.ts` builds its enum from this
|
|
7838
|
+
* list); a data plane names the kinds it ACCEPTS in `share`.
|
|
7839
|
+
*/
|
|
7840
|
+
var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
|
|
7826
7841
|
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
7827
7842
|
var PeerBytesTicketSchema = object({
|
|
7828
7843
|
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
@@ -12488,6 +12503,229 @@ var ConvertResultSchema = object({
|
|
|
12488
12503
|
files: array(string()).readonly()
|
|
12489
12504
|
})).readonly()
|
|
12490
12505
|
});
|
|
12506
|
+
/**
|
|
12507
|
+
* Zod schemas for persisted record types.
|
|
12508
|
+
*
|
|
12509
|
+
* These schemas serve as the single source of truth for types that are
|
|
12510
|
+
* stored in the settings-store backend and retrieved via tRPC. They
|
|
12511
|
+
* replace the manual TypeScript interfaces with schema-derived types,
|
|
12512
|
+
* enabling runtime validation when reading from the backend.
|
|
12513
|
+
*
|
|
12514
|
+
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
12515
|
+
* keeps the original name for backward compatibility.
|
|
12516
|
+
*/
|
|
12517
|
+
/**
|
|
12518
|
+
* Auth model (v2 — 2026-05-12 caps-only):
|
|
12519
|
+
*
|
|
12520
|
+
* Two principals:
|
|
12521
|
+
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
12522
|
+
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
12523
|
+
*
|
|
12524
|
+
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
12525
|
+
* `super_admin` — collapsed onto the single boolean because every
|
|
12526
|
+
* non-admin caller is governed by the same scope-check rules; the
|
|
12527
|
+
* distinction was only ever used to route role-specific procedures
|
|
12528
|
+
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
12529
|
+
* with `isAdmin: false` + an explicit scope list.
|
|
12530
|
+
*/
|
|
12531
|
+
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
12532
|
+
var MethodAccessSchema = _enum([
|
|
12533
|
+
"view",
|
|
12534
|
+
"create",
|
|
12535
|
+
"delete"
|
|
12536
|
+
]);
|
|
12537
|
+
/**
|
|
12538
|
+
* A single scope grant. Three forms — checked in matcher with OR
|
|
12539
|
+
* semantics; the first match decides whether the call passes:
|
|
12540
|
+
*
|
|
12541
|
+
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
12542
|
+
* cap with the matching `scope` declaration. New caps inherit grants
|
|
12543
|
+
* automatically — adding a device cap to the codebase makes it
|
|
12544
|
+
* reachable to every user with `category:device [...]` without a
|
|
12545
|
+
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
12546
|
+
*
|
|
12547
|
+
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
12548
|
+
* useful when an integration needs to interact with one specific
|
|
12549
|
+
* addon's surface regardless of how many caps it exports.
|
|
12550
|
+
*
|
|
12551
|
+
* - `capability` — the most precise form. Single cap name. Use for
|
|
12552
|
+
* integration tokens where you want to grant `addons.installPackage`
|
|
12553
|
+
* and nothing else.
|
|
12554
|
+
*
|
|
12555
|
+
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
12556
|
+
* "give me everything" escape; there is no wildcard scope.
|
|
12557
|
+
*/
|
|
12558
|
+
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
12559
|
+
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
12560
|
+
var CapScopeSchema = _enum(["device", "system"]);
|
|
12561
|
+
/**
|
|
12562
|
+
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
12563
|
+
*
|
|
12564
|
+
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
12565
|
+
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
12566
|
+
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
12567
|
+
* AFTER the grant was minted — no re-grant, no re-login.
|
|
12568
|
+
*
|
|
12569
|
+
* - `all` — every device in the deployment. The broad viewer/operator
|
|
12570
|
+
* lever without a `category` grant (a `category` grant also covers device
|
|
12571
|
+
* caps that carry no deviceId; `all` is specifically the device set).
|
|
12572
|
+
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
12573
|
+
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
12574
|
+
* is NOT covered until the grant is edited.
|
|
12575
|
+
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
12576
|
+
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
12577
|
+
* re-resolves on the next request.
|
|
12578
|
+
* - `locations` — every device whose operator-assigned `location` label is
|
|
12579
|
+
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
12580
|
+
* null/unset location matches NO `locations` selector.
|
|
12581
|
+
*/
|
|
12582
|
+
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
12583
|
+
object({ kind: literal("all") }),
|
|
12584
|
+
object({
|
|
12585
|
+
kind: literal("ids"),
|
|
12586
|
+
ids: array(number().int()).min(1)
|
|
12587
|
+
}),
|
|
12588
|
+
object({
|
|
12589
|
+
kind: literal("types"),
|
|
12590
|
+
types: array(_enum(DeviceType)).min(1)
|
|
12591
|
+
}),
|
|
12592
|
+
object({
|
|
12593
|
+
kind: literal("locations"),
|
|
12594
|
+
locations: array(string().min(1)).min(1)
|
|
12595
|
+
})
|
|
12596
|
+
]);
|
|
12597
|
+
var DeviceTokenScopeSchema = object({
|
|
12598
|
+
type: literal("device"),
|
|
12599
|
+
/** The device SET this grant covers — resolved against the live fleet. */
|
|
12600
|
+
selector: DeviceSelectorSchema,
|
|
12601
|
+
access: array(MethodAccessSchema).min(1),
|
|
12602
|
+
/**
|
|
12603
|
+
* Whether a grant on a PARENT device transparently covers its accessory
|
|
12604
|
+
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
12605
|
+
* Direction is parent → children ONLY.
|
|
12606
|
+
*
|
|
12607
|
+
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
12608
|
+
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
12609
|
+
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
12610
|
+
* operator must grant on the child, not inherit from the parent). Set it
|
|
12611
|
+
* explicitly to override that default per grant.
|
|
12612
|
+
*/
|
|
12613
|
+
includeLinked: boolean().optional()
|
|
12614
|
+
});
|
|
12615
|
+
/**
|
|
12616
|
+
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
12617
|
+
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
12618
|
+
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
12619
|
+
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
12620
|
+
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
12621
|
+
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
12622
|
+
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
12623
|
+
* migration covers both without a flag day. No cast — the raw object is read
|
|
12624
|
+
* through `Reflect.get` (its static type is `unknown`).
|
|
12625
|
+
*/
|
|
12626
|
+
function migrateLegacyTokenScope(raw) {
|
|
12627
|
+
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
12628
|
+
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
12629
|
+
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
12630
|
+
const targets = Reflect.get(raw, "targets");
|
|
12631
|
+
if (!Array.isArray(targets)) return raw;
|
|
12632
|
+
return {
|
|
12633
|
+
type: "device",
|
|
12634
|
+
selector: {
|
|
12635
|
+
kind: "ids",
|
|
12636
|
+
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
12637
|
+
},
|
|
12638
|
+
access: Reflect.get(raw, "access")
|
|
12639
|
+
};
|
|
12640
|
+
}
|
|
12641
|
+
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
12642
|
+
object({
|
|
12643
|
+
type: literal("category"),
|
|
12644
|
+
target: CapScopeSchema,
|
|
12645
|
+
access: array(MethodAccessSchema).min(1)
|
|
12646
|
+
}),
|
|
12647
|
+
object({
|
|
12648
|
+
type: literal("capability"),
|
|
12649
|
+
target: string(),
|
|
12650
|
+
access: array(MethodAccessSchema).min(1)
|
|
12651
|
+
}),
|
|
12652
|
+
object({
|
|
12653
|
+
type: literal("addon"),
|
|
12654
|
+
target: string(),
|
|
12655
|
+
access: array(MethodAccessSchema).min(1)
|
|
12656
|
+
}),
|
|
12657
|
+
DeviceTokenScopeSchema
|
|
12658
|
+
]));
|
|
12659
|
+
object({
|
|
12660
|
+
id: string(),
|
|
12661
|
+
username: string(),
|
|
12662
|
+
passwordHash: string(),
|
|
12663
|
+
/**
|
|
12664
|
+
* Admin bypass. When true, the middleware skips the scope-access
|
|
12665
|
+
* check entirely. There is no other axis of privilege; the legacy
|
|
12666
|
+
* role enum collapsed onto this boolean in v2.
|
|
12667
|
+
*/
|
|
12668
|
+
isAdmin: boolean().default(false),
|
|
12669
|
+
allowedProviders: AllowedProviderSchema,
|
|
12670
|
+
allowedDevices: AllowedDevicesSchema,
|
|
12671
|
+
/**
|
|
12672
|
+
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
12673
|
+
* ignored. Non-admins without scopes are locked out of every
|
|
12674
|
+
* protected call.
|
|
12675
|
+
*/
|
|
12676
|
+
scopes: array(TokenScopeSchema).default([]),
|
|
12677
|
+
createdAt: number(),
|
|
12678
|
+
updatedAt: number()
|
|
12679
|
+
});
|
|
12680
|
+
object({
|
|
12681
|
+
id: string(),
|
|
12682
|
+
label: string(),
|
|
12683
|
+
isAdmin: boolean().default(false),
|
|
12684
|
+
allowedProviders: AllowedProviderSchema,
|
|
12685
|
+
allowedDevices: AllowedDevicesSchema,
|
|
12686
|
+
tokenHash: string(),
|
|
12687
|
+
tokenPrefix: string(),
|
|
12688
|
+
createdAt: number(),
|
|
12689
|
+
lastUsedAt: number().optional()
|
|
12690
|
+
});
|
|
12691
|
+
object({
|
|
12692
|
+
id: string(),
|
|
12693
|
+
userId: string(),
|
|
12694
|
+
name: string(),
|
|
12695
|
+
tokenHash: string(),
|
|
12696
|
+
tokenPrefix: string(),
|
|
12697
|
+
scopes: array(TokenScopeSchema),
|
|
12698
|
+
expiresAt: number().nullish(),
|
|
12699
|
+
lastUsedAt: number().nullish(),
|
|
12700
|
+
createdAt: number()
|
|
12701
|
+
});
|
|
12702
|
+
/** What a share-view grant lets its holder see. */
|
|
12703
|
+
var ShareViewGrantSchema = object({
|
|
12704
|
+
kind: _enum(SHARE_VIEW_KINDS),
|
|
12705
|
+
deviceIds: array(number().int().nonnegative()).min(1).max(64),
|
|
12706
|
+
/** Talk-back, opt-in at mint time; absent means off. */
|
|
12707
|
+
talk: boolean().optional()
|
|
12708
|
+
});
|
|
12709
|
+
var ShareViewScopeSchema = object({
|
|
12710
|
+
type: literal("share-view"),
|
|
12711
|
+
grant: ShareViewGrantSchema
|
|
12712
|
+
});
|
|
12713
|
+
var AddonRoutesScopeSchema = object({
|
|
12714
|
+
type: literal("addon-routes"),
|
|
12715
|
+
access: array(MethodAccessSchema).min(1)
|
|
12716
|
+
});
|
|
12717
|
+
var CredentialScopeSchema = union([
|
|
12718
|
+
literal("*"),
|
|
12719
|
+
ShareViewScopeSchema,
|
|
12720
|
+
AddonRoutesScopeSchema,
|
|
12721
|
+
TokenScopeSchema
|
|
12722
|
+
]);
|
|
12723
|
+
object({
|
|
12724
|
+
kind: literal("credential"),
|
|
12725
|
+
sub: string().min(1),
|
|
12726
|
+
jti: string().min(16),
|
|
12727
|
+
scopes: array(CredentialScopeSchema).min(1)
|
|
12728
|
+
});
|
|
12491
12729
|
_enum(["new-session", "step-up"]);
|
|
12492
12730
|
/** The languages the hub's app landing pages are written in (D858). */
|
|
12493
12731
|
var AppPageLangSchema = _enum(["en", "it"]);
|
|
@@ -13204,7 +13442,14 @@ var AlertSeveritySchema = _enum([
|
|
|
13204
13442
|
]);
|
|
13205
13443
|
var AlertActionSchema = object({
|
|
13206
13444
|
label: string(),
|
|
13207
|
-
href: string().optional()
|
|
13445
|
+
href: string().optional(),
|
|
13446
|
+
/**
|
|
13447
|
+
* How `href` is followed. Absent / `app`: an admin-ui route (client-side).
|
|
13448
|
+
* `server`: a route the HUB serves (an addon HTTP route such as an OAuth
|
|
13449
|
+
* start) — the browser must leave the SPA with a full navigation, because
|
|
13450
|
+
* the SPA has no such route and would bounce to the home page.
|
|
13451
|
+
*/
|
|
13452
|
+
navigation: _enum(["app", "server"]).optional()
|
|
13208
13453
|
});
|
|
13209
13454
|
var AlertStatusSchema = _enum([
|
|
13210
13455
|
"active",
|
|
@@ -41937,6 +42182,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
41937
42182
|
"server-updated",
|
|
41938
42183
|
"export-completed",
|
|
41939
42184
|
"backup-completed",
|
|
42185
|
+
"alert-critical",
|
|
42186
|
+
"alert-error",
|
|
42187
|
+
"alert-critical-resolved",
|
|
41940
42188
|
"camera-online",
|
|
41941
42189
|
"camera-offline",
|
|
41942
42190
|
"camera-disabled",
|
|
@@ -43972,202 +44220,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
43972
44220
|
auth: "admin"
|
|
43973
44221
|
}), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
|
|
43974
44222
|
/**
|
|
43975
|
-
* Zod schemas for persisted record types.
|
|
43976
|
-
*
|
|
43977
|
-
* These schemas serve as the single source of truth for types that are
|
|
43978
|
-
* stored in the settings-store backend and retrieved via tRPC. They
|
|
43979
|
-
* replace the manual TypeScript interfaces with schema-derived types,
|
|
43980
|
-
* enabling runtime validation when reading from the backend.
|
|
43981
|
-
*
|
|
43982
|
-
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
43983
|
-
* keeps the original name for backward compatibility.
|
|
43984
|
-
*/
|
|
43985
|
-
/**
|
|
43986
|
-
* Auth model (v2 — 2026-05-12 caps-only):
|
|
43987
|
-
*
|
|
43988
|
-
* Two principals:
|
|
43989
|
-
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
43990
|
-
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
43991
|
-
*
|
|
43992
|
-
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
43993
|
-
* `super_admin` — collapsed onto the single boolean because every
|
|
43994
|
-
* non-admin caller is governed by the same scope-check rules; the
|
|
43995
|
-
* distinction was only ever used to route role-specific procedures
|
|
43996
|
-
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
43997
|
-
* with `isAdmin: false` + an explicit scope list.
|
|
43998
|
-
*/
|
|
43999
|
-
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
44000
|
-
var MethodAccessSchema = _enum([
|
|
44001
|
-
"view",
|
|
44002
|
-
"create",
|
|
44003
|
-
"delete"
|
|
44004
|
-
]);
|
|
44005
|
-
/**
|
|
44006
|
-
* A single scope grant. Three forms — checked in matcher with OR
|
|
44007
|
-
* semantics; the first match decides whether the call passes:
|
|
44008
|
-
*
|
|
44009
|
-
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
44010
|
-
* cap with the matching `scope` declaration. New caps inherit grants
|
|
44011
|
-
* automatically — adding a device cap to the codebase makes it
|
|
44012
|
-
* reachable to every user with `category:device [...]` without a
|
|
44013
|
-
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
44014
|
-
*
|
|
44015
|
-
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
44016
|
-
* useful when an integration needs to interact with one specific
|
|
44017
|
-
* addon's surface regardless of how many caps it exports.
|
|
44018
|
-
*
|
|
44019
|
-
* - `capability` — the most precise form. Single cap name. Use for
|
|
44020
|
-
* integration tokens where you want to grant `addons.installPackage`
|
|
44021
|
-
* and nothing else.
|
|
44022
|
-
*
|
|
44023
|
-
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
44024
|
-
* "give me everything" escape; there is no wildcard scope.
|
|
44025
|
-
*/
|
|
44026
|
-
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
44027
|
-
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
44028
|
-
var CapScopeSchema = _enum(["device", "system"]);
|
|
44029
|
-
/**
|
|
44030
|
-
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
44031
|
-
*
|
|
44032
|
-
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
44033
|
-
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
44034
|
-
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
44035
|
-
* AFTER the grant was minted — no re-grant, no re-login.
|
|
44036
|
-
*
|
|
44037
|
-
* - `all` — every device in the deployment. The broad viewer/operator
|
|
44038
|
-
* lever without a `category` grant (a `category` grant also covers device
|
|
44039
|
-
* caps that carry no deviceId; `all` is specifically the device set).
|
|
44040
|
-
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
44041
|
-
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
44042
|
-
* is NOT covered until the grant is edited.
|
|
44043
|
-
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
44044
|
-
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
44045
|
-
* re-resolves on the next request.
|
|
44046
|
-
* - `locations` — every device whose operator-assigned `location` label is
|
|
44047
|
-
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
44048
|
-
* null/unset location matches NO `locations` selector.
|
|
44049
|
-
*/
|
|
44050
|
-
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
44051
|
-
object({ kind: literal("all") }),
|
|
44052
|
-
object({
|
|
44053
|
-
kind: literal("ids"),
|
|
44054
|
-
ids: array(number().int()).min(1)
|
|
44055
|
-
}),
|
|
44056
|
-
object({
|
|
44057
|
-
kind: literal("types"),
|
|
44058
|
-
types: array(_enum(DeviceType)).min(1)
|
|
44059
|
-
}),
|
|
44060
|
-
object({
|
|
44061
|
-
kind: literal("locations"),
|
|
44062
|
-
locations: array(string().min(1)).min(1)
|
|
44063
|
-
})
|
|
44064
|
-
]);
|
|
44065
|
-
var DeviceTokenScopeSchema = object({
|
|
44066
|
-
type: literal("device"),
|
|
44067
|
-
/** The device SET this grant covers — resolved against the live fleet. */
|
|
44068
|
-
selector: DeviceSelectorSchema,
|
|
44069
|
-
access: array(MethodAccessSchema).min(1),
|
|
44070
|
-
/**
|
|
44071
|
-
* Whether a grant on a PARENT device transparently covers its accessory
|
|
44072
|
-
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
44073
|
-
* Direction is parent → children ONLY.
|
|
44074
|
-
*
|
|
44075
|
-
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
44076
|
-
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
44077
|
-
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
44078
|
-
* operator must grant on the child, not inherit from the parent). Set it
|
|
44079
|
-
* explicitly to override that default per grant.
|
|
44080
|
-
*/
|
|
44081
|
-
includeLinked: boolean().optional()
|
|
44082
|
-
});
|
|
44083
|
-
/**
|
|
44084
|
-
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
44085
|
-
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
44086
|
-
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
44087
|
-
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
44088
|
-
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
44089
|
-
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
44090
|
-
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
44091
|
-
* migration covers both without a flag day. No cast — the raw object is read
|
|
44092
|
-
* through `Reflect.get` (its static type is `unknown`).
|
|
44093
|
-
*/
|
|
44094
|
-
function migrateLegacyTokenScope(raw) {
|
|
44095
|
-
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
44096
|
-
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
44097
|
-
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
44098
|
-
const targets = Reflect.get(raw, "targets");
|
|
44099
|
-
if (!Array.isArray(targets)) return raw;
|
|
44100
|
-
return {
|
|
44101
|
-
type: "device",
|
|
44102
|
-
selector: {
|
|
44103
|
-
kind: "ids",
|
|
44104
|
-
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
44105
|
-
},
|
|
44106
|
-
access: Reflect.get(raw, "access")
|
|
44107
|
-
};
|
|
44108
|
-
}
|
|
44109
|
-
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
44110
|
-
object({
|
|
44111
|
-
type: literal("category"),
|
|
44112
|
-
target: CapScopeSchema,
|
|
44113
|
-
access: array(MethodAccessSchema).min(1)
|
|
44114
|
-
}),
|
|
44115
|
-
object({
|
|
44116
|
-
type: literal("capability"),
|
|
44117
|
-
target: string(),
|
|
44118
|
-
access: array(MethodAccessSchema).min(1)
|
|
44119
|
-
}),
|
|
44120
|
-
object({
|
|
44121
|
-
type: literal("addon"),
|
|
44122
|
-
target: string(),
|
|
44123
|
-
access: array(MethodAccessSchema).min(1)
|
|
44124
|
-
}),
|
|
44125
|
-
DeviceTokenScopeSchema
|
|
44126
|
-
]));
|
|
44127
|
-
object({
|
|
44128
|
-
id: string(),
|
|
44129
|
-
username: string(),
|
|
44130
|
-
passwordHash: string(),
|
|
44131
|
-
/**
|
|
44132
|
-
* Admin bypass. When true, the middleware skips the scope-access
|
|
44133
|
-
* check entirely. There is no other axis of privilege; the legacy
|
|
44134
|
-
* role enum collapsed onto this boolean in v2.
|
|
44135
|
-
*/
|
|
44136
|
-
isAdmin: boolean().default(false),
|
|
44137
|
-
allowedProviders: AllowedProviderSchema,
|
|
44138
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44139
|
-
/**
|
|
44140
|
-
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
44141
|
-
* ignored. Non-admins without scopes are locked out of every
|
|
44142
|
-
* protected call.
|
|
44143
|
-
*/
|
|
44144
|
-
scopes: array(TokenScopeSchema).default([]),
|
|
44145
|
-
createdAt: number(),
|
|
44146
|
-
updatedAt: number()
|
|
44147
|
-
});
|
|
44148
|
-
object({
|
|
44149
|
-
id: string(),
|
|
44150
|
-
label: string(),
|
|
44151
|
-
isAdmin: boolean().default(false),
|
|
44152
|
-
allowedProviders: AllowedProviderSchema,
|
|
44153
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44154
|
-
tokenHash: string(),
|
|
44155
|
-
tokenPrefix: string(),
|
|
44156
|
-
createdAt: number(),
|
|
44157
|
-
lastUsedAt: number().optional()
|
|
44158
|
-
});
|
|
44159
|
-
object({
|
|
44160
|
-
id: string(),
|
|
44161
|
-
userId: string(),
|
|
44162
|
-
name: string(),
|
|
44163
|
-
tokenHash: string(),
|
|
44164
|
-
tokenPrefix: string(),
|
|
44165
|
-
scopes: array(TokenScopeSchema),
|
|
44166
|
-
expiresAt: number().nullish(),
|
|
44167
|
-
lastUsedAt: number().nullish(),
|
|
44168
|
-
createdAt: number()
|
|
44169
|
-
});
|
|
44170
|
-
/**
|
|
44171
44223
|
* `oauth-integration` — a collection cap by which an addon declares
|
|
44172
44224
|
* itself a linkable OAuth client of the hub's core `/oauth2/*` server.
|
|
44173
44225
|
* Each provider returns a static descriptor; the core enumerates them
|
|
@@ -51013,7 +51065,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
51013
51065
|
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
51014
51066
|
kind: "mutation",
|
|
51015
51067
|
auth: "admin"
|
|
51016
|
-
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({
|
|
51068
|
+
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
|
|
51069
|
+
clear: boolean(),
|
|
51070
|
+
repointLocationId: string().optional()
|
|
51071
|
+
}), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
|
|
51017
51072
|
kind: "mutation",
|
|
51018
51073
|
auth: "admin"
|
|
51019
51074
|
}), method(StorageCleanupInputSchema, object({ jobId: string() }), {
|
|
@@ -55277,6 +55332,11 @@ onStatusChanged: { data: object({
|
|
|
55277
55332
|
*
|
|
55278
55333
|
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
55279
55334
|
* provider refreshes the slice on an interval and eagerly after commands.
|
|
55335
|
+
*
|
|
55336
|
+
* UNKNOWN IS NOT OFF. Every field the appliance reports separately is
|
|
55337
|
+
* nullable: `null` means "not known right now" (the appliance has not said,
|
|
55338
|
+
* the link is down, or the description does not carry it) and is never
|
|
55339
|
+
* rendered or exported as `false` / `0`. `availability` says why.
|
|
55280
55340
|
*/
|
|
55281
55341
|
var DishwasherStateSchema = _enum([
|
|
55282
55342
|
"idle",
|
|
@@ -55286,43 +55346,155 @@ var DishwasherStateSchema = _enum([
|
|
|
55286
55346
|
"error",
|
|
55287
55347
|
"unavailable"
|
|
55288
55348
|
]);
|
|
55349
|
+
/**
|
|
55350
|
+
* The appliance's own operation state, uncollapsed. `state` above is the coarse
|
|
55351
|
+
* view for compact surfaces; this is what the appliance said.
|
|
55352
|
+
*/
|
|
55353
|
+
var DishwasherOperationStateSchema = _enum([
|
|
55354
|
+
"Inactive",
|
|
55355
|
+
"Ready",
|
|
55356
|
+
"DelayedStart",
|
|
55357
|
+
"Run",
|
|
55358
|
+
"Pause",
|
|
55359
|
+
"ActionRequired",
|
|
55360
|
+
"Finished",
|
|
55361
|
+
"Error",
|
|
55362
|
+
"Aborting"
|
|
55363
|
+
]);
|
|
55364
|
+
/**
|
|
55365
|
+
* Why fields may be `null`:
|
|
55366
|
+
* - `available` — the link is up and the description is loaded;
|
|
55367
|
+
* - `offline` — the local link is down (values are unknown, not last-known);
|
|
55368
|
+
* - `description-missing` — the link is up but the appliance's description could not
|
|
55369
|
+
* be loaded, so its values cannot be decoded.
|
|
55370
|
+
*/
|
|
55371
|
+
var DishwasherAvailabilitySchema = _enum([
|
|
55372
|
+
"available",
|
|
55373
|
+
"offline",
|
|
55374
|
+
"description-missing"
|
|
55375
|
+
]);
|
|
55289
55376
|
var DishwasherConsumableLevelSchema = _enum([
|
|
55290
55377
|
"ok",
|
|
55291
55378
|
"low",
|
|
55292
55379
|
"empty"
|
|
55293
55380
|
]);
|
|
55294
55381
|
var DishwasherStatusSchema = object({
|
|
55382
|
+
availability: DishwasherAvailabilitySchema,
|
|
55383
|
+
/** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
|
|
55295
55384
|
state: DishwasherStateSchema,
|
|
55296
|
-
/**
|
|
55385
|
+
/** The appliance's operation state as reported; null when not known. */
|
|
55386
|
+
operationState: DishwasherOperationStateSchema.nullable(),
|
|
55387
|
+
/** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
|
|
55297
55388
|
program: string().nullable(),
|
|
55298
|
-
/**
|
|
55389
|
+
/** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
|
|
55390
|
+
selectedProgram: string().nullable(),
|
|
55391
|
+
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
55299
55392
|
availablePrograms: array(string()),
|
|
55300
|
-
/**
|
|
55301
|
-
|
|
55393
|
+
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
55394
|
+
remainingSeconds: number().int().nonnegative().nullable(),
|
|
55395
|
+
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
55396
|
+
delayedStartSeconds: number().int().nonnegative().nullable(),
|
|
55302
55397
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
55303
55398
|
progressPercent: number().min(0).max(100).nullable(),
|
|
55304
|
-
/** True when the door is reported open. */
|
|
55305
|
-
doorOpen: boolean(),
|
|
55306
|
-
/** True when
|
|
55307
|
-
|
|
55308
|
-
/**
|
|
55309
|
-
|
|
55399
|
+
/** True when the door is reported open; null when the door state is not known. */
|
|
55400
|
+
doorOpen: boolean().nullable(),
|
|
55401
|
+
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
55402
|
+
doorLocked: boolean().nullable(),
|
|
55403
|
+
/** True when remote start is allowed (door closed, power on, etc.); null when not known. */
|
|
55404
|
+
remoteStartAllowed: boolean().nullable(),
|
|
55405
|
+
/** True when the appliance accepts remote control now; null when not known. */
|
|
55406
|
+
remoteControlActive: boolean().nullable(),
|
|
55407
|
+
/** True while somebody operates the appliance at its panel; null when not reported. */
|
|
55408
|
+
localControlActive: boolean().nullable(),
|
|
55409
|
+
/** Main power / switched-on state; null when not known. */
|
|
55410
|
+
powerOn: boolean().nullable(),
|
|
55411
|
+
/** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
|
|
55412
|
+
powerState: string().nullable(),
|
|
55310
55413
|
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55311
55414
|
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55312
|
-
|
|
55313
|
-
|
|
55415
|
+
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
55416
|
+
halfLoad: boolean().nullable(),
|
|
55417
|
+
hygienePlus: boolean().nullable(),
|
|
55314
55418
|
/** Extra dry option when the appliance exposes it. */
|
|
55315
|
-
extraDry: boolean(),
|
|
55419
|
+
extraDry: boolean().nullable(),
|
|
55316
55420
|
/** Intensive zone (lower basket) when the appliance exposes it. */
|
|
55317
|
-
intensiveZone: boolean(),
|
|
55421
|
+
intensiveZone: boolean().nullable(),
|
|
55318
55422
|
/** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
|
|
55319
|
-
varioSpeedPlus: boolean(),
|
|
55320
|
-
/** Child lock (controls disabled on the appliance). */
|
|
55321
|
-
childLock: boolean(),
|
|
55423
|
+
varioSpeedPlus: boolean().nullable(),
|
|
55424
|
+
/** Child lock (controls disabled on the appliance); null when not known. */
|
|
55425
|
+
childLock: boolean().nullable(),
|
|
55426
|
+
/** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
|
|
55427
|
+
activeEvents: array(string()),
|
|
55428
|
+
/** Numeric error code when the appliance reports one; null otherwise. */
|
|
55322
55429
|
errorCode: number().nullable(),
|
|
55430
|
+
/** Name of the raised alert-level event while the appliance is in error; null otherwise. */
|
|
55323
55431
|
errorLabel: string().nullable(),
|
|
55432
|
+
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
55324
55433
|
lastFetchedAt: number()
|
|
55325
55434
|
});
|
|
55435
|
+
var DeviceIdSchema = number().int().nonnegative();
|
|
55436
|
+
/** A value a program option or setting can take. */
|
|
55437
|
+
var DishwasherValueSchema = union([
|
|
55438
|
+
boolean(),
|
|
55439
|
+
string(),
|
|
55440
|
+
number()
|
|
55441
|
+
]);
|
|
55442
|
+
var DishwasherAccessSchema = _enum([
|
|
55443
|
+
"none",
|
|
55444
|
+
"read",
|
|
55445
|
+
"readWrite",
|
|
55446
|
+
"writeOnly",
|
|
55447
|
+
"readStatic"
|
|
55448
|
+
]);
|
|
55449
|
+
/**
|
|
55450
|
+
* One option or setting the appliance declares, with the constraints its description
|
|
55451
|
+
* gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
|
|
55452
|
+
*/
|
|
55453
|
+
var DishwasherOptionDescriptorSchema = object({
|
|
55454
|
+
/** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
|
|
55455
|
+
key: string(),
|
|
55456
|
+
/** Last segment of the key, for display. */
|
|
55457
|
+
name: string(),
|
|
55458
|
+
type: _enum([
|
|
55459
|
+
"boolean",
|
|
55460
|
+
"number",
|
|
55461
|
+
"enum",
|
|
55462
|
+
"string"
|
|
55463
|
+
]),
|
|
55464
|
+
access: DishwasherAccessSchema,
|
|
55465
|
+
/** The appliance reports this entity as currently available. */
|
|
55466
|
+
available: boolean(),
|
|
55467
|
+
/** Unit the description declares for a number; null when it declares none. */
|
|
55468
|
+
unit: string().nullable(),
|
|
55469
|
+
min: number().nullable(),
|
|
55470
|
+
max: number().nullable(),
|
|
55471
|
+
step: number().nullable(),
|
|
55472
|
+
/** Allowed members of an enum; null for other types. */
|
|
55473
|
+
enumValues: array(string()).nullable(),
|
|
55474
|
+
defaultValue: DishwasherValueSchema.nullable()
|
|
55475
|
+
});
|
|
55476
|
+
var DishwasherProgramSchema = object({
|
|
55477
|
+
/** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
|
|
55478
|
+
key: string(),
|
|
55479
|
+
name: string(),
|
|
55480
|
+
/** The appliance currently offers this program. */
|
|
55481
|
+
available: boolean(),
|
|
55482
|
+
/** The options this program lists, with the program-level access / availability / default. */
|
|
55483
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
55484
|
+
});
|
|
55485
|
+
var DishwasherOptionsSchema = object({
|
|
55486
|
+
availability: DishwasherAvailabilitySchema,
|
|
55487
|
+
/** What the appliance can be told to do, from the commands its description declares. */
|
|
55488
|
+
supportsStart: boolean(),
|
|
55489
|
+
supportsPause: boolean(),
|
|
55490
|
+
supportsResume: boolean(),
|
|
55491
|
+
supportsStop: boolean(),
|
|
55492
|
+
supportsPower: boolean(),
|
|
55493
|
+
/** Every program the description lists, with its options. */
|
|
55494
|
+
programs: array(DishwasherProgramSchema),
|
|
55495
|
+
/** Every option and setting entity the description lists (programs reference these by key). */
|
|
55496
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
55497
|
+
});
|
|
55326
55498
|
var dishwasherCapability = {
|
|
55327
55499
|
name: "dishwasher",
|
|
55328
55500
|
scope: "device",
|
|
@@ -55330,86 +55502,102 @@ var dishwasherCapability = {
|
|
|
55330
55502
|
mode: "singleton",
|
|
55331
55503
|
deviceTypes: [DeviceType.Dishwasher],
|
|
55332
55504
|
methods: {
|
|
55333
|
-
|
|
55505
|
+
/**
|
|
55506
|
+
* Start a program. Without `program` the selected one starts. `options` are
|
|
55507
|
+
* option feature keys; each is checked against the program's constraints.
|
|
55508
|
+
*/
|
|
55509
|
+
start: method(object({
|
|
55510
|
+
deviceId: DeviceIdSchema,
|
|
55511
|
+
program: string().min(1).optional(),
|
|
55512
|
+
options: record(string(), DishwasherValueSchema).optional()
|
|
55513
|
+
}), _void(), {
|
|
55334
55514
|
kind: "mutation",
|
|
55335
55515
|
auth: "protected"
|
|
55336
55516
|
}),
|
|
55337
|
-
pause: method(object({ deviceId:
|
|
55517
|
+
pause: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55338
55518
|
kind: "mutation",
|
|
55339
55519
|
auth: "protected"
|
|
55340
55520
|
}),
|
|
55341
|
-
|
|
55521
|
+
resume: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55522
|
+
kind: "mutation",
|
|
55523
|
+
auth: "protected"
|
|
55524
|
+
}),
|
|
55525
|
+
stop: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55342
55526
|
kind: "mutation",
|
|
55343
55527
|
auth: "protected"
|
|
55344
55528
|
}),
|
|
55529
|
+
/** Select (not start) a program; refused when the appliance does not offer it. */
|
|
55345
55530
|
setProgram: method(object({
|
|
55346
|
-
deviceId:
|
|
55531
|
+
deviceId: DeviceIdSchema,
|
|
55347
55532
|
program: string().min(1)
|
|
55348
55533
|
}), _void(), {
|
|
55349
55534
|
kind: "mutation",
|
|
55350
55535
|
auth: "protected"
|
|
55351
55536
|
}),
|
|
55352
55537
|
setPower: method(object({
|
|
55353
|
-
deviceId:
|
|
55538
|
+
deviceId: DeviceIdSchema,
|
|
55354
55539
|
on: boolean()
|
|
55355
55540
|
}), _void(), {
|
|
55356
55541
|
kind: "mutation",
|
|
55357
55542
|
auth: "protected"
|
|
55358
55543
|
}),
|
|
55359
55544
|
setHalfLoad: method(object({
|
|
55360
|
-
deviceId:
|
|
55545
|
+
deviceId: DeviceIdSchema,
|
|
55361
55546
|
on: boolean()
|
|
55362
55547
|
}), _void(), {
|
|
55363
55548
|
kind: "mutation",
|
|
55364
55549
|
auth: "protected"
|
|
55365
55550
|
}),
|
|
55366
55551
|
setHygienePlus: method(object({
|
|
55367
|
-
deviceId:
|
|
55552
|
+
deviceId: DeviceIdSchema,
|
|
55368
55553
|
on: boolean()
|
|
55369
55554
|
}), _void(), {
|
|
55370
55555
|
kind: "mutation",
|
|
55371
55556
|
auth: "protected"
|
|
55372
55557
|
}),
|
|
55373
55558
|
setExtraDry: method(object({
|
|
55374
|
-
deviceId:
|
|
55559
|
+
deviceId: DeviceIdSchema,
|
|
55375
55560
|
on: boolean()
|
|
55376
55561
|
}), _void(), {
|
|
55377
55562
|
kind: "mutation",
|
|
55378
55563
|
auth: "protected"
|
|
55379
55564
|
}),
|
|
55380
55565
|
setIntensiveZone: method(object({
|
|
55381
|
-
deviceId:
|
|
55566
|
+
deviceId: DeviceIdSchema,
|
|
55382
55567
|
on: boolean()
|
|
55383
55568
|
}), _void(), {
|
|
55384
55569
|
kind: "mutation",
|
|
55385
55570
|
auth: "protected"
|
|
55386
55571
|
}),
|
|
55387
55572
|
setVarioSpeedPlus: method(object({
|
|
55388
|
-
deviceId:
|
|
55573
|
+
deviceId: DeviceIdSchema,
|
|
55389
55574
|
on: boolean()
|
|
55390
55575
|
}), _void(), {
|
|
55391
55576
|
kind: "mutation",
|
|
55392
55577
|
auth: "protected"
|
|
55393
55578
|
}),
|
|
55394
55579
|
setChildLock: method(object({
|
|
55395
|
-
deviceId:
|
|
55580
|
+
deviceId: DeviceIdSchema,
|
|
55396
55581
|
on: boolean()
|
|
55397
55582
|
}), _void(), {
|
|
55398
55583
|
kind: "mutation",
|
|
55399
55584
|
auth: "protected"
|
|
55400
55585
|
}),
|
|
55586
|
+
/**
|
|
55587
|
+
* Write any option or setting by feature key. Refused when the description does
|
|
55588
|
+
* not list it, it is not writable or not available now, or the value is outside
|
|
55589
|
+
* its declared range / members.
|
|
55590
|
+
*/
|
|
55401
55591
|
setOption: method(object({
|
|
55402
|
-
deviceId:
|
|
55592
|
+
deviceId: DeviceIdSchema,
|
|
55403
55593
|
key: string().min(1),
|
|
55404
|
-
value:
|
|
55405
|
-
boolean(),
|
|
55406
|
-
string(),
|
|
55407
|
-
number()
|
|
55408
|
-
])
|
|
55594
|
+
value: DishwasherValueSchema
|
|
55409
55595
|
}), _void(), {
|
|
55410
55596
|
kind: "mutation",
|
|
55411
55597
|
auth: "protected"
|
|
55412
|
-
})
|
|
55598
|
+
}),
|
|
55599
|
+
/** What this appliance can do, from its own description — the UI is derived from it. */
|
|
55600
|
+
getOptions: method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" })
|
|
55413
55601
|
},
|
|
55414
55602
|
status: {
|
|
55415
55603
|
schema: DishwasherStatusSchema,
|
|
@@ -69358,6 +69546,12 @@ Object.freeze({
|
|
|
69358
69546
|
addonId: null,
|
|
69359
69547
|
access: "view"
|
|
69360
69548
|
},
|
|
69549
|
+
"dishwasher.getOptions": {
|
|
69550
|
+
capName: "dishwasher",
|
|
69551
|
+
capScope: "device",
|
|
69552
|
+
addonId: null,
|
|
69553
|
+
access: "view"
|
|
69554
|
+
},
|
|
69361
69555
|
"dishwasher.getStatus": {
|
|
69362
69556
|
capName: "dishwasher",
|
|
69363
69557
|
capScope: "device",
|
|
@@ -69370,6 +69564,12 @@ Object.freeze({
|
|
|
69370
69564
|
addonId: null,
|
|
69371
69565
|
access: "create"
|
|
69372
69566
|
},
|
|
69567
|
+
"dishwasher.resume": {
|
|
69568
|
+
capName: "dishwasher",
|
|
69569
|
+
capScope: "device",
|
|
69570
|
+
addonId: null,
|
|
69571
|
+
access: "create"
|
|
69572
|
+
},
|
|
69373
69573
|
"dishwasher.setChildLock": {
|
|
69374
69574
|
capName: "dishwasher",
|
|
69375
69575
|
capScope: "device",
|
|
@@ -73870,6 +74070,12 @@ Object.freeze({
|
|
|
73870
74070
|
addonId: null,
|
|
73871
74071
|
access: "view"
|
|
73872
74072
|
},
|
|
74073
|
+
"storageMigration.moverClearance": {
|
|
74074
|
+
capName: "storage-migration",
|
|
74075
|
+
capScope: "system",
|
|
74076
|
+
addonId: null,
|
|
74077
|
+
access: "view"
|
|
74078
|
+
},
|
|
73873
74079
|
"storageMigration.movers": {
|
|
73874
74080
|
capName: "storage-migration",
|
|
73875
74081
|
capScope: "system",
|
|
@@ -76063,6 +76269,11 @@ Object.freeze({
|
|
|
76063
76269
|
form: "single",
|
|
76064
76270
|
optional: false
|
|
76065
76271
|
}],
|
|
76272
|
+
"dishwasher.getOptions": [{
|
|
76273
|
+
name: "deviceId",
|
|
76274
|
+
form: "single",
|
|
76275
|
+
optional: false
|
|
76276
|
+
}],
|
|
76066
76277
|
"dishwasher.getStatus": [{
|
|
76067
76278
|
name: "deviceId",
|
|
76068
76279
|
form: "single",
|
|
@@ -76073,6 +76284,11 @@ Object.freeze({
|
|
|
76073
76284
|
form: "single",
|
|
76074
76285
|
optional: false
|
|
76075
76286
|
}],
|
|
76287
|
+
"dishwasher.resume": [{
|
|
76288
|
+
name: "deviceId",
|
|
76289
|
+
form: "single",
|
|
76290
|
+
optional: false
|
|
76291
|
+
}],
|
|
76076
76292
|
"dishwasher.setChildLock": [{
|
|
76077
76293
|
name: "deviceId",
|
|
76078
76294
|
form: "single",
|
|
@@ -78159,6 +78375,9 @@ new Map(Object.entries({
|
|
|
78159
78375
|
"wrapper-update-available": "system",
|
|
78160
78376
|
"backup-completed": "system",
|
|
78161
78377
|
"export-completed": "system",
|
|
78378
|
+
"alert-critical": "system",
|
|
78379
|
+
"alert-error": "system",
|
|
78380
|
+
"alert-critical-resolved": "system",
|
|
78162
78381
|
"storage-location-low": "system",
|
|
78163
78382
|
"storage-location-critical": "system",
|
|
78164
78383
|
"storage-location-ok": "system",
|
|
@@ -78283,6 +78502,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
78283
78502
|
"storage-location-ok"
|
|
78284
78503
|
]
|
|
78285
78504
|
},
|
|
78505
|
+
{
|
|
78506
|
+
id: "alerts",
|
|
78507
|
+
family: "system",
|
|
78508
|
+
label: "Alerts",
|
|
78509
|
+
kinds: [
|
|
78510
|
+
"alert-critical",
|
|
78511
|
+
"alert-error",
|
|
78512
|
+
"alert-critical-resolved"
|
|
78513
|
+
]
|
|
78514
|
+
},
|
|
78286
78515
|
{
|
|
78287
78516
|
id: "alarm",
|
|
78288
78517
|
family: "alarm",
|
|
@@ -78327,6 +78556,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
|
|
|
78327
78556
|
return [[descriptor.kind, field]];
|
|
78328
78557
|
})));
|
|
78329
78558
|
Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
|
|
78559
|
+
object({
|
|
78560
|
+
phase: _enum(["raised", "resolved"]),
|
|
78561
|
+
episodeId: string().min(1),
|
|
78562
|
+
alertId: string().min(1),
|
|
78563
|
+
severity: AlertSeveritySchema,
|
|
78564
|
+
category: string(),
|
|
78565
|
+
title: string(),
|
|
78566
|
+
message: string(),
|
|
78567
|
+
sourceType: string().optional(),
|
|
78568
|
+
sourceId: string().optional(),
|
|
78569
|
+
nodeId: string().optional(),
|
|
78570
|
+
/** The alert's own action link (where the operator acts on it), when it has one. */
|
|
78571
|
+
actionUrl: string().optional(),
|
|
78572
|
+
at: number()
|
|
78573
|
+
});
|
|
78330
78574
|
var RULE_BODY_ONLY = ["body"];
|
|
78331
78575
|
var RULE_TEXT = ["title", "body"];
|
|
78332
78576
|
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
@@ -78336,6 +78580,11 @@ var TANK = [
|
|
|
78336
78580
|
"device-tank-full",
|
|
78337
78581
|
"device-tank-normal"
|
|
78338
78582
|
];
|
|
78583
|
+
var ALERT_EPISODE = [
|
|
78584
|
+
"alert-critical",
|
|
78585
|
+
"alert-error",
|
|
78586
|
+
"alert-critical-resolved"
|
|
78587
|
+
];
|
|
78339
78588
|
var UPDATES = [
|
|
78340
78589
|
"addon-update-available",
|
|
78341
78590
|
"server-update-available",
|
|
@@ -78528,14 +78777,14 @@ var STATE_SUMMARY_VARS = [
|
|
|
78528
78777
|
([...RULE_TEXT], [...CONSUMABLE]),
|
|
78529
78778
|
([...RULE_TEXT], [...TANK]),
|
|
78530
78779
|
[...RULE_TEXT],
|
|
78531
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
78532
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
78533
|
-
[...RULE_TEXT],
|
|
78780
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
78781
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
78534
78782
|
[...RULE_TEXT],
|
|
78535
78783
|
[...RULE_TEXT],
|
|
78536
78784
|
[...RULE_TEXT],
|
|
78537
78785
|
[...RULE_TEXT],
|
|
78538
78786
|
[...RULE_TEXT],
|
|
78787
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78539
78788
|
[...RULE_TEXT],
|
|
78540
78789
|
[...RULE_TEXT],
|
|
78541
78790
|
[...RULE_TEXT],
|
|
@@ -78553,7 +78802,11 @@ var STATE_SUMMARY_VARS = [
|
|
|
78553
78802
|
[...RULE_TEXT],
|
|
78554
78803
|
[...RULE_TEXT],
|
|
78555
78804
|
[...RULE_TEXT],
|
|
78556
|
-
[...RULE_TEXT],
|
|
78805
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78806
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78807
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78808
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78809
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78557
78810
|
[...RULE_TEXT],
|
|
78558
78811
|
[...RULE_TEXT],
|
|
78559
78812
|
[...RULE_TEXT],
|