@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.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { brotliCompressSync, deflateSync, gzipSync } from "node:zlib";
|
|
|
2
2
|
import { readFileSync } from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
-
//#region ../types/dist/event-category-
|
|
5
|
+
//#region ../types/dist/event-category-DOl51-Ij.mjs
|
|
6
6
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
7
7
|
EventCategory["SystemBoot"] = "system.boot";
|
|
8
8
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -81,9 +81,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
81
81
|
/**
|
|
82
82
|
* The node's one-shot runner boot check (D877): planned runners against the
|
|
83
83
|
* process service, `degraded` when any is failed, refused or missing. The
|
|
84
|
-
* alert centre turns it into one
|
|
84
|
+
* alert centre turns it into one critical alert.
|
|
85
85
|
*/
|
|
86
86
|
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
87
|
+
/**
|
|
88
|
+
* An alert EPISODE opened or closed, emitted by the alert centre for alerts
|
|
89
|
+
* of severity `critical` or `error` (`AlertEpisodePayload`). The alert
|
|
90
|
+
* centre sends no notification of its own: Notification Center turns this
|
|
91
|
+
* into the `alert-critical` / `alert-error` / `alert-critical-resolved`
|
|
92
|
+
* system-event kinds, and reconciles from the alerts store because a bus
|
|
93
|
+
* event may be dropped (D8, D11).
|
|
94
|
+
*/
|
|
95
|
+
EventCategory["AlertEpisode"] = "alert.episode";
|
|
87
96
|
EventCategory["AddonError"] = "addon.error";
|
|
88
97
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
89
98
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -5541,7 +5550,7 @@ var ZodIssueCode = {
|
|
|
5541
5550
|
var ZodFirstPartyTypeKind;
|
|
5542
5551
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5543
5552
|
//#endregion
|
|
5544
|
-
//#region ../types/dist/sleep-
|
|
5553
|
+
//#region ../types/dist/sleep-BxjU_fJM.mjs
|
|
5545
5554
|
/**
|
|
5546
5555
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5547
5556
|
* window to float samples (D455).
|
|
@@ -7923,6 +7932,12 @@ function normalizeAddonInitResult(result) {
|
|
|
7923
7932
|
if (Array.isArray(result)) return { providers: result };
|
|
7924
7933
|
return result;
|
|
7925
7934
|
}
|
|
7935
|
+
/**
|
|
7936
|
+
* The share-view scope kinds a `csv_*` share token can carry. The hub mints
|
|
7937
|
+
* and validates them (`share-token.service.ts` builds its enum from this
|
|
7938
|
+
* list); a data plane names the kinds it ACCEPTS in `share`.
|
|
7939
|
+
*/
|
|
7940
|
+
var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
|
|
7926
7941
|
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
7927
7942
|
var PeerBytesTicketSchema = object({
|
|
7928
7943
|
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
@@ -12874,6 +12889,229 @@ var ConvertResultSchema = object({
|
|
|
12874
12889
|
files: array(string()).readonly()
|
|
12875
12890
|
})).readonly()
|
|
12876
12891
|
});
|
|
12892
|
+
/**
|
|
12893
|
+
* Zod schemas for persisted record types.
|
|
12894
|
+
*
|
|
12895
|
+
* These schemas serve as the single source of truth for types that are
|
|
12896
|
+
* stored in the settings-store backend and retrieved via tRPC. They
|
|
12897
|
+
* replace the manual TypeScript interfaces with schema-derived types,
|
|
12898
|
+
* enabling runtime validation when reading from the backend.
|
|
12899
|
+
*
|
|
12900
|
+
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
12901
|
+
* keeps the original name for backward compatibility.
|
|
12902
|
+
*/
|
|
12903
|
+
/**
|
|
12904
|
+
* Auth model (v2 — 2026-05-12 caps-only):
|
|
12905
|
+
*
|
|
12906
|
+
* Two principals:
|
|
12907
|
+
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
12908
|
+
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
12909
|
+
*
|
|
12910
|
+
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
12911
|
+
* `super_admin` — collapsed onto the single boolean because every
|
|
12912
|
+
* non-admin caller is governed by the same scope-check rules; the
|
|
12913
|
+
* distinction was only ever used to route role-specific procedures
|
|
12914
|
+
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
12915
|
+
* with `isAdmin: false` + an explicit scope list.
|
|
12916
|
+
*/
|
|
12917
|
+
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
12918
|
+
var MethodAccessSchema = _enum([
|
|
12919
|
+
"view",
|
|
12920
|
+
"create",
|
|
12921
|
+
"delete"
|
|
12922
|
+
]);
|
|
12923
|
+
/**
|
|
12924
|
+
* A single scope grant. Three forms — checked in matcher with OR
|
|
12925
|
+
* semantics; the first match decides whether the call passes:
|
|
12926
|
+
*
|
|
12927
|
+
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
12928
|
+
* cap with the matching `scope` declaration. New caps inherit grants
|
|
12929
|
+
* automatically — adding a device cap to the codebase makes it
|
|
12930
|
+
* reachable to every user with `category:device [...]` without a
|
|
12931
|
+
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
12932
|
+
*
|
|
12933
|
+
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
12934
|
+
* useful when an integration needs to interact with one specific
|
|
12935
|
+
* addon's surface regardless of how many caps it exports.
|
|
12936
|
+
*
|
|
12937
|
+
* - `capability` — the most precise form. Single cap name. Use for
|
|
12938
|
+
* integration tokens where you want to grant `addons.installPackage`
|
|
12939
|
+
* and nothing else.
|
|
12940
|
+
*
|
|
12941
|
+
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
12942
|
+
* "give me everything" escape; there is no wildcard scope.
|
|
12943
|
+
*/
|
|
12944
|
+
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
12945
|
+
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
12946
|
+
var CapScopeSchema = _enum(["device", "system"]);
|
|
12947
|
+
/**
|
|
12948
|
+
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
12949
|
+
*
|
|
12950
|
+
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
12951
|
+
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
12952
|
+
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
12953
|
+
* AFTER the grant was minted — no re-grant, no re-login.
|
|
12954
|
+
*
|
|
12955
|
+
* - `all` — every device in the deployment. The broad viewer/operator
|
|
12956
|
+
* lever without a `category` grant (a `category` grant also covers device
|
|
12957
|
+
* caps that carry no deviceId; `all` is specifically the device set).
|
|
12958
|
+
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
12959
|
+
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
12960
|
+
* is NOT covered until the grant is edited.
|
|
12961
|
+
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
12962
|
+
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
12963
|
+
* re-resolves on the next request.
|
|
12964
|
+
* - `locations` — every device whose operator-assigned `location` label is
|
|
12965
|
+
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
12966
|
+
* null/unset location matches NO `locations` selector.
|
|
12967
|
+
*/
|
|
12968
|
+
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
12969
|
+
object({ kind: literal("all") }),
|
|
12970
|
+
object({
|
|
12971
|
+
kind: literal("ids"),
|
|
12972
|
+
ids: array(number().int()).min(1)
|
|
12973
|
+
}),
|
|
12974
|
+
object({
|
|
12975
|
+
kind: literal("types"),
|
|
12976
|
+
types: array(_enum(DeviceType)).min(1)
|
|
12977
|
+
}),
|
|
12978
|
+
object({
|
|
12979
|
+
kind: literal("locations"),
|
|
12980
|
+
locations: array(string().min(1)).min(1)
|
|
12981
|
+
})
|
|
12982
|
+
]);
|
|
12983
|
+
var DeviceTokenScopeSchema = object({
|
|
12984
|
+
type: literal("device"),
|
|
12985
|
+
/** The device SET this grant covers — resolved against the live fleet. */
|
|
12986
|
+
selector: DeviceSelectorSchema,
|
|
12987
|
+
access: array(MethodAccessSchema).min(1),
|
|
12988
|
+
/**
|
|
12989
|
+
* Whether a grant on a PARENT device transparently covers its accessory
|
|
12990
|
+
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
12991
|
+
* Direction is parent → children ONLY.
|
|
12992
|
+
*
|
|
12993
|
+
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
12994
|
+
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
12995
|
+
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
12996
|
+
* operator must grant on the child, not inherit from the parent). Set it
|
|
12997
|
+
* explicitly to override that default per grant.
|
|
12998
|
+
*/
|
|
12999
|
+
includeLinked: boolean().optional()
|
|
13000
|
+
});
|
|
13001
|
+
/**
|
|
13002
|
+
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
13003
|
+
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
13004
|
+
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
13005
|
+
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
13006
|
+
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
13007
|
+
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
13008
|
+
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
13009
|
+
* migration covers both without a flag day. No cast — the raw object is read
|
|
13010
|
+
* through `Reflect.get` (its static type is `unknown`).
|
|
13011
|
+
*/
|
|
13012
|
+
function migrateLegacyTokenScope(raw) {
|
|
13013
|
+
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
13014
|
+
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
13015
|
+
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
13016
|
+
const targets = Reflect.get(raw, "targets");
|
|
13017
|
+
if (!Array.isArray(targets)) return raw;
|
|
13018
|
+
return {
|
|
13019
|
+
type: "device",
|
|
13020
|
+
selector: {
|
|
13021
|
+
kind: "ids",
|
|
13022
|
+
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
13023
|
+
},
|
|
13024
|
+
access: Reflect.get(raw, "access")
|
|
13025
|
+
};
|
|
13026
|
+
}
|
|
13027
|
+
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
13028
|
+
object({
|
|
13029
|
+
type: literal("category"),
|
|
13030
|
+
target: CapScopeSchema,
|
|
13031
|
+
access: array(MethodAccessSchema).min(1)
|
|
13032
|
+
}),
|
|
13033
|
+
object({
|
|
13034
|
+
type: literal("capability"),
|
|
13035
|
+
target: string(),
|
|
13036
|
+
access: array(MethodAccessSchema).min(1)
|
|
13037
|
+
}),
|
|
13038
|
+
object({
|
|
13039
|
+
type: literal("addon"),
|
|
13040
|
+
target: string(),
|
|
13041
|
+
access: array(MethodAccessSchema).min(1)
|
|
13042
|
+
}),
|
|
13043
|
+
DeviceTokenScopeSchema
|
|
13044
|
+
]));
|
|
13045
|
+
object({
|
|
13046
|
+
id: string(),
|
|
13047
|
+
username: string(),
|
|
13048
|
+
passwordHash: string(),
|
|
13049
|
+
/**
|
|
13050
|
+
* Admin bypass. When true, the middleware skips the scope-access
|
|
13051
|
+
* check entirely. There is no other axis of privilege; the legacy
|
|
13052
|
+
* role enum collapsed onto this boolean in v2.
|
|
13053
|
+
*/
|
|
13054
|
+
isAdmin: boolean().default(false),
|
|
13055
|
+
allowedProviders: AllowedProviderSchema,
|
|
13056
|
+
allowedDevices: AllowedDevicesSchema,
|
|
13057
|
+
/**
|
|
13058
|
+
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
13059
|
+
* ignored. Non-admins without scopes are locked out of every
|
|
13060
|
+
* protected call.
|
|
13061
|
+
*/
|
|
13062
|
+
scopes: array(TokenScopeSchema).default([]),
|
|
13063
|
+
createdAt: number(),
|
|
13064
|
+
updatedAt: number()
|
|
13065
|
+
});
|
|
13066
|
+
object({
|
|
13067
|
+
id: string(),
|
|
13068
|
+
label: string(),
|
|
13069
|
+
isAdmin: boolean().default(false),
|
|
13070
|
+
allowedProviders: AllowedProviderSchema,
|
|
13071
|
+
allowedDevices: AllowedDevicesSchema,
|
|
13072
|
+
tokenHash: string(),
|
|
13073
|
+
tokenPrefix: string(),
|
|
13074
|
+
createdAt: number(),
|
|
13075
|
+
lastUsedAt: number().optional()
|
|
13076
|
+
});
|
|
13077
|
+
object({
|
|
13078
|
+
id: string(),
|
|
13079
|
+
userId: string(),
|
|
13080
|
+
name: string(),
|
|
13081
|
+
tokenHash: string(),
|
|
13082
|
+
tokenPrefix: string(),
|
|
13083
|
+
scopes: array(TokenScopeSchema),
|
|
13084
|
+
expiresAt: number().nullish(),
|
|
13085
|
+
lastUsedAt: number().nullish(),
|
|
13086
|
+
createdAt: number()
|
|
13087
|
+
});
|
|
13088
|
+
/** What a share-view grant lets its holder see. */
|
|
13089
|
+
var ShareViewGrantSchema = object({
|
|
13090
|
+
kind: _enum(SHARE_VIEW_KINDS),
|
|
13091
|
+
deviceIds: array(number().int().nonnegative()).min(1).max(64),
|
|
13092
|
+
/** Talk-back, opt-in at mint time; absent means off. */
|
|
13093
|
+
talk: boolean().optional()
|
|
13094
|
+
});
|
|
13095
|
+
var ShareViewScopeSchema = object({
|
|
13096
|
+
type: literal("share-view"),
|
|
13097
|
+
grant: ShareViewGrantSchema
|
|
13098
|
+
});
|
|
13099
|
+
var AddonRoutesScopeSchema = object({
|
|
13100
|
+
type: literal("addon-routes"),
|
|
13101
|
+
access: array(MethodAccessSchema).min(1)
|
|
13102
|
+
});
|
|
13103
|
+
var CredentialScopeSchema = union([
|
|
13104
|
+
literal("*"),
|
|
13105
|
+
ShareViewScopeSchema,
|
|
13106
|
+
AddonRoutesScopeSchema,
|
|
13107
|
+
TokenScopeSchema
|
|
13108
|
+
]);
|
|
13109
|
+
object({
|
|
13110
|
+
kind: literal("credential"),
|
|
13111
|
+
sub: string().min(1),
|
|
13112
|
+
jti: string().min(16),
|
|
13113
|
+
scopes: array(CredentialScopeSchema).min(1)
|
|
13114
|
+
});
|
|
12877
13115
|
_enum(["new-session", "step-up"]);
|
|
12878
13116
|
/** The languages the hub's app landing pages are written in (D858). */
|
|
12879
13117
|
var AppPageLangSchema = _enum(["en", "it"]);
|
|
@@ -13609,7 +13847,14 @@ var AlertSeveritySchema = _enum([
|
|
|
13609
13847
|
]);
|
|
13610
13848
|
var AlertActionSchema = object({
|
|
13611
13849
|
label: string(),
|
|
13612
|
-
href: string().optional()
|
|
13850
|
+
href: string().optional(),
|
|
13851
|
+
/**
|
|
13852
|
+
* How `href` is followed. Absent / `app`: an admin-ui route (client-side).
|
|
13853
|
+
* `server`: a route the HUB serves (an addon HTTP route such as an OAuth
|
|
13854
|
+
* start) — the browser must leave the SPA with a full navigation, because
|
|
13855
|
+
* the SPA has no such route and would bounce to the home page.
|
|
13856
|
+
*/
|
|
13857
|
+
navigation: _enum(["app", "server"]).optional()
|
|
13613
13858
|
});
|
|
13614
13859
|
var AlertStatusSchema = _enum([
|
|
13615
13860
|
"active",
|
|
@@ -42007,6 +42252,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
42007
42252
|
"server-updated",
|
|
42008
42253
|
"export-completed",
|
|
42009
42254
|
"backup-completed",
|
|
42255
|
+
"alert-critical",
|
|
42256
|
+
"alert-error",
|
|
42257
|
+
"alert-critical-resolved",
|
|
42010
42258
|
"camera-online",
|
|
42011
42259
|
"camera-offline",
|
|
42012
42260
|
"camera-disabled",
|
|
@@ -44042,202 +44290,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
44042
44290
|
auth: "admin"
|
|
44043
44291
|
}), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
|
|
44044
44292
|
/**
|
|
44045
|
-
* Zod schemas for persisted record types.
|
|
44046
|
-
*
|
|
44047
|
-
* These schemas serve as the single source of truth for types that are
|
|
44048
|
-
* stored in the settings-store backend and retrieved via tRPC. They
|
|
44049
|
-
* replace the manual TypeScript interfaces with schema-derived types,
|
|
44050
|
-
* enabling runtime validation when reading from the backend.
|
|
44051
|
-
*
|
|
44052
|
-
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
44053
|
-
* keeps the original name for backward compatibility.
|
|
44054
|
-
*/
|
|
44055
|
-
/**
|
|
44056
|
-
* Auth model (v2 — 2026-05-12 caps-only):
|
|
44057
|
-
*
|
|
44058
|
-
* Two principals:
|
|
44059
|
-
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
44060
|
-
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
44061
|
-
*
|
|
44062
|
-
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
44063
|
-
* `super_admin` — collapsed onto the single boolean because every
|
|
44064
|
-
* non-admin caller is governed by the same scope-check rules; the
|
|
44065
|
-
* distinction was only ever used to route role-specific procedures
|
|
44066
|
-
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
44067
|
-
* with `isAdmin: false` + an explicit scope list.
|
|
44068
|
-
*/
|
|
44069
|
-
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
44070
|
-
var MethodAccessSchema = _enum([
|
|
44071
|
-
"view",
|
|
44072
|
-
"create",
|
|
44073
|
-
"delete"
|
|
44074
|
-
]);
|
|
44075
|
-
/**
|
|
44076
|
-
* A single scope grant. Three forms — checked in matcher with OR
|
|
44077
|
-
* semantics; the first match decides whether the call passes:
|
|
44078
|
-
*
|
|
44079
|
-
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
44080
|
-
* cap with the matching `scope` declaration. New caps inherit grants
|
|
44081
|
-
* automatically — adding a device cap to the codebase makes it
|
|
44082
|
-
* reachable to every user with `category:device [...]` without a
|
|
44083
|
-
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
44084
|
-
*
|
|
44085
|
-
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
44086
|
-
* useful when an integration needs to interact with one specific
|
|
44087
|
-
* addon's surface regardless of how many caps it exports.
|
|
44088
|
-
*
|
|
44089
|
-
* - `capability` — the most precise form. Single cap name. Use for
|
|
44090
|
-
* integration tokens where you want to grant `addons.installPackage`
|
|
44091
|
-
* and nothing else.
|
|
44092
|
-
*
|
|
44093
|
-
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
44094
|
-
* "give me everything" escape; there is no wildcard scope.
|
|
44095
|
-
*/
|
|
44096
|
-
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
44097
|
-
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
44098
|
-
var CapScopeSchema = _enum(["device", "system"]);
|
|
44099
|
-
/**
|
|
44100
|
-
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
44101
|
-
*
|
|
44102
|
-
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
44103
|
-
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
44104
|
-
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
44105
|
-
* AFTER the grant was minted — no re-grant, no re-login.
|
|
44106
|
-
*
|
|
44107
|
-
* - `all` — every device in the deployment. The broad viewer/operator
|
|
44108
|
-
* lever without a `category` grant (a `category` grant also covers device
|
|
44109
|
-
* caps that carry no deviceId; `all` is specifically the device set).
|
|
44110
|
-
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
44111
|
-
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
44112
|
-
* is NOT covered until the grant is edited.
|
|
44113
|
-
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
44114
|
-
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
44115
|
-
* re-resolves on the next request.
|
|
44116
|
-
* - `locations` — every device whose operator-assigned `location` label is
|
|
44117
|
-
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
44118
|
-
* null/unset location matches NO `locations` selector.
|
|
44119
|
-
*/
|
|
44120
|
-
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
44121
|
-
object({ kind: literal("all") }),
|
|
44122
|
-
object({
|
|
44123
|
-
kind: literal("ids"),
|
|
44124
|
-
ids: array(number().int()).min(1)
|
|
44125
|
-
}),
|
|
44126
|
-
object({
|
|
44127
|
-
kind: literal("types"),
|
|
44128
|
-
types: array(_enum(DeviceType)).min(1)
|
|
44129
|
-
}),
|
|
44130
|
-
object({
|
|
44131
|
-
kind: literal("locations"),
|
|
44132
|
-
locations: array(string().min(1)).min(1)
|
|
44133
|
-
})
|
|
44134
|
-
]);
|
|
44135
|
-
var DeviceTokenScopeSchema = object({
|
|
44136
|
-
type: literal("device"),
|
|
44137
|
-
/** The device SET this grant covers — resolved against the live fleet. */
|
|
44138
|
-
selector: DeviceSelectorSchema,
|
|
44139
|
-
access: array(MethodAccessSchema).min(1),
|
|
44140
|
-
/**
|
|
44141
|
-
* Whether a grant on a PARENT device transparently covers its accessory
|
|
44142
|
-
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
44143
|
-
* Direction is parent → children ONLY.
|
|
44144
|
-
*
|
|
44145
|
-
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
44146
|
-
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
44147
|
-
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
44148
|
-
* operator must grant on the child, not inherit from the parent). Set it
|
|
44149
|
-
* explicitly to override that default per grant.
|
|
44150
|
-
*/
|
|
44151
|
-
includeLinked: boolean().optional()
|
|
44152
|
-
});
|
|
44153
|
-
/**
|
|
44154
|
-
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
44155
|
-
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
44156
|
-
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
44157
|
-
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
44158
|
-
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
44159
|
-
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
44160
|
-
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
44161
|
-
* migration covers both without a flag day. No cast — the raw object is read
|
|
44162
|
-
* through `Reflect.get` (its static type is `unknown`).
|
|
44163
|
-
*/
|
|
44164
|
-
function migrateLegacyTokenScope(raw) {
|
|
44165
|
-
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
44166
|
-
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
44167
|
-
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
44168
|
-
const targets = Reflect.get(raw, "targets");
|
|
44169
|
-
if (!Array.isArray(targets)) return raw;
|
|
44170
|
-
return {
|
|
44171
|
-
type: "device",
|
|
44172
|
-
selector: {
|
|
44173
|
-
kind: "ids",
|
|
44174
|
-
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
44175
|
-
},
|
|
44176
|
-
access: Reflect.get(raw, "access")
|
|
44177
|
-
};
|
|
44178
|
-
}
|
|
44179
|
-
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
44180
|
-
object({
|
|
44181
|
-
type: literal("category"),
|
|
44182
|
-
target: CapScopeSchema,
|
|
44183
|
-
access: array(MethodAccessSchema).min(1)
|
|
44184
|
-
}),
|
|
44185
|
-
object({
|
|
44186
|
-
type: literal("capability"),
|
|
44187
|
-
target: string(),
|
|
44188
|
-
access: array(MethodAccessSchema).min(1)
|
|
44189
|
-
}),
|
|
44190
|
-
object({
|
|
44191
|
-
type: literal("addon"),
|
|
44192
|
-
target: string(),
|
|
44193
|
-
access: array(MethodAccessSchema).min(1)
|
|
44194
|
-
}),
|
|
44195
|
-
DeviceTokenScopeSchema
|
|
44196
|
-
]));
|
|
44197
|
-
object({
|
|
44198
|
-
id: string(),
|
|
44199
|
-
username: string(),
|
|
44200
|
-
passwordHash: string(),
|
|
44201
|
-
/**
|
|
44202
|
-
* Admin bypass. When true, the middleware skips the scope-access
|
|
44203
|
-
* check entirely. There is no other axis of privilege; the legacy
|
|
44204
|
-
* role enum collapsed onto this boolean in v2.
|
|
44205
|
-
*/
|
|
44206
|
-
isAdmin: boolean().default(false),
|
|
44207
|
-
allowedProviders: AllowedProviderSchema,
|
|
44208
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44209
|
-
/**
|
|
44210
|
-
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
44211
|
-
* ignored. Non-admins without scopes are locked out of every
|
|
44212
|
-
* protected call.
|
|
44213
|
-
*/
|
|
44214
|
-
scopes: array(TokenScopeSchema).default([]),
|
|
44215
|
-
createdAt: number(),
|
|
44216
|
-
updatedAt: number()
|
|
44217
|
-
});
|
|
44218
|
-
object({
|
|
44219
|
-
id: string(),
|
|
44220
|
-
label: string(),
|
|
44221
|
-
isAdmin: boolean().default(false),
|
|
44222
|
-
allowedProviders: AllowedProviderSchema,
|
|
44223
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44224
|
-
tokenHash: string(),
|
|
44225
|
-
tokenPrefix: string(),
|
|
44226
|
-
createdAt: number(),
|
|
44227
|
-
lastUsedAt: number().optional()
|
|
44228
|
-
});
|
|
44229
|
-
object({
|
|
44230
|
-
id: string(),
|
|
44231
|
-
userId: string(),
|
|
44232
|
-
name: string(),
|
|
44233
|
-
tokenHash: string(),
|
|
44234
|
-
tokenPrefix: string(),
|
|
44235
|
-
scopes: array(TokenScopeSchema),
|
|
44236
|
-
expiresAt: number().nullish(),
|
|
44237
|
-
lastUsedAt: number().nullish(),
|
|
44238
|
-
createdAt: number()
|
|
44239
|
-
});
|
|
44240
|
-
/**
|
|
44241
44293
|
* `oauth-integration` — a collection cap by which an addon declares
|
|
44242
44294
|
* itself a linkable OAuth client of the hub's core `/oauth2/*` server.
|
|
44243
44295
|
* Each provider returns a static descriptor; the core enumerates them
|
|
@@ -51039,7 +51091,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
51039
51091
|
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
51040
51092
|
kind: "mutation",
|
|
51041
51093
|
auth: "admin"
|
|
51042
|
-
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({
|
|
51094
|
+
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
|
|
51095
|
+
clear: boolean(),
|
|
51096
|
+
repointLocationId: string().optional()
|
|
51097
|
+
}), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
|
|
51043
51098
|
kind: "mutation",
|
|
51044
51099
|
auth: "admin"
|
|
51045
51100
|
}), method(StorageCleanupInputSchema, object({ jobId: string() }), {
|
|
@@ -54474,6 +54529,11 @@ object({
|
|
|
54474
54529
|
*
|
|
54475
54530
|
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
54476
54531
|
* provider refreshes the slice on an interval and eagerly after commands.
|
|
54532
|
+
*
|
|
54533
|
+
* UNKNOWN IS NOT OFF. Every field the appliance reports separately is
|
|
54534
|
+
* nullable: `null` means "not known right now" (the appliance has not said,
|
|
54535
|
+
* the link is down, or the description does not carry it) and is never
|
|
54536
|
+
* rendered or exported as `false` / `0`. `availability` says why.
|
|
54477
54537
|
*/
|
|
54478
54538
|
var DishwasherStateSchema = _enum([
|
|
54479
54539
|
"idle",
|
|
@@ -54483,112 +54543,227 @@ var DishwasherStateSchema = _enum([
|
|
|
54483
54543
|
"error",
|
|
54484
54544
|
"unavailable"
|
|
54485
54545
|
]);
|
|
54546
|
+
/**
|
|
54547
|
+
* The appliance's own operation state, uncollapsed. `state` above is the coarse
|
|
54548
|
+
* view for compact surfaces; this is what the appliance said.
|
|
54549
|
+
*/
|
|
54550
|
+
var DishwasherOperationStateSchema = _enum([
|
|
54551
|
+
"Inactive",
|
|
54552
|
+
"Ready",
|
|
54553
|
+
"DelayedStart",
|
|
54554
|
+
"Run",
|
|
54555
|
+
"Pause",
|
|
54556
|
+
"ActionRequired",
|
|
54557
|
+
"Finished",
|
|
54558
|
+
"Error",
|
|
54559
|
+
"Aborting"
|
|
54560
|
+
]);
|
|
54561
|
+
/**
|
|
54562
|
+
* Why fields may be `null`:
|
|
54563
|
+
* - `available` — the link is up and the description is loaded;
|
|
54564
|
+
* - `offline` — the local link is down (values are unknown, not last-known);
|
|
54565
|
+
* - `description-missing` — the link is up but the appliance's description could not
|
|
54566
|
+
* be loaded, so its values cannot be decoded.
|
|
54567
|
+
*/
|
|
54568
|
+
var DishwasherAvailabilitySchema = _enum([
|
|
54569
|
+
"available",
|
|
54570
|
+
"offline",
|
|
54571
|
+
"description-missing"
|
|
54572
|
+
]);
|
|
54486
54573
|
var DishwasherConsumableLevelSchema = _enum([
|
|
54487
54574
|
"ok",
|
|
54488
54575
|
"low",
|
|
54489
54576
|
"empty"
|
|
54490
54577
|
]);
|
|
54491
54578
|
object({
|
|
54579
|
+
availability: DishwasherAvailabilitySchema,
|
|
54580
|
+
/** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
|
|
54492
54581
|
state: DishwasherStateSchema,
|
|
54493
|
-
/**
|
|
54582
|
+
/** The appliance's operation state as reported; null when not known. */
|
|
54583
|
+
operationState: DishwasherOperationStateSchema.nullable(),
|
|
54584
|
+
/** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
|
|
54494
54585
|
program: string().nullable(),
|
|
54495
|
-
/**
|
|
54586
|
+
/** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
|
|
54587
|
+
selectedProgram: string().nullable(),
|
|
54588
|
+
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
54496
54589
|
availablePrograms: array(string()),
|
|
54497
|
-
/**
|
|
54498
|
-
|
|
54590
|
+
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
54591
|
+
remainingSeconds: number().int().nonnegative().nullable(),
|
|
54592
|
+
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
54593
|
+
delayedStartSeconds: number().int().nonnegative().nullable(),
|
|
54499
54594
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
54500
54595
|
progressPercent: number().min(0).max(100).nullable(),
|
|
54501
|
-
/** True when the door is reported open. */
|
|
54502
|
-
doorOpen: boolean(),
|
|
54503
|
-
/** True when
|
|
54504
|
-
|
|
54505
|
-
/**
|
|
54506
|
-
|
|
54596
|
+
/** True when the door is reported open; null when the door state is not known. */
|
|
54597
|
+
doorOpen: boolean().nullable(),
|
|
54598
|
+
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
54599
|
+
doorLocked: boolean().nullable(),
|
|
54600
|
+
/** True when remote start is allowed (door closed, power on, etc.); null when not known. */
|
|
54601
|
+
remoteStartAllowed: boolean().nullable(),
|
|
54602
|
+
/** True when the appliance accepts remote control now; null when not known. */
|
|
54603
|
+
remoteControlActive: boolean().nullable(),
|
|
54604
|
+
/** True while somebody operates the appliance at its panel; null when not reported. */
|
|
54605
|
+
localControlActive: boolean().nullable(),
|
|
54606
|
+
/** Main power / switched-on state; null when not known. */
|
|
54607
|
+
powerOn: boolean().nullable(),
|
|
54608
|
+
/** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
|
|
54609
|
+
powerState: string().nullable(),
|
|
54507
54610
|
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
54508
54611
|
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
54509
|
-
|
|
54510
|
-
|
|
54612
|
+
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
54613
|
+
halfLoad: boolean().nullable(),
|
|
54614
|
+
hygienePlus: boolean().nullable(),
|
|
54511
54615
|
/** Extra dry option when the appliance exposes it. */
|
|
54512
|
-
extraDry: boolean(),
|
|
54616
|
+
extraDry: boolean().nullable(),
|
|
54513
54617
|
/** Intensive zone (lower basket) when the appliance exposes it. */
|
|
54514
|
-
intensiveZone: boolean(),
|
|
54618
|
+
intensiveZone: boolean().nullable(),
|
|
54515
54619
|
/** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
|
|
54516
|
-
varioSpeedPlus: boolean(),
|
|
54517
|
-
/** Child lock (controls disabled on the appliance). */
|
|
54518
|
-
childLock: boolean(),
|
|
54620
|
+
varioSpeedPlus: boolean().nullable(),
|
|
54621
|
+
/** Child lock (controls disabled on the appliance); null when not known. */
|
|
54622
|
+
childLock: boolean().nullable(),
|
|
54623
|
+
/** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
|
|
54624
|
+
activeEvents: array(string()),
|
|
54625
|
+
/** Numeric error code when the appliance reports one; null otherwise. */
|
|
54519
54626
|
errorCode: number().nullable(),
|
|
54627
|
+
/** Name of the raised alert-level event while the appliance is in error; null otherwise. */
|
|
54520
54628
|
errorLabel: string().nullable(),
|
|
54629
|
+
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
54521
54630
|
lastFetchedAt: number()
|
|
54522
54631
|
});
|
|
54523
|
-
|
|
54632
|
+
var DeviceIdSchema = number().int().nonnegative();
|
|
54633
|
+
/** A value a program option or setting can take. */
|
|
54634
|
+
var DishwasherValueSchema = union([
|
|
54635
|
+
boolean(),
|
|
54636
|
+
string(),
|
|
54637
|
+
number()
|
|
54638
|
+
]);
|
|
54639
|
+
var DishwasherAccessSchema = _enum([
|
|
54640
|
+
"none",
|
|
54641
|
+
"read",
|
|
54642
|
+
"readWrite",
|
|
54643
|
+
"writeOnly",
|
|
54644
|
+
"readStatic"
|
|
54645
|
+
]);
|
|
54646
|
+
/**
|
|
54647
|
+
* One option or setting the appliance declares, with the constraints its description
|
|
54648
|
+
* gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
|
|
54649
|
+
*/
|
|
54650
|
+
var DishwasherOptionDescriptorSchema = object({
|
|
54651
|
+
/** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
|
|
54652
|
+
key: string(),
|
|
54653
|
+
/** Last segment of the key, for display. */
|
|
54654
|
+
name: string(),
|
|
54655
|
+
type: _enum([
|
|
54656
|
+
"boolean",
|
|
54657
|
+
"number",
|
|
54658
|
+
"enum",
|
|
54659
|
+
"string"
|
|
54660
|
+
]),
|
|
54661
|
+
access: DishwasherAccessSchema,
|
|
54662
|
+
/** The appliance reports this entity as currently available. */
|
|
54663
|
+
available: boolean(),
|
|
54664
|
+
/** Unit the description declares for a number; null when it declares none. */
|
|
54665
|
+
unit: string().nullable(),
|
|
54666
|
+
min: number().nullable(),
|
|
54667
|
+
max: number().nullable(),
|
|
54668
|
+
step: number().nullable(),
|
|
54669
|
+
/** Allowed members of an enum; null for other types. */
|
|
54670
|
+
enumValues: array(string()).nullable(),
|
|
54671
|
+
defaultValue: DishwasherValueSchema.nullable()
|
|
54672
|
+
});
|
|
54673
|
+
var DishwasherProgramSchema = object({
|
|
54674
|
+
/** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
|
|
54675
|
+
key: string(),
|
|
54676
|
+
name: string(),
|
|
54677
|
+
/** The appliance currently offers this program. */
|
|
54678
|
+
available: boolean(),
|
|
54679
|
+
/** The options this program lists, with the program-level access / availability / default. */
|
|
54680
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
54681
|
+
});
|
|
54682
|
+
var DishwasherOptionsSchema = object({
|
|
54683
|
+
availability: DishwasherAvailabilitySchema,
|
|
54684
|
+
/** What the appliance can be told to do, from the commands its description declares. */
|
|
54685
|
+
supportsStart: boolean(),
|
|
54686
|
+
supportsPause: boolean(),
|
|
54687
|
+
supportsResume: boolean(),
|
|
54688
|
+
supportsStop: boolean(),
|
|
54689
|
+
supportsPower: boolean(),
|
|
54690
|
+
/** Every program the description lists, with its options. */
|
|
54691
|
+
programs: array(DishwasherProgramSchema),
|
|
54692
|
+
/** Every option and setting entity the description lists (programs reference these by key). */
|
|
54693
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
54694
|
+
});
|
|
54695
|
+
DeviceType.Dishwasher, method(object({
|
|
54696
|
+
deviceId: DeviceIdSchema,
|
|
54697
|
+
program: string().min(1).optional(),
|
|
54698
|
+
options: record(string(), DishwasherValueSchema).optional()
|
|
54699
|
+
}), _void(), {
|
|
54524
54700
|
kind: "mutation",
|
|
54525
54701
|
auth: "protected"
|
|
54526
|
-
}), method(object({ deviceId:
|
|
54702
|
+
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
54527
54703
|
kind: "mutation",
|
|
54528
54704
|
auth: "protected"
|
|
54529
|
-
}), method(object({ deviceId:
|
|
54705
|
+
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
54706
|
+
kind: "mutation",
|
|
54707
|
+
auth: "protected"
|
|
54708
|
+
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
54530
54709
|
kind: "mutation",
|
|
54531
54710
|
auth: "protected"
|
|
54532
54711
|
}), method(object({
|
|
54533
|
-
deviceId:
|
|
54712
|
+
deviceId: DeviceIdSchema,
|
|
54534
54713
|
program: string().min(1)
|
|
54535
54714
|
}), _void(), {
|
|
54536
54715
|
kind: "mutation",
|
|
54537
54716
|
auth: "protected"
|
|
54538
54717
|
}), method(object({
|
|
54539
|
-
deviceId:
|
|
54718
|
+
deviceId: DeviceIdSchema,
|
|
54540
54719
|
on: boolean()
|
|
54541
54720
|
}), _void(), {
|
|
54542
54721
|
kind: "mutation",
|
|
54543
54722
|
auth: "protected"
|
|
54544
54723
|
}), method(object({
|
|
54545
|
-
deviceId:
|
|
54724
|
+
deviceId: DeviceIdSchema,
|
|
54546
54725
|
on: boolean()
|
|
54547
54726
|
}), _void(), {
|
|
54548
54727
|
kind: "mutation",
|
|
54549
54728
|
auth: "protected"
|
|
54550
54729
|
}), method(object({
|
|
54551
|
-
deviceId:
|
|
54730
|
+
deviceId: DeviceIdSchema,
|
|
54552
54731
|
on: boolean()
|
|
54553
54732
|
}), _void(), {
|
|
54554
54733
|
kind: "mutation",
|
|
54555
54734
|
auth: "protected"
|
|
54556
54735
|
}), method(object({
|
|
54557
|
-
deviceId:
|
|
54736
|
+
deviceId: DeviceIdSchema,
|
|
54558
54737
|
on: boolean()
|
|
54559
54738
|
}), _void(), {
|
|
54560
54739
|
kind: "mutation",
|
|
54561
54740
|
auth: "protected"
|
|
54562
54741
|
}), method(object({
|
|
54563
|
-
deviceId:
|
|
54742
|
+
deviceId: DeviceIdSchema,
|
|
54564
54743
|
on: boolean()
|
|
54565
54744
|
}), _void(), {
|
|
54566
54745
|
kind: "mutation",
|
|
54567
54746
|
auth: "protected"
|
|
54568
54747
|
}), method(object({
|
|
54569
|
-
deviceId:
|
|
54748
|
+
deviceId: DeviceIdSchema,
|
|
54570
54749
|
on: boolean()
|
|
54571
54750
|
}), _void(), {
|
|
54572
54751
|
kind: "mutation",
|
|
54573
54752
|
auth: "protected"
|
|
54574
54753
|
}), method(object({
|
|
54575
|
-
deviceId:
|
|
54754
|
+
deviceId: DeviceIdSchema,
|
|
54576
54755
|
on: boolean()
|
|
54577
54756
|
}), _void(), {
|
|
54578
54757
|
kind: "mutation",
|
|
54579
54758
|
auth: "protected"
|
|
54580
54759
|
}), method(object({
|
|
54581
|
-
deviceId:
|
|
54760
|
+
deviceId: DeviceIdSchema,
|
|
54582
54761
|
key: string().min(1),
|
|
54583
|
-
value:
|
|
54584
|
-
boolean(),
|
|
54585
|
-
string(),
|
|
54586
|
-
number()
|
|
54587
|
-
])
|
|
54762
|
+
value: DishwasherValueSchema
|
|
54588
54763
|
}), _void(), {
|
|
54589
54764
|
kind: "mutation",
|
|
54590
54765
|
auth: "protected"
|
|
54591
|
-
});
|
|
54766
|
+
}), method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" });
|
|
54592
54767
|
object({
|
|
54593
54768
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
54594
54769
|
lastPressedAt: number().nullable(),
|
|
@@ -64648,6 +64823,12 @@ Object.freeze({
|
|
|
64648
64823
|
addonId: null,
|
|
64649
64824
|
access: "view"
|
|
64650
64825
|
},
|
|
64826
|
+
"dishwasher.getOptions": {
|
|
64827
|
+
capName: "dishwasher",
|
|
64828
|
+
capScope: "device",
|
|
64829
|
+
addonId: null,
|
|
64830
|
+
access: "view"
|
|
64831
|
+
},
|
|
64651
64832
|
"dishwasher.getStatus": {
|
|
64652
64833
|
capName: "dishwasher",
|
|
64653
64834
|
capScope: "device",
|
|
@@ -64660,6 +64841,12 @@ Object.freeze({
|
|
|
64660
64841
|
addonId: null,
|
|
64661
64842
|
access: "create"
|
|
64662
64843
|
},
|
|
64844
|
+
"dishwasher.resume": {
|
|
64845
|
+
capName: "dishwasher",
|
|
64846
|
+
capScope: "device",
|
|
64847
|
+
addonId: null,
|
|
64848
|
+
access: "create"
|
|
64849
|
+
},
|
|
64663
64850
|
"dishwasher.setChildLock": {
|
|
64664
64851
|
capName: "dishwasher",
|
|
64665
64852
|
capScope: "device",
|
|
@@ -69160,6 +69347,12 @@ Object.freeze({
|
|
|
69160
69347
|
addonId: null,
|
|
69161
69348
|
access: "view"
|
|
69162
69349
|
},
|
|
69350
|
+
"storageMigration.moverClearance": {
|
|
69351
|
+
capName: "storage-migration",
|
|
69352
|
+
capScope: "system",
|
|
69353
|
+
addonId: null,
|
|
69354
|
+
access: "view"
|
|
69355
|
+
},
|
|
69163
69356
|
"storageMigration.movers": {
|
|
69164
69357
|
capName: "storage-migration",
|
|
69165
69358
|
capScope: "system",
|
|
@@ -71353,6 +71546,11 @@ Object.freeze({
|
|
|
71353
71546
|
form: "single",
|
|
71354
71547
|
optional: false
|
|
71355
71548
|
}],
|
|
71549
|
+
"dishwasher.getOptions": [{
|
|
71550
|
+
name: "deviceId",
|
|
71551
|
+
form: "single",
|
|
71552
|
+
optional: false
|
|
71553
|
+
}],
|
|
71356
71554
|
"dishwasher.getStatus": [{
|
|
71357
71555
|
name: "deviceId",
|
|
71358
71556
|
form: "single",
|
|
@@ -71363,6 +71561,11 @@ Object.freeze({
|
|
|
71363
71561
|
form: "single",
|
|
71364
71562
|
optional: false
|
|
71365
71563
|
}],
|
|
71564
|
+
"dishwasher.resume": [{
|
|
71565
|
+
name: "deviceId",
|
|
71566
|
+
form: "single",
|
|
71567
|
+
optional: false
|
|
71568
|
+
}],
|
|
71366
71569
|
"dishwasher.setChildLock": [{
|
|
71367
71570
|
name: "deviceId",
|
|
71368
71571
|
form: "single",
|
|
@@ -73656,6 +73859,9 @@ new Map(Object.entries({
|
|
|
73656
73859
|
"wrapper-update-available": "system",
|
|
73657
73860
|
"backup-completed": "system",
|
|
73658
73861
|
"export-completed": "system",
|
|
73862
|
+
"alert-critical": "system",
|
|
73863
|
+
"alert-error": "system",
|
|
73864
|
+
"alert-critical-resolved": "system",
|
|
73659
73865
|
"storage-location-low": "system",
|
|
73660
73866
|
"storage-location-critical": "system",
|
|
73661
73867
|
"storage-location-ok": "system",
|
|
@@ -73780,6 +73986,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
73780
73986
|
"storage-location-ok"
|
|
73781
73987
|
]
|
|
73782
73988
|
},
|
|
73989
|
+
{
|
|
73990
|
+
id: "alerts",
|
|
73991
|
+
family: "system",
|
|
73992
|
+
label: "Alerts",
|
|
73993
|
+
kinds: [
|
|
73994
|
+
"alert-critical",
|
|
73995
|
+
"alert-error",
|
|
73996
|
+
"alert-critical-resolved"
|
|
73997
|
+
]
|
|
73998
|
+
},
|
|
73783
73999
|
{
|
|
73784
74000
|
id: "alarm",
|
|
73785
74001
|
family: "alarm",
|
|
@@ -73824,6 +74040,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
|
|
|
73824
74040
|
return [[descriptor.kind, field]];
|
|
73825
74041
|
})));
|
|
73826
74042
|
Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
|
|
74043
|
+
object({
|
|
74044
|
+
phase: _enum(["raised", "resolved"]),
|
|
74045
|
+
episodeId: string().min(1),
|
|
74046
|
+
alertId: string().min(1),
|
|
74047
|
+
severity: AlertSeveritySchema,
|
|
74048
|
+
category: string(),
|
|
74049
|
+
title: string(),
|
|
74050
|
+
message: string(),
|
|
74051
|
+
sourceType: string().optional(),
|
|
74052
|
+
sourceId: string().optional(),
|
|
74053
|
+
nodeId: string().optional(),
|
|
74054
|
+
/** The alert's own action link (where the operator acts on it), when it has one. */
|
|
74055
|
+
actionUrl: string().optional(),
|
|
74056
|
+
at: number()
|
|
74057
|
+
});
|
|
73827
74058
|
var RULE_BODY_ONLY = ["body"];
|
|
73828
74059
|
var RULE_TEXT = ["title", "body"];
|
|
73829
74060
|
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
@@ -73833,6 +74064,11 @@ var TANK = [
|
|
|
73833
74064
|
"device-tank-full",
|
|
73834
74065
|
"device-tank-normal"
|
|
73835
74066
|
];
|
|
74067
|
+
var ALERT_EPISODE = [
|
|
74068
|
+
"alert-critical",
|
|
74069
|
+
"alert-error",
|
|
74070
|
+
"alert-critical-resolved"
|
|
74071
|
+
];
|
|
73836
74072
|
var UPDATES = [
|
|
73837
74073
|
"addon-update-available",
|
|
73838
74074
|
"server-update-available",
|
|
@@ -74025,14 +74261,14 @@ var STATE_SUMMARY_VARS = [
|
|
|
74025
74261
|
([...RULE_TEXT], [...CONSUMABLE]),
|
|
74026
74262
|
([...RULE_TEXT], [...TANK]),
|
|
74027
74263
|
[...RULE_TEXT],
|
|
74028
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
74029
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
74030
|
-
[...RULE_TEXT],
|
|
74264
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
74265
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
74031
74266
|
[...RULE_TEXT],
|
|
74032
74267
|
[...RULE_TEXT],
|
|
74033
74268
|
[...RULE_TEXT],
|
|
74034
74269
|
[...RULE_TEXT],
|
|
74035
74270
|
[...RULE_TEXT],
|
|
74271
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74036
74272
|
[...RULE_TEXT],
|
|
74037
74273
|
[...RULE_TEXT],
|
|
74038
74274
|
[...RULE_TEXT],
|
|
@@ -74050,7 +74286,11 @@ var STATE_SUMMARY_VARS = [
|
|
|
74050
74286
|
[...RULE_TEXT],
|
|
74051
74287
|
[...RULE_TEXT],
|
|
74052
74288
|
[...RULE_TEXT],
|
|
74053
|
-
[...RULE_TEXT],
|
|
74289
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74290
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74291
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74292
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74293
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74054
74294
|
[...RULE_TEXT],
|
|
74055
74295
|
[...RULE_TEXT],
|
|
74056
74296
|
[...RULE_TEXT],
|