@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.js
CHANGED
|
@@ -31,7 +31,7 @@ let node_module = require("node:module");
|
|
|
31
31
|
let sharp = require("sharp");
|
|
32
32
|
sharp = __toESM(sharp);
|
|
33
33
|
let node_http = require("node:http");
|
|
34
|
-
//#region ../types/dist/event-category-
|
|
34
|
+
//#region ../types/dist/event-category-DOl51-Ij.mjs
|
|
35
35
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
36
36
|
EventCategory["SystemBoot"] = "system.boot";
|
|
37
37
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -110,9 +110,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
110
110
|
/**
|
|
111
111
|
* The node's one-shot runner boot check (D877): planned runners against the
|
|
112
112
|
* process service, `degraded` when any is failed, refused or missing. The
|
|
113
|
-
* alert centre turns it into one
|
|
113
|
+
* alert centre turns it into one critical alert.
|
|
114
114
|
*/
|
|
115
115
|
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
116
|
+
/**
|
|
117
|
+
* An alert EPISODE opened or closed, emitted by the alert centre for alerts
|
|
118
|
+
* of severity `critical` or `error` (`AlertEpisodePayload`). The alert
|
|
119
|
+
* centre sends no notification of its own: Notification Center turns this
|
|
120
|
+
* into the `alert-critical` / `alert-error` / `alert-critical-resolved`
|
|
121
|
+
* system-event kinds, and reconciles from the alerts store because a bus
|
|
122
|
+
* event may be dropped (D8, D11).
|
|
123
|
+
*/
|
|
124
|
+
EventCategory["AlertEpisode"] = "alert.episode";
|
|
116
125
|
EventCategory["AddonError"] = "addon.error";
|
|
117
126
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
118
127
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -5437,7 +5446,7 @@ var ZodIssueCode = {
|
|
|
5437
5446
|
var ZodFirstPartyTypeKind;
|
|
5438
5447
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5439
5448
|
//#endregion
|
|
5440
|
-
//#region ../types/dist/sleep-
|
|
5449
|
+
//#region ../types/dist/sleep-BxjU_fJM.mjs
|
|
5441
5450
|
/**
|
|
5442
5451
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5443
5452
|
* window to float samples (D455).
|
|
@@ -7819,6 +7828,12 @@ function normalizeAddonInitResult(result) {
|
|
|
7819
7828
|
if (Array.isArray(result)) return { providers: result };
|
|
7820
7829
|
return result;
|
|
7821
7830
|
}
|
|
7831
|
+
/**
|
|
7832
|
+
* The share-view scope kinds a `csv_*` share token can carry. The hub mints
|
|
7833
|
+
* and validates them (`share-token.service.ts` builds its enum from this
|
|
7834
|
+
* list); a data plane names the kinds it ACCEPTS in `share`.
|
|
7835
|
+
*/
|
|
7836
|
+
var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
|
|
7822
7837
|
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
7823
7838
|
var PeerBytesTicketSchema = object({
|
|
7824
7839
|
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
@@ -12575,6 +12590,229 @@ var ConvertResultSchema = object({
|
|
|
12575
12590
|
files: array(string()).readonly()
|
|
12576
12591
|
})).readonly()
|
|
12577
12592
|
});
|
|
12593
|
+
/**
|
|
12594
|
+
* Zod schemas for persisted record types.
|
|
12595
|
+
*
|
|
12596
|
+
* These schemas serve as the single source of truth for types that are
|
|
12597
|
+
* stored in the settings-store backend and retrieved via tRPC. They
|
|
12598
|
+
* replace the manual TypeScript interfaces with schema-derived types,
|
|
12599
|
+
* enabling runtime validation when reading from the backend.
|
|
12600
|
+
*
|
|
12601
|
+
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
12602
|
+
* keeps the original name for backward compatibility.
|
|
12603
|
+
*/
|
|
12604
|
+
/**
|
|
12605
|
+
* Auth model (v2 — 2026-05-12 caps-only):
|
|
12606
|
+
*
|
|
12607
|
+
* Two principals:
|
|
12608
|
+
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
12609
|
+
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
12610
|
+
*
|
|
12611
|
+
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
12612
|
+
* `super_admin` — collapsed onto the single boolean because every
|
|
12613
|
+
* non-admin caller is governed by the same scope-check rules; the
|
|
12614
|
+
* distinction was only ever used to route role-specific procedures
|
|
12615
|
+
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
12616
|
+
* with `isAdmin: false` + an explicit scope list.
|
|
12617
|
+
*/
|
|
12618
|
+
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
12619
|
+
var MethodAccessSchema = _enum([
|
|
12620
|
+
"view",
|
|
12621
|
+
"create",
|
|
12622
|
+
"delete"
|
|
12623
|
+
]);
|
|
12624
|
+
/**
|
|
12625
|
+
* A single scope grant. Three forms — checked in matcher with OR
|
|
12626
|
+
* semantics; the first match decides whether the call passes:
|
|
12627
|
+
*
|
|
12628
|
+
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
12629
|
+
* cap with the matching `scope` declaration. New caps inherit grants
|
|
12630
|
+
* automatically — adding a device cap to the codebase makes it
|
|
12631
|
+
* reachable to every user with `category:device [...]` without a
|
|
12632
|
+
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
12633
|
+
*
|
|
12634
|
+
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
12635
|
+
* useful when an integration needs to interact with one specific
|
|
12636
|
+
* addon's surface regardless of how many caps it exports.
|
|
12637
|
+
*
|
|
12638
|
+
* - `capability` — the most precise form. Single cap name. Use for
|
|
12639
|
+
* integration tokens where you want to grant `addons.installPackage`
|
|
12640
|
+
* and nothing else.
|
|
12641
|
+
*
|
|
12642
|
+
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
12643
|
+
* "give me everything" escape; there is no wildcard scope.
|
|
12644
|
+
*/
|
|
12645
|
+
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
12646
|
+
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
12647
|
+
var CapScopeSchema = _enum(["device", "system"]);
|
|
12648
|
+
/**
|
|
12649
|
+
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
12650
|
+
*
|
|
12651
|
+
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
12652
|
+
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
12653
|
+
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
12654
|
+
* AFTER the grant was minted — no re-grant, no re-login.
|
|
12655
|
+
*
|
|
12656
|
+
* - `all` — every device in the deployment. The broad viewer/operator
|
|
12657
|
+
* lever without a `category` grant (a `category` grant also covers device
|
|
12658
|
+
* caps that carry no deviceId; `all` is specifically the device set).
|
|
12659
|
+
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
12660
|
+
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
12661
|
+
* is NOT covered until the grant is edited.
|
|
12662
|
+
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
12663
|
+
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
12664
|
+
* re-resolves on the next request.
|
|
12665
|
+
* - `locations` — every device whose operator-assigned `location` label is
|
|
12666
|
+
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
12667
|
+
* null/unset location matches NO `locations` selector.
|
|
12668
|
+
*/
|
|
12669
|
+
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
12670
|
+
object({ kind: literal("all") }),
|
|
12671
|
+
object({
|
|
12672
|
+
kind: literal("ids"),
|
|
12673
|
+
ids: array(number().int()).min(1)
|
|
12674
|
+
}),
|
|
12675
|
+
object({
|
|
12676
|
+
kind: literal("types"),
|
|
12677
|
+
types: array(_enum(DeviceType)).min(1)
|
|
12678
|
+
}),
|
|
12679
|
+
object({
|
|
12680
|
+
kind: literal("locations"),
|
|
12681
|
+
locations: array(string().min(1)).min(1)
|
|
12682
|
+
})
|
|
12683
|
+
]);
|
|
12684
|
+
var DeviceTokenScopeSchema = object({
|
|
12685
|
+
type: literal("device"),
|
|
12686
|
+
/** The device SET this grant covers — resolved against the live fleet. */
|
|
12687
|
+
selector: DeviceSelectorSchema,
|
|
12688
|
+
access: array(MethodAccessSchema).min(1),
|
|
12689
|
+
/**
|
|
12690
|
+
* Whether a grant on a PARENT device transparently covers its accessory
|
|
12691
|
+
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
12692
|
+
* Direction is parent → children ONLY.
|
|
12693
|
+
*
|
|
12694
|
+
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
12695
|
+
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
12696
|
+
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
12697
|
+
* operator must grant on the child, not inherit from the parent). Set it
|
|
12698
|
+
* explicitly to override that default per grant.
|
|
12699
|
+
*/
|
|
12700
|
+
includeLinked: boolean().optional()
|
|
12701
|
+
});
|
|
12702
|
+
/**
|
|
12703
|
+
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
12704
|
+
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
12705
|
+
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
12706
|
+
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
12707
|
+
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
12708
|
+
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
12709
|
+
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
12710
|
+
* migration covers both without a flag day. No cast — the raw object is read
|
|
12711
|
+
* through `Reflect.get` (its static type is `unknown`).
|
|
12712
|
+
*/
|
|
12713
|
+
function migrateLegacyTokenScope(raw) {
|
|
12714
|
+
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
12715
|
+
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
12716
|
+
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
12717
|
+
const targets = Reflect.get(raw, "targets");
|
|
12718
|
+
if (!Array.isArray(targets)) return raw;
|
|
12719
|
+
return {
|
|
12720
|
+
type: "device",
|
|
12721
|
+
selector: {
|
|
12722
|
+
kind: "ids",
|
|
12723
|
+
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
12724
|
+
},
|
|
12725
|
+
access: Reflect.get(raw, "access")
|
|
12726
|
+
};
|
|
12727
|
+
}
|
|
12728
|
+
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
12729
|
+
object({
|
|
12730
|
+
type: literal("category"),
|
|
12731
|
+
target: CapScopeSchema,
|
|
12732
|
+
access: array(MethodAccessSchema).min(1)
|
|
12733
|
+
}),
|
|
12734
|
+
object({
|
|
12735
|
+
type: literal("capability"),
|
|
12736
|
+
target: string(),
|
|
12737
|
+
access: array(MethodAccessSchema).min(1)
|
|
12738
|
+
}),
|
|
12739
|
+
object({
|
|
12740
|
+
type: literal("addon"),
|
|
12741
|
+
target: string(),
|
|
12742
|
+
access: array(MethodAccessSchema).min(1)
|
|
12743
|
+
}),
|
|
12744
|
+
DeviceTokenScopeSchema
|
|
12745
|
+
]));
|
|
12746
|
+
object({
|
|
12747
|
+
id: string(),
|
|
12748
|
+
username: string(),
|
|
12749
|
+
passwordHash: string(),
|
|
12750
|
+
/**
|
|
12751
|
+
* Admin bypass. When true, the middleware skips the scope-access
|
|
12752
|
+
* check entirely. There is no other axis of privilege; the legacy
|
|
12753
|
+
* role enum collapsed onto this boolean in v2.
|
|
12754
|
+
*/
|
|
12755
|
+
isAdmin: boolean().default(false),
|
|
12756
|
+
allowedProviders: AllowedProviderSchema,
|
|
12757
|
+
allowedDevices: AllowedDevicesSchema,
|
|
12758
|
+
/**
|
|
12759
|
+
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
12760
|
+
* ignored. Non-admins without scopes are locked out of every
|
|
12761
|
+
* protected call.
|
|
12762
|
+
*/
|
|
12763
|
+
scopes: array(TokenScopeSchema).default([]),
|
|
12764
|
+
createdAt: number(),
|
|
12765
|
+
updatedAt: number()
|
|
12766
|
+
});
|
|
12767
|
+
object({
|
|
12768
|
+
id: string(),
|
|
12769
|
+
label: string(),
|
|
12770
|
+
isAdmin: boolean().default(false),
|
|
12771
|
+
allowedProviders: AllowedProviderSchema,
|
|
12772
|
+
allowedDevices: AllowedDevicesSchema,
|
|
12773
|
+
tokenHash: string(),
|
|
12774
|
+
tokenPrefix: string(),
|
|
12775
|
+
createdAt: number(),
|
|
12776
|
+
lastUsedAt: number().optional()
|
|
12777
|
+
});
|
|
12778
|
+
object({
|
|
12779
|
+
id: string(),
|
|
12780
|
+
userId: string(),
|
|
12781
|
+
name: string(),
|
|
12782
|
+
tokenHash: string(),
|
|
12783
|
+
tokenPrefix: string(),
|
|
12784
|
+
scopes: array(TokenScopeSchema),
|
|
12785
|
+
expiresAt: number().nullish(),
|
|
12786
|
+
lastUsedAt: number().nullish(),
|
|
12787
|
+
createdAt: number()
|
|
12788
|
+
});
|
|
12789
|
+
/** What a share-view grant lets its holder see. */
|
|
12790
|
+
var ShareViewGrantSchema = object({
|
|
12791
|
+
kind: _enum(SHARE_VIEW_KINDS),
|
|
12792
|
+
deviceIds: array(number().int().nonnegative()).min(1).max(64),
|
|
12793
|
+
/** Talk-back, opt-in at mint time; absent means off. */
|
|
12794
|
+
talk: boolean().optional()
|
|
12795
|
+
});
|
|
12796
|
+
var ShareViewScopeSchema = object({
|
|
12797
|
+
type: literal("share-view"),
|
|
12798
|
+
grant: ShareViewGrantSchema
|
|
12799
|
+
});
|
|
12800
|
+
var AddonRoutesScopeSchema = object({
|
|
12801
|
+
type: literal("addon-routes"),
|
|
12802
|
+
access: array(MethodAccessSchema).min(1)
|
|
12803
|
+
});
|
|
12804
|
+
var CredentialScopeSchema = union([
|
|
12805
|
+
literal("*"),
|
|
12806
|
+
ShareViewScopeSchema,
|
|
12807
|
+
AddonRoutesScopeSchema,
|
|
12808
|
+
TokenScopeSchema
|
|
12809
|
+
]);
|
|
12810
|
+
object({
|
|
12811
|
+
kind: literal("credential"),
|
|
12812
|
+
sub: string().min(1),
|
|
12813
|
+
jti: string().min(16),
|
|
12814
|
+
scopes: array(CredentialScopeSchema).min(1)
|
|
12815
|
+
});
|
|
12578
12816
|
_enum(["new-session", "step-up"]);
|
|
12579
12817
|
/** The languages the hub's app landing pages are written in (D858). */
|
|
12580
12818
|
var AppPageLangSchema = _enum(["en", "it"]);
|
|
@@ -13291,7 +13529,14 @@ var AlertSeveritySchema = _enum([
|
|
|
13291
13529
|
]);
|
|
13292
13530
|
var AlertActionSchema = object({
|
|
13293
13531
|
label: string(),
|
|
13294
|
-
href: string().optional()
|
|
13532
|
+
href: string().optional(),
|
|
13533
|
+
/**
|
|
13534
|
+
* How `href` is followed. Absent / `app`: an admin-ui route (client-side).
|
|
13535
|
+
* `server`: a route the HUB serves (an addon HTTP route such as an OAuth
|
|
13536
|
+
* start) — the browser must leave the SPA with a full navigation, because
|
|
13537
|
+
* the SPA has no such route and would bounce to the home page.
|
|
13538
|
+
*/
|
|
13539
|
+
navigation: _enum(["app", "server"]).optional()
|
|
13295
13540
|
});
|
|
13296
13541
|
var AlertStatusSchema = _enum([
|
|
13297
13542
|
"active",
|
|
@@ -41926,6 +42171,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
41926
42171
|
"server-updated",
|
|
41927
42172
|
"export-completed",
|
|
41928
42173
|
"backup-completed",
|
|
42174
|
+
"alert-critical",
|
|
42175
|
+
"alert-error",
|
|
42176
|
+
"alert-critical-resolved",
|
|
41929
42177
|
"camera-online",
|
|
41930
42178
|
"camera-offline",
|
|
41931
42179
|
"camera-disabled",
|
|
@@ -43961,202 +44209,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
43961
44209
|
auth: "admin"
|
|
43962
44210
|
}), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
|
|
43963
44211
|
/**
|
|
43964
|
-
* Zod schemas for persisted record types.
|
|
43965
|
-
*
|
|
43966
|
-
* These schemas serve as the single source of truth for types that are
|
|
43967
|
-
* stored in the settings-store backend and retrieved via tRPC. They
|
|
43968
|
-
* replace the manual TypeScript interfaces with schema-derived types,
|
|
43969
|
-
* enabling runtime validation when reading from the backend.
|
|
43970
|
-
*
|
|
43971
|
-
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
43972
|
-
* keeps the original name for backward compatibility.
|
|
43973
|
-
*/
|
|
43974
|
-
/**
|
|
43975
|
-
* Auth model (v2 — 2026-05-12 caps-only):
|
|
43976
|
-
*
|
|
43977
|
-
* Two principals:
|
|
43978
|
-
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
43979
|
-
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
43980
|
-
*
|
|
43981
|
-
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
43982
|
-
* `super_admin` — collapsed onto the single boolean because every
|
|
43983
|
-
* non-admin caller is governed by the same scope-check rules; the
|
|
43984
|
-
* distinction was only ever used to route role-specific procedures
|
|
43985
|
-
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
43986
|
-
* with `isAdmin: false` + an explicit scope list.
|
|
43987
|
-
*/
|
|
43988
|
-
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
43989
|
-
var MethodAccessSchema = _enum([
|
|
43990
|
-
"view",
|
|
43991
|
-
"create",
|
|
43992
|
-
"delete"
|
|
43993
|
-
]);
|
|
43994
|
-
/**
|
|
43995
|
-
* A single scope grant. Three forms — checked in matcher with OR
|
|
43996
|
-
* semantics; the first match decides whether the call passes:
|
|
43997
|
-
*
|
|
43998
|
-
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
43999
|
-
* cap with the matching `scope` declaration. New caps inherit grants
|
|
44000
|
-
* automatically — adding a device cap to the codebase makes it
|
|
44001
|
-
* reachable to every user with `category:device [...]` without a
|
|
44002
|
-
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
44003
|
-
*
|
|
44004
|
-
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
44005
|
-
* useful when an integration needs to interact with one specific
|
|
44006
|
-
* addon's surface regardless of how many caps it exports.
|
|
44007
|
-
*
|
|
44008
|
-
* - `capability` — the most precise form. Single cap name. Use for
|
|
44009
|
-
* integration tokens where you want to grant `addons.installPackage`
|
|
44010
|
-
* and nothing else.
|
|
44011
|
-
*
|
|
44012
|
-
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
44013
|
-
* "give me everything" escape; there is no wildcard scope.
|
|
44014
|
-
*/
|
|
44015
|
-
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
44016
|
-
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
44017
|
-
var CapScopeSchema = _enum(["device", "system"]);
|
|
44018
|
-
/**
|
|
44019
|
-
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
44020
|
-
*
|
|
44021
|
-
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
44022
|
-
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
44023
|
-
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
44024
|
-
* AFTER the grant was minted — no re-grant, no re-login.
|
|
44025
|
-
*
|
|
44026
|
-
* - `all` — every device in the deployment. The broad viewer/operator
|
|
44027
|
-
* lever without a `category` grant (a `category` grant also covers device
|
|
44028
|
-
* caps that carry no deviceId; `all` is specifically the device set).
|
|
44029
|
-
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
44030
|
-
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
44031
|
-
* is NOT covered until the grant is edited.
|
|
44032
|
-
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
44033
|
-
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
44034
|
-
* re-resolves on the next request.
|
|
44035
|
-
* - `locations` — every device whose operator-assigned `location` label is
|
|
44036
|
-
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
44037
|
-
* null/unset location matches NO `locations` selector.
|
|
44038
|
-
*/
|
|
44039
|
-
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
44040
|
-
object({ kind: literal("all") }),
|
|
44041
|
-
object({
|
|
44042
|
-
kind: literal("ids"),
|
|
44043
|
-
ids: array(number().int()).min(1)
|
|
44044
|
-
}),
|
|
44045
|
-
object({
|
|
44046
|
-
kind: literal("types"),
|
|
44047
|
-
types: array(_enum(DeviceType)).min(1)
|
|
44048
|
-
}),
|
|
44049
|
-
object({
|
|
44050
|
-
kind: literal("locations"),
|
|
44051
|
-
locations: array(string().min(1)).min(1)
|
|
44052
|
-
})
|
|
44053
|
-
]);
|
|
44054
|
-
var DeviceTokenScopeSchema = object({
|
|
44055
|
-
type: literal("device"),
|
|
44056
|
-
/** The device SET this grant covers — resolved against the live fleet. */
|
|
44057
|
-
selector: DeviceSelectorSchema,
|
|
44058
|
-
access: array(MethodAccessSchema).min(1),
|
|
44059
|
-
/**
|
|
44060
|
-
* Whether a grant on a PARENT device transparently covers its accessory
|
|
44061
|
-
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
44062
|
-
* Direction is parent → children ONLY.
|
|
44063
|
-
*
|
|
44064
|
-
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
44065
|
-
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
44066
|
-
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
44067
|
-
* operator must grant on the child, not inherit from the parent). Set it
|
|
44068
|
-
* explicitly to override that default per grant.
|
|
44069
|
-
*/
|
|
44070
|
-
includeLinked: boolean().optional()
|
|
44071
|
-
});
|
|
44072
|
-
/**
|
|
44073
|
-
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
44074
|
-
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
44075
|
-
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
44076
|
-
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
44077
|
-
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
44078
|
-
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
44079
|
-
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
44080
|
-
* migration covers both without a flag day. No cast — the raw object is read
|
|
44081
|
-
* through `Reflect.get` (its static type is `unknown`).
|
|
44082
|
-
*/
|
|
44083
|
-
function migrateLegacyTokenScope(raw) {
|
|
44084
|
-
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
44085
|
-
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
44086
|
-
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
44087
|
-
const targets = Reflect.get(raw, "targets");
|
|
44088
|
-
if (!Array.isArray(targets)) return raw;
|
|
44089
|
-
return {
|
|
44090
|
-
type: "device",
|
|
44091
|
-
selector: {
|
|
44092
|
-
kind: "ids",
|
|
44093
|
-
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
44094
|
-
},
|
|
44095
|
-
access: Reflect.get(raw, "access")
|
|
44096
|
-
};
|
|
44097
|
-
}
|
|
44098
|
-
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
44099
|
-
object({
|
|
44100
|
-
type: literal("category"),
|
|
44101
|
-
target: CapScopeSchema,
|
|
44102
|
-
access: array(MethodAccessSchema).min(1)
|
|
44103
|
-
}),
|
|
44104
|
-
object({
|
|
44105
|
-
type: literal("capability"),
|
|
44106
|
-
target: string(),
|
|
44107
|
-
access: array(MethodAccessSchema).min(1)
|
|
44108
|
-
}),
|
|
44109
|
-
object({
|
|
44110
|
-
type: literal("addon"),
|
|
44111
|
-
target: string(),
|
|
44112
|
-
access: array(MethodAccessSchema).min(1)
|
|
44113
|
-
}),
|
|
44114
|
-
DeviceTokenScopeSchema
|
|
44115
|
-
]));
|
|
44116
|
-
object({
|
|
44117
|
-
id: string(),
|
|
44118
|
-
username: string(),
|
|
44119
|
-
passwordHash: string(),
|
|
44120
|
-
/**
|
|
44121
|
-
* Admin bypass. When true, the middleware skips the scope-access
|
|
44122
|
-
* check entirely. There is no other axis of privilege; the legacy
|
|
44123
|
-
* role enum collapsed onto this boolean in v2.
|
|
44124
|
-
*/
|
|
44125
|
-
isAdmin: boolean().default(false),
|
|
44126
|
-
allowedProviders: AllowedProviderSchema,
|
|
44127
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44128
|
-
/**
|
|
44129
|
-
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
44130
|
-
* ignored. Non-admins without scopes are locked out of every
|
|
44131
|
-
* protected call.
|
|
44132
|
-
*/
|
|
44133
|
-
scopes: array(TokenScopeSchema).default([]),
|
|
44134
|
-
createdAt: number(),
|
|
44135
|
-
updatedAt: number()
|
|
44136
|
-
});
|
|
44137
|
-
object({
|
|
44138
|
-
id: string(),
|
|
44139
|
-
label: string(),
|
|
44140
|
-
isAdmin: boolean().default(false),
|
|
44141
|
-
allowedProviders: AllowedProviderSchema,
|
|
44142
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44143
|
-
tokenHash: string(),
|
|
44144
|
-
tokenPrefix: string(),
|
|
44145
|
-
createdAt: number(),
|
|
44146
|
-
lastUsedAt: number().optional()
|
|
44147
|
-
});
|
|
44148
|
-
object({
|
|
44149
|
-
id: string(),
|
|
44150
|
-
userId: string(),
|
|
44151
|
-
name: string(),
|
|
44152
|
-
tokenHash: string(),
|
|
44153
|
-
tokenPrefix: string(),
|
|
44154
|
-
scopes: array(TokenScopeSchema),
|
|
44155
|
-
expiresAt: number().nullish(),
|
|
44156
|
-
lastUsedAt: number().nullish(),
|
|
44157
|
-
createdAt: number()
|
|
44158
|
-
});
|
|
44159
|
-
/**
|
|
44160
44212
|
* `oauth-integration` — a collection cap by which an addon declares
|
|
44161
44213
|
* itself a linkable OAuth client of the hub's core `/oauth2/*` server.
|
|
44162
44214
|
* Each provider returns a static descriptor; the core enumerates them
|
|
@@ -51106,7 +51158,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
51106
51158
|
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
51107
51159
|
kind: "mutation",
|
|
51108
51160
|
auth: "admin"
|
|
51109
|
-
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({
|
|
51161
|
+
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
|
|
51162
|
+
clear: boolean(),
|
|
51163
|
+
repointLocationId: string().optional()
|
|
51164
|
+
}), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
|
|
51110
51165
|
kind: "mutation",
|
|
51111
51166
|
auth: "admin"
|
|
51112
51167
|
}), method(StorageCleanupInputSchema, object({ jobId: string() }), {
|
|
@@ -55406,6 +55461,11 @@ onStatusChanged: { data: object({
|
|
|
55406
55461
|
*
|
|
55407
55462
|
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
55408
55463
|
* provider refreshes the slice on an interval and eagerly after commands.
|
|
55464
|
+
*
|
|
55465
|
+
* UNKNOWN IS NOT OFF. Every field the appliance reports separately is
|
|
55466
|
+
* nullable: `null` means "not known right now" (the appliance has not said,
|
|
55467
|
+
* the link is down, or the description does not carry it) and is never
|
|
55468
|
+
* rendered or exported as `false` / `0`. `availability` says why.
|
|
55409
55469
|
*/
|
|
55410
55470
|
var DishwasherStateSchema = _enum([
|
|
55411
55471
|
"idle",
|
|
@@ -55415,43 +55475,155 @@ var DishwasherStateSchema = _enum([
|
|
|
55415
55475
|
"error",
|
|
55416
55476
|
"unavailable"
|
|
55417
55477
|
]);
|
|
55478
|
+
/**
|
|
55479
|
+
* The appliance's own operation state, uncollapsed. `state` above is the coarse
|
|
55480
|
+
* view for compact surfaces; this is what the appliance said.
|
|
55481
|
+
*/
|
|
55482
|
+
var DishwasherOperationStateSchema = _enum([
|
|
55483
|
+
"Inactive",
|
|
55484
|
+
"Ready",
|
|
55485
|
+
"DelayedStart",
|
|
55486
|
+
"Run",
|
|
55487
|
+
"Pause",
|
|
55488
|
+
"ActionRequired",
|
|
55489
|
+
"Finished",
|
|
55490
|
+
"Error",
|
|
55491
|
+
"Aborting"
|
|
55492
|
+
]);
|
|
55493
|
+
/**
|
|
55494
|
+
* Why fields may be `null`:
|
|
55495
|
+
* - `available` — the link is up and the description is loaded;
|
|
55496
|
+
* - `offline` — the local link is down (values are unknown, not last-known);
|
|
55497
|
+
* - `description-missing` — the link is up but the appliance's description could not
|
|
55498
|
+
* be loaded, so its values cannot be decoded.
|
|
55499
|
+
*/
|
|
55500
|
+
var DishwasherAvailabilitySchema = _enum([
|
|
55501
|
+
"available",
|
|
55502
|
+
"offline",
|
|
55503
|
+
"description-missing"
|
|
55504
|
+
]);
|
|
55418
55505
|
var DishwasherConsumableLevelSchema = _enum([
|
|
55419
55506
|
"ok",
|
|
55420
55507
|
"low",
|
|
55421
55508
|
"empty"
|
|
55422
55509
|
]);
|
|
55423
55510
|
var DishwasherStatusSchema = object({
|
|
55511
|
+
availability: DishwasherAvailabilitySchema,
|
|
55512
|
+
/** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
|
|
55424
55513
|
state: DishwasherStateSchema,
|
|
55425
|
-
/**
|
|
55514
|
+
/** The appliance's operation state as reported; null when not known. */
|
|
55515
|
+
operationState: DishwasherOperationStateSchema.nullable(),
|
|
55516
|
+
/** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
|
|
55426
55517
|
program: string().nullable(),
|
|
55427
|
-
/**
|
|
55518
|
+
/** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
|
|
55519
|
+
selectedProgram: string().nullable(),
|
|
55520
|
+
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
55428
55521
|
availablePrograms: array(string()),
|
|
55429
|
-
/**
|
|
55430
|
-
|
|
55522
|
+
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
55523
|
+
remainingSeconds: number().int().nonnegative().nullable(),
|
|
55524
|
+
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
55525
|
+
delayedStartSeconds: number().int().nonnegative().nullable(),
|
|
55431
55526
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
55432
55527
|
progressPercent: number().min(0).max(100).nullable(),
|
|
55433
|
-
/** True when the door is reported open. */
|
|
55434
|
-
doorOpen: boolean(),
|
|
55435
|
-
/** True when
|
|
55436
|
-
|
|
55437
|
-
/**
|
|
55438
|
-
|
|
55528
|
+
/** True when the door is reported open; null when the door state is not known. */
|
|
55529
|
+
doorOpen: boolean().nullable(),
|
|
55530
|
+
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
55531
|
+
doorLocked: boolean().nullable(),
|
|
55532
|
+
/** True when remote start is allowed (door closed, power on, etc.); null when not known. */
|
|
55533
|
+
remoteStartAllowed: boolean().nullable(),
|
|
55534
|
+
/** True when the appliance accepts remote control now; null when not known. */
|
|
55535
|
+
remoteControlActive: boolean().nullable(),
|
|
55536
|
+
/** True while somebody operates the appliance at its panel; null when not reported. */
|
|
55537
|
+
localControlActive: boolean().nullable(),
|
|
55538
|
+
/** Main power / switched-on state; null when not known. */
|
|
55539
|
+
powerOn: boolean().nullable(),
|
|
55540
|
+
/** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
|
|
55541
|
+
powerState: string().nullable(),
|
|
55439
55542
|
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55440
55543
|
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55441
|
-
|
|
55442
|
-
|
|
55544
|
+
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
55545
|
+
halfLoad: boolean().nullable(),
|
|
55546
|
+
hygienePlus: boolean().nullable(),
|
|
55443
55547
|
/** Extra dry option when the appliance exposes it. */
|
|
55444
|
-
extraDry: boolean(),
|
|
55548
|
+
extraDry: boolean().nullable(),
|
|
55445
55549
|
/** Intensive zone (lower basket) when the appliance exposes it. */
|
|
55446
|
-
intensiveZone: boolean(),
|
|
55550
|
+
intensiveZone: boolean().nullable(),
|
|
55447
55551
|
/** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
|
|
55448
|
-
varioSpeedPlus: boolean(),
|
|
55449
|
-
/** Child lock (controls disabled on the appliance). */
|
|
55450
|
-
childLock: boolean(),
|
|
55552
|
+
varioSpeedPlus: boolean().nullable(),
|
|
55553
|
+
/** Child lock (controls disabled on the appliance); null when not known. */
|
|
55554
|
+
childLock: boolean().nullable(),
|
|
55555
|
+
/** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
|
|
55556
|
+
activeEvents: array(string()),
|
|
55557
|
+
/** Numeric error code when the appliance reports one; null otherwise. */
|
|
55451
55558
|
errorCode: number().nullable(),
|
|
55559
|
+
/** Name of the raised alert-level event while the appliance is in error; null otherwise. */
|
|
55452
55560
|
errorLabel: string().nullable(),
|
|
55561
|
+
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
55453
55562
|
lastFetchedAt: number()
|
|
55454
55563
|
});
|
|
55564
|
+
var DeviceIdSchema = number().int().nonnegative();
|
|
55565
|
+
/** A value a program option or setting can take. */
|
|
55566
|
+
var DishwasherValueSchema = union([
|
|
55567
|
+
boolean(),
|
|
55568
|
+
string(),
|
|
55569
|
+
number()
|
|
55570
|
+
]);
|
|
55571
|
+
var DishwasherAccessSchema = _enum([
|
|
55572
|
+
"none",
|
|
55573
|
+
"read",
|
|
55574
|
+
"readWrite",
|
|
55575
|
+
"writeOnly",
|
|
55576
|
+
"readStatic"
|
|
55577
|
+
]);
|
|
55578
|
+
/**
|
|
55579
|
+
* One option or setting the appliance declares, with the constraints its description
|
|
55580
|
+
* gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
|
|
55581
|
+
*/
|
|
55582
|
+
var DishwasherOptionDescriptorSchema = object({
|
|
55583
|
+
/** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
|
|
55584
|
+
key: string(),
|
|
55585
|
+
/** Last segment of the key, for display. */
|
|
55586
|
+
name: string(),
|
|
55587
|
+
type: _enum([
|
|
55588
|
+
"boolean",
|
|
55589
|
+
"number",
|
|
55590
|
+
"enum",
|
|
55591
|
+
"string"
|
|
55592
|
+
]),
|
|
55593
|
+
access: DishwasherAccessSchema,
|
|
55594
|
+
/** The appliance reports this entity as currently available. */
|
|
55595
|
+
available: boolean(),
|
|
55596
|
+
/** Unit the description declares for a number; null when it declares none. */
|
|
55597
|
+
unit: string().nullable(),
|
|
55598
|
+
min: number().nullable(),
|
|
55599
|
+
max: number().nullable(),
|
|
55600
|
+
step: number().nullable(),
|
|
55601
|
+
/** Allowed members of an enum; null for other types. */
|
|
55602
|
+
enumValues: array(string()).nullable(),
|
|
55603
|
+
defaultValue: DishwasherValueSchema.nullable()
|
|
55604
|
+
});
|
|
55605
|
+
var DishwasherProgramSchema = object({
|
|
55606
|
+
/** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
|
|
55607
|
+
key: string(),
|
|
55608
|
+
name: string(),
|
|
55609
|
+
/** The appliance currently offers this program. */
|
|
55610
|
+
available: boolean(),
|
|
55611
|
+
/** The options this program lists, with the program-level access / availability / default. */
|
|
55612
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
55613
|
+
});
|
|
55614
|
+
var DishwasherOptionsSchema = object({
|
|
55615
|
+
availability: DishwasherAvailabilitySchema,
|
|
55616
|
+
/** What the appliance can be told to do, from the commands its description declares. */
|
|
55617
|
+
supportsStart: boolean(),
|
|
55618
|
+
supportsPause: boolean(),
|
|
55619
|
+
supportsResume: boolean(),
|
|
55620
|
+
supportsStop: boolean(),
|
|
55621
|
+
supportsPower: boolean(),
|
|
55622
|
+
/** Every program the description lists, with its options. */
|
|
55623
|
+
programs: array(DishwasherProgramSchema),
|
|
55624
|
+
/** Every option and setting entity the description lists (programs reference these by key). */
|
|
55625
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
55626
|
+
});
|
|
55455
55627
|
var dishwasherCapability = {
|
|
55456
55628
|
name: "dishwasher",
|
|
55457
55629
|
scope: "device",
|
|
@@ -55459,86 +55631,102 @@ var dishwasherCapability = {
|
|
|
55459
55631
|
mode: "singleton",
|
|
55460
55632
|
deviceTypes: [DeviceType.Dishwasher],
|
|
55461
55633
|
methods: {
|
|
55462
|
-
|
|
55634
|
+
/**
|
|
55635
|
+
* Start a program. Without `program` the selected one starts. `options` are
|
|
55636
|
+
* option feature keys; each is checked against the program's constraints.
|
|
55637
|
+
*/
|
|
55638
|
+
start: method(object({
|
|
55639
|
+
deviceId: DeviceIdSchema,
|
|
55640
|
+
program: string().min(1).optional(),
|
|
55641
|
+
options: record(string(), DishwasherValueSchema).optional()
|
|
55642
|
+
}), _void(), {
|
|
55463
55643
|
kind: "mutation",
|
|
55464
55644
|
auth: "protected"
|
|
55465
55645
|
}),
|
|
55466
|
-
pause: method(object({ deviceId:
|
|
55646
|
+
pause: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55467
55647
|
kind: "mutation",
|
|
55468
55648
|
auth: "protected"
|
|
55469
55649
|
}),
|
|
55470
|
-
|
|
55650
|
+
resume: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55651
|
+
kind: "mutation",
|
|
55652
|
+
auth: "protected"
|
|
55653
|
+
}),
|
|
55654
|
+
stop: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55471
55655
|
kind: "mutation",
|
|
55472
55656
|
auth: "protected"
|
|
55473
55657
|
}),
|
|
55658
|
+
/** Select (not start) a program; refused when the appliance does not offer it. */
|
|
55474
55659
|
setProgram: method(object({
|
|
55475
|
-
deviceId:
|
|
55660
|
+
deviceId: DeviceIdSchema,
|
|
55476
55661
|
program: string().min(1)
|
|
55477
55662
|
}), _void(), {
|
|
55478
55663
|
kind: "mutation",
|
|
55479
55664
|
auth: "protected"
|
|
55480
55665
|
}),
|
|
55481
55666
|
setPower: method(object({
|
|
55482
|
-
deviceId:
|
|
55667
|
+
deviceId: DeviceIdSchema,
|
|
55483
55668
|
on: boolean()
|
|
55484
55669
|
}), _void(), {
|
|
55485
55670
|
kind: "mutation",
|
|
55486
55671
|
auth: "protected"
|
|
55487
55672
|
}),
|
|
55488
55673
|
setHalfLoad: method(object({
|
|
55489
|
-
deviceId:
|
|
55674
|
+
deviceId: DeviceIdSchema,
|
|
55490
55675
|
on: boolean()
|
|
55491
55676
|
}), _void(), {
|
|
55492
55677
|
kind: "mutation",
|
|
55493
55678
|
auth: "protected"
|
|
55494
55679
|
}),
|
|
55495
55680
|
setHygienePlus: method(object({
|
|
55496
|
-
deviceId:
|
|
55681
|
+
deviceId: DeviceIdSchema,
|
|
55497
55682
|
on: boolean()
|
|
55498
55683
|
}), _void(), {
|
|
55499
55684
|
kind: "mutation",
|
|
55500
55685
|
auth: "protected"
|
|
55501
55686
|
}),
|
|
55502
55687
|
setExtraDry: method(object({
|
|
55503
|
-
deviceId:
|
|
55688
|
+
deviceId: DeviceIdSchema,
|
|
55504
55689
|
on: boolean()
|
|
55505
55690
|
}), _void(), {
|
|
55506
55691
|
kind: "mutation",
|
|
55507
55692
|
auth: "protected"
|
|
55508
55693
|
}),
|
|
55509
55694
|
setIntensiveZone: method(object({
|
|
55510
|
-
deviceId:
|
|
55695
|
+
deviceId: DeviceIdSchema,
|
|
55511
55696
|
on: boolean()
|
|
55512
55697
|
}), _void(), {
|
|
55513
55698
|
kind: "mutation",
|
|
55514
55699
|
auth: "protected"
|
|
55515
55700
|
}),
|
|
55516
55701
|
setVarioSpeedPlus: method(object({
|
|
55517
|
-
deviceId:
|
|
55702
|
+
deviceId: DeviceIdSchema,
|
|
55518
55703
|
on: boolean()
|
|
55519
55704
|
}), _void(), {
|
|
55520
55705
|
kind: "mutation",
|
|
55521
55706
|
auth: "protected"
|
|
55522
55707
|
}),
|
|
55523
55708
|
setChildLock: method(object({
|
|
55524
|
-
deviceId:
|
|
55709
|
+
deviceId: DeviceIdSchema,
|
|
55525
55710
|
on: boolean()
|
|
55526
55711
|
}), _void(), {
|
|
55527
55712
|
kind: "mutation",
|
|
55528
55713
|
auth: "protected"
|
|
55529
55714
|
}),
|
|
55715
|
+
/**
|
|
55716
|
+
* Write any option or setting by feature key. Refused when the description does
|
|
55717
|
+
* not list it, it is not writable or not available now, or the value is outside
|
|
55718
|
+
* its declared range / members.
|
|
55719
|
+
*/
|
|
55530
55720
|
setOption: method(object({
|
|
55531
|
-
deviceId:
|
|
55721
|
+
deviceId: DeviceIdSchema,
|
|
55532
55722
|
key: string().min(1),
|
|
55533
|
-
value:
|
|
55534
|
-
boolean(),
|
|
55535
|
-
string(),
|
|
55536
|
-
number()
|
|
55537
|
-
])
|
|
55723
|
+
value: DishwasherValueSchema
|
|
55538
55724
|
}), _void(), {
|
|
55539
55725
|
kind: "mutation",
|
|
55540
55726
|
auth: "protected"
|
|
55541
|
-
})
|
|
55727
|
+
}),
|
|
55728
|
+
/** What this appliance can do, from its own description — the UI is derived from it. */
|
|
55729
|
+
getOptions: method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" })
|
|
55542
55730
|
},
|
|
55543
55731
|
status: {
|
|
55544
55732
|
schema: DishwasherStatusSchema,
|
|
@@ -69004,6 +69192,12 @@ Object.freeze({
|
|
|
69004
69192
|
addonId: null,
|
|
69005
69193
|
access: "view"
|
|
69006
69194
|
},
|
|
69195
|
+
"dishwasher.getOptions": {
|
|
69196
|
+
capName: "dishwasher",
|
|
69197
|
+
capScope: "device",
|
|
69198
|
+
addonId: null,
|
|
69199
|
+
access: "view"
|
|
69200
|
+
},
|
|
69007
69201
|
"dishwasher.getStatus": {
|
|
69008
69202
|
capName: "dishwasher",
|
|
69009
69203
|
capScope: "device",
|
|
@@ -69016,6 +69210,12 @@ Object.freeze({
|
|
|
69016
69210
|
addonId: null,
|
|
69017
69211
|
access: "create"
|
|
69018
69212
|
},
|
|
69213
|
+
"dishwasher.resume": {
|
|
69214
|
+
capName: "dishwasher",
|
|
69215
|
+
capScope: "device",
|
|
69216
|
+
addonId: null,
|
|
69217
|
+
access: "create"
|
|
69218
|
+
},
|
|
69019
69219
|
"dishwasher.setChildLock": {
|
|
69020
69220
|
capName: "dishwasher",
|
|
69021
69221
|
capScope: "device",
|
|
@@ -73516,6 +73716,12 @@ Object.freeze({
|
|
|
73516
73716
|
addonId: null,
|
|
73517
73717
|
access: "view"
|
|
73518
73718
|
},
|
|
73719
|
+
"storageMigration.moverClearance": {
|
|
73720
|
+
capName: "storage-migration",
|
|
73721
|
+
capScope: "system",
|
|
73722
|
+
addonId: null,
|
|
73723
|
+
access: "view"
|
|
73724
|
+
},
|
|
73519
73725
|
"storageMigration.movers": {
|
|
73520
73726
|
capName: "storage-migration",
|
|
73521
73727
|
capScope: "system",
|
|
@@ -75709,6 +75915,11 @@ Object.freeze({
|
|
|
75709
75915
|
form: "single",
|
|
75710
75916
|
optional: false
|
|
75711
75917
|
}],
|
|
75918
|
+
"dishwasher.getOptions": [{
|
|
75919
|
+
name: "deviceId",
|
|
75920
|
+
form: "single",
|
|
75921
|
+
optional: false
|
|
75922
|
+
}],
|
|
75712
75923
|
"dishwasher.getStatus": [{
|
|
75713
75924
|
name: "deviceId",
|
|
75714
75925
|
form: "single",
|
|
@@ -75719,6 +75930,11 @@ Object.freeze({
|
|
|
75719
75930
|
form: "single",
|
|
75720
75931
|
optional: false
|
|
75721
75932
|
}],
|
|
75933
|
+
"dishwasher.resume": [{
|
|
75934
|
+
name: "deviceId",
|
|
75935
|
+
form: "single",
|
|
75936
|
+
optional: false
|
|
75937
|
+
}],
|
|
75722
75938
|
"dishwasher.setChildLock": [{
|
|
75723
75939
|
name: "deviceId",
|
|
75724
75940
|
form: "single",
|
|
@@ -77805,6 +78021,9 @@ new Map(Object.entries({
|
|
|
77805
78021
|
"wrapper-update-available": "system",
|
|
77806
78022
|
"backup-completed": "system",
|
|
77807
78023
|
"export-completed": "system",
|
|
78024
|
+
"alert-critical": "system",
|
|
78025
|
+
"alert-error": "system",
|
|
78026
|
+
"alert-critical-resolved": "system",
|
|
77808
78027
|
"storage-location-low": "system",
|
|
77809
78028
|
"storage-location-critical": "system",
|
|
77810
78029
|
"storage-location-ok": "system",
|
|
@@ -77929,6 +78148,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
77929
78148
|
"storage-location-ok"
|
|
77930
78149
|
]
|
|
77931
78150
|
},
|
|
78151
|
+
{
|
|
78152
|
+
id: "alerts",
|
|
78153
|
+
family: "system",
|
|
78154
|
+
label: "Alerts",
|
|
78155
|
+
kinds: [
|
|
78156
|
+
"alert-critical",
|
|
78157
|
+
"alert-error",
|
|
78158
|
+
"alert-critical-resolved"
|
|
78159
|
+
]
|
|
78160
|
+
},
|
|
77932
78161
|
{
|
|
77933
78162
|
id: "alarm",
|
|
77934
78163
|
family: "alarm",
|
|
@@ -77973,6 +78202,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
|
|
|
77973
78202
|
return [[descriptor.kind, field]];
|
|
77974
78203
|
})));
|
|
77975
78204
|
Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
|
|
78205
|
+
object({
|
|
78206
|
+
phase: _enum(["raised", "resolved"]),
|
|
78207
|
+
episodeId: string().min(1),
|
|
78208
|
+
alertId: string().min(1),
|
|
78209
|
+
severity: AlertSeveritySchema,
|
|
78210
|
+
category: string(),
|
|
78211
|
+
title: string(),
|
|
78212
|
+
message: string(),
|
|
78213
|
+
sourceType: string().optional(),
|
|
78214
|
+
sourceId: string().optional(),
|
|
78215
|
+
nodeId: string().optional(),
|
|
78216
|
+
/** The alert's own action link (where the operator acts on it), when it has one. */
|
|
78217
|
+
actionUrl: string().optional(),
|
|
78218
|
+
at: number()
|
|
78219
|
+
});
|
|
77976
78220
|
var RULE_BODY_ONLY = ["body"];
|
|
77977
78221
|
var RULE_TEXT = ["title", "body"];
|
|
77978
78222
|
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
@@ -77982,6 +78226,11 @@ var TANK = [
|
|
|
77982
78226
|
"device-tank-full",
|
|
77983
78227
|
"device-tank-normal"
|
|
77984
78228
|
];
|
|
78229
|
+
var ALERT_EPISODE = [
|
|
78230
|
+
"alert-critical",
|
|
78231
|
+
"alert-error",
|
|
78232
|
+
"alert-critical-resolved"
|
|
78233
|
+
];
|
|
77985
78234
|
var UPDATES = [
|
|
77986
78235
|
"addon-update-available",
|
|
77987
78236
|
"server-update-available",
|
|
@@ -78174,14 +78423,14 @@ var STATE_SUMMARY_VARS = [
|
|
|
78174
78423
|
([...RULE_TEXT], [...CONSUMABLE]),
|
|
78175
78424
|
([...RULE_TEXT], [...TANK]),
|
|
78176
78425
|
[...RULE_TEXT],
|
|
78177
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
78178
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
78179
|
-
[...RULE_TEXT],
|
|
78426
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
78427
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
78180
78428
|
[...RULE_TEXT],
|
|
78181
78429
|
[...RULE_TEXT],
|
|
78182
78430
|
[...RULE_TEXT],
|
|
78183
78431
|
[...RULE_TEXT],
|
|
78184
78432
|
[...RULE_TEXT],
|
|
78433
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78185
78434
|
[...RULE_TEXT],
|
|
78186
78435
|
[...RULE_TEXT],
|
|
78187
78436
|
[...RULE_TEXT],
|
|
@@ -78199,7 +78448,11 @@ var STATE_SUMMARY_VARS = [
|
|
|
78199
78448
|
[...RULE_TEXT],
|
|
78200
78449
|
[...RULE_TEXT],
|
|
78201
78450
|
[...RULE_TEXT],
|
|
78202
|
-
[...RULE_TEXT],
|
|
78451
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78452
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78453
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78454
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78455
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78203
78456
|
[...RULE_TEXT],
|
|
78204
78457
|
[...RULE_TEXT],
|
|
78205
78458
|
[...RULE_TEXT],
|