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