@camstack/addon-auth 1.2.150 → 1.2.152
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/{dist-BkvErNbe.mjs → dist-Bl63xJc3.mjs} +480 -240
- package/dist/{dist-Cfzg2F5r.js → dist-CbO7FEWb.js} +480 -240
- package/dist/oidc/auth-oidc.addon.js +1 -1
- package/dist/oidc/auth-oidc.addon.mjs +1 -1
- package/dist/webauthn/_stub.js +1 -1
- package/dist/webauthn/{_virtual_mf-localSharedImportMap___mfe_internal__addon_auth_webauthn_widgets-BwTb_2Js.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_auth_webauthn_widgets-DN95hHbV.mjs} +3 -3
- package/dist/webauthn/_virtual_mf___mfe_internal__addon_auth_webauthn_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CYp-mEEg.mjs +26 -0
- package/dist/webauthn/auth-webauthn.addon.js +1 -1
- package/dist/webauthn/auth-webauthn.addon.mjs +1 -1
- package/dist/webauthn/{hostInit-kER2VIgl.mjs → hostInit-B9msJ2J1.mjs} +3 -3
- package/dist/webauthn/remoteEntry.js +1 -1
- package/package.json +1 -1
- package/dist/webauthn/_virtual_mf___mfe_internal__addon_auth_webauthn_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DCLE6WWy.mjs +0 -26
|
@@ -32,7 +32,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
32
32
|
}) : target, mod));
|
|
33
33
|
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
34
34
|
require("node:crypto");
|
|
35
|
-
//#region ../types/dist/event-category-
|
|
35
|
+
//#region ../types/dist/event-category-DOl51-Ij.mjs
|
|
36
36
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
37
37
|
EventCategory["SystemBoot"] = "system.boot";
|
|
38
38
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -111,9 +111,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
111
111
|
/**
|
|
112
112
|
* The node's one-shot runner boot check (D877): planned runners against the
|
|
113
113
|
* process service, `degraded` when any is failed, refused or missing. The
|
|
114
|
-
* alert centre turns it into one
|
|
114
|
+
* alert centre turns it into one critical alert.
|
|
115
115
|
*/
|
|
116
116
|
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
117
|
+
/**
|
|
118
|
+
* An alert EPISODE opened or closed, emitted by the alert centre for alerts
|
|
119
|
+
* of severity `critical` or `error` (`AlertEpisodePayload`). The alert
|
|
120
|
+
* centre sends no notification of its own: Notification Center turns this
|
|
121
|
+
* into the `alert-critical` / `alert-error` / `alert-critical-resolved`
|
|
122
|
+
* system-event kinds, and reconciles from the alerts store because a bus
|
|
123
|
+
* event may be dropped (D8, D11).
|
|
124
|
+
*/
|
|
125
|
+
EventCategory["AlertEpisode"] = "alert.episode";
|
|
117
126
|
EventCategory["AddonError"] = "addon.error";
|
|
118
127
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
119
128
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -5571,7 +5580,7 @@ var ZodIssueCode = {
|
|
|
5571
5580
|
var ZodFirstPartyTypeKind;
|
|
5572
5581
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5573
5582
|
//#endregion
|
|
5574
|
-
//#region ../types/dist/sleep-
|
|
5583
|
+
//#region ../types/dist/sleep-BxjU_fJM.mjs
|
|
5575
5584
|
/**
|
|
5576
5585
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5577
5586
|
* window to float samples (D455).
|
|
@@ -7953,6 +7962,12 @@ function normalizeAddonInitResult(result) {
|
|
|
7953
7962
|
if (Array.isArray(result)) return { providers: result };
|
|
7954
7963
|
return result;
|
|
7955
7964
|
}
|
|
7965
|
+
/**
|
|
7966
|
+
* The share-view scope kinds a `csv_*` share token can carry. The hub mints
|
|
7967
|
+
* and validates them (`share-token.service.ts` builds its enum from this
|
|
7968
|
+
* list); a data plane names the kinds it ACCEPTS in `share`.
|
|
7969
|
+
*/
|
|
7970
|
+
var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
|
|
7956
7971
|
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
7957
7972
|
var PeerBytesTicketSchema = object({
|
|
7958
7973
|
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
@@ -12917,6 +12932,229 @@ var ConvertResultSchema = object({
|
|
|
12917
12932
|
})).readonly()
|
|
12918
12933
|
});
|
|
12919
12934
|
/**
|
|
12935
|
+
* Zod schemas for persisted record types.
|
|
12936
|
+
*
|
|
12937
|
+
* These schemas serve as the single source of truth for types that are
|
|
12938
|
+
* stored in the settings-store backend and retrieved via tRPC. They
|
|
12939
|
+
* replace the manual TypeScript interfaces with schema-derived types,
|
|
12940
|
+
* enabling runtime validation when reading from the backend.
|
|
12941
|
+
*
|
|
12942
|
+
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
12943
|
+
* keeps the original name for backward compatibility.
|
|
12944
|
+
*/
|
|
12945
|
+
/**
|
|
12946
|
+
* Auth model (v2 — 2026-05-12 caps-only):
|
|
12947
|
+
*
|
|
12948
|
+
* Two principals:
|
|
12949
|
+
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
12950
|
+
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
12951
|
+
*
|
|
12952
|
+
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
12953
|
+
* `super_admin` — collapsed onto the single boolean because every
|
|
12954
|
+
* non-admin caller is governed by the same scope-check rules; the
|
|
12955
|
+
* distinction was only ever used to route role-specific procedures
|
|
12956
|
+
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
12957
|
+
* with `isAdmin: false` + an explicit scope list.
|
|
12958
|
+
*/
|
|
12959
|
+
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
12960
|
+
var MethodAccessSchema = _enum([
|
|
12961
|
+
"view",
|
|
12962
|
+
"create",
|
|
12963
|
+
"delete"
|
|
12964
|
+
]);
|
|
12965
|
+
/**
|
|
12966
|
+
* A single scope grant. Three forms — checked in matcher with OR
|
|
12967
|
+
* semantics; the first match decides whether the call passes:
|
|
12968
|
+
*
|
|
12969
|
+
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
12970
|
+
* cap with the matching `scope` declaration. New caps inherit grants
|
|
12971
|
+
* automatically — adding a device cap to the codebase makes it
|
|
12972
|
+
* reachable to every user with `category:device [...]` without a
|
|
12973
|
+
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
12974
|
+
*
|
|
12975
|
+
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
12976
|
+
* useful when an integration needs to interact with one specific
|
|
12977
|
+
* addon's surface regardless of how many caps it exports.
|
|
12978
|
+
*
|
|
12979
|
+
* - `capability` — the most precise form. Single cap name. Use for
|
|
12980
|
+
* integration tokens where you want to grant `addons.installPackage`
|
|
12981
|
+
* and nothing else.
|
|
12982
|
+
*
|
|
12983
|
+
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
12984
|
+
* "give me everything" escape; there is no wildcard scope.
|
|
12985
|
+
*/
|
|
12986
|
+
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
12987
|
+
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
12988
|
+
var CapScopeSchema = _enum(["device", "system"]);
|
|
12989
|
+
/**
|
|
12990
|
+
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
12991
|
+
*
|
|
12992
|
+
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
12993
|
+
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
12994
|
+
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
12995
|
+
* AFTER the grant was minted — no re-grant, no re-login.
|
|
12996
|
+
*
|
|
12997
|
+
* - `all` — every device in the deployment. The broad viewer/operator
|
|
12998
|
+
* lever without a `category` grant (a `category` grant also covers device
|
|
12999
|
+
* caps that carry no deviceId; `all` is specifically the device set).
|
|
13000
|
+
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
13001
|
+
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
13002
|
+
* is NOT covered until the grant is edited.
|
|
13003
|
+
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
13004
|
+
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
13005
|
+
* re-resolves on the next request.
|
|
13006
|
+
* - `locations` — every device whose operator-assigned `location` label is
|
|
13007
|
+
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
13008
|
+
* null/unset location matches NO `locations` selector.
|
|
13009
|
+
*/
|
|
13010
|
+
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
13011
|
+
object({ kind: literal("all") }),
|
|
13012
|
+
object({
|
|
13013
|
+
kind: literal("ids"),
|
|
13014
|
+
ids: array(number().int()).min(1)
|
|
13015
|
+
}),
|
|
13016
|
+
object({
|
|
13017
|
+
kind: literal("types"),
|
|
13018
|
+
types: array(_enum(DeviceType)).min(1)
|
|
13019
|
+
}),
|
|
13020
|
+
object({
|
|
13021
|
+
kind: literal("locations"),
|
|
13022
|
+
locations: array(string().min(1)).min(1)
|
|
13023
|
+
})
|
|
13024
|
+
]);
|
|
13025
|
+
var DeviceTokenScopeSchema = object({
|
|
13026
|
+
type: literal("device"),
|
|
13027
|
+
/** The device SET this grant covers — resolved against the live fleet. */
|
|
13028
|
+
selector: DeviceSelectorSchema,
|
|
13029
|
+
access: array(MethodAccessSchema).min(1),
|
|
13030
|
+
/**
|
|
13031
|
+
* Whether a grant on a PARENT device transparently covers its accessory
|
|
13032
|
+
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
13033
|
+
* Direction is parent → children ONLY.
|
|
13034
|
+
*
|
|
13035
|
+
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
13036
|
+
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
13037
|
+
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
13038
|
+
* operator must grant on the child, not inherit from the parent). Set it
|
|
13039
|
+
* explicitly to override that default per grant.
|
|
13040
|
+
*/
|
|
13041
|
+
includeLinked: boolean().optional()
|
|
13042
|
+
});
|
|
13043
|
+
/**
|
|
13044
|
+
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
13045
|
+
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
13046
|
+
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
13047
|
+
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
13048
|
+
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
13049
|
+
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
13050
|
+
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
13051
|
+
* migration covers both without a flag day. No cast — the raw object is read
|
|
13052
|
+
* through `Reflect.get` (its static type is `unknown`).
|
|
13053
|
+
*/
|
|
13054
|
+
function migrateLegacyTokenScope(raw) {
|
|
13055
|
+
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
13056
|
+
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
13057
|
+
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
13058
|
+
const targets = Reflect.get(raw, "targets");
|
|
13059
|
+
if (!Array.isArray(targets)) return raw;
|
|
13060
|
+
return {
|
|
13061
|
+
type: "device",
|
|
13062
|
+
selector: {
|
|
13063
|
+
kind: "ids",
|
|
13064
|
+
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
13065
|
+
},
|
|
13066
|
+
access: Reflect.get(raw, "access")
|
|
13067
|
+
};
|
|
13068
|
+
}
|
|
13069
|
+
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
13070
|
+
object({
|
|
13071
|
+
type: literal("category"),
|
|
13072
|
+
target: CapScopeSchema,
|
|
13073
|
+
access: array(MethodAccessSchema).min(1)
|
|
13074
|
+
}),
|
|
13075
|
+
object({
|
|
13076
|
+
type: literal("capability"),
|
|
13077
|
+
target: string(),
|
|
13078
|
+
access: array(MethodAccessSchema).min(1)
|
|
13079
|
+
}),
|
|
13080
|
+
object({
|
|
13081
|
+
type: literal("addon"),
|
|
13082
|
+
target: string(),
|
|
13083
|
+
access: array(MethodAccessSchema).min(1)
|
|
13084
|
+
}),
|
|
13085
|
+
DeviceTokenScopeSchema
|
|
13086
|
+
]));
|
|
13087
|
+
object({
|
|
13088
|
+
id: string(),
|
|
13089
|
+
username: string(),
|
|
13090
|
+
passwordHash: string(),
|
|
13091
|
+
/**
|
|
13092
|
+
* Admin bypass. When true, the middleware skips the scope-access
|
|
13093
|
+
* check entirely. There is no other axis of privilege; the legacy
|
|
13094
|
+
* role enum collapsed onto this boolean in v2.
|
|
13095
|
+
*/
|
|
13096
|
+
isAdmin: boolean().default(false),
|
|
13097
|
+
allowedProviders: AllowedProviderSchema,
|
|
13098
|
+
allowedDevices: AllowedDevicesSchema,
|
|
13099
|
+
/**
|
|
13100
|
+
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
13101
|
+
* ignored. Non-admins without scopes are locked out of every
|
|
13102
|
+
* protected call.
|
|
13103
|
+
*/
|
|
13104
|
+
scopes: array(TokenScopeSchema).default([]),
|
|
13105
|
+
createdAt: number(),
|
|
13106
|
+
updatedAt: number()
|
|
13107
|
+
});
|
|
13108
|
+
object({
|
|
13109
|
+
id: string(),
|
|
13110
|
+
label: string(),
|
|
13111
|
+
isAdmin: boolean().default(false),
|
|
13112
|
+
allowedProviders: AllowedProviderSchema,
|
|
13113
|
+
allowedDevices: AllowedDevicesSchema,
|
|
13114
|
+
tokenHash: string(),
|
|
13115
|
+
tokenPrefix: string(),
|
|
13116
|
+
createdAt: number(),
|
|
13117
|
+
lastUsedAt: number().optional()
|
|
13118
|
+
});
|
|
13119
|
+
object({
|
|
13120
|
+
id: string(),
|
|
13121
|
+
userId: string(),
|
|
13122
|
+
name: string(),
|
|
13123
|
+
tokenHash: string(),
|
|
13124
|
+
tokenPrefix: string(),
|
|
13125
|
+
scopes: array(TokenScopeSchema),
|
|
13126
|
+
expiresAt: number().nullish(),
|
|
13127
|
+
lastUsedAt: number().nullish(),
|
|
13128
|
+
createdAt: number()
|
|
13129
|
+
});
|
|
13130
|
+
/** What a share-view grant lets its holder see. */
|
|
13131
|
+
var ShareViewGrantSchema = object({
|
|
13132
|
+
kind: _enum(SHARE_VIEW_KINDS),
|
|
13133
|
+
deviceIds: array(number().int().nonnegative()).min(1).max(64),
|
|
13134
|
+
/** Talk-back, opt-in at mint time; absent means off. */
|
|
13135
|
+
talk: boolean().optional()
|
|
13136
|
+
});
|
|
13137
|
+
var ShareViewScopeSchema = object({
|
|
13138
|
+
type: literal("share-view"),
|
|
13139
|
+
grant: ShareViewGrantSchema
|
|
13140
|
+
});
|
|
13141
|
+
var AddonRoutesScopeSchema = object({
|
|
13142
|
+
type: literal("addon-routes"),
|
|
13143
|
+
access: array(MethodAccessSchema).min(1)
|
|
13144
|
+
});
|
|
13145
|
+
var CredentialScopeSchema = union([
|
|
13146
|
+
literal("*"),
|
|
13147
|
+
ShareViewScopeSchema,
|
|
13148
|
+
AddonRoutesScopeSchema,
|
|
13149
|
+
TokenScopeSchema
|
|
13150
|
+
]);
|
|
13151
|
+
object({
|
|
13152
|
+
kind: literal("credential"),
|
|
13153
|
+
sub: string().min(1),
|
|
13154
|
+
jti: string().min(16),
|
|
13155
|
+
scopes: array(CredentialScopeSchema).min(1)
|
|
13156
|
+
});
|
|
13157
|
+
/**
|
|
12920
13158
|
* The viewer app's custom-scheme callback — the ONE list of URLs a hub flow
|
|
12921
13159
|
* may hand a browser back to the native app at.
|
|
12922
13160
|
*
|
|
@@ -13878,7 +14116,14 @@ var AlertSeveritySchema = _enum([
|
|
|
13878
14116
|
]);
|
|
13879
14117
|
var AlertActionSchema = object({
|
|
13880
14118
|
label: string(),
|
|
13881
|
-
href: string().optional()
|
|
14119
|
+
href: string().optional(),
|
|
14120
|
+
/**
|
|
14121
|
+
* How `href` is followed. Absent / `app`: an admin-ui route (client-side).
|
|
14122
|
+
* `server`: a route the HUB serves (an addon HTTP route such as an OAuth
|
|
14123
|
+
* start) — the browser must leave the SPA with a full navigation, because
|
|
14124
|
+
* the SPA has no such route and would bounce to the home page.
|
|
14125
|
+
*/
|
|
14126
|
+
navigation: _enum(["app", "server"]).optional()
|
|
13882
14127
|
});
|
|
13883
14128
|
var AlertStatusSchema = _enum([
|
|
13884
14129
|
"active",
|
|
@@ -42293,6 +42538,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
42293
42538
|
"server-updated",
|
|
42294
42539
|
"export-completed",
|
|
42295
42540
|
"backup-completed",
|
|
42541
|
+
"alert-critical",
|
|
42542
|
+
"alert-error",
|
|
42543
|
+
"alert-critical-resolved",
|
|
42296
42544
|
"camera-online",
|
|
42297
42545
|
"camera-offline",
|
|
42298
42546
|
"camera-disabled",
|
|
@@ -44328,202 +44576,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
44328
44576
|
auth: "admin"
|
|
44329
44577
|
}), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
|
|
44330
44578
|
/**
|
|
44331
|
-
* Zod schemas for persisted record types.
|
|
44332
|
-
*
|
|
44333
|
-
* These schemas serve as the single source of truth for types that are
|
|
44334
|
-
* stored in the settings-store backend and retrieved via tRPC. They
|
|
44335
|
-
* replace the manual TypeScript interfaces with schema-derived types,
|
|
44336
|
-
* enabling runtime validation when reading from the backend.
|
|
44337
|
-
*
|
|
44338
|
-
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
44339
|
-
* keeps the original name for backward compatibility.
|
|
44340
|
-
*/
|
|
44341
|
-
/**
|
|
44342
|
-
* Auth model (v2 — 2026-05-12 caps-only):
|
|
44343
|
-
*
|
|
44344
|
-
* Two principals:
|
|
44345
|
-
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
44346
|
-
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
44347
|
-
*
|
|
44348
|
-
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
44349
|
-
* `super_admin` — collapsed onto the single boolean because every
|
|
44350
|
-
* non-admin caller is governed by the same scope-check rules; the
|
|
44351
|
-
* distinction was only ever used to route role-specific procedures
|
|
44352
|
-
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
44353
|
-
* with `isAdmin: false` + an explicit scope list.
|
|
44354
|
-
*/
|
|
44355
|
-
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
44356
|
-
var MethodAccessSchema = _enum([
|
|
44357
|
-
"view",
|
|
44358
|
-
"create",
|
|
44359
|
-
"delete"
|
|
44360
|
-
]);
|
|
44361
|
-
/**
|
|
44362
|
-
* A single scope grant. Three forms — checked in matcher with OR
|
|
44363
|
-
* semantics; the first match decides whether the call passes:
|
|
44364
|
-
*
|
|
44365
|
-
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
44366
|
-
* cap with the matching `scope` declaration. New caps inherit grants
|
|
44367
|
-
* automatically — adding a device cap to the codebase makes it
|
|
44368
|
-
* reachable to every user with `category:device [...]` without a
|
|
44369
|
-
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
44370
|
-
*
|
|
44371
|
-
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
44372
|
-
* useful when an integration needs to interact with one specific
|
|
44373
|
-
* addon's surface regardless of how many caps it exports.
|
|
44374
|
-
*
|
|
44375
|
-
* - `capability` — the most precise form. Single cap name. Use for
|
|
44376
|
-
* integration tokens where you want to grant `addons.installPackage`
|
|
44377
|
-
* and nothing else.
|
|
44378
|
-
*
|
|
44379
|
-
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
44380
|
-
* "give me everything" escape; there is no wildcard scope.
|
|
44381
|
-
*/
|
|
44382
|
-
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
44383
|
-
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
44384
|
-
var CapScopeSchema = _enum(["device", "system"]);
|
|
44385
|
-
/**
|
|
44386
|
-
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
44387
|
-
*
|
|
44388
|
-
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
44389
|
-
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
44390
|
-
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
44391
|
-
* AFTER the grant was minted — no re-grant, no re-login.
|
|
44392
|
-
*
|
|
44393
|
-
* - `all` — every device in the deployment. The broad viewer/operator
|
|
44394
|
-
* lever without a `category` grant (a `category` grant also covers device
|
|
44395
|
-
* caps that carry no deviceId; `all` is specifically the device set).
|
|
44396
|
-
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
44397
|
-
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
44398
|
-
* is NOT covered until the grant is edited.
|
|
44399
|
-
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
44400
|
-
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
44401
|
-
* re-resolves on the next request.
|
|
44402
|
-
* - `locations` — every device whose operator-assigned `location` label is
|
|
44403
|
-
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
44404
|
-
* null/unset location matches NO `locations` selector.
|
|
44405
|
-
*/
|
|
44406
|
-
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
44407
|
-
object({ kind: literal("all") }),
|
|
44408
|
-
object({
|
|
44409
|
-
kind: literal("ids"),
|
|
44410
|
-
ids: array(number().int()).min(1)
|
|
44411
|
-
}),
|
|
44412
|
-
object({
|
|
44413
|
-
kind: literal("types"),
|
|
44414
|
-
types: array(_enum(DeviceType)).min(1)
|
|
44415
|
-
}),
|
|
44416
|
-
object({
|
|
44417
|
-
kind: literal("locations"),
|
|
44418
|
-
locations: array(string().min(1)).min(1)
|
|
44419
|
-
})
|
|
44420
|
-
]);
|
|
44421
|
-
var DeviceTokenScopeSchema = object({
|
|
44422
|
-
type: literal("device"),
|
|
44423
|
-
/** The device SET this grant covers — resolved against the live fleet. */
|
|
44424
|
-
selector: DeviceSelectorSchema,
|
|
44425
|
-
access: array(MethodAccessSchema).min(1),
|
|
44426
|
-
/**
|
|
44427
|
-
* Whether a grant on a PARENT device transparently covers its accessory
|
|
44428
|
-
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
44429
|
-
* Direction is parent → children ONLY.
|
|
44430
|
-
*
|
|
44431
|
-
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
44432
|
-
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
44433
|
-
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
44434
|
-
* operator must grant on the child, not inherit from the parent). Set it
|
|
44435
|
-
* explicitly to override that default per grant.
|
|
44436
|
-
*/
|
|
44437
|
-
includeLinked: boolean().optional()
|
|
44438
|
-
});
|
|
44439
|
-
/**
|
|
44440
|
-
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
44441
|
-
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
44442
|
-
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
44443
|
-
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
44444
|
-
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
44445
|
-
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
44446
|
-
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
44447
|
-
* migration covers both without a flag day. No cast — the raw object is read
|
|
44448
|
-
* through `Reflect.get` (its static type is `unknown`).
|
|
44449
|
-
*/
|
|
44450
|
-
function migrateLegacyTokenScope(raw) {
|
|
44451
|
-
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
44452
|
-
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
44453
|
-
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
44454
|
-
const targets = Reflect.get(raw, "targets");
|
|
44455
|
-
if (!Array.isArray(targets)) return raw;
|
|
44456
|
-
return {
|
|
44457
|
-
type: "device",
|
|
44458
|
-
selector: {
|
|
44459
|
-
kind: "ids",
|
|
44460
|
-
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
44461
|
-
},
|
|
44462
|
-
access: Reflect.get(raw, "access")
|
|
44463
|
-
};
|
|
44464
|
-
}
|
|
44465
|
-
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
44466
|
-
object({
|
|
44467
|
-
type: literal("category"),
|
|
44468
|
-
target: CapScopeSchema,
|
|
44469
|
-
access: array(MethodAccessSchema).min(1)
|
|
44470
|
-
}),
|
|
44471
|
-
object({
|
|
44472
|
-
type: literal("capability"),
|
|
44473
|
-
target: string(),
|
|
44474
|
-
access: array(MethodAccessSchema).min(1)
|
|
44475
|
-
}),
|
|
44476
|
-
object({
|
|
44477
|
-
type: literal("addon"),
|
|
44478
|
-
target: string(),
|
|
44479
|
-
access: array(MethodAccessSchema).min(1)
|
|
44480
|
-
}),
|
|
44481
|
-
DeviceTokenScopeSchema
|
|
44482
|
-
]));
|
|
44483
|
-
object({
|
|
44484
|
-
id: string(),
|
|
44485
|
-
username: string(),
|
|
44486
|
-
passwordHash: string(),
|
|
44487
|
-
/**
|
|
44488
|
-
* Admin bypass. When true, the middleware skips the scope-access
|
|
44489
|
-
* check entirely. There is no other axis of privilege; the legacy
|
|
44490
|
-
* role enum collapsed onto this boolean in v2.
|
|
44491
|
-
*/
|
|
44492
|
-
isAdmin: boolean().default(false),
|
|
44493
|
-
allowedProviders: AllowedProviderSchema,
|
|
44494
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44495
|
-
/**
|
|
44496
|
-
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
44497
|
-
* ignored. Non-admins without scopes are locked out of every
|
|
44498
|
-
* protected call.
|
|
44499
|
-
*/
|
|
44500
|
-
scopes: array(TokenScopeSchema).default([]),
|
|
44501
|
-
createdAt: number(),
|
|
44502
|
-
updatedAt: number()
|
|
44503
|
-
});
|
|
44504
|
-
object({
|
|
44505
|
-
id: string(),
|
|
44506
|
-
label: string(),
|
|
44507
|
-
isAdmin: boolean().default(false),
|
|
44508
|
-
allowedProviders: AllowedProviderSchema,
|
|
44509
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44510
|
-
tokenHash: string(),
|
|
44511
|
-
tokenPrefix: string(),
|
|
44512
|
-
createdAt: number(),
|
|
44513
|
-
lastUsedAt: number().optional()
|
|
44514
|
-
});
|
|
44515
|
-
object({
|
|
44516
|
-
id: string(),
|
|
44517
|
-
userId: string(),
|
|
44518
|
-
name: string(),
|
|
44519
|
-
tokenHash: string(),
|
|
44520
|
-
tokenPrefix: string(),
|
|
44521
|
-
scopes: array(TokenScopeSchema),
|
|
44522
|
-
expiresAt: number().nullish(),
|
|
44523
|
-
lastUsedAt: number().nullish(),
|
|
44524
|
-
createdAt: number()
|
|
44525
|
-
});
|
|
44526
|
-
/**
|
|
44527
44579
|
* `oauth-integration` — a collection cap by which an addon declares
|
|
44528
44580
|
* itself a linkable OAuth client of the hub's core `/oauth2/*` server.
|
|
44529
44581
|
* Each provider returns a static descriptor; the core enumerates them
|
|
@@ -51341,7 +51393,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
51341
51393
|
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
51342
51394
|
kind: "mutation",
|
|
51343
51395
|
auth: "admin"
|
|
51344
|
-
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({
|
|
51396
|
+
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
|
|
51397
|
+
clear: boolean(),
|
|
51398
|
+
repointLocationId: string().optional()
|
|
51399
|
+
}), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
|
|
51345
51400
|
kind: "mutation",
|
|
51346
51401
|
auth: "admin"
|
|
51347
51402
|
}), method(StorageCleanupInputSchema, object({ jobId: string() }), {
|
|
@@ -54811,6 +54866,11 @@ object({
|
|
|
54811
54866
|
*
|
|
54812
54867
|
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
54813
54868
|
* provider refreshes the slice on an interval and eagerly after commands.
|
|
54869
|
+
*
|
|
54870
|
+
* UNKNOWN IS NOT OFF. Every field the appliance reports separately is
|
|
54871
|
+
* nullable: `null` means "not known right now" (the appliance has not said,
|
|
54872
|
+
* the link is down, or the description does not carry it) and is never
|
|
54873
|
+
* rendered or exported as `false` / `0`. `availability` says why.
|
|
54814
54874
|
*/
|
|
54815
54875
|
var DishwasherStateSchema = _enum([
|
|
54816
54876
|
"idle",
|
|
@@ -54820,112 +54880,227 @@ var DishwasherStateSchema = _enum([
|
|
|
54820
54880
|
"error",
|
|
54821
54881
|
"unavailable"
|
|
54822
54882
|
]);
|
|
54883
|
+
/**
|
|
54884
|
+
* The appliance's own operation state, uncollapsed. `state` above is the coarse
|
|
54885
|
+
* view for compact surfaces; this is what the appliance said.
|
|
54886
|
+
*/
|
|
54887
|
+
var DishwasherOperationStateSchema = _enum([
|
|
54888
|
+
"Inactive",
|
|
54889
|
+
"Ready",
|
|
54890
|
+
"DelayedStart",
|
|
54891
|
+
"Run",
|
|
54892
|
+
"Pause",
|
|
54893
|
+
"ActionRequired",
|
|
54894
|
+
"Finished",
|
|
54895
|
+
"Error",
|
|
54896
|
+
"Aborting"
|
|
54897
|
+
]);
|
|
54898
|
+
/**
|
|
54899
|
+
* Why fields may be `null`:
|
|
54900
|
+
* - `available` — the link is up and the description is loaded;
|
|
54901
|
+
* - `offline` — the local link is down (values are unknown, not last-known);
|
|
54902
|
+
* - `description-missing` — the link is up but the appliance's description could not
|
|
54903
|
+
* be loaded, so its values cannot be decoded.
|
|
54904
|
+
*/
|
|
54905
|
+
var DishwasherAvailabilitySchema = _enum([
|
|
54906
|
+
"available",
|
|
54907
|
+
"offline",
|
|
54908
|
+
"description-missing"
|
|
54909
|
+
]);
|
|
54823
54910
|
var DishwasherConsumableLevelSchema = _enum([
|
|
54824
54911
|
"ok",
|
|
54825
54912
|
"low",
|
|
54826
54913
|
"empty"
|
|
54827
54914
|
]);
|
|
54828
54915
|
object({
|
|
54916
|
+
availability: DishwasherAvailabilitySchema,
|
|
54917
|
+
/** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
|
|
54829
54918
|
state: DishwasherStateSchema,
|
|
54830
|
-
/**
|
|
54919
|
+
/** The appliance's operation state as reported; null when not known. */
|
|
54920
|
+
operationState: DishwasherOperationStateSchema.nullable(),
|
|
54921
|
+
/** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
|
|
54831
54922
|
program: string().nullable(),
|
|
54832
|
-
/**
|
|
54923
|
+
/** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
|
|
54924
|
+
selectedProgram: string().nullable(),
|
|
54925
|
+
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
54833
54926
|
availablePrograms: array(string()),
|
|
54834
|
-
/**
|
|
54835
|
-
|
|
54927
|
+
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
54928
|
+
remainingSeconds: number().int().nonnegative().nullable(),
|
|
54929
|
+
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
54930
|
+
delayedStartSeconds: number().int().nonnegative().nullable(),
|
|
54836
54931
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
54837
54932
|
progressPercent: number().min(0).max(100).nullable(),
|
|
54838
|
-
/** True when the door is reported open. */
|
|
54839
|
-
doorOpen: boolean(),
|
|
54840
|
-
/** True when
|
|
54841
|
-
|
|
54842
|
-
/**
|
|
54843
|
-
|
|
54933
|
+
/** True when the door is reported open; null when the door state is not known. */
|
|
54934
|
+
doorOpen: boolean().nullable(),
|
|
54935
|
+
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
54936
|
+
doorLocked: boolean().nullable(),
|
|
54937
|
+
/** True when remote start is allowed (door closed, power on, etc.); null when not known. */
|
|
54938
|
+
remoteStartAllowed: boolean().nullable(),
|
|
54939
|
+
/** True when the appliance accepts remote control now; null when not known. */
|
|
54940
|
+
remoteControlActive: boolean().nullable(),
|
|
54941
|
+
/** True while somebody operates the appliance at its panel; null when not reported. */
|
|
54942
|
+
localControlActive: boolean().nullable(),
|
|
54943
|
+
/** Main power / switched-on state; null when not known. */
|
|
54944
|
+
powerOn: boolean().nullable(),
|
|
54945
|
+
/** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
|
|
54946
|
+
powerState: string().nullable(),
|
|
54844
54947
|
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
54845
54948
|
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
54846
|
-
|
|
54847
|
-
|
|
54949
|
+
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
54950
|
+
halfLoad: boolean().nullable(),
|
|
54951
|
+
hygienePlus: boolean().nullable(),
|
|
54848
54952
|
/** Extra dry option when the appliance exposes it. */
|
|
54849
|
-
extraDry: boolean(),
|
|
54953
|
+
extraDry: boolean().nullable(),
|
|
54850
54954
|
/** Intensive zone (lower basket) when the appliance exposes it. */
|
|
54851
|
-
intensiveZone: boolean(),
|
|
54955
|
+
intensiveZone: boolean().nullable(),
|
|
54852
54956
|
/** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
|
|
54853
|
-
varioSpeedPlus: boolean(),
|
|
54854
|
-
/** Child lock (controls disabled on the appliance). */
|
|
54855
|
-
childLock: boolean(),
|
|
54957
|
+
varioSpeedPlus: boolean().nullable(),
|
|
54958
|
+
/** Child lock (controls disabled on the appliance); null when not known. */
|
|
54959
|
+
childLock: boolean().nullable(),
|
|
54960
|
+
/** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
|
|
54961
|
+
activeEvents: array(string()),
|
|
54962
|
+
/** Numeric error code when the appliance reports one; null otherwise. */
|
|
54856
54963
|
errorCode: number().nullable(),
|
|
54964
|
+
/** Name of the raised alert-level event while the appliance is in error; null otherwise. */
|
|
54857
54965
|
errorLabel: string().nullable(),
|
|
54966
|
+
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
54858
54967
|
lastFetchedAt: number()
|
|
54859
54968
|
});
|
|
54860
|
-
|
|
54969
|
+
var DeviceIdSchema = number().int().nonnegative();
|
|
54970
|
+
/** A value a program option or setting can take. */
|
|
54971
|
+
var DishwasherValueSchema = union([
|
|
54972
|
+
boolean(),
|
|
54973
|
+
string(),
|
|
54974
|
+
number()
|
|
54975
|
+
]);
|
|
54976
|
+
var DishwasherAccessSchema = _enum([
|
|
54977
|
+
"none",
|
|
54978
|
+
"read",
|
|
54979
|
+
"readWrite",
|
|
54980
|
+
"writeOnly",
|
|
54981
|
+
"readStatic"
|
|
54982
|
+
]);
|
|
54983
|
+
/**
|
|
54984
|
+
* One option or setting the appliance declares, with the constraints its description
|
|
54985
|
+
* gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
|
|
54986
|
+
*/
|
|
54987
|
+
var DishwasherOptionDescriptorSchema = object({
|
|
54988
|
+
/** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
|
|
54989
|
+
key: string(),
|
|
54990
|
+
/** Last segment of the key, for display. */
|
|
54991
|
+
name: string(),
|
|
54992
|
+
type: _enum([
|
|
54993
|
+
"boolean",
|
|
54994
|
+
"number",
|
|
54995
|
+
"enum",
|
|
54996
|
+
"string"
|
|
54997
|
+
]),
|
|
54998
|
+
access: DishwasherAccessSchema,
|
|
54999
|
+
/** The appliance reports this entity as currently available. */
|
|
55000
|
+
available: boolean(),
|
|
55001
|
+
/** Unit the description declares for a number; null when it declares none. */
|
|
55002
|
+
unit: string().nullable(),
|
|
55003
|
+
min: number().nullable(),
|
|
55004
|
+
max: number().nullable(),
|
|
55005
|
+
step: number().nullable(),
|
|
55006
|
+
/** Allowed members of an enum; null for other types. */
|
|
55007
|
+
enumValues: array(string()).nullable(),
|
|
55008
|
+
defaultValue: DishwasherValueSchema.nullable()
|
|
55009
|
+
});
|
|
55010
|
+
var DishwasherProgramSchema = object({
|
|
55011
|
+
/** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
|
|
55012
|
+
key: string(),
|
|
55013
|
+
name: string(),
|
|
55014
|
+
/** The appliance currently offers this program. */
|
|
55015
|
+
available: boolean(),
|
|
55016
|
+
/** The options this program lists, with the program-level access / availability / default. */
|
|
55017
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
55018
|
+
});
|
|
55019
|
+
var DishwasherOptionsSchema = object({
|
|
55020
|
+
availability: DishwasherAvailabilitySchema,
|
|
55021
|
+
/** What the appliance can be told to do, from the commands its description declares. */
|
|
55022
|
+
supportsStart: boolean(),
|
|
55023
|
+
supportsPause: boolean(),
|
|
55024
|
+
supportsResume: boolean(),
|
|
55025
|
+
supportsStop: boolean(),
|
|
55026
|
+
supportsPower: boolean(),
|
|
55027
|
+
/** Every program the description lists, with its options. */
|
|
55028
|
+
programs: array(DishwasherProgramSchema),
|
|
55029
|
+
/** Every option and setting entity the description lists (programs reference these by key). */
|
|
55030
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
55031
|
+
});
|
|
55032
|
+
DeviceType.Dishwasher, method(object({
|
|
55033
|
+
deviceId: DeviceIdSchema,
|
|
55034
|
+
program: string().min(1).optional(),
|
|
55035
|
+
options: record(string(), DishwasherValueSchema).optional()
|
|
55036
|
+
}), _void(), {
|
|
54861
55037
|
kind: "mutation",
|
|
54862
55038
|
auth: "protected"
|
|
54863
|
-
}), method(object({ deviceId:
|
|
55039
|
+
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
54864
55040
|
kind: "mutation",
|
|
54865
55041
|
auth: "protected"
|
|
54866
|
-
}), method(object({ deviceId:
|
|
55042
|
+
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55043
|
+
kind: "mutation",
|
|
55044
|
+
auth: "protected"
|
|
55045
|
+
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
54867
55046
|
kind: "mutation",
|
|
54868
55047
|
auth: "protected"
|
|
54869
55048
|
}), method(object({
|
|
54870
|
-
deviceId:
|
|
55049
|
+
deviceId: DeviceIdSchema,
|
|
54871
55050
|
program: string().min(1)
|
|
54872
55051
|
}), _void(), {
|
|
54873
55052
|
kind: "mutation",
|
|
54874
55053
|
auth: "protected"
|
|
54875
55054
|
}), method(object({
|
|
54876
|
-
deviceId:
|
|
55055
|
+
deviceId: DeviceIdSchema,
|
|
54877
55056
|
on: boolean()
|
|
54878
55057
|
}), _void(), {
|
|
54879
55058
|
kind: "mutation",
|
|
54880
55059
|
auth: "protected"
|
|
54881
55060
|
}), method(object({
|
|
54882
|
-
deviceId:
|
|
55061
|
+
deviceId: DeviceIdSchema,
|
|
54883
55062
|
on: boolean()
|
|
54884
55063
|
}), _void(), {
|
|
54885
55064
|
kind: "mutation",
|
|
54886
55065
|
auth: "protected"
|
|
54887
55066
|
}), method(object({
|
|
54888
|
-
deviceId:
|
|
55067
|
+
deviceId: DeviceIdSchema,
|
|
54889
55068
|
on: boolean()
|
|
54890
55069
|
}), _void(), {
|
|
54891
55070
|
kind: "mutation",
|
|
54892
55071
|
auth: "protected"
|
|
54893
55072
|
}), method(object({
|
|
54894
|
-
deviceId:
|
|
55073
|
+
deviceId: DeviceIdSchema,
|
|
54895
55074
|
on: boolean()
|
|
54896
55075
|
}), _void(), {
|
|
54897
55076
|
kind: "mutation",
|
|
54898
55077
|
auth: "protected"
|
|
54899
55078
|
}), method(object({
|
|
54900
|
-
deviceId:
|
|
55079
|
+
deviceId: DeviceIdSchema,
|
|
54901
55080
|
on: boolean()
|
|
54902
55081
|
}), _void(), {
|
|
54903
55082
|
kind: "mutation",
|
|
54904
55083
|
auth: "protected"
|
|
54905
55084
|
}), method(object({
|
|
54906
|
-
deviceId:
|
|
55085
|
+
deviceId: DeviceIdSchema,
|
|
54907
55086
|
on: boolean()
|
|
54908
55087
|
}), _void(), {
|
|
54909
55088
|
kind: "mutation",
|
|
54910
55089
|
auth: "protected"
|
|
54911
55090
|
}), method(object({
|
|
54912
|
-
deviceId:
|
|
55091
|
+
deviceId: DeviceIdSchema,
|
|
54913
55092
|
on: boolean()
|
|
54914
55093
|
}), _void(), {
|
|
54915
55094
|
kind: "mutation",
|
|
54916
55095
|
auth: "protected"
|
|
54917
55096
|
}), method(object({
|
|
54918
|
-
deviceId:
|
|
55097
|
+
deviceId: DeviceIdSchema,
|
|
54919
55098
|
key: string().min(1),
|
|
54920
|
-
value:
|
|
54921
|
-
boolean(),
|
|
54922
|
-
string(),
|
|
54923
|
-
number()
|
|
54924
|
-
])
|
|
55099
|
+
value: DishwasherValueSchema
|
|
54925
55100
|
}), _void(), {
|
|
54926
55101
|
kind: "mutation",
|
|
54927
55102
|
auth: "protected"
|
|
54928
|
-
});
|
|
55103
|
+
}), method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" });
|
|
54929
55104
|
object({
|
|
54930
55105
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
54931
55106
|
lastPressedAt: number().nullable(),
|
|
@@ -64985,6 +65160,12 @@ Object.freeze({
|
|
|
64985
65160
|
addonId: null,
|
|
64986
65161
|
access: "view"
|
|
64987
65162
|
},
|
|
65163
|
+
"dishwasher.getOptions": {
|
|
65164
|
+
capName: "dishwasher",
|
|
65165
|
+
capScope: "device",
|
|
65166
|
+
addonId: null,
|
|
65167
|
+
access: "view"
|
|
65168
|
+
},
|
|
64988
65169
|
"dishwasher.getStatus": {
|
|
64989
65170
|
capName: "dishwasher",
|
|
64990
65171
|
capScope: "device",
|
|
@@ -64997,6 +65178,12 @@ Object.freeze({
|
|
|
64997
65178
|
addonId: null,
|
|
64998
65179
|
access: "create"
|
|
64999
65180
|
},
|
|
65181
|
+
"dishwasher.resume": {
|
|
65182
|
+
capName: "dishwasher",
|
|
65183
|
+
capScope: "device",
|
|
65184
|
+
addonId: null,
|
|
65185
|
+
access: "create"
|
|
65186
|
+
},
|
|
65000
65187
|
"dishwasher.setChildLock": {
|
|
65001
65188
|
capName: "dishwasher",
|
|
65002
65189
|
capScope: "device",
|
|
@@ -69497,6 +69684,12 @@ Object.freeze({
|
|
|
69497
69684
|
addonId: null,
|
|
69498
69685
|
access: "view"
|
|
69499
69686
|
},
|
|
69687
|
+
"storageMigration.moverClearance": {
|
|
69688
|
+
capName: "storage-migration",
|
|
69689
|
+
capScope: "system",
|
|
69690
|
+
addonId: null,
|
|
69691
|
+
access: "view"
|
|
69692
|
+
},
|
|
69500
69693
|
"storageMigration.movers": {
|
|
69501
69694
|
capName: "storage-migration",
|
|
69502
69695
|
capScope: "system",
|
|
@@ -71690,6 +71883,11 @@ Object.freeze({
|
|
|
71690
71883
|
form: "single",
|
|
71691
71884
|
optional: false
|
|
71692
71885
|
}],
|
|
71886
|
+
"dishwasher.getOptions": [{
|
|
71887
|
+
name: "deviceId",
|
|
71888
|
+
form: "single",
|
|
71889
|
+
optional: false
|
|
71890
|
+
}],
|
|
71693
71891
|
"dishwasher.getStatus": [{
|
|
71694
71892
|
name: "deviceId",
|
|
71695
71893
|
form: "single",
|
|
@@ -71700,6 +71898,11 @@ Object.freeze({
|
|
|
71700
71898
|
form: "single",
|
|
71701
71899
|
optional: false
|
|
71702
71900
|
}],
|
|
71901
|
+
"dishwasher.resume": [{
|
|
71902
|
+
name: "deviceId",
|
|
71903
|
+
form: "single",
|
|
71904
|
+
optional: false
|
|
71905
|
+
}],
|
|
71703
71906
|
"dishwasher.setChildLock": [{
|
|
71704
71907
|
name: "deviceId",
|
|
71705
71908
|
form: "single",
|
|
@@ -73786,6 +73989,9 @@ new Map(Object.entries({
|
|
|
73786
73989
|
"wrapper-update-available": "system",
|
|
73787
73990
|
"backup-completed": "system",
|
|
73788
73991
|
"export-completed": "system",
|
|
73992
|
+
"alert-critical": "system",
|
|
73993
|
+
"alert-error": "system",
|
|
73994
|
+
"alert-critical-resolved": "system",
|
|
73789
73995
|
"storage-location-low": "system",
|
|
73790
73996
|
"storage-location-critical": "system",
|
|
73791
73997
|
"storage-location-ok": "system",
|
|
@@ -73910,6 +74116,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
73910
74116
|
"storage-location-ok"
|
|
73911
74117
|
]
|
|
73912
74118
|
},
|
|
74119
|
+
{
|
|
74120
|
+
id: "alerts",
|
|
74121
|
+
family: "system",
|
|
74122
|
+
label: "Alerts",
|
|
74123
|
+
kinds: [
|
|
74124
|
+
"alert-critical",
|
|
74125
|
+
"alert-error",
|
|
74126
|
+
"alert-critical-resolved"
|
|
74127
|
+
]
|
|
74128
|
+
},
|
|
73913
74129
|
{
|
|
73914
74130
|
id: "alarm",
|
|
73915
74131
|
family: "alarm",
|
|
@@ -73954,6 +74170,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
|
|
|
73954
74170
|
return [[descriptor.kind, field]];
|
|
73955
74171
|
})));
|
|
73956
74172
|
Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
|
|
74173
|
+
object({
|
|
74174
|
+
phase: _enum(["raised", "resolved"]),
|
|
74175
|
+
episodeId: string().min(1),
|
|
74176
|
+
alertId: string().min(1),
|
|
74177
|
+
severity: AlertSeveritySchema,
|
|
74178
|
+
category: string(),
|
|
74179
|
+
title: string(),
|
|
74180
|
+
message: string(),
|
|
74181
|
+
sourceType: string().optional(),
|
|
74182
|
+
sourceId: string().optional(),
|
|
74183
|
+
nodeId: string().optional(),
|
|
74184
|
+
/** The alert's own action link (where the operator acts on it), when it has one. */
|
|
74185
|
+
actionUrl: string().optional(),
|
|
74186
|
+
at: number()
|
|
74187
|
+
});
|
|
73957
74188
|
var RULE_BODY_ONLY = ["body"];
|
|
73958
74189
|
var RULE_TEXT = ["title", "body"];
|
|
73959
74190
|
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
@@ -73963,6 +74194,11 @@ var TANK = [
|
|
|
73963
74194
|
"device-tank-full",
|
|
73964
74195
|
"device-tank-normal"
|
|
73965
74196
|
];
|
|
74197
|
+
var ALERT_EPISODE = [
|
|
74198
|
+
"alert-critical",
|
|
74199
|
+
"alert-error",
|
|
74200
|
+
"alert-critical-resolved"
|
|
74201
|
+
];
|
|
73966
74202
|
var UPDATES = [
|
|
73967
74203
|
"addon-update-available",
|
|
73968
74204
|
"server-update-available",
|
|
@@ -74155,14 +74391,14 @@ var STATE_SUMMARY_VARS = [
|
|
|
74155
74391
|
([...RULE_TEXT], [...CONSUMABLE]),
|
|
74156
74392
|
([...RULE_TEXT], [...TANK]),
|
|
74157
74393
|
[...RULE_TEXT],
|
|
74158
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
74159
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
74160
|
-
[...RULE_TEXT],
|
|
74394
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
74395
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
74161
74396
|
[...RULE_TEXT],
|
|
74162
74397
|
[...RULE_TEXT],
|
|
74163
74398
|
[...RULE_TEXT],
|
|
74164
74399
|
[...RULE_TEXT],
|
|
74165
74400
|
[...RULE_TEXT],
|
|
74401
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74166
74402
|
[...RULE_TEXT],
|
|
74167
74403
|
[...RULE_TEXT],
|
|
74168
74404
|
[...RULE_TEXT],
|
|
@@ -74180,7 +74416,11 @@ var STATE_SUMMARY_VARS = [
|
|
|
74180
74416
|
[...RULE_TEXT],
|
|
74181
74417
|
[...RULE_TEXT],
|
|
74182
74418
|
[...RULE_TEXT],
|
|
74183
|
-
[...RULE_TEXT],
|
|
74419
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74420
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74421
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74422
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74423
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74184
74424
|
[...RULE_TEXT],
|
|
74185
74425
|
[...RULE_TEXT],
|
|
74186
74426
|
[...RULE_TEXT],
|