@camstack/addon-training 0.1.58 → 0.1.60
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/{MotionZonesSettings-B1MFjLvT.mjs → MotionZonesSettings-BVAWM6Mp.mjs} +2 -2
- package/dist/{PrivacyMaskSettings-BsCT1qXL.mjs → PrivacyMaskSettings-C6n5XvTF.mjs} +2 -2
- package/dist/{SceneMonitorEditor-DYTrCHNh.mjs → SceneMonitorEditor-YqjreNwk.mjs} +1 -1
- package/dist/_stub.js +4147 -4024
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-D332hdX5.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-D2t3iWfl.mjs} +4 -4
- package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DNz5PuiW.mjs +26 -0
- package/dist/{dist-D-q3lyBd.mjs → dist-CLSVfoxe.mjs} +480 -240
- package/dist/{dist-DBdxFGSN.js → dist-Co-Ch58W.js} +480 -240
- package/dist/{hostInit-DtDn5ljK.mjs → hostInit-BzYWXDTu.mjs} +3 -3
- package/dist/index.js +1 -1
- package/dist/orchestrator/training.addon.js +1 -1
- package/dist/orchestrator/training.addon.mjs +1 -1
- package/dist/{player-overlays-Cdh_GNzb.mjs → player-overlays-CsC1EU9M.mjs} +1 -1
- package/dist/providers/modal/training-modal.addon.js +1 -1
- package/dist/providers/modal/training-modal.addon.mjs +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-DzwIz4dK.mjs → responsive-CqqXFNE0.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-DZYuiYXh.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-mXPV__C7.mjs} +1 -1
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-o-C5PmDm.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. */
|
|
@@ -12814,6 +12829,229 @@ var ConvertResultSchema = object({
|
|
|
12814
12829
|
files: array(string()).readonly()
|
|
12815
12830
|
})).readonly()
|
|
12816
12831
|
});
|
|
12832
|
+
/**
|
|
12833
|
+
* Zod schemas for persisted record types.
|
|
12834
|
+
*
|
|
12835
|
+
* These schemas serve as the single source of truth for types that are
|
|
12836
|
+
* stored in the settings-store backend and retrieved via tRPC. They
|
|
12837
|
+
* replace the manual TypeScript interfaces with schema-derived types,
|
|
12838
|
+
* enabling runtime validation when reading from the backend.
|
|
12839
|
+
*
|
|
12840
|
+
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
12841
|
+
* keeps the original name for backward compatibility.
|
|
12842
|
+
*/
|
|
12843
|
+
/**
|
|
12844
|
+
* Auth model (v2 — 2026-05-12 caps-only):
|
|
12845
|
+
*
|
|
12846
|
+
* Two principals:
|
|
12847
|
+
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
12848
|
+
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
12849
|
+
*
|
|
12850
|
+
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
12851
|
+
* `super_admin` — collapsed onto the single boolean because every
|
|
12852
|
+
* non-admin caller is governed by the same scope-check rules; the
|
|
12853
|
+
* distinction was only ever used to route role-specific procedures
|
|
12854
|
+
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
12855
|
+
* with `isAdmin: false` + an explicit scope list.
|
|
12856
|
+
*/
|
|
12857
|
+
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
12858
|
+
var MethodAccessSchema = _enum([
|
|
12859
|
+
"view",
|
|
12860
|
+
"create",
|
|
12861
|
+
"delete"
|
|
12862
|
+
]);
|
|
12863
|
+
/**
|
|
12864
|
+
* A single scope grant. Three forms — checked in matcher with OR
|
|
12865
|
+
* semantics; the first match decides whether the call passes:
|
|
12866
|
+
*
|
|
12867
|
+
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
12868
|
+
* cap with the matching `scope` declaration. New caps inherit grants
|
|
12869
|
+
* automatically — adding a device cap to the codebase makes it
|
|
12870
|
+
* reachable to every user with `category:device [...]` without a
|
|
12871
|
+
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
12872
|
+
*
|
|
12873
|
+
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
12874
|
+
* useful when an integration needs to interact with one specific
|
|
12875
|
+
* addon's surface regardless of how many caps it exports.
|
|
12876
|
+
*
|
|
12877
|
+
* - `capability` — the most precise form. Single cap name. Use for
|
|
12878
|
+
* integration tokens where you want to grant `addons.installPackage`
|
|
12879
|
+
* and nothing else.
|
|
12880
|
+
*
|
|
12881
|
+
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
12882
|
+
* "give me everything" escape; there is no wildcard scope.
|
|
12883
|
+
*/
|
|
12884
|
+
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
12885
|
+
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
12886
|
+
var CapScopeSchema = _enum(["device", "system"]);
|
|
12887
|
+
/**
|
|
12888
|
+
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
12889
|
+
*
|
|
12890
|
+
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
12891
|
+
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
12892
|
+
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
12893
|
+
* AFTER the grant was minted — no re-grant, no re-login.
|
|
12894
|
+
*
|
|
12895
|
+
* - `all` — every device in the deployment. The broad viewer/operator
|
|
12896
|
+
* lever without a `category` grant (a `category` grant also covers device
|
|
12897
|
+
* caps that carry no deviceId; `all` is specifically the device set).
|
|
12898
|
+
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
12899
|
+
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
12900
|
+
* is NOT covered until the grant is edited.
|
|
12901
|
+
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
12902
|
+
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
12903
|
+
* re-resolves on the next request.
|
|
12904
|
+
* - `locations` — every device whose operator-assigned `location` label is
|
|
12905
|
+
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
12906
|
+
* null/unset location matches NO `locations` selector.
|
|
12907
|
+
*/
|
|
12908
|
+
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
12909
|
+
object({ kind: literal("all") }),
|
|
12910
|
+
object({
|
|
12911
|
+
kind: literal("ids"),
|
|
12912
|
+
ids: array(number().int()).min(1)
|
|
12913
|
+
}),
|
|
12914
|
+
object({
|
|
12915
|
+
kind: literal("types"),
|
|
12916
|
+
types: array(_enum(DeviceType)).min(1)
|
|
12917
|
+
}),
|
|
12918
|
+
object({
|
|
12919
|
+
kind: literal("locations"),
|
|
12920
|
+
locations: array(string().min(1)).min(1)
|
|
12921
|
+
})
|
|
12922
|
+
]);
|
|
12923
|
+
var DeviceTokenScopeSchema = object({
|
|
12924
|
+
type: literal("device"),
|
|
12925
|
+
/** The device SET this grant covers — resolved against the live fleet. */
|
|
12926
|
+
selector: DeviceSelectorSchema,
|
|
12927
|
+
access: array(MethodAccessSchema).min(1),
|
|
12928
|
+
/**
|
|
12929
|
+
* Whether a grant on a PARENT device transparently covers its accessory
|
|
12930
|
+
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
12931
|
+
* Direction is parent → children ONLY.
|
|
12932
|
+
*
|
|
12933
|
+
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
12934
|
+
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
12935
|
+
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
12936
|
+
* operator must grant on the child, not inherit from the parent). Set it
|
|
12937
|
+
* explicitly to override that default per grant.
|
|
12938
|
+
*/
|
|
12939
|
+
includeLinked: boolean().optional()
|
|
12940
|
+
});
|
|
12941
|
+
/**
|
|
12942
|
+
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
12943
|
+
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
12944
|
+
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
12945
|
+
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
12946
|
+
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
12947
|
+
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
12948
|
+
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
12949
|
+
* migration covers both without a flag day. No cast — the raw object is read
|
|
12950
|
+
* through `Reflect.get` (its static type is `unknown`).
|
|
12951
|
+
*/
|
|
12952
|
+
function migrateLegacyTokenScope(raw) {
|
|
12953
|
+
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
12954
|
+
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
12955
|
+
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
12956
|
+
const targets = Reflect.get(raw, "targets");
|
|
12957
|
+
if (!Array.isArray(targets)) return raw;
|
|
12958
|
+
return {
|
|
12959
|
+
type: "device",
|
|
12960
|
+
selector: {
|
|
12961
|
+
kind: "ids",
|
|
12962
|
+
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
12963
|
+
},
|
|
12964
|
+
access: Reflect.get(raw, "access")
|
|
12965
|
+
};
|
|
12966
|
+
}
|
|
12967
|
+
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
12968
|
+
object({
|
|
12969
|
+
type: literal("category"),
|
|
12970
|
+
target: CapScopeSchema,
|
|
12971
|
+
access: array(MethodAccessSchema).min(1)
|
|
12972
|
+
}),
|
|
12973
|
+
object({
|
|
12974
|
+
type: literal("capability"),
|
|
12975
|
+
target: string(),
|
|
12976
|
+
access: array(MethodAccessSchema).min(1)
|
|
12977
|
+
}),
|
|
12978
|
+
object({
|
|
12979
|
+
type: literal("addon"),
|
|
12980
|
+
target: string(),
|
|
12981
|
+
access: array(MethodAccessSchema).min(1)
|
|
12982
|
+
}),
|
|
12983
|
+
DeviceTokenScopeSchema
|
|
12984
|
+
]));
|
|
12985
|
+
object({
|
|
12986
|
+
id: string(),
|
|
12987
|
+
username: string(),
|
|
12988
|
+
passwordHash: string(),
|
|
12989
|
+
/**
|
|
12990
|
+
* Admin bypass. When true, the middleware skips the scope-access
|
|
12991
|
+
* check entirely. There is no other axis of privilege; the legacy
|
|
12992
|
+
* role enum collapsed onto this boolean in v2.
|
|
12993
|
+
*/
|
|
12994
|
+
isAdmin: boolean().default(false),
|
|
12995
|
+
allowedProviders: AllowedProviderSchema,
|
|
12996
|
+
allowedDevices: AllowedDevicesSchema,
|
|
12997
|
+
/**
|
|
12998
|
+
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
12999
|
+
* ignored. Non-admins without scopes are locked out of every
|
|
13000
|
+
* protected call.
|
|
13001
|
+
*/
|
|
13002
|
+
scopes: array(TokenScopeSchema).default([]),
|
|
13003
|
+
createdAt: number(),
|
|
13004
|
+
updatedAt: number()
|
|
13005
|
+
});
|
|
13006
|
+
object({
|
|
13007
|
+
id: string(),
|
|
13008
|
+
label: string(),
|
|
13009
|
+
isAdmin: boolean().default(false),
|
|
13010
|
+
allowedProviders: AllowedProviderSchema,
|
|
13011
|
+
allowedDevices: AllowedDevicesSchema,
|
|
13012
|
+
tokenHash: string(),
|
|
13013
|
+
tokenPrefix: string(),
|
|
13014
|
+
createdAt: number(),
|
|
13015
|
+
lastUsedAt: number().optional()
|
|
13016
|
+
});
|
|
13017
|
+
object({
|
|
13018
|
+
id: string(),
|
|
13019
|
+
userId: string(),
|
|
13020
|
+
name: string(),
|
|
13021
|
+
tokenHash: string(),
|
|
13022
|
+
tokenPrefix: string(),
|
|
13023
|
+
scopes: array(TokenScopeSchema),
|
|
13024
|
+
expiresAt: number().nullish(),
|
|
13025
|
+
lastUsedAt: number().nullish(),
|
|
13026
|
+
createdAt: number()
|
|
13027
|
+
});
|
|
13028
|
+
/** What a share-view grant lets its holder see. */
|
|
13029
|
+
var ShareViewGrantSchema = object({
|
|
13030
|
+
kind: _enum(SHARE_VIEW_KINDS),
|
|
13031
|
+
deviceIds: array(number().int().nonnegative()).min(1).max(64),
|
|
13032
|
+
/** Talk-back, opt-in at mint time; absent means off. */
|
|
13033
|
+
talk: boolean().optional()
|
|
13034
|
+
});
|
|
13035
|
+
var ShareViewScopeSchema = object({
|
|
13036
|
+
type: literal("share-view"),
|
|
13037
|
+
grant: ShareViewGrantSchema
|
|
13038
|
+
});
|
|
13039
|
+
var AddonRoutesScopeSchema = object({
|
|
13040
|
+
type: literal("addon-routes"),
|
|
13041
|
+
access: array(MethodAccessSchema).min(1)
|
|
13042
|
+
});
|
|
13043
|
+
var CredentialScopeSchema = union([
|
|
13044
|
+
literal("*"),
|
|
13045
|
+
ShareViewScopeSchema,
|
|
13046
|
+
AddonRoutesScopeSchema,
|
|
13047
|
+
TokenScopeSchema
|
|
13048
|
+
]);
|
|
13049
|
+
object({
|
|
13050
|
+
kind: literal("credential"),
|
|
13051
|
+
sub: string().min(1),
|
|
13052
|
+
jti: string().min(16),
|
|
13053
|
+
scopes: array(CredentialScopeSchema).min(1)
|
|
13054
|
+
});
|
|
12817
13055
|
_enum(["new-session", "step-up"]);
|
|
12818
13056
|
/** The languages the hub's app landing pages are written in (D858). */
|
|
12819
13057
|
var AppPageLangSchema = _enum(["en", "it"]);
|
|
@@ -13547,7 +13785,14 @@ var AlertSeveritySchema = _enum([
|
|
|
13547
13785
|
]);
|
|
13548
13786
|
var AlertActionSchema = object({
|
|
13549
13787
|
label: string(),
|
|
13550
|
-
href: string().optional()
|
|
13788
|
+
href: string().optional(),
|
|
13789
|
+
/**
|
|
13790
|
+
* How `href` is followed. Absent / `app`: an admin-ui route (client-side).
|
|
13791
|
+
* `server`: a route the HUB serves (an addon HTTP route such as an OAuth
|
|
13792
|
+
* start) — the browser must leave the SPA with a full navigation, because
|
|
13793
|
+
* the SPA has no such route and would bounce to the home page.
|
|
13794
|
+
*/
|
|
13795
|
+
navigation: _enum(["app", "server"]).optional()
|
|
13551
13796
|
});
|
|
13552
13797
|
var AlertStatusSchema = _enum([
|
|
13553
13798
|
"active",
|
|
@@ -41923,6 +42168,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
41923
42168
|
"server-updated",
|
|
41924
42169
|
"export-completed",
|
|
41925
42170
|
"backup-completed",
|
|
42171
|
+
"alert-critical",
|
|
42172
|
+
"alert-error",
|
|
42173
|
+
"alert-critical-resolved",
|
|
41926
42174
|
"camera-online",
|
|
41927
42175
|
"camera-offline",
|
|
41928
42176
|
"camera-disabled",
|
|
@@ -43958,202 +44206,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
43958
44206
|
auth: "admin"
|
|
43959
44207
|
}), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
|
|
43960
44208
|
/**
|
|
43961
|
-
* Zod schemas for persisted record types.
|
|
43962
|
-
*
|
|
43963
|
-
* These schemas serve as the single source of truth for types that are
|
|
43964
|
-
* stored in the settings-store backend and retrieved via tRPC. They
|
|
43965
|
-
* replace the manual TypeScript interfaces with schema-derived types,
|
|
43966
|
-
* enabling runtime validation when reading from the backend.
|
|
43967
|
-
*
|
|
43968
|
-
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
43969
|
-
* keeps the original name for backward compatibility.
|
|
43970
|
-
*/
|
|
43971
|
-
/**
|
|
43972
|
-
* Auth model (v2 — 2026-05-12 caps-only):
|
|
43973
|
-
*
|
|
43974
|
-
* Two principals:
|
|
43975
|
-
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
43976
|
-
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
43977
|
-
*
|
|
43978
|
-
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
43979
|
-
* `super_admin` — collapsed onto the single boolean because every
|
|
43980
|
-
* non-admin caller is governed by the same scope-check rules; the
|
|
43981
|
-
* distinction was only ever used to route role-specific procedures
|
|
43982
|
-
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
43983
|
-
* with `isAdmin: false` + an explicit scope list.
|
|
43984
|
-
*/
|
|
43985
|
-
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
43986
|
-
var MethodAccessSchema = _enum([
|
|
43987
|
-
"view",
|
|
43988
|
-
"create",
|
|
43989
|
-
"delete"
|
|
43990
|
-
]);
|
|
43991
|
-
/**
|
|
43992
|
-
* A single scope grant. Three forms — checked in matcher with OR
|
|
43993
|
-
* semantics; the first match decides whether the call passes:
|
|
43994
|
-
*
|
|
43995
|
-
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
43996
|
-
* cap with the matching `scope` declaration. New caps inherit grants
|
|
43997
|
-
* automatically — adding a device cap to the codebase makes it
|
|
43998
|
-
* reachable to every user with `category:device [...]` without a
|
|
43999
|
-
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
44000
|
-
*
|
|
44001
|
-
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
44002
|
-
* useful when an integration needs to interact with one specific
|
|
44003
|
-
* addon's surface regardless of how many caps it exports.
|
|
44004
|
-
*
|
|
44005
|
-
* - `capability` — the most precise form. Single cap name. Use for
|
|
44006
|
-
* integration tokens where you want to grant `addons.installPackage`
|
|
44007
|
-
* and nothing else.
|
|
44008
|
-
*
|
|
44009
|
-
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
44010
|
-
* "give me everything" escape; there is no wildcard scope.
|
|
44011
|
-
*/
|
|
44012
|
-
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
44013
|
-
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
44014
|
-
var CapScopeSchema = _enum(["device", "system"]);
|
|
44015
|
-
/**
|
|
44016
|
-
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
44017
|
-
*
|
|
44018
|
-
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
44019
|
-
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
44020
|
-
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
44021
|
-
* AFTER the grant was minted — no re-grant, no re-login.
|
|
44022
|
-
*
|
|
44023
|
-
* - `all` — every device in the deployment. The broad viewer/operator
|
|
44024
|
-
* lever without a `category` grant (a `category` grant also covers device
|
|
44025
|
-
* caps that carry no deviceId; `all` is specifically the device set).
|
|
44026
|
-
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
44027
|
-
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
44028
|
-
* is NOT covered until the grant is edited.
|
|
44029
|
-
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
44030
|
-
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
44031
|
-
* re-resolves on the next request.
|
|
44032
|
-
* - `locations` — every device whose operator-assigned `location` label is
|
|
44033
|
-
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
44034
|
-
* null/unset location matches NO `locations` selector.
|
|
44035
|
-
*/
|
|
44036
|
-
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
44037
|
-
object({ kind: literal("all") }),
|
|
44038
|
-
object({
|
|
44039
|
-
kind: literal("ids"),
|
|
44040
|
-
ids: array(number().int()).min(1)
|
|
44041
|
-
}),
|
|
44042
|
-
object({
|
|
44043
|
-
kind: literal("types"),
|
|
44044
|
-
types: array(_enum(DeviceType)).min(1)
|
|
44045
|
-
}),
|
|
44046
|
-
object({
|
|
44047
|
-
kind: literal("locations"),
|
|
44048
|
-
locations: array(string().min(1)).min(1)
|
|
44049
|
-
})
|
|
44050
|
-
]);
|
|
44051
|
-
var DeviceTokenScopeSchema = object({
|
|
44052
|
-
type: literal("device"),
|
|
44053
|
-
/** The device SET this grant covers — resolved against the live fleet. */
|
|
44054
|
-
selector: DeviceSelectorSchema,
|
|
44055
|
-
access: array(MethodAccessSchema).min(1),
|
|
44056
|
-
/**
|
|
44057
|
-
* Whether a grant on a PARENT device transparently covers its accessory
|
|
44058
|
-
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
44059
|
-
* Direction is parent → children ONLY.
|
|
44060
|
-
*
|
|
44061
|
-
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
44062
|
-
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
44063
|
-
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
44064
|
-
* operator must grant on the child, not inherit from the parent). Set it
|
|
44065
|
-
* explicitly to override that default per grant.
|
|
44066
|
-
*/
|
|
44067
|
-
includeLinked: boolean().optional()
|
|
44068
|
-
});
|
|
44069
|
-
/**
|
|
44070
|
-
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
44071
|
-
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
44072
|
-
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
44073
|
-
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
44074
|
-
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
44075
|
-
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
44076
|
-
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
44077
|
-
* migration covers both without a flag day. No cast — the raw object is read
|
|
44078
|
-
* through `Reflect.get` (its static type is `unknown`).
|
|
44079
|
-
*/
|
|
44080
|
-
function migrateLegacyTokenScope(raw) {
|
|
44081
|
-
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
44082
|
-
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
44083
|
-
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
44084
|
-
const targets = Reflect.get(raw, "targets");
|
|
44085
|
-
if (!Array.isArray(targets)) return raw;
|
|
44086
|
-
return {
|
|
44087
|
-
type: "device",
|
|
44088
|
-
selector: {
|
|
44089
|
-
kind: "ids",
|
|
44090
|
-
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
44091
|
-
},
|
|
44092
|
-
access: Reflect.get(raw, "access")
|
|
44093
|
-
};
|
|
44094
|
-
}
|
|
44095
|
-
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
44096
|
-
object({
|
|
44097
|
-
type: literal("category"),
|
|
44098
|
-
target: CapScopeSchema,
|
|
44099
|
-
access: array(MethodAccessSchema).min(1)
|
|
44100
|
-
}),
|
|
44101
|
-
object({
|
|
44102
|
-
type: literal("capability"),
|
|
44103
|
-
target: string(),
|
|
44104
|
-
access: array(MethodAccessSchema).min(1)
|
|
44105
|
-
}),
|
|
44106
|
-
object({
|
|
44107
|
-
type: literal("addon"),
|
|
44108
|
-
target: string(),
|
|
44109
|
-
access: array(MethodAccessSchema).min(1)
|
|
44110
|
-
}),
|
|
44111
|
-
DeviceTokenScopeSchema
|
|
44112
|
-
]));
|
|
44113
|
-
object({
|
|
44114
|
-
id: string(),
|
|
44115
|
-
username: string(),
|
|
44116
|
-
passwordHash: string(),
|
|
44117
|
-
/**
|
|
44118
|
-
* Admin bypass. When true, the middleware skips the scope-access
|
|
44119
|
-
* check entirely. There is no other axis of privilege; the legacy
|
|
44120
|
-
* role enum collapsed onto this boolean in v2.
|
|
44121
|
-
*/
|
|
44122
|
-
isAdmin: boolean().default(false),
|
|
44123
|
-
allowedProviders: AllowedProviderSchema,
|
|
44124
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44125
|
-
/**
|
|
44126
|
-
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
44127
|
-
* ignored. Non-admins without scopes are locked out of every
|
|
44128
|
-
* protected call.
|
|
44129
|
-
*/
|
|
44130
|
-
scopes: array(TokenScopeSchema).default([]),
|
|
44131
|
-
createdAt: number(),
|
|
44132
|
-
updatedAt: number()
|
|
44133
|
-
});
|
|
44134
|
-
object({
|
|
44135
|
-
id: string(),
|
|
44136
|
-
label: string(),
|
|
44137
|
-
isAdmin: boolean().default(false),
|
|
44138
|
-
allowedProviders: AllowedProviderSchema,
|
|
44139
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44140
|
-
tokenHash: string(),
|
|
44141
|
-
tokenPrefix: string(),
|
|
44142
|
-
createdAt: number(),
|
|
44143
|
-
lastUsedAt: number().optional()
|
|
44144
|
-
});
|
|
44145
|
-
object({
|
|
44146
|
-
id: string(),
|
|
44147
|
-
userId: string(),
|
|
44148
|
-
name: string(),
|
|
44149
|
-
tokenHash: string(),
|
|
44150
|
-
tokenPrefix: string(),
|
|
44151
|
-
scopes: array(TokenScopeSchema),
|
|
44152
|
-
expiresAt: number().nullish(),
|
|
44153
|
-
lastUsedAt: number().nullish(),
|
|
44154
|
-
createdAt: number()
|
|
44155
|
-
});
|
|
44156
|
-
/**
|
|
44157
44209
|
* `oauth-integration` — a collection cap by which an addon declares
|
|
44158
44210
|
* itself a linkable OAuth client of the hub's core `/oauth2/*` server.
|
|
44159
44211
|
* Each provider returns a static descriptor; the core enumerates them
|
|
@@ -50955,7 +51007,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
50955
51007
|
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
50956
51008
|
kind: "mutation",
|
|
50957
51009
|
auth: "admin"
|
|
50958
|
-
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({
|
|
51010
|
+
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
|
|
51011
|
+
clear: boolean(),
|
|
51012
|
+
repointLocationId: string().optional()
|
|
51013
|
+
}), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
|
|
50959
51014
|
kind: "mutation",
|
|
50960
51015
|
auth: "admin"
|
|
50961
51016
|
}), method(StorageCleanupInputSchema, object({ jobId: string() }), {
|
|
@@ -54390,6 +54445,11 @@ object({
|
|
|
54390
54445
|
*
|
|
54391
54446
|
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
54392
54447
|
* provider refreshes the slice on an interval and eagerly after commands.
|
|
54448
|
+
*
|
|
54449
|
+
* UNKNOWN IS NOT OFF. Every field the appliance reports separately is
|
|
54450
|
+
* nullable: `null` means "not known right now" (the appliance has not said,
|
|
54451
|
+
* the link is down, or the description does not carry it) and is never
|
|
54452
|
+
* rendered or exported as `false` / `0`. `availability` says why.
|
|
54393
54453
|
*/
|
|
54394
54454
|
var DishwasherStateSchema = _enum([
|
|
54395
54455
|
"idle",
|
|
@@ -54399,112 +54459,227 @@ var DishwasherStateSchema = _enum([
|
|
|
54399
54459
|
"error",
|
|
54400
54460
|
"unavailable"
|
|
54401
54461
|
]);
|
|
54462
|
+
/**
|
|
54463
|
+
* The appliance's own operation state, uncollapsed. `state` above is the coarse
|
|
54464
|
+
* view for compact surfaces; this is what the appliance said.
|
|
54465
|
+
*/
|
|
54466
|
+
var DishwasherOperationStateSchema = _enum([
|
|
54467
|
+
"Inactive",
|
|
54468
|
+
"Ready",
|
|
54469
|
+
"DelayedStart",
|
|
54470
|
+
"Run",
|
|
54471
|
+
"Pause",
|
|
54472
|
+
"ActionRequired",
|
|
54473
|
+
"Finished",
|
|
54474
|
+
"Error",
|
|
54475
|
+
"Aborting"
|
|
54476
|
+
]);
|
|
54477
|
+
/**
|
|
54478
|
+
* Why fields may be `null`:
|
|
54479
|
+
* - `available` — the link is up and the description is loaded;
|
|
54480
|
+
* - `offline` — the local link is down (values are unknown, not last-known);
|
|
54481
|
+
* - `description-missing` — the link is up but the appliance's description could not
|
|
54482
|
+
* be loaded, so its values cannot be decoded.
|
|
54483
|
+
*/
|
|
54484
|
+
var DishwasherAvailabilitySchema = _enum([
|
|
54485
|
+
"available",
|
|
54486
|
+
"offline",
|
|
54487
|
+
"description-missing"
|
|
54488
|
+
]);
|
|
54402
54489
|
var DishwasherConsumableLevelSchema = _enum([
|
|
54403
54490
|
"ok",
|
|
54404
54491
|
"low",
|
|
54405
54492
|
"empty"
|
|
54406
54493
|
]);
|
|
54407
54494
|
object({
|
|
54495
|
+
availability: DishwasherAvailabilitySchema,
|
|
54496
|
+
/** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
|
|
54408
54497
|
state: DishwasherStateSchema,
|
|
54409
|
-
/**
|
|
54498
|
+
/** The appliance's operation state as reported; null when not known. */
|
|
54499
|
+
operationState: DishwasherOperationStateSchema.nullable(),
|
|
54500
|
+
/** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
|
|
54410
54501
|
program: string().nullable(),
|
|
54411
|
-
/**
|
|
54502
|
+
/** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
|
|
54503
|
+
selectedProgram: string().nullable(),
|
|
54504
|
+
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
54412
54505
|
availablePrograms: array(string()),
|
|
54413
|
-
/**
|
|
54414
|
-
|
|
54506
|
+
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
54507
|
+
remainingSeconds: number().int().nonnegative().nullable(),
|
|
54508
|
+
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
54509
|
+
delayedStartSeconds: number().int().nonnegative().nullable(),
|
|
54415
54510
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
54416
54511
|
progressPercent: number().min(0).max(100).nullable(),
|
|
54417
|
-
/** True when the door is reported open. */
|
|
54418
|
-
doorOpen: boolean(),
|
|
54419
|
-
/** True when
|
|
54420
|
-
|
|
54421
|
-
/**
|
|
54422
|
-
|
|
54512
|
+
/** True when the door is reported open; null when the door state is not known. */
|
|
54513
|
+
doorOpen: boolean().nullable(),
|
|
54514
|
+
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
54515
|
+
doorLocked: boolean().nullable(),
|
|
54516
|
+
/** True when remote start is allowed (door closed, power on, etc.); null when not known. */
|
|
54517
|
+
remoteStartAllowed: boolean().nullable(),
|
|
54518
|
+
/** True when the appliance accepts remote control now; null when not known. */
|
|
54519
|
+
remoteControlActive: boolean().nullable(),
|
|
54520
|
+
/** True while somebody operates the appliance at its panel; null when not reported. */
|
|
54521
|
+
localControlActive: boolean().nullable(),
|
|
54522
|
+
/** Main power / switched-on state; null when not known. */
|
|
54523
|
+
powerOn: boolean().nullable(),
|
|
54524
|
+
/** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
|
|
54525
|
+
powerState: string().nullable(),
|
|
54423
54526
|
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
54424
54527
|
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
54425
|
-
|
|
54426
|
-
|
|
54528
|
+
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
54529
|
+
halfLoad: boolean().nullable(),
|
|
54530
|
+
hygienePlus: boolean().nullable(),
|
|
54427
54531
|
/** Extra dry option when the appliance exposes it. */
|
|
54428
|
-
extraDry: boolean(),
|
|
54532
|
+
extraDry: boolean().nullable(),
|
|
54429
54533
|
/** Intensive zone (lower basket) when the appliance exposes it. */
|
|
54430
|
-
intensiveZone: boolean(),
|
|
54534
|
+
intensiveZone: boolean().nullable(),
|
|
54431
54535
|
/** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
|
|
54432
|
-
varioSpeedPlus: boolean(),
|
|
54433
|
-
/** Child lock (controls disabled on the appliance). */
|
|
54434
|
-
childLock: boolean(),
|
|
54536
|
+
varioSpeedPlus: boolean().nullable(),
|
|
54537
|
+
/** Child lock (controls disabled on the appliance); null when not known. */
|
|
54538
|
+
childLock: boolean().nullable(),
|
|
54539
|
+
/** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
|
|
54540
|
+
activeEvents: array(string()),
|
|
54541
|
+
/** Numeric error code when the appliance reports one; null otherwise. */
|
|
54435
54542
|
errorCode: number().nullable(),
|
|
54543
|
+
/** Name of the raised alert-level event while the appliance is in error; null otherwise. */
|
|
54436
54544
|
errorLabel: string().nullable(),
|
|
54545
|
+
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
54437
54546
|
lastFetchedAt: number()
|
|
54438
54547
|
});
|
|
54439
|
-
|
|
54548
|
+
var DeviceIdSchema = number().int().nonnegative();
|
|
54549
|
+
/** A value a program option or setting can take. */
|
|
54550
|
+
var DishwasherValueSchema = union([
|
|
54551
|
+
boolean(),
|
|
54552
|
+
string(),
|
|
54553
|
+
number()
|
|
54554
|
+
]);
|
|
54555
|
+
var DishwasherAccessSchema = _enum([
|
|
54556
|
+
"none",
|
|
54557
|
+
"read",
|
|
54558
|
+
"readWrite",
|
|
54559
|
+
"writeOnly",
|
|
54560
|
+
"readStatic"
|
|
54561
|
+
]);
|
|
54562
|
+
/**
|
|
54563
|
+
* One option or setting the appliance declares, with the constraints its description
|
|
54564
|
+
* gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
|
|
54565
|
+
*/
|
|
54566
|
+
var DishwasherOptionDescriptorSchema = object({
|
|
54567
|
+
/** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
|
|
54568
|
+
key: string(),
|
|
54569
|
+
/** Last segment of the key, for display. */
|
|
54570
|
+
name: string(),
|
|
54571
|
+
type: _enum([
|
|
54572
|
+
"boolean",
|
|
54573
|
+
"number",
|
|
54574
|
+
"enum",
|
|
54575
|
+
"string"
|
|
54576
|
+
]),
|
|
54577
|
+
access: DishwasherAccessSchema,
|
|
54578
|
+
/** The appliance reports this entity as currently available. */
|
|
54579
|
+
available: boolean(),
|
|
54580
|
+
/** Unit the description declares for a number; null when it declares none. */
|
|
54581
|
+
unit: string().nullable(),
|
|
54582
|
+
min: number().nullable(),
|
|
54583
|
+
max: number().nullable(),
|
|
54584
|
+
step: number().nullable(),
|
|
54585
|
+
/** Allowed members of an enum; null for other types. */
|
|
54586
|
+
enumValues: array(string()).nullable(),
|
|
54587
|
+
defaultValue: DishwasherValueSchema.nullable()
|
|
54588
|
+
});
|
|
54589
|
+
var DishwasherProgramSchema = object({
|
|
54590
|
+
/** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
|
|
54591
|
+
key: string(),
|
|
54592
|
+
name: string(),
|
|
54593
|
+
/** The appliance currently offers this program. */
|
|
54594
|
+
available: boolean(),
|
|
54595
|
+
/** The options this program lists, with the program-level access / availability / default. */
|
|
54596
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
54597
|
+
});
|
|
54598
|
+
var DishwasherOptionsSchema = object({
|
|
54599
|
+
availability: DishwasherAvailabilitySchema,
|
|
54600
|
+
/** What the appliance can be told to do, from the commands its description declares. */
|
|
54601
|
+
supportsStart: boolean(),
|
|
54602
|
+
supportsPause: boolean(),
|
|
54603
|
+
supportsResume: boolean(),
|
|
54604
|
+
supportsStop: boolean(),
|
|
54605
|
+
supportsPower: boolean(),
|
|
54606
|
+
/** Every program the description lists, with its options. */
|
|
54607
|
+
programs: array(DishwasherProgramSchema),
|
|
54608
|
+
/** Every option and setting entity the description lists (programs reference these by key). */
|
|
54609
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
54610
|
+
});
|
|
54611
|
+
DeviceType.Dishwasher, method(object({
|
|
54612
|
+
deviceId: DeviceIdSchema,
|
|
54613
|
+
program: string().min(1).optional(),
|
|
54614
|
+
options: record(string(), DishwasherValueSchema).optional()
|
|
54615
|
+
}), _void(), {
|
|
54440
54616
|
kind: "mutation",
|
|
54441
54617
|
auth: "protected"
|
|
54442
|
-
}), method(object({ deviceId:
|
|
54618
|
+
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
54443
54619
|
kind: "mutation",
|
|
54444
54620
|
auth: "protected"
|
|
54445
|
-
}), method(object({ deviceId:
|
|
54621
|
+
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
54622
|
+
kind: "mutation",
|
|
54623
|
+
auth: "protected"
|
|
54624
|
+
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
54446
54625
|
kind: "mutation",
|
|
54447
54626
|
auth: "protected"
|
|
54448
54627
|
}), method(object({
|
|
54449
|
-
deviceId:
|
|
54628
|
+
deviceId: DeviceIdSchema,
|
|
54450
54629
|
program: string().min(1)
|
|
54451
54630
|
}), _void(), {
|
|
54452
54631
|
kind: "mutation",
|
|
54453
54632
|
auth: "protected"
|
|
54454
54633
|
}), method(object({
|
|
54455
|
-
deviceId:
|
|
54634
|
+
deviceId: DeviceIdSchema,
|
|
54456
54635
|
on: boolean()
|
|
54457
54636
|
}), _void(), {
|
|
54458
54637
|
kind: "mutation",
|
|
54459
54638
|
auth: "protected"
|
|
54460
54639
|
}), method(object({
|
|
54461
|
-
deviceId:
|
|
54640
|
+
deviceId: DeviceIdSchema,
|
|
54462
54641
|
on: boolean()
|
|
54463
54642
|
}), _void(), {
|
|
54464
54643
|
kind: "mutation",
|
|
54465
54644
|
auth: "protected"
|
|
54466
54645
|
}), method(object({
|
|
54467
|
-
deviceId:
|
|
54646
|
+
deviceId: DeviceIdSchema,
|
|
54468
54647
|
on: boolean()
|
|
54469
54648
|
}), _void(), {
|
|
54470
54649
|
kind: "mutation",
|
|
54471
54650
|
auth: "protected"
|
|
54472
54651
|
}), method(object({
|
|
54473
|
-
deviceId:
|
|
54652
|
+
deviceId: DeviceIdSchema,
|
|
54474
54653
|
on: boolean()
|
|
54475
54654
|
}), _void(), {
|
|
54476
54655
|
kind: "mutation",
|
|
54477
54656
|
auth: "protected"
|
|
54478
54657
|
}), method(object({
|
|
54479
|
-
deviceId:
|
|
54658
|
+
deviceId: DeviceIdSchema,
|
|
54480
54659
|
on: boolean()
|
|
54481
54660
|
}), _void(), {
|
|
54482
54661
|
kind: "mutation",
|
|
54483
54662
|
auth: "protected"
|
|
54484
54663
|
}), method(object({
|
|
54485
|
-
deviceId:
|
|
54664
|
+
deviceId: DeviceIdSchema,
|
|
54486
54665
|
on: boolean()
|
|
54487
54666
|
}), _void(), {
|
|
54488
54667
|
kind: "mutation",
|
|
54489
54668
|
auth: "protected"
|
|
54490
54669
|
}), method(object({
|
|
54491
|
-
deviceId:
|
|
54670
|
+
deviceId: DeviceIdSchema,
|
|
54492
54671
|
on: boolean()
|
|
54493
54672
|
}), _void(), {
|
|
54494
54673
|
kind: "mutation",
|
|
54495
54674
|
auth: "protected"
|
|
54496
54675
|
}), method(object({
|
|
54497
|
-
deviceId:
|
|
54676
|
+
deviceId: DeviceIdSchema,
|
|
54498
54677
|
key: string().min(1),
|
|
54499
|
-
value:
|
|
54500
|
-
boolean(),
|
|
54501
|
-
string(),
|
|
54502
|
-
number()
|
|
54503
|
-
])
|
|
54678
|
+
value: DishwasherValueSchema
|
|
54504
54679
|
}), _void(), {
|
|
54505
54680
|
kind: "mutation",
|
|
54506
54681
|
auth: "protected"
|
|
54507
|
-
});
|
|
54682
|
+
}), method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" });
|
|
54508
54683
|
object({
|
|
54509
54684
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
54510
54685
|
lastPressedAt: number().nullable(),
|
|
@@ -64664,6 +64839,12 @@ Object.freeze({
|
|
|
64664
64839
|
addonId: null,
|
|
64665
64840
|
access: "view"
|
|
64666
64841
|
},
|
|
64842
|
+
"dishwasher.getOptions": {
|
|
64843
|
+
capName: "dishwasher",
|
|
64844
|
+
capScope: "device",
|
|
64845
|
+
addonId: null,
|
|
64846
|
+
access: "view"
|
|
64847
|
+
},
|
|
64667
64848
|
"dishwasher.getStatus": {
|
|
64668
64849
|
capName: "dishwasher",
|
|
64669
64850
|
capScope: "device",
|
|
@@ -64676,6 +64857,12 @@ Object.freeze({
|
|
|
64676
64857
|
addonId: null,
|
|
64677
64858
|
access: "create"
|
|
64678
64859
|
},
|
|
64860
|
+
"dishwasher.resume": {
|
|
64861
|
+
capName: "dishwasher",
|
|
64862
|
+
capScope: "device",
|
|
64863
|
+
addonId: null,
|
|
64864
|
+
access: "create"
|
|
64865
|
+
},
|
|
64679
64866
|
"dishwasher.setChildLock": {
|
|
64680
64867
|
capName: "dishwasher",
|
|
64681
64868
|
capScope: "device",
|
|
@@ -69176,6 +69363,12 @@ Object.freeze({
|
|
|
69176
69363
|
addonId: null,
|
|
69177
69364
|
access: "view"
|
|
69178
69365
|
},
|
|
69366
|
+
"storageMigration.moverClearance": {
|
|
69367
|
+
capName: "storage-migration",
|
|
69368
|
+
capScope: "system",
|
|
69369
|
+
addonId: null,
|
|
69370
|
+
access: "view"
|
|
69371
|
+
},
|
|
69179
69372
|
"storageMigration.movers": {
|
|
69180
69373
|
capName: "storage-migration",
|
|
69181
69374
|
capScope: "system",
|
|
@@ -71369,6 +71562,11 @@ Object.freeze({
|
|
|
71369
71562
|
form: "single",
|
|
71370
71563
|
optional: false
|
|
71371
71564
|
}],
|
|
71565
|
+
"dishwasher.getOptions": [{
|
|
71566
|
+
name: "deviceId",
|
|
71567
|
+
form: "single",
|
|
71568
|
+
optional: false
|
|
71569
|
+
}],
|
|
71372
71570
|
"dishwasher.getStatus": [{
|
|
71373
71571
|
name: "deviceId",
|
|
71374
71572
|
form: "single",
|
|
@@ -71379,6 +71577,11 @@ Object.freeze({
|
|
|
71379
71577
|
form: "single",
|
|
71380
71578
|
optional: false
|
|
71381
71579
|
}],
|
|
71580
|
+
"dishwasher.resume": [{
|
|
71581
|
+
name: "deviceId",
|
|
71582
|
+
form: "single",
|
|
71583
|
+
optional: false
|
|
71584
|
+
}],
|
|
71382
71585
|
"dishwasher.setChildLock": [{
|
|
71383
71586
|
name: "deviceId",
|
|
71384
71587
|
form: "single",
|
|
@@ -73465,6 +73668,9 @@ new Map(Object.entries({
|
|
|
73465
73668
|
"wrapper-update-available": "system",
|
|
73466
73669
|
"backup-completed": "system",
|
|
73467
73670
|
"export-completed": "system",
|
|
73671
|
+
"alert-critical": "system",
|
|
73672
|
+
"alert-error": "system",
|
|
73673
|
+
"alert-critical-resolved": "system",
|
|
73468
73674
|
"storage-location-low": "system",
|
|
73469
73675
|
"storage-location-critical": "system",
|
|
73470
73676
|
"storage-location-ok": "system",
|
|
@@ -73589,6 +73795,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
73589
73795
|
"storage-location-ok"
|
|
73590
73796
|
]
|
|
73591
73797
|
},
|
|
73798
|
+
{
|
|
73799
|
+
id: "alerts",
|
|
73800
|
+
family: "system",
|
|
73801
|
+
label: "Alerts",
|
|
73802
|
+
kinds: [
|
|
73803
|
+
"alert-critical",
|
|
73804
|
+
"alert-error",
|
|
73805
|
+
"alert-critical-resolved"
|
|
73806
|
+
]
|
|
73807
|
+
},
|
|
73592
73808
|
{
|
|
73593
73809
|
id: "alarm",
|
|
73594
73810
|
family: "alarm",
|
|
@@ -73633,6 +73849,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
|
|
|
73633
73849
|
return [[descriptor.kind, field]];
|
|
73634
73850
|
})));
|
|
73635
73851
|
Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
|
|
73852
|
+
object({
|
|
73853
|
+
phase: _enum(["raised", "resolved"]),
|
|
73854
|
+
episodeId: string().min(1),
|
|
73855
|
+
alertId: string().min(1),
|
|
73856
|
+
severity: AlertSeveritySchema,
|
|
73857
|
+
category: string(),
|
|
73858
|
+
title: string(),
|
|
73859
|
+
message: string(),
|
|
73860
|
+
sourceType: string().optional(),
|
|
73861
|
+
sourceId: string().optional(),
|
|
73862
|
+
nodeId: string().optional(),
|
|
73863
|
+
/** The alert's own action link (where the operator acts on it), when it has one. */
|
|
73864
|
+
actionUrl: string().optional(),
|
|
73865
|
+
at: number()
|
|
73866
|
+
});
|
|
73636
73867
|
var RULE_BODY_ONLY = ["body"];
|
|
73637
73868
|
var RULE_TEXT = ["title", "body"];
|
|
73638
73869
|
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
@@ -73642,6 +73873,11 @@ var TANK = [
|
|
|
73642
73873
|
"device-tank-full",
|
|
73643
73874
|
"device-tank-normal"
|
|
73644
73875
|
];
|
|
73876
|
+
var ALERT_EPISODE = [
|
|
73877
|
+
"alert-critical",
|
|
73878
|
+
"alert-error",
|
|
73879
|
+
"alert-critical-resolved"
|
|
73880
|
+
];
|
|
73645
73881
|
var UPDATES = [
|
|
73646
73882
|
"addon-update-available",
|
|
73647
73883
|
"server-update-available",
|
|
@@ -73834,14 +74070,14 @@ var STATE_SUMMARY_VARS = [
|
|
|
73834
74070
|
([...RULE_TEXT], [...CONSUMABLE]),
|
|
73835
74071
|
([...RULE_TEXT], [...TANK]),
|
|
73836
74072
|
[...RULE_TEXT],
|
|
73837
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
73838
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
73839
|
-
[...RULE_TEXT],
|
|
74073
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
74074
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
73840
74075
|
[...RULE_TEXT],
|
|
73841
74076
|
[...RULE_TEXT],
|
|
73842
74077
|
[...RULE_TEXT],
|
|
73843
74078
|
[...RULE_TEXT],
|
|
73844
74079
|
[...RULE_TEXT],
|
|
74080
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
73845
74081
|
[...RULE_TEXT],
|
|
73846
74082
|
[...RULE_TEXT],
|
|
73847
74083
|
[...RULE_TEXT],
|
|
@@ -73859,7 +74095,11 @@ var STATE_SUMMARY_VARS = [
|
|
|
73859
74095
|
[...RULE_TEXT],
|
|
73860
74096
|
[...RULE_TEXT],
|
|
73861
74097
|
[...RULE_TEXT],
|
|
73862
|
-
[...RULE_TEXT],
|
|
74098
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74099
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74100
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74101
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74102
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
73863
74103
|
[...RULE_TEXT],
|
|
73864
74104
|
[...RULE_TEXT],
|
|
73865
74105
|
[...RULE_TEXT],
|