@camstack/addon-provider-reolink 1.2.189 → 1.2.191

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.
Files changed (3) hide show
  1. package/dist/addon.js +493 -240
  2. package/dist/addon.mjs +493 -240
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -36,7 +36,7 @@ let node_os = require("node:os");
36
36
  node_os = require_chunk.__toESM(node_os, 1);
37
37
  let node_fs = require("node:fs");
38
38
  node_fs = require_chunk.__toESM(node_fs, 1);
39
- //#region ../types/dist/event-category-BvOFi6PY.mjs
39
+ //#region ../types/dist/event-category-DOl51-Ij.mjs
40
40
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
41
41
  EventCategory["SystemBoot"] = "system.boot";
42
42
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -115,9 +115,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
115
115
  /**
116
116
  * The node's one-shot runner boot check (D877): planned runners against the
117
117
  * process service, `degraded` when any is failed, refused or missing. The
118
- * alert centre turns it into one alert and a direct critical push.
118
+ * alert centre turns it into one critical alert.
119
119
  */
120
120
  EventCategory["SystemRunnerCheck"] = "system.runner-check";
121
+ /**
122
+ * An alert EPISODE opened or closed, emitted by the alert centre for alerts
123
+ * of severity `critical` or `error` (`AlertEpisodePayload`). The alert
124
+ * centre sends no notification of its own: Notification Center turns this
125
+ * into the `alert-critical` / `alert-error` / `alert-critical-resolved`
126
+ * system-event kinds, and reconciles from the alerts store because a bus
127
+ * event may be dropped (D8, D11).
128
+ */
129
+ EventCategory["AlertEpisode"] = "alert.episode";
121
130
  EventCategory["AddonError"] = "addon.error";
122
131
  EventCategory["AddonPageReady"] = "addon.page-ready";
123
132
  EventCategory["AddonWidgetReady"] = "addon.widget-ready";
