@camstack/addon-provider-dreame 0.2.135 → 0.2.137
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
|
@@ -41,7 +41,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
41
41
|
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
42
42
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
43
43
|
//#endregion
|
|
44
|
-
//#region ../types/dist/event-category-
|
|
44
|
+
//#region ../types/dist/event-category-DOl51-Ij.mjs
|
|
45
45
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
46
46
|
EventCategory["SystemBoot"] = "system.boot";
|
|
47
47
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -120,9 +120,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
120
120
|
/**
|
|
121
121
|
* The node's one-shot runner boot check (D877): planned runners against the
|
|
122
122
|
* process service, `degraded` when any is failed, refused or missing. The
|
|
123
|
-
* alert centre turns it into one
|
|
123
|
+
* alert centre turns it into one critical alert.
|
|
124
124
|
*/
|
|
125
125
|
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
126
|
+
/**
|
|
127
|
+
* An alert EPISODE opened or closed, emitted by the alert centre for alerts
|
|
128
|
+
* of severity `critical` or `error` (`AlertEpisodePayload`). The alert
|
|
129
|
+
* centre sends no notification of its own: Notification Center turns this
|
|
130
|
+
* into the `alert-critical` / `alert-error` / `alert-critical-resolved`
|
|
131
|
+
* system-event kinds, and reconciles from the alerts store because a bus
|
|
132
|
+
* event may be dropped (D8, D11).
|
|
133
|
+
*/
|
|
134
|
+
EventCategory["AlertEpisode"] = "alert.episode";
|
|
126
135
|
EventCategory["AddonError"] = "addon.error";
|
|
127
136
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
128
137
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -5447,7 +5456,7 @@ var ZodIssueCode$1 = {
|
|
|
5447
5456
|
var ZodFirstPartyTypeKind$1;
|
|
5448
5457
|
ZodFirstPartyTypeKind$1 || (ZodFirstPartyTypeKind$1 = {});
|
|
5449
5458
|
//#endregion
|
|
5450
|
-
//#region ../types/dist/sleep-
|
|
5459
|
+
//#region ../types/dist/sleep-BxjU_fJM.mjs
|
|
5451
5460
|
/**
|
|
5452
5461
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5453
5462
|
* window to float samples (D455).
|
|
@@ -7829,6 +7838,12 @@ function normalizeAddonInitResult(result) {
|
|
|
7829
7838
|
if (Array.isArray(result)) return { providers: result };
|
|
7830
7839
|
return result;
|
|
7831
7840
|
}
|
|
7841
|
+
/**
|
|
7842
|
+
* The share-view scope kinds a `csv_*` share token can carry. The hub mints
|
|
7843
|
+
* and validates them (`share-token.service.ts` builds its enum from this
|
|
7844
|
+
* list); a data plane names the kinds it ACCEPTS in `share`.
|
|
7845
|
+
*/
|
|
7846
|
+
var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
|
|
7832
7847
|
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
7833
7848
|
var PeerBytesTicketSchema = object({
|
|
7834
7849
|
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
@@ -12508,6 +12523,229 @@ var ConvertResultSchema = object({
|
|
|
12508
12523
|
files: array(string()).readonly()
|
|
12509
12524
|
})).readonly()
|
|
12510
12525
|
});
|
|
12526
|
+
/**
|
|
12527
|
+
* Zod schemas for persisted record types.
|
|
12528
|
+
*
|
|
12529
|
+
* These schemas serve as the single source of truth for types that are
|
|
12530
|
+
* stored in the settings-store backend and retrieved via tRPC. They
|
|
12531
|
+
* replace the manual TypeScript interfaces with schema-derived types,
|
|
12532
|
+
* enabling runtime validation when reading from the backend.
|
|
12533
|
+
*
|
|
12534
|
+
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
12535
|
+
* keeps the original name for backward compatibility.
|
|
12536
|
+
*/
|
|
12537
|
+
/**
|
|
12538
|
+
* Auth model (v2 — 2026-05-12 caps-only):
|
|
12539
|
+
*
|
|
12540
|
+
* Two principals:
|
|
12541
|
+
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
12542
|
+
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
12543
|
+
*
|
|
12544
|
+
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
12545
|
+
* `super_admin` — collapsed onto the single boolean because every
|
|
12546
|
+
* non-admin caller is governed by the same scope-check rules; the
|
|
12547
|
+
* distinction was only ever used to route role-specific procedures
|
|
12548
|
+
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
12549
|
+
* with `isAdmin: false` + an explicit scope list.
|
|
12550
|
+
*/
|
|
12551
|
+
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
12552
|
+
var MethodAccessSchema = _enum([
|
|
12553
|
+
"view",
|
|
12554
|
+
"create",
|
|
12555
|
+
"delete"
|
|
12556
|
+
]);
|
|
12557
|
+
/**
|
|
12558
|
+
* A single scope grant. Three forms — checked in matcher with OR
|
|
12559
|
+
* semantics; the first match decides whether the call passes:
|
|
12560
|
+
*
|
|
12561
|
+
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
12562
|
+
* cap with the matching `scope` declaration. New caps inherit grants
|
|
12563
|
+
* automatically — adding a device cap to the codebase makes it
|
|
12564
|
+
* reachable to every user with `category:device [...]` without a
|
|
12565
|
+
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
12566
|
+
*
|
|
12567
|
+
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
12568
|
+
* useful when an integration needs to interact with one specific
|
|
12569
|
+
* addon's surface regardless of how many caps it exports.
|
|
12570
|
+
*
|
|
12571
|
+
* - `capability` — the most precise form. Single cap name. Use for
|
|
12572
|
+
* integration tokens where you want to grant `addons.installPackage`
|
|
12573
|
+
* and nothing else.
|
|
12574
|
+
*
|
|
12575
|
+
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
12576
|
+
* "give me everything" escape; there is no wildcard scope.
|
|
12577
|
+
*/
|
|
12578
|
+
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
12579
|
+
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
12580
|
+
var CapScopeSchema = _enum(["device", "system"]);
|
|
12581
|
+
/**
|
|
12582
|
+
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
12583
|
+
*
|
|
12584
|
+
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
12585
|
+
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
12586
|
+
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
12587
|
+
* AFTER the grant was minted — no re-grant, no re-login.
|
|
12588
|
+
*
|
|
12589
|
+
* - `all` — every device in the deployment. The broad viewer/operator
|
|
12590
|
+
* lever without a `category` grant (a `category` grant also covers device
|
|
12591
|
+
* caps that carry no deviceId; `all` is specifically the device set).
|
|
12592
|
+
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
12593
|
+
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
12594
|
+
* is NOT covered until the grant is edited.
|
|
12595
|
+
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
12596
|
+
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
12597
|
+
* re-resolves on the next request.
|
|
12598
|
+
* - `locations` — every device whose operator-assigned `location` label is
|
|
12599
|
+
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
12600
|
+
* null/unset location matches NO `locations` selector.
|
|
12601
|
+
*/
|
|
12602
|
+
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
12603
|
+
object({ kind: literal("all") }),
|
|
12604
|
+
object({
|
|
12605
|
+
kind: literal("ids"),
|
|
12606
|
+
ids: array(number().int()).min(1)
|
|
12607
|
+
}),
|
|
12608
|
+
object({
|
|
12609
|
+
kind: literal("types"),
|
|
12610
|
+
types: array(_enum(DeviceType)).min(1)
|
|
12611
|
+
}),
|
|
12612
|
+
object({
|
|
12613
|
+
kind: literal("locations"),
|
|
12614
|
+
locations: array(string().min(1)).min(1)
|
|
12615
|
+
})
|
|
12616
|
+
]);
|
|
12617
|
+
var DeviceTokenScopeSchema = object({
|
|
12618
|
+
type: literal("device"),
|
|
12619
|
+
/** The device SET this grant covers — resolved against the live fleet. */
|
|
12620
|
+
selector: DeviceSelectorSchema,
|
|
12621
|
+
access: array(MethodAccessSchema).min(1),
|
|
12622
|
+
/**
|
|
12623
|
+
* Whether a grant on a PARENT device transparently covers its accessory
|
|
12624
|
+
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
12625
|
+
* Direction is parent → children ONLY.
|
|
12626
|
+
*
|
|
12627
|
+
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
12628
|
+
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
12629
|
+
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
12630
|
+
* operator must grant on the child, not inherit from the parent). Set it
|
|
12631
|
+
* explicitly to override that default per grant.
|
|
12632
|
+
*/
|
|
12633
|
+
includeLinked: boolean().optional()
|
|
12634
|
+
});
|
|
12635
|
+
/**
|
|
12636
|
+
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
12637
|
+
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
12638
|
+
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
12639
|
+
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
12640
|
+
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
12641
|
+
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
12642
|
+
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
12643
|
+
* migration covers both without a flag day. No cast — the raw object is read
|
|
12644
|
+
* through `Reflect.get` (its static type is `unknown`).
|
|
12645
|
+
*/
|
|
12646
|
+
function migrateLegacyTokenScope(raw) {
|
|
12647
|
+
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
12648
|
+
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
12649
|
+
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
12650
|
+
const targets = Reflect.get(raw, "targets");
|
|
12651
|
+
if (!Array.isArray(targets)) return raw;
|
|
12652
|
+
return {
|
|
12653
|
+
type: "device",
|
|
12654
|
+
selector: {
|
|
12655
|
+
kind: "ids",
|
|
12656
|
+
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
12657
|
+
},
|
|
12658
|
+
access: Reflect.get(raw, "access")
|
|
12659
|
+
};
|
|
12660
|
+
}
|
|
12661
|
+
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
12662
|
+
object({
|
|
12663
|
+
type: literal("category"),
|
|
12664
|
+
target: CapScopeSchema,
|
|
12665
|
+
access: array(MethodAccessSchema).min(1)
|
|
12666
|
+
}),
|
|
12667
|
+
object({
|
|
12668
|
+
type: literal("capability"),
|
|
12669
|
+
target: string(),
|
|
12670
|
+
access: array(MethodAccessSchema).min(1)
|
|
12671
|
+
}),
|
|
12672
|
+
object({
|
|
12673
|
+
type: literal("addon"),
|
|
12674
|
+
target: string(),
|
|
12675
|
+
access: array(MethodAccessSchema).min(1)
|
|
12676
|
+
}),
|
|
12677
|
+
DeviceTokenScopeSchema
|
|
12678
|
+
]));
|
|
12679
|
+
object({
|
|
12680
|
+
id: string(),
|
|
12681
|
+
username: string(),
|
|
12682
|
+
passwordHash: string(),
|
|
12683
|
+
/**
|
|
12684
|
+
* Admin bypass. When true, the middleware skips the scope-access
|
|
12685
|
+
* check entirely. There is no other axis of privilege; the legacy
|
|
12686
|
+
* role enum collapsed onto this boolean in v2.
|
|
12687
|
+
*/
|
|
12688
|
+
isAdmin: boolean().default(false),
|
|
12689
|
+
allowedProviders: AllowedProviderSchema,
|
|
12690
|
+
allowedDevices: AllowedDevicesSchema,
|
|
12691
|
+
/**
|
|
12692
|
+
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
12693
|
+
* ignored. Non-admins without scopes are locked out of every
|
|
12694
|
+
* protected call.
|
|
12695
|
+
*/
|
|
12696
|
+
scopes: array(TokenScopeSchema).default([]),
|
|
12697
|
+
createdAt: number(),
|
|
12698
|
+
updatedAt: number()
|
|
12699
|
+
});
|
|
12700
|
+
object({
|
|
12701
|
+
id: string(),
|
|
12702
|
+
label: string(),
|
|
12703
|
+
isAdmin: boolean().default(false),
|
|
12704
|
+
allowedProviders: AllowedProviderSchema,
|
|
12705
|
+
allowedDevices: AllowedDevicesSchema,
|
|
12706
|
+
tokenHash: string(),
|
|
12707
|
+
tokenPrefix: string(),
|
|
12708
|
+
createdAt: number(),
|
|
12709
|
+
lastUsedAt: number().optional()
|
|
12710
|
+
});
|
|
12711
|
+
object({
|
|
12712
|
+
id: string(),
|
|
12713
|
+
userId: string(),
|
|
12714
|
+
name: string(),
|
|
12715
|
+
tokenHash: string(),
|
|
12716
|
+
tokenPrefix: string(),
|
|
12717
|
+
scopes: array(TokenScopeSchema),
|
|
12718
|
+
expiresAt: number().nullish(),
|
|
12719
|
+
lastUsedAt: number().nullish(),
|
|
12720
|
+
createdAt: number()
|
|
12721
|
+
});
|
|
12722
|
+
/** What a share-view grant lets its holder see. */
|
|
12723
|
+
var ShareViewGrantSchema = object({
|
|
12724
|
+
kind: _enum(SHARE_VIEW_KINDS),
|
|
12725
|
+
deviceIds: array(number().int().nonnegative()).min(1).max(64),
|
|
12726
|
+
/** Talk-back, opt-in at mint time; absent means off. */
|
|
12727
|
+
talk: boolean().optional()
|
|
12728
|
+
});
|
|
12729
|
+
var ShareViewScopeSchema = object({
|
|
12730
|
+
type: literal("share-view"),
|
|
12731
|
+
grant: ShareViewGrantSchema
|
|
12732
|
+
});
|
|
12733
|
+
var AddonRoutesScopeSchema = object({
|
|
12734
|
+
type: literal("addon-routes"),
|
|
12735
|
+
access: array(MethodAccessSchema).min(1)
|
|
12736
|
+
});
|
|
12737
|
+
var CredentialScopeSchema = union([
|
|
12738
|
+
literal("*"),
|
|
12739
|
+
ShareViewScopeSchema,
|
|
12740
|
+
AddonRoutesScopeSchema,
|
|
12741
|
+
TokenScopeSchema
|
|
12742
|
+
]);
|
|
12743
|
+
object({
|
|
12744
|
+
kind: literal("credential"),
|
|
12745
|
+
sub: string().min(1),
|
|
12746
|
+
jti: string().min(16),
|
|
12747
|
+
scopes: array(CredentialScopeSchema).min(1)
|
|
12748
|
+
});
|
|
12511
12749
|
_enum(["new-session", "step-up"]);
|
|
12512
12750
|
/** The languages the hub's app landing pages are written in (D858). */
|
|
12513
12751
|
var AppPageLangSchema = _enum(["en", "it"]);
|
|
@@ -13224,7 +13462,14 @@ var AlertSeveritySchema = _enum([
|
|
|
13224
13462
|
]);
|
|
13225
13463
|
var AlertActionSchema = object({
|
|
13226
13464
|
label: string(),
|
|
13227
|
-
href: string().optional()
|
|
13465
|
+
href: string().optional(),
|
|
13466
|
+
/**
|
|
13467
|
+
* How `href` is followed. Absent / `app`: an admin-ui route (client-side).
|
|
13468
|
+
* `server`: a route the HUB serves (an addon HTTP route such as an OAuth
|
|
13469
|
+
* start) — the browser must leave the SPA with a full navigation, because
|
|
13470
|
+
* the SPA has no such route and would bounce to the home page.
|
|
13471
|
+
*/
|
|
13472
|
+
navigation: _enum(["app", "server"]).optional()
|
|
13228
13473
|
});
|
|
13229
13474
|
var AlertStatusSchema = _enum([
|
|
13230
13475
|
"active",
|
|
@@ -41969,6 +42214,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
41969
42214
|
"server-updated",
|
|
41970
42215
|
"export-completed",
|
|
41971
42216
|
"backup-completed",
|
|
42217
|
+
"alert-critical",
|
|
42218
|
+
"alert-error",
|
|
42219
|
+
"alert-critical-resolved",
|
|
41972
42220
|
"camera-online",
|
|
41973
42221
|
"camera-offline",
|
|
41974
42222
|
"camera-disabled",
|
|
@@ -44004,202 +44252,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
44004
44252
|
auth: "admin"
|
|
44005
44253
|
}), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
|
|
44006
44254
|
/**
|
|
44007
|
-
* Zod schemas for persisted record types.
|
|
44008
|
-
*
|
|
44009
|
-
* These schemas serve as the single source of truth for types that are
|
|
44010
|
-
* stored in the settings-store backend and retrieved via tRPC. They
|
|
44011
|
-
* replace the manual TypeScript interfaces with schema-derived types,
|
|
44012
|
-
* enabling runtime validation when reading from the backend.
|
|
44013
|
-
*
|
|
44014
|
-
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
44015
|
-
* keeps the original name for backward compatibility.
|
|
44016
|
-
*/
|
|
44017
|
-
/**
|
|
44018
|
-
* Auth model (v2 — 2026-05-12 caps-only):
|
|
44019
|
-
*
|
|
44020
|
-
* Two principals:
|
|
44021
|
-
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
44022
|
-
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
44023
|
-
*
|
|
44024
|
-
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
44025
|
-
* `super_admin` — collapsed onto the single boolean because every
|
|
44026
|
-
* non-admin caller is governed by the same scope-check rules; the
|
|
44027
|
-
* distinction was only ever used to route role-specific procedures
|
|
44028
|
-
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
44029
|
-
* with `isAdmin: false` + an explicit scope list.
|
|
44030
|
-
*/
|
|
44031
|
-
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
44032
|
-
var MethodAccessSchema = _enum([
|
|
44033
|
-
"view",
|
|
44034
|
-
"create",
|
|
44035
|
-
"delete"
|
|
44036
|
-
]);
|
|
44037
|
-
/**
|
|
44038
|
-
* A single scope grant. Three forms — checked in matcher with OR
|
|
44039
|
-
* semantics; the first match decides whether the call passes:
|
|
44040
|
-
*
|
|
44041
|
-
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
44042
|
-
* cap with the matching `scope` declaration. New caps inherit grants
|
|
44043
|
-
* automatically — adding a device cap to the codebase makes it
|
|
44044
|
-
* reachable to every user with `category:device [...]` without a
|
|
44045
|
-
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
44046
|
-
*
|
|
44047
|
-
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
44048
|
-
* useful when an integration needs to interact with one specific
|
|
44049
|
-
* addon's surface regardless of how many caps it exports.
|
|
44050
|
-
*
|
|
44051
|
-
* - `capability` — the most precise form. Single cap name. Use for
|
|
44052
|
-
* integration tokens where you want to grant `addons.installPackage`
|
|
44053
|
-
* and nothing else.
|
|
44054
|
-
*
|
|
44055
|
-
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
44056
|
-
* "give me everything" escape; there is no wildcard scope.
|
|
44057
|
-
*/
|
|
44058
|
-
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
44059
|
-
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
44060
|
-
var CapScopeSchema = _enum(["device", "system"]);
|
|
44061
|
-
/**
|
|
44062
|
-
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
44063
|
-
*
|
|
44064
|
-
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
44065
|
-
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
44066
|
-
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
44067
|
-
* AFTER the grant was minted — no re-grant, no re-login.
|
|
44068
|
-
*
|
|
44069
|
-
* - `all` — every device in the deployment. The broad viewer/operator
|
|
44070
|
-
* lever without a `category` grant (a `category` grant also covers device
|
|
44071
|
-
* caps that carry no deviceId; `all` is specifically the device set).
|
|
44072
|
-
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
44073
|
-
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
44074
|
-
* is NOT covered until the grant is edited.
|
|
44075
|
-
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
44076
|
-
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
44077
|
-
* re-resolves on the next request.
|
|
44078
|
-
* - `locations` — every device whose operator-assigned `location` label is
|
|
44079
|
-
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
44080
|
-
* null/unset location matches NO `locations` selector.
|
|
44081
|
-
*/
|
|
44082
|
-
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
44083
|
-
object({ kind: literal("all") }),
|
|
44084
|
-
object({
|
|
44085
|
-
kind: literal("ids"),
|
|
44086
|
-
ids: array(number().int()).min(1)
|
|
44087
|
-
}),
|
|
44088
|
-
object({
|
|
44089
|
-
kind: literal("types"),
|
|
44090
|
-
types: array(_enum(DeviceType)).min(1)
|
|
44091
|
-
}),
|
|
44092
|
-
object({
|
|
44093
|
-
kind: literal("locations"),
|
|
44094
|
-
locations: array(string().min(1)).min(1)
|
|
44095
|
-
})
|
|
44096
|
-
]);
|
|
44097
|
-
var DeviceTokenScopeSchema = object({
|
|
44098
|
-
type: literal("device"),
|
|
44099
|
-
/** The device SET this grant covers — resolved against the live fleet. */
|
|
44100
|
-
selector: DeviceSelectorSchema,
|
|
44101
|
-
access: array(MethodAccessSchema).min(1),
|
|
44102
|
-
/**
|
|
44103
|
-
* Whether a grant on a PARENT device transparently covers its accessory
|
|
44104
|
-
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
44105
|
-
* Direction is parent → children ONLY.
|
|
44106
|
-
*
|
|
44107
|
-
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
44108
|
-
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
44109
|
-
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
44110
|
-
* operator must grant on the child, not inherit from the parent). Set it
|
|
44111
|
-
* explicitly to override that default per grant.
|
|
44112
|
-
*/
|
|
44113
|
-
includeLinked: boolean().optional()
|
|
44114
|
-
});
|
|
44115
|
-
/**
|
|
44116
|
-
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
44117
|
-
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
44118
|
-
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
44119
|
-
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
44120
|
-
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
44121
|
-
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
44122
|
-
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
44123
|
-
* migration covers both without a flag day. No cast — the raw object is read
|
|
44124
|
-
* through `Reflect.get` (its static type is `unknown`).
|
|
44125
|
-
*/
|
|
44126
|
-
function migrateLegacyTokenScope(raw) {
|
|
44127
|
-
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
44128
|
-
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
44129
|
-
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
44130
|
-
const targets = Reflect.get(raw, "targets");
|
|
44131
|
-
if (!Array.isArray(targets)) return raw;
|
|
44132
|
-
return {
|
|
44133
|
-
type: "device",
|
|
44134
|
-
selector: {
|
|
44135
|
-
kind: "ids",
|
|
44136
|
-
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
44137
|
-
},
|
|
44138
|
-
access: Reflect.get(raw, "access")
|
|
44139
|
-
};
|
|
44140
|
-
}
|
|
44141
|
-
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
44142
|
-
object({
|
|
44143
|
-
type: literal("category"),
|
|
44144
|
-
target: CapScopeSchema,
|
|
44145
|
-
access: array(MethodAccessSchema).min(1)
|
|
44146
|
-
}),
|
|
44147
|
-
object({
|
|
44148
|
-
type: literal("capability"),
|
|
44149
|
-
target: string(),
|
|
44150
|
-
access: array(MethodAccessSchema).min(1)
|
|
44151
|
-
}),
|
|
44152
|
-
object({
|
|
44153
|
-
type: literal("addon"),
|
|
44154
|
-
target: string(),
|
|
44155
|
-
access: array(MethodAccessSchema).min(1)
|
|
44156
|
-
}),
|
|
44157
|
-
DeviceTokenScopeSchema
|
|
44158
|
-
]));
|
|
44159
|
-
object({
|
|
44160
|
-
id: string(),
|
|
44161
|
-
username: string(),
|
|
44162
|
-
passwordHash: string(),
|
|
44163
|
-
/**
|
|
44164
|
-
* Admin bypass. When true, the middleware skips the scope-access
|
|
44165
|
-
* check entirely. There is no other axis of privilege; the legacy
|
|
44166
|
-
* role enum collapsed onto this boolean in v2.
|
|
44167
|
-
*/
|
|
44168
|
-
isAdmin: boolean().default(false),
|
|
44169
|
-
allowedProviders: AllowedProviderSchema,
|
|
44170
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44171
|
-
/**
|
|
44172
|
-
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
44173
|
-
* ignored. Non-admins without scopes are locked out of every
|
|
44174
|
-
* protected call.
|
|
44175
|
-
*/
|
|
44176
|
-
scopes: array(TokenScopeSchema).default([]),
|
|
44177
|
-
createdAt: number(),
|
|
44178
|
-
updatedAt: number()
|
|
44179
|
-
});
|
|
44180
|
-
object({
|
|
44181
|
-
id: string(),
|
|
44182
|
-
label: string(),
|
|
44183
|
-
isAdmin: boolean().default(false),
|
|
44184
|
-
allowedProviders: AllowedProviderSchema,
|
|
44185
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44186
|
-
tokenHash: string(),
|
|
44187
|
-
tokenPrefix: string(),
|
|
44188
|
-
createdAt: number(),
|
|
44189
|
-
lastUsedAt: number().optional()
|
|
44190
|
-
});
|
|
44191
|
-
object({
|
|
44192
|
-
id: string(),
|
|
44193
|
-
userId: string(),
|
|
44194
|
-
name: string(),
|
|
44195
|
-
tokenHash: string(),
|
|
44196
|
-
tokenPrefix: string(),
|
|
44197
|
-
scopes: array(TokenScopeSchema),
|
|
44198
|
-
expiresAt: number().nullish(),
|
|
44199
|
-
lastUsedAt: number().nullish(),
|
|
44200
|
-
createdAt: number()
|
|
44201
|
-
});
|
|
44202
|
-
/**
|
|
44203
44255
|
* `oauth-integration` — a collection cap by which an addon declares
|
|
44204
44256
|
* itself a linkable OAuth client of the hub's core `/oauth2/*` server.
|
|
44205
44257
|
* Each provider returns a static descriptor; the core enumerates them
|
|
@@ -51045,7 +51097,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
51045
51097
|
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
51046
51098
|
kind: "mutation",
|
|
51047
51099
|
auth: "admin"
|
|
51048
|
-
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({
|
|
51100
|
+
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
|
|
51101
|
+
clear: boolean(),
|
|
51102
|
+
repointLocationId: string().optional()
|
|
51103
|
+
}), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
|
|
51049
51104
|
kind: "mutation",
|
|
51050
51105
|
auth: "admin"
|
|
51051
51106
|
}), method(StorageCleanupInputSchema, object({ jobId: string() }), {
|
|
@@ -55326,6 +55381,11 @@ onStatusChanged: { data: object({
|
|
|
55326
55381
|
*
|
|
55327
55382
|
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
55328
55383
|
* provider refreshes the slice on an interval and eagerly after commands.
|
|
55384
|
+
*
|
|
55385
|
+
* UNKNOWN IS NOT OFF. Every field the appliance reports separately is
|
|
55386
|
+
* nullable: `null` means "not known right now" (the appliance has not said,
|
|
55387
|
+
* the link is down, or the description does not carry it) and is never
|
|
55388
|
+
* rendered or exported as `false` / `0`. `availability` says why.
|
|
55329
55389
|
*/
|
|
55330
55390
|
var DishwasherStateSchema = _enum([
|
|
55331
55391
|
"idle",
|
|
@@ -55335,43 +55395,155 @@ var DishwasherStateSchema = _enum([
|
|
|
55335
55395
|
"error",
|
|
55336
55396
|
"unavailable"
|
|
55337
55397
|
]);
|
|
55398
|
+
/**
|
|
55399
|
+
* The appliance's own operation state, uncollapsed. `state` above is the coarse
|
|
55400
|
+
* view for compact surfaces; this is what the appliance said.
|
|
55401
|
+
*/
|
|
55402
|
+
var DishwasherOperationStateSchema = _enum([
|
|
55403
|
+
"Inactive",
|
|
55404
|
+
"Ready",
|
|
55405
|
+
"DelayedStart",
|
|
55406
|
+
"Run",
|
|
55407
|
+
"Pause",
|
|
55408
|
+
"ActionRequired",
|
|
55409
|
+
"Finished",
|
|
55410
|
+
"Error",
|
|
55411
|
+
"Aborting"
|
|
55412
|
+
]);
|
|
55413
|
+
/**
|
|
55414
|
+
* Why fields may be `null`:
|
|
55415
|
+
* - `available` — the link is up and the description is loaded;
|
|
55416
|
+
* - `offline` — the local link is down (values are unknown, not last-known);
|
|
55417
|
+
* - `description-missing` — the link is up but the appliance's description could not
|
|
55418
|
+
* be loaded, so its values cannot be decoded.
|
|
55419
|
+
*/
|
|
55420
|
+
var DishwasherAvailabilitySchema = _enum([
|
|
55421
|
+
"available",
|
|
55422
|
+
"offline",
|
|
55423
|
+
"description-missing"
|
|
55424
|
+
]);
|
|
55338
55425
|
var DishwasherConsumableLevelSchema = _enum([
|
|
55339
55426
|
"ok",
|
|
55340
55427
|
"low",
|
|
55341
55428
|
"empty"
|
|
55342
55429
|
]);
|
|
55343
55430
|
var DishwasherStatusSchema = object({
|
|
55431
|
+
availability: DishwasherAvailabilitySchema,
|
|
55432
|
+
/** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
|
|
55344
55433
|
state: DishwasherStateSchema,
|
|
55345
|
-
/**
|
|
55434
|
+
/** The appliance's operation state as reported; null when not known. */
|
|
55435
|
+
operationState: DishwasherOperationStateSchema.nullable(),
|
|
55436
|
+
/** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
|
|
55346
55437
|
program: string().nullable(),
|
|
55347
|
-
/**
|
|
55438
|
+
/** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
|
|
55439
|
+
selectedProgram: string().nullable(),
|
|
55440
|
+
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
55348
55441
|
availablePrograms: array(string()),
|
|
55349
|
-
/**
|
|
55350
|
-
|
|
55442
|
+
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
55443
|
+
remainingSeconds: number().int().nonnegative().nullable(),
|
|
55444
|
+
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
55445
|
+
delayedStartSeconds: number().int().nonnegative().nullable(),
|
|
55351
55446
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
55352
55447
|
progressPercent: number().min(0).max(100).nullable(),
|
|
55353
|
-
/** True when the door is reported open. */
|
|
55354
|
-
doorOpen: boolean(),
|
|
55355
|
-
/** True when
|
|
55356
|
-
|
|
55357
|
-
/**
|
|
55358
|
-
|
|
55448
|
+
/** True when the door is reported open; null when the door state is not known. */
|
|
55449
|
+
doorOpen: boolean().nullable(),
|
|
55450
|
+
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
55451
|
+
doorLocked: boolean().nullable(),
|
|
55452
|
+
/** True when remote start is allowed (door closed, power on, etc.); null when not known. */
|
|
55453
|
+
remoteStartAllowed: boolean().nullable(),
|
|
55454
|
+
/** True when the appliance accepts remote control now; null when not known. */
|
|
55455
|
+
remoteControlActive: boolean().nullable(),
|
|
55456
|
+
/** True while somebody operates the appliance at its panel; null when not reported. */
|
|
55457
|
+
localControlActive: boolean().nullable(),
|
|
55458
|
+
/** Main power / switched-on state; null when not known. */
|
|
55459
|
+
powerOn: boolean().nullable(),
|
|
55460
|
+
/** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
|
|
55461
|
+
powerState: string().nullable(),
|
|
55359
55462
|
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55360
55463
|
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55361
|
-
|
|
55362
|
-
|
|
55464
|
+
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
55465
|
+
halfLoad: boolean().nullable(),
|
|
55466
|
+
hygienePlus: boolean().nullable(),
|
|
55363
55467
|
/** Extra dry option when the appliance exposes it. */
|
|
55364
|
-
extraDry: boolean(),
|
|
55468
|
+
extraDry: boolean().nullable(),
|
|
55365
55469
|
/** Intensive zone (lower basket) when the appliance exposes it. */
|
|
55366
|
-
intensiveZone: boolean(),
|
|
55470
|
+
intensiveZone: boolean().nullable(),
|
|
55367
55471
|
/** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
|
|
55368
|
-
varioSpeedPlus: boolean(),
|
|
55369
|
-
/** Child lock (controls disabled on the appliance). */
|
|
55370
|
-
childLock: boolean(),
|
|
55472
|
+
varioSpeedPlus: boolean().nullable(),
|
|
55473
|
+
/** Child lock (controls disabled on the appliance); null when not known. */
|
|
55474
|
+
childLock: boolean().nullable(),
|
|
55475
|
+
/** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
|
|
55476
|
+
activeEvents: array(string()),
|
|
55477
|
+
/** Numeric error code when the appliance reports one; null otherwise. */
|
|
55371
55478
|
errorCode: number().nullable(),
|
|
55479
|
+
/** Name of the raised alert-level event while the appliance is in error; null otherwise. */
|
|
55372
55480
|
errorLabel: string().nullable(),
|
|
55481
|
+
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
55373
55482
|
lastFetchedAt: number()
|
|
55374
55483
|
});
|
|
55484
|
+
var DeviceIdSchema = number().int().nonnegative();
|
|
55485
|
+
/** A value a program option or setting can take. */
|
|
55486
|
+
var DishwasherValueSchema = union([
|
|
55487
|
+
boolean(),
|
|
55488
|
+
string(),
|
|
55489
|
+
number()
|
|
55490
|
+
]);
|
|
55491
|
+
var DishwasherAccessSchema = _enum([
|
|
55492
|
+
"none",
|
|
55493
|
+
"read",
|
|
55494
|
+
"readWrite",
|
|
55495
|
+
"writeOnly",
|
|
55496
|
+
"readStatic"
|
|
55497
|
+
]);
|
|
55498
|
+
/**
|
|
55499
|
+
* One option or setting the appliance declares, with the constraints its description
|
|
55500
|
+
* gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
|
|
55501
|
+
*/
|
|
55502
|
+
var DishwasherOptionDescriptorSchema = object({
|
|
55503
|
+
/** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
|
|
55504
|
+
key: string(),
|
|
55505
|
+
/** Last segment of the key, for display. */
|
|
55506
|
+
name: string(),
|
|
55507
|
+
type: _enum([
|
|
55508
|
+
"boolean",
|
|
55509
|
+
"number",
|
|
55510
|
+
"enum",
|
|
55511
|
+
"string"
|
|
55512
|
+
]),
|
|
55513
|
+
access: DishwasherAccessSchema,
|
|
55514
|
+
/** The appliance reports this entity as currently available. */
|
|
55515
|
+
available: boolean(),
|
|
55516
|
+
/** Unit the description declares for a number; null when it declares none. */
|
|
55517
|
+
unit: string().nullable(),
|
|
55518
|
+
min: number().nullable(),
|
|
55519
|
+
max: number().nullable(),
|
|
55520
|
+
step: number().nullable(),
|
|
55521
|
+
/** Allowed members of an enum; null for other types. */
|
|
55522
|
+
enumValues: array(string()).nullable(),
|
|
55523
|
+
defaultValue: DishwasherValueSchema.nullable()
|
|
55524
|
+
});
|
|
55525
|
+
var DishwasherProgramSchema = object({
|
|
55526
|
+
/** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
|
|
55527
|
+
key: string(),
|
|
55528
|
+
name: string(),
|
|
55529
|
+
/** The appliance currently offers this program. */
|
|
55530
|
+
available: boolean(),
|
|
55531
|
+
/** The options this program lists, with the program-level access / availability / default. */
|
|
55532
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
55533
|
+
});
|
|
55534
|
+
var DishwasherOptionsSchema = object({
|
|
55535
|
+
availability: DishwasherAvailabilitySchema,
|
|
55536
|
+
/** What the appliance can be told to do, from the commands its description declares. */
|
|
55537
|
+
supportsStart: boolean(),
|
|
55538
|
+
supportsPause: boolean(),
|
|
55539
|
+
supportsResume: boolean(),
|
|
55540
|
+
supportsStop: boolean(),
|
|
55541
|
+
supportsPower: boolean(),
|
|
55542
|
+
/** Every program the description lists, with its options. */
|
|
55543
|
+
programs: array(DishwasherProgramSchema),
|
|
55544
|
+
/** Every option and setting entity the description lists (programs reference these by key). */
|
|
55545
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
55546
|
+
});
|
|
55375
55547
|
var dishwasherCapability = {
|
|
55376
55548
|
name: "dishwasher",
|
|
55377
55549
|
scope: "device",
|
|
@@ -55379,86 +55551,102 @@ var dishwasherCapability = {
|
|
|
55379
55551
|
mode: "singleton",
|
|
55380
55552
|
deviceTypes: [DeviceType.Dishwasher],
|
|
55381
55553
|
methods: {
|
|
55382
|
-
|
|
55554
|
+
/**
|
|
55555
|
+
* Start a program. Without `program` the selected one starts. `options` are
|
|
55556
|
+
* option feature keys; each is checked against the program's constraints.
|
|
55557
|
+
*/
|
|
55558
|
+
start: method(object({
|
|
55559
|
+
deviceId: DeviceIdSchema,
|
|
55560
|
+
program: string().min(1).optional(),
|
|
55561
|
+
options: record(string(), DishwasherValueSchema).optional()
|
|
55562
|
+
}), _void(), {
|
|
55383
55563
|
kind: "mutation",
|
|
55384
55564
|
auth: "protected"
|
|
55385
55565
|
}),
|
|
55386
|
-
pause: method(object({ deviceId:
|
|
55566
|
+
pause: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55387
55567
|
kind: "mutation",
|
|
55388
55568
|
auth: "protected"
|
|
55389
55569
|
}),
|
|
55390
|
-
|
|
55570
|
+
resume: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55571
|
+
kind: "mutation",
|
|
55572
|
+
auth: "protected"
|
|
55573
|
+
}),
|
|
55574
|
+
stop: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55391
55575
|
kind: "mutation",
|
|
55392
55576
|
auth: "protected"
|
|
55393
55577
|
}),
|
|
55578
|
+
/** Select (not start) a program; refused when the appliance does not offer it. */
|
|
55394
55579
|
setProgram: method(object({
|
|
55395
|
-
deviceId:
|
|
55580
|
+
deviceId: DeviceIdSchema,
|
|
55396
55581
|
program: string().min(1)
|
|
55397
55582
|
}), _void(), {
|
|
55398
55583
|
kind: "mutation",
|
|
55399
55584
|
auth: "protected"
|
|
55400
55585
|
}),
|
|
55401
55586
|
setPower: method(object({
|
|
55402
|
-
deviceId:
|
|
55587
|
+
deviceId: DeviceIdSchema,
|
|
55403
55588
|
on: boolean()
|
|
55404
55589
|
}), _void(), {
|
|
55405
55590
|
kind: "mutation",
|
|
55406
55591
|
auth: "protected"
|
|
55407
55592
|
}),
|
|
55408
55593
|
setHalfLoad: method(object({
|
|
55409
|
-
deviceId:
|
|
55594
|
+
deviceId: DeviceIdSchema,
|
|
55410
55595
|
on: boolean()
|
|
55411
55596
|
}), _void(), {
|
|
55412
55597
|
kind: "mutation",
|
|
55413
55598
|
auth: "protected"
|
|
55414
55599
|
}),
|
|
55415
55600
|
setHygienePlus: method(object({
|
|
55416
|
-
deviceId:
|
|
55601
|
+
deviceId: DeviceIdSchema,
|
|
55417
55602
|
on: boolean()
|
|
55418
55603
|
}), _void(), {
|
|
55419
55604
|
kind: "mutation",
|
|
55420
55605
|
auth: "protected"
|
|
55421
55606
|
}),
|
|
55422
55607
|
setExtraDry: method(object({
|
|
55423
|
-
deviceId:
|
|
55608
|
+
deviceId: DeviceIdSchema,
|
|
55424
55609
|
on: boolean()
|
|
55425
55610
|
}), _void(), {
|
|
55426
55611
|
kind: "mutation",
|
|
55427
55612
|
auth: "protected"
|
|
55428
55613
|
}),
|
|
55429
55614
|
setIntensiveZone: method(object({
|
|
55430
|
-
deviceId:
|
|
55615
|
+
deviceId: DeviceIdSchema,
|
|
55431
55616
|
on: boolean()
|
|
55432
55617
|
}), _void(), {
|
|
55433
55618
|
kind: "mutation",
|
|
55434
55619
|
auth: "protected"
|
|
55435
55620
|
}),
|
|
55436
55621
|
setVarioSpeedPlus: method(object({
|
|
55437
|
-
deviceId:
|
|
55622
|
+
deviceId: DeviceIdSchema,
|
|
55438
55623
|
on: boolean()
|
|
55439
55624
|
}), _void(), {
|
|
55440
55625
|
kind: "mutation",
|
|
55441
55626
|
auth: "protected"
|
|
55442
55627
|
}),
|
|
55443
55628
|
setChildLock: method(object({
|
|
55444
|
-
deviceId:
|
|
55629
|
+
deviceId: DeviceIdSchema,
|
|
55445
55630
|
on: boolean()
|
|
55446
55631
|
}), _void(), {
|
|
55447
55632
|
kind: "mutation",
|
|
55448
55633
|
auth: "protected"
|
|
55449
55634
|
}),
|
|
55635
|
+
/**
|
|
55636
|
+
* Write any option or setting by feature key. Refused when the description does
|
|
55637
|
+
* not list it, it is not writable or not available now, or the value is outside
|
|
55638
|
+
* its declared range / members.
|
|
55639
|
+
*/
|
|
55450
55640
|
setOption: method(object({
|
|
55451
|
-
deviceId:
|
|
55641
|
+
deviceId: DeviceIdSchema,
|
|
55452
55642
|
key: string().min(1),
|
|
55453
|
-
value:
|
|
55454
|
-
boolean(),
|
|
55455
|
-
string(),
|
|
55456
|
-
number()
|
|
55457
|
-
])
|
|
55643
|
+
value: DishwasherValueSchema
|
|
55458
55644
|
}), _void(), {
|
|
55459
55645
|
kind: "mutation",
|
|
55460
55646
|
auth: "protected"
|
|
55461
|
-
})
|
|
55647
|
+
}),
|
|
55648
|
+
/** What this appliance can do, from its own description — the UI is derived from it. */
|
|
55649
|
+
getOptions: method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" })
|
|
55462
55650
|
},
|
|
55463
55651
|
status: {
|
|
55464
55652
|
schema: DishwasherStatusSchema,
|
|
@@ -69555,6 +69743,12 @@ Object.freeze({
|
|
|
69555
69743
|
addonId: null,
|
|
69556
69744
|
access: "view"
|
|
69557
69745
|
},
|
|
69746
|
+
"dishwasher.getOptions": {
|
|
69747
|
+
capName: "dishwasher",
|
|
69748
|
+
capScope: "device",
|
|
69749
|
+
addonId: null,
|
|
69750
|
+
access: "view"
|
|
69751
|
+
},
|
|
69558
69752
|
"dishwasher.getStatus": {
|
|
69559
69753
|
capName: "dishwasher",
|
|
69560
69754
|
capScope: "device",
|
|
@@ -69567,6 +69761,12 @@ Object.freeze({
|
|
|
69567
69761
|
addonId: null,
|
|
69568
69762
|
access: "create"
|
|
69569
69763
|
},
|
|
69764
|
+
"dishwasher.resume": {
|
|
69765
|
+
capName: "dishwasher",
|
|
69766
|
+
capScope: "device",
|
|
69767
|
+
addonId: null,
|
|
69768
|
+
access: "create"
|
|
69769
|
+
},
|
|
69570
69770
|
"dishwasher.setChildLock": {
|
|
69571
69771
|
capName: "dishwasher",
|
|
69572
69772
|
capScope: "device",
|
|
@@ -74067,6 +74267,12 @@ Object.freeze({
|
|
|
74067
74267
|
addonId: null,
|
|
74068
74268
|
access: "view"
|
|
74069
74269
|
},
|
|
74270
|
+
"storageMigration.moverClearance": {
|
|
74271
|
+
capName: "storage-migration",
|
|
74272
|
+
capScope: "system",
|
|
74273
|
+
addonId: null,
|
|
74274
|
+
access: "view"
|
|
74275
|
+
},
|
|
74070
74276
|
"storageMigration.movers": {
|
|
74071
74277
|
capName: "storage-migration",
|
|
74072
74278
|
capScope: "system",
|
|
@@ -76260,6 +76466,11 @@ Object.freeze({
|
|
|
76260
76466
|
form: "single",
|
|
76261
76467
|
optional: false
|
|
76262
76468
|
}],
|
|
76469
|
+
"dishwasher.getOptions": [{
|
|
76470
|
+
name: "deviceId",
|
|
76471
|
+
form: "single",
|
|
76472
|
+
optional: false
|
|
76473
|
+
}],
|
|
76263
76474
|
"dishwasher.getStatus": [{
|
|
76264
76475
|
name: "deviceId",
|
|
76265
76476
|
form: "single",
|
|
@@ -76270,6 +76481,11 @@ Object.freeze({
|
|
|
76270
76481
|
form: "single",
|
|
76271
76482
|
optional: false
|
|
76272
76483
|
}],
|
|
76484
|
+
"dishwasher.resume": [{
|
|
76485
|
+
name: "deviceId",
|
|
76486
|
+
form: "single",
|
|
76487
|
+
optional: false
|
|
76488
|
+
}],
|
|
76273
76489
|
"dishwasher.setChildLock": [{
|
|
76274
76490
|
name: "deviceId",
|
|
76275
76491
|
form: "single",
|
|
@@ -78356,6 +78572,9 @@ new Map(Object.entries({
|
|
|
78356
78572
|
"wrapper-update-available": "system",
|
|
78357
78573
|
"backup-completed": "system",
|
|
78358
78574
|
"export-completed": "system",
|
|
78575
|
+
"alert-critical": "system",
|
|
78576
|
+
"alert-error": "system",
|
|
78577
|
+
"alert-critical-resolved": "system",
|
|
78359
78578
|
"storage-location-low": "system",
|
|
78360
78579
|
"storage-location-critical": "system",
|
|
78361
78580
|
"storage-location-ok": "system",
|
|
@@ -78480,6 +78699,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
78480
78699
|
"storage-location-ok"
|
|
78481
78700
|
]
|
|
78482
78701
|
},
|
|
78702
|
+
{
|
|
78703
|
+
id: "alerts",
|
|
78704
|
+
family: "system",
|
|
78705
|
+
label: "Alerts",
|
|
78706
|
+
kinds: [
|
|
78707
|
+
"alert-critical",
|
|
78708
|
+
"alert-error",
|
|
78709
|
+
"alert-critical-resolved"
|
|
78710
|
+
]
|
|
78711
|
+
},
|
|
78483
78712
|
{
|
|
78484
78713
|
id: "alarm",
|
|
78485
78714
|
family: "alarm",
|
|
@@ -78524,6 +78753,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
|
|
|
78524
78753
|
return [[descriptor.kind, field]];
|
|
78525
78754
|
})));
|
|
78526
78755
|
Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
|
|
78756
|
+
object({
|
|
78757
|
+
phase: _enum(["raised", "resolved"]),
|
|
78758
|
+
episodeId: string().min(1),
|
|
78759
|
+
alertId: string().min(1),
|
|
78760
|
+
severity: AlertSeveritySchema,
|
|
78761
|
+
category: string(),
|
|
78762
|
+
title: string(),
|
|
78763
|
+
message: string(),
|
|
78764
|
+
sourceType: string().optional(),
|
|
78765
|
+
sourceId: string().optional(),
|
|
78766
|
+
nodeId: string().optional(),
|
|
78767
|
+
/** The alert's own action link (where the operator acts on it), when it has one. */
|
|
78768
|
+
actionUrl: string().optional(),
|
|
78769
|
+
at: number()
|
|
78770
|
+
});
|
|
78527
78771
|
var RULE_BODY_ONLY = ["body"];
|
|
78528
78772
|
var RULE_TEXT = ["title", "body"];
|
|
78529
78773
|
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
@@ -78533,6 +78777,11 @@ var TANK = [
|
|
|
78533
78777
|
"device-tank-full",
|
|
78534
78778
|
"device-tank-normal"
|
|
78535
78779
|
];
|
|
78780
|
+
var ALERT_EPISODE = [
|
|
78781
|
+
"alert-critical",
|
|
78782
|
+
"alert-error",
|
|
78783
|
+
"alert-critical-resolved"
|
|
78784
|
+
];
|
|
78536
78785
|
var UPDATES = [
|
|
78537
78786
|
"addon-update-available",
|
|
78538
78787
|
"server-update-available",
|
|
@@ -78725,14 +78974,14 @@ var STATE_SUMMARY_VARS = [
|
|
|
78725
78974
|
([...RULE_TEXT], [...CONSUMABLE]),
|
|
78726
78975
|
([...RULE_TEXT], [...TANK]),
|
|
78727
78976
|
[...RULE_TEXT],
|
|
78728
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
78729
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
78730
|
-
[...RULE_TEXT],
|
|
78977
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
78978
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
78731
78979
|
[...RULE_TEXT],
|
|
78732
78980
|
[...RULE_TEXT],
|
|
78733
78981
|
[...RULE_TEXT],
|
|
78734
78982
|
[...RULE_TEXT],
|
|
78735
78983
|
[...RULE_TEXT],
|
|
78984
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78736
78985
|
[...RULE_TEXT],
|
|
78737
78986
|
[...RULE_TEXT],
|
|
78738
78987
|
[...RULE_TEXT],
|
|
@@ -78750,7 +78999,11 @@ var STATE_SUMMARY_VARS = [
|
|
|
78750
78999
|
[...RULE_TEXT],
|
|
78751
79000
|
[...RULE_TEXT],
|
|
78752
79001
|
[...RULE_TEXT],
|
|
78753
|
-
[...RULE_TEXT],
|
|
79002
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
79003
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
79004
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
79005
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
79006
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78754
79007
|
[...RULE_TEXT],
|
|
78755
79008
|
[...RULE_TEXT],
|
|
78756
79009
|
[...RULE_TEXT],
|