@camstack/addon-terminal 0.1.134 → 0.1.136
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
|
@@ -8,7 +8,7 @@ import { createServer } from "node:http";
|
|
|
8
8
|
//#region \0rolldown/runtime.js
|
|
9
9
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
10
10
|
//#endregion
|
|
11
|
-
//#region ../types/dist/event-category-
|
|
11
|
+
//#region ../types/dist/event-category-DOl51-Ij.mjs
|
|
12
12
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
13
13
|
EventCategory["SystemBoot"] = "system.boot";
|
|
14
14
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -87,9 +87,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
87
87
|
/**
|
|
88
88
|
* The node's one-shot runner boot check (D877): planned runners against the
|
|
89
89
|
* process service, `degraded` when any is failed, refused or missing. The
|
|
90
|
-
* alert centre turns it into one
|
|
90
|
+
* alert centre turns it into one critical alert.
|
|
91
91
|
*/
|
|
92
92
|
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
93
|
+
/**
|
|
94
|
+
* An alert EPISODE opened or closed, emitted by the alert centre for alerts
|
|
95
|
+
* of severity `critical` or `error` (`AlertEpisodePayload`). The alert
|
|
96
|
+
* centre sends no notification of its own: Notification Center turns this
|
|
97
|
+
* into the `alert-critical` / `alert-error` / `alert-critical-resolved`
|
|
98
|
+
* system-event kinds, and reconciles from the alerts store because a bus
|
|
99
|
+
* event may be dropped (D8, D11).
|
|
100
|
+
*/
|
|
101
|
+
EventCategory["AlertEpisode"] = "alert.episode";
|
|
93
102
|
EventCategory["AddonError"] = "addon.error";
|
|
94
103
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
95
104
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -5414,7 +5423,7 @@ var ZodIssueCode = {
|
|
|
5414
5423
|
var ZodFirstPartyTypeKind;
|
|
5415
5424
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5416
5425
|
//#endregion
|
|
5417
|
-
//#region ../types/dist/sleep-
|
|
5426
|
+
//#region ../types/dist/sleep-BxjU_fJM.mjs
|
|
5418
5427
|
/**
|
|
5419
5428
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5420
5429
|
* window to float samples (D455).
|
|
@@ -7796,6 +7805,12 @@ function normalizeAddonInitResult(result) {
|
|
|
7796
7805
|
if (Array.isArray(result)) return { providers: result };
|
|
7797
7806
|
return result;
|
|
7798
7807
|
}
|
|
7808
|
+
/**
|
|
7809
|
+
* The share-view scope kinds a `csv_*` share token can carry. The hub mints
|
|
7810
|
+
* and validates them (`share-token.service.ts` builds its enum from this
|
|
7811
|
+
* list); a data plane names the kinds it ACCEPTS in `share`.
|
|
7812
|
+
*/
|
|
7813
|
+
var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
|
|
7799
7814
|
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
7800
7815
|
var PeerBytesTicketSchema = object({
|
|
7801
7816
|
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
@@ -12552,6 +12567,229 @@ var ConvertResultSchema = object({
|
|
|
12552
12567
|
files: array(string()).readonly()
|
|
12553
12568
|
})).readonly()
|
|
12554
12569
|
});
|
|
12570
|
+
/**
|
|
12571
|
+
* Zod schemas for persisted record types.
|
|
12572
|
+
*
|
|
12573
|
+
* These schemas serve as the single source of truth for types that are
|
|
12574
|
+
* stored in the settings-store backend and retrieved via tRPC. They
|
|
12575
|
+
* replace the manual TypeScript interfaces with schema-derived types,
|
|
12576
|
+
* enabling runtime validation when reading from the backend.
|
|
12577
|
+
*
|
|
12578
|
+
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
12579
|
+
* keeps the original name for backward compatibility.
|
|
12580
|
+
*/
|
|
12581
|
+
/**
|
|
12582
|
+
* Auth model (v2 — 2026-05-12 caps-only):
|
|
12583
|
+
*
|
|
12584
|
+
* Two principals:
|
|
12585
|
+
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
12586
|
+
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
12587
|
+
*
|
|
12588
|
+
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
12589
|
+
* `super_admin` — collapsed onto the single boolean because every
|
|
12590
|
+
* non-admin caller is governed by the same scope-check rules; the
|
|
12591
|
+
* distinction was only ever used to route role-specific procedures
|
|
12592
|
+
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
12593
|
+
* with `isAdmin: false` + an explicit scope list.
|
|
12594
|
+
*/
|
|
12595
|
+
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
12596
|
+
var MethodAccessSchema = _enum([
|
|
12597
|
+
"view",
|
|
12598
|
+
"create",
|
|
12599
|
+
"delete"
|
|
12600
|
+
]);
|
|
12601
|
+
/**
|
|
12602
|
+
* A single scope grant. Three forms — checked in matcher with OR
|
|
12603
|
+
* semantics; the first match decides whether the call passes:
|
|
12604
|
+
*
|
|
12605
|
+
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
12606
|
+
* cap with the matching `scope` declaration. New caps inherit grants
|
|
12607
|
+
* automatically — adding a device cap to the codebase makes it
|
|
12608
|
+
* reachable to every user with `category:device [...]` without a
|
|
12609
|
+
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
12610
|
+
*
|
|
12611
|
+
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
12612
|
+
* useful when an integration needs to interact with one specific
|
|
12613
|
+
* addon's surface regardless of how many caps it exports.
|
|
12614
|
+
*
|
|
12615
|
+
* - `capability` — the most precise form. Single cap name. Use for
|
|
12616
|
+
* integration tokens where you want to grant `addons.installPackage`
|
|
12617
|
+
* and nothing else.
|
|
12618
|
+
*
|
|
12619
|
+
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
12620
|
+
* "give me everything" escape; there is no wildcard scope.
|
|
12621
|
+
*/
|
|
12622
|
+
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
12623
|
+
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
12624
|
+
var CapScopeSchema = _enum(["device", "system"]);
|
|
12625
|
+
/**
|
|
12626
|
+
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
12627
|
+
*
|
|
12628
|
+
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
12629
|
+
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
12630
|
+
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
12631
|
+
* AFTER the grant was minted — no re-grant, no re-login.
|
|
12632
|
+
*
|
|
12633
|
+
* - `all` — every device in the deployment. The broad viewer/operator
|
|
12634
|
+
* lever without a `category` grant (a `category` grant also covers device
|
|
12635
|
+
* caps that carry no deviceId; `all` is specifically the device set).
|
|
12636
|
+
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
12637
|
+
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
12638
|
+
* is NOT covered until the grant is edited.
|
|
12639
|
+
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
12640
|
+
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
12641
|
+
* re-resolves on the next request.
|
|
12642
|
+
* - `locations` — every device whose operator-assigned `location` label is
|
|
12643
|
+
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
12644
|
+
* null/unset location matches NO `locations` selector.
|
|
12645
|
+
*/
|
|
12646
|
+
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
12647
|
+
object({ kind: literal("all") }),
|
|
12648
|
+
object({
|
|
12649
|
+
kind: literal("ids"),
|
|
12650
|
+
ids: array(number().int()).min(1)
|
|
12651
|
+
}),
|
|
12652
|
+
object({
|
|
12653
|
+
kind: literal("types"),
|
|
12654
|
+
types: array(_enum(DeviceType)).min(1)
|
|
12655
|
+
}),
|
|
12656
|
+
object({
|
|
12657
|
+
kind: literal("locations"),
|
|
12658
|
+
locations: array(string().min(1)).min(1)
|
|
12659
|
+
})
|
|
12660
|
+
]);
|
|
12661
|
+
var DeviceTokenScopeSchema = object({
|
|
12662
|
+
type: literal("device"),
|
|
12663
|
+
/** The device SET this grant covers — resolved against the live fleet. */
|
|
12664
|
+
selector: DeviceSelectorSchema,
|
|
12665
|
+
access: array(MethodAccessSchema).min(1),
|
|
12666
|
+
/**
|
|
12667
|
+
* Whether a grant on a PARENT device transparently covers its accessory
|
|
12668
|
+
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
12669
|
+
* Direction is parent → children ONLY.
|
|
12670
|
+
*
|
|
12671
|
+
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
12672
|
+
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
12673
|
+
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
12674
|
+
* operator must grant on the child, not inherit from the parent). Set it
|
|
12675
|
+
* explicitly to override that default per grant.
|
|
12676
|
+
*/
|
|
12677
|
+
includeLinked: boolean().optional()
|
|
12678
|
+
});
|
|
12679
|
+
/**
|
|
12680
|
+
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
12681
|
+
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
12682
|
+
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
12683
|
+
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
12684
|
+
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
12685
|
+
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
12686
|
+
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
12687
|
+
* migration covers both without a flag day. No cast — the raw object is read
|
|
12688
|
+
* through `Reflect.get` (its static type is `unknown`).
|
|
12689
|
+
*/
|
|
12690
|
+
function migrateLegacyTokenScope(raw) {
|
|
12691
|
+
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
12692
|
+
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
12693
|
+
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
12694
|
+
const targets = Reflect.get(raw, "targets");
|
|
12695
|
+
if (!Array.isArray(targets)) return raw;
|
|
12696
|
+
return {
|
|
12697
|
+
type: "device",
|
|
12698
|
+
selector: {
|
|
12699
|
+
kind: "ids",
|
|
12700
|
+
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
12701
|
+
},
|
|
12702
|
+
access: Reflect.get(raw, "access")
|
|
12703
|
+
};
|
|
12704
|
+
}
|
|
12705
|
+
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
12706
|
+
object({
|
|
12707
|
+
type: literal("category"),
|
|
12708
|
+
target: CapScopeSchema,
|
|
12709
|
+
access: array(MethodAccessSchema).min(1)
|
|
12710
|
+
}),
|
|
12711
|
+
object({
|
|
12712
|
+
type: literal("capability"),
|
|
12713
|
+
target: string(),
|
|
12714
|
+
access: array(MethodAccessSchema).min(1)
|
|
12715
|
+
}),
|
|
12716
|
+
object({
|
|
12717
|
+
type: literal("addon"),
|
|
12718
|
+
target: string(),
|
|
12719
|
+
access: array(MethodAccessSchema).min(1)
|
|
12720
|
+
}),
|
|
12721
|
+
DeviceTokenScopeSchema
|
|
12722
|
+
]));
|
|
12723
|
+
object({
|
|
12724
|
+
id: string(),
|
|
12725
|
+
username: string(),
|
|
12726
|
+
passwordHash: string(),
|
|
12727
|
+
/**
|
|
12728
|
+
* Admin bypass. When true, the middleware skips the scope-access
|
|
12729
|
+
* check entirely. There is no other axis of privilege; the legacy
|
|
12730
|
+
* role enum collapsed onto this boolean in v2.
|
|
12731
|
+
*/
|
|
12732
|
+
isAdmin: boolean().default(false),
|
|
12733
|
+
allowedProviders: AllowedProviderSchema,
|
|
12734
|
+
allowedDevices: AllowedDevicesSchema,
|
|
12735
|
+
/**
|
|
12736
|
+
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
12737
|
+
* ignored. Non-admins without scopes are locked out of every
|
|
12738
|
+
* protected call.
|
|
12739
|
+
*/
|
|
12740
|
+
scopes: array(TokenScopeSchema).default([]),
|
|
12741
|
+
createdAt: number(),
|
|
12742
|
+
updatedAt: number()
|
|
12743
|
+
});
|
|
12744
|
+
object({
|
|
12745
|
+
id: string(),
|
|
12746
|
+
label: string(),
|
|
12747
|
+
isAdmin: boolean().default(false),
|
|
12748
|
+
allowedProviders: AllowedProviderSchema,
|
|
12749
|
+
allowedDevices: AllowedDevicesSchema,
|
|
12750
|
+
tokenHash: string(),
|
|
12751
|
+
tokenPrefix: string(),
|
|
12752
|
+
createdAt: number(),
|
|
12753
|
+
lastUsedAt: number().optional()
|
|
12754
|
+
});
|
|
12755
|
+
object({
|
|
12756
|
+
id: string(),
|
|
12757
|
+
userId: string(),
|
|
12758
|
+
name: string(),
|
|
12759
|
+
tokenHash: string(),
|
|
12760
|
+
tokenPrefix: string(),
|
|
12761
|
+
scopes: array(TokenScopeSchema),
|
|
12762
|
+
expiresAt: number().nullish(),
|
|
12763
|
+
lastUsedAt: number().nullish(),
|
|
12764
|
+
createdAt: number()
|
|
12765
|
+
});
|
|
12766
|
+
/** What a share-view grant lets its holder see. */
|
|
12767
|
+
var ShareViewGrantSchema = object({
|
|
12768
|
+
kind: _enum(SHARE_VIEW_KINDS),
|
|
12769
|
+
deviceIds: array(number().int().nonnegative()).min(1).max(64),
|
|
12770
|
+
/** Talk-back, opt-in at mint time; absent means off. */
|
|
12771
|
+
talk: boolean().optional()
|
|
12772
|
+
});
|
|
12773
|
+
var ShareViewScopeSchema = object({
|
|
12774
|
+
type: literal("share-view"),
|
|
12775
|
+
grant: ShareViewGrantSchema
|
|
12776
|
+
});
|
|
12777
|
+
var AddonRoutesScopeSchema = object({
|
|
12778
|
+
type: literal("addon-routes"),
|
|
12779
|
+
access: array(MethodAccessSchema).min(1)
|
|
12780
|
+
});
|
|
12781
|
+
var CredentialScopeSchema = union([
|
|
12782
|
+
literal("*"),
|
|
12783
|
+
ShareViewScopeSchema,
|
|
12784
|
+
AddonRoutesScopeSchema,
|
|
12785
|
+
TokenScopeSchema
|
|
12786
|
+
]);
|
|
12787
|
+
object({
|
|
12788
|
+
kind: literal("credential"),
|
|
12789
|
+
sub: string().min(1),
|
|
12790
|
+
jti: string().min(16),
|
|
12791
|
+
scopes: array(CredentialScopeSchema).min(1)
|
|
12792
|
+
});
|
|
12555
12793
|
_enum(["new-session", "step-up"]);
|
|
12556
12794
|
/** The languages the hub's app landing pages are written in (D858). */
|
|
12557
12795
|
var AppPageLangSchema = _enum(["en", "it"]);
|
|
@@ -13268,7 +13506,14 @@ var AlertSeveritySchema = _enum([
|
|
|
13268
13506
|
]);
|
|
13269
13507
|
var AlertActionSchema = object({
|
|
13270
13508
|
label: string(),
|
|
13271
|
-
href: string().optional()
|
|
13509
|
+
href: string().optional(),
|
|
13510
|
+
/**
|
|
13511
|
+
* How `href` is followed. Absent / `app`: an admin-ui route (client-side).
|
|
13512
|
+
* `server`: a route the HUB serves (an addon HTTP route such as an OAuth
|
|
13513
|
+
* start) — the browser must leave the SPA with a full navigation, because
|
|
13514
|
+
* the SPA has no such route and would bounce to the home page.
|
|
13515
|
+
*/
|
|
13516
|
+
navigation: _enum(["app", "server"]).optional()
|
|
13272
13517
|
});
|
|
13273
13518
|
var AlertStatusSchema = _enum([
|
|
13274
13519
|
"active",
|
|
@@ -41903,6 +42148,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
41903
42148
|
"server-updated",
|
|
41904
42149
|
"export-completed",
|
|
41905
42150
|
"backup-completed",
|
|
42151
|
+
"alert-critical",
|
|
42152
|
+
"alert-error",
|
|
42153
|
+
"alert-critical-resolved",
|
|
41906
42154
|
"camera-online",
|
|
41907
42155
|
"camera-offline",
|
|
41908
42156
|
"camera-disabled",
|
|
@@ -43938,202 +44186,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
43938
44186
|
auth: "admin"
|
|
43939
44187
|
}), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
|
|
43940
44188
|
/**
|
|
43941
|
-
* Zod schemas for persisted record types.
|
|
43942
|
-
*
|
|
43943
|
-
* These schemas serve as the single source of truth for types that are
|
|
43944
|
-
* stored in the settings-store backend and retrieved via tRPC. They
|
|
43945
|
-
* replace the manual TypeScript interfaces with schema-derived types,
|
|
43946
|
-
* enabling runtime validation when reading from the backend.
|
|
43947
|
-
*
|
|
43948
|
-
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
43949
|
-
* keeps the original name for backward compatibility.
|
|
43950
|
-
*/
|
|
43951
|
-
/**
|
|
43952
|
-
* Auth model (v2 — 2026-05-12 caps-only):
|
|
43953
|
-
*
|
|
43954
|
-
* Two principals:
|
|
43955
|
-
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
43956
|
-
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
43957
|
-
*
|
|
43958
|
-
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
43959
|
-
* `super_admin` — collapsed onto the single boolean because every
|
|
43960
|
-
* non-admin caller is governed by the same scope-check rules; the
|
|
43961
|
-
* distinction was only ever used to route role-specific procedures
|
|
43962
|
-
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
43963
|
-
* with `isAdmin: false` + an explicit scope list.
|
|
43964
|
-
*/
|
|
43965
|
-
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
43966
|
-
var MethodAccessSchema = _enum([
|
|
43967
|
-
"view",
|
|
43968
|
-
"create",
|
|
43969
|
-
"delete"
|
|
43970
|
-
]);
|
|
43971
|
-
/**
|
|
43972
|
-
* A single scope grant. Three forms — checked in matcher with OR
|
|
43973
|
-
* semantics; the first match decides whether the call passes:
|
|
43974
|
-
*
|
|
43975
|
-
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
43976
|
-
* cap with the matching `scope` declaration. New caps inherit grants
|
|
43977
|
-
* automatically — adding a device cap to the codebase makes it
|
|
43978
|
-
* reachable to every user with `category:device [...]` without a
|
|
43979
|
-
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
43980
|
-
*
|
|
43981
|
-
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
43982
|
-
* useful when an integration needs to interact with one specific
|
|
43983
|
-
* addon's surface regardless of how many caps it exports.
|
|
43984
|
-
*
|
|
43985
|
-
* - `capability` — the most precise form. Single cap name. Use for
|
|
43986
|
-
* integration tokens where you want to grant `addons.installPackage`
|
|
43987
|
-
* and nothing else.
|
|
43988
|
-
*
|
|
43989
|
-
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
43990
|
-
* "give me everything" escape; there is no wildcard scope.
|
|
43991
|
-
*/
|
|
43992
|
-
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
43993
|
-
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
43994
|
-
var CapScopeSchema = _enum(["device", "system"]);
|
|
43995
|
-
/**
|
|
43996
|
-
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
43997
|
-
*
|
|
43998
|
-
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
43999
|
-
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
44000
|
-
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
44001
|
-
* AFTER the grant was minted — no re-grant, no re-login.
|
|
44002
|
-
*
|
|
44003
|
-
* - `all` — every device in the deployment. The broad viewer/operator
|
|
44004
|
-
* lever without a `category` grant (a `category` grant also covers device
|
|
44005
|
-
* caps that carry no deviceId; `all` is specifically the device set).
|
|
44006
|
-
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
44007
|
-
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
44008
|
-
* is NOT covered until the grant is edited.
|
|
44009
|
-
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
44010
|
-
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
44011
|
-
* re-resolves on the next request.
|
|
44012
|
-
* - `locations` — every device whose operator-assigned `location` label is
|
|
44013
|
-
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
44014
|
-
* null/unset location matches NO `locations` selector.
|
|
44015
|
-
*/
|
|
44016
|
-
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
44017
|
-
object({ kind: literal("all") }),
|
|
44018
|
-
object({
|
|
44019
|
-
kind: literal("ids"),
|
|
44020
|
-
ids: array(number().int()).min(1)
|
|
44021
|
-
}),
|
|
44022
|
-
object({
|
|
44023
|
-
kind: literal("types"),
|
|
44024
|
-
types: array(_enum(DeviceType)).min(1)
|
|
44025
|
-
}),
|
|
44026
|
-
object({
|
|
44027
|
-
kind: literal("locations"),
|
|
44028
|
-
locations: array(string().min(1)).min(1)
|
|
44029
|
-
})
|
|
44030
|
-
]);
|
|
44031
|
-
var DeviceTokenScopeSchema = object({
|
|
44032
|
-
type: literal("device"),
|
|
44033
|
-
/** The device SET this grant covers — resolved against the live fleet. */
|
|
44034
|
-
selector: DeviceSelectorSchema,
|
|
44035
|
-
access: array(MethodAccessSchema).min(1),
|
|
44036
|
-
/**
|
|
44037
|
-
* Whether a grant on a PARENT device transparently covers its accessory
|
|
44038
|
-
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
44039
|
-
* Direction is parent → children ONLY.
|
|
44040
|
-
*
|
|
44041
|
-
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
44042
|
-
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
44043
|
-
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
44044
|
-
* operator must grant on the child, not inherit from the parent). Set it
|
|
44045
|
-
* explicitly to override that default per grant.
|
|
44046
|
-
*/
|
|
44047
|
-
includeLinked: boolean().optional()
|
|
44048
|
-
});
|
|
44049
|
-
/**
|
|
44050
|
-
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
44051
|
-
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
44052
|
-
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
44053
|
-
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
44054
|
-
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
44055
|
-
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
44056
|
-
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
44057
|
-
* migration covers both without a flag day. No cast — the raw object is read
|
|
44058
|
-
* through `Reflect.get` (its static type is `unknown`).
|
|
44059
|
-
*/
|
|
44060
|
-
function migrateLegacyTokenScope(raw) {
|
|
44061
|
-
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
44062
|
-
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
44063
|
-
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
44064
|
-
const targets = Reflect.get(raw, "targets");
|
|
44065
|
-
if (!Array.isArray(targets)) return raw;
|
|
44066
|
-
return {
|
|
44067
|
-
type: "device",
|
|
44068
|
-
selector: {
|
|
44069
|
-
kind: "ids",
|
|
44070
|
-
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
44071
|
-
},
|
|
44072
|
-
access: Reflect.get(raw, "access")
|
|
44073
|
-
};
|
|
44074
|
-
}
|
|
44075
|
-
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
44076
|
-
object({
|
|
44077
|
-
type: literal("category"),
|
|
44078
|
-
target: CapScopeSchema,
|
|
44079
|
-
access: array(MethodAccessSchema).min(1)
|
|
44080
|
-
}),
|
|
44081
|
-
object({
|
|
44082
|
-
type: literal("capability"),
|
|
44083
|
-
target: string(),
|
|
44084
|
-
access: array(MethodAccessSchema).min(1)
|
|
44085
|
-
}),
|
|
44086
|
-
object({
|
|
44087
|
-
type: literal("addon"),
|
|
44088
|
-
target: string(),
|
|
44089
|
-
access: array(MethodAccessSchema).min(1)
|
|
44090
|
-
}),
|
|
44091
|
-
DeviceTokenScopeSchema
|
|
44092
|
-
]));
|
|
44093
|
-
object({
|
|
44094
|
-
id: string(),
|
|
44095
|
-
username: string(),
|
|
44096
|
-
passwordHash: string(),
|
|
44097
|
-
/**
|
|
44098
|
-
* Admin bypass. When true, the middleware skips the scope-access
|
|
44099
|
-
* check entirely. There is no other axis of privilege; the legacy
|
|
44100
|
-
* role enum collapsed onto this boolean in v2.
|
|
44101
|
-
*/
|
|
44102
|
-
isAdmin: boolean().default(false),
|
|
44103
|
-
allowedProviders: AllowedProviderSchema,
|
|
44104
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44105
|
-
/**
|
|
44106
|
-
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
44107
|
-
* ignored. Non-admins without scopes are locked out of every
|
|
44108
|
-
* protected call.
|
|
44109
|
-
*/
|
|
44110
|
-
scopes: array(TokenScopeSchema).default([]),
|
|
44111
|
-
createdAt: number(),
|
|
44112
|
-
updatedAt: number()
|
|
44113
|
-
});
|
|
44114
|
-
object({
|
|
44115
|
-
id: string(),
|
|
44116
|
-
label: string(),
|
|
44117
|
-
isAdmin: boolean().default(false),
|
|
44118
|
-
allowedProviders: AllowedProviderSchema,
|
|
44119
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44120
|
-
tokenHash: string(),
|
|
44121
|
-
tokenPrefix: string(),
|
|
44122
|
-
createdAt: number(),
|
|
44123
|
-
lastUsedAt: number().optional()
|
|
44124
|
-
});
|
|
44125
|
-
object({
|
|
44126
|
-
id: string(),
|
|
44127
|
-
userId: string(),
|
|
44128
|
-
name: string(),
|
|
44129
|
-
tokenHash: string(),
|
|
44130
|
-
tokenPrefix: string(),
|
|
44131
|
-
scopes: array(TokenScopeSchema),
|
|
44132
|
-
expiresAt: number().nullish(),
|
|
44133
|
-
lastUsedAt: number().nullish(),
|
|
44134
|
-
createdAt: number()
|
|
44135
|
-
});
|
|
44136
|
-
/**
|
|
44137
44189
|
* `oauth-integration` — a collection cap by which an addon declares
|
|
44138
44190
|
* itself a linkable OAuth client of the hub's core `/oauth2/*` server.
|
|
44139
44191
|
* Each provider returns a static descriptor; the core enumerates them
|
|
@@ -51083,7 +51135,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
51083
51135
|
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
51084
51136
|
kind: "mutation",
|
|
51085
51137
|
auth: "admin"
|
|
51086
|
-
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({
|
|
51138
|
+
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
|
|
51139
|
+
clear: boolean(),
|
|
51140
|
+
repointLocationId: string().optional()
|
|
51141
|
+
}), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
|
|
51087
51142
|
kind: "mutation",
|
|
51088
51143
|
auth: "admin"
|
|
51089
51144
|
}), method(StorageCleanupInputSchema, object({ jobId: string() }), {
|
|
@@ -55383,6 +55438,11 @@ onStatusChanged: { data: object({
|
|
|
55383
55438
|
*
|
|
55384
55439
|
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
55385
55440
|
* provider refreshes the slice on an interval and eagerly after commands.
|
|
55441
|
+
*
|
|
55442
|
+
* UNKNOWN IS NOT OFF. Every field the appliance reports separately is
|
|
55443
|
+
* nullable: `null` means "not known right now" (the appliance has not said,
|
|
55444
|
+
* the link is down, or the description does not carry it) and is never
|
|
55445
|
+
* rendered or exported as `false` / `0`. `availability` says why.
|
|
55386
55446
|
*/
|
|
55387
55447
|
var DishwasherStateSchema = _enum([
|
|
55388
55448
|
"idle",
|
|
@@ -55392,43 +55452,155 @@ var DishwasherStateSchema = _enum([
|
|
|
55392
55452
|
"error",
|
|
55393
55453
|
"unavailable"
|
|
55394
55454
|
]);
|
|
55455
|
+
/**
|
|
55456
|
+
* The appliance's own operation state, uncollapsed. `state` above is the coarse
|
|
55457
|
+
* view for compact surfaces; this is what the appliance said.
|
|
55458
|
+
*/
|
|
55459
|
+
var DishwasherOperationStateSchema = _enum([
|
|
55460
|
+
"Inactive",
|
|
55461
|
+
"Ready",
|
|
55462
|
+
"DelayedStart",
|
|
55463
|
+
"Run",
|
|
55464
|
+
"Pause",
|
|
55465
|
+
"ActionRequired",
|
|
55466
|
+
"Finished",
|
|
55467
|
+
"Error",
|
|
55468
|
+
"Aborting"
|
|
55469
|
+
]);
|
|
55470
|
+
/**
|
|
55471
|
+
* Why fields may be `null`:
|
|
55472
|
+
* - `available` — the link is up and the description is loaded;
|
|
55473
|
+
* - `offline` — the local link is down (values are unknown, not last-known);
|
|
55474
|
+
* - `description-missing` — the link is up but the appliance's description could not
|
|
55475
|
+
* be loaded, so its values cannot be decoded.
|
|
55476
|
+
*/
|
|
55477
|
+
var DishwasherAvailabilitySchema = _enum([
|
|
55478
|
+
"available",
|
|
55479
|
+
"offline",
|
|
55480
|
+
"description-missing"
|
|
55481
|
+
]);
|
|
55395
55482
|
var DishwasherConsumableLevelSchema = _enum([
|
|
55396
55483
|
"ok",
|
|
55397
55484
|
"low",
|
|
55398
55485
|
"empty"
|
|
55399
55486
|
]);
|
|
55400
55487
|
var DishwasherStatusSchema = object({
|
|
55488
|
+
availability: DishwasherAvailabilitySchema,
|
|
55489
|
+
/** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
|
|
55401
55490
|
state: DishwasherStateSchema,
|
|
55402
|
-
/**
|
|
55491
|
+
/** The appliance's operation state as reported; null when not known. */
|
|
55492
|
+
operationState: DishwasherOperationStateSchema.nullable(),
|
|
55493
|
+
/** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
|
|
55403
55494
|
program: string().nullable(),
|
|
55404
|
-
/**
|
|
55495
|
+
/** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
|
|
55496
|
+
selectedProgram: string().nullable(),
|
|
55497
|
+
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
55405
55498
|
availablePrograms: array(string()),
|
|
55406
|
-
/**
|
|
55407
|
-
|
|
55499
|
+
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
55500
|
+
remainingSeconds: number().int().nonnegative().nullable(),
|
|
55501
|
+
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
55502
|
+
delayedStartSeconds: number().int().nonnegative().nullable(),
|
|
55408
55503
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
55409
55504
|
progressPercent: number().min(0).max(100).nullable(),
|
|
55410
|
-
/** True when the door is reported open. */
|
|
55411
|
-
doorOpen: boolean(),
|
|
55412
|
-
/** True when
|
|
55413
|
-
|
|
55414
|
-
/**
|
|
55415
|
-
|
|
55505
|
+
/** True when the door is reported open; null when the door state is not known. */
|
|
55506
|
+
doorOpen: boolean().nullable(),
|
|
55507
|
+
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
55508
|
+
doorLocked: boolean().nullable(),
|
|
55509
|
+
/** True when remote start is allowed (door closed, power on, etc.); null when not known. */
|
|
55510
|
+
remoteStartAllowed: boolean().nullable(),
|
|
55511
|
+
/** True when the appliance accepts remote control now; null when not known. */
|
|
55512
|
+
remoteControlActive: boolean().nullable(),
|
|
55513
|
+
/** True while somebody operates the appliance at its panel; null when not reported. */
|
|
55514
|
+
localControlActive: boolean().nullable(),
|
|
55515
|
+
/** Main power / switched-on state; null when not known. */
|
|
55516
|
+
powerOn: boolean().nullable(),
|
|
55517
|
+
/** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
|
|
55518
|
+
powerState: string().nullable(),
|
|
55416
55519
|
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55417
55520
|
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55418
|
-
|
|
55419
|
-
|
|
55521
|
+
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
55522
|
+
halfLoad: boolean().nullable(),
|
|
55523
|
+
hygienePlus: boolean().nullable(),
|
|
55420
55524
|
/** Extra dry option when the appliance exposes it. */
|
|
55421
|
-
extraDry: boolean(),
|
|
55525
|
+
extraDry: boolean().nullable(),
|
|
55422
55526
|
/** Intensive zone (lower basket) when the appliance exposes it. */
|
|
55423
|
-
intensiveZone: boolean(),
|
|
55527
|
+
intensiveZone: boolean().nullable(),
|
|
55424
55528
|
/** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
|
|
55425
|
-
varioSpeedPlus: boolean(),
|
|
55426
|
-
/** Child lock (controls disabled on the appliance). */
|
|
55427
|
-
childLock: boolean(),
|
|
55529
|
+
varioSpeedPlus: boolean().nullable(),
|
|
55530
|
+
/** Child lock (controls disabled on the appliance); null when not known. */
|
|
55531
|
+
childLock: boolean().nullable(),
|
|
55532
|
+
/** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
|
|
55533
|
+
activeEvents: array(string()),
|
|
55534
|
+
/** Numeric error code when the appliance reports one; null otherwise. */
|
|
55428
55535
|
errorCode: number().nullable(),
|
|
55536
|
+
/** Name of the raised alert-level event while the appliance is in error; null otherwise. */
|
|
55429
55537
|
errorLabel: string().nullable(),
|
|
55538
|
+
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
55430
55539
|
lastFetchedAt: number()
|
|
55431
55540
|
});
|
|
55541
|
+
var DeviceIdSchema = number().int().nonnegative();
|
|
55542
|
+
/** A value a program option or setting can take. */
|
|
55543
|
+
var DishwasherValueSchema = union([
|
|
55544
|
+
boolean(),
|
|
55545
|
+
string(),
|
|
55546
|
+
number()
|
|
55547
|
+
]);
|
|
55548
|
+
var DishwasherAccessSchema = _enum([
|
|
55549
|
+
"none",
|
|
55550
|
+
"read",
|
|
55551
|
+
"readWrite",
|
|
55552
|
+
"writeOnly",
|
|
55553
|
+
"readStatic"
|
|
55554
|
+
]);
|
|
55555
|
+
/**
|
|
55556
|
+
* One option or setting the appliance declares, with the constraints its description
|
|
55557
|
+
* gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
|
|
55558
|
+
*/
|
|
55559
|
+
var DishwasherOptionDescriptorSchema = object({
|
|
55560
|
+
/** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
|
|
55561
|
+
key: string(),
|
|
55562
|
+
/** Last segment of the key, for display. */
|
|
55563
|
+
name: string(),
|
|
55564
|
+
type: _enum([
|
|
55565
|
+
"boolean",
|
|
55566
|
+
"number",
|
|
55567
|
+
"enum",
|
|
55568
|
+
"string"
|
|
55569
|
+
]),
|
|
55570
|
+
access: DishwasherAccessSchema,
|
|
55571
|
+
/** The appliance reports this entity as currently available. */
|
|
55572
|
+
available: boolean(),
|
|
55573
|
+
/** Unit the description declares for a number; null when it declares none. */
|
|
55574
|
+
unit: string().nullable(),
|
|
55575
|
+
min: number().nullable(),
|
|
55576
|
+
max: number().nullable(),
|
|
55577
|
+
step: number().nullable(),
|
|
55578
|
+
/** Allowed members of an enum; null for other types. */
|
|
55579
|
+
enumValues: array(string()).nullable(),
|
|
55580
|
+
defaultValue: DishwasherValueSchema.nullable()
|
|
55581
|
+
});
|
|
55582
|
+
var DishwasherProgramSchema = object({
|
|
55583
|
+
/** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
|
|
55584
|
+
key: string(),
|
|
55585
|
+
name: string(),
|
|
55586
|
+
/** The appliance currently offers this program. */
|
|
55587
|
+
available: boolean(),
|
|
55588
|
+
/** The options this program lists, with the program-level access / availability / default. */
|
|
55589
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
55590
|
+
});
|
|
55591
|
+
var DishwasherOptionsSchema = object({
|
|
55592
|
+
availability: DishwasherAvailabilitySchema,
|
|
55593
|
+
/** What the appliance can be told to do, from the commands its description declares. */
|
|
55594
|
+
supportsStart: boolean(),
|
|
55595
|
+
supportsPause: boolean(),
|
|
55596
|
+
supportsResume: boolean(),
|
|
55597
|
+
supportsStop: boolean(),
|
|
55598
|
+
supportsPower: boolean(),
|
|
55599
|
+
/** Every program the description lists, with its options. */
|
|
55600
|
+
programs: array(DishwasherProgramSchema),
|
|
55601
|
+
/** Every option and setting entity the description lists (programs reference these by key). */
|
|
55602
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
55603
|
+
});
|
|
55432
55604
|
var dishwasherCapability = {
|
|
55433
55605
|
name: "dishwasher",
|
|
55434
55606
|
scope: "device",
|
|
@@ -55436,86 +55608,102 @@ var dishwasherCapability = {
|
|
|
55436
55608
|
mode: "singleton",
|
|
55437
55609
|
deviceTypes: [DeviceType.Dishwasher],
|
|
55438
55610
|
methods: {
|
|
55439
|
-
|
|
55611
|
+
/**
|
|
55612
|
+
* Start a program. Without `program` the selected one starts. `options` are
|
|
55613
|
+
* option feature keys; each is checked against the program's constraints.
|
|
55614
|
+
*/
|
|
55615
|
+
start: method(object({
|
|
55616
|
+
deviceId: DeviceIdSchema,
|
|
55617
|
+
program: string().min(1).optional(),
|
|
55618
|
+
options: record(string(), DishwasherValueSchema).optional()
|
|
55619
|
+
}), _void(), {
|
|
55440
55620
|
kind: "mutation",
|
|
55441
55621
|
auth: "protected"
|
|
55442
55622
|
}),
|
|
55443
|
-
pause: method(object({ deviceId:
|
|
55623
|
+
pause: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55444
55624
|
kind: "mutation",
|
|
55445
55625
|
auth: "protected"
|
|
55446
55626
|
}),
|
|
55447
|
-
|
|
55627
|
+
resume: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55628
|
+
kind: "mutation",
|
|
55629
|
+
auth: "protected"
|
|
55630
|
+
}),
|
|
55631
|
+
stop: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55448
55632
|
kind: "mutation",
|
|
55449
55633
|
auth: "protected"
|
|
55450
55634
|
}),
|
|
55635
|
+
/** Select (not start) a program; refused when the appliance does not offer it. */
|
|
55451
55636
|
setProgram: method(object({
|
|
55452
|
-
deviceId:
|
|
55637
|
+
deviceId: DeviceIdSchema,
|
|
55453
55638
|
program: string().min(1)
|
|
55454
55639
|
}), _void(), {
|
|
55455
55640
|
kind: "mutation",
|
|
55456
55641
|
auth: "protected"
|
|
55457
55642
|
}),
|
|
55458
55643
|
setPower: method(object({
|
|
55459
|
-
deviceId:
|
|
55644
|
+
deviceId: DeviceIdSchema,
|
|
55460
55645
|
on: boolean()
|
|
55461
55646
|
}), _void(), {
|
|
55462
55647
|
kind: "mutation",
|
|
55463
55648
|
auth: "protected"
|
|
55464
55649
|
}),
|
|
55465
55650
|
setHalfLoad: method(object({
|
|
55466
|
-
deviceId:
|
|
55651
|
+
deviceId: DeviceIdSchema,
|
|
55467
55652
|
on: boolean()
|
|
55468
55653
|
}), _void(), {
|
|
55469
55654
|
kind: "mutation",
|
|
55470
55655
|
auth: "protected"
|
|
55471
55656
|
}),
|
|
55472
55657
|
setHygienePlus: method(object({
|
|
55473
|
-
deviceId:
|
|
55658
|
+
deviceId: DeviceIdSchema,
|
|
55474
55659
|
on: boolean()
|
|
55475
55660
|
}), _void(), {
|
|
55476
55661
|
kind: "mutation",
|
|
55477
55662
|
auth: "protected"
|
|
55478
55663
|
}),
|
|
55479
55664
|
setExtraDry: method(object({
|
|
55480
|
-
deviceId:
|
|
55665
|
+
deviceId: DeviceIdSchema,
|
|
55481
55666
|
on: boolean()
|
|
55482
55667
|
}), _void(), {
|
|
55483
55668
|
kind: "mutation",
|
|
55484
55669
|
auth: "protected"
|
|
55485
55670
|
}),
|
|
55486
55671
|
setIntensiveZone: method(object({
|
|
55487
|
-
deviceId:
|
|
55672
|
+
deviceId: DeviceIdSchema,
|
|
55488
55673
|
on: boolean()
|
|
55489
55674
|
}), _void(), {
|
|
55490
55675
|
kind: "mutation",
|
|
55491
55676
|
auth: "protected"
|
|
55492
55677
|
}),
|
|
55493
55678
|
setVarioSpeedPlus: method(object({
|
|
55494
|
-
deviceId:
|
|
55679
|
+
deviceId: DeviceIdSchema,
|
|
55495
55680
|
on: boolean()
|
|
55496
55681
|
}), _void(), {
|
|
55497
55682
|
kind: "mutation",
|
|
55498
55683
|
auth: "protected"
|
|
55499
55684
|
}),
|
|
55500
55685
|
setChildLock: method(object({
|
|
55501
|
-
deviceId:
|
|
55686
|
+
deviceId: DeviceIdSchema,
|
|
55502
55687
|
on: boolean()
|
|
55503
55688
|
}), _void(), {
|
|
55504
55689
|
kind: "mutation",
|
|
55505
55690
|
auth: "protected"
|
|
55506
55691
|
}),
|
|
55692
|
+
/**
|
|
55693
|
+
* Write any option or setting by feature key. Refused when the description does
|
|
55694
|
+
* not list it, it is not writable or not available now, or the value is outside
|
|
55695
|
+
* its declared range / members.
|
|
55696
|
+
*/
|
|
55507
55697
|
setOption: method(object({
|
|
55508
|
-
deviceId:
|
|
55698
|
+
deviceId: DeviceIdSchema,
|
|
55509
55699
|
key: string().min(1),
|
|
55510
|
-
value:
|
|
55511
|
-
boolean(),
|
|
55512
|
-
string(),
|
|
55513
|
-
number()
|
|
55514
|
-
])
|
|
55700
|
+
value: DishwasherValueSchema
|
|
55515
55701
|
}), _void(), {
|
|
55516
55702
|
kind: "mutation",
|
|
55517
55703
|
auth: "protected"
|
|
55518
|
-
})
|
|
55704
|
+
}),
|
|
55705
|
+
/** What this appliance can do, from its own description — the UI is derived from it. */
|
|
55706
|
+
getOptions: method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" })
|
|
55519
55707
|
},
|
|
55520
55708
|
status: {
|
|
55521
55709
|
schema: DishwasherStatusSchema,
|
|
@@ -68981,6 +69169,12 @@ Object.freeze({
|
|
|
68981
69169
|
addonId: null,
|
|
68982
69170
|
access: "view"
|
|
68983
69171
|
},
|
|
69172
|
+
"dishwasher.getOptions": {
|
|
69173
|
+
capName: "dishwasher",
|
|
69174
|
+
capScope: "device",
|
|
69175
|
+
addonId: null,
|
|
69176
|
+
access: "view"
|
|
69177
|
+
},
|
|
68984
69178
|
"dishwasher.getStatus": {
|
|
68985
69179
|
capName: "dishwasher",
|
|
68986
69180
|
capScope: "device",
|
|
@@ -68993,6 +69187,12 @@ Object.freeze({
|
|
|
68993
69187
|
addonId: null,
|
|
68994
69188
|
access: "create"
|
|
68995
69189
|
},
|
|
69190
|
+
"dishwasher.resume": {
|
|
69191
|
+
capName: "dishwasher",
|
|
69192
|
+
capScope: "device",
|
|
69193
|
+
addonId: null,
|
|
69194
|
+
access: "create"
|
|
69195
|
+
},
|
|
68996
69196
|
"dishwasher.setChildLock": {
|
|
68997
69197
|
capName: "dishwasher",
|
|
68998
69198
|
capScope: "device",
|
|
@@ -73493,6 +73693,12 @@ Object.freeze({
|
|
|
73493
73693
|
addonId: null,
|
|
73494
73694
|
access: "view"
|
|
73495
73695
|
},
|
|
73696
|
+
"storageMigration.moverClearance": {
|
|
73697
|
+
capName: "storage-migration",
|
|
73698
|
+
capScope: "system",
|
|
73699
|
+
addonId: null,
|
|
73700
|
+
access: "view"
|
|
73701
|
+
},
|
|
73496
73702
|
"storageMigration.movers": {
|
|
73497
73703
|
capName: "storage-migration",
|
|
73498
73704
|
capScope: "system",
|
|
@@ -75686,6 +75892,11 @@ Object.freeze({
|
|
|
75686
75892
|
form: "single",
|
|
75687
75893
|
optional: false
|
|
75688
75894
|
}],
|
|
75895
|
+
"dishwasher.getOptions": [{
|
|
75896
|
+
name: "deviceId",
|
|
75897
|
+
form: "single",
|
|
75898
|
+
optional: false
|
|
75899
|
+
}],
|
|
75689
75900
|
"dishwasher.getStatus": [{
|
|
75690
75901
|
name: "deviceId",
|
|
75691
75902
|
form: "single",
|
|
@@ -75696,6 +75907,11 @@ Object.freeze({
|
|
|
75696
75907
|
form: "single",
|
|
75697
75908
|
optional: false
|
|
75698
75909
|
}],
|
|
75910
|
+
"dishwasher.resume": [{
|
|
75911
|
+
name: "deviceId",
|
|
75912
|
+
form: "single",
|
|
75913
|
+
optional: false
|
|
75914
|
+
}],
|
|
75699
75915
|
"dishwasher.setChildLock": [{
|
|
75700
75916
|
name: "deviceId",
|
|
75701
75917
|
form: "single",
|
|
@@ -77782,6 +77998,9 @@ new Map(Object.entries({
|
|
|
77782
77998
|
"wrapper-update-available": "system",
|
|
77783
77999
|
"backup-completed": "system",
|
|
77784
78000
|
"export-completed": "system",
|
|
78001
|
+
"alert-critical": "system",
|
|
78002
|
+
"alert-error": "system",
|
|
78003
|
+
"alert-critical-resolved": "system",
|
|
77785
78004
|
"storage-location-low": "system",
|
|
77786
78005
|
"storage-location-critical": "system",
|
|
77787
78006
|
"storage-location-ok": "system",
|
|
@@ -77906,6 +78125,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
77906
78125
|
"storage-location-ok"
|
|
77907
78126
|
]
|
|
77908
78127
|
},
|
|
78128
|
+
{
|
|
78129
|
+
id: "alerts",
|
|
78130
|
+
family: "system",
|
|
78131
|
+
label: "Alerts",
|
|
78132
|
+
kinds: [
|
|
78133
|
+
"alert-critical",
|
|
78134
|
+
"alert-error",
|
|
78135
|
+
"alert-critical-resolved"
|
|
78136
|
+
]
|
|
78137
|
+
},
|
|
77909
78138
|
{
|
|
77910
78139
|
id: "alarm",
|
|
77911
78140
|
family: "alarm",
|
|
@@ -77950,6 +78179,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
|
|
|
77950
78179
|
return [[descriptor.kind, field]];
|
|
77951
78180
|
})));
|
|
77952
78181
|
Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
|
|
78182
|
+
object({
|
|
78183
|
+
phase: _enum(["raised", "resolved"]),
|
|
78184
|
+
episodeId: string().min(1),
|
|
78185
|
+
alertId: string().min(1),
|
|
78186
|
+
severity: AlertSeveritySchema,
|
|
78187
|
+
category: string(),
|
|
78188
|
+
title: string(),
|
|
78189
|
+
message: string(),
|
|
78190
|
+
sourceType: string().optional(),
|
|
78191
|
+
sourceId: string().optional(),
|
|
78192
|
+
nodeId: string().optional(),
|
|
78193
|
+
/** The alert's own action link (where the operator acts on it), when it has one. */
|
|
78194
|
+
actionUrl: string().optional(),
|
|
78195
|
+
at: number()
|
|
78196
|
+
});
|
|
77953
78197
|
var RULE_BODY_ONLY = ["body"];
|
|
77954
78198
|
var RULE_TEXT = ["title", "body"];
|
|
77955
78199
|
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
@@ -77959,6 +78203,11 @@ var TANK = [
|
|
|
77959
78203
|
"device-tank-full",
|
|
77960
78204
|
"device-tank-normal"
|
|
77961
78205
|
];
|
|
78206
|
+
var ALERT_EPISODE = [
|
|
78207
|
+
"alert-critical",
|
|
78208
|
+
"alert-error",
|
|
78209
|
+
"alert-critical-resolved"
|
|
78210
|
+
];
|
|
77962
78211
|
var UPDATES = [
|
|
77963
78212
|
"addon-update-available",
|
|
77964
78213
|
"server-update-available",
|
|
@@ -78151,14 +78400,14 @@ var STATE_SUMMARY_VARS = [
|
|
|
78151
78400
|
([...RULE_TEXT], [...CONSUMABLE]),
|
|
78152
78401
|
([...RULE_TEXT], [...TANK]),
|
|
78153
78402
|
[...RULE_TEXT],
|
|
78154
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
78155
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
78156
|
-
[...RULE_TEXT],
|
|
78403
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
78404
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
78157
78405
|
[...RULE_TEXT],
|
|
78158
78406
|
[...RULE_TEXT],
|
|
78159
78407
|
[...RULE_TEXT],
|
|
78160
78408
|
[...RULE_TEXT],
|
|
78161
78409
|
[...RULE_TEXT],
|
|
78410
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78162
78411
|
[...RULE_TEXT],
|
|
78163
78412
|
[...RULE_TEXT],
|
|
78164
78413
|
[...RULE_TEXT],
|
|
@@ -78176,7 +78425,11 @@ var STATE_SUMMARY_VARS = [
|
|
|
78176
78425
|
[...RULE_TEXT],
|
|
78177
78426
|
[...RULE_TEXT],
|
|
78178
78427
|
[...RULE_TEXT],
|
|
78179
|
-
[...RULE_TEXT],
|
|
78428
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78429
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78430
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78431
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78432
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78180
78433
|
[...RULE_TEXT],
|
|
78181
78434
|
[...RULE_TEXT],
|
|
78182
78435
|
[...RULE_TEXT],
|