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