@camstack/addon-provider-rademacher 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
|
@@ -984,7 +984,7 @@ var Rademacher = class {
|
|
|
984
984
|
}
|
|
985
985
|
};
|
|
986
986
|
//#endregion
|
|
987
|
-
//#region ../types/dist/event-category-
|
|
987
|
+
//#region ../types/dist/event-category-DOl51-Ij.mjs
|
|
988
988
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
989
989
|
EventCategory["SystemBoot"] = "system.boot";
|
|
990
990
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -1063,9 +1063,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
1063
1063
|
/**
|
|
1064
1064
|
* The node's one-shot runner boot check (D877): planned runners against the
|
|
1065
1065
|
* process service, `degraded` when any is failed, refused or missing. The
|
|
1066
|
-
* alert centre turns it into one
|
|
1066
|
+
* alert centre turns it into one critical alert.
|
|
1067
1067
|
*/
|
|
1068
1068
|
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
1069
|
+
/**
|
|
1070
|
+
* An alert EPISODE opened or closed, emitted by the alert centre for alerts
|
|
1071
|
+
* of severity `critical` or `error` (`AlertEpisodePayload`). The alert
|
|
1072
|
+
* centre sends no notification of its own: Notification Center turns this
|
|
1073
|
+
* into the `alert-critical` / `alert-error` / `alert-critical-resolved`
|
|
1074
|
+
* system-event kinds, and reconciles from the alerts store because a bus
|
|
1075
|
+
* event may be dropped (D8, D11).
|
|
1076
|
+
*/
|
|
1077
|
+
EventCategory["AlertEpisode"] = "alert.episode";
|
|
1069
1078
|
EventCategory["AddonError"] = "addon.error";
|
|
1070
1079
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
1071
1080
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -6390,7 +6399,7 @@ var ZodIssueCode = {
|
|
|
6390
6399
|
var ZodFirstPartyTypeKind;
|
|
6391
6400
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
6392
6401
|
//#endregion
|
|
6393
|
-
//#region ../types/dist/sleep-
|
|
6402
|
+
//#region ../types/dist/sleep-BxjU_fJM.mjs
|
|
6394
6403
|
/**
|
|
6395
6404
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
6396
6405
|
* window to float samples (D455).
|
|
@@ -8772,6 +8781,12 @@ function normalizeAddonInitResult(result) {
|
|
|
8772
8781
|
if (Array.isArray(result)) return { providers: result };
|
|
8773
8782
|
return result;
|
|
8774
8783
|
}
|
|
8784
|
+
/**
|
|
8785
|
+
* The share-view scope kinds a `csv_*` share token can carry. The hub mints
|
|
8786
|
+
* and validates them (`share-token.service.ts` builds its enum from this
|
|
8787
|
+
* list); a data plane names the kinds it ACCEPTS in `share`.
|
|
8788
|
+
*/
|
|
8789
|
+
var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
|
|
8775
8790
|
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
8776
8791
|
var PeerBytesTicketSchema = object({
|
|
8777
8792
|
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
@@ -13437,6 +13452,229 @@ var ConvertResultSchema = object({
|
|
|
13437
13452
|
files: array(string()).readonly()
|
|
13438
13453
|
})).readonly()
|
|
13439
13454
|
});
|
|
13455
|
+
/**
|
|
13456
|
+
* Zod schemas for persisted record types.
|
|
13457
|
+
*
|
|
13458
|
+
* These schemas serve as the single source of truth for types that are
|
|
13459
|
+
* stored in the settings-store backend and retrieved via tRPC. They
|
|
13460
|
+
* replace the manual TypeScript interfaces with schema-derived types,
|
|
13461
|
+
* enabling runtime validation when reading from the backend.
|
|
13462
|
+
*
|
|
13463
|
+
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
13464
|
+
* keeps the original name for backward compatibility.
|
|
13465
|
+
*/
|
|
13466
|
+
/**
|
|
13467
|
+
* Auth model (v2 — 2026-05-12 caps-only):
|
|
13468
|
+
*
|
|
13469
|
+
* Two principals:
|
|
13470
|
+
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
13471
|
+
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
13472
|
+
*
|
|
13473
|
+
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
13474
|
+
* `super_admin` — collapsed onto the single boolean because every
|
|
13475
|
+
* non-admin caller is governed by the same scope-check rules; the
|
|
13476
|
+
* distinction was only ever used to route role-specific procedures
|
|
13477
|
+
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
13478
|
+
* with `isAdmin: false` + an explicit scope list.
|
|
13479
|
+
*/
|
|
13480
|
+
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
13481
|
+
var MethodAccessSchema = _enum([
|
|
13482
|
+
"view",
|
|
13483
|
+
"create",
|
|
13484
|
+
"delete"
|
|
13485
|
+
]);
|
|
13486
|
+
/**
|
|
13487
|
+
* A single scope grant. Three forms — checked in matcher with OR
|
|
13488
|
+
* semantics; the first match decides whether the call passes:
|
|
13489
|
+
*
|
|
13490
|
+
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
13491
|
+
* cap with the matching `scope` declaration. New caps inherit grants
|
|
13492
|
+
* automatically — adding a device cap to the codebase makes it
|
|
13493
|
+
* reachable to every user with `category:device [...]` without a
|
|
13494
|
+
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
13495
|
+
*
|
|
13496
|
+
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
13497
|
+
* useful when an integration needs to interact with one specific
|
|
13498
|
+
* addon's surface regardless of how many caps it exports.
|
|
13499
|
+
*
|
|
13500
|
+
* - `capability` — the most precise form. Single cap name. Use for
|
|
13501
|
+
* integration tokens where you want to grant `addons.installPackage`
|
|
13502
|
+
* and nothing else.
|
|
13503
|
+
*
|
|
13504
|
+
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
13505
|
+
* "give me everything" escape; there is no wildcard scope.
|
|
13506
|
+
*/
|
|
13507
|
+
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
13508
|
+
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
13509
|
+
var CapScopeSchema = _enum(["device", "system"]);
|
|
13510
|
+
/**
|
|
13511
|
+
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
13512
|
+
*
|
|
13513
|
+
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
13514
|
+
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
13515
|
+
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
13516
|
+
* AFTER the grant was minted — no re-grant, no re-login.
|
|
13517
|
+
*
|
|
13518
|
+
* - `all` — every device in the deployment. The broad viewer/operator
|
|
13519
|
+
* lever without a `category` grant (a `category` grant also covers device
|
|
13520
|
+
* caps that carry no deviceId; `all` is specifically the device set).
|
|
13521
|
+
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
13522
|
+
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
13523
|
+
* is NOT covered until the grant is edited.
|
|
13524
|
+
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
13525
|
+
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
13526
|
+
* re-resolves on the next request.
|
|
13527
|
+
* - `locations` — every device whose operator-assigned `location` label is
|
|
13528
|
+
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
13529
|
+
* null/unset location matches NO `locations` selector.
|
|
13530
|
+
*/
|
|
13531
|
+
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
13532
|
+
object({ kind: literal("all") }),
|
|
13533
|
+
object({
|
|
13534
|
+
kind: literal("ids"),
|
|
13535
|
+
ids: array(number().int()).min(1)
|
|
13536
|
+
}),
|
|
13537
|
+
object({
|
|
13538
|
+
kind: literal("types"),
|
|
13539
|
+
types: array(_enum(DeviceType)).min(1)
|
|
13540
|
+
}),
|
|
13541
|
+
object({
|
|
13542
|
+
kind: literal("locations"),
|
|
13543
|
+
locations: array(string().min(1)).min(1)
|
|
13544
|
+
})
|
|
13545
|
+
]);
|
|
13546
|
+
var DeviceTokenScopeSchema = object({
|
|
13547
|
+
type: literal("device"),
|
|
13548
|
+
/** The device SET this grant covers — resolved against the live fleet. */
|
|
13549
|
+
selector: DeviceSelectorSchema,
|
|
13550
|
+
access: array(MethodAccessSchema).min(1),
|
|
13551
|
+
/**
|
|
13552
|
+
* Whether a grant on a PARENT device transparently covers its accessory
|
|
13553
|
+
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
13554
|
+
* Direction is parent → children ONLY.
|
|
13555
|
+
*
|
|
13556
|
+
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
13557
|
+
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
13558
|
+
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
13559
|
+
* operator must grant on the child, not inherit from the parent). Set it
|
|
13560
|
+
* explicitly to override that default per grant.
|
|
13561
|
+
*/
|
|
13562
|
+
includeLinked: boolean().optional()
|
|
13563
|
+
});
|
|
13564
|
+
/**
|
|
13565
|
+
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
13566
|
+
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
13567
|
+
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
13568
|
+
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
13569
|
+
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
13570
|
+
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
13571
|
+
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
13572
|
+
* migration covers both without a flag day. No cast — the raw object is read
|
|
13573
|
+
* through `Reflect.get` (its static type is `unknown`).
|
|
13574
|
+
*/
|
|
13575
|
+
function migrateLegacyTokenScope(raw) {
|
|
13576
|
+
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
13577
|
+
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
13578
|
+
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
13579
|
+
const targets = Reflect.get(raw, "targets");
|
|
13580
|
+
if (!Array.isArray(targets)) return raw;
|
|
13581
|
+
return {
|
|
13582
|
+
type: "device",
|
|
13583
|
+
selector: {
|
|
13584
|
+
kind: "ids",
|
|
13585
|
+
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
13586
|
+
},
|
|
13587
|
+
access: Reflect.get(raw, "access")
|
|
13588
|
+
};
|
|
13589
|
+
}
|
|
13590
|
+
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
13591
|
+
object({
|
|
13592
|
+
type: literal("category"),
|
|
13593
|
+
target: CapScopeSchema,
|
|
13594
|
+
access: array(MethodAccessSchema).min(1)
|
|
13595
|
+
}),
|
|
13596
|
+
object({
|
|
13597
|
+
type: literal("capability"),
|
|
13598
|
+
target: string(),
|
|
13599
|
+
access: array(MethodAccessSchema).min(1)
|
|
13600
|
+
}),
|
|
13601
|
+
object({
|
|
13602
|
+
type: literal("addon"),
|
|
13603
|
+
target: string(),
|
|
13604
|
+
access: array(MethodAccessSchema).min(1)
|
|
13605
|
+
}),
|
|
13606
|
+
DeviceTokenScopeSchema
|
|
13607
|
+
]));
|
|
13608
|
+
object({
|
|
13609
|
+
id: string(),
|
|
13610
|
+
username: string(),
|
|
13611
|
+
passwordHash: string(),
|
|
13612
|
+
/**
|
|
13613
|
+
* Admin bypass. When true, the middleware skips the scope-access
|
|
13614
|
+
* check entirely. There is no other axis of privilege; the legacy
|
|
13615
|
+
* role enum collapsed onto this boolean in v2.
|
|
13616
|
+
*/
|
|
13617
|
+
isAdmin: boolean().default(false),
|
|
13618
|
+
allowedProviders: AllowedProviderSchema,
|
|
13619
|
+
allowedDevices: AllowedDevicesSchema,
|
|
13620
|
+
/**
|
|
13621
|
+
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
13622
|
+
* ignored. Non-admins without scopes are locked out of every
|
|
13623
|
+
* protected call.
|
|
13624
|
+
*/
|
|
13625
|
+
scopes: array(TokenScopeSchema).default([]),
|
|
13626
|
+
createdAt: number(),
|
|
13627
|
+
updatedAt: number()
|
|
13628
|
+
});
|
|
13629
|
+
object({
|
|
13630
|
+
id: string(),
|
|
13631
|
+
label: string(),
|
|
13632
|
+
isAdmin: boolean().default(false),
|
|
13633
|
+
allowedProviders: AllowedProviderSchema,
|
|
13634
|
+
allowedDevices: AllowedDevicesSchema,
|
|
13635
|
+
tokenHash: string(),
|
|
13636
|
+
tokenPrefix: string(),
|
|
13637
|
+
createdAt: number(),
|
|
13638
|
+
lastUsedAt: number().optional()
|
|
13639
|
+
});
|
|
13640
|
+
object({
|
|
13641
|
+
id: string(),
|
|
13642
|
+
userId: string(),
|
|
13643
|
+
name: string(),
|
|
13644
|
+
tokenHash: string(),
|
|
13645
|
+
tokenPrefix: string(),
|
|
13646
|
+
scopes: array(TokenScopeSchema),
|
|
13647
|
+
expiresAt: number().nullish(),
|
|
13648
|
+
lastUsedAt: number().nullish(),
|
|
13649
|
+
createdAt: number()
|
|
13650
|
+
});
|
|
13651
|
+
/** What a share-view grant lets its holder see. */
|
|
13652
|
+
var ShareViewGrantSchema = object({
|
|
13653
|
+
kind: _enum(SHARE_VIEW_KINDS),
|
|
13654
|
+
deviceIds: array(number().int().nonnegative()).min(1).max(64),
|
|
13655
|
+
/** Talk-back, opt-in at mint time; absent means off. */
|
|
13656
|
+
talk: boolean().optional()
|
|
13657
|
+
});
|
|
13658
|
+
var ShareViewScopeSchema = object({
|
|
13659
|
+
type: literal("share-view"),
|
|
13660
|
+
grant: ShareViewGrantSchema
|
|
13661
|
+
});
|
|
13662
|
+
var AddonRoutesScopeSchema = object({
|
|
13663
|
+
type: literal("addon-routes"),
|
|
13664
|
+
access: array(MethodAccessSchema).min(1)
|
|
13665
|
+
});
|
|
13666
|
+
var CredentialScopeSchema = union([
|
|
13667
|
+
literal("*"),
|
|
13668
|
+
ShareViewScopeSchema,
|
|
13669
|
+
AddonRoutesScopeSchema,
|
|
13670
|
+
TokenScopeSchema
|
|
13671
|
+
]);
|
|
13672
|
+
object({
|
|
13673
|
+
kind: literal("credential"),
|
|
13674
|
+
sub: string().min(1),
|
|
13675
|
+
jti: string().min(16),
|
|
13676
|
+
scopes: array(CredentialScopeSchema).min(1)
|
|
13677
|
+
});
|
|
13440
13678
|
_enum(["new-session", "step-up"]);
|
|
13441
13679
|
/** The languages the hub's app landing pages are written in (D858). */
|
|
13442
13680
|
var AppPageLangSchema = _enum(["en", "it"]);
|
|
@@ -14153,7 +14391,14 @@ var AlertSeveritySchema = _enum([
|
|
|
14153
14391
|
]);
|
|
14154
14392
|
var AlertActionSchema = object({
|
|
14155
14393
|
label: string(),
|
|
14156
|
-
href: string().optional()
|
|
14394
|
+
href: string().optional(),
|
|
14395
|
+
/**
|
|
14396
|
+
* How `href` is followed. Absent / `app`: an admin-ui route (client-side).
|
|
14397
|
+
* `server`: a route the HUB serves (an addon HTTP route such as an OAuth
|
|
14398
|
+
* start) — the browser must leave the SPA with a full navigation, because
|
|
14399
|
+
* the SPA has no such route and would bounce to the home page.
|
|
14400
|
+
*/
|
|
14401
|
+
navigation: _enum(["app", "server"]).optional()
|
|
14157
14402
|
});
|
|
14158
14403
|
var AlertStatusSchema = _enum([
|
|
14159
14404
|
"active",
|
|
@@ -42982,6 +43227,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
42982
43227
|
"server-updated",
|
|
42983
43228
|
"export-completed",
|
|
42984
43229
|
"backup-completed",
|
|
43230
|
+
"alert-critical",
|
|
43231
|
+
"alert-error",
|
|
43232
|
+
"alert-critical-resolved",
|
|
42985
43233
|
"camera-online",
|
|
42986
43234
|
"camera-offline",
|
|
42987
43235
|
"camera-disabled",
|
|
@@ -45017,202 +45265,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
45017
45265
|
auth: "admin"
|
|
45018
45266
|
}), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
|
|
45019
45267
|
/**
|
|
45020
|
-
* Zod schemas for persisted record types.
|
|
45021
|
-
*
|
|
45022
|
-
* These schemas serve as the single source of truth for types that are
|
|
45023
|
-
* stored in the settings-store backend and retrieved via tRPC. They
|
|
45024
|
-
* replace the manual TypeScript interfaces with schema-derived types,
|
|
45025
|
-
* enabling runtime validation when reading from the backend.
|
|
45026
|
-
*
|
|
45027
|
-
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
45028
|
-
* keeps the original name for backward compatibility.
|
|
45029
|
-
*/
|
|
45030
|
-
/**
|
|
45031
|
-
* Auth model (v2 — 2026-05-12 caps-only):
|
|
45032
|
-
*
|
|
45033
|
-
* Two principals:
|
|
45034
|
-
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
45035
|
-
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
45036
|
-
*
|
|
45037
|
-
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
45038
|
-
* `super_admin` — collapsed onto the single boolean because every
|
|
45039
|
-
* non-admin caller is governed by the same scope-check rules; the
|
|
45040
|
-
* distinction was only ever used to route role-specific procedures
|
|
45041
|
-
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
45042
|
-
* with `isAdmin: false` + an explicit scope list.
|
|
45043
|
-
*/
|
|
45044
|
-
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
45045
|
-
var MethodAccessSchema = _enum([
|
|
45046
|
-
"view",
|
|
45047
|
-
"create",
|
|
45048
|
-
"delete"
|
|
45049
|
-
]);
|
|
45050
|
-
/**
|
|
45051
|
-
* A single scope grant. Three forms — checked in matcher with OR
|
|
45052
|
-
* semantics; the first match decides whether the call passes:
|
|
45053
|
-
*
|
|
45054
|
-
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
45055
|
-
* cap with the matching `scope` declaration. New caps inherit grants
|
|
45056
|
-
* automatically — adding a device cap to the codebase makes it
|
|
45057
|
-
* reachable to every user with `category:device [...]` without a
|
|
45058
|
-
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
45059
|
-
*
|
|
45060
|
-
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
45061
|
-
* useful when an integration needs to interact with one specific
|
|
45062
|
-
* addon's surface regardless of how many caps it exports.
|
|
45063
|
-
*
|
|
45064
|
-
* - `capability` — the most precise form. Single cap name. Use for
|
|
45065
|
-
* integration tokens where you want to grant `addons.installPackage`
|
|
45066
|
-
* and nothing else.
|
|
45067
|
-
*
|
|
45068
|
-
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
45069
|
-
* "give me everything" escape; there is no wildcard scope.
|
|
45070
|
-
*/
|
|
45071
|
-
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
45072
|
-
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
45073
|
-
var CapScopeSchema = _enum(["device", "system"]);
|
|
45074
|
-
/**
|
|
45075
|
-
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
45076
|
-
*
|
|
45077
|
-
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
45078
|
-
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
45079
|
-
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
45080
|
-
* AFTER the grant was minted — no re-grant, no re-login.
|
|
45081
|
-
*
|
|
45082
|
-
* - `all` — every device in the deployment. The broad viewer/operator
|
|
45083
|
-
* lever without a `category` grant (a `category` grant also covers device
|
|
45084
|
-
* caps that carry no deviceId; `all` is specifically the device set).
|
|
45085
|
-
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
45086
|
-
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
45087
|
-
* is NOT covered until the grant is edited.
|
|
45088
|
-
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
45089
|
-
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
45090
|
-
* re-resolves on the next request.
|
|
45091
|
-
* - `locations` — every device whose operator-assigned `location` label is
|
|
45092
|
-
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
45093
|
-
* null/unset location matches NO `locations` selector.
|
|
45094
|
-
*/
|
|
45095
|
-
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
45096
|
-
object({ kind: literal("all") }),
|
|
45097
|
-
object({
|
|
45098
|
-
kind: literal("ids"),
|
|
45099
|
-
ids: array(number().int()).min(1)
|
|
45100
|
-
}),
|
|
45101
|
-
object({
|
|
45102
|
-
kind: literal("types"),
|
|
45103
|
-
types: array(_enum(DeviceType)).min(1)
|
|
45104
|
-
}),
|
|
45105
|
-
object({
|
|
45106
|
-
kind: literal("locations"),
|
|
45107
|
-
locations: array(string().min(1)).min(1)
|
|
45108
|
-
})
|
|
45109
|
-
]);
|
|
45110
|
-
var DeviceTokenScopeSchema = object({
|
|
45111
|
-
type: literal("device"),
|
|
45112
|
-
/** The device SET this grant covers — resolved against the live fleet. */
|
|
45113
|
-
selector: DeviceSelectorSchema,
|
|
45114
|
-
access: array(MethodAccessSchema).min(1),
|
|
45115
|
-
/**
|
|
45116
|
-
* Whether a grant on a PARENT device transparently covers its accessory
|
|
45117
|
-
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
45118
|
-
* Direction is parent → children ONLY.
|
|
45119
|
-
*
|
|
45120
|
-
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
45121
|
-
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
45122
|
-
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
45123
|
-
* operator must grant on the child, not inherit from the parent). Set it
|
|
45124
|
-
* explicitly to override that default per grant.
|
|
45125
|
-
*/
|
|
45126
|
-
includeLinked: boolean().optional()
|
|
45127
|
-
});
|
|
45128
|
-
/**
|
|
45129
|
-
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
45130
|
-
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
45131
|
-
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
45132
|
-
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
45133
|
-
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
45134
|
-
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
45135
|
-
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
45136
|
-
* migration covers both without a flag day. No cast — the raw object is read
|
|
45137
|
-
* through `Reflect.get` (its static type is `unknown`).
|
|
45138
|
-
*/
|
|
45139
|
-
function migrateLegacyTokenScope(raw) {
|
|
45140
|
-
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
45141
|
-
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
45142
|
-
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
45143
|
-
const targets = Reflect.get(raw, "targets");
|
|
45144
|
-
if (!Array.isArray(targets)) return raw;
|
|
45145
|
-
return {
|
|
45146
|
-
type: "device",
|
|
45147
|
-
selector: {
|
|
45148
|
-
kind: "ids",
|
|
45149
|
-
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
45150
|
-
},
|
|
45151
|
-
access: Reflect.get(raw, "access")
|
|
45152
|
-
};
|
|
45153
|
-
}
|
|
45154
|
-
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
45155
|
-
object({
|
|
45156
|
-
type: literal("category"),
|
|
45157
|
-
target: CapScopeSchema,
|
|
45158
|
-
access: array(MethodAccessSchema).min(1)
|
|
45159
|
-
}),
|
|
45160
|
-
object({
|
|
45161
|
-
type: literal("capability"),
|
|
45162
|
-
target: string(),
|
|
45163
|
-
access: array(MethodAccessSchema).min(1)
|
|
45164
|
-
}),
|
|
45165
|
-
object({
|
|
45166
|
-
type: literal("addon"),
|
|
45167
|
-
target: string(),
|
|
45168
|
-
access: array(MethodAccessSchema).min(1)
|
|
45169
|
-
}),
|
|
45170
|
-
DeviceTokenScopeSchema
|
|
45171
|
-
]));
|
|
45172
|
-
object({
|
|
45173
|
-
id: string(),
|
|
45174
|
-
username: string(),
|
|
45175
|
-
passwordHash: string(),
|
|
45176
|
-
/**
|
|
45177
|
-
* Admin bypass. When true, the middleware skips the scope-access
|
|
45178
|
-
* check entirely. There is no other axis of privilege; the legacy
|
|
45179
|
-
* role enum collapsed onto this boolean in v2.
|
|
45180
|
-
*/
|
|
45181
|
-
isAdmin: boolean().default(false),
|
|
45182
|
-
allowedProviders: AllowedProviderSchema,
|
|
45183
|
-
allowedDevices: AllowedDevicesSchema,
|
|
45184
|
-
/**
|
|
45185
|
-
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
45186
|
-
* ignored. Non-admins without scopes are locked out of every
|
|
45187
|
-
* protected call.
|
|
45188
|
-
*/
|
|
45189
|
-
scopes: array(TokenScopeSchema).default([]),
|
|
45190
|
-
createdAt: number(),
|
|
45191
|
-
updatedAt: number()
|
|
45192
|
-
});
|
|
45193
|
-
object({
|
|
45194
|
-
id: string(),
|
|
45195
|
-
label: string(),
|
|
45196
|
-
isAdmin: boolean().default(false),
|
|
45197
|
-
allowedProviders: AllowedProviderSchema,
|
|
45198
|
-
allowedDevices: AllowedDevicesSchema,
|
|
45199
|
-
tokenHash: string(),
|
|
45200
|
-
tokenPrefix: string(),
|
|
45201
|
-
createdAt: number(),
|
|
45202
|
-
lastUsedAt: number().optional()
|
|
45203
|
-
});
|
|
45204
|
-
object({
|
|
45205
|
-
id: string(),
|
|
45206
|
-
userId: string(),
|
|
45207
|
-
name: string(),
|
|
45208
|
-
tokenHash: string(),
|
|
45209
|
-
tokenPrefix: string(),
|
|
45210
|
-
scopes: array(TokenScopeSchema),
|
|
45211
|
-
expiresAt: number().nullish(),
|
|
45212
|
-
lastUsedAt: number().nullish(),
|
|
45213
|
-
createdAt: number()
|
|
45214
|
-
});
|
|
45215
|
-
/**
|
|
45216
45268
|
* `oauth-integration` — a collection cap by which an addon declares
|
|
45217
45269
|
* itself a linkable OAuth client of the hub's core `/oauth2/*` server.
|
|
45218
45270
|
* Each provider returns a static descriptor; the core enumerates them
|
|
@@ -52058,7 +52110,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
52058
52110
|
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
52059
52111
|
kind: "mutation",
|
|
52060
52112
|
auth: "admin"
|
|
52061
|
-
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({
|
|
52113
|
+
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
|
|
52114
|
+
clear: boolean(),
|
|
52115
|
+
repointLocationId: string().optional()
|
|
52116
|
+
}), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
|
|
52062
52117
|
kind: "mutation",
|
|
52063
52118
|
auth: "admin"
|
|
52064
52119
|
}), method(StorageCleanupInputSchema, object({ jobId: string() }), {
|
|
@@ -56314,6 +56369,11 @@ onStatusChanged: { data: object({
|
|
|
56314
56369
|
*
|
|
56315
56370
|
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
56316
56371
|
* provider refreshes the slice on an interval and eagerly after commands.
|
|
56372
|
+
*
|
|
56373
|
+
* UNKNOWN IS NOT OFF. Every field the appliance reports separately is
|
|
56374
|
+
* nullable: `null` means "not known right now" (the appliance has not said,
|
|
56375
|
+
* the link is down, or the description does not carry it) and is never
|
|
56376
|
+
* rendered or exported as `false` / `0`. `availability` says why.
|
|
56317
56377
|
*/
|
|
56318
56378
|
var DishwasherStateSchema = _enum([
|
|
56319
56379
|
"idle",
|
|
@@ -56323,43 +56383,155 @@ var DishwasherStateSchema = _enum([
|
|
|
56323
56383
|
"error",
|
|
56324
56384
|
"unavailable"
|
|
56325
56385
|
]);
|
|
56386
|
+
/**
|
|
56387
|
+
* The appliance's own operation state, uncollapsed. `state` above is the coarse
|
|
56388
|
+
* view for compact surfaces; this is what the appliance said.
|
|
56389
|
+
*/
|
|
56390
|
+
var DishwasherOperationStateSchema = _enum([
|
|
56391
|
+
"Inactive",
|
|
56392
|
+
"Ready",
|
|
56393
|
+
"DelayedStart",
|
|
56394
|
+
"Run",
|
|
56395
|
+
"Pause",
|
|
56396
|
+
"ActionRequired",
|
|
56397
|
+
"Finished",
|
|
56398
|
+
"Error",
|
|
56399
|
+
"Aborting"
|
|
56400
|
+
]);
|
|
56401
|
+
/**
|
|
56402
|
+
* Why fields may be `null`:
|
|
56403
|
+
* - `available` — the link is up and the description is loaded;
|
|
56404
|
+
* - `offline` — the local link is down (values are unknown, not last-known);
|
|
56405
|
+
* - `description-missing` — the link is up but the appliance's description could not
|
|
56406
|
+
* be loaded, so its values cannot be decoded.
|
|
56407
|
+
*/
|
|
56408
|
+
var DishwasherAvailabilitySchema = _enum([
|
|
56409
|
+
"available",
|
|
56410
|
+
"offline",
|
|
56411
|
+
"description-missing"
|
|
56412
|
+
]);
|
|
56326
56413
|
var DishwasherConsumableLevelSchema = _enum([
|
|
56327
56414
|
"ok",
|
|
56328
56415
|
"low",
|
|
56329
56416
|
"empty"
|
|
56330
56417
|
]);
|
|
56331
56418
|
var DishwasherStatusSchema = object({
|
|
56419
|
+
availability: DishwasherAvailabilitySchema,
|
|
56420
|
+
/** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
|
|
56332
56421
|
state: DishwasherStateSchema,
|
|
56333
|
-
/**
|
|
56422
|
+
/** The appliance's operation state as reported; null when not known. */
|
|
56423
|
+
operationState: DishwasherOperationStateSchema.nullable(),
|
|
56424
|
+
/** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
|
|
56334
56425
|
program: string().nullable(),
|
|
56335
|
-
/**
|
|
56426
|
+
/** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
|
|
56427
|
+
selectedProgram: string().nullable(),
|
|
56428
|
+
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
56336
56429
|
availablePrograms: array(string()),
|
|
56337
|
-
/**
|
|
56338
|
-
|
|
56430
|
+
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
56431
|
+
remainingSeconds: number().int().nonnegative().nullable(),
|
|
56432
|
+
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
56433
|
+
delayedStartSeconds: number().int().nonnegative().nullable(),
|
|
56339
56434
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
56340
56435
|
progressPercent: number().min(0).max(100).nullable(),
|
|
56341
|
-
/** True when the door is reported open. */
|
|
56342
|
-
doorOpen: boolean(),
|
|
56343
|
-
/** True when
|
|
56344
|
-
|
|
56345
|
-
/**
|
|
56346
|
-
|
|
56436
|
+
/** True when the door is reported open; null when the door state is not known. */
|
|
56437
|
+
doorOpen: boolean().nullable(),
|
|
56438
|
+
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
56439
|
+
doorLocked: boolean().nullable(),
|
|
56440
|
+
/** True when remote start is allowed (door closed, power on, etc.); null when not known. */
|
|
56441
|
+
remoteStartAllowed: boolean().nullable(),
|
|
56442
|
+
/** True when the appliance accepts remote control now; null when not known. */
|
|
56443
|
+
remoteControlActive: boolean().nullable(),
|
|
56444
|
+
/** True while somebody operates the appliance at its panel; null when not reported. */
|
|
56445
|
+
localControlActive: boolean().nullable(),
|
|
56446
|
+
/** Main power / switched-on state; null when not known. */
|
|
56447
|
+
powerOn: boolean().nullable(),
|
|
56448
|
+
/** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
|
|
56449
|
+
powerState: string().nullable(),
|
|
56347
56450
|
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
56348
56451
|
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
56349
|
-
|
|
56350
|
-
|
|
56452
|
+
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
56453
|
+
halfLoad: boolean().nullable(),
|
|
56454
|
+
hygienePlus: boolean().nullable(),
|
|
56351
56455
|
/** Extra dry option when the appliance exposes it. */
|
|
56352
|
-
extraDry: boolean(),
|
|
56456
|
+
extraDry: boolean().nullable(),
|
|
56353
56457
|
/** Intensive zone (lower basket) when the appliance exposes it. */
|
|
56354
|
-
intensiveZone: boolean(),
|
|
56458
|
+
intensiveZone: boolean().nullable(),
|
|
56355
56459
|
/** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
|
|
56356
|
-
varioSpeedPlus: boolean(),
|
|
56357
|
-
/** Child lock (controls disabled on the appliance). */
|
|
56358
|
-
childLock: boolean(),
|
|
56460
|
+
varioSpeedPlus: boolean().nullable(),
|
|
56461
|
+
/** Child lock (controls disabled on the appliance); null when not known. */
|
|
56462
|
+
childLock: boolean().nullable(),
|
|
56463
|
+
/** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
|
|
56464
|
+
activeEvents: array(string()),
|
|
56465
|
+
/** Numeric error code when the appliance reports one; null otherwise. */
|
|
56359
56466
|
errorCode: number().nullable(),
|
|
56467
|
+
/** Name of the raised alert-level event while the appliance is in error; null otherwise. */
|
|
56360
56468
|
errorLabel: string().nullable(),
|
|
56469
|
+
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
56361
56470
|
lastFetchedAt: number()
|
|
56362
56471
|
});
|
|
56472
|
+
var DeviceIdSchema = number().int().nonnegative();
|
|
56473
|
+
/** A value a program option or setting can take. */
|
|
56474
|
+
var DishwasherValueSchema = union([
|
|
56475
|
+
boolean(),
|
|
56476
|
+
string(),
|
|
56477
|
+
number()
|
|
56478
|
+
]);
|
|
56479
|
+
var DishwasherAccessSchema = _enum([
|
|
56480
|
+
"none",
|
|
56481
|
+
"read",
|
|
56482
|
+
"readWrite",
|
|
56483
|
+
"writeOnly",
|
|
56484
|
+
"readStatic"
|
|
56485
|
+
]);
|
|
56486
|
+
/**
|
|
56487
|
+
* One option or setting the appliance declares, with the constraints its description
|
|
56488
|
+
* gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
|
|
56489
|
+
*/
|
|
56490
|
+
var DishwasherOptionDescriptorSchema = object({
|
|
56491
|
+
/** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
|
|
56492
|
+
key: string(),
|
|
56493
|
+
/** Last segment of the key, for display. */
|
|
56494
|
+
name: string(),
|
|
56495
|
+
type: _enum([
|
|
56496
|
+
"boolean",
|
|
56497
|
+
"number",
|
|
56498
|
+
"enum",
|
|
56499
|
+
"string"
|
|
56500
|
+
]),
|
|
56501
|
+
access: DishwasherAccessSchema,
|
|
56502
|
+
/** The appliance reports this entity as currently available. */
|
|
56503
|
+
available: boolean(),
|
|
56504
|
+
/** Unit the description declares for a number; null when it declares none. */
|
|
56505
|
+
unit: string().nullable(),
|
|
56506
|
+
min: number().nullable(),
|
|
56507
|
+
max: number().nullable(),
|
|
56508
|
+
step: number().nullable(),
|
|
56509
|
+
/** Allowed members of an enum; null for other types. */
|
|
56510
|
+
enumValues: array(string()).nullable(),
|
|
56511
|
+
defaultValue: DishwasherValueSchema.nullable()
|
|
56512
|
+
});
|
|
56513
|
+
var DishwasherProgramSchema = object({
|
|
56514
|
+
/** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
|
|
56515
|
+
key: string(),
|
|
56516
|
+
name: string(),
|
|
56517
|
+
/** The appliance currently offers this program. */
|
|
56518
|
+
available: boolean(),
|
|
56519
|
+
/** The options this program lists, with the program-level access / availability / default. */
|
|
56520
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
56521
|
+
});
|
|
56522
|
+
var DishwasherOptionsSchema = object({
|
|
56523
|
+
availability: DishwasherAvailabilitySchema,
|
|
56524
|
+
/** What the appliance can be told to do, from the commands its description declares. */
|
|
56525
|
+
supportsStart: boolean(),
|
|
56526
|
+
supportsPause: boolean(),
|
|
56527
|
+
supportsResume: boolean(),
|
|
56528
|
+
supportsStop: boolean(),
|
|
56529
|
+
supportsPower: boolean(),
|
|
56530
|
+
/** Every program the description lists, with its options. */
|
|
56531
|
+
programs: array(DishwasherProgramSchema),
|
|
56532
|
+
/** Every option and setting entity the description lists (programs reference these by key). */
|
|
56533
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
56534
|
+
});
|
|
56363
56535
|
var dishwasherCapability = {
|
|
56364
56536
|
name: "dishwasher",
|
|
56365
56537
|
scope: "device",
|
|
@@ -56367,86 +56539,102 @@ var dishwasherCapability = {
|
|
|
56367
56539
|
mode: "singleton",
|
|
56368
56540
|
deviceTypes: [DeviceType.Dishwasher],
|
|
56369
56541
|
methods: {
|
|
56370
|
-
|
|
56542
|
+
/**
|
|
56543
|
+
* Start a program. Without `program` the selected one starts. `options` are
|
|
56544
|
+
* option feature keys; each is checked against the program's constraints.
|
|
56545
|
+
*/
|
|
56546
|
+
start: method(object({
|
|
56547
|
+
deviceId: DeviceIdSchema,
|
|
56548
|
+
program: string().min(1).optional(),
|
|
56549
|
+
options: record(string(), DishwasherValueSchema).optional()
|
|
56550
|
+
}), _void(), {
|
|
56371
56551
|
kind: "mutation",
|
|
56372
56552
|
auth: "protected"
|
|
56373
56553
|
}),
|
|
56374
|
-
pause: method(object({ deviceId:
|
|
56554
|
+
pause: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
56375
56555
|
kind: "mutation",
|
|
56376
56556
|
auth: "protected"
|
|
56377
56557
|
}),
|
|
56378
|
-
|
|
56558
|
+
resume: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
56559
|
+
kind: "mutation",
|
|
56560
|
+
auth: "protected"
|
|
56561
|
+
}),
|
|
56562
|
+
stop: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
56379
56563
|
kind: "mutation",
|
|
56380
56564
|
auth: "protected"
|
|
56381
56565
|
}),
|
|
56566
|
+
/** Select (not start) a program; refused when the appliance does not offer it. */
|
|
56382
56567
|
setProgram: method(object({
|
|
56383
|
-
deviceId:
|
|
56568
|
+
deviceId: DeviceIdSchema,
|
|
56384
56569
|
program: string().min(1)
|
|
56385
56570
|
}), _void(), {
|
|
56386
56571
|
kind: "mutation",
|
|
56387
56572
|
auth: "protected"
|
|
56388
56573
|
}),
|
|
56389
56574
|
setPower: method(object({
|
|
56390
|
-
deviceId:
|
|
56575
|
+
deviceId: DeviceIdSchema,
|
|
56391
56576
|
on: boolean()
|
|
56392
56577
|
}), _void(), {
|
|
56393
56578
|
kind: "mutation",
|
|
56394
56579
|
auth: "protected"
|
|
56395
56580
|
}),
|
|
56396
56581
|
setHalfLoad: method(object({
|
|
56397
|
-
deviceId:
|
|
56582
|
+
deviceId: DeviceIdSchema,
|
|
56398
56583
|
on: boolean()
|
|
56399
56584
|
}), _void(), {
|
|
56400
56585
|
kind: "mutation",
|
|
56401
56586
|
auth: "protected"
|
|
56402
56587
|
}),
|
|
56403
56588
|
setHygienePlus: method(object({
|
|
56404
|
-
deviceId:
|
|
56589
|
+
deviceId: DeviceIdSchema,
|
|
56405
56590
|
on: boolean()
|
|
56406
56591
|
}), _void(), {
|
|
56407
56592
|
kind: "mutation",
|
|
56408
56593
|
auth: "protected"
|
|
56409
56594
|
}),
|
|
56410
56595
|
setExtraDry: method(object({
|
|
56411
|
-
deviceId:
|
|
56596
|
+
deviceId: DeviceIdSchema,
|
|
56412
56597
|
on: boolean()
|
|
56413
56598
|
}), _void(), {
|
|
56414
56599
|
kind: "mutation",
|
|
56415
56600
|
auth: "protected"
|
|
56416
56601
|
}),
|
|
56417
56602
|
setIntensiveZone: method(object({
|
|
56418
|
-
deviceId:
|
|
56603
|
+
deviceId: DeviceIdSchema,
|
|
56419
56604
|
on: boolean()
|
|
56420
56605
|
}), _void(), {
|
|
56421
56606
|
kind: "mutation",
|
|
56422
56607
|
auth: "protected"
|
|
56423
56608
|
}),
|
|
56424
56609
|
setVarioSpeedPlus: method(object({
|
|
56425
|
-
deviceId:
|
|
56610
|
+
deviceId: DeviceIdSchema,
|
|
56426
56611
|
on: boolean()
|
|
56427
56612
|
}), _void(), {
|
|
56428
56613
|
kind: "mutation",
|
|
56429
56614
|
auth: "protected"
|
|
56430
56615
|
}),
|
|
56431
56616
|
setChildLock: method(object({
|
|
56432
|
-
deviceId:
|
|
56617
|
+
deviceId: DeviceIdSchema,
|
|
56433
56618
|
on: boolean()
|
|
56434
56619
|
}), _void(), {
|
|
56435
56620
|
kind: "mutation",
|
|
56436
56621
|
auth: "protected"
|
|
56437
56622
|
}),
|
|
56623
|
+
/**
|
|
56624
|
+
* Write any option or setting by feature key. Refused when the description does
|
|
56625
|
+
* not list it, it is not writable or not available now, or the value is outside
|
|
56626
|
+
* its declared range / members.
|
|
56627
|
+
*/
|
|
56438
56628
|
setOption: method(object({
|
|
56439
|
-
deviceId:
|
|
56629
|
+
deviceId: DeviceIdSchema,
|
|
56440
56630
|
key: string().min(1),
|
|
56441
|
-
value:
|
|
56442
|
-
boolean(),
|
|
56443
|
-
string(),
|
|
56444
|
-
number()
|
|
56445
|
-
])
|
|
56631
|
+
value: DishwasherValueSchema
|
|
56446
56632
|
}), _void(), {
|
|
56447
56633
|
kind: "mutation",
|
|
56448
56634
|
auth: "protected"
|
|
56449
|
-
})
|
|
56635
|
+
}),
|
|
56636
|
+
/** What this appliance can do, from its own description — the UI is derived from it. */
|
|
56637
|
+
getOptions: method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" })
|
|
56450
56638
|
},
|
|
56451
56639
|
status: {
|
|
56452
56640
|
schema: DishwasherStatusSchema,
|
|
@@ -70395,6 +70583,12 @@ Object.freeze({
|
|
|
70395
70583
|
addonId: null,
|
|
70396
70584
|
access: "view"
|
|
70397
70585
|
},
|
|
70586
|
+
"dishwasher.getOptions": {
|
|
70587
|
+
capName: "dishwasher",
|
|
70588
|
+
capScope: "device",
|
|
70589
|
+
addonId: null,
|
|
70590
|
+
access: "view"
|
|
70591
|
+
},
|
|
70398
70592
|
"dishwasher.getStatus": {
|
|
70399
70593
|
capName: "dishwasher",
|
|
70400
70594
|
capScope: "device",
|
|
@@ -70407,6 +70601,12 @@ Object.freeze({
|
|
|
70407
70601
|
addonId: null,
|
|
70408
70602
|
access: "create"
|
|
70409
70603
|
},
|
|
70604
|
+
"dishwasher.resume": {
|
|
70605
|
+
capName: "dishwasher",
|
|
70606
|
+
capScope: "device",
|
|
70607
|
+
addonId: null,
|
|
70608
|
+
access: "create"
|
|
70609
|
+
},
|
|
70410
70610
|
"dishwasher.setChildLock": {
|
|
70411
70611
|
capName: "dishwasher",
|
|
70412
70612
|
capScope: "device",
|
|
@@ -74907,6 +75107,12 @@ Object.freeze({
|
|
|
74907
75107
|
addonId: null,
|
|
74908
75108
|
access: "view"
|
|
74909
75109
|
},
|
|
75110
|
+
"storageMigration.moverClearance": {
|
|
75111
|
+
capName: "storage-migration",
|
|
75112
|
+
capScope: "system",
|
|
75113
|
+
addonId: null,
|
|
75114
|
+
access: "view"
|
|
75115
|
+
},
|
|
74910
75116
|
"storageMigration.movers": {
|
|
74911
75117
|
capName: "storage-migration",
|
|
74912
75118
|
capScope: "system",
|
|
@@ -77100,6 +77306,11 @@ Object.freeze({
|
|
|
77100
77306
|
form: "single",
|
|
77101
77307
|
optional: false
|
|
77102
77308
|
}],
|
|
77309
|
+
"dishwasher.getOptions": [{
|
|
77310
|
+
name: "deviceId",
|
|
77311
|
+
form: "single",
|
|
77312
|
+
optional: false
|
|
77313
|
+
}],
|
|
77103
77314
|
"dishwasher.getStatus": [{
|
|
77104
77315
|
name: "deviceId",
|
|
77105
77316
|
form: "single",
|
|
@@ -77110,6 +77321,11 @@ Object.freeze({
|
|
|
77110
77321
|
form: "single",
|
|
77111
77322
|
optional: false
|
|
77112
77323
|
}],
|
|
77324
|
+
"dishwasher.resume": [{
|
|
77325
|
+
name: "deviceId",
|
|
77326
|
+
form: "single",
|
|
77327
|
+
optional: false
|
|
77328
|
+
}],
|
|
77113
77329
|
"dishwasher.setChildLock": [{
|
|
77114
77330
|
name: "deviceId",
|
|
77115
77331
|
form: "single",
|
|
@@ -79196,6 +79412,9 @@ new Map(Object.entries({
|
|
|
79196
79412
|
"wrapper-update-available": "system",
|
|
79197
79413
|
"backup-completed": "system",
|
|
79198
79414
|
"export-completed": "system",
|
|
79415
|
+
"alert-critical": "system",
|
|
79416
|
+
"alert-error": "system",
|
|
79417
|
+
"alert-critical-resolved": "system",
|
|
79199
79418
|
"storage-location-low": "system",
|
|
79200
79419
|
"storage-location-critical": "system",
|
|
79201
79420
|
"storage-location-ok": "system",
|
|
@@ -79320,6 +79539,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
79320
79539
|
"storage-location-ok"
|
|
79321
79540
|
]
|
|
79322
79541
|
},
|
|
79542
|
+
{
|
|
79543
|
+
id: "alerts",
|
|
79544
|
+
family: "system",
|
|
79545
|
+
label: "Alerts",
|
|
79546
|
+
kinds: [
|
|
79547
|
+
"alert-critical",
|
|
79548
|
+
"alert-error",
|
|
79549
|
+
"alert-critical-resolved"
|
|
79550
|
+
]
|
|
79551
|
+
},
|
|
79323
79552
|
{
|
|
79324
79553
|
id: "alarm",
|
|
79325
79554
|
family: "alarm",
|
|
@@ -79364,6 +79593,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
|
|
|
79364
79593
|
return [[descriptor.kind, field]];
|
|
79365
79594
|
})));
|
|
79366
79595
|
Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
|
|
79596
|
+
object({
|
|
79597
|
+
phase: _enum(["raised", "resolved"]),
|
|
79598
|
+
episodeId: string().min(1),
|
|
79599
|
+
alertId: string().min(1),
|
|
79600
|
+
severity: AlertSeveritySchema,
|
|
79601
|
+
category: string(),
|
|
79602
|
+
title: string(),
|
|
79603
|
+
message: string(),
|
|
79604
|
+
sourceType: string().optional(),
|
|
79605
|
+
sourceId: string().optional(),
|
|
79606
|
+
nodeId: string().optional(),
|
|
79607
|
+
/** The alert's own action link (where the operator acts on it), when it has one. */
|
|
79608
|
+
actionUrl: string().optional(),
|
|
79609
|
+
at: number()
|
|
79610
|
+
});
|
|
79367
79611
|
var RULE_BODY_ONLY = ["body"];
|
|
79368
79612
|
var RULE_TEXT = ["title", "body"];
|
|
79369
79613
|
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
@@ -79373,6 +79617,11 @@ var TANK = [
|
|
|
79373
79617
|
"device-tank-full",
|
|
79374
79618
|
"device-tank-normal"
|
|
79375
79619
|
];
|
|
79620
|
+
var ALERT_EPISODE = [
|
|
79621
|
+
"alert-critical",
|
|
79622
|
+
"alert-error",
|
|
79623
|
+
"alert-critical-resolved"
|
|
79624
|
+
];
|
|
79376
79625
|
var UPDATES = [
|
|
79377
79626
|
"addon-update-available",
|
|
79378
79627
|
"server-update-available",
|
|
@@ -79565,14 +79814,14 @@ var STATE_SUMMARY_VARS = [
|
|
|
79565
79814
|
([...RULE_TEXT], [...CONSUMABLE]),
|
|
79566
79815
|
([...RULE_TEXT], [...TANK]),
|
|
79567
79816
|
[...RULE_TEXT],
|
|
79568
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
79569
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
79570
|
-
[...RULE_TEXT],
|
|
79817
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
79818
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
79571
79819
|
[...RULE_TEXT],
|
|
79572
79820
|
[...RULE_TEXT],
|
|
79573
79821
|
[...RULE_TEXT],
|
|
79574
79822
|
[...RULE_TEXT],
|
|
79575
79823
|
[...RULE_TEXT],
|
|
79824
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
79576
79825
|
[...RULE_TEXT],
|
|
79577
79826
|
[...RULE_TEXT],
|
|
79578
79827
|
[...RULE_TEXT],
|
|
@@ -79590,7 +79839,11 @@ var STATE_SUMMARY_VARS = [
|
|
|
79590
79839
|
[...RULE_TEXT],
|
|
79591
79840
|
[...RULE_TEXT],
|
|
79592
79841
|
[...RULE_TEXT],
|
|
79593
|
-
[...RULE_TEXT],
|
|
79842
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
79843
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
79844
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
79845
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
79846
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
79594
79847
|
[...RULE_TEXT],
|
|
79595
79848
|
[...RULE_TEXT],
|
|
79596
79849
|
[...RULE_TEXT],
|