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