@camstack/addon-notifiers 1.2.602 → 1.2.604
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 +480 -240
- package/dist/addon.mjs +480 -240
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -29,7 +29,7 @@ let node_fs = require("node:fs");
|
|
|
29
29
|
let node_path = require("node:path");
|
|
30
30
|
node_path = __toESM(node_path);
|
|
31
31
|
let node_url = require("node:url");
|
|
32
|
-
//#region ../types/dist/event-category-
|
|
32
|
+
//#region ../types/dist/event-category-DOl51-Ij.mjs
|
|
33
33
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
34
34
|
EventCategory["SystemBoot"] = "system.boot";
|
|
35
35
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -108,9 +108,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
108
108
|
/**
|
|
109
109
|
* The node's one-shot runner boot check (D877): planned runners against the
|
|
110
110
|
* process service, `degraded` when any is failed, refused or missing. The
|
|
111
|
-
* alert centre turns it into one
|
|
111
|
+
* alert centre turns it into one critical alert.
|
|
112
112
|
*/
|
|
113
113
|
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
114
|
+
/**
|
|
115
|
+
* An alert EPISODE opened or closed, emitted by the alert centre for alerts
|
|
116
|
+
* of severity `critical` or `error` (`AlertEpisodePayload`). The alert
|
|
117
|
+
* centre sends no notification of its own: Notification Center turns this
|
|
118
|
+
* into the `alert-critical` / `alert-error` / `alert-critical-resolved`
|
|
119
|
+
* system-event kinds, and reconciles from the alerts store because a bus
|
|
120
|
+
* event may be dropped (D8, D11).
|
|
121
|
+
*/
|
|
122
|
+
EventCategory["AlertEpisode"] = "alert.episode";
|
|
114
123
|
EventCategory["AddonError"] = "addon.error";
|
|
115
124
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
116
125
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -5568,7 +5577,7 @@ var ZodIssueCode = {
|
|
|
5568
5577
|
var ZodFirstPartyTypeKind;
|
|
5569
5578
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5570
5579
|
//#endregion
|
|
5571
|
-
//#region ../types/dist/sleep-
|
|
5580
|
+
//#region ../types/dist/sleep-BxjU_fJM.mjs
|
|
5572
5581
|
/**
|
|
5573
5582
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5574
5583
|
* window to float samples (D455).
|
|
@@ -7950,6 +7959,12 @@ function normalizeAddonInitResult(result) {
|
|
|
7950
7959
|
if (Array.isArray(result)) return { providers: result };
|
|
7951
7960
|
return result;
|
|
7952
7961
|
}
|
|
7962
|
+
/**
|
|
7963
|
+
* The share-view scope kinds a `csv_*` share token can carry. The hub mints
|
|
7964
|
+
* and validates them (`share-token.service.ts` builds its enum from this
|
|
7965
|
+
* list); a data plane names the kinds it ACCEPTS in `share`.
|
|
7966
|
+
*/
|
|
7967
|
+
var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
|
|
7953
7968
|
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
7954
7969
|
var PeerBytesTicketSchema = object({
|
|
7955
7970
|
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
@@ -12901,6 +12916,229 @@ var ConvertResultSchema = object({
|
|
|
12901
12916
|
files: array(string()).readonly()
|
|
12902
12917
|
})).readonly()
|
|
12903
12918
|
});
|
|
12919
|
+
/**
|
|
12920
|
+
* Zod schemas for persisted record types.
|
|
12921
|
+
*
|
|
12922
|
+
* These schemas serve as the single source of truth for types that are
|
|
12923
|
+
* stored in the settings-store backend and retrieved via tRPC. They
|
|
12924
|
+
* replace the manual TypeScript interfaces with schema-derived types,
|
|
12925
|
+
* enabling runtime validation when reading from the backend.
|
|
12926
|
+
*
|
|
12927
|
+
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
12928
|
+
* keeps the original name for backward compatibility.
|
|
12929
|
+
*/
|
|
12930
|
+
/**
|
|
12931
|
+
* Auth model (v2 — 2026-05-12 caps-only):
|
|
12932
|
+
*
|
|
12933
|
+
* Two principals:
|
|
12934
|
+
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
12935
|
+
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
12936
|
+
*
|
|
12937
|
+
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
12938
|
+
* `super_admin` — collapsed onto the single boolean because every
|
|
12939
|
+
* non-admin caller is governed by the same scope-check rules; the
|
|
12940
|
+
* distinction was only ever used to route role-specific procedures
|
|
12941
|
+
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
12942
|
+
* with `isAdmin: false` + an explicit scope list.
|
|
12943
|
+
*/
|
|
12944
|
+
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
12945
|
+
var MethodAccessSchema = _enum([
|
|
12946
|
+
"view",
|
|
12947
|
+
"create",
|
|
12948
|
+
"delete"
|
|
12949
|
+
]);
|
|
12950
|
+
/**
|
|
12951
|
+
* A single scope grant. Three forms — checked in matcher with OR
|
|
12952
|
+
* semantics; the first match decides whether the call passes:
|
|
12953
|
+
*
|
|
12954
|
+
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
12955
|
+
* cap with the matching `scope` declaration. New caps inherit grants
|
|
12956
|
+
* automatically — adding a device cap to the codebase makes it
|
|
12957
|
+
* reachable to every user with `category:device [...]` without a
|
|
12958
|
+
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
12959
|
+
*
|
|
12960
|
+
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
12961
|
+
* useful when an integration needs to interact with one specific
|
|
12962
|
+
* addon's surface regardless of how many caps it exports.
|
|
12963
|
+
*
|
|
12964
|
+
* - `capability` — the most precise form. Single cap name. Use for
|
|
12965
|
+
* integration tokens where you want to grant `addons.installPackage`
|
|
12966
|
+
* and nothing else.
|
|
12967
|
+
*
|
|
12968
|
+
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
12969
|
+
* "give me everything" escape; there is no wildcard scope.
|
|
12970
|
+
*/
|
|
12971
|
+
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
12972
|
+
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
12973
|
+
var CapScopeSchema = _enum(["device", "system"]);
|
|
12974
|
+
/**
|
|
12975
|
+
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
12976
|
+
*
|
|
12977
|
+
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
12978
|
+
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
12979
|
+
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
12980
|
+
* AFTER the grant was minted — no re-grant, no re-login.
|
|
12981
|
+
*
|
|
12982
|
+
* - `all` — every device in the deployment. The broad viewer/operator
|
|
12983
|
+
* lever without a `category` grant (a `category` grant also covers device
|
|
12984
|
+
* caps that carry no deviceId; `all` is specifically the device set).
|
|
12985
|
+
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
12986
|
+
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
12987
|
+
* is NOT covered until the grant is edited.
|
|
12988
|
+
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
12989
|
+
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
12990
|
+
* re-resolves on the next request.
|
|
12991
|
+
* - `locations` — every device whose operator-assigned `location` label is
|
|
12992
|
+
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
12993
|
+
* null/unset location matches NO `locations` selector.
|
|
12994
|
+
*/
|
|
12995
|
+
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
12996
|
+
object({ kind: literal("all") }),
|
|
12997
|
+
object({
|
|
12998
|
+
kind: literal("ids"),
|
|
12999
|
+
ids: array(number().int()).min(1)
|
|
13000
|
+
}),
|
|
13001
|
+
object({
|
|
13002
|
+
kind: literal("types"),
|
|
13003
|
+
types: array(_enum(DeviceType)).min(1)
|
|
13004
|
+
}),
|
|
13005
|
+
object({
|
|
13006
|
+
kind: literal("locations"),
|
|
13007
|
+
locations: array(string().min(1)).min(1)
|
|
13008
|
+
})
|
|
13009
|
+
]);
|
|
13010
|
+
var DeviceTokenScopeSchema = object({
|
|
13011
|
+
type: literal("device"),
|
|
13012
|
+
/** The device SET this grant covers — resolved against the live fleet. */
|
|
13013
|
+
selector: DeviceSelectorSchema,
|
|
13014
|
+
access: array(MethodAccessSchema).min(1),
|
|
13015
|
+
/**
|
|
13016
|
+
* Whether a grant on a PARENT device transparently covers its accessory
|
|
13017
|
+
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
13018
|
+
* Direction is parent → children ONLY.
|
|
13019
|
+
*
|
|
13020
|
+
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
13021
|
+
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
13022
|
+
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
13023
|
+
* operator must grant on the child, not inherit from the parent). Set it
|
|
13024
|
+
* explicitly to override that default per grant.
|
|
13025
|
+
*/
|
|
13026
|
+
includeLinked: boolean().optional()
|
|
13027
|
+
});
|
|
13028
|
+
/**
|
|
13029
|
+
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
13030
|
+
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
13031
|
+
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
13032
|
+
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
13033
|
+
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
13034
|
+
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
13035
|
+
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
13036
|
+
* migration covers both without a flag day. No cast — the raw object is read
|
|
13037
|
+
* through `Reflect.get` (its static type is `unknown`).
|
|
13038
|
+
*/
|
|
13039
|
+
function migrateLegacyTokenScope(raw) {
|
|
13040
|
+
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
13041
|
+
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
13042
|
+
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
13043
|
+
const targets = Reflect.get(raw, "targets");
|
|
13044
|
+
if (!Array.isArray(targets)) return raw;
|
|
13045
|
+
return {
|
|
13046
|
+
type: "device",
|
|
13047
|
+
selector: {
|
|
13048
|
+
kind: "ids",
|
|
13049
|
+
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
13050
|
+
},
|
|
13051
|
+
access: Reflect.get(raw, "access")
|
|
13052
|
+
};
|
|
13053
|
+
}
|
|
13054
|
+
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
13055
|
+
object({
|
|
13056
|
+
type: literal("category"),
|
|
13057
|
+
target: CapScopeSchema,
|
|
13058
|
+
access: array(MethodAccessSchema).min(1)
|
|
13059
|
+
}),
|
|
13060
|
+
object({
|
|
13061
|
+
type: literal("capability"),
|
|
13062
|
+
target: string(),
|
|
13063
|
+
access: array(MethodAccessSchema).min(1)
|
|
13064
|
+
}),
|
|
13065
|
+
object({
|
|
13066
|
+
type: literal("addon"),
|
|
13067
|
+
target: string(),
|
|
13068
|
+
access: array(MethodAccessSchema).min(1)
|
|
13069
|
+
}),
|
|
13070
|
+
DeviceTokenScopeSchema
|
|
13071
|
+
]));
|
|
13072
|
+
object({
|
|
13073
|
+
id: string(),
|
|
13074
|
+
username: string(),
|
|
13075
|
+
passwordHash: string(),
|
|
13076
|
+
/**
|
|
13077
|
+
* Admin bypass. When true, the middleware skips the scope-access
|
|
13078
|
+
* check entirely. There is no other axis of privilege; the legacy
|
|
13079
|
+
* role enum collapsed onto this boolean in v2.
|
|
13080
|
+
*/
|
|
13081
|
+
isAdmin: boolean().default(false),
|
|
13082
|
+
allowedProviders: AllowedProviderSchema,
|
|
13083
|
+
allowedDevices: AllowedDevicesSchema,
|
|
13084
|
+
/**
|
|
13085
|
+
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
13086
|
+
* ignored. Non-admins without scopes are locked out of every
|
|
13087
|
+
* protected call.
|
|
13088
|
+
*/
|
|
13089
|
+
scopes: array(TokenScopeSchema).default([]),
|
|
13090
|
+
createdAt: number(),
|
|
13091
|
+
updatedAt: number()
|
|
13092
|
+
});
|
|
13093
|
+
object({
|
|
13094
|
+
id: string(),
|
|
13095
|
+
label: string(),
|
|
13096
|
+
isAdmin: boolean().default(false),
|
|
13097
|
+
allowedProviders: AllowedProviderSchema,
|
|
13098
|
+
allowedDevices: AllowedDevicesSchema,
|
|
13099
|
+
tokenHash: string(),
|
|
13100
|
+
tokenPrefix: string(),
|
|
13101
|
+
createdAt: number(),
|
|
13102
|
+
lastUsedAt: number().optional()
|
|
13103
|
+
});
|
|
13104
|
+
object({
|
|
13105
|
+
id: string(),
|
|
13106
|
+
userId: string(),
|
|
13107
|
+
name: string(),
|
|
13108
|
+
tokenHash: string(),
|
|
13109
|
+
tokenPrefix: string(),
|
|
13110
|
+
scopes: array(TokenScopeSchema),
|
|
13111
|
+
expiresAt: number().nullish(),
|
|
13112
|
+
lastUsedAt: number().nullish(),
|
|
13113
|
+
createdAt: number()
|
|
13114
|
+
});
|
|
13115
|
+
/** What a share-view grant lets its holder see. */
|
|
13116
|
+
var ShareViewGrantSchema = object({
|
|
13117
|
+
kind: _enum(SHARE_VIEW_KINDS),
|
|
13118
|
+
deviceIds: array(number().int().nonnegative()).min(1).max(64),
|
|
13119
|
+
/** Talk-back, opt-in at mint time; absent means off. */
|
|
13120
|
+
talk: boolean().optional()
|
|
13121
|
+
});
|
|
13122
|
+
var ShareViewScopeSchema = object({
|
|
13123
|
+
type: literal("share-view"),
|
|
13124
|
+
grant: ShareViewGrantSchema
|
|
13125
|
+
});
|
|
13126
|
+
var AddonRoutesScopeSchema = object({
|
|
13127
|
+
type: literal("addon-routes"),
|
|
13128
|
+
access: array(MethodAccessSchema).min(1)
|
|
13129
|
+
});
|
|
13130
|
+
var CredentialScopeSchema = union([
|
|
13131
|
+
literal("*"),
|
|
13132
|
+
ShareViewScopeSchema,
|
|
13133
|
+
AddonRoutesScopeSchema,
|
|
13134
|
+
TokenScopeSchema
|
|
13135
|
+
]);
|
|
13136
|
+
object({
|
|
13137
|
+
kind: literal("credential"),
|
|
13138
|
+
sub: string().min(1),
|
|
13139
|
+
jti: string().min(16),
|
|
13140
|
+
scopes: array(CredentialScopeSchema).min(1)
|
|
13141
|
+
});
|
|
12904
13142
|
_enum(["new-session", "step-up"]);
|
|
12905
13143
|
/** The languages the hub's app landing pages are written in (D858). */
|
|
12906
13144
|
var AppPageLangSchema = _enum(["en", "it"]);
|
|
@@ -13636,7 +13874,14 @@ var AlertSeveritySchema = _enum([
|
|
|
13636
13874
|
]);
|
|
13637
13875
|
var AlertActionSchema = object({
|
|
13638
13876
|
label: string(),
|
|
13639
|
-
href: string().optional()
|
|
13877
|
+
href: string().optional(),
|
|
13878
|
+
/**
|
|
13879
|
+
* How `href` is followed. Absent / `app`: an admin-ui route (client-side).
|
|
13880
|
+
* `server`: a route the HUB serves (an addon HTTP route such as an OAuth
|
|
13881
|
+
* start) — the browser must leave the SPA with a full navigation, because
|
|
13882
|
+
* the SPA has no such route and would bounce to the home page.
|
|
13883
|
+
*/
|
|
13884
|
+
navigation: _enum(["app", "server"]).optional()
|
|
13640
13885
|
});
|
|
13641
13886
|
var AlertStatusSchema = _enum([
|
|
13642
13887
|
"active",
|
|
@@ -42034,6 +42279,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
42034
42279
|
"server-updated",
|
|
42035
42280
|
"export-completed",
|
|
42036
42281
|
"backup-completed",
|
|
42282
|
+
"alert-critical",
|
|
42283
|
+
"alert-error",
|
|
42284
|
+
"alert-critical-resolved",
|
|
42037
42285
|
"camera-online",
|
|
42038
42286
|
"camera-offline",
|
|
42039
42287
|
"camera-disabled",
|
|
@@ -44069,202 +44317,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
44069
44317
|
auth: "admin"
|
|
44070
44318
|
}), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
|
|
44071
44319
|
/**
|
|
44072
|
-
* Zod schemas for persisted record types.
|
|
44073
|
-
*
|
|
44074
|
-
* These schemas serve as the single source of truth for types that are
|
|
44075
|
-
* stored in the settings-store backend and retrieved via tRPC. They
|
|
44076
|
-
* replace the manual TypeScript interfaces with schema-derived types,
|
|
44077
|
-
* enabling runtime validation when reading from the backend.
|
|
44078
|
-
*
|
|
44079
|
-
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
44080
|
-
* keeps the original name for backward compatibility.
|
|
44081
|
-
*/
|
|
44082
|
-
/**
|
|
44083
|
-
* Auth model (v2 — 2026-05-12 caps-only):
|
|
44084
|
-
*
|
|
44085
|
-
* Two principals:
|
|
44086
|
-
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
44087
|
-
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
44088
|
-
*
|
|
44089
|
-
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
44090
|
-
* `super_admin` — collapsed onto the single boolean because every
|
|
44091
|
-
* non-admin caller is governed by the same scope-check rules; the
|
|
44092
|
-
* distinction was only ever used to route role-specific procedures
|
|
44093
|
-
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
44094
|
-
* with `isAdmin: false` + an explicit scope list.
|
|
44095
|
-
*/
|
|
44096
|
-
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
44097
|
-
var MethodAccessSchema = _enum([
|
|
44098
|
-
"view",
|
|
44099
|
-
"create",
|
|
44100
|
-
"delete"
|
|
44101
|
-
]);
|
|
44102
|
-
/**
|
|
44103
|
-
* A single scope grant. Three forms — checked in matcher with OR
|
|
44104
|
-
* semantics; the first match decides whether the call passes:
|
|
44105
|
-
*
|
|
44106
|
-
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
44107
|
-
* cap with the matching `scope` declaration. New caps inherit grants
|
|
44108
|
-
* automatically — adding a device cap to the codebase makes it
|
|
44109
|
-
* reachable to every user with `category:device [...]` without a
|
|
44110
|
-
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
44111
|
-
*
|
|
44112
|
-
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
44113
|
-
* useful when an integration needs to interact with one specific
|
|
44114
|
-
* addon's surface regardless of how many caps it exports.
|
|
44115
|
-
*
|
|
44116
|
-
* - `capability` — the most precise form. Single cap name. Use for
|
|
44117
|
-
* integration tokens where you want to grant `addons.installPackage`
|
|
44118
|
-
* and nothing else.
|
|
44119
|
-
*
|
|
44120
|
-
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
44121
|
-
* "give me everything" escape; there is no wildcard scope.
|
|
44122
|
-
*/
|
|
44123
|
-
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
44124
|
-
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
44125
|
-
var CapScopeSchema = _enum(["device", "system"]);
|
|
44126
|
-
/**
|
|
44127
|
-
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
44128
|
-
*
|
|
44129
|
-
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
44130
|
-
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
44131
|
-
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
44132
|
-
* AFTER the grant was minted — no re-grant, no re-login.
|
|
44133
|
-
*
|
|
44134
|
-
* - `all` — every device in the deployment. The broad viewer/operator
|
|
44135
|
-
* lever without a `category` grant (a `category` grant also covers device
|
|
44136
|
-
* caps that carry no deviceId; `all` is specifically the device set).
|
|
44137
|
-
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
44138
|
-
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
44139
|
-
* is NOT covered until the grant is edited.
|
|
44140
|
-
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
44141
|
-
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
44142
|
-
* re-resolves on the next request.
|
|
44143
|
-
* - `locations` — every device whose operator-assigned `location` label is
|
|
44144
|
-
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
44145
|
-
* null/unset location matches NO `locations` selector.
|
|
44146
|
-
*/
|
|
44147
|
-
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
44148
|
-
object({ kind: literal("all") }),
|
|
44149
|
-
object({
|
|
44150
|
-
kind: literal("ids"),
|
|
44151
|
-
ids: array(number().int()).min(1)
|
|
44152
|
-
}),
|
|
44153
|
-
object({
|
|
44154
|
-
kind: literal("types"),
|
|
44155
|
-
types: array(_enum(DeviceType)).min(1)
|
|
44156
|
-
}),
|
|
44157
|
-
object({
|
|
44158
|
-
kind: literal("locations"),
|
|
44159
|
-
locations: array(string().min(1)).min(1)
|
|
44160
|
-
})
|
|
44161
|
-
]);
|
|
44162
|
-
var DeviceTokenScopeSchema = object({
|
|
44163
|
-
type: literal("device"),
|
|
44164
|
-
/** The device SET this grant covers — resolved against the live fleet. */
|
|
44165
|
-
selector: DeviceSelectorSchema,
|
|
44166
|
-
access: array(MethodAccessSchema).min(1),
|
|
44167
|
-
/**
|
|
44168
|
-
* Whether a grant on a PARENT device transparently covers its accessory
|
|
44169
|
-
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
44170
|
-
* Direction is parent → children ONLY.
|
|
44171
|
-
*
|
|
44172
|
-
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
44173
|
-
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
44174
|
-
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
44175
|
-
* operator must grant on the child, not inherit from the parent). Set it
|
|
44176
|
-
* explicitly to override that default per grant.
|
|
44177
|
-
*/
|
|
44178
|
-
includeLinked: boolean().optional()
|
|
44179
|
-
});
|
|
44180
|
-
/**
|
|
44181
|
-
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
44182
|
-
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
44183
|
-
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
44184
|
-
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
44185
|
-
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
44186
|
-
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
44187
|
-
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
44188
|
-
* migration covers both without a flag day. No cast — the raw object is read
|
|
44189
|
-
* through `Reflect.get` (its static type is `unknown`).
|
|
44190
|
-
*/
|
|
44191
|
-
function migrateLegacyTokenScope(raw) {
|
|
44192
|
-
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
44193
|
-
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
44194
|
-
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
44195
|
-
const targets = Reflect.get(raw, "targets");
|
|
44196
|
-
if (!Array.isArray(targets)) return raw;
|
|
44197
|
-
return {
|
|
44198
|
-
type: "device",
|
|
44199
|
-
selector: {
|
|
44200
|
-
kind: "ids",
|
|
44201
|
-
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
44202
|
-
},
|
|
44203
|
-
access: Reflect.get(raw, "access")
|
|
44204
|
-
};
|
|
44205
|
-
}
|
|
44206
|
-
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
44207
|
-
object({
|
|
44208
|
-
type: literal("category"),
|
|
44209
|
-
target: CapScopeSchema,
|
|
44210
|
-
access: array(MethodAccessSchema).min(1)
|
|
44211
|
-
}),
|
|
44212
|
-
object({
|
|
44213
|
-
type: literal("capability"),
|
|
44214
|
-
target: string(),
|
|
44215
|
-
access: array(MethodAccessSchema).min(1)
|
|
44216
|
-
}),
|
|
44217
|
-
object({
|
|
44218
|
-
type: literal("addon"),
|
|
44219
|
-
target: string(),
|
|
44220
|
-
access: array(MethodAccessSchema).min(1)
|
|
44221
|
-
}),
|
|
44222
|
-
DeviceTokenScopeSchema
|
|
44223
|
-
]));
|
|
44224
|
-
object({
|
|
44225
|
-
id: string(),
|
|
44226
|
-
username: string(),
|
|
44227
|
-
passwordHash: string(),
|
|
44228
|
-
/**
|
|
44229
|
-
* Admin bypass. When true, the middleware skips the scope-access
|
|
44230
|
-
* check entirely. There is no other axis of privilege; the legacy
|
|
44231
|
-
* role enum collapsed onto this boolean in v2.
|
|
44232
|
-
*/
|
|
44233
|
-
isAdmin: boolean().default(false),
|
|
44234
|
-
allowedProviders: AllowedProviderSchema,
|
|
44235
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44236
|
-
/**
|
|
44237
|
-
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
44238
|
-
* ignored. Non-admins without scopes are locked out of every
|
|
44239
|
-
* protected call.
|
|
44240
|
-
*/
|
|
44241
|
-
scopes: array(TokenScopeSchema).default([]),
|
|
44242
|
-
createdAt: number(),
|
|
44243
|
-
updatedAt: number()
|
|
44244
|
-
});
|
|
44245
|
-
object({
|
|
44246
|
-
id: string(),
|
|
44247
|
-
label: string(),
|
|
44248
|
-
isAdmin: boolean().default(false),
|
|
44249
|
-
allowedProviders: AllowedProviderSchema,
|
|
44250
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44251
|
-
tokenHash: string(),
|
|
44252
|
-
tokenPrefix: string(),
|
|
44253
|
-
createdAt: number(),
|
|
44254
|
-
lastUsedAt: number().optional()
|
|
44255
|
-
});
|
|
44256
|
-
object({
|
|
44257
|
-
id: string(),
|
|
44258
|
-
userId: string(),
|
|
44259
|
-
name: string(),
|
|
44260
|
-
tokenHash: string(),
|
|
44261
|
-
tokenPrefix: string(),
|
|
44262
|
-
scopes: array(TokenScopeSchema),
|
|
44263
|
-
expiresAt: number().nullish(),
|
|
44264
|
-
lastUsedAt: number().nullish(),
|
|
44265
|
-
createdAt: number()
|
|
44266
|
-
});
|
|
44267
|
-
/**
|
|
44268
44320
|
* `oauth-integration` — a collection cap by which an addon declares
|
|
44269
44321
|
* itself a linkable OAuth client of the hub's core `/oauth2/*` server.
|
|
44270
44322
|
* Each provider returns a static descriptor; the core enumerates them
|
|
@@ -51066,7 +51118,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
51066
51118
|
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
51067
51119
|
kind: "mutation",
|
|
51068
51120
|
auth: "admin"
|
|
51069
|
-
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({
|
|
51121
|
+
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
|
|
51122
|
+
clear: boolean(),
|
|
51123
|
+
repointLocationId: string().optional()
|
|
51124
|
+
}), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
|
|
51070
51125
|
kind: "mutation",
|
|
51071
51126
|
auth: "admin"
|
|
51072
51127
|
}), method(StorageCleanupInputSchema, object({ jobId: string() }), {
|
|
@@ -54501,6 +54556,11 @@ object({
|
|
|
54501
54556
|
*
|
|
54502
54557
|
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
54503
54558
|
* provider refreshes the slice on an interval and eagerly after commands.
|
|
54559
|
+
*
|
|
54560
|
+
* UNKNOWN IS NOT OFF. Every field the appliance reports separately is
|
|
54561
|
+
* nullable: `null` means "not known right now" (the appliance has not said,
|
|
54562
|
+
* the link is down, or the description does not carry it) and is never
|
|
54563
|
+
* rendered or exported as `false` / `0`. `availability` says why.
|
|
54504
54564
|
*/
|
|
54505
54565
|
var DishwasherStateSchema = _enum([
|
|
54506
54566
|
"idle",
|
|
@@ -54510,112 +54570,227 @@ var DishwasherStateSchema = _enum([
|
|
|
54510
54570
|
"error",
|
|
54511
54571
|
"unavailable"
|
|
54512
54572
|
]);
|
|
54573
|
+
/**
|
|
54574
|
+
* The appliance's own operation state, uncollapsed. `state` above is the coarse
|
|
54575
|
+
* view for compact surfaces; this is what the appliance said.
|
|
54576
|
+
*/
|
|
54577
|
+
var DishwasherOperationStateSchema = _enum([
|
|
54578
|
+
"Inactive",
|
|
54579
|
+
"Ready",
|
|
54580
|
+
"DelayedStart",
|
|
54581
|
+
"Run",
|
|
54582
|
+
"Pause",
|
|
54583
|
+
"ActionRequired",
|
|
54584
|
+
"Finished",
|
|
54585
|
+
"Error",
|
|
54586
|
+
"Aborting"
|
|
54587
|
+
]);
|
|
54588
|
+
/**
|
|
54589
|
+
* Why fields may be `null`:
|
|
54590
|
+
* - `available` — the link is up and the description is loaded;
|
|
54591
|
+
* - `offline` — the local link is down (values are unknown, not last-known);
|
|
54592
|
+
* - `description-missing` — the link is up but the appliance's description could not
|
|
54593
|
+
* be loaded, so its values cannot be decoded.
|
|
54594
|
+
*/
|
|
54595
|
+
var DishwasherAvailabilitySchema = _enum([
|
|
54596
|
+
"available",
|
|
54597
|
+
"offline",
|
|
54598
|
+
"description-missing"
|
|
54599
|
+
]);
|
|
54513
54600
|
var DishwasherConsumableLevelSchema = _enum([
|
|
54514
54601
|
"ok",
|
|
54515
54602
|
"low",
|
|
54516
54603
|
"empty"
|
|
54517
54604
|
]);
|
|
54518
54605
|
object({
|
|
54606
|
+
availability: DishwasherAvailabilitySchema,
|
|
54607
|
+
/** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
|
|
54519
54608
|
state: DishwasherStateSchema,
|
|
54520
|
-
/**
|
|
54609
|
+
/** The appliance's operation state as reported; null when not known. */
|
|
54610
|
+
operationState: DishwasherOperationStateSchema.nullable(),
|
|
54611
|
+
/** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
|
|
54521
54612
|
program: string().nullable(),
|
|
54522
|
-
/**
|
|
54613
|
+
/** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
|
|
54614
|
+
selectedProgram: string().nullable(),
|
|
54615
|
+
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
54523
54616
|
availablePrograms: array(string()),
|
|
54524
|
-
/**
|
|
54525
|
-
|
|
54617
|
+
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
54618
|
+
remainingSeconds: number().int().nonnegative().nullable(),
|
|
54619
|
+
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
54620
|
+
delayedStartSeconds: number().int().nonnegative().nullable(),
|
|
54526
54621
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
54527
54622
|
progressPercent: number().min(0).max(100).nullable(),
|
|
54528
|
-
/** True when the door is reported open. */
|
|
54529
|
-
doorOpen: boolean(),
|
|
54530
|
-
/** True when
|
|
54531
|
-
|
|
54532
|
-
/**
|
|
54533
|
-
|
|
54623
|
+
/** True when the door is reported open; null when the door state is not known. */
|
|
54624
|
+
doorOpen: boolean().nullable(),
|
|
54625
|
+
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
54626
|
+
doorLocked: boolean().nullable(),
|
|
54627
|
+
/** True when remote start is allowed (door closed, power on, etc.); null when not known. */
|
|
54628
|
+
remoteStartAllowed: boolean().nullable(),
|
|
54629
|
+
/** True when the appliance accepts remote control now; null when not known. */
|
|
54630
|
+
remoteControlActive: boolean().nullable(),
|
|
54631
|
+
/** True while somebody operates the appliance at its panel; null when not reported. */
|
|
54632
|
+
localControlActive: boolean().nullable(),
|
|
54633
|
+
/** Main power / switched-on state; null when not known. */
|
|
54634
|
+
powerOn: boolean().nullable(),
|
|
54635
|
+
/** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
|
|
54636
|
+
powerState: string().nullable(),
|
|
54534
54637
|
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
54535
54638
|
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
54536
|
-
|
|
54537
|
-
|
|
54639
|
+
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
54640
|
+
halfLoad: boolean().nullable(),
|
|
54641
|
+
hygienePlus: boolean().nullable(),
|
|
54538
54642
|
/** Extra dry option when the appliance exposes it. */
|
|
54539
|
-
extraDry: boolean(),
|
|
54643
|
+
extraDry: boolean().nullable(),
|
|
54540
54644
|
/** Intensive zone (lower basket) when the appliance exposes it. */
|
|
54541
|
-
intensiveZone: boolean(),
|
|
54645
|
+
intensiveZone: boolean().nullable(),
|
|
54542
54646
|
/** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
|
|
54543
|
-
varioSpeedPlus: boolean(),
|
|
54544
|
-
/** Child lock (controls disabled on the appliance). */
|
|
54545
|
-
childLock: boolean(),
|
|
54647
|
+
varioSpeedPlus: boolean().nullable(),
|
|
54648
|
+
/** Child lock (controls disabled on the appliance); null when not known. */
|
|
54649
|
+
childLock: boolean().nullable(),
|
|
54650
|
+
/** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
|
|
54651
|
+
activeEvents: array(string()),
|
|
54652
|
+
/** Numeric error code when the appliance reports one; null otherwise. */
|
|
54546
54653
|
errorCode: number().nullable(),
|
|
54654
|
+
/** Name of the raised alert-level event while the appliance is in error; null otherwise. */
|
|
54547
54655
|
errorLabel: string().nullable(),
|
|
54656
|
+
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
54548
54657
|
lastFetchedAt: number()
|
|
54549
54658
|
});
|
|
54550
|
-
|
|
54659
|
+
var DeviceIdSchema = number().int().nonnegative();
|
|
54660
|
+
/** A value a program option or setting can take. */
|
|
54661
|
+
var DishwasherValueSchema = union([
|
|
54662
|
+
boolean(),
|
|
54663
|
+
string(),
|
|
54664
|
+
number()
|
|
54665
|
+
]);
|
|
54666
|
+
var DishwasherAccessSchema = _enum([
|
|
54667
|
+
"none",
|
|
54668
|
+
"read",
|
|
54669
|
+
"readWrite",
|
|
54670
|
+
"writeOnly",
|
|
54671
|
+
"readStatic"
|
|
54672
|
+
]);
|
|
54673
|
+
/**
|
|
54674
|
+
* One option or setting the appliance declares, with the constraints its description
|
|
54675
|
+
* gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
|
|
54676
|
+
*/
|
|
54677
|
+
var DishwasherOptionDescriptorSchema = object({
|
|
54678
|
+
/** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
|
|
54679
|
+
key: string(),
|
|
54680
|
+
/** Last segment of the key, for display. */
|
|
54681
|
+
name: string(),
|
|
54682
|
+
type: _enum([
|
|
54683
|
+
"boolean",
|
|
54684
|
+
"number",
|
|
54685
|
+
"enum",
|
|
54686
|
+
"string"
|
|
54687
|
+
]),
|
|
54688
|
+
access: DishwasherAccessSchema,
|
|
54689
|
+
/** The appliance reports this entity as currently available. */
|
|
54690
|
+
available: boolean(),
|
|
54691
|
+
/** Unit the description declares for a number; null when it declares none. */
|
|
54692
|
+
unit: string().nullable(),
|
|
54693
|
+
min: number().nullable(),
|
|
54694
|
+
max: number().nullable(),
|
|
54695
|
+
step: number().nullable(),
|
|
54696
|
+
/** Allowed members of an enum; null for other types. */
|
|
54697
|
+
enumValues: array(string()).nullable(),
|
|
54698
|
+
defaultValue: DishwasherValueSchema.nullable()
|
|
54699
|
+
});
|
|
54700
|
+
var DishwasherProgramSchema = object({
|
|
54701
|
+
/** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
|
|
54702
|
+
key: string(),
|
|
54703
|
+
name: string(),
|
|
54704
|
+
/** The appliance currently offers this program. */
|
|
54705
|
+
available: boolean(),
|
|
54706
|
+
/** The options this program lists, with the program-level access / availability / default. */
|
|
54707
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
54708
|
+
});
|
|
54709
|
+
var DishwasherOptionsSchema = object({
|
|
54710
|
+
availability: DishwasherAvailabilitySchema,
|
|
54711
|
+
/** What the appliance can be told to do, from the commands its description declares. */
|
|
54712
|
+
supportsStart: boolean(),
|
|
54713
|
+
supportsPause: boolean(),
|
|
54714
|
+
supportsResume: boolean(),
|
|
54715
|
+
supportsStop: boolean(),
|
|
54716
|
+
supportsPower: boolean(),
|
|
54717
|
+
/** Every program the description lists, with its options. */
|
|
54718
|
+
programs: array(DishwasherProgramSchema),
|
|
54719
|
+
/** Every option and setting entity the description lists (programs reference these by key). */
|
|
54720
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
54721
|
+
});
|
|
54722
|
+
DeviceType.Dishwasher, method(object({
|
|
54723
|
+
deviceId: DeviceIdSchema,
|
|
54724
|
+
program: string().min(1).optional(),
|
|
54725
|
+
options: record(string(), DishwasherValueSchema).optional()
|
|
54726
|
+
}), _void(), {
|
|
54551
54727
|
kind: "mutation",
|
|
54552
54728
|
auth: "protected"
|
|
54553
|
-
}), method(object({ deviceId:
|
|
54729
|
+
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
54554
54730
|
kind: "mutation",
|
|
54555
54731
|
auth: "protected"
|
|
54556
|
-
}), method(object({ deviceId:
|
|
54732
|
+
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
54733
|
+
kind: "mutation",
|
|
54734
|
+
auth: "protected"
|
|
54735
|
+
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
54557
54736
|
kind: "mutation",
|
|
54558
54737
|
auth: "protected"
|
|
54559
54738
|
}), method(object({
|
|
54560
|
-
deviceId:
|
|
54739
|
+
deviceId: DeviceIdSchema,
|
|
54561
54740
|
program: string().min(1)
|
|
54562
54741
|
}), _void(), {
|
|
54563
54742
|
kind: "mutation",
|
|
54564
54743
|
auth: "protected"
|
|
54565
54744
|
}), method(object({
|
|
54566
|
-
deviceId:
|
|
54745
|
+
deviceId: DeviceIdSchema,
|
|
54567
54746
|
on: boolean()
|
|
54568
54747
|
}), _void(), {
|
|
54569
54748
|
kind: "mutation",
|
|
54570
54749
|
auth: "protected"
|
|
54571
54750
|
}), method(object({
|
|
54572
|
-
deviceId:
|
|
54751
|
+
deviceId: DeviceIdSchema,
|
|
54573
54752
|
on: boolean()
|
|
54574
54753
|
}), _void(), {
|
|
54575
54754
|
kind: "mutation",
|
|
54576
54755
|
auth: "protected"
|
|
54577
54756
|
}), method(object({
|
|
54578
|
-
deviceId:
|
|
54757
|
+
deviceId: DeviceIdSchema,
|
|
54579
54758
|
on: boolean()
|
|
54580
54759
|
}), _void(), {
|
|
54581
54760
|
kind: "mutation",
|
|
54582
54761
|
auth: "protected"
|
|
54583
54762
|
}), method(object({
|
|
54584
|
-
deviceId:
|
|
54763
|
+
deviceId: DeviceIdSchema,
|
|
54585
54764
|
on: boolean()
|
|
54586
54765
|
}), _void(), {
|
|
54587
54766
|
kind: "mutation",
|
|
54588
54767
|
auth: "protected"
|
|
54589
54768
|
}), method(object({
|
|
54590
|
-
deviceId:
|
|
54769
|
+
deviceId: DeviceIdSchema,
|
|
54591
54770
|
on: boolean()
|
|
54592
54771
|
}), _void(), {
|
|
54593
54772
|
kind: "mutation",
|
|
54594
54773
|
auth: "protected"
|
|
54595
54774
|
}), method(object({
|
|
54596
|
-
deviceId:
|
|
54775
|
+
deviceId: DeviceIdSchema,
|
|
54597
54776
|
on: boolean()
|
|
54598
54777
|
}), _void(), {
|
|
54599
54778
|
kind: "mutation",
|
|
54600
54779
|
auth: "protected"
|
|
54601
54780
|
}), method(object({
|
|
54602
|
-
deviceId:
|
|
54781
|
+
deviceId: DeviceIdSchema,
|
|
54603
54782
|
on: boolean()
|
|
54604
54783
|
}), _void(), {
|
|
54605
54784
|
kind: "mutation",
|
|
54606
54785
|
auth: "protected"
|
|
54607
54786
|
}), method(object({
|
|
54608
|
-
deviceId:
|
|
54787
|
+
deviceId: DeviceIdSchema,
|
|
54609
54788
|
key: string().min(1),
|
|
54610
|
-
value:
|
|
54611
|
-
boolean(),
|
|
54612
|
-
string(),
|
|
54613
|
-
number()
|
|
54614
|
-
])
|
|
54789
|
+
value: DishwasherValueSchema
|
|
54615
54790
|
}), _void(), {
|
|
54616
54791
|
kind: "mutation",
|
|
54617
54792
|
auth: "protected"
|
|
54618
|
-
});
|
|
54793
|
+
}), method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" });
|
|
54619
54794
|
object({
|
|
54620
54795
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
54621
54796
|
lastPressedAt: number().nullable(),
|
|
@@ -64675,6 +64850,12 @@ Object.freeze({
|
|
|
64675
64850
|
addonId: null,
|
|
64676
64851
|
access: "view"
|
|
64677
64852
|
},
|
|
64853
|
+
"dishwasher.getOptions": {
|
|
64854
|
+
capName: "dishwasher",
|
|
64855
|
+
capScope: "device",
|
|
64856
|
+
addonId: null,
|
|
64857
|
+
access: "view"
|
|
64858
|
+
},
|
|
64678
64859
|
"dishwasher.getStatus": {
|
|
64679
64860
|
capName: "dishwasher",
|
|
64680
64861
|
capScope: "device",
|
|
@@ -64687,6 +64868,12 @@ Object.freeze({
|
|
|
64687
64868
|
addonId: null,
|
|
64688
64869
|
access: "create"
|
|
64689
64870
|
},
|
|
64871
|
+
"dishwasher.resume": {
|
|
64872
|
+
capName: "dishwasher",
|
|
64873
|
+
capScope: "device",
|
|
64874
|
+
addonId: null,
|
|
64875
|
+
access: "create"
|
|
64876
|
+
},
|
|
64690
64877
|
"dishwasher.setChildLock": {
|
|
64691
64878
|
capName: "dishwasher",
|
|
64692
64879
|
capScope: "device",
|
|
@@ -69187,6 +69374,12 @@ Object.freeze({
|
|
|
69187
69374
|
addonId: null,
|
|
69188
69375
|
access: "view"
|
|
69189
69376
|
},
|
|
69377
|
+
"storageMigration.moverClearance": {
|
|
69378
|
+
capName: "storage-migration",
|
|
69379
|
+
capScope: "system",
|
|
69380
|
+
addonId: null,
|
|
69381
|
+
access: "view"
|
|
69382
|
+
},
|
|
69190
69383
|
"storageMigration.movers": {
|
|
69191
69384
|
capName: "storage-migration",
|
|
69192
69385
|
capScope: "system",
|
|
@@ -71380,6 +71573,11 @@ Object.freeze({
|
|
|
71380
71573
|
form: "single",
|
|
71381
71574
|
optional: false
|
|
71382
71575
|
}],
|
|
71576
|
+
"dishwasher.getOptions": [{
|
|
71577
|
+
name: "deviceId",
|
|
71578
|
+
form: "single",
|
|
71579
|
+
optional: false
|
|
71580
|
+
}],
|
|
71383
71581
|
"dishwasher.getStatus": [{
|
|
71384
71582
|
name: "deviceId",
|
|
71385
71583
|
form: "single",
|
|
@@ -71390,6 +71588,11 @@ Object.freeze({
|
|
|
71390
71588
|
form: "single",
|
|
71391
71589
|
optional: false
|
|
71392
71590
|
}],
|
|
71591
|
+
"dishwasher.resume": [{
|
|
71592
|
+
name: "deviceId",
|
|
71593
|
+
form: "single",
|
|
71594
|
+
optional: false
|
|
71595
|
+
}],
|
|
71393
71596
|
"dishwasher.setChildLock": [{
|
|
71394
71597
|
name: "deviceId",
|
|
71395
71598
|
form: "single",
|
|
@@ -73683,6 +73886,9 @@ new Map(Object.entries({
|
|
|
73683
73886
|
"wrapper-update-available": "system",
|
|
73684
73887
|
"backup-completed": "system",
|
|
73685
73888
|
"export-completed": "system",
|
|
73889
|
+
"alert-critical": "system",
|
|
73890
|
+
"alert-error": "system",
|
|
73891
|
+
"alert-critical-resolved": "system",
|
|
73686
73892
|
"storage-location-low": "system",
|
|
73687
73893
|
"storage-location-critical": "system",
|
|
73688
73894
|
"storage-location-ok": "system",
|
|
@@ -73807,6 +74013,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
73807
74013
|
"storage-location-ok"
|
|
73808
74014
|
]
|
|
73809
74015
|
},
|
|
74016
|
+
{
|
|
74017
|
+
id: "alerts",
|
|
74018
|
+
family: "system",
|
|
74019
|
+
label: "Alerts",
|
|
74020
|
+
kinds: [
|
|
74021
|
+
"alert-critical",
|
|
74022
|
+
"alert-error",
|
|
74023
|
+
"alert-critical-resolved"
|
|
74024
|
+
]
|
|
74025
|
+
},
|
|
73810
74026
|
{
|
|
73811
74027
|
id: "alarm",
|
|
73812
74028
|
family: "alarm",
|
|
@@ -73851,6 +74067,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
|
|
|
73851
74067
|
return [[descriptor.kind, field]];
|
|
73852
74068
|
})));
|
|
73853
74069
|
Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
|
|
74070
|
+
object({
|
|
74071
|
+
phase: _enum(["raised", "resolved"]),
|
|
74072
|
+
episodeId: string().min(1),
|
|
74073
|
+
alertId: string().min(1),
|
|
74074
|
+
severity: AlertSeveritySchema,
|
|
74075
|
+
category: string(),
|
|
74076
|
+
title: string(),
|
|
74077
|
+
message: string(),
|
|
74078
|
+
sourceType: string().optional(),
|
|
74079
|
+
sourceId: string().optional(),
|
|
74080
|
+
nodeId: string().optional(),
|
|
74081
|
+
/** The alert's own action link (where the operator acts on it), when it has one. */
|
|
74082
|
+
actionUrl: string().optional(),
|
|
74083
|
+
at: number()
|
|
74084
|
+
});
|
|
73854
74085
|
var RULE_BODY_ONLY = ["body"];
|
|
73855
74086
|
var RULE_TEXT = ["title", "body"];
|
|
73856
74087
|
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
@@ -73860,6 +74091,11 @@ var TANK = [
|
|
|
73860
74091
|
"device-tank-full",
|
|
73861
74092
|
"device-tank-normal"
|
|
73862
74093
|
];
|
|
74094
|
+
var ALERT_EPISODE = [
|
|
74095
|
+
"alert-critical",
|
|
74096
|
+
"alert-error",
|
|
74097
|
+
"alert-critical-resolved"
|
|
74098
|
+
];
|
|
73863
74099
|
var UPDATES = [
|
|
73864
74100
|
"addon-update-available",
|
|
73865
74101
|
"server-update-available",
|
|
@@ -74052,14 +74288,14 @@ var STATE_SUMMARY_VARS = [
|
|
|
74052
74288
|
([...RULE_TEXT], [...CONSUMABLE]),
|
|
74053
74289
|
([...RULE_TEXT], [...TANK]),
|
|
74054
74290
|
[...RULE_TEXT],
|
|
74055
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
74056
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
74057
|
-
[...RULE_TEXT],
|
|
74291
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
74292
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
74058
74293
|
[...RULE_TEXT],
|
|
74059
74294
|
[...RULE_TEXT],
|
|
74060
74295
|
[...RULE_TEXT],
|
|
74061
74296
|
[...RULE_TEXT],
|
|
74062
74297
|
[...RULE_TEXT],
|
|
74298
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74063
74299
|
[...RULE_TEXT],
|
|
74064
74300
|
[...RULE_TEXT],
|
|
74065
74301
|
[...RULE_TEXT],
|
|
@@ -74077,7 +74313,11 @@ var STATE_SUMMARY_VARS = [
|
|
|
74077
74313
|
[...RULE_TEXT],
|
|
74078
74314
|
[...RULE_TEXT],
|
|
74079
74315
|
[...RULE_TEXT],
|
|
74080
|
-
[...RULE_TEXT],
|
|
74316
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74317
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74318
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74319
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74320
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74081
74321
|
[...RULE_TEXT],
|
|
74082
74322
|
[...RULE_TEXT],
|
|
74083
74323
|
[...RULE_TEXT],
|