@@ -5442,7 +5451,7 @@ var ZodIssueCode = {
5442
5451
  var ZodFirstPartyTypeKind;
5443
5452
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5444
5453
  //#endregion
5445
- //#region ../types/dist/sleep-BegKjwUu.mjs
5454
+ //#region ../types/dist/sleep-BxjU_fJM.mjs
5446
5455
  /**
5447
5456
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5448
5457
  * window to float samples (D455).
@@ -7828,6 +7837,12 @@ function normalizeAddonInitResult(result) {
7828
7837
  if (Array.isArray(result)) return { providers: result };
7829
7838
  return result;
7830
7839
  }
7840
+ /**
7841
+ * The share-view scope kinds a `csv_*` share token can carry. The hub mints
7842
+ * and validates them (`share-token.service.ts` builds its enum from this
7843
+ * list); a data plane names the kinds it ACCEPTS in `share`.
7844
+ */
7845
+ var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
7831
7846
  /** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
7832
7847
  var PeerBytesTicketSchema = object({
7833
7848
  /** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
@@ -13107,6 +13122,229 @@ var ConvertResultSchema = object({
13107
13122
  files: array(string()).readonly()
13108
13123
  })).readonly()
13109
13124
  });
13125
+ /**
13126
+ * Zod schemas for persisted record types.
13127
+ *
13128
+ * These schemas serve as the single source of truth for types that are
13129
+ * stored in the settings-store backend and retrieved via tRPC. They
13130
+ * replace the manual TypeScript interfaces with schema-derived types,
13131
+ * enabling runtime validation when reading from the backend.
13132
+ *
13133
+ * Convention: each schema is named `<Type>Schema`, the inferred TS type
13134
+ * keeps the original name for backward compatibility.
13135
+ */
13136
+ /**
13137
+ * Auth model (v2 — 2026-05-12 caps-only):
13138
+ *
13139
+ * Two principals:
13140
+ * - `isAdmin: true` — full bypass. Admin scope set is ignored.
13141
+ * - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
13142
+ *
13143
+ * No role enum. There used to be `viewer / agent / scoped` and earlier
13144
+ * `super_admin` — collapsed onto the single boolean because every
13145
+ * non-admin caller is governed by the same scope-check rules; the
13146
+ * distinction was only ever used to route role-specific procedures
13147
+ * which we no longer have. CLI / webhook integrations are `cst_*` tokens
13148
+ * with `isAdmin: false` + an explicit scope list.
13149
+ */
13150
+ /** Per-method access flavour. Materialised on every cap method via codegen. */
13151
+ var MethodAccessSchema = _enum([
13152
+ "view",
13153
+ "create",
13154
+ "delete"
13155
+ ]);
13156
+ /**
13157
+ * A single scope grant. Three forms — checked in matcher with OR
13158
+ * semantics; the first match decides whether the call passes:
13159
+ *
13160
+ * - `category` — broadest. `target: 'device' | 'system'` selects every
13161
+ * cap with the matching `scope` declaration. New caps inherit grants
13162
+ * automatically — adding a device cap to the codebase makes it
13163
+ * reachable to every user with `category:device [...]` without a
13164
+ * re-grant. Use this for "family viewer" / "operator" tiers.
13165
+ *
13166
+ * - `addon` — every cap that ships inside a given addon id. Niche;
13167
+ * useful when an integration needs to interact with one specific
13168
+ * addon's surface regardless of how many caps it exports.
13169
+ *
13170
+ * - `capability` — the most precise form. Single cap name. Use for
13171
+ * integration tokens where you want to grant `addons.installPackage`
13172
+ * and nothing else.
13173
+ *
13174
+ * `access` is REQUIRED with min 1 element. `admin` bypass is the
13175
+ * "give me everything" escape; there is no wildcard scope.
13176
+ */
13177
+ var AllowedProviderSchema = union([literal("*"), array(string())]);
13178
+ var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
13179
+ var CapScopeSchema = _enum(["device", "system"]);
13180
+ /**
13181
+ * DeviceSelector (scope model v3 — 2026-08-12).
13182
+ *
13183
+ * A `device` grant no longer carries a frozen list of deviceIds. It carries
13184
+ * a SELECTOR the matcher resolves against the live fleet, so the grant can be
13185
+ * DYNAMIC: a `types:['camera']` selector automatically covers a camera added
13186
+ * AFTER the grant was minted — no re-grant, no re-login.
13187
+ *
13188
+ * - `all` — every device in the deployment. The broad viewer/operator
13189
+ * lever without a `category` grant (a `category` grant also covers device
13190
+ * caps that carry no deviceId; `all` is specifically the device set).
13191
+ * - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
13192
+ * grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
13193
+ * is NOT covered until the grant is edited.
13194
+ * - `types` — every device of a `DeviceType` (e.g. every `camera`).
13195
+ * DYNAMIC. A device that changes type, or a new device of the type,
13196
+ * re-resolves on the next request.
13197
+ * - `locations` — every device whose operator-assigned `location` label is
13198
+ * in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
13199
+ * null/unset location matches NO `locations` selector.
13200
+ */
13201
+ var DeviceSelectorSchema = discriminatedUnion("kind", [
13202
+ object({ kind: literal("all") }),
13203
+ object({
13204
+ kind: literal("ids"),
13205
+ ids: array(number().int()).min(1)
13206
+ }),
13207
+ object({
13208
+ kind: literal("types"),
13209
+ types: array(_enum(DeviceType)).min(1)
13210
+ }),
13211
+ object({
13212
+ kind: literal("locations"),
13213
+ locations: array(string().min(1)).min(1)
13214
+ })
13215
+ ]);
13216
+ var DeviceTokenScopeSchema = object({
13217
+ type: literal("device"),
13218
+ /** The device SET this grant covers — resolved against the live fleet. */
13219
+ selector: DeviceSelectorSchema,
13220
+ access: array(MethodAccessSchema).min(1),
13221
+ /**
13222
+ * Whether a grant on a PARENT device transparently covers its accessory
13223
+ * CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
13224
+ * Direction is parent → children ONLY.
13225
+ *
13226
+ * Absent → the matcher DERIVES it from the access flavour: `view`
13227
+ * inherits (a camera viewer sees the camera's accessories), `create` /
13228
+ * `delete` do NOT (actuating/removing a child is an explicit act the
13229
+ * operator must grant on the child, not inherit from the parent). Set it
13230
+ * explicitly to override that default per grant.
13231
+ */
13232
+ includeLinked: boolean().optional()
13233
+ });
13234
+ /**
13235
+ * v2 → v3 lazy migration. A pre-v3 `device` grant carried
13236
+ * `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
13237
+ * `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
13238
+ * EVERY parse path — stored records AND the JWT-carried scope arrays
13239
+ * normalised at the request boundary ({@link normalizeTokenScopes} in
13240
+ * `device-selector.ts`). Chosen over a one-time DB migration because a
13241
+ * migration cannot reach a JWT already in a client's hands; parse-time
13242
+ * migration covers both without a flag day. No cast — the raw object is read
13243
+ * through `Reflect.get` (its static type is `unknown`).
13244
+ */
13245
+ function migrateLegacyTokenScope(raw) {
13246
+ if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
13247
+ if (Reflect.get(raw, "type") !== "device") return raw;
13248
+ if (Reflect.get(raw, "selector") !== void 0) return raw;
13249
+ const targets = Reflect.get(raw, "targets");
13250
+ if (!Array.isArray(targets)) return raw;
13251
+ return {
13252
+ type: "device",
13253
+ selector: {
13254
+ kind: "ids",
13255
+ ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
13256
+ },
13257
+ access: Reflect.get(raw, "access")
13258
+ };
13259
+ }
13260
+ var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
13261
+ object({
13262
+ type: literal("category"),
13263
+ target: CapScopeSchema,
13264
+ access: array(MethodAccessSchema).min(1)
13265
+ }),
13266
+ object({
13267
+ type: literal("capability"),
13268
+ target: string(),
13269
+ access: array(MethodAccessSchema).min(1)
13270
+ }),
13271
+ object({
13272
+ type: literal("addon"),
13273
+ target: string(),
13274
+ access: array(MethodAccessSchema).min(1)
13275
+ }),
13276
+ DeviceTokenScopeSchema
13277
+ ]));
13278
+ object({
13279
+ id: string(),
13280
+ username: string(),
13281
+ passwordHash: string(),
13282
+ /**
13283
+ * Admin bypass. When true, the middleware skips the scope-access
13284
+ * check entirely. There is no other axis of privilege; the legacy
13285
+ * role enum collapsed onto this boolean in v2.
13286
+ */
13287
+ isAdmin: boolean().default(false),
13288
+ allowedProviders: AllowedProviderSchema,
13289
+ allowedDevices: AllowedDevicesSchema,
13290
+ /**
13291
+ * Scopes granted to this user. Admins bypass; their `scopes` is
13292
+ * ignored. Non-admins without scopes are locked out of every
13293
+ * protected call.
13294
+ */
13295
+ scopes: array(TokenScopeSchema).default([]),
13296
+ createdAt: number(),
13297
+ updatedAt: number()
13298
+ });
13299
+ object({
13300
+ id: string(),
13301
+ label: string(),
13302
+ isAdmin: boolean().default(false),
13303
+ allowedProviders: AllowedProviderSchema,
13304
+ allowedDevices: AllowedDevicesSchema,
13305
+ tokenHash: string(),
13306
+ tokenPrefix: string(),
13307
+ createdAt: number(),
13308
+ lastUsedAt: number().optional()
13309
+ });
13310
+ object({
13311
+ id: string(),
13312
+ userId: string(),
13313
+ name: string(),
13314
+ tokenHash: string(),
13315
+ tokenPrefix: string(),
13316
+ scopes: array(TokenScopeSchema),
13317
+ expiresAt: number().nullish(),
13318
+ lastUsedAt: number().nullish(),
13319
+ createdAt: number()
13320
+ });
13321
+ /** What a share-view grant lets its holder see. */
13322
+ var ShareViewGrantSchema = object({
13323
+ kind: _enum(SHARE_VIEW_KINDS),
13324
+ deviceIds: array(number().int().nonnegative()).min(1).max(64),
13325
+ /** Talk-back, opt-in at mint time; absent means off. */
13326
+ talk: boolean().optional()
13327
+ });
13328
+ var ShareViewScopeSchema = object({
13329
+ type: literal("share-view"),
13330
+ grant: ShareViewGrantSchema
13331
+ });
13332
+ var AddonRoutesScopeSchema = object({
13333
+ type: literal("addon-routes"),
13334
+ access: array(MethodAccessSchema).min(1)
13335
+ });
13336
+ var CredentialScopeSchema = union([
13337
+ literal("*"),
13338
+ ShareViewScopeSchema,
13339
+ AddonRoutesScopeSchema,
13340
+ TokenScopeSchema
13341
+ ]);
13342
+ object({
13343
+ kind: literal("credential"),
13344
+ sub: string().min(1),
13345
+ jti: string().min(16),
13346
+ scopes: array(CredentialScopeSchema).min(1)
13347
+ });
13110
13348
  _enum(["new-session", "step-up"]);
