@camstack/addon-matter-broker 0.2.129 → 0.2.131
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +493 -240
- package/dist/addon.mjs +493 -240
- package/package.json +1 -1
package/dist/addon.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import { networkInterfaces, tmpdir, uptime } from "node:os";
|
|
|
11
11
|
import { finished } from "node:stream/promises";
|
|
12
12
|
import { createConnection, createServer as createServer$2 } from "node:net";
|
|
13
13
|
import * as dgram from "node:dgram";
|
|
14
|
-
//#region ../types/dist/event-category-
|
|
14
|
+
//#region ../types/dist/event-category-DOl51-Ij.mjs
|
|
15
15
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
16
16
|
EventCategory["SystemBoot"] = "system.boot";
|
|
17
17
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -90,9 +90,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
90
90
|
/**
|
|
91
91
|
* The node's one-shot runner boot check (D877): planned runners against the
|
|
92
92
|
* process service, `degraded` when any is failed, refused or missing. The
|
|
93
|
-
* alert centre turns it into one
|
|
93
|
+
* alert centre turns it into one critical alert.
|
|
94
94
|
*/
|
|
95
95
|
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
96
|
+
/**
|
|
97
|
+
* An alert EPISODE opened or closed, emitted by the alert centre for alerts
|
|
98
|
+
* of severity `critical` or `error` (`AlertEpisodePayload`). The alert
|
|
99
|
+
* centre sends no notification of its own: Notification Center turns this
|
|
100
|
+
* into the `alert-critical` / `alert-error` / `alert-critical-resolved`
|
|
101
|
+
* system-event kinds, and reconciles from the alerts store because a bus
|
|
102
|
+
* event may be dropped (D8, D11).
|
|
103
|
+
*/
|
|
104
|
+
EventCategory["AlertEpisode"] = "alert.episode";
|
|
96
105
|
EventCategory["AddonError"] = "addon.error";
|
|
97
106
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
98
107
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -5550,7 +5559,7 @@ var ZodIssueCode = {
|
|
|
5550
5559
|
var ZodFirstPartyTypeKind;
|
|
5551
5560
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5552
5561
|
//#endregion
|
|
5553
|
-
//#region ../types/dist/sleep-
|
|
5562
|
+
//#region ../types/dist/sleep-BxjU_fJM.mjs
|
|
5554
5563
|
/**
|
|
5555
5564
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5556
5565
|
* window to float samples (D455).
|
|
@@ -7932,6 +7941,12 @@ function normalizeAddonInitResult(result) {
|
|
|
7932
7941
|
if (Array.isArray(result)) return { providers: result };
|
|
7933
7942
|
return result;
|
|
7934
7943
|
}
|
|
7944
|
+
/**
|
|
7945
|
+
* The share-view scope kinds a `csv_*` share token can carry. The hub mints
|
|
7946
|
+
* and validates them (`share-token.service.ts` builds its enum from this
|
|
7947
|
+
* list); a data plane names the kinds it ACCEPTS in `share`.
|
|
7948
|
+
*/
|
|
7949
|
+
var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
|
|
7935
7950
|
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
7936
7951
|
var PeerBytesTicketSchema = object({
|
|
7937
7952
|
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
@@ -12797,6 +12812,229 @@ var ConvertResultSchema = object({
|
|
|
12797
12812
|
files: array(string$2()).readonly()
|
|
12798
12813
|
})).readonly()
|
|
12799
12814
|
});
|
|
12815
|
+
/**
|
|
12816
|
+
* Zod schemas for persisted record types.
|
|
12817
|
+
*
|
|
12818
|
+
* These schemas serve as the single source of truth for types that are
|
|
12819
|
+
* stored in the settings-store backend and retrieved via tRPC. They
|
|
12820
|
+
* replace the manual TypeScript interfaces with schema-derived types,
|
|
12821
|
+
* enabling runtime validation when reading from the backend.
|
|
12822
|
+
*
|
|
12823
|
+
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
12824
|
+
* keeps the original name for backward compatibility.
|
|
12825
|
+
*/
|
|
12826
|
+
/**
|
|
12827
|
+
* Auth model (v2 — 2026-05-12 caps-only):
|
|
12828
|
+
*
|
|
12829
|
+
* Two principals:
|
|
12830
|
+
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
12831
|
+
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
12832
|
+
*
|
|
12833
|
+
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
12834
|
+
* `super_admin` — collapsed onto the single boolean because every
|
|
12835
|
+
* non-admin caller is governed by the same scope-check rules; the
|
|
12836
|
+
* distinction was only ever used to route role-specific procedures
|
|
12837
|
+
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
12838
|
+
* with `isAdmin: false` + an explicit scope list.
|
|
12839
|
+
*/
|
|
12840
|
+
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
12841
|
+
var MethodAccessSchema = _enum([
|
|
12842
|
+
"view",
|
|
12843
|
+
"create",
|
|
12844
|
+
"delete"
|
|
12845
|
+
]);
|
|
12846
|
+
/**
|
|
12847
|
+
* A single scope grant. Three forms — checked in matcher with OR
|
|
12848
|
+
* semantics; the first match decides whether the call passes:
|
|
12849
|
+
*
|
|
12850
|
+
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
12851
|
+
* cap with the matching `scope` declaration. New caps inherit grants
|
|
12852
|
+
* automatically — adding a device cap to the codebase makes it
|
|
12853
|
+
* reachable to every user with `category:device [...]` without a
|
|
12854
|
+
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
12855
|
+
*
|
|
12856
|
+
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
12857
|
+
* useful when an integration needs to interact with one specific
|
|
12858
|
+
* addon's surface regardless of how many caps it exports.
|
|
12859
|
+
*
|
|
12860
|
+
* - `capability` — the most precise form. Single cap name. Use for
|
|
12861
|
+
* integration tokens where you want to grant `addons.installPackage`
|
|
12862
|
+
* and nothing else.
|
|
12863
|
+
*
|
|
12864
|
+
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
12865
|
+
* "give me everything" escape; there is no wildcard scope.
|
|
12866
|
+
*/
|
|
12867
|
+
var AllowedProviderSchema = union([literal("*"), array(string$2())]);
|
|
12868
|
+
var AllowedDevicesSchema = record(string$2(), union([literal("*"), array(string$2())]));
|
|
12869
|
+
var CapScopeSchema = _enum(["device", "system"]);
|
|
12870
|
+
/**
|
|
12871
|
+
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
12872
|
+
*
|
|
12873
|
+
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
12874
|
+
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
12875
|
+
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
12876
|
+
* AFTER the grant was minted — no re-grant, no re-login.
|
|
12877
|
+
*
|
|
12878
|
+
* - `all` — every device in the deployment. The broad viewer/operator
|
|
12879
|
+
* lever without a `category` grant (a `category` grant also covers device
|
|
12880
|
+
* caps that carry no deviceId; `all` is specifically the device set).
|
|
12881
|
+
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
12882
|
+
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
12883
|
+
* is NOT covered until the grant is edited.
|
|
12884
|
+
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
12885
|
+
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
12886
|
+
* re-resolves on the next request.
|
|
12887
|
+
* - `locations` — every device whose operator-assigned `location` label is
|
|
12888
|
+
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
12889
|
+
* null/unset location matches NO `locations` selector.
|
|
12890
|
+
*/
|
|
12891
|
+
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
12892
|
+
object({ kind: literal("all") }),
|
|
12893
|
+
object({
|
|
12894
|
+
kind: literal("ids"),
|
|
12895
|
+
ids: array(number().int()).min(1)
|
|
12896
|
+
}),
|
|
12897
|
+
object({
|
|
12898
|
+
kind: literal("types"),
|
|
12899
|
+
types: array(_enum(DeviceType)).min(1)
|
|
12900
|
+
}),
|
|
12901
|
+
object({
|
|
12902
|
+
kind: literal("locations"),
|
|
12903
|
+
locations: array(string$2().min(1)).min(1)
|
|
12904
|
+
})
|
|
12905
|
+
]);
|
|
12906
|
+
var DeviceTokenScopeSchema = object({
|
|
12907
|
+
type: literal("device"),
|
|
12908
|
+
/** The device SET this grant covers — resolved against the live fleet. */
|
|
12909
|
+
selector: DeviceSelectorSchema,
|
|
12910
|
+
access: array(MethodAccessSchema).min(1),
|
|
12911
|
+
/**
|
|
12912
|
+
* Whether a grant on a PARENT device transparently covers its accessory
|
|
12913
|
+
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
12914
|
+
* Direction is parent → children ONLY.
|
|
12915
|
+
*
|
|
12916
|
+
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
12917
|
+
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
12918
|
+
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
12919
|
+
* operator must grant on the child, not inherit from the parent). Set it
|
|
12920
|
+
* explicitly to override that default per grant.
|
|
12921
|
+
*/
|
|
12922
|
+
includeLinked: boolean().optional()
|
|
12923
|
+
});
|
|
12924
|
+
/**
|
|
12925
|
+
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
12926
|
+
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
12927
|
+
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
12928
|
+
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
12929
|
+
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
12930
|
+
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
12931
|
+
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
12932
|
+
* migration covers both without a flag day. No cast — the raw object is read
|
|
12933
|
+
* through `Reflect.get` (its static type is `unknown`).
|
|
12934
|
+
*/
|
|
12935
|
+
function migrateLegacyTokenScope(raw) {
|
|
12936
|
+
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
12937
|
+
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
12938
|
+
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
12939
|
+
const targets = Reflect.get(raw, "targets");
|
|
12940
|
+
if (!Array.isArray(targets)) return raw;
|
|
12941
|
+
return {
|
|
12942
|
+
type: "device",
|
|
12943
|
+
selector: {
|
|
12944
|
+
kind: "ids",
|
|
12945
|
+
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
12946
|
+
},
|
|
12947
|
+
access: Reflect.get(raw, "access")
|
|
12948
|
+
};
|
|
12949
|
+
}
|
|
12950
|
+
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
12951
|
+
object({
|
|
12952
|
+
type: literal("category"),
|
|
12953
|
+
target: CapScopeSchema,
|
|
12954
|
+
access: array(MethodAccessSchema).min(1)
|
|
12955
|
+
}),
|
|
12956
|
+
object({
|
|
12957
|
+
type: literal("capability"),
|
|
12958
|
+
target: string$2(),
|
|
12959
|
+
access: array(MethodAccessSchema).min(1)
|
|
12960
|
+
}),
|
|
12961
|
+
object({
|
|
12962
|
+
type: literal("addon"),
|
|
12963
|
+
target: string$2(),
|
|
12964
|
+
access: array(MethodAccessSchema).min(1)
|
|
12965
|
+
}),
|
|
12966
|
+
DeviceTokenScopeSchema
|
|
12967
|
+
]));
|
|
12968
|
+
object({
|
|
12969
|
+
id: string$2(),
|
|
12970
|
+
username: string$2(),
|
|
12971
|
+
passwordHash: string$2(),
|
|
12972
|
+
/**
|
|
12973
|
+
* Admin bypass. When true, the middleware skips the scope-access
|
|
12974
|
+
* check entirely. There is no other axis of privilege; the legacy
|
|
12975
|
+
* role enum collapsed onto this boolean in v2.
|
|
12976
|
+
*/
|
|
12977
|
+
isAdmin: boolean().default(false),
|
|
12978
|
+
allowedProviders: AllowedProviderSchema,
|
|
12979
|
+
allowedDevices: AllowedDevicesSchema,
|
|
12980
|
+
/**
|
|
12981
|
+
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
12982
|
+
* ignored. Non-admins without scopes are locked out of every
|
|
12983
|
+
* protected call.
|
|
12984
|
+
*/
|
|
12985
|
+
scopes: array(TokenScopeSchema).default([]),
|
|
12986
|
+
createdAt: number(),
|
|
12987
|
+
updatedAt: number()
|
|
12988
|
+
});
|
|
12989
|
+
object({
|
|
12990
|
+
id: string$2(),
|
|
12991
|
+
label: string$2(),
|
|
12992
|
+
isAdmin: boolean().default(false),
|
|
12993
|
+
allowedProviders: AllowedProviderSchema,
|
|
12994
|
+
allowedDevices: AllowedDevicesSchema,
|
|
12995
|
+
tokenHash: string$2(),
|
|
12996
|
+
tokenPrefix: string$2(),
|
|
12997
|
+
createdAt: number(),
|
|
12998
|
+
lastUsedAt: number().optional()
|
|
12999
|
+
});
|
|
13000
|
+
object({
|
|
13001
|
+
id: string$2(),
|
|
13002
|
+
userId: string$2(),
|
|
13003
|
+
name: string$2(),
|
|
13004
|
+
tokenHash: string$2(),
|
|
13005
|
+
tokenPrefix: string$2(),
|
|
13006
|
+
scopes: array(TokenScopeSchema),
|
|
13007
|
+
expiresAt: number().nullish(),
|
|
13008
|
+
lastUsedAt: number().nullish(),
|
|
13009
|
+
createdAt: number()
|
|
13010
|
+
});
|
|
13011
|
+
/** What a share-view grant lets its holder see. */
|
|
13012
|
+
var ShareViewGrantSchema = object({
|
|
13013
|
+
kind: _enum(SHARE_VIEW_KINDS),
|
|
13014
|
+
deviceIds: array(number().int().nonnegative()).min(1).max(64),
|
|
13015
|
+
/** Talk-back, opt-in at mint time; absent means off. */
|
|
13016
|
+
talk: boolean().optional()
|
|
13017
|
+
});
|
|
13018
|
+
var ShareViewScopeSchema = object({
|
|
13019
|
+
type: literal("share-view"),
|
|
13020
|
+
grant: ShareViewGrantSchema
|
|
13021
|
+
});
|
|
13022
|
+
var AddonRoutesScopeSchema = object({
|
|
13023
|
+
type: literal("addon-routes"),
|
|
13024
|
+
access: array(MethodAccessSchema).min(1)
|
|
13025
|
+
});
|
|
13026
|
+
var CredentialScopeSchema = union([
|
|
13027
|
+
literal("*"),
|
|
13028
|
+
ShareViewScopeSchema,
|
|
13029
|
+
AddonRoutesScopeSchema,
|
|
13030
|
+
TokenScopeSchema
|
|
13031
|
+
]);
|
|
13032
|
+
object({
|
|
13033
|
+
kind: literal("credential"),
|
|
13034
|
+
sub: string$2().min(1),
|
|
13035
|
+
jti: string$2().min(16),
|
|
13036
|
+
scopes: array(CredentialScopeSchema).min(1)
|
|
13037
|
+
});
|
|
12800
13038
|
_enum(["new-session", "step-up"]);
|
|
12801
13039
|
/** The languages the hub's app landing pages are written in (D858). */
|
|
12802
13040
|
var AppPageLangSchema = _enum(["en", "it"]);
|
|
@@ -13513,7 +13751,14 @@ var AlertSeveritySchema = _enum([
|
|
|
13513
13751
|
]);
|
|
13514
13752
|
var AlertActionSchema = object({
|
|
13515
13753
|
label: string$2(),
|
|
13516
|
-
href: string$2().optional()
|
|
13754
|
+
href: string$2().optional(),
|
|
13755
|
+
/**
|
|
13756
|
+
* How `href` is followed. Absent / `app`: an admin-ui route (client-side).
|
|
13757
|
+
* `server`: a route the HUB serves (an addon HTTP route such as an OAuth
|
|
13758
|
+
* start) — the browser must leave the SPA with a full navigation, because
|
|
13759
|
+
* the SPA has no such route and would bounce to the home page.
|
|
13760
|
+
*/
|
|
13761
|
+
navigation: _enum(["app", "server"]).optional()
|
|
13517
13762
|
});
|
|
13518
13763
|
var AlertStatusSchema = _enum([
|
|
13519
13764
|
"active",
|
|
@@ -42295,6 +42540,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
42295
42540
|
"server-updated",
|
|
42296
42541
|
"export-completed",
|
|
42297
42542
|
"backup-completed",
|
|
42543
|
+
"alert-critical",
|
|
42544
|
+
"alert-error",
|
|
42545
|
+
"alert-critical-resolved",
|
|
42298
42546
|
"camera-online",
|
|
42299
42547
|
"camera-offline",
|
|
42300
42548
|
"camera-disabled",
|
|
@@ -44330,202 +44578,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
44330
44578
|
auth: "admin"
|
|
44331
44579
|
}), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
|
|
44332
44580
|
/**
|
|
44333
|
-
* Zod schemas for persisted record types.
|
|
44334
|
-
*
|
|
44335
|
-
* These schemas serve as the single source of truth for types that are
|
|
44336
|
-
* stored in the settings-store backend and retrieved via tRPC. They
|
|
44337
|
-
* replace the manual TypeScript interfaces with schema-derived types,
|
|
44338
|
-
* enabling runtime validation when reading from the backend.
|
|
44339
|
-
*
|
|
44340
|
-
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
44341
|
-
* keeps the original name for backward compatibility.
|
|
44342
|
-
*/
|
|
44343
|
-
/**
|
|
44344
|
-
* Auth model (v2 — 2026-05-12 caps-only):
|
|
44345
|
-
*
|
|
44346
|
-
* Two principals:
|
|
44347
|
-
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
44348
|
-
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
44349
|
-
*
|
|
44350
|
-
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
44351
|
-
* `super_admin` — collapsed onto the single boolean because every
|
|
44352
|
-
* non-admin caller is governed by the same scope-check rules; the
|
|
44353
|
-
* distinction was only ever used to route role-specific procedures
|
|
44354
|
-
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
44355
|
-
* with `isAdmin: false` + an explicit scope list.
|
|
44356
|
-
*/
|
|
44357
|
-
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
44358
|
-
var MethodAccessSchema = _enum([
|
|
44359
|
-
"view",
|
|
44360
|
-
"create",
|
|
44361
|
-
"delete"
|
|
44362
|
-
]);
|
|
44363
|
-
/**
|
|
44364
|
-
* A single scope grant. Three forms — checked in matcher with OR
|
|
44365
|
-
* semantics; the first match decides whether the call passes:
|
|
44366
|
-
*
|
|
44367
|
-
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
44368
|
-
* cap with the matching `scope` declaration. New caps inherit grants
|
|
44369
|
-
* automatically — adding a device cap to the codebase makes it
|
|
44370
|
-
* reachable to every user with `category:device [...]` without a
|
|
44371
|
-
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
44372
|
-
*
|
|
44373
|
-
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
44374
|
-
* useful when an integration needs to interact with one specific
|
|
44375
|
-
* addon's surface regardless of how many caps it exports.
|
|
44376
|
-
*
|
|
44377
|
-
* - `capability` — the most precise form. Single cap name. Use for
|
|
44378
|
-
* integration tokens where you want to grant `addons.installPackage`
|
|
44379
|
-
* and nothing else.
|
|
44380
|
-
*
|
|
44381
|
-
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
44382
|
-
* "give me everything" escape; there is no wildcard scope.
|
|
44383
|
-
*/
|
|
44384
|
-
var AllowedProviderSchema = union([literal("*"), array(string$2())]);
|
|
44385
|
-
var AllowedDevicesSchema = record(string$2(), union([literal("*"), array(string$2())]));
|
|
44386
|
-
var CapScopeSchema = _enum(["device", "system"]);
|
|
44387
|
-
/**
|
|
44388
|
-
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
44389
|
-
*
|
|
44390
|
-
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
44391
|
-
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
44392
|
-
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
44393
|
-
* AFTER the grant was minted — no re-grant, no re-login.
|
|
44394
|
-
*
|
|
44395
|
-
* - `all` — every device in the deployment. The broad viewer/operator
|
|
44396
|
-
* lever without a `category` grant (a `category` grant also covers device
|
|
44397
|
-
* caps that carry no deviceId; `all` is specifically the device set).
|
|
44398
|
-
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
44399
|
-
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
44400
|
-
* is NOT covered until the grant is edited.
|
|
44401
|
-
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
44402
|
-
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
44403
|
-
* re-resolves on the next request.
|
|
44404
|
-
* - `locations` — every device whose operator-assigned `location` label is
|
|
44405
|
-
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
44406
|
-
* null/unset location matches NO `locations` selector.
|
|
44407
|
-
*/
|
|
44408
|
-
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
44409
|
-
object({ kind: literal("all") }),
|
|
44410
|
-
object({
|
|
44411
|
-
kind: literal("ids"),
|
|
44412
|
-
ids: array(number().int()).min(1)
|
|
44413
|
-
}),
|
|
44414
|
-
object({
|
|
44415
|
-
kind: literal("types"),
|
|
44416
|
-
types: array(_enum(DeviceType)).min(1)
|
|
44417
|
-
}),
|
|
44418
|
-
object({
|
|
44419
|
-
kind: literal("locations"),
|
|
44420
|
-
locations: array(string$2().min(1)).min(1)
|
|
44421
|
-
})
|
|
44422
|
-
]);
|
|
44423
|
-
var DeviceTokenScopeSchema = object({
|
|
44424
|
-
type: literal("device"),
|
|
44425
|
-
/** The device SET this grant covers — resolved against the live fleet. */
|
|
44426
|
-
selector: DeviceSelectorSchema,
|
|
44427
|
-
access: array(MethodAccessSchema).min(1),
|
|
44428
|
-
/**
|
|
44429
|
-
* Whether a grant on a PARENT device transparently covers its accessory
|
|
44430
|
-
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
44431
|
-
* Direction is parent → children ONLY.
|
|
44432
|
-
*
|
|
44433
|
-
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
44434
|
-
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
44435
|
-
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
44436
|
-
* operator must grant on the child, not inherit from the parent). Set it
|
|
44437
|
-
* explicitly to override that default per grant.
|
|
44438
|
-
*/
|
|
44439
|
-
includeLinked: boolean().optional()
|
|
44440
|
-
});
|
|
44441
|
-
/**
|
|
44442
|
-
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
44443
|
-
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
44444
|
-
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
44445
|
-
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
44446
|
-
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
44447
|
-
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
44448
|
-
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
44449
|
-
* migration covers both without a flag day. No cast — the raw object is read
|
|
44450
|
-
* through `Reflect.get` (its static type is `unknown`).
|
|
44451
|
-
*/
|
|
44452
|
-
function migrateLegacyTokenScope(raw) {
|
|
44453
|
-
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
44454
|
-
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
44455
|
-
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
44456
|
-
const targets = Reflect.get(raw, "targets");
|
|
44457
|
-
if (!Array.isArray(targets)) return raw;
|
|
44458
|
-
return {
|
|
44459
|
-
type: "device",
|
|
44460
|
-
selector: {
|
|
44461
|
-
kind: "ids",
|
|
44462
|
-
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
44463
|
-
},
|
|
44464
|
-
access: Reflect.get(raw, "access")
|
|
44465
|
-
};
|
|
44466
|
-
}
|
|
44467
|
-
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
44468
|
-
object({
|
|
44469
|
-
type: literal("category"),
|
|
44470
|
-
target: CapScopeSchema,
|
|
44471
|
-
access: array(MethodAccessSchema).min(1)
|
|
44472
|
-
}),
|
|
44473
|
-
object({
|
|
44474
|
-
type: literal("capability"),
|
|
44475
|
-
target: string$2(),
|
|
44476
|
-
access: array(MethodAccessSchema).min(1)
|
|
44477
|
-
}),
|
|
44478
|
-
object({
|
|
44479
|
-
type: literal("addon"),
|
|
44480
|
-
target: string$2(),
|
|
44481
|
-
access: array(MethodAccessSchema).min(1)
|
|
44482
|
-
}),
|
|
44483
|
-
DeviceTokenScopeSchema
|
|
44484
|
-
]));
|
|
44485
|
-
object({
|
|
44486
|
-
id: string$2(),
|
|
44487
|
-
username: string$2(),
|
|
44488
|
-
passwordHash: string$2(),
|
|
44489
|
-
/**
|
|
44490
|
-
* Admin bypass. When true, the middleware skips the scope-access
|
|
44491
|
-
* check entirely. There is no other axis of privilege; the legacy
|
|
44492
|
-
* role enum collapsed onto this boolean in v2.
|
|
44493
|
-
*/
|
|
44494
|
-
isAdmin: boolean().default(false),
|
|
44495
|
-
allowedProviders: AllowedProviderSchema,
|
|
44496
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44497
|
-
/**
|
|
44498
|
-
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
44499
|
-
* ignored. Non-admins without scopes are locked out of every
|
|
44500
|
-
* protected call.
|
|
44501
|
-
*/
|
|
44502
|
-
scopes: array(TokenScopeSchema).default([]),
|
|
44503
|
-
createdAt: number(),
|
|
44504
|
-
updatedAt: number()
|
|
44505
|
-
});
|
|
44506
|
-
object({
|
|
44507
|
-
id: string$2(),
|
|
44508
|
-
label: string$2(),
|
|
44509
|
-
isAdmin: boolean().default(false),
|
|
44510
|
-
allowedProviders: AllowedProviderSchema,
|
|
44511
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44512
|
-
tokenHash: string$2(),
|
|
44513
|
-
tokenPrefix: string$2(),
|
|
44514
|
-
createdAt: number(),
|
|
44515
|
-
lastUsedAt: number().optional()
|
|
44516
|
-
});
|
|
44517
|
-
object({
|
|
44518
|
-
id: string$2(),
|
|
44519
|
-
userId: string$2(),
|
|
44520
|
-
name: string$2(),
|
|
44521
|
-
tokenHash: string$2(),
|
|
44522
|
-
tokenPrefix: string$2(),
|
|
44523
|
-
scopes: array(TokenScopeSchema),
|
|
44524
|
-
expiresAt: number().nullish(),
|
|
44525
|
-
lastUsedAt: number().nullish(),
|
|
44526
|
-
createdAt: number()
|
|
44527
|
-
});
|
|
44528
|
-
/**
|
|
44529
44581
|
* `oauth-integration` — a collection cap by which an addon declares
|
|
44530
44582
|
* itself a linkable OAuth client of the hub's core `/oauth2/*` server.
|
|
44531
44583
|
* Each provider returns a static descriptor; the core enumerates them
|
|
@@ -51371,7 +51423,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
51371
51423
|
}), method(object({ jobId: string$2().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string$2() }), object({ cancelled: boolean() }), {
|
|
51372
51424
|
kind: "mutation",
|
|
51373
51425
|
auth: "admin"
|
|
51374
|
-
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({
|
|
51426
|
+
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string$2()).readonly() }), object({
|
|
51427
|
+
clear: boolean(),
|
|
51428
|
+
repointLocationId: string$2().optional()
|
|
51429
|
+
}), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string$2() }), {
|
|
51375
51430
|
kind: "mutation",
|
|
51376
51431
|
auth: "admin"
|
|
51377
51432
|
}), method(StorageCleanupInputSchema, object({ jobId: string$2() }), {
|
|
@@ -55644,6 +55699,11 @@ onStatusChanged: { data: object({
|
|
|
55644
55699
|
*
|
|
55645
55700
|
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
55646
55701
|
* provider refreshes the slice on an interval and eagerly after commands.
|
|
55702
|
+
*
|
|
55703
|
+
* UNKNOWN IS NOT OFF. Every field the appliance reports separately is
|
|
55704
|
+
* nullable: `null` means "not known right now" (the appliance has not said,
|
|
55705
|
+
* the link is down, or the description does not carry it) and is never
|
|
55706
|
+
* rendered or exported as `false` / `0`. `availability` says why.
|
|
55647
55707
|
*/
|
|
55648
55708
|
var DishwasherStateSchema = _enum([
|
|
55649
55709
|
"idle",
|
|
@@ -55653,43 +55713,155 @@ var DishwasherStateSchema = _enum([
|
|
|
55653
55713
|
"error",
|
|
55654
55714
|
"unavailable"
|
|
55655
55715
|
]);
|
|
55716
|
+
/**
|
|
55717
|
+
* The appliance's own operation state, uncollapsed. `state` above is the coarse
|
|
55718
|
+
* view for compact surfaces; this is what the appliance said.
|
|
55719
|
+
*/
|
|
55720
|
+
var DishwasherOperationStateSchema = _enum([
|
|
55721
|
+
"Inactive",
|
|
55722
|
+
"Ready",
|
|
55723
|
+
"DelayedStart",
|
|
55724
|
+
"Run",
|
|
55725
|
+
"Pause",
|
|
55726
|
+
"ActionRequired",
|
|
55727
|
+
"Finished",
|
|
55728
|
+
"Error",
|
|
55729
|
+
"Aborting"
|
|
55730
|
+
]);
|
|
55731
|
+
/**
|
|
55732
|
+
* Why fields may be `null`:
|
|
55733
|
+
* - `available` — the link is up and the description is loaded;
|
|
55734
|
+
* - `offline` — the local link is down (values are unknown, not last-known);
|
|
55735
|
+
* - `description-missing` — the link is up but the appliance's description could not
|
|
55736
|
+
* be loaded, so its values cannot be decoded.
|
|
55737
|
+
*/
|
|
55738
|
+
var DishwasherAvailabilitySchema = _enum([
|
|
55739
|
+
"available",
|
|
55740
|
+
"offline",
|
|
55741
|
+
"description-missing"
|
|
55742
|
+
]);
|
|
55656
55743
|
var DishwasherConsumableLevelSchema = _enum([
|
|
55657
55744
|
"ok",
|
|
55658
55745
|
"low",
|
|
55659
55746
|
"empty"
|
|
55660
55747
|
]);
|
|
55661
55748
|
var DishwasherStatusSchema = object({
|
|
55749
|
+
availability: DishwasherAvailabilitySchema,
|
|
55750
|
+
/** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
|
|
55662
55751
|
state: DishwasherStateSchema,
|
|
55663
|
-
/**
|
|
55752
|
+
/** The appliance's operation state as reported; null when not known. */
|
|
55753
|
+
operationState: DishwasherOperationStateSchema.nullable(),
|
|
55754
|
+
/** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
|
|
55664
55755
|
program: string$2().nullable(),
|
|
55665
|
-
/**
|
|
55756
|
+
/** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
|
|
55757
|
+
selectedProgram: string$2().nullable(),
|
|
55758
|
+
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
55666
55759
|
availablePrograms: array(string$2()),
|
|
55667
|
-
/**
|
|
55668
|
-
|
|
55760
|
+
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
55761
|
+
remainingSeconds: number().int().nonnegative().nullable(),
|
|
55762
|
+
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
55763
|
+
delayedStartSeconds: number().int().nonnegative().nullable(),
|
|
55669
55764
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
55670
55765
|
progressPercent: number().min(0).max(100).nullable(),
|
|
55671
|
-
/** True when the door is reported open. */
|
|
55672
|
-
doorOpen: boolean(),
|
|
55673
|
-
/** True when
|
|
55674
|
-
|
|
55675
|
-
/**
|
|
55676
|
-
|
|
55766
|
+
/** True when the door is reported open; null when the door state is not known. */
|
|
55767
|
+
doorOpen: boolean().nullable(),
|
|
55768
|
+
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
55769
|
+
doorLocked: boolean().nullable(),
|
|
55770
|
+
/** True when remote start is allowed (door closed, power on, etc.); null when not known. */
|
|
55771
|
+
remoteStartAllowed: boolean().nullable(),
|
|
55772
|
+
/** True when the appliance accepts remote control now; null when not known. */
|
|
55773
|
+
remoteControlActive: boolean().nullable(),
|
|
55774
|
+
/** True while somebody operates the appliance at its panel; null when not reported. */
|
|
55775
|
+
localControlActive: boolean().nullable(),
|
|
55776
|
+
/** Main power / switched-on state; null when not known. */
|
|
55777
|
+
powerOn: boolean().nullable(),
|
|
55778
|
+
/** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
|
|
55779
|
+
powerState: string$2().nullable(),
|
|
55677
55780
|
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55678
55781
|
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55679
|
-
|
|
55680
|
-
|
|
55782
|
+
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
55783
|
+
halfLoad: boolean().nullable(),
|
|
55784
|
+
hygienePlus: boolean().nullable(),
|
|
55681
55785
|
/** Extra dry option when the appliance exposes it. */
|
|
55682
|
-
extraDry: boolean(),
|
|
55786
|
+
extraDry: boolean().nullable(),
|
|
55683
55787
|
/** Intensive zone (lower basket) when the appliance exposes it. */
|
|
55684
|
-
intensiveZone: boolean(),
|
|
55788
|
+
intensiveZone: boolean().nullable(),
|
|
55685
55789
|
/** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
|
|
55686
|
-
varioSpeedPlus: boolean(),
|
|
55687
|
-
/** Child lock (controls disabled on the appliance). */
|
|
55688
|
-
childLock: boolean(),
|
|
55790
|
+
varioSpeedPlus: boolean().nullable(),
|
|
55791
|
+
/** Child lock (controls disabled on the appliance); null when not known. */
|
|
55792
|
+
childLock: boolean().nullable(),
|
|
55793
|
+
/** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
|
|
55794
|
+
activeEvents: array(string$2()),
|
|
55795
|
+
/** Numeric error code when the appliance reports one; null otherwise. */
|
|
55689
55796
|
errorCode: number().nullable(),
|
|
55797
|
+
/** Name of the raised alert-level event while the appliance is in error; null otherwise. */
|
|
55690
55798
|
errorLabel: string$2().nullable(),
|
|
55799
|
+
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
55691
55800
|
lastFetchedAt: number()
|
|
55692
55801
|
});
|
|
55802
|
+
var DeviceIdSchema = number().int().nonnegative();
|
|
55803
|
+
/** A value a program option or setting can take. */
|
|
55804
|
+
var DishwasherValueSchema = union([
|
|
55805
|
+
boolean(),
|
|
55806
|
+
string$2(),
|
|
55807
|
+
number()
|
|
55808
|
+
]);
|
|
55809
|
+
var DishwasherAccessSchema = _enum([
|
|
55810
|
+
"none",
|
|
55811
|
+
"read",
|
|
55812
|
+
"readWrite",
|
|
55813
|
+
"writeOnly",
|
|
55814
|
+
"readStatic"
|
|
55815
|
+
]);
|
|
55816
|
+
/**
|
|
55817
|
+
* One option or setting the appliance declares, with the constraints its description
|
|
55818
|
+
* gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
|
|
55819
|
+
*/
|
|
55820
|
+
var DishwasherOptionDescriptorSchema = object({
|
|
55821
|
+
/** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
|
|
55822
|
+
key: string$2(),
|
|
55823
|
+
/** Last segment of the key, for display. */
|
|
55824
|
+
name: string$2(),
|
|
55825
|
+
type: _enum([
|
|
55826
|
+
"boolean",
|
|
55827
|
+
"number",
|
|
55828
|
+
"enum",
|
|
55829
|
+
"string"
|
|
55830
|
+
]),
|
|
55831
|
+
access: DishwasherAccessSchema,
|
|
55832
|
+
/** The appliance reports this entity as currently available. */
|
|
55833
|
+
available: boolean(),
|
|
55834
|
+
/** Unit the description declares for a number; null when it declares none. */
|
|
55835
|
+
unit: string$2().nullable(),
|
|
55836
|
+
min: number().nullable(),
|
|
55837
|
+
max: number().nullable(),
|
|
55838
|
+
step: number().nullable(),
|
|
55839
|
+
/** Allowed members of an enum; null for other types. */
|
|
55840
|
+
enumValues: array(string$2()).nullable(),
|
|
55841
|
+
defaultValue: DishwasherValueSchema.nullable()
|
|
55842
|
+
});
|
|
55843
|
+
var DishwasherProgramSchema = object({
|
|
55844
|
+
/** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
|
|
55845
|
+
key: string$2(),
|
|
55846
|
+
name: string$2(),
|
|
55847
|
+
/** The appliance currently offers this program. */
|
|
55848
|
+
available: boolean(),
|
|
55849
|
+
/** The options this program lists, with the program-level access / availability / default. */
|
|
55850
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
55851
|
+
});
|
|
55852
|
+
var DishwasherOptionsSchema = object({
|
|
55853
|
+
availability: DishwasherAvailabilitySchema,
|
|
55854
|
+
/** What the appliance can be told to do, from the commands its description declares. */
|
|
55855
|
+
supportsStart: boolean(),
|
|
55856
|
+
supportsPause: boolean(),
|
|
55857
|
+
supportsResume: boolean(),
|
|
55858
|
+
supportsStop: boolean(),
|
|
55859
|
+
supportsPower: boolean(),
|
|
55860
|
+
/** Every program the description lists, with its options. */
|
|
55861
|
+
programs: array(DishwasherProgramSchema),
|
|
55862
|
+
/** Every option and setting entity the description lists (programs reference these by key). */
|
|
55863
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
55864
|
+
});
|
|
55693
55865
|
var dishwasherCapability = {
|
|
55694
55866
|
name: "dishwasher",
|
|
55695
55867
|
scope: "device",
|
|
@@ -55697,86 +55869,102 @@ var dishwasherCapability = {
|
|
|
55697
55869
|
mode: "singleton",
|
|
55698
55870
|
deviceTypes: [DeviceType.Dishwasher],
|
|
55699
55871
|
methods: {
|
|
55700
|
-
|
|
55872
|
+
/**
|
|
55873
|
+
* Start a program. Without `program` the selected one starts. `options` are
|
|
55874
|
+
* option feature keys; each is checked against the program's constraints.
|
|
55875
|
+
*/
|
|
55876
|
+
start: method(object({
|
|
55877
|
+
deviceId: DeviceIdSchema,
|
|
55878
|
+
program: string$2().min(1).optional(),
|
|
55879
|
+
options: record(string$2(), DishwasherValueSchema).optional()
|
|
55880
|
+
}), _void(), {
|
|
55701
55881
|
kind: "mutation",
|
|
55702
55882
|
auth: "protected"
|
|
55703
55883
|
}),
|
|
55704
|
-
pause: method(object({ deviceId:
|
|
55884
|
+
pause: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55705
55885
|
kind: "mutation",
|
|
55706
55886
|
auth: "protected"
|
|
55707
55887
|
}),
|
|
55708
|
-
|
|
55888
|
+
resume: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55889
|
+
kind: "mutation",
|
|
55890
|
+
auth: "protected"
|
|
55891
|
+
}),
|
|
55892
|
+
stop: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55709
55893
|
kind: "mutation",
|
|
55710
55894
|
auth: "protected"
|
|
55711
55895
|
}),
|
|
55896
|
+
/** Select (not start) a program; refused when the appliance does not offer it. */
|
|
55712
55897
|
setProgram: method(object({
|
|
55713
|
-
deviceId:
|
|
55898
|
+
deviceId: DeviceIdSchema,
|
|
55714
55899
|
program: string$2().min(1)
|
|
55715
55900
|
}), _void(), {
|
|
55716
55901
|
kind: "mutation",
|
|
55717
55902
|
auth: "protected"
|
|
55718
55903
|
}),
|
|
55719
55904
|
setPower: method(object({
|
|
55720
|
-
deviceId:
|
|
55905
|
+
deviceId: DeviceIdSchema,
|
|
55721
55906
|
on: boolean()
|
|
55722
55907
|
}), _void(), {
|
|
55723
55908
|
kind: "mutation",
|
|
55724
55909
|
auth: "protected"
|
|
55725
55910
|
}),
|
|
55726
55911
|
setHalfLoad: method(object({
|
|
55727
|
-
deviceId:
|
|
55912
|
+
deviceId: DeviceIdSchema,
|
|
55728
55913
|
on: boolean()
|
|
55729
55914
|
}), _void(), {
|
|
55730
55915
|
kind: "mutation",
|
|
55731
55916
|
auth: "protected"
|
|
55732
55917
|
}),
|
|
55733
55918
|
setHygienePlus: method(object({
|
|
55734
|
-
deviceId:
|
|
55919
|
+
deviceId: DeviceIdSchema,
|
|
55735
55920
|
on: boolean()
|
|
55736
55921
|
}), _void(), {
|
|
55737
55922
|
kind: "mutation",
|
|
55738
55923
|
auth: "protected"
|
|
55739
55924
|
}),
|
|
55740
55925
|
setExtraDry: method(object({
|
|
55741
|
-
deviceId:
|
|
55926
|
+
deviceId: DeviceIdSchema,
|
|
55742
55927
|
on: boolean()
|
|
55743
55928
|
}), _void(), {
|
|
55744
55929
|
kind: "mutation",
|
|
55745
55930
|
auth: "protected"
|
|
55746
55931
|
}),
|
|
55747
55932
|
setIntensiveZone: method(object({
|
|
55748
|
-
deviceId:
|
|
55933
|
+
deviceId: DeviceIdSchema,
|
|
55749
55934
|
on: boolean()
|
|
55750
55935
|
}), _void(), {
|
|
55751
55936
|
kind: "mutation",
|
|
55752
55937
|
auth: "protected"
|
|
55753
55938
|
}),
|
|
55754
55939
|
setVarioSpeedPlus: method(object({
|
|
55755
|
-
deviceId:
|
|
55940
|
+
deviceId: DeviceIdSchema,
|
|
55756
55941
|
on: boolean()
|
|
55757
55942
|
}), _void(), {
|
|
55758
55943
|
kind: "mutation",
|
|
55759
55944
|
auth: "protected"
|
|
55760
55945
|
}),
|
|
55761
55946
|
setChildLock: method(object({
|
|
55762
|
-
deviceId:
|
|
55947
|
+
deviceId: DeviceIdSchema,
|
|
55763
55948
|
on: boolean()
|
|
55764
55949
|
}), _void(), {
|
|
55765
55950
|
kind: "mutation",
|
|
55766
55951
|
auth: "protected"
|
|
55767
55952
|
}),
|
|
55953
|
+
/**
|
|
55954
|
+
* Write any option or setting by feature key. Refused when the description does
|
|
55955
|
+
* not list it, it is not writable or not available now, or the value is outside
|
|
55956
|
+
* its declared range / members.
|
|
55957
|
+
*/
|
|
55768
55958
|
setOption: method(object({
|
|
55769
|
-
deviceId:
|
|
55959
|
+
deviceId: DeviceIdSchema,
|
|
55770
55960
|
key: string$2().min(1),
|
|
55771
|
-
value:
|
|
55772
|
-
boolean(),
|
|
55773
|
-
string$2(),
|
|
55774
|
-
number()
|
|
55775
|
-
])
|
|
55961
|
+
value: DishwasherValueSchema
|
|
55776
55962
|
}), _void(), {
|
|
55777
55963
|
kind: "mutation",
|
|
55778
55964
|
auth: "protected"
|
|
55779
|
-
})
|
|
55965
|
+
}),
|
|
55966
|
+
/** What this appliance can do, from its own description — the UI is derived from it. */
|
|
55967
|
+
getOptions: method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" })
|
|
55780
55968
|
},
|
|
55781
55969
|
status: {
|
|
55782
55970
|
schema: DishwasherStatusSchema,
|
|
@@ -69725,6 +69913,12 @@ Object.freeze({
|
|
|
69725
69913
|
addonId: null,
|
|
69726
69914
|
access: "view"
|
|
69727
69915
|
},
|
|
69916
|
+
"dishwasher.getOptions": {
|
|
69917
|
+
capName: "dishwasher",
|
|
69918
|
+
capScope: "device",
|
|
69919
|
+
addonId: null,
|
|
69920
|
+
access: "view"
|
|
69921
|
+
},
|
|
69728
69922
|
"dishwasher.getStatus": {
|
|
69729
69923
|
capName: "dishwasher",
|
|
69730
69924
|
capScope: "device",
|
|
@@ -69737,6 +69931,12 @@ Object.freeze({
|
|
|
69737
69931
|
addonId: null,
|
|
69738
69932
|
access: "create"
|
|
69739
69933
|
},
|
|
69934
|
+
"dishwasher.resume": {
|
|
69935
|
+
capName: "dishwasher",
|
|
69936
|
+
capScope: "device",
|
|
69937
|
+
addonId: null,
|
|
69938
|
+
access: "create"
|
|
69939
|
+
},
|
|
69740
69940
|
"dishwasher.setChildLock": {
|
|
69741
69941
|
capName: "dishwasher",
|
|
69742
69942
|
capScope: "device",
|
|
@@ -74237,6 +74437,12 @@ Object.freeze({
|
|
|
74237
74437
|
addonId: null,
|
|
74238
74438
|
access: "view"
|
|
74239
74439
|
},
|
|
74440
|
+
"storageMigration.moverClearance": {
|
|
74441
|
+
capName: "storage-migration",
|
|
74442
|
+
capScope: "system",
|
|
74443
|
+
addonId: null,
|
|
74444
|
+
access: "view"
|
|
74445
|
+
},
|
|
74240
74446
|
"storageMigration.movers": {
|
|
74241
74447
|
capName: "storage-migration",
|
|
74242
74448
|
capScope: "system",
|
|
@@ -76430,6 +76636,11 @@ Object.freeze({
|
|
|
76430
76636
|
form: "single",
|
|
76431
76637
|
optional: false
|
|
76432
76638
|
}],
|
|
76639
|
+
"dishwasher.getOptions": [{
|
|
76640
|
+
name: "deviceId",
|
|
76641
|
+
form: "single",
|
|
76642
|
+
optional: false
|
|
76643
|
+
}],
|
|
76433
76644
|
"dishwasher.getStatus": [{
|
|
76434
76645
|
name: "deviceId",
|
|
76435
76646
|
form: "single",
|
|
@@ -76440,6 +76651,11 @@ Object.freeze({
|
|
|
76440
76651
|
form: "single",
|
|
76441
76652
|
optional: false
|
|
76442
76653
|
}],
|
|
76654
|
+
"dishwasher.resume": [{
|
|
76655
|
+
name: "deviceId",
|
|
76656
|
+
form: "single",
|
|
76657
|
+
optional: false
|
|
76658
|
+
}],
|
|
76443
76659
|
"dishwasher.setChildLock": [{
|
|
76444
76660
|
name: "deviceId",
|
|
76445
76661
|
form: "single",
|
|
@@ -78526,6 +78742,9 @@ new Map(Object.entries({
|
|
|
78526
78742
|
"wrapper-update-available": "system",
|
|
78527
78743
|
"backup-completed": "system",
|
|
78528
78744
|
"export-completed": "system",
|
|
78745
|
+
"alert-critical": "system",
|
|
78746
|
+
"alert-error": "system",
|
|
78747
|
+
"alert-critical-resolved": "system",
|
|
78529
78748
|
"storage-location-low": "system",
|
|
78530
78749
|
"storage-location-critical": "system",
|
|
78531
78750
|
"storage-location-ok": "system",
|
|
@@ -78650,6 +78869,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
78650
78869
|
"storage-location-ok"
|
|
78651
78870
|
]
|
|
78652
78871
|
},
|
|
78872
|
+
{
|
|
78873
|
+
id: "alerts",
|
|
78874
|
+
family: "system",
|
|
78875
|
+
label: "Alerts",
|
|
78876
|
+
kinds: [
|
|
78877
|
+
"alert-critical",
|
|
78878
|
+
"alert-error",
|
|
78879
|
+
"alert-critical-resolved"
|
|
78880
|
+
]
|
|
78881
|
+
},
|
|
78653
78882
|
{
|
|
78654
78883
|
id: "alarm",
|
|
78655
78884
|
family: "alarm",
|
|
@@ -78694,6 +78923,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
|
|
|
78694
78923
|
return [[descriptor.kind, field]];
|
|
78695
78924
|
})));
|
|
78696
78925
|
Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
|
|
78926
|
+
object({
|
|
78927
|
+
phase: _enum(["raised", "resolved"]),
|
|
78928
|
+
episodeId: string$2().min(1),
|
|
78929
|
+
alertId: string$2().min(1),
|
|
78930
|
+
severity: AlertSeveritySchema,
|
|
78931
|
+
category: string$2(),
|
|
78932
|
+
title: string$2(),
|
|
78933
|
+
message: string$2(),
|
|
78934
|
+
sourceType: string$2().optional(),
|
|
78935
|
+
sourceId: string$2().optional(),
|
|
78936
|
+
nodeId: string$2().optional(),
|
|
78937
|
+
/** The alert's own action link (where the operator acts on it), when it has one. */
|
|
78938
|
+
actionUrl: string$2().optional(),
|
|
78939
|
+
at: number()
|
|
78940
|
+
});
|
|
78697
78941
|
var RULE_BODY_ONLY = ["body"];
|
|
78698
78942
|
var RULE_TEXT = ["title", "body"];
|
|
78699
78943
|
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
@@ -78703,6 +78947,11 @@ var TANK = [
|
|
|
78703
78947
|
"device-tank-full",
|
|
78704
78948
|
"device-tank-normal"
|
|
78705
78949
|
];
|
|
78950
|
+
var ALERT_EPISODE = [
|
|
78951
|
+
"alert-critical",
|
|
78952
|
+
"alert-error",
|
|
78953
|
+
"alert-critical-resolved"
|
|
78954
|
+
];
|
|
78706
78955
|
var UPDATES = [
|
|
78707
78956
|
"addon-update-available",
|
|
78708
78957
|
"server-update-available",
|
|
@@ -78895,14 +79144,14 @@ var STATE_SUMMARY_VARS = [
|
|
|
78895
79144
|
([...RULE_TEXT], [...CONSUMABLE]),
|
|
78896
79145
|
([...RULE_TEXT], [...TANK]),
|
|
78897
79146
|
[...RULE_TEXT],
|
|
78898
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
78899
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
78900
|
-
[...RULE_TEXT],
|
|
79147
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
79148
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
78901
79149
|
[...RULE_TEXT],
|
|
78902
79150
|
[...RULE_TEXT],
|
|
78903
79151
|
[...RULE_TEXT],
|
|
78904
79152
|
[...RULE_TEXT],
|
|
78905
79153
|
[...RULE_TEXT],
|
|
79154
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78906
79155
|
[...RULE_TEXT],
|
|
78907
79156
|
[...RULE_TEXT],
|
|
78908
79157
|
[...RULE_TEXT],
|
|
@@ -78920,7 +79169,11 @@ var STATE_SUMMARY_VARS = [
|
|
|
78920
79169
|
[...RULE_TEXT],
|
|
78921
79170
|
[...RULE_TEXT],
|
|
78922
79171
|
[...RULE_TEXT],
|
|
78923
|
-
[...RULE_TEXT],
|
|
79172
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
79173
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
79174
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
79175
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
79176
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78924
79177
|
[...RULE_TEXT],
|
|
78925
79178
|
[...RULE_TEXT],
|
|
78926
79179
|
[...RULE_TEXT],
|