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