13111
13349
  /** The languages the hub's app landing pages are written in (D858). */
13112
13350
  var AppPageLangSchema = _enum(["en", "it"]);
@@ -13823,7 +14061,14 @@ var AlertSeveritySchema = _enum([
13823
14061
  ]);
13824
14062
  var AlertActionSchema = object({
13825
14063
  label: string(),
13826
- href: string().optional()
14064
+ href: string().optional(),
14065
+ /**
14066
+ * How `href` is followed. Absent / `app`: an admin-ui route (client-side).
14067
+ * `server`: a route the HUB serves (an addon HTTP route such as an OAuth
14068
+ * start) — the browser must leave the SPA with a full navigation, because
14069
+ * the SPA has no such route and would bounce to the home page.
14070
+ */
14071
+ navigation: _enum(["app", "server"]).optional()
13827
14072
  });
13828
14073
  var AlertStatusSchema = _enum([
13829
14074
  "active",
@@ -42692,6 +42937,9 @@ var NcSystemEventKindSchema = _enum([
42692
42937
  "server-updated",
42693
42938
  "export-completed",
42694
42939
  "backup-completed",
42940
+ "alert-critical",
42941
+ "alert-error",
42942
+ "alert-critical-resolved",
42695
42943
  "camera-online",
42696
42944
  "camera-offline",
42697
42945
  "camera-disabled",
@@ -44727,202 +44975,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
44727
44975
  auth: "admin"
44728
44976
  }), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
44729
44977
  /**
44730
- * Zod schemas for persisted record types.
44731
- *
44732
- * These schemas serve as the single source of truth for types that are
44733
- * stored in the settings-store backend and retrieved via tRPC. They
44734
- * replace the manual TypeScript interfaces with schema-derived types,
44735
- * enabling runtime validation when reading from the backend.
44736
- *
44737
- * Convention: each schema is named `<Type>Schema`, the inferred TS type
44738
- * keeps the original name for backward compatibility.
44739
- */
44740
- /**
44741
- * Auth model (v2 — 2026-05-12 caps-only):
44742
- *
44743
- * Two principals:
44744
- * - `isAdmin: true` — full bypass. Admin scope set is ignored.
44745
- * - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
44746
- *
44747
- * No role enum. There used to be `viewer / agent / scoped` and earlier
44748
- * `super_admin` — collapsed onto the single boolean because every
44749
- * non-admin caller is governed by the same scope-check rules; the
44750
- * distinction was only ever used to route role-specific procedures
44751
- * which we no longer have. CLI / webhook integrations are `cst_*` tokens
44752
- * with `isAdmin: false` + an explicit scope list.
44753
- */
44754
- /** Per-method access flavour. Materialised on every cap method via codegen. */
44755
- var MethodAccessSchema = _enum([
44756
- "view",
44757
- "create",
44758
- "delete"
44759
- ]);
44760
- /**
44761
- * A single scope grant. Three forms — checked in matcher with OR
44762
- * semantics; the first match decides whether the call passes:
44763
- *
44764
- * - `category` — broadest. `target: 'device' | 'system'` selects every
44765
- * cap with the matching `scope` declaration. New caps inherit grants
44766
- * automatically — adding a device cap to the codebase makes it
44767
- * reachable to every user with `category:device [...]` without a
44768
- * re-grant. Use this for "family viewer" / "operator" tiers.
44769
- *
44770
- * - `addon` — every cap that ships inside a given addon id. Niche;
44771
- * useful when an integration needs to interact with one specific
44772
- * addon's surface regardless of how many caps it exports.
44773
- *
44774
- * - `capability` — the most precise form. Single cap name. Use for
44775
- * integration tokens where you want to grant `addons.installPackage`
44776
- * and nothing else.
44777
- *
44778
- * `access` is REQUIRED with min 1 element. `admin` bypass is the
44779
- * "give me everything" escape; there is no wildcard scope.
44780
- */
44781
- var AllowedProviderSchema = union([literal("*"), array(string())]);
44782
- var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
44783
- var CapScopeSchema = _enum(["device", "system"]);
44784
- /**
44785
- * DeviceSelector (scope model v3 — 2026-08-12).
44786
- *
44787
- * A `device` grant no longer carries a frozen list of deviceIds. It carries
44788
- * a SELECTOR the matcher resolves against the live fleet, so the grant can be
44789
- * DYNAMIC: a `types:['camera']` selector automatically covers a camera added
44790
- * AFTER the grant was minted — no re-grant, no re-login.
44791
- *
44792
- * - `all` — every device in the deployment. The broad viewer/operator
44793
- * lever without a `category` grant (a `category` grant also covers device
44794
- * caps that carry no deviceId; `all` is specifically the device set).
44795
- * - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
44796
- * grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
44797
- * is NOT covered until the grant is edited.
44798
- * - `types` — every device of a `DeviceType` (e.g. every `camera`).
44799
- * DYNAMIC. A device that changes type, or a new device of the type,
44800
- * re-resolves on the next request.
44801
- * - `locations` — every device whose operator-assigned `location` label is
44802
- * in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
44803
- * null/unset location matches NO `locations` selector.
44804
- */
44805
- var DeviceSelectorSchema = discriminatedUnion("kind", [
44806
- object({ kind: literal("all") }),
44807
- object({
44808
- kind: literal("ids"),
44809
- ids: array(number().int()).min(1)
44810
- }),
44811
- object({
44812
- kind: literal("types"),
44813
- types: array(_enum(DeviceType)).min(1)
44814
- }),
44815
- object({
44816
- kind: literal("locations"),
44817
- locations: array(string().min(1)).min(1)
44818
- })
44819
- ]);
44820
- var DeviceTokenScopeSchema = object({
44821
- type: literal("device"),
44822
- /** The device SET this grant covers — resolved against the live fleet. */
44823
- selector: DeviceSelectorSchema,
44824
- access: array(MethodAccessSchema).min(1),
44825
- /**
44826
- * Whether a grant on a PARENT device transparently covers its accessory
44827
- * CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
44828
- * Direction is parent → children ONLY.
44829
- *
44830
- * Absent → the matcher DERIVES it from the access flavour: `view`
44831
- * inherits (a camera viewer sees the camera's accessories), `create` /
44832
- * `delete` do NOT (actuating/removing a child is an explicit act the
44833
- * operator must grant on the child, not inherit from the parent). Set it
44834
- * explicitly to override that default per grant.
44835
- */
44836
- includeLinked: boolean().optional()
44837
- });
44838
- /**
44839
- * v2 → v3 lazy migration. A pre-v3 `device` grant carried
44840
- * `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
44841
- * `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
44842
- * EVERY parse path — stored records AND the JWT-carried scope arrays
44843
- * normalised at the request boundary ({@link normalizeTokenScopes} in
44844
- * `device-selector.ts`). Chosen over a one-time DB migration because a
44845
- * migration cannot reach a JWT already in a client's hands; parse-time
44846
- * migration covers both without a flag day. No cast — the raw object is read
44847
- * through `Reflect.get` (its static type is `unknown`).
44848
- */
44849
- function migrateLegacyTokenScope(raw) {
44850
- if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
44851
- if (Reflect.get(raw, "type") !== "device") return raw;
44852
- if (Reflect.get(raw, "selector") !== void 0) return raw;
44853
- const targets = Reflect.get(raw, "targets");
44854
- if (!Array.isArray(targets)) return raw;
44855
- return {
44856
- type: "device",
44857
- selector: {
44858
- kind: "ids",
44859
- ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
44860
- },
44861
- access: Reflect.get(raw, "access")
44862
- };
44863
- }
44864
- var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
44865
- object({
44866
- type: literal("category"),
44867
- target: CapScopeSchema,
44868
- access: array(MethodAccessSchema).min(1)
44869
- }),
44870
- object({
44871
- type: literal("capability"),
44872
- target: string(),
44873
- access: array(MethodAccessSchema).min(1)
44874
- }),
44875
- object({
44876
- type: literal("addon"),
44877
- target: string(),
44878
- access: array(MethodAccessSchema).min(1)
44879
- }),
44880
- DeviceTokenScopeSchema
44881
- ]));
44882
- object({
44883
- id: string(),
44884
- username: string(),
44885
- passwordHash: string(),
44886
- /**
44887
- * Admin bypass. When true, the middleware skips the scope-access
44888
- * check entirely. There is no other axis of privilege; the legacy
44889
- * role enum collapsed onto this boolean in v2.
44890
- */
44891
- isAdmin: boolean().default(false),
44892
- allowedProviders: AllowedProviderSchema,
44893
- allowedDevices: AllowedDevicesSchema,
44894
- /**
44895
- * Scopes granted to this user. Admins bypass; their `scopes` is
44896
- * ignored. Non-admins without scopes are locked out of every
44897
- * protected call.
44898
- */
44899
- scopes: array(TokenScopeSchema).default([]),
44900
- createdAt: number(),
44901
- updatedAt: number()
44902
- });
44903
- object({
44904
- id: string(),
44905
- label: string(),
44906
- isAdmin: boolean().default(false),
44907
- allowedProviders: AllowedProviderSchema,
44908
- allowedDevices: AllowedDevicesSchema,
44909
- tokenHash: string(),
44910
- tokenPrefix: string(),
44911
- createdAt: number(),
44912
- lastUsedAt: number().optional()
44913
- });
44914
- object({
44915
- id: string(),
44916
- userId: string(),
44917
- name: string(),
44918
- tokenHash: string(),
44919
- tokenPrefix: string(),
44920
- scopes: array(TokenScopeSchema),
44921
- expiresAt: number().nullish(),
44922
- lastUsedAt: number().nullish(),
44923
- createdAt: number()
44924
- });
44925
- /**
44926
44978
  * `oauth-integration` — a collection cap by which an addon declares
44927
44979
  * itself a linkable OAuth client of the hub's core `/oauth2/*` server.
44928
44980
  * Each provider returns a static descriptor; the core enumerates them
@@ -51872,7 +51924,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
51872
51924
  }), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
51873
51925
  kind: "mutation",
51874
51926
  auth: "admin"
51875
- }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
51927
+ }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
51928
+ clear: boolean(),
51929
+ repointLocationId: string().optional()
51930
+ }), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
51876
51931
  kind: "mutation",
51877
51932
  auth: "admin"
51878
51933
  }), method(StorageCleanupInputSchema, object({ jobId: string() }), {
@@ -56546,6 +56601,11 @@ onStatusChanged: { data: object({
56546
56601
  *
56547
56602
  * `kind: 'poll'` — cloud REST APIs typically have no push channel; the
56548
56603
  * provider refreshes the slice on an interval and eagerly after commands.
56604
+ *
56605
+ * UNKNOWN IS NOT OFF. Every field the appliance reports separately is
56606
+ * nullable: `null` means "not known right now" (the appliance has not said,
56607
+ * the link is down, or the description does not carry it) and is never
56608
+ * rendered or exported as `false` / `0`. `availability` says why.
56549
56609
  */
