@camstack/addon-provider-hikvision 1.2.154 → 1.2.156
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
|
@@ -34,7 +34,7 @@ let node_os = require("node:os");
|
|
|
34
34
|
let node_net = require("node:net");
|
|
35
35
|
let node_http = require("node:http");
|
|
36
36
|
let node_https = require("node:https");
|
|
37
|
-
//#region ../types/dist/event-category-
|
|
37
|
+
//#region ../types/dist/event-category-DOl51-Ij.mjs
|
|
38
38
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
39
39
|
EventCategory["SystemBoot"] = "system.boot";
|
|
40
40
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -113,9 +113,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
113
113
|
/**
|
|
114
114
|
* The node's one-shot runner boot check (D877): planned runners against the
|
|
115
115
|
* process service, `degraded` when any is failed, refused or missing. The
|
|
116
|
-
* alert centre turns it into one
|
|
116
|
+
* alert centre turns it into one critical alert.
|
|
117
117
|
*/
|
|
118
118
|
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
119
|
+
/**
|
|
120
|
+
* An alert EPISODE opened or closed, emitted by the alert centre for alerts
|
|
121
|
+
* of severity `critical` or `error` (`AlertEpisodePayload`). The alert
|
|
122
|
+
* centre sends no notification of its own: Notification Center turns this
|
|
123
|
+
* into the `alert-critical` / `alert-error` / `alert-critical-resolved`
|
|
124
|
+
* system-event kinds, and reconciles from the alerts store because a bus
|
|
125
|
+
* event may be dropped (D8, D11).
|
|
126
|
+
*/
|
|
127
|
+
EventCategory["AlertEpisode"] = "alert.episode";
|
|
119
128
|
EventCategory["AddonError"] = "addon.error";
|
|
120
129
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
121
130
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -5440,7 +5449,7 @@ var ZodIssueCode = {
|
|
|
5440
5449
|
var ZodFirstPartyTypeKind;
|
|
5441
5450
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5442
5451
|
//#endregion
|
|
5443
|
-
//#region ../types/dist/sleep-
|
|
5452
|
+
//#region ../types/dist/sleep-BxjU_fJM.mjs
|
|
5444
5453
|
/**
|
|
5445
5454
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5446
5455
|
* window to float samples (D455).
|
|
@@ -7822,6 +7831,12 @@ function normalizeAddonInitResult(result) {
|
|
|
7822
7831
|
if (Array.isArray(result)) return { providers: result };
|
|
7823
7832
|
return result;
|
|
7824
7833
|
}
|
|
7834
|
+
/**
|
|
7835
|
+
* The share-view scope kinds a `csv_*` share token can carry. The hub mints
|
|
7836
|
+
* and validates them (`share-token.service.ts` builds its enum from this
|
|
7837
|
+
* list); a data plane names the kinds it ACCEPTS in `share`.
|
|
7838
|
+
*/
|
|
7839
|
+
var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
|
|
7825
7840
|
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
7826
7841
|
var PeerBytesTicketSchema = object({
|
|
7827
7842
|
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
@@ -12804,6 +12819,229 @@ var ConvertResultSchema = object({
|
|
|
12804
12819
|
files: array(string()).readonly()
|
|
12805
12820
|
})).readonly()
|
|
12806
12821
|
});
|
|
12822
|
+
/**
|
|
12823
|
+
* Zod schemas for persisted record types.
|
|
12824
|
+
*
|
|
12825
|
+
* These schemas serve as the single source of truth for types that are
|
|
12826
|
+
* stored in the settings-store backend and retrieved via tRPC. They
|
|
12827
|
+
* replace the manual TypeScript interfaces with schema-derived types,
|
|
12828
|
+
* enabling runtime validation when reading from the backend.
|
|
12829
|
+
*
|
|
12830
|
+
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
12831
|
+
* keeps the original name for backward compatibility.
|
|
12832
|
+
*/
|
|
12833
|
+
/**
|
|
12834
|
+
* Auth model (v2 — 2026-05-12 caps-only):
|
|
12835
|
+
*
|
|
12836
|
+
* Two principals:
|
|
12837
|
+
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
12838
|
+
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
12839
|
+
*
|
|
12840
|
+
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
12841
|
+
* `super_admin` — collapsed onto the single boolean because every
|
|
12842
|
+
* non-admin caller is governed by the same scope-check rules; the
|
|
12843
|
+
* distinction was only ever used to route role-specific procedures
|
|
12844
|
+
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
12845
|
+
* with `isAdmin: false` + an explicit scope list.
|
|
12846
|
+
*/
|
|
12847
|
+
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
12848
|
+
var MethodAccessSchema = _enum([
|
|
12849
|
+
"view",
|
|
12850
|
+
"create",
|
|
12851
|
+
"delete"
|
|
12852
|
+
]);
|
|
12853
|
+
/**
|
|
12854
|
+
* A single scope grant. Three forms — checked in matcher with OR
|
|
12855
|
+
* semantics; the first match decides whether the call passes:
|
|
12856
|
+
*
|
|
12857
|
+
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
12858
|
+
* cap with the matching `scope` declaration. New caps inherit grants
|
|
12859
|
+
* automatically — adding a device cap to the codebase makes it
|
|
12860
|
+
* reachable to every user with `category:device [...]` without a
|
|
12861
|
+
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
12862
|
+
*
|
|
12863
|
+
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
12864
|
+
* useful when an integration needs to interact with one specific
|
|
12865
|
+
* addon's surface regardless of how many caps it exports.
|
|
12866
|
+
*
|
|
12867
|
+
* - `capability` — the most precise form. Single cap name. Use for
|
|
12868
|
+
* integration tokens where you want to grant `addons.installPackage`
|
|
12869
|
+
* and nothing else.
|
|
12870
|
+
*
|
|
12871
|
+
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
12872
|
+
* "give me everything" escape; there is no wildcard scope.
|
|
12873
|
+
*/
|
|
12874
|
+
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
12875
|
+
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
12876
|
+
var CapScopeSchema = _enum(["device", "system"]);
|
|
12877
|
+
/**
|
|
12878
|
+
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
12879
|
+
*
|
|
12880
|
+
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
12881
|
+
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
12882
|
+
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
12883
|
+
* AFTER the grant was minted — no re-grant, no re-login.
|
|
12884
|
+
*
|
|
12885
|
+
* - `all` — every device in the deployment. The broad viewer/operator
|
|
12886
|
+
* lever without a `category` grant (a `category` grant also covers device
|
|
12887
|
+
* caps that carry no deviceId; `all` is specifically the device set).
|
|
12888
|
+
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
12889
|
+
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
12890
|
+
* is NOT covered until the grant is edited.
|
|
12891
|
+
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
12892
|
+
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
12893
|
+
* re-resolves on the next request.
|
|
12894
|
+
* - `locations` — every device whose operator-assigned `location` label is
|
|
12895
|
+
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
12896
|
+
* null/unset location matches NO `locations` selector.
|
|
12897
|
+
*/
|
|
12898
|
+
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
12899
|
+
object({ kind: literal("all") }),
|
|
12900
|
+
object({
|
|
12901
|
+
kind: literal("ids"),
|
|
12902
|
+
ids: array(number().int()).min(1)
|
|
12903
|
+
}),
|
|
12904
|
+
object({
|
|
12905
|
+
kind: literal("types"),
|
|
12906
|
+
types: array(_enum(DeviceType)).min(1)
|
|
12907
|
+
}),
|
|
12908
|
+
object({
|
|
12909
|
+
kind: literal("locations"),
|
|
12910
|
+
locations: array(string().min(1)).min(1)
|
|
12911
|
+
})
|
|
12912
|
+
]);
|
|
12913
|
+
var DeviceTokenScopeSchema = object({
|
|
12914
|
+
type: literal("device"),
|
|
12915
|
+
/** The device SET this grant covers — resolved against the live fleet. */
|
|
12916
|
+
selector: DeviceSelectorSchema,
|
|
12917
|
+
access: array(MethodAccessSchema).min(1),
|
|
12918
|
+
/**
|
|
12919
|
+
* Whether a grant on a PARENT device transparently covers its accessory
|
|
12920
|
+
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
12921
|
+
* Direction is parent → children ONLY.
|
|
12922
|
+
*
|
|
12923
|
+
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
12924
|
+
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
12925
|
+
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
12926
|
+
* operator must grant on the child, not inherit from the parent). Set it
|
|
12927
|
+
* explicitly to override that default per grant.
|
|
12928
|
+
*/
|
|
12929
|
+
includeLinked: boolean().optional()
|
|
12930
|
+
});
|
|
12931
|
+
/**
|
|
12932
|
+
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
12933
|
+
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
12934
|
+
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
12935
|
+
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
12936
|
+
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
12937
|
+
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
12938
|
+
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
12939
|
+
* migration covers both without a flag day. No cast — the raw object is read
|
|
12940
|
+
* through `Reflect.get` (its static type is `unknown`).
|
|
12941
|
+
*/
|
|
12942
|
+
function migrateLegacyTokenScope(raw) {
|
|
12943
|
+
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
12944
|
+
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
12945
|
+
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
12946
|
+
const targets = Reflect.get(raw, "targets");
|
|
12947
|
+
if (!Array.isArray(targets)) return raw;
|
|
12948
|
+
return {
|
|
12949
|
+
type: "device",
|
|
12950
|
+
selector: {
|
|
12951
|
+
kind: "ids",
|
|
12952
|
+
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
12953
|
+
},
|
|
12954
|
+
access: Reflect.get(raw, "access")
|
|
12955
|
+
};
|
|
12956
|
+
}
|
|
12957
|
+
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
12958
|
+
object({
|
|
12959
|
+
type: literal("category"),
|
|
12960
|
+
target: CapScopeSchema,
|
|
12961
|
+
access: array(MethodAccessSchema).min(1)
|
|
12962
|
+
}),
|
|
12963
|
+
object({
|
|
12964
|
+
type: literal("capability"),
|
|
12965
|
+
target: string(),
|
|
12966
|
+
access: array(MethodAccessSchema).min(1)
|
|
12967
|
+
}),
|
|
12968
|
+
object({
|
|
12969
|
+
type: literal("addon"),
|
|
12970
|
+
target: string(),
|
|
12971
|
+
access: array(MethodAccessSchema).min(1)
|
|
12972
|
+
}),
|
|
12973
|
+
DeviceTokenScopeSchema
|
|
12974
|
+
]));
|
|
12975
|
+
object({
|
|
12976
|
+
id: string(),
|
|
12977
|
+
username: string(),
|
|
12978
|
+
passwordHash: string(),
|
|
12979
|
+
/**
|
|
12980
|
+
* Admin bypass. When true, the middleware skips the scope-access
|
|
12981
|
+
* check entirely. There is no other axis of privilege; the legacy
|
|
12982
|
+
* role enum collapsed onto this boolean in v2.
|
|
12983
|
+
*/
|
|
12984
|
+
isAdmin: boolean().default(false),
|
|
12985
|
+
allowedProviders: AllowedProviderSchema,
|
|
12986
|
+
allowedDevices: AllowedDevicesSchema,
|
|
12987
|
+
/**
|
|
12988
|
+
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
12989
|
+
* ignored. Non-admins without scopes are locked out of every
|
|
12990
|
+
* protected call.
|
|
12991
|
+
*/
|
|
12992
|
+
scopes: array(TokenScopeSchema).default([]),
|
|
12993
|
+
createdAt: number(),
|
|
12994
|
+
updatedAt: number()
|
|
12995
|
+
});
|
|
12996
|
+
object({
|
|
12997
|
+
id: string(),
|
|
12998
|
+
label: string(),
|
|
12999
|
+
isAdmin: boolean().default(false),
|
|
13000
|
+
allowedProviders: AllowedProviderSchema,
|
|
13001
|
+
allowedDevices: AllowedDevicesSchema,
|
|
13002
|
+
tokenHash: string(),
|
|
13003
|
+
tokenPrefix: string(),
|
|
13004
|
+
createdAt: number(),
|
|
13005
|
+
lastUsedAt: number().optional()
|
|
13006
|
+
});
|
|
13007
|
+
object({
|
|
13008
|
+
id: string(),
|
|
13009
|
+
userId: string(),
|
|
13010
|
+
name: string(),
|
|
13011
|
+
tokenHash: string(),
|
|
13012
|
+
tokenPrefix: string(),
|
|
13013
|
+
scopes: array(TokenScopeSchema),
|
|
13014
|
+
expiresAt: number().nullish(),
|
|
13015
|
+
lastUsedAt: number().nullish(),
|
|
13016
|
+
createdAt: number()
|
|
13017
|
+
});
|
|
13018
|
+
/** What a share-view grant lets its holder see. */
|
|
13019
|
+
var ShareViewGrantSchema = object({
|
|
13020
|
+
kind: _enum(SHARE_VIEW_KINDS),
|
|
13021
|
+
deviceIds: array(number().int().nonnegative()).min(1).max(64),
|
|
13022
|
+
/** Talk-back, opt-in at mint time; absent means off. */
|
|
13023
|
+
talk: boolean().optional()
|
|
13024
|
+
});
|
|
13025
|
+
var ShareViewScopeSchema = object({
|
|
13026
|
+
type: literal("share-view"),
|
|
13027
|
+
grant: ShareViewGrantSchema
|
|
13028
|
+
});
|
|
13029
|
+
var AddonRoutesScopeSchema = object({
|
|
13030
|
+
type: literal("addon-routes"),
|
|
13031
|
+
access: array(MethodAccessSchema).min(1)
|
|
13032
|
+
});
|
|
13033
|
+
var CredentialScopeSchema = union([
|
|
13034
|
+
literal("*"),
|
|
13035
|
+
ShareViewScopeSchema,
|
|
13036
|
+
AddonRoutesScopeSchema,
|
|
13037
|
+
TokenScopeSchema
|
|
13038
|
+
]);
|
|
13039
|
+
object({
|
|
13040
|
+
kind: literal("credential"),
|
|
13041
|
+
sub: string().min(1),
|
|
13042
|
+
jti: string().min(16),
|
|
13043
|
+
scopes: array(CredentialScopeSchema).min(1)
|
|
13044
|
+
});
|
|
12807
13045
|
_enum(["new-session", "step-up"]);
|
|
12808
13046
|
/** The languages the hub's app landing pages are written in (D858). */
|
|
12809
13047
|
var AppPageLangSchema = _enum(["en", "it"]);
|
|
@@ -13520,7 +13758,14 @@ var AlertSeveritySchema = _enum([
|
|
|
13520
13758
|
]);
|
|
13521
13759
|
var AlertActionSchema = object({
|
|
13522
13760
|
label: string(),
|
|
13523
|
-
href: string().optional()
|
|
13761
|
+
href: string().optional(),
|
|
13762
|
+
/**
|
|
13763
|
+
* How `href` is followed. Absent / `app`: an admin-ui route (client-side).
|
|
13764
|
+
* `server`: a route the HUB serves (an addon HTTP route such as an OAuth
|
|
13765
|
+
* start) — the browser must leave the SPA with a full navigation, because
|
|
13766
|
+
* the SPA has no such route and would bounce to the home page.
|
|
13767
|
+
*/
|
|
13768
|
+
navigation: _enum(["app", "server"]).optional()
|
|
13524
13769
|
});
|
|
13525
13770
|
var AlertStatusSchema = _enum([
|
|
13526
13771
|
"active",
|
|
@@ -42368,6 +42613,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
42368
42613
|
"server-updated",
|
|
42369
42614
|
"export-completed",
|
|
42370
42615
|
"backup-completed",
|
|
42616
|
+
"alert-critical",
|
|
42617
|
+
"alert-error",
|
|
42618
|
+
"alert-critical-resolved",
|
|
42371
42619
|
"camera-online",
|
|
42372
42620
|
"camera-offline",
|
|
42373
42621
|
"camera-disabled",
|
|
@@ -44403,202 +44651,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
44403
44651
|
auth: "admin"
|
|
44404
44652
|
}), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
|
|
44405
44653
|
/**
|
|
44406
|
-
* Zod schemas for persisted record types.
|
|
44407
|
-
*
|
|
44408
|
-
* These schemas serve as the single source of truth for types that are
|
|
44409
|
-
* stored in the settings-store backend and retrieved via tRPC. They
|
|
44410
|
-
* replace the manual TypeScript interfaces with schema-derived types,
|
|
44411
|
-
* enabling runtime validation when reading from the backend.
|
|
44412
|
-
*
|
|
44413
|
-
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
44414
|
-
* keeps the original name for backward compatibility.
|
|
44415
|
-
*/
|
|
44416
|
-
/**
|
|
44417
|
-
* Auth model (v2 — 2026-05-12 caps-only):
|
|
44418
|
-
*
|
|
44419
|
-
* Two principals:
|
|
44420
|
-
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
44421
|
-
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
44422
|
-
*
|
|
44423
|
-
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
44424
|
-
* `super_admin` — collapsed onto the single boolean because every
|
|
44425
|
-
* non-admin caller is governed by the same scope-check rules; the
|
|
44426
|
-
* distinction was only ever used to route role-specific procedures
|
|
44427
|
-
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
44428
|
-
* with `isAdmin: false` + an explicit scope list.
|
|
44429
|
-
*/
|
|
44430
|
-
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
44431
|
-
var MethodAccessSchema = _enum([
|
|
44432
|
-
"view",
|
|
44433
|
-
"create",
|
|
44434
|
-
"delete"
|
|
44435
|
-
]);
|
|
44436
|
-
/**
|
|
44437
|
-
* A single scope grant. Three forms — checked in matcher with OR
|
|
44438
|
-
* semantics; the first match decides whether the call passes:
|
|
44439
|
-
*
|
|
44440
|
-
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
44441
|
-
* cap with the matching `scope` declaration. New caps inherit grants
|
|
44442
|
-
* automatically — adding a device cap to the codebase makes it
|
|
44443
|
-
* reachable to every user with `category:device [...]` without a
|
|
44444
|
-
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
44445
|
-
*
|
|
44446
|
-
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
44447
|
-
* useful when an integration needs to interact with one specific
|
|
44448
|
-
* addon's surface regardless of how many caps it exports.
|
|
44449
|
-
*
|
|
44450
|
-
* - `capability` — the most precise form. Single cap name. Use for
|
|
44451
|
-
* integration tokens where you want to grant `addons.installPackage`
|
|
44452
|
-
* and nothing else.
|
|
44453
|
-
*
|
|
44454
|
-
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
44455
|
-
* "give me everything" escape; there is no wildcard scope.
|
|
44456
|
-
*/
|
|
44457
|
-
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
44458
|
-
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
44459
|
-
var CapScopeSchema = _enum(["device", "system"]);
|
|
44460
|
-
/**
|
|
44461
|
-
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
44462
|
-
*
|
|
44463
|
-
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
44464
|
-
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
44465
|
-
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
44466
|
-
* AFTER the grant was minted — no re-grant, no re-login.
|
|
44467
|
-
*
|
|
44468
|
-
* - `all` — every device in the deployment. The broad viewer/operator
|
|
44469
|
-
* lever without a `category` grant (a `category` grant also covers device
|
|
44470
|
-
* caps that carry no deviceId; `all` is specifically the device set).
|
|
44471
|
-
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
44472
|
-
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
44473
|
-
* is NOT covered until the grant is edited.
|
|
44474
|
-
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
44475
|
-
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
44476
|
-
* re-resolves on the next request.
|
|
44477
|
-
* - `locations` — every device whose operator-assigned `location` label is
|
|
44478
|
-
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
44479
|
-
* null/unset location matches NO `locations` selector.
|
|
44480
|
-
*/
|
|
44481
|
-
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
44482
|
-
object({ kind: literal("all") }),
|
|
44483
|
-
object({
|
|
44484
|
-
kind: literal("ids"),
|
|
44485
|
-
ids: array(number().int()).min(1)
|
|
44486
|
-
}),
|
|
44487
|
-
object({
|
|
44488
|
-
kind: literal("types"),
|
|
44489
|
-
types: array(_enum(DeviceType)).min(1)
|
|
44490
|
-
}),
|
|
44491
|
-
object({
|
|
44492
|
-
kind: literal("locations"),
|
|
44493
|
-
locations: array(string().min(1)).min(1)
|
|
44494
|
-
})
|
|
44495
|
-
]);
|
|
44496
|
-
var DeviceTokenScopeSchema = object({
|
|
44497
|
-
type: literal("device"),
|
|
44498
|
-
/** The device SET this grant covers — resolved against the live fleet. */
|
|
44499
|
-
selector: DeviceSelectorSchema,
|
|
44500
|
-
access: array(MethodAccessSchema).min(1),
|
|
44501
|
-
/**
|
|
44502
|
-
* Whether a grant on a PARENT device transparently covers its accessory
|
|
44503
|
-
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
44504
|
-
* Direction is parent → children ONLY.
|
|
44505
|
-
*
|
|
44506
|
-
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
44507
|
-
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
44508
|
-
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
44509
|
-
* operator must grant on the child, not inherit from the parent). Set it
|
|
44510
|
-
* explicitly to override that default per grant.
|
|
44511
|
-
*/
|
|
44512
|
-
includeLinked: boolean().optional()
|
|
44513
|
-
});
|
|
44514
|
-
/**
|
|
44515
|
-
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
44516
|
-
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
44517
|
-
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
44518
|
-
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
44519
|
-
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
44520
|
-
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
44521
|
-
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
44522
|
-
* migration covers both without a flag day. No cast — the raw object is read
|
|
44523
|
-
* through `Reflect.get` (its static type is `unknown`).
|
|
44524
|
-
*/
|
|
44525
|
-
function migrateLegacyTokenScope(raw) {
|
|
44526
|
-
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
44527
|
-
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
44528
|
-
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
44529
|
-
const targets = Reflect.get(raw, "targets");
|
|
44530
|
-
if (!Array.isArray(targets)) return raw;
|
|
44531
|
-
return {
|
|
44532
|
-
type: "device",
|
|
44533
|
-
selector: {
|
|
44534
|
-
kind: "ids",
|
|
44535
|
-
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
44536
|
-
},
|
|
44537
|
-
access: Reflect.get(raw, "access")
|
|
44538
|
-
};
|
|
44539
|
-
}
|
|
44540
|
-
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
44541
|
-
object({
|
|
44542
|
-
type: literal("category"),
|
|
44543
|
-
target: CapScopeSchema,
|
|
44544
|
-
access: array(MethodAccessSchema).min(1)
|
|
44545
|
-
}),
|
|
44546
|
-
object({
|
|
44547
|
-
type: literal("capability"),
|
|
44548
|
-
target: string(),
|
|
44549
|
-
access: array(MethodAccessSchema).min(1)
|
|
44550
|
-
}),
|
|
44551
|
-
object({
|
|
44552
|
-
type: literal("addon"),
|
|
44553
|
-
target: string(),
|
|
44554
|
-
access: array(MethodAccessSchema).min(1)
|
|
44555
|
-
}),
|
|
44556
|
-
DeviceTokenScopeSchema
|
|
44557
|
-
]));
|
|
44558
|
-
object({
|
|
44559
|
-
id: string(),
|
|
44560
|
-
username: string(),
|
|
44561
|
-
passwordHash: string(),
|
|
44562
|
-
/**
|
|
44563
|
-
* Admin bypass. When true, the middleware skips the scope-access
|
|
44564
|
-
* check entirely. There is no other axis of privilege; the legacy
|
|
44565
|
-
* role enum collapsed onto this boolean in v2.
|
|
44566
|
-
*/
|
|
44567
|
-
isAdmin: boolean().default(false),
|
|
44568
|
-
allowedProviders: AllowedProviderSchema,
|
|
44569
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44570
|
-
/**
|
|
44571
|
-
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
44572
|
-
* ignored. Non-admins without scopes are locked out of every
|
|
44573
|
-
* protected call.
|
|
44574
|
-
*/
|
|
44575
|
-
scopes: array(TokenScopeSchema).default([]),
|
|
44576
|
-
createdAt: number(),
|
|
44577
|
-
updatedAt: number()
|
|
44578
|
-
});
|
|
44579
|
-
object({
|
|
44580
|
-
id: string(),
|
|
44581
|
-
label: string(),
|
|
44582
|
-
isAdmin: boolean().default(false),
|
|
44583
|
-
allowedProviders: AllowedProviderSchema,
|
|
44584
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44585
|
-
tokenHash: string(),
|
|
44586
|
-
tokenPrefix: string(),
|
|
44587
|
-
createdAt: number(),
|
|
44588
|
-
lastUsedAt: number().optional()
|
|
44589
|
-
});
|
|
44590
|
-
object({
|
|
44591
|
-
id: string(),
|
|
44592
|
-
userId: string(),
|
|
44593
|
-
name: string(),
|
|
44594
|
-
tokenHash: string(),
|
|
44595
|
-
tokenPrefix: string(),
|
|
44596
|
-
scopes: array(TokenScopeSchema),
|
|
44597
|
-
expiresAt: number().nullish(),
|
|
44598
|
-
lastUsedAt: number().nullish(),
|
|
44599
|
-
createdAt: number()
|
|
44600
|
-
});
|
|
44601
|
-
/**
|
|
44602
44654
|
* `oauth-integration` — a collection cap by which an addon declares
|
|
44603
44655
|
* itself a linkable OAuth client of the hub's core `/oauth2/*` server.
|
|
44604
44656
|
* Each provider returns a static descriptor; the core enumerates them
|
|
@@ -51548,7 +51600,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
51548
51600
|
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
51549
51601
|
kind: "mutation",
|
|
51550
51602
|
auth: "admin"
|
|
51551
|
-
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({
|
|
51603
|
+
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
|
|
51604
|
+
clear: boolean(),
|
|
51605
|
+
repointLocationId: string().optional()
|
|
51606
|
+
}), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
|
|
51552
51607
|
kind: "mutation",
|
|
51553
51608
|
auth: "admin"
|
|
51554
51609
|
}), method(StorageCleanupInputSchema, object({ jobId: string() }), {
|
|
@@ -56222,6 +56277,11 @@ onStatusChanged: { data: object({
|
|
|
56222
56277
|
*
|
|
56223
56278
|
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
56224
56279
|
* provider refreshes the slice on an interval and eagerly after commands.
|
|
56280
|
+
*
|
|
56281
|
+
* UNKNOWN IS NOT OFF. Every field the appliance reports separately is
|
|
56282
|
+
* nullable: `null` means "not known right now" (the appliance has not said,
|
|
56283
|
+
* the link is down, or the description does not carry it) and is never
|
|
56284
|
+
* rendered or exported as `false` / `0`. `availability` says why.
|
|
56225
56285
|
*/
|
|
56226
56286
|
var DishwasherStateSchema = _enum([
|
|
56227
56287
|
"idle",
|
|
@@ -56231,43 +56291,155 @@ var DishwasherStateSchema = _enum([
|
|
|
56231
56291
|
"error",
|
|
56232
56292
|
"unavailable"
|
|
56233
56293
|
]);
|
|
56294
|
+
/**
|
|
56295
|
+
* The appliance's own operation state, uncollapsed. `state` above is the coarse
|
|
56296
|
+
* view for compact surfaces; this is what the appliance said.
|
|
56297
|
+
*/
|
|
56298
|
+
var DishwasherOperationStateSchema = _enum([
|
|
56299
|
+
"Inactive",
|
|
56300
|
+
"Ready",
|
|
56301
|
+
"DelayedStart",
|
|
56302
|
+
"Run",
|
|
56303
|
+
"Pause",
|
|
56304
|
+
"ActionRequired",
|
|
56305
|
+
"Finished",
|
|
56306
|
+
"Error",
|
|
56307
|
+
"Aborting"
|
|
56308
|
+
]);
|
|
56309
|
+
/**
|
|
56310
|
+
* Why fields may be `null`:
|
|
56311
|
+
* - `available` — the link is up and the description is loaded;
|
|
56312
|
+
* - `offline` — the local link is down (values are unknown, not last-known);
|
|
56313
|
+
* - `description-missing` — the link is up but the appliance's description could not
|
|
56314
|
+
* be loaded, so its values cannot be decoded.
|
|
56315
|
+
*/
|
|
56316
|
+
var DishwasherAvailabilitySchema = _enum([
|
|
56317
|
+
"available",
|
|
56318
|
+
"offline",
|
|
56319
|
+
"description-missing"
|
|
56320
|
+
]);
|
|
56234
56321
|
var DishwasherConsumableLevelSchema = _enum([
|
|
56235
56322
|
"ok",
|
|
56236
56323
|
"low",
|
|
56237
56324
|
"empty"
|
|
56238
56325
|
]);
|
|
56239
56326
|
var DishwasherStatusSchema = object({
|
|
56327
|
+
availability: DishwasherAvailabilitySchema,
|
|
56328
|
+
/** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
|
|
56240
56329
|
state: DishwasherStateSchema,
|
|
56241
|
-
/**
|
|
56330
|
+
/** The appliance's operation state as reported; null when not known. */
|
|
56331
|
+
operationState: DishwasherOperationStateSchema.nullable(),
|
|
56332
|
+
/** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
|
|
56242
56333
|
program: string().nullable(),
|
|
56243
|
-
/**
|
|
56334
|
+
/** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
|
|
56335
|
+
selectedProgram: string().nullable(),
|
|
56336
|
+
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
56244
56337
|
availablePrograms: array(string()),
|
|
56245
|
-
/**
|
|
56246
|
-
|
|
56338
|
+
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
56339
|
+
remainingSeconds: number().int().nonnegative().nullable(),
|
|
56340
|
+
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
56341
|
+
delayedStartSeconds: number().int().nonnegative().nullable(),
|
|
56247
56342
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
56248
56343
|
progressPercent: number().min(0).max(100).nullable(),
|
|
56249
|
-
/** True when the door is reported open. */
|
|
56250
|
-
doorOpen: boolean(),
|
|
56251
|
-
/** True when
|
|
56252
|
-
|
|
56253
|
-
/**
|
|
56254
|
-
|
|
56344
|
+
/** True when the door is reported open; null when the door state is not known. */
|
|
56345
|
+
doorOpen: boolean().nullable(),
|
|
56346
|
+
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
56347
|
+
doorLocked: boolean().nullable(),
|
|
56348
|
+
/** True when remote start is allowed (door closed, power on, etc.); null when not known. */
|
|
56349
|
+
remoteStartAllowed: boolean().nullable(),
|
|
56350
|
+
/** True when the appliance accepts remote control now; null when not known. */
|
|
56351
|
+
remoteControlActive: boolean().nullable(),
|
|
56352
|
+
/** True while somebody operates the appliance at its panel; null when not reported. */
|
|
56353
|
+
localControlActive: boolean().nullable(),
|
|
56354
|
+
/** Main power / switched-on state; null when not known. */
|
|
56355
|
+
powerOn: boolean().nullable(),
|
|
56356
|
+
/** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
|
|
56357
|
+
powerState: string().nullable(),
|
|
56255
56358
|
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
56256
56359
|
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
56257
|
-
|
|
56258
|
-
|
|
56360
|
+
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
56361
|
+
halfLoad: boolean().nullable(),
|
|
56362
|
+
hygienePlus: boolean().nullable(),
|
|
56259
56363
|
/** Extra dry option when the appliance exposes it. */
|
|
56260
|
-
extraDry: boolean(),
|
|
56364
|
+
extraDry: boolean().nullable(),
|
|
56261
56365
|
/** Intensive zone (lower basket) when the appliance exposes it. */
|
|
56262
|
-
intensiveZone: boolean(),
|
|
56366
|
+
intensiveZone: boolean().nullable(),
|
|
56263
56367
|
/** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
|
|
56264
|
-
varioSpeedPlus: boolean(),
|
|
56265
|
-
/** Child lock (controls disabled on the appliance). */
|
|
56266
|
-
childLock: boolean(),
|
|
56368
|
+
varioSpeedPlus: boolean().nullable(),
|
|
56369
|
+
/** Child lock (controls disabled on the appliance); null when not known. */
|
|
56370
|
+
childLock: boolean().nullable(),
|
|
56371
|
+
/** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
|
|
56372
|
+
activeEvents: array(string()),
|
|
56373
|
+
/** Numeric error code when the appliance reports one; null otherwise. */
|
|
56267
56374
|
errorCode: number().nullable(),
|
|
56375
|
+
/** Name of the raised alert-level event while the appliance is in error; null otherwise. */
|
|
56268
56376
|
errorLabel: string().nullable(),
|
|
56377
|
+
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
56269
56378
|
lastFetchedAt: number()
|
|
56270
56379
|
});
|
|
56380
|
+
var DeviceIdSchema = number().int().nonnegative();
|
|
56381
|
+
/** A value a program option or setting can take. */
|
|
56382
|
+
var DishwasherValueSchema = union([
|
|
56383
|
+
boolean(),
|
|
56384
|
+
string(),
|
|
56385
|
+
number()
|
|
56386
|
+
]);
|
|
56387
|
+
var DishwasherAccessSchema = _enum([
|
|
56388
|
+
"none",
|
|
56389
|
+
"read",
|
|
56390
|
+
"readWrite",
|
|
56391
|
+
"writeOnly",
|
|
56392
|
+
"readStatic"
|
|
56393
|
+
]);
|
|
56394
|
+
/**
|
|
56395
|
+
* One option or setting the appliance declares, with the constraints its description
|
|
56396
|
+
* gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
|
|
56397
|
+
*/
|
|
56398
|
+
var DishwasherOptionDescriptorSchema = object({
|
|
56399
|
+
/** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
|
|
56400
|
+
key: string(),
|
|
56401
|
+
/** Last segment of the key, for display. */
|
|
56402
|
+
name: string(),
|
|
56403
|
+
type: _enum([
|
|
56404
|
+
"boolean",
|
|
56405
|
+
"number",
|
|
56406
|
+
"enum",
|
|
56407
|
+
"string"
|
|
56408
|
+
]),
|
|
56409
|
+
access: DishwasherAccessSchema,
|
|
56410
|
+
/** The appliance reports this entity as currently available. */
|
|
56411
|
+
available: boolean(),
|
|
56412
|
+
/** Unit the description declares for a number; null when it declares none. */
|
|
56413
|
+
unit: string().nullable(),
|
|
56414
|
+
min: number().nullable(),
|
|
56415
|
+
max: number().nullable(),
|
|
56416
|
+
step: number().nullable(),
|
|
56417
|
+
/** Allowed members of an enum; null for other types. */
|
|
56418
|
+
enumValues: array(string()).nullable(),
|
|
56419
|
+
defaultValue: DishwasherValueSchema.nullable()
|
|
56420
|
+
});
|
|
56421
|
+
var DishwasherProgramSchema = object({
|
|
56422
|
+
/** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
|
|
56423
|
+
key: string(),
|
|
56424
|
+
name: string(),
|
|
56425
|
+
/** The appliance currently offers this program. */
|
|
56426
|
+
available: boolean(),
|
|
56427
|
+
/** The options this program lists, with the program-level access / availability / default. */
|
|
56428
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
56429
|
+
});
|
|
56430
|
+
var DishwasherOptionsSchema = object({
|
|
56431
|
+
availability: DishwasherAvailabilitySchema,
|
|
56432
|
+
/** What the appliance can be told to do, from the commands its description declares. */
|
|
56433
|
+
supportsStart: boolean(),
|
|
56434
|
+
supportsPause: boolean(),
|
|
56435
|
+
supportsResume: boolean(),
|
|
56436
|
+
supportsStop: boolean(),
|
|
56437
|
+
supportsPower: boolean(),
|
|
56438
|
+
/** Every program the description lists, with its options. */
|
|
56439
|
+
programs: array(DishwasherProgramSchema),
|
|
56440
|
+
/** Every option and setting entity the description lists (programs reference these by key). */
|
|
56441
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
56442
|
+
});
|
|
56271
56443
|
var dishwasherCapability = {
|
|
56272
56444
|
name: "dishwasher",
|
|
56273
56445
|
scope: "device",
|
|
@@ -56275,86 +56447,102 @@ var dishwasherCapability = {
|
|
|
56275
56447
|
mode: "singleton",
|
|
56276
56448
|
deviceTypes: [DeviceType.Dishwasher],
|
|
56277
56449
|
methods: {
|
|
56278
|
-
|
|
56450
|
+
/**
|
|
56451
|
+
* Start a program. Without `program` the selected one starts. `options` are
|
|
56452
|
+
* option feature keys; each is checked against the program's constraints.
|
|
56453
|
+
*/
|
|
56454
|
+
start: method(object({
|
|
56455
|
+
deviceId: DeviceIdSchema,
|
|
56456
|
+
program: string().min(1).optional(),
|
|
56457
|
+
options: record(string(), DishwasherValueSchema).optional()
|
|
56458
|
+
}), _void(), {
|
|
56279
56459
|
kind: "mutation",
|
|
56280
56460
|
auth: "protected"
|
|
56281
56461
|
}),
|
|
56282
|
-
pause: method(object({ deviceId:
|
|
56462
|
+
pause: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
56283
56463
|
kind: "mutation",
|
|
56284
56464
|
auth: "protected"
|
|
56285
56465
|
}),
|
|
56286
|
-
|
|
56466
|
+
resume: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
56467
|
+
kind: "mutation",
|
|
56468
|
+
auth: "protected"
|
|
56469
|
+
}),
|
|
56470
|
+
stop: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
56287
56471
|
kind: "mutation",
|
|
56288
56472
|
auth: "protected"
|
|
56289
56473
|
}),
|
|
56474
|
+
/** Select (not start) a program; refused when the appliance does not offer it. */
|
|
56290
56475
|
setProgram: method(object({
|
|
56291
|
-
deviceId:
|
|
56476
|
+
deviceId: DeviceIdSchema,
|
|
56292
56477
|
program: string().min(1)
|
|
56293
56478
|
}), _void(), {
|
|
56294
56479
|
kind: "mutation",
|
|
56295
56480
|
auth: "protected"
|
|
56296
56481
|
}),
|
|
56297
56482
|
setPower: method(object({
|
|
56298
|
-
deviceId:
|
|
56483
|
+
deviceId: DeviceIdSchema,
|
|
56299
56484
|
on: boolean()
|
|
56300
56485
|
}), _void(), {
|
|
56301
56486
|
kind: "mutation",
|
|
56302
56487
|
auth: "protected"
|
|
56303
56488
|
}),
|
|
56304
56489
|
setHalfLoad: method(object({
|
|
56305
|
-
deviceId:
|
|
56490
|
+
deviceId: DeviceIdSchema,
|
|
56306
56491
|
on: boolean()
|
|
56307
56492
|
}), _void(), {
|
|
56308
56493
|
kind: "mutation",
|
|
56309
56494
|
auth: "protected"
|
|
56310
56495
|
}),
|
|
56311
56496
|
setHygienePlus: method(object({
|
|
56312
|
-
deviceId:
|
|
56497
|
+
deviceId: DeviceIdSchema,
|
|
56313
56498
|
on: boolean()
|
|
56314
56499
|
}), _void(), {
|
|
56315
56500
|
kind: "mutation",
|
|
56316
56501
|
auth: "protected"
|
|
56317
56502
|
}),
|
|
56318
56503
|
setExtraDry: method(object({
|
|
56319
|
-
deviceId:
|
|
56504
|
+
deviceId: DeviceIdSchema,
|
|
56320
56505
|
on: boolean()
|
|
56321
56506
|
}), _void(), {
|
|
56322
56507
|
kind: "mutation",
|
|
56323
56508
|
auth: "protected"
|
|
56324
56509
|
}),
|
|
56325
56510
|
setIntensiveZone: method(object({
|
|
56326
|
-
deviceId:
|
|
56511
|
+
deviceId: DeviceIdSchema,
|
|
56327
56512
|
on: boolean()
|
|
56328
56513
|
}), _void(), {
|
|
56329
56514
|
kind: "mutation",
|
|
56330
56515
|
auth: "protected"
|
|
56331
56516
|
}),
|
|
56332
56517
|
setVarioSpeedPlus: method(object({
|
|
56333
|
-
deviceId:
|
|
56518
|
+
deviceId: DeviceIdSchema,
|
|
56334
56519
|
on: boolean()
|
|
56335
56520
|
}), _void(), {
|
|
56336
56521
|
kind: "mutation",
|
|
56337
56522
|
auth: "protected"
|
|
56338
56523
|
}),
|
|
56339
56524
|
setChildLock: method(object({
|
|
56340
|
-
deviceId:
|
|
56525
|
+
deviceId: DeviceIdSchema,
|
|
56341
56526
|
on: boolean()
|
|
56342
56527
|
}), _void(), {
|
|
56343
56528
|
kind: "mutation",
|
|
56344
56529
|
auth: "protected"
|
|
56345
56530
|
}),
|
|
56531
|
+
/**
|
|
56532
|
+
* Write any option or setting by feature key. Refused when the description does
|
|
56533
|
+
* not list it, it is not writable or not available now, or the value is outside
|
|
56534
|
+
* its declared range / members.
|
|
56535
|
+
*/
|
|
56346
56536
|
setOption: method(object({
|
|
56347
|
-
deviceId:
|
|
56537
|
+
deviceId: DeviceIdSchema,
|
|
56348
56538
|
key: string().min(1),
|
|
56349
|
-
value:
|
|
56350
|
-
boolean(),
|
|
56351
|
-
string(),
|
|
56352
|
-
number()
|
|
56353
|
-
])
|
|
56539
|
+
value: DishwasherValueSchema
|
|
56354
56540
|
}), _void(), {
|
|
56355
56541
|
kind: "mutation",
|
|
56356
56542
|
auth: "protected"
|
|
56357
|
-
})
|
|
56543
|
+
}),
|
|
56544
|
+
/** What this appliance can do, from its own description — the UI is derived from it. */
|
|
56545
|
+
getOptions: method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" })
|
|
56358
56546
|
},
|
|
56359
56547
|
status: {
|
|
56360
56548
|
schema: DishwasherStatusSchema,
|
|
@@ -70883,6 +71071,12 @@ Object.freeze({
|
|
|
70883
71071
|
addonId: null,
|
|
70884
71072
|
access: "view"
|
|
70885
71073
|
},
|
|
71074
|
+
"dishwasher.getOptions": {
|
|
71075
|
+
capName: "dishwasher",
|
|
71076
|
+
capScope: "device",
|
|
71077
|
+
addonId: null,
|
|
71078
|
+
access: "view"
|
|
71079
|
+
},
|
|
70886
71080
|
"dishwasher.getStatus": {
|
|
70887
71081
|
capName: "dishwasher",
|
|
70888
71082
|
capScope: "device",
|
|
@@ -70895,6 +71089,12 @@ Object.freeze({
|
|
|
70895
71089
|
addonId: null,
|
|
70896
71090
|
access: "create"
|
|
70897
71091
|
},
|
|
71092
|
+
"dishwasher.resume": {
|
|
71093
|
+
capName: "dishwasher",
|
|
71094
|
+
capScope: "device",
|
|
71095
|
+
addonId: null,
|
|
71096
|
+
access: "create"
|
|
71097
|
+
},
|
|
70898
71098
|
"dishwasher.setChildLock": {
|
|
70899
71099
|
capName: "dishwasher",
|
|
70900
71100
|
capScope: "device",
|
|
@@ -75395,6 +75595,12 @@ Object.freeze({
|
|
|
75395
75595
|
addonId: null,
|
|
75396
75596
|
access: "view"
|
|
75397
75597
|
},
|
|
75598
|
+
"storageMigration.moverClearance": {
|
|
75599
|
+
capName: "storage-migration",
|
|
75600
|
+
capScope: "system",
|
|
75601
|
+
addonId: null,
|
|
75602
|
+
access: "view"
|
|
75603
|
+
},
|
|
75398
75604
|
"storageMigration.movers": {
|
|
75399
75605
|
capName: "storage-migration",
|
|
75400
75606
|
capScope: "system",
|
|
@@ -77806,6 +78012,11 @@ Object.freeze({
|
|
|
77806
78012
|
form: "single",
|
|
77807
78013
|
optional: false
|
|
77808
78014
|
}],
|
|
78015
|
+
"dishwasher.getOptions": [{
|
|
78016
|
+
name: "deviceId",
|
|
78017
|
+
form: "single",
|
|
78018
|
+
optional: false
|
|
78019
|
+
}],
|
|
77809
78020
|
"dishwasher.getStatus": [{
|
|
77810
78021
|
name: "deviceId",
|
|
77811
78022
|
form: "single",
|
|
@@ -77816,6 +78027,11 @@ Object.freeze({
|
|
|
77816
78027
|
form: "single",
|
|
77817
78028
|
optional: false
|
|
77818
78029
|
}],
|
|
78030
|
+
"dishwasher.resume": [{
|
|
78031
|
+
name: "deviceId",
|
|
78032
|
+
form: "single",
|
|
78033
|
+
optional: false
|
|
78034
|
+
}],
|
|
77819
78035
|
"dishwasher.setChildLock": [{
|
|
77820
78036
|
name: "deviceId",
|
|
77821
78037
|
form: "single",
|
|
@@ -79902,6 +80118,9 @@ new Map(Object.entries({
|
|
|
79902
80118
|
"wrapper-update-available": "system",
|
|
79903
80119
|
"backup-completed": "system",
|
|
79904
80120
|
"export-completed": "system",
|
|
80121
|
+
"alert-critical": "system",
|
|
80122
|
+
"alert-error": "system",
|
|
80123
|
+
"alert-critical-resolved": "system",
|
|
79905
80124
|
"storage-location-low": "system",
|
|
79906
80125
|
"storage-location-critical": "system",
|
|
79907
80126
|
"storage-location-ok": "system",
|
|
@@ -80026,6 +80245,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
80026
80245
|
"storage-location-ok"
|
|
80027
80246
|
]
|
|
80028
80247
|
},
|
|
80248
|
+
{
|
|
80249
|
+
id: "alerts",
|
|
80250
|
+
family: "system",
|
|
80251
|
+
label: "Alerts",
|
|
80252
|
+
kinds: [
|
|
80253
|
+
"alert-critical",
|
|
80254
|
+
"alert-error",
|
|
80255
|
+
"alert-critical-resolved"
|
|
80256
|
+
]
|
|
80257
|
+
},
|
|
80029
80258
|
{
|
|
80030
80259
|
id: "alarm",
|
|
80031
80260
|
family: "alarm",
|
|
@@ -80070,6 +80299,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
|
|
|
80070
80299
|
return [[descriptor.kind, field]];
|
|
80071
80300
|
})));
|
|
80072
80301
|
Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
|
|
80302
|
+
object({
|
|
80303
|
+
phase: _enum(["raised", "resolved"]),
|
|
80304
|
+
episodeId: string().min(1),
|
|
80305
|
+
alertId: string().min(1),
|
|
80306
|
+
severity: AlertSeveritySchema,
|
|
80307
|
+
category: string(),
|
|
80308
|
+
title: string(),
|
|
80309
|
+
message: string(),
|
|
80310
|
+
sourceType: string().optional(),
|
|
80311
|
+
sourceId: string().optional(),
|
|
80312
|
+
nodeId: string().optional(),
|
|
80313
|
+
/** The alert's own action link (where the operator acts on it), when it has one. */
|
|
80314
|
+
actionUrl: string().optional(),
|
|
80315
|
+
at: number()
|
|
80316
|
+
});
|
|
80073
80317
|
var RULE_BODY_ONLY = ["body"];
|
|
80074
80318
|
var RULE_TEXT = ["title", "body"];
|
|
80075
80319
|
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
@@ -80079,6 +80323,11 @@ var TANK = [
|
|
|
80079
80323
|
"device-tank-full",
|
|
80080
80324
|
"device-tank-normal"
|
|
80081
80325
|
];
|
|
80326
|
+
var ALERT_EPISODE = [
|
|
80327
|
+
"alert-critical",
|
|
80328
|
+
"alert-error",
|
|
80329
|
+
"alert-critical-resolved"
|
|
80330
|
+
];
|
|
80082
80331
|
var UPDATES = [
|
|
80083
80332
|
"addon-update-available",
|
|
80084
80333
|
"server-update-available",
|
|
@@ -80271,14 +80520,14 @@ var STATE_SUMMARY_VARS = [
|
|
|
80271
80520
|
([...RULE_TEXT], [...CONSUMABLE]),
|
|
80272
80521
|
([...RULE_TEXT], [...TANK]),
|
|
80273
80522
|
[...RULE_TEXT],
|
|
80274
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
80275
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
80276
|
-
[...RULE_TEXT],
|
|
80523
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
80524
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
80277
80525
|
[...RULE_TEXT],
|
|
80278
80526
|
[...RULE_TEXT],
|
|
80279
80527
|
[...RULE_TEXT],
|
|
80280
80528
|
[...RULE_TEXT],
|
|
80281
80529
|
[...RULE_TEXT],
|
|
80530
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
80282
80531
|
[...RULE_TEXT],
|
|
80283
80532
|
[...RULE_TEXT],
|
|
80284
80533
|
[...RULE_TEXT],
|
|
@@ -80296,7 +80545,11 @@ var STATE_SUMMARY_VARS = [
|
|
|
80296
80545
|
[...RULE_TEXT],
|
|
80297
80546
|
[...RULE_TEXT],
|
|
80298
80547
|
[...RULE_TEXT],
|
|
80299
|
-
[...RULE_TEXT],
|
|
80548
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
80549
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
80550
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
80551
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
80552
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
80300
80553
|
[...RULE_TEXT],
|
|
80301
80554
|
[...RULE_TEXT],
|
|
80302
80555
|
[...RULE_TEXT],
|