@camstack/addon-provider-homematic 1.2.138 → 1.2.140
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
|
@@ -8,7 +8,7 @@ let http = require("http");
|
|
|
8
8
|
let crypto$1 = require("crypto");
|
|
9
9
|
let fs_promises = require("fs/promises");
|
|
10
10
|
let path = require("path");
|
|
11
|
-
//#region ../types/dist/event-category-
|
|
11
|
+
//#region ../types/dist/event-category-DOl51-Ij.mjs
|
|
12
12
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
13
13
|
EventCategory["SystemBoot"] = "system.boot";
|
|
14
14
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -87,9 +87,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
87
87
|
/**
|
|
88
88
|
* The node's one-shot runner boot check (D877): planned runners against the
|
|
89
89
|
* process service, `degraded` when any is failed, refused or missing. The
|
|
90
|
-
* alert centre turns it into one
|
|
90
|
+
* alert centre turns it into one critical alert.
|
|
91
91
|
*/
|
|
92
92
|
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
93
|
+
/**
|
|
94
|
+
* An alert EPISODE opened or closed, emitted by the alert centre for alerts
|
|
95
|
+
* of severity `critical` or `error` (`AlertEpisodePayload`). The alert
|
|
96
|
+
* centre sends no notification of its own: Notification Center turns this
|
|
97
|
+
* into the `alert-critical` / `alert-error` / `alert-critical-resolved`
|
|
98
|
+
* system-event kinds, and reconciles from the alerts store because a bus
|
|
99
|
+
* event may be dropped (D8, D11).
|
|
100
|
+
*/
|
|
101
|
+
EventCategory["AlertEpisode"] = "alert.episode";
|
|
93
102
|
EventCategory["AddonError"] = "addon.error";
|
|
94
103
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
95
104
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -5547,7 +5556,7 @@ var ZodIssueCode = {
|
|
|
5547
5556
|
var ZodFirstPartyTypeKind;
|
|
5548
5557
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5549
5558
|
//#endregion
|
|
5550
|
-
//#region ../types/dist/sleep-
|
|
5559
|
+
//#region ../types/dist/sleep-BxjU_fJM.mjs
|
|
5551
5560
|
/**
|
|
5552
5561
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5553
5562
|
* window to float samples (D455).
|
|
@@ -7929,6 +7938,12 @@ function normalizeAddonInitResult(result) {
|
|
|
7929
7938
|
if (Array.isArray(result)) return { providers: result };
|
|
7930
7939
|
return result;
|
|
7931
7940
|
}
|
|
7941
|
+
/**
|
|
7942
|
+
* The share-view scope kinds a `csv_*` share token can carry. The hub mints
|
|
7943
|
+
* and validates them (`share-token.service.ts` builds its enum from this
|
|
7944
|
+
* list); a data plane names the kinds it ACCEPTS in `share`.
|
|
7945
|
+
*/
|
|
7946
|
+
var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
|
|
7932
7947
|
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
7933
7948
|
var PeerBytesTicketSchema = object({
|
|
7934
7949
|
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
@@ -12794,6 +12809,229 @@ var ConvertResultSchema = object({
|
|
|
12794
12809
|
files: array(string()).readonly()
|
|
12795
12810
|
})).readonly()
|
|
12796
12811
|
});
|
|
12812
|
+
/**
|
|
12813
|
+
* Zod schemas for persisted record types.
|
|
12814
|
+
*
|
|
12815
|
+
* These schemas serve as the single source of truth for types that are
|
|
12816
|
+
* stored in the settings-store backend and retrieved via tRPC. They
|
|
12817
|
+
* replace the manual TypeScript interfaces with schema-derived types,
|
|
12818
|
+
* enabling runtime validation when reading from the backend.
|
|
12819
|
+
*
|
|
12820
|
+
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
12821
|
+
* keeps the original name for backward compatibility.
|
|
12822
|
+
*/
|
|
12823
|
+
/**
|
|
12824
|
+
* Auth model (v2 — 2026-05-12 caps-only):
|
|
12825
|
+
*
|
|
12826
|
+
* Two principals:
|
|
12827
|
+
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
12828
|
+
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
12829
|
+
*
|
|
12830
|
+
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
12831
|
+
* `super_admin` — collapsed onto the single boolean because every
|
|
12832
|
+
* non-admin caller is governed by the same scope-check rules; the
|
|
12833
|
+
* distinction was only ever used to route role-specific procedures
|
|
12834
|
+
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
12835
|
+
* with `isAdmin: false` + an explicit scope list.
|
|
12836
|
+
*/
|
|
12837
|
+
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
12838
|
+
var MethodAccessSchema = _enum([
|
|
12839
|
+
"view",
|
|
12840
|
+
"create",
|
|
12841
|
+
"delete"
|
|
12842
|
+
]);
|
|
12843
|
+
/**
|
|
12844
|
+
* A single scope grant. Three forms — checked in matcher with OR
|
|
12845
|
+
* semantics; the first match decides whether the call passes:
|
|
12846
|
+
*
|
|
12847
|
+
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
12848
|
+
* cap with the matching `scope` declaration. New caps inherit grants
|
|
12849
|
+
* automatically — adding a device cap to the codebase makes it
|
|
12850
|
+
* reachable to every user with `category:device [...]` without a
|
|
12851
|
+
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
12852
|
+
*
|
|
12853
|
+
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
12854
|
+
* useful when an integration needs to interact with one specific
|
|
12855
|
+
* addon's surface regardless of how many caps it exports.
|
|
12856
|
+
*
|
|
12857
|
+
* - `capability` — the most precise form. Single cap name. Use for
|
|
12858
|
+
* integration tokens where you want to grant `addons.installPackage`
|
|
12859
|
+
* and nothing else.
|
|
12860
|
+
*
|
|
12861
|
+
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
12862
|
+
* "give me everything" escape; there is no wildcard scope.
|
|
12863
|
+
*/
|
|
12864
|
+
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
12865
|
+
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
12866
|
+
var CapScopeSchema = _enum(["device", "system"]);
|
|
12867
|
+
/**
|
|
12868
|
+
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
12869
|
+
*
|
|
12870
|
+
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
12871
|
+
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
12872
|
+
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
12873
|
+
* AFTER the grant was minted — no re-grant, no re-login.
|
|
12874
|
+
*
|
|
12875
|
+
* - `all` — every device in the deployment. The broad viewer/operator
|
|
12876
|
+
* lever without a `category` grant (a `category` grant also covers device
|
|
12877
|
+
* caps that carry no deviceId; `all` is specifically the device set).
|
|
12878
|
+
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
12879
|
+
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
12880
|
+
* is NOT covered until the grant is edited.
|
|
12881
|
+
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
12882
|
+
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
12883
|
+
* re-resolves on the next request.
|
|
12884
|
+
* - `locations` — every device whose operator-assigned `location` label is
|
|
12885
|
+
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
12886
|
+
* null/unset location matches NO `locations` selector.
|
|
12887
|
+
*/
|
|
12888
|
+
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
12889
|
+
object({ kind: literal("all") }),
|
|
12890
|
+
object({
|
|
12891
|
+
kind: literal("ids"),
|
|
12892
|
+
ids: array(number().int()).min(1)
|
|
12893
|
+
}),
|
|
12894
|
+
object({
|
|
12895
|
+
kind: literal("types"),
|
|
12896
|
+
types: array(_enum(DeviceType)).min(1)
|
|
12897
|
+
}),
|
|
12898
|
+
object({
|
|
12899
|
+
kind: literal("locations"),
|
|
12900
|
+
locations: array(string().min(1)).min(1)
|
|
12901
|
+
})
|
|
12902
|
+
]);
|
|
12903
|
+
var DeviceTokenScopeSchema = object({
|
|
12904
|
+
type: literal("device"),
|
|
12905
|
+
/** The device SET this grant covers — resolved against the live fleet. */
|
|
12906
|
+
selector: DeviceSelectorSchema,
|
|
12907
|
+
access: array(MethodAccessSchema).min(1),
|
|
12908
|
+
/**
|
|
12909
|
+
* Whether a grant on a PARENT device transparently covers its accessory
|
|
12910
|
+
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
12911
|
+
* Direction is parent → children ONLY.
|
|
12912
|
+
*
|
|
12913
|
+
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
12914
|
+
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
12915
|
+
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
12916
|
+
* operator must grant on the child, not inherit from the parent). Set it
|
|
12917
|
+
* explicitly to override that default per grant.
|
|
12918
|
+
*/
|
|
12919
|
+
includeLinked: boolean().optional()
|
|
12920
|
+
});
|
|
12921
|
+
/**
|
|
12922
|
+
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
12923
|
+
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
12924
|
+
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
12925
|
+
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
12926
|
+
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
12927
|
+
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
12928
|
+
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
12929
|
+
* migration covers both without a flag day. No cast — the raw object is read
|
|
12930
|
+
* through `Reflect.get` (its static type is `unknown`).
|
|
12931
|
+
*/
|
|
12932
|
+
function migrateLegacyTokenScope(raw) {
|
|
12933
|
+
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
12934
|
+
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
12935
|
+
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
12936
|
+
const targets = Reflect.get(raw, "targets");
|
|
12937
|
+
if (!Array.isArray(targets)) return raw;
|
|
12938
|
+
return {
|
|
12939
|
+
type: "device",
|
|
12940
|
+
selector: {
|
|
12941
|
+
kind: "ids",
|
|
12942
|
+
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
12943
|
+
},
|
|
12944
|
+
access: Reflect.get(raw, "access")
|
|
12945
|
+
};
|
|
12946
|
+
}
|
|
12947
|
+
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
12948
|
+
object({
|
|
12949
|
+
type: literal("category"),
|
|
12950
|
+
target: CapScopeSchema,
|
|
12951
|
+
access: array(MethodAccessSchema).min(1)
|
|
12952
|
+
}),
|
|
12953
|
+
object({
|
|
12954
|
+
type: literal("capability"),
|
|
12955
|
+
target: string(),
|
|
12956
|
+
access: array(MethodAccessSchema).min(1)
|
|
12957
|
+
}),
|
|
12958
|
+
object({
|
|
12959
|
+
type: literal("addon"),
|
|
12960
|
+
target: string(),
|
|
12961
|
+
access: array(MethodAccessSchema).min(1)
|
|
12962
|
+
}),
|
|
12963
|
+
DeviceTokenScopeSchema
|
|
12964
|
+
]));
|
|
12965
|
+
object({
|
|
12966
|
+
id: string(),
|
|
12967
|
+
username: string(),
|
|
12968
|
+
passwordHash: string(),
|
|
12969
|
+
/**
|
|
12970
|
+
* Admin bypass. When true, the middleware skips the scope-access
|
|
12971
|
+
* check entirely. There is no other axis of privilege; the legacy
|
|
12972
|
+
* role enum collapsed onto this boolean in v2.
|
|
12973
|
+
*/
|
|
12974
|
+
isAdmin: boolean().default(false),
|
|
12975
|
+
allowedProviders: AllowedProviderSchema,
|
|
12976
|
+
allowedDevices: AllowedDevicesSchema,
|
|
12977
|
+
/**
|
|
12978
|
+
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
12979
|
+
* ignored. Non-admins without scopes are locked out of every
|
|
12980
|
+
* protected call.
|
|
12981
|
+
*/
|
|
12982
|
+
scopes: array(TokenScopeSchema).default([]),
|
|
12983
|
+
createdAt: number(),
|
|
12984
|
+
updatedAt: number()
|
|
12985
|
+
});
|
|
12986
|
+
object({
|
|
12987
|
+
id: string(),
|
|
12988
|
+
label: string(),
|
|
12989
|
+
isAdmin: boolean().default(false),
|
|
12990
|
+
allowedProviders: AllowedProviderSchema,
|
|
12991
|
+
allowedDevices: AllowedDevicesSchema,
|
|
12992
|
+
tokenHash: string(),
|
|
12993
|
+
tokenPrefix: string(),
|
|
12994
|
+
createdAt: number(),
|
|
12995
|
+
lastUsedAt: number().optional()
|
|
12996
|
+
});
|
|
12997
|
+
object({
|
|
12998
|
+
id: string(),
|
|
12999
|
+
userId: string(),
|
|
13000
|
+
name: string(),
|
|
13001
|
+
tokenHash: string(),
|
|
13002
|
+
tokenPrefix: string(),
|
|
13003
|
+
scopes: array(TokenScopeSchema),
|
|
13004
|
+
expiresAt: number().nullish(),
|
|
13005
|
+
lastUsedAt: number().nullish(),
|
|
13006
|
+
createdAt: number()
|
|
13007
|
+
});
|
|
13008
|
+
/** What a share-view grant lets its holder see. */
|
|
13009
|
+
var ShareViewGrantSchema = object({
|
|
13010
|
+
kind: _enum(SHARE_VIEW_KINDS),
|
|
13011
|
+
deviceIds: array(number().int().nonnegative()).min(1).max(64),
|
|
13012
|
+
/** Talk-back, opt-in at mint time; absent means off. */
|
|
13013
|
+
talk: boolean().optional()
|
|
13014
|
+
});
|
|
13015
|
+
var ShareViewScopeSchema = object({
|
|
13016
|
+
type: literal("share-view"),
|
|
13017
|
+
grant: ShareViewGrantSchema
|
|
13018
|
+
});
|
|
13019
|
+
var AddonRoutesScopeSchema = object({
|
|
13020
|
+
type: literal("addon-routes"),
|
|
13021
|
+
access: array(MethodAccessSchema).min(1)
|
|
13022
|
+
});
|
|
13023
|
+
var CredentialScopeSchema = union([
|
|
13024
|
+
literal("*"),
|
|
13025
|
+
ShareViewScopeSchema,
|
|
13026
|
+
AddonRoutesScopeSchema,
|
|
13027
|
+
TokenScopeSchema
|
|
13028
|
+
]);
|
|
13029
|
+
object({
|
|
13030
|
+
kind: literal("credential"),
|
|
13031
|
+
sub: string().min(1),
|
|
13032
|
+
jti: string().min(16),
|
|
13033
|
+
scopes: array(CredentialScopeSchema).min(1)
|
|
13034
|
+
});
|
|
12797
13035
|
_enum(["new-session", "step-up"]);
|
|
12798
13036
|
/** The languages the hub's app landing pages are written in (D858). */
|
|
12799
13037
|
var AppPageLangSchema = _enum(["en", "it"]);
|
|
@@ -13510,7 +13748,14 @@ var AlertSeveritySchema = _enum([
|
|
|
13510
13748
|
]);
|
|
13511
13749
|
var AlertActionSchema = object({
|
|
13512
13750
|
label: string(),
|
|
13513
|
-
href: string().optional()
|
|
13751
|
+
href: string().optional(),
|
|
13752
|
+
/**
|
|
13753
|
+
* How `href` is followed. Absent / `app`: an admin-ui route (client-side).
|
|
13754
|
+
* `server`: a route the HUB serves (an addon HTTP route such as an OAuth
|
|
13755
|
+
* start) — the browser must leave the SPA with a full navigation, because
|
|
13756
|
+
* the SPA has no such route and would bounce to the home page.
|
|
13757
|
+
*/
|
|
13758
|
+
navigation: _enum(["app", "server"]).optional()
|
|
13514
13759
|
});
|
|
13515
13760
|
var AlertStatusSchema = _enum([
|
|
13516
13761
|
"active",
|
|
@@ -42405,6 +42650,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
42405
42650
|
"server-updated",
|
|
42406
42651
|
"export-completed",
|
|
42407
42652
|
"backup-completed",
|
|
42653
|
+
"alert-critical",
|
|
42654
|
+
"alert-error",
|
|
42655
|
+
"alert-critical-resolved",
|
|
42408
42656
|
"camera-online",
|
|
42409
42657
|
"camera-offline",
|
|
42410
42658
|
"camera-disabled",
|
|
@@ -44440,202 +44688,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
44440
44688
|
auth: "admin"
|
|
44441
44689
|
}), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
|
|
44442
44690
|
/**
|
|
44443
|
-
* Zod schemas for persisted record types.
|
|
44444
|
-
*
|
|
44445
|
-
* These schemas serve as the single source of truth for types that are
|
|
44446
|
-
* stored in the settings-store backend and retrieved via tRPC. They
|
|
44447
|
-
* replace the manual TypeScript interfaces with schema-derived types,
|
|
44448
|
-
* enabling runtime validation when reading from the backend.
|
|
44449
|
-
*
|
|
44450
|
-
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
44451
|
-
* keeps the original name for backward compatibility.
|
|
44452
|
-
*/
|
|
44453
|
-
/**
|
|
44454
|
-
* Auth model (v2 — 2026-05-12 caps-only):
|
|
44455
|
-
*
|
|
44456
|
-
* Two principals:
|
|
44457
|
-
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
44458
|
-
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
44459
|
-
*
|
|
44460
|
-
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
44461
|
-
* `super_admin` — collapsed onto the single boolean because every
|
|
44462
|
-
* non-admin caller is governed by the same scope-check rules; the
|
|
44463
|
-
* distinction was only ever used to route role-specific procedures
|
|
44464
|
-
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
44465
|
-
* with `isAdmin: false` + an explicit scope list.
|
|
44466
|
-
*/
|
|
44467
|
-
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
44468
|
-
var MethodAccessSchema = _enum([
|
|
44469
|
-
"view",
|
|
44470
|
-
"create",
|
|
44471
|
-
"delete"
|
|
44472
|
-
]);
|
|
44473
|
-
/**
|
|
44474
|
-
* A single scope grant. Three forms — checked in matcher with OR
|
|
44475
|
-
* semantics; the first match decides whether the call passes:
|
|
44476
|
-
*
|
|
44477
|
-
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
44478
|
-
* cap with the matching `scope` declaration. New caps inherit grants
|
|
44479
|
-
* automatically — adding a device cap to the codebase makes it
|
|
44480
|
-
* reachable to every user with `category:device [...]` without a
|
|
44481
|
-
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
44482
|
-
*
|
|
44483
|
-
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
44484
|
-
* useful when an integration needs to interact with one specific
|
|
44485
|
-
* addon's surface regardless of how many caps it exports.
|
|
44486
|
-
*
|
|
44487
|
-
* - `capability` — the most precise form. Single cap name. Use for
|
|
44488
|
-
* integration tokens where you want to grant `addons.installPackage`
|
|
44489
|
-
* and nothing else.
|
|
44490
|
-
*
|
|
44491
|
-
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
44492
|
-
* "give me everything" escape; there is no wildcard scope.
|
|
44493
|
-
*/
|
|
44494
|
-
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
44495
|
-
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
44496
|
-
var CapScopeSchema = _enum(["device", "system"]);
|
|
44497
|
-
/**
|
|
44498
|
-
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
44499
|
-
*
|
|
44500
|
-
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
44501
|
-
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
44502
|
-
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
44503
|
-
* AFTER the grant was minted — no re-grant, no re-login.
|
|
44504
|
-
*
|
|
44505
|
-
* - `all` — every device in the deployment. The broad viewer/operator
|
|
44506
|
-
* lever without a `category` grant (a `category` grant also covers device
|
|
44507
|
-
* caps that carry no deviceId; `all` is specifically the device set).
|
|
44508
|
-
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
44509
|
-
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
44510
|
-
* is NOT covered until the grant is edited.
|
|
44511
|
-
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
44512
|
-
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
44513
|
-
* re-resolves on the next request.
|
|
44514
|
-
* - `locations` — every device whose operator-assigned `location` label is
|
|
44515
|
-
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
44516
|
-
* null/unset location matches NO `locations` selector.
|
|
44517
|
-
*/
|
|
44518
|
-
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
44519
|
-
object({ kind: literal("all") }),
|
|
44520
|
-
object({
|
|
44521
|
-
kind: literal("ids"),
|
|
44522
|
-
ids: array(number().int()).min(1)
|
|
44523
|
-
}),
|
|
44524
|
-
object({
|
|
44525
|
-
kind: literal("types"),
|
|
44526
|
-
types: array(_enum(DeviceType)).min(1)
|
|
44527
|
-
}),
|
|
44528
|
-
object({
|
|
44529
|
-
kind: literal("locations"),
|
|
44530
|
-
locations: array(string().min(1)).min(1)
|
|
44531
|
-
})
|
|
44532
|
-
]);
|
|
44533
|
-
var DeviceTokenScopeSchema = object({
|
|
44534
|
-
type: literal("device"),
|
|
44535
|
-
/** The device SET this grant covers — resolved against the live fleet. */
|
|
44536
|
-
selector: DeviceSelectorSchema,
|
|
44537
|
-
access: array(MethodAccessSchema).min(1),
|
|
44538
|
-
/**
|
|
44539
|
-
* Whether a grant on a PARENT device transparently covers its accessory
|
|
44540
|
-
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
44541
|
-
* Direction is parent → children ONLY.
|
|
44542
|
-
*
|
|
44543
|
-
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
44544
|
-
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
44545
|
-
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
44546
|
-
* operator must grant on the child, not inherit from the parent). Set it
|
|
44547
|
-
* explicitly to override that default per grant.
|
|
44548
|
-
*/
|
|
44549
|
-
includeLinked: boolean().optional()
|
|
44550
|
-
});
|
|
44551
|
-
/**
|
|
44552
|
-
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
44553
|
-
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
44554
|
-
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
44555
|
-
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
44556
|
-
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
44557
|
-
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
44558
|
-
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
44559
|
-
* migration covers both without a flag day. No cast — the raw object is read
|
|
44560
|
-
* through `Reflect.get` (its static type is `unknown`).
|
|
44561
|
-
*/
|
|
44562
|
-
function migrateLegacyTokenScope(raw) {
|
|
44563
|
-
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
44564
|
-
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
44565
|
-
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
44566
|
-
const targets = Reflect.get(raw, "targets");
|
|
44567
|
-
if (!Array.isArray(targets)) return raw;
|
|
44568
|
-
return {
|
|
44569
|
-
type: "device",
|
|
44570
|
-
selector: {
|
|
44571
|
-
kind: "ids",
|
|
44572
|
-
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
44573
|
-
},
|
|
44574
|
-
access: Reflect.get(raw, "access")
|
|
44575
|
-
};
|
|
44576
|
-
}
|
|
44577
|
-
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
44578
|
-
object({
|
|
44579
|
-
type: literal("category"),
|
|
44580
|
-
target: CapScopeSchema,
|
|
44581
|
-
access: array(MethodAccessSchema).min(1)
|
|
44582
|
-
}),
|
|
44583
|
-
object({
|
|
44584
|
-
type: literal("capability"),
|
|
44585
|
-
target: string(),
|
|
44586
|
-
access: array(MethodAccessSchema).min(1)
|
|
44587
|
-
}),
|
|
44588
|
-
object({
|
|
44589
|
-
type: literal("addon"),
|
|
44590
|
-
target: string(),
|
|
44591
|
-
access: array(MethodAccessSchema).min(1)
|
|
44592
|
-
}),
|
|
44593
|
-
DeviceTokenScopeSchema
|
|
44594
|
-
]));
|
|
44595
|
-
object({
|
|
44596
|
-
id: string(),
|
|
44597
|
-
username: string(),
|
|
44598
|
-
passwordHash: string(),
|
|
44599
|
-
/**
|
|
44600
|
-
* Admin bypass. When true, the middleware skips the scope-access
|
|
44601
|
-
* check entirely. There is no other axis of privilege; the legacy
|
|
44602
|
-
* role enum collapsed onto this boolean in v2.
|
|
44603
|
-
*/
|
|
44604
|
-
isAdmin: boolean().default(false),
|
|
44605
|
-
allowedProviders: AllowedProviderSchema,
|
|
44606
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44607
|
-
/**
|
|
44608
|
-
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
44609
|
-
* ignored. Non-admins without scopes are locked out of every
|
|
44610
|
-
* protected call.
|
|
44611
|
-
*/
|
|
44612
|
-
scopes: array(TokenScopeSchema).default([]),
|
|
44613
|
-
createdAt: number(),
|
|
44614
|
-
updatedAt: number()
|
|
44615
|
-
});
|
|
44616
|
-
object({
|
|
44617
|
-
id: string(),
|
|
44618
|
-
label: string(),
|
|
44619
|
-
isAdmin: boolean().default(false),
|
|
44620
|
-
allowedProviders: AllowedProviderSchema,
|
|
44621
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44622
|
-
tokenHash: string(),
|
|
44623
|
-
tokenPrefix: string(),
|
|
44624
|
-
createdAt: number(),
|
|
44625
|
-
lastUsedAt: number().optional()
|
|
44626
|
-
});
|
|
44627
|
-
object({
|
|
44628
|
-
id: string(),
|
|
44629
|
-
userId: string(),
|
|
44630
|
-
name: string(),
|
|
44631
|
-
tokenHash: string(),
|
|
44632
|
-
tokenPrefix: string(),
|
|
44633
|
-
scopes: array(TokenScopeSchema),
|
|
44634
|
-
expiresAt: number().nullish(),
|
|
44635
|
-
lastUsedAt: number().nullish(),
|
|
44636
|
-
createdAt: number()
|
|
44637
|
-
});
|
|
44638
|
-
/**
|
|
44639
44691
|
* `oauth-integration` — a collection cap by which an addon declares
|
|
44640
44692
|
* itself a linkable OAuth client of the hub's core `/oauth2/*` server.
|
|
44641
44693
|
* Each provider returns a static descriptor; the core enumerates them
|
|
@@ -51481,7 +51533,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
51481
51533
|
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
51482
51534
|
kind: "mutation",
|
|
51483
51535
|
auth: "admin"
|
|
51484
|
-
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({
|
|
51536
|
+
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
|
|
51537
|
+
clear: boolean(),
|
|
51538
|
+
repointLocationId: string().optional()
|
|
51539
|
+
}), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
|
|
51485
51540
|
kind: "mutation",
|
|
51486
51541
|
auth: "admin"
|
|
51487
51542
|
}), method(StorageCleanupInputSchema, object({ jobId: string() }), {
|
|
@@ -55737,6 +55792,11 @@ onStatusChanged: { data: object({
|
|
|
55737
55792
|
*
|
|
55738
55793
|
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
55739
55794
|
* provider refreshes the slice on an interval and eagerly after commands.
|
|
55795
|
+
*
|
|
55796
|
+
* UNKNOWN IS NOT OFF. Every field the appliance reports separately is
|
|
55797
|
+
* nullable: `null` means "not known right now" (the appliance has not said,
|
|
55798
|
+
* the link is down, or the description does not carry it) and is never
|
|
55799
|
+
* rendered or exported as `false` / `0`. `availability` says why.
|
|
55740
55800
|
*/
|
|
55741
55801
|
var DishwasherStateSchema = _enum([
|
|
55742
55802
|
"idle",
|
|
@@ -55746,43 +55806,155 @@ var DishwasherStateSchema = _enum([
|
|
|
55746
55806
|
"error",
|
|
55747
55807
|
"unavailable"
|
|
55748
55808
|
]);
|
|
55809
|
+
/**
|
|
55810
|
+
* The appliance's own operation state, uncollapsed. `state` above is the coarse
|
|
55811
|
+
* view for compact surfaces; this is what the appliance said.
|
|
55812
|
+
*/
|
|
55813
|
+
var DishwasherOperationStateSchema = _enum([
|
|
55814
|
+
"Inactive",
|
|
55815
|
+
"Ready",
|
|
55816
|
+
"DelayedStart",
|
|
55817
|
+
"Run",
|
|
55818
|
+
"Pause",
|
|
55819
|
+
"ActionRequired",
|
|
55820
|
+
"Finished",
|
|
55821
|
+
"Error",
|
|
55822
|
+
"Aborting"
|
|
55823
|
+
]);
|
|
55824
|
+
/**
|
|
55825
|
+
* Why fields may be `null`:
|
|
55826
|
+
* - `available` — the link is up and the description is loaded;
|
|
55827
|
+
* - `offline` — the local link is down (values are unknown, not last-known);
|
|
55828
|
+
* - `description-missing` — the link is up but the appliance's description could not
|
|
55829
|
+
* be loaded, so its values cannot be decoded.
|
|
55830
|
+
*/
|
|
55831
|
+
var DishwasherAvailabilitySchema = _enum([
|
|
55832
|
+
"available",
|
|
55833
|
+
"offline",
|
|
55834
|
+
"description-missing"
|
|
55835
|
+
]);
|
|
55749
55836
|
var DishwasherConsumableLevelSchema = _enum([
|
|
55750
55837
|
"ok",
|
|
55751
55838
|
"low",
|
|
55752
55839
|
"empty"
|
|
55753
55840
|
]);
|
|
55754
55841
|
var DishwasherStatusSchema = object({
|
|
55842
|
+
availability: DishwasherAvailabilitySchema,
|
|
55843
|
+
/** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
|
|
55755
55844
|
state: DishwasherStateSchema,
|
|
55756
|
-
/**
|
|
55845
|
+
/** The appliance's operation state as reported; null when not known. */
|
|
55846
|
+
operationState: DishwasherOperationStateSchema.nullable(),
|
|
55847
|
+
/** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
|
|
55757
55848
|
program: string().nullable(),
|
|
55758
|
-
/**
|
|
55849
|
+
/** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
|
|
55850
|
+
selectedProgram: string().nullable(),
|
|
55851
|
+
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
55759
55852
|
availablePrograms: array(string()),
|
|
55760
|
-
/**
|
|
55761
|
-
|
|
55853
|
+
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
55854
|
+
remainingSeconds: number().int().nonnegative().nullable(),
|
|
55855
|
+
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
55856
|
+
delayedStartSeconds: number().int().nonnegative().nullable(),
|
|
55762
55857
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
55763
55858
|
progressPercent: number().min(0).max(100).nullable(),
|
|
55764
|
-
/** True when the door is reported open. */
|
|
55765
|
-
doorOpen: boolean(),
|
|
55766
|
-
/** True when
|
|
55767
|
-
|
|
55768
|
-
/**
|
|
55769
|
-
|
|
55859
|
+
/** True when the door is reported open; null when the door state is not known. */
|
|
55860
|
+
doorOpen: boolean().nullable(),
|
|
55861
|
+
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
55862
|
+
doorLocked: boolean().nullable(),
|
|
55863
|
+
/** True when remote start is allowed (door closed, power on, etc.); null when not known. */
|
|
55864
|
+
remoteStartAllowed: boolean().nullable(),
|
|
55865
|
+
/** True when the appliance accepts remote control now; null when not known. */
|
|
55866
|
+
remoteControlActive: boolean().nullable(),
|
|
55867
|
+
/** True while somebody operates the appliance at its panel; null when not reported. */
|
|
55868
|
+
localControlActive: boolean().nullable(),
|
|
55869
|
+
/** Main power / switched-on state; null when not known. */
|
|
55870
|
+
powerOn: boolean().nullable(),
|
|
55871
|
+
/** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
|
|
55872
|
+
powerState: string().nullable(),
|
|
55770
55873
|
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55771
55874
|
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55772
|
-
|
|
55773
|
-
|
|
55875
|
+
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
55876
|
+
halfLoad: boolean().nullable(),
|
|
55877
|
+
hygienePlus: boolean().nullable(),
|
|
55774
55878
|
/** Extra dry option when the appliance exposes it. */
|
|
55775
|
-
extraDry: boolean(),
|
|
55879
|
+
extraDry: boolean().nullable(),
|
|
55776
55880
|
/** Intensive zone (lower basket) when the appliance exposes it. */
|
|
55777
|
-
intensiveZone: boolean(),
|
|
55881
|
+
intensiveZone: boolean().nullable(),
|
|
55778
55882
|
/** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
|
|
55779
|
-
varioSpeedPlus: boolean(),
|
|
55780
|
-
/** Child lock (controls disabled on the appliance). */
|
|
55781
|
-
childLock: boolean(),
|
|
55883
|
+
varioSpeedPlus: boolean().nullable(),
|
|
55884
|
+
/** Child lock (controls disabled on the appliance); null when not known. */
|
|
55885
|
+
childLock: boolean().nullable(),
|
|
55886
|
+
/** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
|
|
55887
|
+
activeEvents: array(string()),
|
|
55888
|
+
/** Numeric error code when the appliance reports one; null otherwise. */
|
|
55782
55889
|
errorCode: number().nullable(),
|
|
55890
|
+
/** Name of the raised alert-level event while the appliance is in error; null otherwise. */
|
|
55783
55891
|
errorLabel: string().nullable(),
|
|
55892
|
+
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
55784
55893
|
lastFetchedAt: number()
|
|
55785
55894
|
});
|
|
55895
|
+
var DeviceIdSchema = number().int().nonnegative();
|
|
55896
|
+
/** A value a program option or setting can take. */
|
|
55897
|
+
var DishwasherValueSchema = union([
|
|
55898
|
+
boolean(),
|
|
55899
|
+
string(),
|
|
55900
|
+
number()
|
|
55901
|
+
]);
|
|
55902
|
+
var DishwasherAccessSchema = _enum([
|
|
55903
|
+
"none",
|
|
55904
|
+
"read",
|
|
55905
|
+
"readWrite",
|
|
55906
|
+
"writeOnly",
|
|
55907
|
+
"readStatic"
|
|
55908
|
+
]);
|
|
55909
|
+
/**
|
|
55910
|
+
* One option or setting the appliance declares, with the constraints its description
|
|
55911
|
+
* gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
|
|
55912
|
+
*/
|
|
55913
|
+
var DishwasherOptionDescriptorSchema = object({
|
|
55914
|
+
/** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
|
|
55915
|
+
key: string(),
|
|
55916
|
+
/** Last segment of the key, for display. */
|
|
55917
|
+
name: string(),
|
|
55918
|
+
type: _enum([
|
|
55919
|
+
"boolean",
|
|
55920
|
+
"number",
|
|
55921
|
+
"enum",
|
|
55922
|
+
"string"
|
|
55923
|
+
]),
|
|
55924
|
+
access: DishwasherAccessSchema,
|
|
55925
|
+
/** The appliance reports this entity as currently available. */
|
|
55926
|
+
available: boolean(),
|
|
55927
|
+
/** Unit the description declares for a number; null when it declares none. */
|
|
55928
|
+
unit: string().nullable(),
|
|
55929
|
+
min: number().nullable(),
|
|
55930
|
+
max: number().nullable(),
|
|
55931
|
+
step: number().nullable(),
|
|
55932
|
+
/** Allowed members of an enum; null for other types. */
|
|
55933
|
+
enumValues: array(string()).nullable(),
|
|
55934
|
+
defaultValue: DishwasherValueSchema.nullable()
|
|
55935
|
+
});
|
|
55936
|
+
var DishwasherProgramSchema = object({
|
|
55937
|
+
/** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
|
|
55938
|
+
key: string(),
|
|
55939
|
+
name: string(),
|
|
55940
|
+
/** The appliance currently offers this program. */
|
|
55941
|
+
available: boolean(),
|
|
55942
|
+
/** The options this program lists, with the program-level access / availability / default. */
|
|
55943
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
55944
|
+
});
|
|
55945
|
+
var DishwasherOptionsSchema = object({
|
|
55946
|
+
availability: DishwasherAvailabilitySchema,
|
|
55947
|
+
/** What the appliance can be told to do, from the commands its description declares. */
|
|
55948
|
+
supportsStart: boolean(),
|
|
55949
|
+
supportsPause: boolean(),
|
|
55950
|
+
supportsResume: boolean(),
|
|
55951
|
+
supportsStop: boolean(),
|
|
55952
|
+
supportsPower: boolean(),
|
|
55953
|
+
/** Every program the description lists, with its options. */
|
|
55954
|
+
programs: array(DishwasherProgramSchema),
|
|
55955
|
+
/** Every option and setting entity the description lists (programs reference these by key). */
|
|
55956
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
55957
|
+
});
|
|
55786
55958
|
var dishwasherCapability = {
|
|
55787
55959
|
name: "dishwasher",
|
|
55788
55960
|
scope: "device",
|
|
@@ -55790,86 +55962,102 @@ var dishwasherCapability = {
|
|
|
55790
55962
|
mode: "singleton",
|
|
55791
55963
|
deviceTypes: [DeviceType.Dishwasher],
|
|
55792
55964
|
methods: {
|
|
55793
|
-
|
|
55965
|
+
/**
|
|
55966
|
+
* Start a program. Without `program` the selected one starts. `options` are
|
|
55967
|
+
* option feature keys; each is checked against the program's constraints.
|
|
55968
|
+
*/
|
|
55969
|
+
start: method(object({
|
|
55970
|
+
deviceId: DeviceIdSchema,
|
|
55971
|
+
program: string().min(1).optional(),
|
|
55972
|
+
options: record(string(), DishwasherValueSchema).optional()
|
|
55973
|
+
}), _void(), {
|
|
55794
55974
|
kind: "mutation",
|
|
55795
55975
|
auth: "protected"
|
|
55796
55976
|
}),
|
|
55797
|
-
pause: method(object({ deviceId:
|
|
55977
|
+
pause: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55798
55978
|
kind: "mutation",
|
|
55799
55979
|
auth: "protected"
|
|
55800
55980
|
}),
|
|
55801
|
-
|
|
55981
|
+
resume: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55982
|
+
kind: "mutation",
|
|
55983
|
+
auth: "protected"
|
|
55984
|
+
}),
|
|
55985
|
+
stop: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55802
55986
|
kind: "mutation",
|
|
55803
55987
|
auth: "protected"
|
|
55804
55988
|
}),
|
|
55989
|
+
/** Select (not start) a program; refused when the appliance does not offer it. */
|
|
55805
55990
|
setProgram: method(object({
|
|
55806
|
-
deviceId:
|
|
55991
|
+
deviceId: DeviceIdSchema,
|
|
55807
55992
|
program: string().min(1)
|
|
55808
55993
|
}), _void(), {
|
|
55809
55994
|
kind: "mutation",
|
|
55810
55995
|
auth: "protected"
|
|
55811
55996
|
}),
|
|
55812
55997
|
setPower: method(object({
|
|
55813
|
-
deviceId:
|
|
55998
|
+
deviceId: DeviceIdSchema,
|
|
55814
55999
|
on: boolean()
|
|
55815
56000
|
}), _void(), {
|
|
55816
56001
|
kind: "mutation",
|
|
55817
56002
|
auth: "protected"
|
|
55818
56003
|
}),
|
|
55819
56004
|
setHalfLoad: method(object({
|
|
55820
|
-
deviceId:
|
|
56005
|
+
deviceId: DeviceIdSchema,
|
|
55821
56006
|
on: boolean()
|
|
55822
56007
|
}), _void(), {
|
|
55823
56008
|
kind: "mutation",
|
|
55824
56009
|
auth: "protected"
|
|
55825
56010
|
}),
|
|
55826
56011
|
setHygienePlus: method(object({
|
|
55827
|
-
deviceId:
|
|
56012
|
+
deviceId: DeviceIdSchema,
|
|
55828
56013
|
on: boolean()
|
|
55829
56014
|
}), _void(), {
|
|
55830
56015
|
kind: "mutation",
|
|
55831
56016
|
auth: "protected"
|
|
55832
56017
|
}),
|
|
55833
56018
|
setExtraDry: method(object({
|
|
55834
|
-
deviceId:
|
|
56019
|
+
deviceId: DeviceIdSchema,
|
|
55835
56020
|
on: boolean()
|
|
55836
56021
|
}), _void(), {
|
|
55837
56022
|
kind: "mutation",
|
|
55838
56023
|
auth: "protected"
|
|
55839
56024
|
}),
|
|
55840
56025
|
setIntensiveZone: method(object({
|
|
55841
|
-
deviceId:
|
|
56026
|
+
deviceId: DeviceIdSchema,
|
|
55842
56027
|
on: boolean()
|
|
55843
56028
|
}), _void(), {
|
|
55844
56029
|
kind: "mutation",
|
|
55845
56030
|
auth: "protected"
|
|
55846
56031
|
}),
|
|
55847
56032
|
setVarioSpeedPlus: method(object({
|
|
55848
|
-
deviceId:
|
|
56033
|
+
deviceId: DeviceIdSchema,
|
|
55849
56034
|
on: boolean()
|
|
55850
56035
|
}), _void(), {
|
|
55851
56036
|
kind: "mutation",
|
|
55852
56037
|
auth: "protected"
|
|
55853
56038
|
}),
|
|
55854
56039
|
setChildLock: method(object({
|
|
55855
|
-
deviceId:
|
|
56040
|
+
deviceId: DeviceIdSchema,
|
|
55856
56041
|
on: boolean()
|
|
55857
56042
|
}), _void(), {
|
|
55858
56043
|
kind: "mutation",
|
|
55859
56044
|
auth: "protected"
|
|
55860
56045
|
}),
|
|
56046
|
+
/**
|
|
56047
|
+
* Write any option or setting by feature key. Refused when the description does
|
|
56048
|
+
* not list it, it is not writable or not available now, or the value is outside
|
|
56049
|
+
* its declared range / members.
|
|
56050
|
+
*/
|
|
55861
56051
|
setOption: method(object({
|
|
55862
|
-
deviceId:
|
|
56052
|
+
deviceId: DeviceIdSchema,
|
|
55863
56053
|
key: string().min(1),
|
|
55864
|
-
value:
|
|
55865
|
-
boolean(),
|
|
55866
|
-
string(),
|
|
55867
|
-
number()
|
|
55868
|
-
])
|
|
56054
|
+
value: DishwasherValueSchema
|
|
55869
56055
|
}), _void(), {
|
|
55870
56056
|
kind: "mutation",
|
|
55871
56057
|
auth: "protected"
|
|
55872
|
-
})
|
|
56058
|
+
}),
|
|
56059
|
+
/** What this appliance can do, from its own description — the UI is derived from it. */
|
|
56060
|
+
getOptions: method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" })
|
|
55873
56061
|
},
|
|
55874
56062
|
status: {
|
|
55875
56063
|
schema: DishwasherStatusSchema,
|
|
@@ -69818,6 +70006,12 @@ Object.freeze({
|
|
|
69818
70006
|
addonId: null,
|
|
69819
70007
|
access: "view"
|
|
69820
70008
|
},
|
|
70009
|
+
"dishwasher.getOptions": {
|
|
70010
|
+
capName: "dishwasher",
|
|
70011
|
+
capScope: "device",
|
|
70012
|
+
addonId: null,
|
|
70013
|
+
access: "view"
|
|
70014
|
+
},
|
|
69821
70015
|
"dishwasher.getStatus": {
|
|
69822
70016
|
capName: "dishwasher",
|
|
69823
70017
|
capScope: "device",
|
|
@@ -69830,6 +70024,12 @@ Object.freeze({
|
|
|
69830
70024
|
addonId: null,
|
|
69831
70025
|
access: "create"
|
|
69832
70026
|
},
|
|
70027
|
+
"dishwasher.resume": {
|
|
70028
|
+
capName: "dishwasher",
|
|
70029
|
+
capScope: "device",
|
|
70030
|
+
addonId: null,
|
|
70031
|
+
access: "create"
|
|
70032
|
+
},
|
|
69833
70033
|
"dishwasher.setChildLock": {
|
|
69834
70034
|
capName: "dishwasher",
|
|
69835
70035
|
capScope: "device",
|
|
@@ -74330,6 +74530,12 @@ Object.freeze({
|
|
|
74330
74530
|
addonId: null,
|
|
74331
74531
|
access: "view"
|
|
74332
74532
|
},
|
|
74533
|
+
"storageMigration.moverClearance": {
|
|
74534
|
+
capName: "storage-migration",
|
|
74535
|
+
capScope: "system",
|
|
74536
|
+
addonId: null,
|
|
74537
|
+
access: "view"
|
|
74538
|
+
},
|
|
74333
74539
|
"storageMigration.movers": {
|
|
74334
74540
|
capName: "storage-migration",
|
|
74335
74541
|
capScope: "system",
|
|
@@ -76523,6 +76729,11 @@ Object.freeze({
|
|
|
76523
76729
|
form: "single",
|
|
76524
76730
|
optional: false
|
|
76525
76731
|
}],
|
|
76732
|
+
"dishwasher.getOptions": [{
|
|
76733
|
+
name: "deviceId",
|
|
76734
|
+
form: "single",
|
|
76735
|
+
optional: false
|
|
76736
|
+
}],
|
|
76526
76737
|
"dishwasher.getStatus": [{
|
|
76527
76738
|
name: "deviceId",
|
|
76528
76739
|
form: "single",
|
|
@@ -76533,6 +76744,11 @@ Object.freeze({
|
|
|
76533
76744
|
form: "single",
|
|
76534
76745
|
optional: false
|
|
76535
76746
|
}],
|
|
76747
|
+
"dishwasher.resume": [{
|
|
76748
|
+
name: "deviceId",
|
|
76749
|
+
form: "single",
|
|
76750
|
+
optional: false
|
|
76751
|
+
}],
|
|
76536
76752
|
"dishwasher.setChildLock": [{
|
|
76537
76753
|
name: "deviceId",
|
|
76538
76754
|
form: "single",
|
|
@@ -78619,6 +78835,9 @@ new Map(Object.entries({
|
|
|
78619
78835
|
"wrapper-update-available": "system",
|
|
78620
78836
|
"backup-completed": "system",
|
|
78621
78837
|
"export-completed": "system",
|
|
78838
|
+
"alert-critical": "system",
|
|
78839
|
+
"alert-error": "system",
|
|
78840
|
+
"alert-critical-resolved": "system",
|
|
78622
78841
|
"storage-location-low": "system",
|
|
78623
78842
|
"storage-location-critical": "system",
|
|
78624
78843
|
"storage-location-ok": "system",
|
|
@@ -78743,6 +78962,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
78743
78962
|
"storage-location-ok"
|
|
78744
78963
|
]
|
|
78745
78964
|
},
|
|
78965
|
+
{
|
|
78966
|
+
id: "alerts",
|
|
78967
|
+
family: "system",
|
|
78968
|
+
label: "Alerts",
|
|
78969
|
+
kinds: [
|
|
78970
|
+
"alert-critical",
|
|
78971
|
+
"alert-error",
|
|
78972
|
+
"alert-critical-resolved"
|
|
78973
|
+
]
|
|
78974
|
+
},
|
|
78746
78975
|
{
|
|
78747
78976
|
id: "alarm",
|
|
78748
78977
|
family: "alarm",
|
|
@@ -78787,6 +79016,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
|
|
|
78787
79016
|
return [[descriptor.kind, field]];
|
|
78788
79017
|
})));
|
|
78789
79018
|
Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
|
|
79019
|
+
object({
|
|
79020
|
+
phase: _enum(["raised", "resolved"]),
|
|
79021
|
+
episodeId: string().min(1),
|
|
79022
|
+
alertId: string().min(1),
|
|
79023
|
+
severity: AlertSeveritySchema,
|
|
79024
|
+
category: string(),
|
|
79025
|
+
title: string(),
|
|
79026
|
+
message: string(),
|
|
79027
|
+
sourceType: string().optional(),
|
|
79028
|
+
sourceId: string().optional(),
|
|
79029
|
+
nodeId: string().optional(),
|
|
79030
|
+
/** The alert's own action link (where the operator acts on it), when it has one. */
|
|
79031
|
+
actionUrl: string().optional(),
|
|
79032
|
+
at: number()
|
|
79033
|
+
});
|
|
78790
79034
|
var RULE_BODY_ONLY = ["body"];
|
|
78791
79035
|
var RULE_TEXT = ["title", "body"];
|
|
78792
79036
|
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
@@ -78796,6 +79040,11 @@ var TANK = [
|
|
|
78796
79040
|
"device-tank-full",
|
|
78797
79041
|
"device-tank-normal"
|
|
78798
79042
|
];
|
|
79043
|
+
var ALERT_EPISODE = [
|
|
79044
|
+
"alert-critical",
|
|
79045
|
+
"alert-error",
|
|
79046
|
+
"alert-critical-resolved"
|
|
79047
|
+
];
|
|
78799
79048
|
var UPDATES = [
|
|
78800
79049
|
"addon-update-available",
|
|
78801
79050
|
"server-update-available",
|
|
@@ -78988,14 +79237,14 @@ var STATE_SUMMARY_VARS = [
|
|
|
78988
79237
|
([...RULE_TEXT], [...CONSUMABLE]),
|
|
78989
79238
|
([...RULE_TEXT], [...TANK]),
|
|
78990
79239
|
[...RULE_TEXT],
|
|
78991
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
78992
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
78993
|
-
[...RULE_TEXT],
|
|
79240
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
79241
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
78994
79242
|
[...RULE_TEXT],
|
|
78995
79243
|
[...RULE_TEXT],
|
|
78996
79244
|
[...RULE_TEXT],
|
|
78997
79245
|
[...RULE_TEXT],
|
|
78998
79246
|
[...RULE_TEXT],
|
|
79247
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78999
79248
|
[...RULE_TEXT],
|
|
79000
79249
|
[...RULE_TEXT],
|
|
79001
79250
|
[...RULE_TEXT],
|
|
@@ -79013,7 +79262,11 @@ var STATE_SUMMARY_VARS = [
|
|
|
79013
79262
|
[...RULE_TEXT],
|
|
79014
79263
|
[...RULE_TEXT],
|
|
79015
79264
|
[...RULE_TEXT],
|
|
79016
|
-
[...RULE_TEXT],
|
|
79265
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
79266
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
79267
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
79268
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
79269
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
79017
79270
|
[...RULE_TEXT],
|
|
79018
79271
|
[...RULE_TEXT],
|
|
79019
79272
|
[...RULE_TEXT],
|