@camstack/addon-mqtt-broker 1.2.127 → 1.2.129
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/mqtt-broker.addon.js +480 -240
- package/dist/mqtt-broker.addon.mjs +480 -240
- package/package.json +1 -1
|
@@ -39,7 +39,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
39
39
|
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
40
40
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
41
41
|
//#endregion
|
|
42
|
-
//#region ../types/dist/event-category-
|
|
42
|
+
//#region ../types/dist/event-category-DOl51-Ij.mjs
|
|
43
43
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
44
44
|
EventCategory["SystemBoot"] = "system.boot";
|
|
45
45
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -118,9 +118,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
118
118
|
/**
|
|
119
119
|
* The node's one-shot runner boot check (D877): planned runners against the
|
|
120
120
|
* process service, `degraded` when any is failed, refused or missing. The
|
|
121
|
-
* alert centre turns it into one
|
|
121
|
+
* alert centre turns it into one critical alert.
|
|
122
122
|
*/
|
|
123
123
|
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
124
|
+
/**
|
|
125
|
+
* An alert EPISODE opened or closed, emitted by the alert centre for alerts
|
|
126
|
+
* of severity `critical` or `error` (`AlertEpisodePayload`). The alert
|
|
127
|
+
* centre sends no notification of its own: Notification Center turns this
|
|
128
|
+
* into the `alert-critical` / `alert-error` / `alert-critical-resolved`
|
|
129
|
+
* system-event kinds, and reconciles from the alerts store because a bus
|
|
130
|
+
* event may be dropped (D8, D11).
|
|
131
|
+
*/
|
|
132
|
+
EventCategory["AlertEpisode"] = "alert.episode";
|
|
124
133
|
EventCategory["AddonError"] = "addon.error";
|
|
125
134
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
126
135
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -5578,7 +5587,7 @@ var ZodIssueCode = {
|
|
|
5578
5587
|
var ZodFirstPartyTypeKind;
|
|
5579
5588
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5580
5589
|
//#endregion
|
|
5581
|
-
//#region ../types/dist/sleep-
|
|
5590
|
+
//#region ../types/dist/sleep-BxjU_fJM.mjs
|
|
5582
5591
|
/**
|
|
5583
5592
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5584
5593
|
* window to float samples (D455).
|
|
@@ -7960,6 +7969,12 @@ function normalizeAddonInitResult(result) {
|
|
|
7960
7969
|
if (Array.isArray(result)) return { providers: result };
|
|
7961
7970
|
return result;
|
|
7962
7971
|
}
|
|
7972
|
+
/**
|
|
7973
|
+
* The share-view scope kinds a `csv_*` share token can carry. The hub mints
|
|
7974
|
+
* and validates them (`share-token.service.ts` builds its enum from this
|
|
7975
|
+
* list); a data plane names the kinds it ACCEPTS in `share`.
|
|
7976
|
+
*/
|
|
7977
|
+
var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
|
|
7963
7978
|
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
7964
7979
|
var PeerBytesTicketSchema = object({
|
|
7965
7980
|
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
@@ -12820,6 +12835,229 @@ var ConvertResultSchema = object({
|
|
|
12820
12835
|
files: array(string()).readonly()
|
|
12821
12836
|
})).readonly()
|
|
12822
12837
|
});
|
|
12838
|
+
/**
|
|
12839
|
+
* Zod schemas for persisted record types.
|
|
12840
|
+
*
|
|
12841
|
+
* These schemas serve as the single source of truth for types that are
|
|
12842
|
+
* stored in the settings-store backend and retrieved via tRPC. They
|
|
12843
|
+
* replace the manual TypeScript interfaces with schema-derived types,
|
|
12844
|
+
* enabling runtime validation when reading from the backend.
|
|
12845
|
+
*
|
|
12846
|
+
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
12847
|
+
* keeps the original name for backward compatibility.
|
|
12848
|
+
*/
|
|
12849
|
+
/**
|
|
12850
|
+
* Auth model (v2 — 2026-05-12 caps-only):
|
|
12851
|
+
*
|
|
12852
|
+
* Two principals:
|
|
12853
|
+
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
12854
|
+
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
12855
|
+
*
|
|
12856
|
+
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
12857
|
+
* `super_admin` — collapsed onto the single boolean because every
|
|
12858
|
+
* non-admin caller is governed by the same scope-check rules; the
|
|
12859
|
+
* distinction was only ever used to route role-specific procedures
|
|
12860
|
+
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
12861
|
+
* with `isAdmin: false` + an explicit scope list.
|
|
12862
|
+
*/
|
|
12863
|
+
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
12864
|
+
var MethodAccessSchema = _enum([
|
|
12865
|
+
"view",
|
|
12866
|
+
"create",
|
|
12867
|
+
"delete"
|
|
12868
|
+
]);
|
|
12869
|
+
/**
|
|
12870
|
+
* A single scope grant. Three forms — checked in matcher with OR
|
|
12871
|
+
* semantics; the first match decides whether the call passes:
|
|
12872
|
+
*
|
|
12873
|
+
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
12874
|
+
* cap with the matching `scope` declaration. New caps inherit grants
|
|
12875
|
+
* automatically — adding a device cap to the codebase makes it
|
|
12876
|
+
* reachable to every user with `category:device [...]` without a
|
|
12877
|
+
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
12878
|
+
*
|
|
12879
|
+
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
12880
|
+
* useful when an integration needs to interact with one specific
|
|
12881
|
+
* addon's surface regardless of how many caps it exports.
|
|
12882
|
+
*
|
|
12883
|
+
* - `capability` — the most precise form. Single cap name. Use for
|
|
12884
|
+
* integration tokens where you want to grant `addons.installPackage`
|
|
12885
|
+
* and nothing else.
|
|
12886
|
+
*
|
|
12887
|
+
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
12888
|
+
* "give me everything" escape; there is no wildcard scope.
|
|
12889
|
+
*/
|
|
12890
|
+
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
12891
|
+
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
12892
|
+
var CapScopeSchema = _enum(["device", "system"]);
|
|
12893
|
+
/**
|
|
12894
|
+
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
12895
|
+
*
|
|
12896
|
+
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
12897
|
+
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
12898
|
+
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
12899
|
+
* AFTER the grant was minted — no re-grant, no re-login.
|
|
12900
|
+
*
|
|
12901
|
+
* - `all` — every device in the deployment. The broad viewer/operator
|
|
12902
|
+
* lever without a `category` grant (a `category` grant also covers device
|
|
12903
|
+
* caps that carry no deviceId; `all` is specifically the device set).
|
|
12904
|
+
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
12905
|
+
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
12906
|
+
* is NOT covered until the grant is edited.
|
|
12907
|
+
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
12908
|
+
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
12909
|
+
* re-resolves on the next request.
|
|
12910
|
+
* - `locations` — every device whose operator-assigned `location` label is
|
|
12911
|
+
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
12912
|
+
* null/unset location matches NO `locations` selector.
|
|
12913
|
+
*/
|
|
12914
|
+
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
12915
|
+
object({ kind: literal("all") }),
|
|
12916
|
+
object({
|
|
12917
|
+
kind: literal("ids"),
|
|
12918
|
+
ids: array(number().int()).min(1)
|
|
12919
|
+
}),
|
|
12920
|
+
object({
|
|
12921
|
+
kind: literal("types"),
|
|
12922
|
+
types: array(_enum(DeviceType)).min(1)
|
|
12923
|
+
}),
|
|
12924
|
+
object({
|
|
12925
|
+
kind: literal("locations"),
|
|
12926
|
+
locations: array(string().min(1)).min(1)
|
|
12927
|
+
})
|
|
12928
|
+
]);
|
|
12929
|
+
var DeviceTokenScopeSchema = object({
|
|
12930
|
+
type: literal("device"),
|
|
12931
|
+
/** The device SET this grant covers — resolved against the live fleet. */
|
|
12932
|
+
selector: DeviceSelectorSchema,
|
|
12933
|
+
access: array(MethodAccessSchema).min(1),
|
|
12934
|
+
/**
|
|
12935
|
+
* Whether a grant on a PARENT device transparently covers its accessory
|
|
12936
|
+
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
12937
|
+
* Direction is parent → children ONLY.
|
|
12938
|
+
*
|
|
12939
|
+
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
12940
|
+
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
12941
|
+
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
12942
|
+
* operator must grant on the child, not inherit from the parent). Set it
|
|
12943
|
+
* explicitly to override that default per grant.
|
|
12944
|
+
*/
|
|
12945
|
+
includeLinked: boolean().optional()
|
|
12946
|
+
});
|
|
12947
|
+
/**
|
|
12948
|
+
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
12949
|
+
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
12950
|
+
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
12951
|
+
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
12952
|
+
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
12953
|
+
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
12954
|
+
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
12955
|
+
* migration covers both without a flag day. No cast — the raw object is read
|
|
12956
|
+
* through `Reflect.get` (its static type is `unknown`).
|
|
12957
|
+
*/
|
|
12958
|
+
function migrateLegacyTokenScope(raw) {
|
|
12959
|
+
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
12960
|
+
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
12961
|
+
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
12962
|
+
const targets = Reflect.get(raw, "targets");
|
|
12963
|
+
if (!Array.isArray(targets)) return raw;
|
|
12964
|
+
return {
|
|
12965
|
+
type: "device",
|
|
12966
|
+
selector: {
|
|
12967
|
+
kind: "ids",
|
|
12968
|
+
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
12969
|
+
},
|
|
12970
|
+
access: Reflect.get(raw, "access")
|
|
12971
|
+
};
|
|
12972
|
+
}
|
|
12973
|
+
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
12974
|
+
object({
|
|
12975
|
+
type: literal("category"),
|
|
12976
|
+
target: CapScopeSchema,
|
|
12977
|
+
access: array(MethodAccessSchema).min(1)
|
|
12978
|
+
}),
|
|
12979
|
+
object({
|
|
12980
|
+
type: literal("capability"),
|
|
12981
|
+
target: string(),
|
|
12982
|
+
access: array(MethodAccessSchema).min(1)
|
|
12983
|
+
}),
|
|
12984
|
+
object({
|
|
12985
|
+
type: literal("addon"),
|
|
12986
|
+
target: string(),
|
|
12987
|
+
access: array(MethodAccessSchema).min(1)
|
|
12988
|
+
}),
|
|
12989
|
+
DeviceTokenScopeSchema
|
|
12990
|
+
]));
|
|
12991
|
+
object({
|
|
12992
|
+
id: string(),
|
|
12993
|
+
username: string(),
|
|
12994
|
+
passwordHash: string(),
|
|
12995
|
+
/**
|
|
12996
|
+
* Admin bypass. When true, the middleware skips the scope-access
|
|
12997
|
+
* check entirely. There is no other axis of privilege; the legacy
|
|
12998
|
+
* role enum collapsed onto this boolean in v2.
|
|
12999
|
+
*/
|
|
13000
|
+
isAdmin: boolean().default(false),
|
|
13001
|
+
allowedProviders: AllowedProviderSchema,
|
|
13002
|
+
allowedDevices: AllowedDevicesSchema,
|
|
13003
|
+
/**
|
|
13004
|
+
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
13005
|
+
* ignored. Non-admins without scopes are locked out of every
|
|
13006
|
+
* protected call.
|
|
13007
|
+
*/
|
|
13008
|
+
scopes: array(TokenScopeSchema).default([]),
|
|
13009
|
+
createdAt: number(),
|
|
13010
|
+
updatedAt: number()
|
|
13011
|
+
});
|
|
13012
|
+
object({
|
|
13013
|
+
id: string(),
|
|
13014
|
+
label: string(),
|
|
13015
|
+
isAdmin: boolean().default(false),
|
|
13016
|
+
allowedProviders: AllowedProviderSchema,
|
|
13017
|
+
allowedDevices: AllowedDevicesSchema,
|
|
13018
|
+
tokenHash: string(),
|
|
13019
|
+
tokenPrefix: string(),
|
|
13020
|
+
createdAt: number(),
|
|
13021
|
+
lastUsedAt: number().optional()
|
|
13022
|
+
});
|
|
13023
|
+
object({
|
|
13024
|
+
id: string(),
|
|
13025
|
+
userId: string(),
|
|
13026
|
+
name: string(),
|
|
13027
|
+
tokenHash: string(),
|
|
13028
|
+
tokenPrefix: string(),
|
|
13029
|
+
scopes: array(TokenScopeSchema),
|
|
13030
|
+
expiresAt: number().nullish(),
|
|
13031
|
+
lastUsedAt: number().nullish(),
|
|
13032
|
+
createdAt: number()
|
|
13033
|
+
});
|
|
13034
|
+
/** What a share-view grant lets its holder see. */
|
|
13035
|
+
var ShareViewGrantSchema = object({
|
|
13036
|
+
kind: _enum(SHARE_VIEW_KINDS),
|
|
13037
|
+
deviceIds: array(number().int().nonnegative()).min(1).max(64),
|
|
13038
|
+
/** Talk-back, opt-in at mint time; absent means off. */
|
|
13039
|
+
talk: boolean().optional()
|
|
13040
|
+
});
|
|
13041
|
+
var ShareViewScopeSchema = object({
|
|
13042
|
+
type: literal("share-view"),
|
|
13043
|
+
grant: ShareViewGrantSchema
|
|
13044
|
+
});
|
|
13045
|
+
var AddonRoutesScopeSchema = object({
|
|
13046
|
+
type: literal("addon-routes"),
|
|
13047
|
+
access: array(MethodAccessSchema).min(1)
|
|
13048
|
+
});
|
|
13049
|
+
var CredentialScopeSchema = union([
|
|
13050
|
+
literal("*"),
|
|
13051
|
+
ShareViewScopeSchema,
|
|
13052
|
+
AddonRoutesScopeSchema,
|
|
13053
|
+
TokenScopeSchema
|
|
13054
|
+
]);
|
|
13055
|
+
object({
|
|
13056
|
+
kind: literal("credential"),
|
|
13057
|
+
sub: string().min(1),
|
|
13058
|
+
jti: string().min(16),
|
|
13059
|
+
scopes: array(CredentialScopeSchema).min(1)
|
|
13060
|
+
});
|
|
12823
13061
|
_enum(["new-session", "step-up"]);
|
|
12824
13062
|
/** The languages the hub's app landing pages are written in (D858). */
|
|
12825
13063
|
var AppPageLangSchema = _enum(["en", "it"]);
|
|
@@ -13536,7 +13774,14 @@ var AlertSeveritySchema = _enum([
|
|
|
13536
13774
|
]);
|
|
13537
13775
|
var AlertActionSchema = object({
|
|
13538
13776
|
label: string(),
|
|
13539
|
-
href: string().optional()
|
|
13777
|
+
href: string().optional(),
|
|
13778
|
+
/**
|
|
13779
|
+
* How `href` is followed. Absent / `app`: an admin-ui route (client-side).
|
|
13780
|
+
* `server`: a route the HUB serves (an addon HTTP route such as an OAuth
|
|
13781
|
+
* start) — the browser must leave the SPA with a full navigation, because
|
|
13782
|
+
* the SPA has no such route and would bounce to the home page.
|
|
13783
|
+
*/
|
|
13784
|
+
navigation: _enum(["app", "server"]).optional()
|
|
13540
13785
|
});
|
|
13541
13786
|
var AlertStatusSchema = _enum([
|
|
13542
13787
|
"active",
|
|
@@ -41980,6 +42225,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
41980
42225
|
"server-updated",
|
|
41981
42226
|
"export-completed",
|
|
41982
42227
|
"backup-completed",
|
|
42228
|
+
"alert-critical",
|
|
42229
|
+
"alert-error",
|
|
42230
|
+
"alert-critical-resolved",
|
|
41983
42231
|
"camera-online",
|
|
41984
42232
|
"camera-offline",
|
|
41985
42233
|
"camera-disabled",
|
|
@@ -44015,202 +44263,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
44015
44263
|
auth: "admin"
|
|
44016
44264
|
}), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
|
|
44017
44265
|
/**
|
|
44018
|
-
* Zod schemas for persisted record types.
|
|
44019
|
-
*
|
|
44020
|
-
* These schemas serve as the single source of truth for types that are
|
|
44021
|
-
* stored in the settings-store backend and retrieved via tRPC. They
|
|
44022
|
-
* replace the manual TypeScript interfaces with schema-derived types,
|
|
44023
|
-
* enabling runtime validation when reading from the backend.
|
|
44024
|
-
*
|
|
44025
|
-
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
44026
|
-
* keeps the original name for backward compatibility.
|
|
44027
|
-
*/
|
|
44028
|
-
/**
|
|
44029
|
-
* Auth model (v2 — 2026-05-12 caps-only):
|
|
44030
|
-
*
|
|
44031
|
-
* Two principals:
|
|
44032
|
-
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
44033
|
-
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
44034
|
-
*
|
|
44035
|
-
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
44036
|
-
* `super_admin` — collapsed onto the single boolean because every
|
|
44037
|
-
* non-admin caller is governed by the same scope-check rules; the
|
|
44038
|
-
* distinction was only ever used to route role-specific procedures
|
|
44039
|
-
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
44040
|
-
* with `isAdmin: false` + an explicit scope list.
|
|
44041
|
-
*/
|
|
44042
|
-
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
44043
|
-
var MethodAccessSchema = _enum([
|
|
44044
|
-
"view",
|
|
44045
|
-
"create",
|
|
44046
|
-
"delete"
|
|
44047
|
-
]);
|
|
44048
|
-
/**
|
|
44049
|
-
* A single scope grant. Three forms — checked in matcher with OR
|
|
44050
|
-
* semantics; the first match decides whether the call passes:
|
|
44051
|
-
*
|
|
44052
|
-
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
44053
|
-
* cap with the matching `scope` declaration. New caps inherit grants
|
|
44054
|
-
* automatically — adding a device cap to the codebase makes it
|
|
44055
|
-
* reachable to every user with `category:device [...]` without a
|
|
44056
|
-
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
44057
|
-
*
|
|
44058
|
-
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
44059
|
-
* useful when an integration needs to interact with one specific
|
|
44060
|
-
* addon's surface regardless of how many caps it exports.
|
|
44061
|
-
*
|
|
44062
|
-
* - `capability` — the most precise form. Single cap name. Use for
|
|
44063
|
-
* integration tokens where you want to grant `addons.installPackage`
|
|
44064
|
-
* and nothing else.
|
|
44065
|
-
*
|
|
44066
|
-
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
44067
|
-
* "give me everything" escape; there is no wildcard scope.
|
|
44068
|
-
*/
|
|
44069
|
-
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
44070
|
-
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
44071
|
-
var CapScopeSchema = _enum(["device", "system"]);
|
|
44072
|
-
/**
|
|
44073
|
-
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
44074
|
-
*
|
|
44075
|
-
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
44076
|
-
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
44077
|
-
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
44078
|
-
* AFTER the grant was minted — no re-grant, no re-login.
|
|
44079
|
-
*
|
|
44080
|
-
* - `all` — every device in the deployment. The broad viewer/operator
|
|
44081
|
-
* lever without a `category` grant (a `category` grant also covers device
|
|
44082
|
-
* caps that carry no deviceId; `all` is specifically the device set).
|
|
44083
|
-
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
44084
|
-
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
44085
|
-
* is NOT covered until the grant is edited.
|
|
44086
|
-
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
44087
|
-
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
44088
|
-
* re-resolves on the next request.
|
|
44089
|
-
* - `locations` — every device whose operator-assigned `location` label is
|
|
44090
|
-
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
44091
|
-
* null/unset location matches NO `locations` selector.
|
|
44092
|
-
*/
|
|
44093
|
-
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
44094
|
-
object({ kind: literal("all") }),
|
|
44095
|
-
object({
|
|
44096
|
-
kind: literal("ids"),
|
|
44097
|
-
ids: array(number().int()).min(1)
|
|
44098
|
-
}),
|
|
44099
|
-
object({
|
|
44100
|
-
kind: literal("types"),
|
|
44101
|
-
types: array(_enum(DeviceType)).min(1)
|
|
44102
|
-
}),
|
|
44103
|
-
object({
|
|
44104
|
-
kind: literal("locations"),
|
|
44105
|
-
locations: array(string().min(1)).min(1)
|
|
44106
|
-
})
|
|
44107
|
-
]);
|
|
44108
|
-
var DeviceTokenScopeSchema = object({
|
|
44109
|
-
type: literal("device"),
|
|
44110
|
-
/** The device SET this grant covers — resolved against the live fleet. */
|
|
44111
|
-
selector: DeviceSelectorSchema,
|
|
44112
|
-
access: array(MethodAccessSchema).min(1),
|
|
44113
|
-
/**
|
|
44114
|
-
* Whether a grant on a PARENT device transparently covers its accessory
|
|
44115
|
-
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
44116
|
-
* Direction is parent → children ONLY.
|
|
44117
|
-
*
|
|
44118
|
-
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
44119
|
-
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
44120
|
-
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
44121
|
-
* operator must grant on the child, not inherit from the parent). Set it
|
|
44122
|
-
* explicitly to override that default per grant.
|
|
44123
|
-
*/
|
|
44124
|
-
includeLinked: boolean().optional()
|
|
44125
|
-
});
|
|
44126
|
-
/**
|
|
44127
|
-
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
44128
|
-
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
44129
|
-
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
44130
|
-
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
44131
|
-
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
44132
|
-
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
44133
|
-
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
44134
|
-
* migration covers both without a flag day. No cast — the raw object is read
|
|
44135
|
-
* through `Reflect.get` (its static type is `unknown`).
|
|
44136
|
-
*/
|
|
44137
|
-
function migrateLegacyTokenScope(raw) {
|
|
44138
|
-
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
44139
|
-
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
44140
|
-
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
44141
|
-
const targets = Reflect.get(raw, "targets");
|
|
44142
|
-
if (!Array.isArray(targets)) return raw;
|
|
44143
|
-
return {
|
|
44144
|
-
type: "device",
|
|
44145
|
-
selector: {
|
|
44146
|
-
kind: "ids",
|
|
44147
|
-
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
44148
|
-
},
|
|
44149
|
-
access: Reflect.get(raw, "access")
|
|
44150
|
-
};
|
|
44151
|
-
}
|
|
44152
|
-
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
44153
|
-
object({
|
|
44154
|
-
type: literal("category"),
|
|
44155
|
-
target: CapScopeSchema,
|
|
44156
|
-
access: array(MethodAccessSchema).min(1)
|
|
44157
|
-
}),
|
|
44158
|
-
object({
|
|
44159
|
-
type: literal("capability"),
|
|
44160
|
-
target: string(),
|
|
44161
|
-
access: array(MethodAccessSchema).min(1)
|
|
44162
|
-
}),
|
|
44163
|
-
object({
|
|
44164
|
-
type: literal("addon"),
|
|
44165
|
-
target: string(),
|
|
44166
|
-
access: array(MethodAccessSchema).min(1)
|
|
44167
|
-
}),
|
|
44168
|
-
DeviceTokenScopeSchema
|
|
44169
|
-
]));
|
|
44170
|
-
object({
|
|
44171
|
-
id: string(),
|
|
44172
|
-
username: string(),
|
|
44173
|
-
passwordHash: string(),
|
|
44174
|
-
/**
|
|
44175
|
-
* Admin bypass. When true, the middleware skips the scope-access
|
|
44176
|
-
* check entirely. There is no other axis of privilege; the legacy
|
|
44177
|
-
* role enum collapsed onto this boolean in v2.
|
|
44178
|
-
*/
|
|
44179
|
-
isAdmin: boolean().default(false),
|
|
44180
|
-
allowedProviders: AllowedProviderSchema,
|
|
44181
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44182
|
-
/**
|
|
44183
|
-
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
44184
|
-
* ignored. Non-admins without scopes are locked out of every
|
|
44185
|
-
* protected call.
|
|
44186
|
-
*/
|
|
44187
|
-
scopes: array(TokenScopeSchema).default([]),
|
|
44188
|
-
createdAt: number(),
|
|
44189
|
-
updatedAt: number()
|
|
44190
|
-
});
|
|
44191
|
-
object({
|
|
44192
|
-
id: string(),
|
|
44193
|
-
label: string(),
|
|
44194
|
-
isAdmin: boolean().default(false),
|
|
44195
|
-
allowedProviders: AllowedProviderSchema,
|
|
44196
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44197
|
-
tokenHash: string(),
|
|
44198
|
-
tokenPrefix: string(),
|
|
44199
|
-
createdAt: number(),
|
|
44200
|
-
lastUsedAt: number().optional()
|
|
44201
|
-
});
|
|
44202
|
-
object({
|
|
44203
|
-
id: string(),
|
|
44204
|
-
userId: string(),
|
|
44205
|
-
name: string(),
|
|
44206
|
-
tokenHash: string(),
|
|
44207
|
-
tokenPrefix: string(),
|
|
44208
|
-
scopes: array(TokenScopeSchema),
|
|
44209
|
-
expiresAt: number().nullish(),
|
|
44210
|
-
lastUsedAt: number().nullish(),
|
|
44211
|
-
createdAt: number()
|
|
44212
|
-
});
|
|
44213
|
-
/**
|
|
44214
44266
|
* `oauth-integration` — a collection cap by which an addon declares
|
|
44215
44267
|
* itself a linkable OAuth client of the hub's core `/oauth2/*` server.
|
|
44216
44268
|
* Each provider returns a static descriptor; the core enumerates them
|
|
@@ -51012,7 +51064,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
51012
51064
|
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
51013
51065
|
kind: "mutation",
|
|
51014
51066
|
auth: "admin"
|
|
51015
|
-
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({
|
|
51067
|
+
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
|
|
51068
|
+
clear: boolean(),
|
|
51069
|
+
repointLocationId: string().optional()
|
|
51070
|
+
}), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
|
|
51016
51071
|
kind: "mutation",
|
|
51017
51072
|
auth: "admin"
|
|
51018
51073
|
}), method(StorageCleanupInputSchema, object({ jobId: string() }), {
|
|
@@ -54447,6 +54502,11 @@ object({
|
|
|
54447
54502
|
*
|
|
54448
54503
|
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
54449
54504
|
* provider refreshes the slice on an interval and eagerly after commands.
|
|
54505
|
+
*
|
|
54506
|
+
* UNKNOWN IS NOT OFF. Every field the appliance reports separately is
|
|
54507
|
+
* nullable: `null` means "not known right now" (the appliance has not said,
|
|
54508
|
+
* the link is down, or the description does not carry it) and is never
|
|
54509
|
+
* rendered or exported as `false` / `0`. `availability` says why.
|
|
54450
54510
|
*/
|
|
54451
54511
|
var DishwasherStateSchema = _enum([
|
|
54452
54512
|
"idle",
|
|
@@ -54456,112 +54516,227 @@ var DishwasherStateSchema = _enum([
|
|
|
54456
54516
|
"error",
|
|
54457
54517
|
"unavailable"
|
|
54458
54518
|
]);
|
|
54519
|
+
/**
|
|
54520
|
+
* The appliance's own operation state, uncollapsed. `state` above is the coarse
|
|
54521
|
+
* view for compact surfaces; this is what the appliance said.
|
|
54522
|
+
*/
|
|
54523
|
+
var DishwasherOperationStateSchema = _enum([
|
|
54524
|
+
"Inactive",
|
|
54525
|
+
"Ready",
|
|
54526
|
+
"DelayedStart",
|
|
54527
|
+
"Run",
|
|
54528
|
+
"Pause",
|
|
54529
|
+
"ActionRequired",
|
|
54530
|
+
"Finished",
|
|
54531
|
+
"Error",
|
|
54532
|
+
"Aborting"
|
|
54533
|
+
]);
|
|
54534
|
+
/**
|
|
54535
|
+
* Why fields may be `null`:
|
|
54536
|
+
* - `available` — the link is up and the description is loaded;
|
|
54537
|
+
* - `offline` — the local link is down (values are unknown, not last-known);
|
|
54538
|
+
* - `description-missing` — the link is up but the appliance's description could not
|
|
54539
|
+
* be loaded, so its values cannot be decoded.
|
|
54540
|
+
*/
|
|
54541
|
+
var DishwasherAvailabilitySchema = _enum([
|
|
54542
|
+
"available",
|
|
54543
|
+
"offline",
|
|
54544
|
+
"description-missing"
|
|
54545
|
+
]);
|
|
54459
54546
|
var DishwasherConsumableLevelSchema = _enum([
|
|
54460
54547
|
"ok",
|
|
54461
54548
|
"low",
|
|
54462
54549
|
"empty"
|
|
54463
54550
|
]);
|
|
54464
54551
|
object({
|
|
54552
|
+
availability: DishwasherAvailabilitySchema,
|
|
54553
|
+
/** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
|
|
54465
54554
|
state: DishwasherStateSchema,
|
|
54466
|
-
/**
|
|
54555
|
+
/** The appliance's operation state as reported; null when not known. */
|
|
54556
|
+
operationState: DishwasherOperationStateSchema.nullable(),
|
|
54557
|
+
/** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
|
|
54467
54558
|
program: string().nullable(),
|
|
54468
|
-
/**
|
|
54559
|
+
/** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
|
|
54560
|
+
selectedProgram: string().nullable(),
|
|
54561
|
+
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
54469
54562
|
availablePrograms: array(string()),
|
|
54470
|
-
/**
|
|
54471
|
-
|
|
54563
|
+
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
54564
|
+
remainingSeconds: number().int().nonnegative().nullable(),
|
|
54565
|
+
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
54566
|
+
delayedStartSeconds: number().int().nonnegative().nullable(),
|
|
54472
54567
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
54473
54568
|
progressPercent: number().min(0).max(100).nullable(),
|
|
54474
|
-
/** True when the door is reported open. */
|
|
54475
|
-
doorOpen: boolean(),
|
|
54476
|
-
/** True when
|
|
54477
|
-
|
|
54478
|
-
/**
|
|
54479
|
-
|
|
54569
|
+
/** True when the door is reported open; null when the door state is not known. */
|
|
54570
|
+
doorOpen: boolean().nullable(),
|
|
54571
|
+
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
54572
|
+
doorLocked: boolean().nullable(),
|
|
54573
|
+
/** True when remote start is allowed (door closed, power on, etc.); null when not known. */
|
|
54574
|
+
remoteStartAllowed: boolean().nullable(),
|
|
54575
|
+
/** True when the appliance accepts remote control now; null when not known. */
|
|
54576
|
+
remoteControlActive: boolean().nullable(),
|
|
54577
|
+
/** True while somebody operates the appliance at its panel; null when not reported. */
|
|
54578
|
+
localControlActive: boolean().nullable(),
|
|
54579
|
+
/** Main power / switched-on state; null when not known. */
|
|
54580
|
+
powerOn: boolean().nullable(),
|
|
54581
|
+
/** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
|
|
54582
|
+
powerState: string().nullable(),
|
|
54480
54583
|
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
54481
54584
|
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
54482
|
-
|
|
54483
|
-
|
|
54585
|
+
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
54586
|
+
halfLoad: boolean().nullable(),
|
|
54587
|
+
hygienePlus: boolean().nullable(),
|
|
54484
54588
|
/** Extra dry option when the appliance exposes it. */
|
|
54485
|
-
extraDry: boolean(),
|
|
54589
|
+
extraDry: boolean().nullable(),
|
|
54486
54590
|
/** Intensive zone (lower basket) when the appliance exposes it. */
|
|
54487
|
-
intensiveZone: boolean(),
|
|
54591
|
+
intensiveZone: boolean().nullable(),
|
|
54488
54592
|
/** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
|
|
54489
|
-
varioSpeedPlus: boolean(),
|
|
54490
|
-
/** Child lock (controls disabled on the appliance). */
|
|
54491
|
-
childLock: boolean(),
|
|
54593
|
+
varioSpeedPlus: boolean().nullable(),
|
|
54594
|
+
/** Child lock (controls disabled on the appliance); null when not known. */
|
|
54595
|
+
childLock: boolean().nullable(),
|
|
54596
|
+
/** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
|
|
54597
|
+
activeEvents: array(string()),
|
|
54598
|
+
/** Numeric error code when the appliance reports one; null otherwise. */
|
|
54492
54599
|
errorCode: number().nullable(),
|
|
54600
|
+
/** Name of the raised alert-level event while the appliance is in error; null otherwise. */
|
|
54493
54601
|
errorLabel: string().nullable(),
|
|
54602
|
+
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
54494
54603
|
lastFetchedAt: number()
|
|
54495
54604
|
});
|
|
54496
|
-
|
|
54605
|
+
var DeviceIdSchema = number().int().nonnegative();
|
|
54606
|
+
/** A value a program option or setting can take. */
|
|
54607
|
+
var DishwasherValueSchema = union([
|
|
54608
|
+
boolean(),
|
|
54609
|
+
string(),
|
|
54610
|
+
number()
|
|
54611
|
+
]);
|
|
54612
|
+
var DishwasherAccessSchema = _enum([
|
|
54613
|
+
"none",
|
|
54614
|
+
"read",
|
|
54615
|
+
"readWrite",
|
|
54616
|
+
"writeOnly",
|
|
54617
|
+
"readStatic"
|
|
54618
|
+
]);
|
|
54619
|
+
/**
|
|
54620
|
+
* One option or setting the appliance declares, with the constraints its description
|
|
54621
|
+
* gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
|
|
54622
|
+
*/
|
|
54623
|
+
var DishwasherOptionDescriptorSchema = object({
|
|
54624
|
+
/** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
|
|
54625
|
+
key: string(),
|
|
54626
|
+
/** Last segment of the key, for display. */
|
|
54627
|
+
name: string(),
|
|
54628
|
+
type: _enum([
|
|
54629
|
+
"boolean",
|
|
54630
|
+
"number",
|
|
54631
|
+
"enum",
|
|
54632
|
+
"string"
|
|
54633
|
+
]),
|
|
54634
|
+
access: DishwasherAccessSchema,
|
|
54635
|
+
/** The appliance reports this entity as currently available. */
|
|
54636
|
+
available: boolean(),
|
|
54637
|
+
/** Unit the description declares for a number; null when it declares none. */
|
|
54638
|
+
unit: string().nullable(),
|
|
54639
|
+
min: number().nullable(),
|
|
54640
|
+
max: number().nullable(),
|
|
54641
|
+
step: number().nullable(),
|
|
54642
|
+
/** Allowed members of an enum; null for other types. */
|
|
54643
|
+
enumValues: array(string()).nullable(),
|
|
54644
|
+
defaultValue: DishwasherValueSchema.nullable()
|
|
54645
|
+
});
|
|
54646
|
+
var DishwasherProgramSchema = object({
|
|
54647
|
+
/** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
|
|
54648
|
+
key: string(),
|
|
54649
|
+
name: string(),
|
|
54650
|
+
/** The appliance currently offers this program. */
|
|
54651
|
+
available: boolean(),
|
|
54652
|
+
/** The options this program lists, with the program-level access / availability / default. */
|
|
54653
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
54654
|
+
});
|
|
54655
|
+
var DishwasherOptionsSchema = object({
|
|
54656
|
+
availability: DishwasherAvailabilitySchema,
|
|
54657
|
+
/** What the appliance can be told to do, from the commands its description declares. */
|
|
54658
|
+
supportsStart: boolean(),
|
|
54659
|
+
supportsPause: boolean(),
|
|
54660
|
+
supportsResume: boolean(),
|
|
54661
|
+
supportsStop: boolean(),
|
|
54662
|
+
supportsPower: boolean(),
|
|
54663
|
+
/** Every program the description lists, with its options. */
|
|
54664
|
+
programs: array(DishwasherProgramSchema),
|
|
54665
|
+
/** Every option and setting entity the description lists (programs reference these by key). */
|
|
54666
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
54667
|
+
});
|
|
54668
|
+
DeviceType.Dishwasher, method(object({
|
|
54669
|
+
deviceId: DeviceIdSchema,
|
|
54670
|
+
program: string().min(1).optional(),
|
|
54671
|
+
options: record(string(), DishwasherValueSchema).optional()
|
|
54672
|
+
}), _void(), {
|
|
54497
54673
|
kind: "mutation",
|
|
54498
54674
|
auth: "protected"
|
|
54499
|
-
}), method(object({ deviceId:
|
|
54675
|
+
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
54500
54676
|
kind: "mutation",
|
|
54501
54677
|
auth: "protected"
|
|
54502
|
-
}), method(object({ deviceId:
|
|
54678
|
+
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
54679
|
+
kind: "mutation",
|
|
54680
|
+
auth: "protected"
|
|
54681
|
+
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
54503
54682
|
kind: "mutation",
|
|
54504
54683
|
auth: "protected"
|
|
54505
54684
|
}), method(object({
|
|
54506
|
-
deviceId:
|
|
54685
|
+
deviceId: DeviceIdSchema,
|
|
54507
54686
|
program: string().min(1)
|
|
54508
54687
|
}), _void(), {
|
|
54509
54688
|
kind: "mutation",
|
|
54510
54689
|
auth: "protected"
|
|
54511
54690
|
}), method(object({
|
|
54512
|
-
deviceId:
|
|
54691
|
+
deviceId: DeviceIdSchema,
|
|
54513
54692
|
on: boolean()
|
|
54514
54693
|
}), _void(), {
|
|
54515
54694
|
kind: "mutation",
|
|
54516
54695
|
auth: "protected"
|
|
54517
54696
|
}), method(object({
|
|
54518
|
-
deviceId:
|
|
54697
|
+
deviceId: DeviceIdSchema,
|
|
54519
54698
|
on: boolean()
|
|
54520
54699
|
}), _void(), {
|
|
54521
54700
|
kind: "mutation",
|
|
54522
54701
|
auth: "protected"
|
|
54523
54702
|
}), method(object({
|
|
54524
|
-
deviceId:
|
|
54703
|
+
deviceId: DeviceIdSchema,
|
|
54525
54704
|
on: boolean()
|
|
54526
54705
|
}), _void(), {
|
|
54527
54706
|
kind: "mutation",
|
|
54528
54707
|
auth: "protected"
|
|
54529
54708
|
}), method(object({
|
|
54530
|
-
deviceId:
|
|
54709
|
+
deviceId: DeviceIdSchema,
|
|
54531
54710
|
on: boolean()
|
|
54532
54711
|
}), _void(), {
|
|
54533
54712
|
kind: "mutation",
|
|
54534
54713
|
auth: "protected"
|
|
54535
54714
|
}), method(object({
|
|
54536
|
-
deviceId:
|
|
54715
|
+
deviceId: DeviceIdSchema,
|
|
54537
54716
|
on: boolean()
|
|
54538
54717
|
}), _void(), {
|
|
54539
54718
|
kind: "mutation",
|
|
54540
54719
|
auth: "protected"
|
|
54541
54720
|
}), method(object({
|
|
54542
|
-
deviceId:
|
|
54721
|
+
deviceId: DeviceIdSchema,
|
|
54543
54722
|
on: boolean()
|
|
54544
54723
|
}), _void(), {
|
|
54545
54724
|
kind: "mutation",
|
|
54546
54725
|
auth: "protected"
|
|
54547
54726
|
}), method(object({
|
|
54548
|
-
deviceId:
|
|
54727
|
+
deviceId: DeviceIdSchema,
|
|
54549
54728
|
on: boolean()
|
|
54550
54729
|
}), _void(), {
|
|
54551
54730
|
kind: "mutation",
|
|
54552
54731
|
auth: "protected"
|
|
54553
54732
|
}), method(object({
|
|
54554
|
-
deviceId:
|
|
54733
|
+
deviceId: DeviceIdSchema,
|
|
54555
54734
|
key: string().min(1),
|
|
54556
|
-
value:
|
|
54557
|
-
boolean(),
|
|
54558
|
-
string(),
|
|
54559
|
-
number()
|
|
54560
|
-
])
|
|
54735
|
+
value: DishwasherValueSchema
|
|
54561
54736
|
}), _void(), {
|
|
54562
54737
|
kind: "mutation",
|
|
54563
54738
|
auth: "protected"
|
|
54564
|
-
});
|
|
54739
|
+
}), method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" });
|
|
54565
54740
|
object({
|
|
54566
54741
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
54567
54742
|
lastPressedAt: number().nullable(),
|
|
@@ -64621,6 +64796,12 @@ Object.freeze({
|
|
|
64621
64796
|
addonId: null,
|
|
64622
64797
|
access: "view"
|
|
64623
64798
|
},
|
|
64799
|
+
"dishwasher.getOptions": {
|
|
64800
|
+
capName: "dishwasher",
|
|
64801
|
+
capScope: "device",
|
|
64802
|
+
addonId: null,
|
|
64803
|
+
access: "view"
|
|
64804
|
+
},
|
|
64624
64805
|
"dishwasher.getStatus": {
|
|
64625
64806
|
capName: "dishwasher",
|
|
64626
64807
|
capScope: "device",
|
|
@@ -64633,6 +64814,12 @@ Object.freeze({
|
|
|
64633
64814
|
addonId: null,
|
|
64634
64815
|
access: "create"
|
|
64635
64816
|
},
|
|
64817
|
+
"dishwasher.resume": {
|
|
64818
|
+
capName: "dishwasher",
|
|
64819
|
+
capScope: "device",
|
|
64820
|
+
addonId: null,
|
|
64821
|
+
access: "create"
|
|
64822
|
+
},
|
|
64636
64823
|
"dishwasher.setChildLock": {
|
|
64637
64824
|
capName: "dishwasher",
|
|
64638
64825
|
capScope: "device",
|
|
@@ -69133,6 +69320,12 @@ Object.freeze({
|
|
|
69133
69320
|
addonId: null,
|
|
69134
69321
|
access: "view"
|
|
69135
69322
|
},
|
|
69323
|
+
"storageMigration.moverClearance": {
|
|
69324
|
+
capName: "storage-migration",
|
|
69325
|
+
capScope: "system",
|
|
69326
|
+
addonId: null,
|
|
69327
|
+
access: "view"
|
|
69328
|
+
},
|
|
69136
69329
|
"storageMigration.movers": {
|
|
69137
69330
|
capName: "storage-migration",
|
|
69138
69331
|
capScope: "system",
|
|
@@ -71326,6 +71519,11 @@ Object.freeze({
|
|
|
71326
71519
|
form: "single",
|
|
71327
71520
|
optional: false
|
|
71328
71521
|
}],
|
|
71522
|
+
"dishwasher.getOptions": [{
|
|
71523
|
+
name: "deviceId",
|
|
71524
|
+
form: "single",
|
|
71525
|
+
optional: false
|
|
71526
|
+
}],
|
|
71329
71527
|
"dishwasher.getStatus": [{
|
|
71330
71528
|
name: "deviceId",
|
|
71331
71529
|
form: "single",
|
|
@@ -71336,6 +71534,11 @@ Object.freeze({
|
|
|
71336
71534
|
form: "single",
|
|
71337
71535
|
optional: false
|
|
71338
71536
|
}],
|
|
71537
|
+
"dishwasher.resume": [{
|
|
71538
|
+
name: "deviceId",
|
|
71539
|
+
form: "single",
|
|
71540
|
+
optional: false
|
|
71541
|
+
}],
|
|
71339
71542
|
"dishwasher.setChildLock": [{
|
|
71340
71543
|
name: "deviceId",
|
|
71341
71544
|
form: "single",
|
|
@@ -73422,6 +73625,9 @@ new Map(Object.entries({
|
|
|
73422
73625
|
"wrapper-update-available": "system",
|
|
73423
73626
|
"backup-completed": "system",
|
|
73424
73627
|
"export-completed": "system",
|
|
73628
|
+
"alert-critical": "system",
|
|
73629
|
+
"alert-error": "system",
|
|
73630
|
+
"alert-critical-resolved": "system",
|
|
73425
73631
|
"storage-location-low": "system",
|
|
73426
73632
|
"storage-location-critical": "system",
|
|
73427
73633
|
"storage-location-ok": "system",
|
|
@@ -73546,6 +73752,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
73546
73752
|
"storage-location-ok"
|
|
73547
73753
|
]
|
|
73548
73754
|
},
|
|
73755
|
+
{
|
|
73756
|
+
id: "alerts",
|
|
73757
|
+
family: "system",
|
|
73758
|
+
label: "Alerts",
|
|
73759
|
+
kinds: [
|
|
73760
|
+
"alert-critical",
|
|
73761
|
+
"alert-error",
|
|
73762
|
+
"alert-critical-resolved"
|
|
73763
|
+
]
|
|
73764
|
+
},
|
|
73549
73765
|
{
|
|
73550
73766
|
id: "alarm",
|
|
73551
73767
|
family: "alarm",
|
|
@@ -73590,6 +73806,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
|
|
|
73590
73806
|
return [[descriptor.kind, field]];
|
|
73591
73807
|
})));
|
|
73592
73808
|
Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
|
|
73809
|
+
object({
|
|
73810
|
+
phase: _enum(["raised", "resolved"]),
|
|
73811
|
+
episodeId: string().min(1),
|
|
73812
|
+
alertId: string().min(1),
|
|
73813
|
+
severity: AlertSeveritySchema,
|
|
73814
|
+
category: string(),
|
|
73815
|
+
title: string(),
|
|
73816
|
+
message: string(),
|
|
73817
|
+
sourceType: string().optional(),
|
|
73818
|
+
sourceId: string().optional(),
|
|
73819
|
+
nodeId: string().optional(),
|
|
73820
|
+
/** The alert's own action link (where the operator acts on it), when it has one. */
|
|
73821
|
+
actionUrl: string().optional(),
|
|
73822
|
+
at: number()
|
|
73823
|
+
});
|
|
73593
73824
|
var RULE_BODY_ONLY = ["body"];
|
|
73594
73825
|
var RULE_TEXT = ["title", "body"];
|
|
73595
73826
|
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
@@ -73599,6 +73830,11 @@ var TANK = [
|
|
|
73599
73830
|
"device-tank-full",
|
|
73600
73831
|
"device-tank-normal"
|
|
73601
73832
|
];
|
|
73833
|
+
var ALERT_EPISODE = [
|
|
73834
|
+
"alert-critical",
|
|
73835
|
+
"alert-error",
|
|
73836
|
+
"alert-critical-resolved"
|
|
73837
|
+
];
|
|
73602
73838
|
var UPDATES = [
|
|
73603
73839
|
"addon-update-available",
|
|
73604
73840
|
"server-update-available",
|
|
@@ -73791,14 +74027,14 @@ var STATE_SUMMARY_VARS = [
|
|
|
73791
74027
|
([...RULE_TEXT], [...CONSUMABLE]),
|
|
73792
74028
|
([...RULE_TEXT], [...TANK]),
|
|
73793
74029
|
[...RULE_TEXT],
|
|
73794
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
73795
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
73796
|
-
[...RULE_TEXT],
|
|
74030
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
74031
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
73797
74032
|
[...RULE_TEXT],
|
|
73798
74033
|
[...RULE_TEXT],
|
|
73799
74034
|
[...RULE_TEXT],
|
|
73800
74035
|
[...RULE_TEXT],
|
|
73801
74036
|
[...RULE_TEXT],
|
|
74037
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
73802
74038
|
[...RULE_TEXT],
|
|
73803
74039
|
[...RULE_TEXT],
|
|
73804
74040
|
[...RULE_TEXT],
|
|
@@ -73816,7 +74052,11 @@ var STATE_SUMMARY_VARS = [
|
|
|
73816
74052
|
[...RULE_TEXT],
|
|
73817
74053
|
[...RULE_TEXT],
|
|
73818
74054
|
[...RULE_TEXT],
|
|
73819
|
-
[...RULE_TEXT],
|
|
74055
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74056
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74057
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74058
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74059
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
73820
74060
|
[...RULE_TEXT],
|
|
73821
74061
|
[...RULE_TEXT],
|
|
73822
74062
|
[...RULE_TEXT],
|