@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../types/dist/event-category-
|
|
1
|
+
//#region ../types/dist/event-category-DOl51-Ij.mjs
|
|
2
2
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
3
3
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4
4
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -77,9 +77,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
77
77
|
/**
|
|
78
78
|
* The node's one-shot runner boot check (D877): planned runners against the
|
|
79
79
|
* process service, `degraded` when any is failed, refused or missing. The
|
|
80
|
-
* alert centre turns it into one
|
|
80
|
+
* alert centre turns it into one critical alert.
|
|
81
81
|
*/
|
|
82
82
|
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
83
|
+
/**
|
|
84
|
+
* An alert EPISODE opened or closed, emitted by the alert centre for alerts
|
|
85
|
+
* of severity `critical` or `error` (`AlertEpisodePayload`). The alert
|
|
86
|
+
* centre sends no notification of its own: Notification Center turns this
|
|
87
|
+
* into the `alert-critical` / `alert-error` / `alert-critical-resolved`
|
|
88
|
+
* system-event kinds, and reconciles from the alerts store because a bus
|
|
89
|
+
* event may be dropped (D8, D11).
|
|
90
|
+
*/
|
|
91
|
+
EventCategory["AlertEpisode"] = "alert.episode";
|
|
83
92
|
EventCategory["AddonError"] = "addon.error";
|
|
84
93
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
85
94
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -5537,7 +5546,7 @@ var ZodIssueCode = {
|
|
|
5537
5546
|
var ZodFirstPartyTypeKind;
|
|
5538
5547
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5539
5548
|
//#endregion
|
|
5540
|
-
//#region ../types/dist/sleep-
|
|
5549
|
+
//#region ../types/dist/sleep-BxjU_fJM.mjs
|
|
5541
5550
|
/**
|
|
5542
5551
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5543
5552
|
* window to float samples (D455).
|
|
@@ -7919,6 +7928,12 @@ function normalizeAddonInitResult(result) {
|
|
|
7919
7928
|
if (Array.isArray(result)) return { providers: result };
|
|
7920
7929
|
return result;
|
|
7921
7930
|
}
|
|
7931
|
+
/**
|
|
7932
|
+
* The share-view scope kinds a `csv_*` share token can carry. The hub mints
|
|
7933
|
+
* and validates them (`share-token.service.ts` builds its enum from this
|
|
7934
|
+
* list); a data plane names the kinds it ACCEPTS in `share`.
|
|
7935
|
+
*/
|
|
7936
|
+
var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
|
|
7922
7937
|
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
7923
7938
|
var PeerBytesTicketSchema = object({
|
|
7924
7939
|
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
@@ -12883,6 +12898,229 @@ var ConvertResultSchema = object({
|
|
|
12883
12898
|
})).readonly()
|
|
12884
12899
|
});
|
|
12885
12900
|
/**
|
|
12901
|
+
* Zod schemas for persisted record types.
|
|
12902
|
+
*
|
|
12903
|
+
* These schemas serve as the single source of truth for types that are
|
|
12904
|
+
* stored in the settings-store backend and retrieved via tRPC. They
|
|
12905
|
+
* replace the manual TypeScript interfaces with schema-derived types,
|
|
12906
|
+
* enabling runtime validation when reading from the backend.
|
|
12907
|
+
*
|
|
12908
|
+
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
12909
|
+
* keeps the original name for backward compatibility.
|
|
12910
|
+
*/
|
|
12911
|
+
/**
|
|
12912
|
+
* Auth model (v2 — 2026-05-12 caps-only):
|
|
12913
|
+
*
|
|
12914
|
+
* Two principals:
|
|
12915
|
+
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
12916
|
+
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
12917
|
+
*
|
|
12918
|
+
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
12919
|
+
* `super_admin` — collapsed onto the single boolean because every
|
|
12920
|
+
* non-admin caller is governed by the same scope-check rules; the
|
|
12921
|
+
* distinction was only ever used to route role-specific procedures
|
|
12922
|
+
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
12923
|
+
* with `isAdmin: false` + an explicit scope list.
|
|
12924
|
+
*/
|
|
12925
|
+
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
12926
|
+
var MethodAccessSchema = _enum([
|
|
12927
|
+
"view",
|
|
12928
|
+
"create",
|
|
12929
|
+
"delete"
|
|
12930
|
+
]);
|
|
12931
|
+
/**
|
|
12932
|
+
* A single scope grant. Three forms — checked in matcher with OR
|
|
12933
|
+
* semantics; the first match decides whether the call passes:
|
|
12934
|
+
*
|
|
12935
|
+
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
12936
|
+
* cap with the matching `scope` declaration. New caps inherit grants
|
|
12937
|
+
* automatically — adding a device cap to the codebase makes it
|
|
12938
|
+
* reachable to every user with `category:device [...]` without a
|
|
12939
|
+
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
12940
|
+
*
|
|
12941
|
+
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
12942
|
+
* useful when an integration needs to interact with one specific
|
|
12943
|
+
* addon's surface regardless of how many caps it exports.
|
|
12944
|
+
*
|
|
12945
|
+
* - `capability` — the most precise form. Single cap name. Use for
|
|
12946
|
+
* integration tokens where you want to grant `addons.installPackage`
|
|
12947
|
+
* and nothing else.
|
|
12948
|
+
*
|
|
12949
|
+
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
12950
|
+
* "give me everything" escape; there is no wildcard scope.
|
|
12951
|
+
*/
|
|
12952
|
+
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
12953
|
+
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
12954
|
+
var CapScopeSchema = _enum(["device", "system"]);
|
|
12955
|
+
/**
|
|
12956
|
+
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
12957
|
+
*
|
|
12958
|
+
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
12959
|
+
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
12960
|
+
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
12961
|
+
* AFTER the grant was minted — no re-grant, no re-login.
|
|
12962
|
+
*
|
|
12963
|
+
* - `all` — every device in the deployment. The broad viewer/operator
|
|
12964
|
+
* lever without a `category` grant (a `category` grant also covers device
|
|
12965
|
+
* caps that carry no deviceId; `all` is specifically the device set).
|
|
12966
|
+
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
12967
|
+
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
12968
|
+
* is NOT covered until the grant is edited.
|
|
12969
|
+
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
12970
|
+
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
12971
|
+
* re-resolves on the next request.
|
|
12972
|
+
* - `locations` — every device whose operator-assigned `location` label is
|
|
12973
|
+
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
12974
|
+
* null/unset location matches NO `locations` selector.
|
|
12975
|
+
*/
|
|
12976
|
+
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
12977
|
+
object({ kind: literal("all") }),
|
|
12978
|
+
object({
|
|
12979
|
+
kind: literal("ids"),
|
|
12980
|
+
ids: array(number().int()).min(1)
|
|
12981
|
+
}),
|
|
12982
|
+
object({
|
|
12983
|
+
kind: literal("types"),
|
|
12984
|
+
types: array(_enum(DeviceType)).min(1)
|
|
12985
|
+
}),
|
|
12986
|
+
object({
|
|
12987
|
+
kind: literal("locations"),
|
|
12988
|
+
locations: array(string().min(1)).min(1)
|
|
12989
|
+
})
|
|
12990
|
+
]);
|
|
12991
|
+
var DeviceTokenScopeSchema = object({
|
|
12992
|
+
type: literal("device"),
|
|
12993
|
+
/** The device SET this grant covers — resolved against the live fleet. */
|
|
12994
|
+
selector: DeviceSelectorSchema,
|
|
12995
|
+
access: array(MethodAccessSchema).min(1),
|
|
12996
|
+
/**
|
|
12997
|
+
* Whether a grant on a PARENT device transparently covers its accessory
|
|
12998
|
+
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
12999
|
+
* Direction is parent → children ONLY.
|
|
13000
|
+
*
|
|
13001
|
+
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
13002
|
+
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
13003
|
+
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
13004
|
+
* operator must grant on the child, not inherit from the parent). Set it
|
|
13005
|
+
* explicitly to override that default per grant.
|
|
13006
|
+
*/
|
|
13007
|
+
includeLinked: boolean().optional()
|
|
13008
|
+
});
|
|
13009
|
+
/**
|
|
13010
|
+
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
13011
|
+
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
13012
|
+
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
13013
|
+
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
13014
|
+
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
13015
|
+
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
13016
|
+
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
13017
|
+
* migration covers both without a flag day. No cast — the raw object is read
|
|
13018
|
+
* through `Reflect.get` (its static type is `unknown`).
|
|
13019
|
+
*/
|
|
13020
|
+
function migrateLegacyTokenScope(raw) {
|
|
13021
|
+
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
13022
|
+
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
13023
|
+
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
13024
|
+
const targets = Reflect.get(raw, "targets");
|
|
13025
|
+
if (!Array.isArray(targets)) return raw;
|
|
13026
|
+
return {
|
|
13027
|
+
type: "device",
|
|
13028
|
+
selector: {
|
|
13029
|
+
kind: "ids",
|
|
13030
|
+
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
13031
|
+
},
|
|
13032
|
+
access: Reflect.get(raw, "access")
|
|
13033
|
+
};
|
|
13034
|
+
}
|
|
13035
|
+
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
13036
|
+
object({
|
|
13037
|
+
type: literal("category"),
|
|
13038
|
+
target: CapScopeSchema,
|
|
13039
|
+
access: array(MethodAccessSchema).min(1)
|
|
13040
|
+
}),
|
|
13041
|
+
object({
|
|
13042
|
+
type: literal("capability"),
|
|
13043
|
+
target: string(),
|
|
13044
|
+
access: array(MethodAccessSchema).min(1)
|
|
13045
|
+
}),
|
|
13046
|
+
object({
|
|
13047
|
+
type: literal("addon"),
|
|
13048
|
+
target: string(),
|
|
13049
|
+
access: array(MethodAccessSchema).min(1)
|
|
13050
|
+
}),
|
|
13051
|
+
DeviceTokenScopeSchema
|
|
13052
|
+
]));
|
|
13053
|
+
object({
|
|
13054
|
+
id: string(),
|
|
13055
|
+
username: string(),
|
|
13056
|
+
passwordHash: string(),
|
|
13057
|
+
/**
|
|
13058
|
+
* Admin bypass. When true, the middleware skips the scope-access
|
|
13059
|
+
* check entirely. There is no other axis of privilege; the legacy
|
|
13060
|
+
* role enum collapsed onto this boolean in v2.
|
|
13061
|
+
*/
|
|
13062
|
+
isAdmin: boolean().default(false),
|
|
13063
|
+
allowedProviders: AllowedProviderSchema,
|
|
13064
|
+
allowedDevices: AllowedDevicesSchema,
|
|
13065
|
+
/**
|
|
13066
|
+
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
13067
|
+
* ignored. Non-admins without scopes are locked out of every
|
|
13068
|
+
* protected call.
|
|
13069
|
+
*/
|
|
13070
|
+
scopes: array(TokenScopeSchema).default([]),
|
|
13071
|
+
createdAt: number(),
|
|
13072
|
+
updatedAt: number()
|
|
13073
|
+
});
|
|
13074
|
+
object({
|
|
13075
|
+
id: string(),
|
|
13076
|
+
label: string(),
|
|
13077
|
+
isAdmin: boolean().default(false),
|
|
13078
|
+
allowedProviders: AllowedProviderSchema,
|
|
13079
|
+
allowedDevices: AllowedDevicesSchema,
|
|
13080
|
+
tokenHash: string(),
|
|
13081
|
+
tokenPrefix: string(),
|
|
13082
|
+
createdAt: number(),
|
|
13083
|
+
lastUsedAt: number().optional()
|
|
13084
|
+
});
|
|
13085
|
+
object({
|
|
13086
|
+
id: string(),
|
|
13087
|
+
userId: string(),
|
|
13088
|
+
name: string(),
|
|
13089
|
+
tokenHash: string(),
|
|
13090
|
+
tokenPrefix: string(),
|
|
13091
|
+
scopes: array(TokenScopeSchema),
|
|
13092
|
+
expiresAt: number().nullish(),
|
|
13093
|
+
lastUsedAt: number().nullish(),
|
|
13094
|
+
createdAt: number()
|
|
13095
|
+
});
|
|
13096
|
+
/** What a share-view grant lets its holder see. */
|
|
13097
|
+
var ShareViewGrantSchema = object({
|
|
13098
|
+
kind: _enum(SHARE_VIEW_KINDS),
|
|
13099
|
+
deviceIds: array(number().int().nonnegative()).min(1).max(64),
|
|
13100
|
+
/** Talk-back, opt-in at mint time; absent means off. */
|
|
13101
|
+
talk: boolean().optional()
|
|
13102
|
+
});
|
|
13103
|
+
var ShareViewScopeSchema = object({
|
|
13104
|
+
type: literal("share-view"),
|
|
13105
|
+
grant: ShareViewGrantSchema
|
|
13106
|
+
});
|
|
13107
|
+
var AddonRoutesScopeSchema = object({
|
|
13108
|
+
type: literal("addon-routes"),
|
|
13109
|
+
access: array(MethodAccessSchema).min(1)
|
|
13110
|
+
});
|
|
13111
|
+
var CredentialScopeSchema = union([
|
|
13112
|
+
literal("*"),
|
|
13113
|
+
ShareViewScopeSchema,
|
|
13114
|
+
AddonRoutesScopeSchema,
|
|
13115
|
+
TokenScopeSchema
|
|
13116
|
+
]);
|
|
13117
|
+
object({
|
|
13118
|
+
kind: literal("credential"),
|
|
13119
|
+
sub: string().min(1),
|
|
13120
|
+
jti: string().min(16),
|
|
13121
|
+
scopes: array(CredentialScopeSchema).min(1)
|
|
13122
|
+
});
|
|
13123
|
+
/**
|
|
12886
13124
|
* The viewer app's custom-scheme callback — the ONE list of URLs a hub flow
|
|
12887
13125
|
* may hand a browser back to the native app at.
|
|
12888
13126
|
*
|
|
@@ -13844,7 +14082,14 @@ var AlertSeveritySchema = _enum([
|
|
|
13844
14082
|
]);
|
|
13845
14083
|
var AlertActionSchema = object({
|
|
13846
14084
|
label: string(),
|
|
13847
|
-
href: string().optional()
|
|
14085
|
+
href: string().optional(),
|
|
14086
|
+
/**
|
|
14087
|
+
* How `href` is followed. Absent / `app`: an admin-ui route (client-side).
|
|
14088
|
+
* `server`: a route the HUB serves (an addon HTTP route such as an OAuth
|
|
14089
|
+
* start) — the browser must leave the SPA with a full navigation, because
|
|
14090
|
+
* the SPA has no such route and would bounce to the home page.
|
|
14091
|
+
*/
|
|
14092
|
+
navigation: _enum(["app", "server"]).optional()
|
|
13848
14093
|
});
|
|
13849
14094
|
var AlertStatusSchema = _enum([
|
|
13850
14095
|
"active",
|
|
@@ -42259,6 +42504,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
42259
42504
|
"server-updated",
|
|
42260
42505
|
"export-completed",
|
|
42261
42506
|
"backup-completed",
|
|
42507
|
+
"alert-critical",
|
|
42508
|
+
"alert-error",
|
|
42509
|
+
"alert-critical-resolved",
|
|
42262
42510
|
"camera-online",
|
|
42263
42511
|
"camera-offline",
|
|
42264
42512
|
"camera-disabled",
|
|
@@ -44294,202 +44542,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
44294
44542
|
auth: "admin"
|
|
44295
44543
|
}), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
|
|
44296
44544
|
/**
|
|
44297
|
-
* Zod schemas for persisted record types.
|
|
44298
|
-
*
|
|
44299
|
-
* These schemas serve as the single source of truth for types that are
|
|
44300
|
-
* stored in the settings-store backend and retrieved via tRPC. They
|
|
44301
|
-
* replace the manual TypeScript interfaces with schema-derived types,
|
|
44302
|
-
* enabling runtime validation when reading from the backend.
|
|
44303
|
-
*
|
|
44304
|
-
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
44305
|
-
* keeps the original name for backward compatibility.
|
|
44306
|
-
*/
|
|
44307
|
-
/**
|
|
44308
|
-
* Auth model (v2 — 2026-05-12 caps-only):
|
|
44309
|
-
*
|
|
44310
|
-
* Two principals:
|
|
44311
|
-
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
44312
|
-
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
44313
|
-
*
|
|
44314
|
-
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
44315
|
-
* `super_admin` — collapsed onto the single boolean because every
|
|
44316
|
-
* non-admin caller is governed by the same scope-check rules; the
|
|
44317
|
-
* distinction was only ever used to route role-specific procedures
|
|
44318
|
-
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
44319
|
-
* with `isAdmin: false` + an explicit scope list.
|
|
44320
|
-
*/
|
|
44321
|
-
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
44322
|
-
var MethodAccessSchema = _enum([
|
|
44323
|
-
"view",
|
|
44324
|
-
"create",
|
|
44325
|
-
"delete"
|
|
44326
|
-
]);
|
|
44327
|
-
/**
|
|
44328
|
-
* A single scope grant. Three forms — checked in matcher with OR
|
|
44329
|
-
* semantics; the first match decides whether the call passes:
|
|
44330
|
-
*
|
|
44331
|
-
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
44332
|
-
* cap with the matching `scope` declaration. New caps inherit grants
|
|
44333
|
-
* automatically — adding a device cap to the codebase makes it
|
|
44334
|
-
* reachable to every user with `category:device [...]` without a
|
|
44335
|
-
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
44336
|
-
*
|
|
44337
|
-
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
44338
|
-
* useful when an integration needs to interact with one specific
|
|
44339
|
-
* addon's surface regardless of how many caps it exports.
|
|
44340
|
-
*
|
|
44341
|
-
* - `capability` — the most precise form. Single cap name. Use for
|
|
44342
|
-
* integration tokens where you want to grant `addons.installPackage`
|
|
44343
|
-
* and nothing else.
|
|
44344
|
-
*
|
|
44345
|
-
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
44346
|
-
* "give me everything" escape; there is no wildcard scope.
|
|
44347
|
-
*/
|
|
44348
|
-
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
44349
|
-
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
44350
|
-
var CapScopeSchema = _enum(["device", "system"]);
|
|
44351
|
-
/**
|
|
44352
|
-
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
44353
|
-
*
|
|
44354
|
-
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
44355
|
-
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
44356
|
-
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
44357
|
-
* AFTER the grant was minted — no re-grant, no re-login.
|
|
44358
|
-
*
|
|
44359
|
-
* - `all` — every device in the deployment. The broad viewer/operator
|
|
44360
|
-
* lever without a `category` grant (a `category` grant also covers device
|
|
44361
|
-
* caps that carry no deviceId; `all` is specifically the device set).
|
|
44362
|
-
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
44363
|
-
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
44364
|
-
* is NOT covered until the grant is edited.
|
|
44365
|
-
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
44366
|
-
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
44367
|
-
* re-resolves on the next request.
|
|
44368
|
-
* - `locations` — every device whose operator-assigned `location` label is
|
|
44369
|
-
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
44370
|
-
* null/unset location matches NO `locations` selector.
|
|
44371
|
-
*/
|
|
44372
|
-
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
44373
|
-
object({ kind: literal("all") }),
|
|
44374
|
-
object({
|
|
44375
|
-
kind: literal("ids"),
|
|
44376
|
-
ids: array(number().int()).min(1)
|
|
44377
|
-
}),
|
|
44378
|
-
object({
|
|
44379
|
-
kind: literal("types"),
|
|
44380
|
-
types: array(_enum(DeviceType)).min(1)
|
|
44381
|
-
}),
|
|
44382
|
-
object({
|
|
44383
|
-
kind: literal("locations"),
|
|
44384
|
-
locations: array(string().min(1)).min(1)
|
|
44385
|
-
})
|
|
44386
|
-
]);
|
|
44387
|
-
var DeviceTokenScopeSchema = object({
|
|
44388
|
-
type: literal("device"),
|
|
44389
|
-
/** The device SET this grant covers — resolved against the live fleet. */
|
|
44390
|
-
selector: DeviceSelectorSchema,
|
|
44391
|
-
access: array(MethodAccessSchema).min(1),
|
|
44392
|
-
/**
|
|
44393
|
-
* Whether a grant on a PARENT device transparently covers its accessory
|
|
44394
|
-
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
44395
|
-
* Direction is parent → children ONLY.
|
|
44396
|
-
*
|
|
44397
|
-
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
44398
|
-
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
44399
|
-
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
44400
|
-
* operator must grant on the child, not inherit from the parent). Set it
|
|
44401
|
-
* explicitly to override that default per grant.
|
|
44402
|
-
*/
|
|
44403
|
-
includeLinked: boolean().optional()
|
|
44404
|
-
});
|
|
44405
|
-
/**
|
|
44406
|
-
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
44407
|
-
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
44408
|
-
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
44409
|
-
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
44410
|
-
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
44411
|
-
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
44412
|
-
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
44413
|
-
* migration covers both without a flag day. No cast — the raw object is read
|
|
44414
|
-
* through `Reflect.get` (its static type is `unknown`).
|
|
44415
|
-
*/
|
|
44416
|
-
function migrateLegacyTokenScope(raw) {
|
|
44417
|
-
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
44418
|
-
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
44419
|
-
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
44420
|
-
const targets = Reflect.get(raw, "targets");
|
|
44421
|
-
if (!Array.isArray(targets)) return raw;
|
|
44422
|
-
return {
|
|
44423
|
-
type: "device",
|
|
44424
|
-
selector: {
|
|
44425
|
-
kind: "ids",
|
|
44426
|
-
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
44427
|
-
},
|
|
44428
|
-
access: Reflect.get(raw, "access")
|
|
44429
|
-
};
|
|
44430
|
-
}
|
|
44431
|
-
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
44432
|
-
object({
|
|
44433
|
-
type: literal("category"),
|
|
44434
|
-
target: CapScopeSchema,
|
|
44435
|
-
access: array(MethodAccessSchema).min(1)
|
|
44436
|
-
}),
|
|
44437
|
-
object({
|
|
44438
|
-
type: literal("capability"),
|
|
44439
|
-
target: string(),
|
|
44440
|
-
access: array(MethodAccessSchema).min(1)
|
|
44441
|
-
}),
|
|
44442
|
-
object({
|
|
44443
|
-
type: literal("addon"),
|
|
44444
|
-
target: string(),
|
|
44445
|
-
access: array(MethodAccessSchema).min(1)
|
|
44446
|
-
}),
|
|
44447
|
-
DeviceTokenScopeSchema
|
|
44448
|
-
]));
|
|
44449
|
-
object({
|
|
44450
|
-
id: string(),
|
|
44451
|
-
username: string(),
|
|
44452
|
-
passwordHash: string(),
|
|
44453
|
-
/**
|
|
44454
|
-
* Admin bypass. When true, the middleware skips the scope-access
|
|
44455
|
-
* check entirely. There is no other axis of privilege; the legacy
|
|
44456
|
-
* role enum collapsed onto this boolean in v2.
|
|
44457
|
-
*/
|
|
44458
|
-
isAdmin: boolean().default(false),
|
|
44459
|
-
allowedProviders: AllowedProviderSchema,
|
|
44460
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44461
|
-
/**
|
|
44462
|
-
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
44463
|
-
* ignored. Non-admins without scopes are locked out of every
|
|
44464
|
-
* protected call.
|
|
44465
|
-
*/
|
|
44466
|
-
scopes: array(TokenScopeSchema).default([]),
|
|
44467
|
-
createdAt: number(),
|
|
44468
|
-
updatedAt: number()
|
|
44469
|
-
});
|
|
44470
|
-
object({
|
|
44471
|
-
id: string(),
|
|
44472
|
-
label: string(),
|
|
44473
|
-
isAdmin: boolean().default(false),
|
|
44474
|
-
allowedProviders: AllowedProviderSchema,
|
|
44475
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44476
|
-
tokenHash: string(),
|
|
44477
|
-
tokenPrefix: string(),
|
|
44478
|
-
createdAt: number(),
|
|
44479
|
-
lastUsedAt: number().optional()
|
|
44480
|
-
});
|
|
44481
|
-
object({
|
|
44482
|
-
id: string(),
|
|
44483
|
-
userId: string(),
|
|
44484
|
-
name: string(),
|
|
44485
|
-
tokenHash: string(),
|
|
44486
|
-
tokenPrefix: string(),
|
|
44487
|
-
scopes: array(TokenScopeSchema),
|
|
44488
|
-
expiresAt: number().nullish(),
|
|
44489
|
-
lastUsedAt: number().nullish(),
|
|
44490
|
-
createdAt: number()
|
|
44491
|
-
});
|
|
44492
|
-
/**
|
|
44493
44545
|
* `oauth-integration` — a collection cap by which an addon declares
|
|
44494
44546
|
* itself a linkable OAuth client of the hub's core `/oauth2/*` server.
|
|
44495
44547
|
* Each provider returns a static descriptor; the core enumerates them
|
|
@@ -51307,7 +51359,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
51307
51359
|
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
51308
51360
|
kind: "mutation",
|
|
51309
51361
|
auth: "admin"
|
|
51310
|
-
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({
|
|
51362
|
+
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
|
|
51363
|
+
clear: boolean(),
|
|
51364
|
+
repointLocationId: string().optional()
|
|
51365
|
+
}), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
|
|
51311
51366
|
kind: "mutation",
|
|
51312
51367
|
auth: "admin"
|
|
51313
51368
|
}), method(StorageCleanupInputSchema, object({ jobId: string() }), {
|
|
@@ -54777,6 +54832,11 @@ object({
|
|
|
54777
54832
|
*
|
|
54778
54833
|
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
54779
54834
|
* provider refreshes the slice on an interval and eagerly after commands.
|
|
54835
|
+
*
|
|
54836
|
+
* UNKNOWN IS NOT OFF. Every field the appliance reports separately is
|
|
54837
|
+
* nullable: `null` means "not known right now" (the appliance has not said,
|
|
54838
|
+
* the link is down, or the description does not carry it) and is never
|
|
54839
|
+
* rendered or exported as `false` / `0`. `availability` says why.
|
|
54780
54840
|
*/
|
|
54781
54841
|
var DishwasherStateSchema = _enum([
|
|
54782
54842
|
"idle",
|
|
@@ -54786,112 +54846,227 @@ var DishwasherStateSchema = _enum([
|
|
|
54786
54846
|
"error",
|
|
54787
54847
|
"unavailable"
|
|
54788
54848
|
]);
|
|
54849
|
+
/**
|
|
54850
|
+
* The appliance's own operation state, uncollapsed. `state` above is the coarse
|
|
54851
|
+
* view for compact surfaces; this is what the appliance said.
|
|
54852
|
+
*/
|
|
54853
|
+
var DishwasherOperationStateSchema = _enum([
|
|
54854
|
+
"Inactive",
|
|
54855
|
+
"Ready",
|
|
54856
|
+
"DelayedStart",
|
|
54857
|
+
"Run",
|
|
54858
|
+
"Pause",
|
|
54859
|
+
"ActionRequired",
|
|
54860
|
+
"Finished",
|
|
54861
|
+
"Error",
|
|
54862
|
+
"Aborting"
|
|
54863
|
+
]);
|
|
54864
|
+
/**
|
|
54865
|
+
* Why fields may be `null`:
|
|
54866
|
+
* - `available` — the link is up and the description is loaded;
|
|
54867
|
+
* - `offline` — the local link is down (values are unknown, not last-known);
|
|
54868
|
+
* - `description-missing` — the link is up but the appliance's description could not
|
|
54869
|
+
* be loaded, so its values cannot be decoded.
|
|
54870
|
+
*/
|
|
54871
|
+
var DishwasherAvailabilitySchema = _enum([
|
|
54872
|
+
"available",
|
|
54873
|
+
"offline",
|
|
54874
|
+
"description-missing"
|
|
54875
|
+
]);
|
|
54789
54876
|
var DishwasherConsumableLevelSchema = _enum([
|
|
54790
54877
|
"ok",
|
|
54791
54878
|
"low",
|
|
54792
54879
|
"empty"
|
|
54793
54880
|
]);
|
|
54794
54881
|
object({
|
|
54882
|
+
availability: DishwasherAvailabilitySchema,
|
|
54883
|
+
/** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
|
|
54795
54884
|
state: DishwasherStateSchema,
|
|
54796
|
-
/**
|
|
54885
|
+
/** The appliance's operation state as reported; null when not known. */
|
|
54886
|
+
operationState: DishwasherOperationStateSchema.nullable(),
|
|
54887
|
+
/** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
|
|
54797
54888
|
program: string().nullable(),
|
|
54798
|
-
/**
|
|
54889
|
+
/** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
|
|
54890
|
+
selectedProgram: string().nullable(),
|
|
54891
|
+
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
54799
54892
|
availablePrograms: array(string()),
|
|
54800
|
-
/**
|
|
54801
|
-
|
|
54893
|
+
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
54894
|
+
remainingSeconds: number().int().nonnegative().nullable(),
|
|
54895
|
+
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
54896
|
+
delayedStartSeconds: number().int().nonnegative().nullable(),
|
|
54802
54897
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
54803
54898
|
progressPercent: number().min(0).max(100).nullable(),
|
|
54804
|
-
/** True when the door is reported open. */
|
|
54805
|
-
doorOpen: boolean(),
|
|
54806
|
-
/** True when
|
|
54807
|
-
|
|
54808
|
-
/**
|
|
54809
|
-
|
|
54899
|
+
/** True when the door is reported open; null when the door state is not known. */
|
|
54900
|
+
doorOpen: boolean().nullable(),
|
|
54901
|
+
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
54902
|
+
doorLocked: boolean().nullable(),
|
|
54903
|
+
/** True when remote start is allowed (door closed, power on, etc.); null when not known. */
|
|
54904
|
+
remoteStartAllowed: boolean().nullable(),
|
|
54905
|
+
/** True when the appliance accepts remote control now; null when not known. */
|
|
54906
|
+
remoteControlActive: boolean().nullable(),
|
|
54907
|
+
/** True while somebody operates the appliance at its panel; null when not reported. */
|
|
54908
|
+
localControlActive: boolean().nullable(),
|
|
54909
|
+
/** Main power / switched-on state; null when not known. */
|
|
54910
|
+
powerOn: boolean().nullable(),
|
|
54911
|
+
/** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
|
|
54912
|
+
powerState: string().nullable(),
|
|
54810
54913
|
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
54811
54914
|
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
54812
|
-
|
|
54813
|
-
|
|
54915
|
+
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
54916
|
+
halfLoad: boolean().nullable(),
|
|
54917
|
+
hygienePlus: boolean().nullable(),
|
|
54814
54918
|
/** Extra dry option when the appliance exposes it. */
|
|
54815
|
-
extraDry: boolean(),
|
|
54919
|
+
extraDry: boolean().nullable(),
|
|
54816
54920
|
/** Intensive zone (lower basket) when the appliance exposes it. */
|
|
54817
|
-
intensiveZone: boolean(),
|
|
54921
|
+
intensiveZone: boolean().nullable(),
|
|
54818
54922
|
/** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
|
|
54819
|
-
varioSpeedPlus: boolean(),
|
|
54820
|
-
/** Child lock (controls disabled on the appliance). */
|
|
54821
|
-
childLock: boolean(),
|
|
54923
|
+
varioSpeedPlus: boolean().nullable(),
|
|
54924
|
+
/** Child lock (controls disabled on the appliance); null when not known. */
|
|
54925
|
+
childLock: boolean().nullable(),
|
|
54926
|
+
/** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
|
|
54927
|
+
activeEvents: array(string()),
|
|
54928
|
+
/** Numeric error code when the appliance reports one; null otherwise. */
|
|
54822
54929
|
errorCode: number().nullable(),
|
|
54930
|
+
/** Name of the raised alert-level event while the appliance is in error; null otherwise. */
|
|
54823
54931
|
errorLabel: string().nullable(),
|
|
54932
|
+
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
54824
54933
|
lastFetchedAt: number()
|
|
54825
54934
|
});
|
|
54826
|
-
|
|
54935
|
+
var DeviceIdSchema = number().int().nonnegative();
|
|
54936
|
+
/** A value a program option or setting can take. */
|
|
54937
|
+
var DishwasherValueSchema = union([
|
|
54938
|
+
boolean(),
|
|
54939
|
+
string(),
|
|
54940
|
+
number()
|
|
54941
|
+
]);
|
|
54942
|
+
var DishwasherAccessSchema = _enum([
|
|
54943
|
+
"none",
|
|
54944
|
+
"read",
|
|
54945
|
+
"readWrite",
|
|
54946
|
+
"writeOnly",
|
|
54947
|
+
"readStatic"
|
|
54948
|
+
]);
|
|
54949
|
+
/**
|
|
54950
|
+
* One option or setting the appliance declares, with the constraints its description
|
|
54951
|
+
* gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
|
|
54952
|
+
*/
|
|
54953
|
+
var DishwasherOptionDescriptorSchema = object({
|
|
54954
|
+
/** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
|
|
54955
|
+
key: string(),
|
|
54956
|
+
/** Last segment of the key, for display. */
|
|
54957
|
+
name: string(),
|
|
54958
|
+
type: _enum([
|
|
54959
|
+
"boolean",
|
|
54960
|
+
"number",
|
|
54961
|
+
"enum",
|
|
54962
|
+
"string"
|
|
54963
|
+
]),
|
|
54964
|
+
access: DishwasherAccessSchema,
|
|
54965
|
+
/** The appliance reports this entity as currently available. */
|
|
54966
|
+
available: boolean(),
|
|
54967
|
+
/** Unit the description declares for a number; null when it declares none. */
|
|
54968
|
+
unit: string().nullable(),
|
|
54969
|
+
min: number().nullable(),
|
|
54970
|
+
max: number().nullable(),
|
|
54971
|
+
step: number().nullable(),
|
|
54972
|
+
/** Allowed members of an enum; null for other types. */
|
|
54973
|
+
enumValues: array(string()).nullable(),
|
|
54974
|
+
defaultValue: DishwasherValueSchema.nullable()
|
|
54975
|
+
});
|
|
54976
|
+
var DishwasherProgramSchema = object({
|
|
54977
|
+
/** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
|
|
54978
|
+
key: string(),
|
|
54979
|
+
name: string(),
|
|
54980
|
+
/** The appliance currently offers this program. */
|
|
54981
|
+
available: boolean(),
|
|
54982
|
+
/** The options this program lists, with the program-level access / availability / default. */
|
|
54983
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
54984
|
+
});
|
|
54985
|
+
var DishwasherOptionsSchema = object({
|
|
54986
|
+
availability: DishwasherAvailabilitySchema,
|
|
54987
|
+
/** What the appliance can be told to do, from the commands its description declares. */
|
|
54988
|
+
supportsStart: boolean(),
|
|
54989
|
+
supportsPause: boolean(),
|
|
54990
|
+
supportsResume: boolean(),
|
|
54991
|
+
supportsStop: boolean(),
|
|
54992
|
+
supportsPower: boolean(),
|
|
54993
|
+
/** Every program the description lists, with its options. */
|
|
54994
|
+
programs: array(DishwasherProgramSchema),
|
|
54995
|
+
/** Every option and setting entity the description lists (programs reference these by key). */
|
|
54996
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
54997
|
+
});
|
|
54998
|
+
DeviceType.Dishwasher, method(object({
|
|
54999
|
+
deviceId: DeviceIdSchema,
|
|
55000
|
+
program: string().min(1).optional(),
|
|
55001
|
+
options: record(string(), DishwasherValueSchema).optional()
|
|
55002
|
+
}), _void(), {
|
|
54827
55003
|
kind: "mutation",
|
|
54828
55004
|
auth: "protected"
|
|
54829
|
-
}), method(object({ deviceId:
|
|
55005
|
+
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
54830
55006
|
kind: "mutation",
|
|
54831
55007
|
auth: "protected"
|
|
54832
|
-
}), method(object({ deviceId:
|
|
55008
|
+
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55009
|
+
kind: "mutation",
|
|
55010
|
+
auth: "protected"
|
|
55011
|
+
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
54833
55012
|
kind: "mutation",
|
|
54834
55013
|
auth: "protected"
|
|
54835
55014
|
}), method(object({
|
|
54836
|
-
deviceId:
|
|
55015
|
+
deviceId: DeviceIdSchema,
|
|
54837
55016
|
program: string().min(1)
|
|
54838
55017
|
}), _void(), {
|
|
54839
55018
|
kind: "mutation",
|
|
54840
55019
|
auth: "protected"
|
|
54841
55020
|
}), method(object({
|
|
54842
|
-
deviceId:
|
|
55021
|
+
deviceId: DeviceIdSchema,
|
|
54843
55022
|
on: boolean()
|
|
54844
55023
|
}), _void(), {
|
|
54845
55024
|
kind: "mutation",
|
|
54846
55025
|
auth: "protected"
|
|
54847
55026
|
}), method(object({
|
|
54848
|
-
deviceId:
|
|
55027
|
+
deviceId: DeviceIdSchema,
|
|
54849
55028
|
on: boolean()
|
|
54850
55029
|
}), _void(), {
|
|
54851
55030
|
kind: "mutation",
|
|
54852
55031
|
auth: "protected"
|
|
54853
55032
|
}), method(object({
|
|
54854
|
-
deviceId:
|
|
55033
|
+
deviceId: DeviceIdSchema,
|
|
54855
55034
|
on: boolean()
|
|
54856
55035
|
}), _void(), {
|
|
54857
55036
|
kind: "mutation",
|
|
54858
55037
|
auth: "protected"
|
|
54859
55038
|
}), method(object({
|
|
54860
|
-
deviceId:
|
|
55039
|
+
deviceId: DeviceIdSchema,
|
|
54861
55040
|
on: boolean()
|
|
54862
55041
|
}), _void(), {
|
|
54863
55042
|
kind: "mutation",
|
|
54864
55043
|
auth: "protected"
|
|
54865
55044
|
}), method(object({
|
|
54866
|
-
deviceId:
|
|
55045
|
+
deviceId: DeviceIdSchema,
|
|
54867
55046
|
on: boolean()
|
|
54868
55047
|
}), _void(), {
|
|
54869
55048
|
kind: "mutation",
|
|
54870
55049
|
auth: "protected"
|
|
54871
55050
|
}), method(object({
|
|
54872
|
-
deviceId:
|
|
55051
|
+
deviceId: DeviceIdSchema,
|
|
54873
55052
|
on: boolean()
|
|
54874
55053
|
}), _void(), {
|
|
54875
55054
|
kind: "mutation",
|
|
54876
55055
|
auth: "protected"
|
|
54877
55056
|
}), method(object({
|
|
54878
|
-
deviceId:
|
|
55057
|
+
deviceId: DeviceIdSchema,
|
|
54879
55058
|
on: boolean()
|
|
54880
55059
|
}), _void(), {
|
|
54881
55060
|
kind: "mutation",
|
|
54882
55061
|
auth: "protected"
|
|
54883
55062
|
}), method(object({
|
|
54884
|
-
deviceId:
|
|
55063
|
+
deviceId: DeviceIdSchema,
|
|
54885
55064
|
key: string().min(1),
|
|
54886
|
-
value:
|
|
54887
|
-
boolean(),
|
|
54888
|
-
string(),
|
|
54889
|
-
number()
|
|
54890
|
-
])
|
|
55065
|
+
value: DishwasherValueSchema
|
|
54891
55066
|
}), _void(), {
|
|
54892
55067
|
kind: "mutation",
|
|
54893
55068
|
auth: "protected"
|
|
54894
|
-
});
|
|
55069
|
+
}), method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" });
|
|
54895
55070
|
object({
|
|
54896
55071
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
54897
55072
|
lastPressedAt: number().nullable(),
|
|
@@ -64951,6 +65126,12 @@ Object.freeze({
|
|
|
64951
65126
|
addonId: null,
|
|
64952
65127
|
access: "view"
|
|
64953
65128
|
},
|
|
65129
|
+
"dishwasher.getOptions": {
|
|
65130
|
+
capName: "dishwasher",
|
|
65131
|
+
capScope: "device",
|
|
65132
|
+
addonId: null,
|
|
65133
|
+
access: "view"
|
|
65134
|
+
},
|
|
64954
65135
|
"dishwasher.getStatus": {
|
|
64955
65136
|
capName: "dishwasher",
|
|
64956
65137
|
capScope: "device",
|
|
@@ -64963,6 +65144,12 @@ Object.freeze({
|
|
|
64963
65144
|
addonId: null,
|
|
64964
65145
|
access: "create"
|
|
64965
65146
|
},
|
|
65147
|
+
"dishwasher.resume": {
|
|
65148
|
+
capName: "dishwasher",
|
|
65149
|
+
capScope: "device",
|
|
65150
|
+
addonId: null,
|
|
65151
|
+
access: "create"
|
|
65152
|
+
},
|
|
64966
65153
|
"dishwasher.setChildLock": {
|
|
64967
65154
|
capName: "dishwasher",
|
|
64968
65155
|
capScope: "device",
|
|
@@ -69463,6 +69650,12 @@ Object.freeze({
|
|
|
69463
69650
|
addonId: null,
|
|
69464
69651
|
access: "view"
|
|
69465
69652
|
},
|
|
69653
|
+
"storageMigration.moverClearance": {
|
|
69654
|
+
capName: "storage-migration",
|
|
69655
|
+
capScope: "system",
|
|
69656
|
+
addonId: null,
|
|
69657
|
+
access: "view"
|
|
69658
|
+
},
|
|
69466
69659
|
"storageMigration.movers": {
|
|
69467
69660
|
capName: "storage-migration",
|
|
69468
69661
|
capScope: "system",
|
|
@@ -71656,6 +71849,11 @@ Object.freeze({
|
|
|
71656
71849
|
form: "single",
|
|
71657
71850
|
optional: false
|
|
71658
71851
|
}],
|
|
71852
|
+
"dishwasher.getOptions": [{
|
|
71853
|
+
name: "deviceId",
|
|
71854
|
+
form: "single",
|
|
71855
|
+
optional: false
|
|
71856
|
+
}],
|
|
71659
71857
|
"dishwasher.getStatus": [{
|
|
71660
71858
|
name: "deviceId",
|
|
71661
71859
|
form: "single",
|
|
@@ -71666,6 +71864,11 @@ Object.freeze({
|
|
|
71666
71864
|
form: "single",
|
|
71667
71865
|
optional: false
|
|
71668
71866
|
}],
|
|
71867
|
+
"dishwasher.resume": [{
|
|
71868
|
+
name: "deviceId",
|
|
71869
|
+
form: "single",
|
|
71870
|
+
optional: false
|
|
71871
|
+
}],
|
|
71669
71872
|
"dishwasher.setChildLock": [{
|
|
71670
71873
|
name: "deviceId",
|
|
71671
71874
|
form: "single",
|
|
@@ -73752,6 +73955,9 @@ new Map(Object.entries({
|
|
|
73752
73955
|
"wrapper-update-available": "system",
|
|
73753
73956
|
"backup-completed": "system",
|
|
73754
73957
|
"export-completed": "system",
|
|
73958
|
+
"alert-critical": "system",
|
|
73959
|
+
"alert-error": "system",
|
|
73960
|
+
"alert-critical-resolved": "system",
|
|
73755
73961
|
"storage-location-low": "system",
|
|
73756
73962
|
"storage-location-critical": "system",
|
|
73757
73963
|
"storage-location-ok": "system",
|
|
@@ -73876,6 +74082,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
73876
74082
|
"storage-location-ok"
|
|
73877
74083
|
]
|
|
73878
74084
|
},
|
|
74085
|
+
{
|
|
74086
|
+
id: "alerts",
|
|
74087
|
+
family: "system",
|
|
74088
|
+
label: "Alerts",
|
|
74089
|
+
kinds: [
|
|
74090
|
+
"alert-critical",
|
|
74091
|
+
"alert-error",
|
|
74092
|
+
"alert-critical-resolved"
|
|
74093
|
+
]
|
|
74094
|
+
},
|
|
73879
74095
|
{
|
|
73880
74096
|
id: "alarm",
|
|
73881
74097
|
family: "alarm",
|
|
@@ -73920,6 +74136,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
|
|
|
73920
74136
|
return [[descriptor.kind, field]];
|
|
73921
74137
|
})));
|
|
73922
74138
|
Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
|
|
74139
|
+
object({
|
|
74140
|
+
phase: _enum(["raised", "resolved"]),
|
|
74141
|
+
episodeId: string().min(1),
|
|
74142
|
+
alertId: string().min(1),
|
|
74143
|
+
severity: AlertSeveritySchema,
|
|
74144
|
+
category: string(),
|
|
74145
|
+
title: string(),
|
|
74146
|
+
message: string(),
|
|
74147
|
+
sourceType: string().optional(),
|
|
74148
|
+
sourceId: string().optional(),
|
|
74149
|
+
nodeId: string().optional(),
|
|
74150
|
+
/** The alert's own action link (where the operator acts on it), when it has one. */
|
|
74151
|
+
actionUrl: string().optional(),
|
|
74152
|
+
at: number()
|
|
74153
|
+
});
|
|
73923
74154
|
var RULE_BODY_ONLY = ["body"];
|
|
73924
74155
|
var RULE_TEXT = ["title", "body"];
|
|
73925
74156
|
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
@@ -73929,6 +74160,11 @@ var TANK = [
|
|
|
73929
74160
|
"device-tank-full",
|
|
73930
74161
|
"device-tank-normal"
|
|
73931
74162
|
];
|
|
74163
|
+
var ALERT_EPISODE = [
|
|
74164
|
+
"alert-critical",
|
|
74165
|
+
"alert-error",
|
|
74166
|
+
"alert-critical-resolved"
|
|
74167
|
+
];
|
|
73932
74168
|
var UPDATES = [
|
|
73933
74169
|
"addon-update-available",
|
|
73934
74170
|
"server-update-available",
|
|
@@ -74121,14 +74357,14 @@ var STATE_SUMMARY_VARS = [
|
|
|
74121
74357
|
([...RULE_TEXT], [...CONSUMABLE]),
|
|
74122
74358
|
([...RULE_TEXT], [...TANK]),
|
|
74123
74359
|
[...RULE_TEXT],
|
|
74124
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
74125
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
74126
|
-
[...RULE_TEXT],
|
|
74360
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
74361
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
74127
74362
|
[...RULE_TEXT],
|
|
74128
74363
|
[...RULE_TEXT],
|
|
74129
74364
|
[...RULE_TEXT],
|
|
74130
74365
|
[...RULE_TEXT],
|
|
74131
74366
|
[...RULE_TEXT],
|
|
74367
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74132
74368
|
[...RULE_TEXT],
|
|
74133
74369
|
[...RULE_TEXT],
|
|
74134
74370
|
[...RULE_TEXT],
|
|
@@ -74146,7 +74382,11 @@ var STATE_SUMMARY_VARS = [
|
|
|
74146
74382
|
[...RULE_TEXT],
|
|
74147
74383
|
[...RULE_TEXT],
|
|
74148
74384
|
[...RULE_TEXT],
|
|
74149
|
-
[...RULE_TEXT],
|
|
74385
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74386
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74387
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74388
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74389
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
74150
74390
|
[...RULE_TEXT],
|
|
74151
74391
|
[...RULE_TEXT],
|
|
74152
74392
|
[...RULE_TEXT],
|