56550
56610
  var DishwasherStateSchema = _enum([
56551
56611
  "idle",
@@ -56555,43 +56615,155 @@ var DishwasherStateSchema = _enum([
56555
56615
  "error",
56556
56616
  "unavailable"
56557
56617
  ]);
56618
+ /**
56619
+ * The appliance's own operation state, uncollapsed. `state` above is the coarse
56620
+ * view for compact surfaces; this is what the appliance said.
56621
+ */
56622
+ var DishwasherOperationStateSchema = _enum([
56623
+ "Inactive",
56624
+ "Ready",
56625
+ "DelayedStart",
56626
+ "Run",
56627
+ "Pause",
56628
+ "ActionRequired",
56629
+ "Finished",
56630
+ "Error",
56631
+ "Aborting"
56632
+ ]);
56633
+ /**
56634
+ * Why fields may be `null`:
56635
+ * - `available` — the link is up and the description is loaded;
56636
+ * - `offline` — the local link is down (values are unknown, not last-known);
56637
+ * - `description-missing` — the link is up but the appliance's description could not
56638
+ * be loaded, so its values cannot be decoded.
56639
+ */
56640
+ var DishwasherAvailabilitySchema = _enum([
56641
+ "available",
56642
+ "offline",
56643
+ "description-missing"
56644
+ ]);
56558
56645
  var DishwasherConsumableLevelSchema = _enum([
56559
56646
  "ok",
56560
56647
  "low",
56561
56648
  "empty"
56562
56649
  ]);
56563
56650
  var DishwasherStatusSchema = object({
56651
+ availability: DishwasherAvailabilitySchema,
56652
+ /** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
56564
56653
  state: DishwasherStateSchema,
56565
- /** Active program id/name, or null when none selected / unknown. */
56654
+ /** The appliance's operation state as reported; null when not known. */
56655
+ operationState: DishwasherOperationStateSchema.nullable(),
56656
+ /** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
56566
56657
  program: string().nullable(),
56567
- /** Program tokens the hardware accepts — drives the UI selector. */
56658
+ /** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
56659
+ selectedProgram: string().nullable(),
56660
+ /** Feature keys of the programs the appliance currently offers — drives the UI selector. */
56568
56661
  availablePrograms: array(string()),
56569
- /** Minutes remaining on the active cycle, or null when not running. */
56570
- remainingMinutes: number().int().nonnegative().nullable(),
56662
+ /** Seconds remaining on the active cycle, or null when not running / not known. */
56663
+ remainingSeconds: number().int().nonnegative().nullable(),
56664
+ /** Seconds the delayed start is set to (time until the cycle starts), or null. */
56665
+ delayedStartSeconds: number().int().nonnegative().nullable(),
56571
56666
  /** Cycle completion 0..100, or null when not applicable. */
56572
56667
  progressPercent: number().min(0).max(100).nullable(),
56573
- /** True when the door is reported open. */
56574
- doorOpen: boolean(),
56575
- /** True when remote start is allowed (door closed, power on, etc.). */
56576
- remoteStartAllowed: boolean(),
56577
- /** Main power / switched-on state. */
56578
- powerOn: boolean(),
56668
+ /** True when the door is reported open; null when the door state is not known. */
56669
+ doorOpen: boolean().nullable(),
56670
+ /** True when the door is latched (locked) during a cycle; null when not reported. */
56671
+ doorLocked: boolean().nullable(),
56672
+ /** True when remote start is allowed (door closed, power on, etc.); null when not known. */
56673
+ remoteStartAllowed: boolean().nullable(),
56674
+ /** True when the appliance accepts remote control now; null when not known. */
56675
+ remoteControlActive: boolean().nullable(),
56676
+ /** True while somebody operates the appliance at its panel; null when not reported. */
56677
+ localControlActive: boolean().nullable(),
56678
+ /** Main power / switched-on state; null when not known. */
56679
+ powerOn: boolean().nullable(),
56680
+ /** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
56681
+ powerState: string().nullable(),
56579
56682
  saltLevel: DishwasherConsumableLevelSchema.nullable(),
56580
56683
  rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
56581
- halfLoad: boolean(),
56582
- hygienePlus: boolean(),
56684
+ /** Option states: null when the appliance does not expose the option or has not said. */
56685
+ halfLoad: boolean().nullable(),
56686
+ hygienePlus: boolean().nullable(),
56583
56687
  /** Extra dry option when the appliance exposes it. */
56584
- extraDry: boolean(),
56688
+ extraDry: boolean().nullable(),
56585
56689
  /** Intensive zone (lower basket) when the appliance exposes it. */
56586
- intensiveZone: boolean(),
56690
+ intensiveZone: boolean().nullable(),
56587
56691
  /** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
56588
- varioSpeedPlus: boolean(),
56589
- /** Child lock (controls disabled on the appliance). */
56590
- childLock: boolean(),
56692
+ varioSpeedPlus: boolean().nullable(),
56693
+ /** Child lock (controls disabled on the appliance); null when not known. */
56694
+ childLock: boolean().nullable(),
56695
+ /** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
56696
+ activeEvents: array(string()),
56697
+ /** Numeric error code when the appliance reports one; null otherwise. */
56591
56698
  errorCode: number().nullable(),
56699
+ /** Name of the raised alert-level event while the appliance is in error; null otherwise. */
56592
56700
  errorLabel: string().nullable(),
56701
+ /** Ms epoch of the last value received from the appliance; 0 = never. */
56593
56702
  lastFetchedAt: number()
56594
56703
  });
56704
+ var DeviceIdSchema = number().int().nonnegative();
56705
+ /** A value a program option or setting can take. */
56706
+ var DishwasherValueSchema = union([
56707
+ boolean(),
56708
+ string(),
56709
+ number()
56710
+ ]);
56711
+ var DishwasherAccessSchema = _enum([
56712
+ "none",
56713
+ "read",
56714
+ "readWrite",
56715
+ "writeOnly",
56716
+ "readStatic"
56717
+ ]);
56718
+ /**
56719
+ * One option or setting the appliance declares, with the constraints its description
56720
+ * gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
56721
+ */
56722
+ var DishwasherOptionDescriptorSchema = object({
56723
+ /** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
56724
+ key: string(),
56725
+ /** Last segment of the key, for display. */
56726
+ name: string(),
56727
+ type: _enum([
56728
+ "boolean",
56729
+ "number",
56730
+ "enum",
56731
+ "string"
56732
+ ]),
56733
+ access: DishwasherAccessSchema,
56734
+ /** The appliance reports this entity as currently available. */
56735
+ available: boolean(),
56736
+ /** Unit the description declares for a number; null when it declares none. */
56737
+ unit: string().nullable(),
56738
+ min: number().nullable(),
56739
+ max: number().nullable(),
56740
+ step: number().nullable(),
56741
+ /** Allowed members of an enum; null for other types. */
56742
+ enumValues: array(string()).nullable(),
56743
+ defaultValue: DishwasherValueSchema.nullable()
56744
+ });
56745
+ var DishwasherProgramSchema = object({
56746
+ /** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
56747
+ key: string(),
56748
+ name: string(),
56749
+ /** The appliance currently offers this program. */
56750
+ available: boolean(),
56751
+ /** The options this program lists, with the program-level access / availability / default. */
56752
+ options: array(DishwasherOptionDescriptorSchema)
56753
+ });
56754
+ var DishwasherOptionsSchema = object({
56755
+ availability: DishwasherAvailabilitySchema,
56756
+ /** What the appliance can be told to do, from the commands its description declares. */
56757
+ supportsStart: boolean(),
56758
+ supportsPause: boolean(),
56759
+ supportsResume: boolean(),
56760
+ supportsStop: boolean(),
56761
+ supportsPower: boolean(),
56762
+ /** Every program the description lists, with its options. */
56763
+ programs: array(DishwasherProgramSchema),
56764
+ /** Every option and setting entity the description lists (programs reference these by key). */
56765
+ options: array(DishwasherOptionDescriptorSchema)
56766
+ });
56595
56767
  var dishwasherCapability = {
56596
56768
  name: "dishwasher",
56597
56769
  scope: "device",
@@ -56599,86 +56771,102 @@ var dishwasherCapability = {
56599
56771
  mode: "singleton",
56600
56772
  deviceTypes: [DeviceType.Dishwasher],
56601
56773
  methods: {
56602
- start: method(object({ deviceId: number().int().nonnegative() }), _void(), {
56774
+ /**
56775
+ * Start a program. Without `program` the selected one starts. `options` are
56776
+ * option feature keys; each is checked against the program's constraints.
56777
+ */
56778
+ start: method(object({
56779
+ deviceId: DeviceIdSchema,
56780
+ program: string().min(1).optional(),
56781
+ options: record(string(), DishwasherValueSchema).optional()
56782
+ }), _void(), {
56603
56783
  kind: "mutation",
56604
56784
  auth: "protected"
56605
56785
  }),
56606
- pause: method(object({ deviceId: number().int().nonnegative() }), _void(), {
56786
+ pause: method(object({ deviceId: DeviceIdSchema }), _void(), {
56607
56787
  kind: "mutation",
56608
56788
  auth: "protected"
56609
56789
  }),
56610
- stop: method(object({ deviceId: number().int().nonnegative() }), _void(), {
56790
+ resume: method(object({ deviceId: DeviceIdSchema }), _void(), {
56791
+ kind: "mutation",
56792
+ auth: "protected"
56793
+ }),
56794
+ stop: method(object({ deviceId: DeviceIdSchema }), _void(), {
56611
56795
  kind: "mutation",
56612
56796
  auth: "protected"
56613
56797
  }),
56798
+ /** Select (not start) a program; refused when the appliance does not offer it. */
56614
56799
  setProgram: method(object({
56615
- deviceId: number().int().nonnegative(),
56800
+ deviceId: DeviceIdSchema,
56616
56801
  program: string().min(1)
56617
56802
  }), _void(), {
56618
56803
  kind: "mutation",
56619
56804
  auth: "protected"
56620
56805
  }),
56621
56806
  setPower: method(object({
56622
- deviceId: number().int().nonnegative(),
56807
+ deviceId: DeviceIdSchema,
56623
56808
  on: boolean()
56624
56809
  }), _void(), {
56625
56810
  kind: "mutation",
56626
56811
  auth: "protected"
56627
56812
  }),
56628
56813
  setHalfLoad: method(object({
56629
- deviceId: number().int().nonnegative(),
56814
+ deviceId: DeviceIdSchema,
56630
56815
  on: boolean()
56631
56816
  }), _void(), {
56632
56817
  kind: "mutation",
56633
56818
  auth: "protected"
56634
56819
  }),
56635
56820
  setHygienePlus: method(object({
56636
- deviceId: number().int().nonnegative(),
56821
+ deviceId: DeviceIdSchema,
56637
56822
  on: boolean()
56638
56823
  }), _void(), {
56639
56824
  kind: "mutation",
56640
56825
  auth: "protected"
56641
56826
  }),
56642
56827
  setExtraDry: method(object({
56643
- deviceId: number().int().nonnegative(),
56828
+ deviceId: DeviceIdSchema,
56644
56829
  on: boolean()
56645
56830
  }), _void(), {
56646
56831
  kind: "mutation",
56647
56832
  auth: "protected"
56648
56833
  }),
56649
56834
  setIntensiveZone: method(object({
56650
- deviceId: number().int().nonnegative(),
56835
+ deviceId: DeviceIdSchema,
56651
56836
  on: boolean()
56652
56837
  }), _void(), {
56653
56838
  kind: "mutation",
56654
56839
  auth: "protected"
56655
56840
  }),
56656
56841
  setVarioSpeedPlus: method(object({
56657
- deviceId: number().int().nonnegative(),
56842
+ deviceId: DeviceIdSchema,
56658
56843
  on: boolean()
56659
56844
  }), _void(), {
56660
56845
  kind: "mutation",
56661
56846
  auth: "protected"
56662
56847
  }),
56663
56848
  setChildLock: method(object({
56664
- deviceId: number().int().nonnegative(),
56849
+ deviceId: DeviceIdSchema,
56665
56850
  on: boolean()
56666
56851
  }), _void(), {
56667
56852
  kind: "mutation",
56668
56853
  auth: "protected"
56669
56854
  }),
56855
+ /**
56856
+ * Write any option or setting by feature key. Refused when the description does
56857
+ * not list it, it is not writable or not available now, or the value is outside
56858
+ * its declared range / members.
56859
+ */
56670
56860
  setOption: method(object({
56671
- deviceId: number().int().nonnegative(),
56861
+ deviceId: DeviceIdSchema,
56672
56862
  key: string().min(1),
56673
- value: union([
56674
- boolean(),
56675
- string(),
56676
- number()
56677
- ])
56863
+ value: DishwasherValueSchema
56678
56864
  }), _void(), {
56679
56865
  kind: "mutation",
56680
56866
  auth: "protected"
56681
- })
56867
+ }),
56868
+ /** What this appliance can do, from its own description — the UI is derived from it. */
56869
+ getOptions: method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" })
56682
56870
  },
56683
56871
  status: {
56684
56872
  schema: DishwasherStatusSchema,
@@ -71212,6 +71400,12 @@ Object.freeze({
71212
71400
  addonId: null,
71213
71401
  access: "view"
71214
71402
  },
71403
+ "dishwasher.getOptions": {
71404
+ capName: "dishwasher",
71405
+ capScope: "device",
71406
+ addonId: null,
71407
+ access: "view"
71408
+ },
71215
71409
  "dishwasher.getStatus": {
71216
71410
  capName: "dishwasher",
71217
71411
  capScope: "device",
@@ -71224,6 +71418,12 @@ Object.freeze({
71224
71418
  addonId: null,
71225
71419
  access: "create"
71226
71420
  },
71421
+ "dishwasher.resume": {
71422
+ capName: "dishwasher",
71423
+ capScope: "device",
71424
+ addonId: null,
71425
+ access: "create"
71426
+ },
71227
71427
  "dishwasher.setChildLock": {
71228
71428
  capName: "dishwasher",
71229
71429
  capScope: "device",
@@ -75724,6 +75924,12 @@ Object.freeze({
75724
75924
  addonId: null,
75725
75925
  access: "view"
75726
75926
  },
75927
+ "storageMigration.moverClearance": {
75928
+ capName: "storage-migration",
75929
+ capScope: "system",
75930
+ addonId: null,
75931
+ access: "view"
75932
+ },
75727
75933
  "storageMigration.movers": {
75728
75934
  capName: "storage-migration",
75729
75935
  capScope: "system",
@@ -78069,6 +78275,11 @@ Object.freeze({
78069
78275
  form: "single",
78070
78276
  optional: false
78071
78277
  }],
78278
+ "dishwasher.getOptions": [{
78279
+ name: "deviceId",
78280
+ form: "single",
78281
+ optional: false
78282
+ }],
78072
78283
  "dishwasher.getStatus": [{
78073
78284
  name: "deviceId",
78074
78285
  form: "single",
@@ -78079,6 +78290,11 @@ Object.freeze({
78079
78290
  form: "single",
78080
78291
  optional: false
78081
78292
  }],
78293
+ "dishwasher.resume": [{
78294
+ name: "deviceId",
78295
+ form: "single",
78296
+ optional: false
78297
+ }],
78082
78298
  "dishwasher.setChildLock": [{
78083
78299
  name: "deviceId",
78084
78300
  form: "single",
@@ -80165,6 +80381,9 @@ new Map(Object.entries({
80165
80381
  "wrapper-update-available": "system",
80166
80382
  "backup-completed": "system",
80167
80383
  "export-completed": "system",
80384
+ "alert-critical": "system",
80385
+ "alert-error": "system",
80386
+ "alert-critical-resolved": "system",
80168
80387
  "storage-location-low": "system",
80169
80388
  "storage-location-critical": "system",
80170
80389
  "storage-location-ok": "system",
@@ -80289,6 +80508,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
80289
80508
  "storage-location-ok"
80290
80509
  ]
80291
80510
  },
80511
+ {
80512
+ id: "alerts",
80513
+ family: "system",
80514
+ label: "Alerts",
80515
+ kinds: [
80516
+ "alert-critical",
80517
+ "alert-error",
80518
+ "alert-critical-resolved"
80519
+ ]
80520
+ },
80292
80521
  {
80293
80522
  id: "alarm",
80294
80523
  family: "alarm",
@@ -80333,6 +80562,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
80333
80562
  return [[descriptor.kind, field]];
80334
80563
  })));
80335
80564
  Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
80565
+ object({
80566
+ phase: _enum(["raised", "resolved"]),
80567
+ episodeId: string().min(1),
80568
+ alertId: string().min(1),
80569
+ severity: AlertSeveritySchema,
80570
+ category: string(),
80571
+ title: string(),
80572
+ message: string(),
80573
+ sourceType: string().optional(),
80574
+ sourceId: string().optional(),
80575
+ nodeId: string().optional(),
80576
+ /** The alert's own action link (where the operator acts on it), when it has one. */
80577
+ actionUrl: string().optional(),
80578
+ at: number()
80579
+ });
80336
80580
  var RULE_BODY_ONLY = ["body"];
80337
80581
  var RULE_TEXT = ["title", "body"];
80338
80582
  var BATTERY = ["device-battery-low", "device-battery-normal"];
@@ -80342,6 +80586,11 @@ var TANK = [
80342
80586
  "device-tank-full",
80343
80587
  "device-tank-normal"
80344
80588
  ];
80589
+ var ALERT_EPISODE = [
80590
+ "alert-critical",
80591
+ "alert-error",
80592
+ "alert-critical-resolved"
80593
+ ];
80345
80594
  var UPDATES = [
80346
80595
  "addon-update-available",
80347
80596
  "server-update-available",
@@ -80534,14 +80783,14 @@ var STATE_SUMMARY_VARS = [
80534
80783
  ([...RULE_TEXT], [...CONSUMABLE]),
80535
80784
  ([...RULE_TEXT], [...TANK]),
80536
80785
  [...RULE_TEXT],
80537
- ([...RULE_TEXT], [...UPDATES]),
80538
- ([...RULE_TEXT], [...UPDATES]),
80539
- [...RULE_TEXT],
80786
+ ([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
80787
+ ([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
80540
80788
  [...RULE_TEXT],
80541
80789
  [...RULE_TEXT],
80542
80790
  [...RULE_TEXT],
80543
80791
  [...RULE_TEXT],
80544
80792
  [...RULE_TEXT],
80793
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
80545
80794
  [...RULE_TEXT],
80546
80795
  [...RULE_TEXT],
80547
80796
  [...RULE_TEXT],
@@ -80559,7 +80808,11 @@ var STATE_SUMMARY_VARS = [
80559
80808
  [...RULE_TEXT],
80560
80809
  [...RULE_TEXT],
80561
80810
  [...RULE_TEXT],
80562
- [...RULE_TEXT],
80811
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
80812
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
80813
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
80814
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
80815
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
80563
80816
  [...RULE_TEXT],
80564
80817
  [...RULE_TEXT],
80565
80818
  [...RULE_TEXT],