@camstack/addon-export-hap 1.2.160 → 1.2.162

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.
@@ -49,7 +49,7 @@ let node_fs_promises = require("node:fs/promises");
49
49
  node_fs_promises = __toESM(node_fs_promises, 1);
50
50
  let node_events = require("node:events");
51
51
  let node_dgram = require("node:dgram");
52
- //#region ../types/dist/event-category-BvOFi6PY.mjs
52
+ //#region ../types/dist/event-category-DOl51-Ij.mjs
53
53
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
54
54
  EventCategory["SystemBoot"] = "system.boot";
55
55
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -128,9 +128,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
128
128
  /**
129
129
  * The node's one-shot runner boot check (D877): planned runners against the
130
130
  * process service, `degraded` when any is failed, refused or missing. The
131
- * alert centre turns it into one alert and a direct critical push.
131
+ * alert centre turns it into one critical alert.
132
132
  */
133
133
  EventCategory["SystemRunnerCheck"] = "system.runner-check";
134
+ /**
135
+ * An alert EPISODE opened or closed, emitted by the alert centre for alerts
136
+ * of severity `critical` or `error` (`AlertEpisodePayload`). The alert
137
+ * centre sends no notification of its own: Notification Center turns this
138
+ * into the `alert-critical` / `alert-error` / `alert-critical-resolved`
139
+ * system-event kinds, and reconciles from the alerts store because a bus
140
+ * event may be dropped (D8, D11).
141
+ */
142
+ EventCategory["AlertEpisode"] = "alert.episode";
134
143
  EventCategory["AddonError"] = "addon.error";
135
144
  EventCategory["AddonPageReady"] = "addon.page-ready";
136
145
  EventCategory["AddonWidgetReady"] = "addon.widget-ready";
@@ -5455,7 +5464,7 @@ var ZodIssueCode = {
5455
5464
  var ZodFirstPartyTypeKind;
5456
5465
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5457
5466
  //#endregion
5458
- //#region ../types/dist/sleep-BegKjwUu.mjs
5467
+ //#region ../types/dist/sleep-BxjU_fJM.mjs
5459
5468
  /**
5460
5469
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5461
5470
  * window to float samples (D455).
@@ -7837,6 +7846,12 @@ function normalizeAddonInitResult(result) {
7837
7846
  if (Array.isArray(result)) return { providers: result };
7838
7847
  return result;
7839
7848
  }
7849
+ /**
7850
+ * The share-view scope kinds a `csv_*` share token can carry. The hub mints
7851
+ * and validates them (`share-token.service.ts` builds its enum from this
7852
+ * list); a data plane names the kinds it ACCEPTS in `share`.
7853
+ */
7854
+ var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
7840
7855
  /** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
7841
7856
  var PeerBytesTicketSchema = object({
7842
7857
  /** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
@@ -13309,6 +13324,229 @@ var ConvertResultSchema = object({
13309
13324
  files: array(string()).readonly()
13310
13325
  })).readonly()
13311
13326
  });
13327
+ /**
13328
+ * Zod schemas for persisted record types.
13329
+ *
13330
+ * These schemas serve as the single source of truth for types that are
13331
+ * stored in the settings-store backend and retrieved via tRPC. They
13332
+ * replace the manual TypeScript interfaces with schema-derived types,
13333
+ * enabling runtime validation when reading from the backend.
13334
+ *
13335
+ * Convention: each schema is named `<Type>Schema`, the inferred TS type
13336
+ * keeps the original name for backward compatibility.
13337
+ */
13338
+ /**
13339
+ * Auth model (v2 — 2026-05-12 caps-only):
13340
+ *
13341
+ * Two principals:
13342
+ * - `isAdmin: true` — full bypass. Admin scope set is ignored.
13343
+ * - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
13344
+ *
13345
+ * No role enum. There used to be `viewer / agent / scoped` and earlier
13346
+ * `super_admin` — collapsed onto the single boolean because every
13347
+ * non-admin caller is governed by the same scope-check rules; the
13348
+ * distinction was only ever used to route role-specific procedures
13349
+ * which we no longer have. CLI / webhook integrations are `cst_*` tokens
13350
+ * with `isAdmin: false` + an explicit scope list.
13351
+ */
13352
+ /** Per-method access flavour. Materialised on every cap method via codegen. */
13353
+ var MethodAccessSchema = _enum([
13354
+ "view",
13355
+ "create",
13356
+ "delete"
13357
+ ]);
13358
+ /**
13359
+ * A single scope grant. Three forms — checked in matcher with OR
13360
+ * semantics; the first match decides whether the call passes:
13361
+ *
13362
+ * - `category` — broadest. `target: 'device' | 'system'` selects every
13363
+ * cap with the matching `scope` declaration. New caps inherit grants
13364
+ * automatically — adding a device cap to the codebase makes it
13365
+ * reachable to every user with `category:device [...]` without a
13366
+ * re-grant. Use this for "family viewer" / "operator" tiers.
13367
+ *
13368
+ * - `addon` — every cap that ships inside a given addon id. Niche;
13369
+ * useful when an integration needs to interact with one specific
13370
+ * addon's surface regardless of how many caps it exports.
13371
+ *
13372
+ * - `capability` — the most precise form. Single cap name. Use for
13373
+ * integration tokens where you want to grant `addons.installPackage`
13374
+ * and nothing else.
13375
+ *
13376
+ * `access` is REQUIRED with min 1 element. `admin` bypass is the
13377
+ * "give me everything" escape; there is no wildcard scope.
13378
+ */
13379
+ var AllowedProviderSchema = union([literal("*"), array(string())]);
13380
+ var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
13381
+ var CapScopeSchema = _enum(["device", "system"]);
13382
+ /**
13383
+ * DeviceSelector (scope model v3 — 2026-08-12).
13384
+ *
13385
+ * A `device` grant no longer carries a frozen list of deviceIds. It carries
13386
+ * a SELECTOR the matcher resolves against the live fleet, so the grant can be
13387
+ * DYNAMIC: a `types:['camera']` selector automatically covers a camera added
13388
+ * AFTER the grant was minted — no re-grant, no re-login.
13389
+ *
13390
+ * - `all` — every device in the deployment. The broad viewer/operator
13391
+ * lever without a `category` grant (a `category` grant also covers device
13392
+ * caps that carry no deviceId; `all` is specifically the device set).
13393
+ * - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
13394
+ * grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
13395
+ * is NOT covered until the grant is edited.
13396
+ * - `types` — every device of a `DeviceType` (e.g. every `camera`).
13397
+ * DYNAMIC. A device that changes type, or a new device of the type,
13398
+ * re-resolves on the next request.
13399
+ * - `locations` — every device whose operator-assigned `location` label is
13400
+ * in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
13401
+ * null/unset location matches NO `locations` selector.
13402
+ */
13403
+ var DeviceSelectorSchema = discriminatedUnion("kind", [
13404
+ object({ kind: literal("all") }),
13405
+ object({
13406
+ kind: literal("ids"),
13407
+ ids: array(number().int()).min(1)
13408
+ }),
13409
+ object({
13410
+ kind: literal("types"),
13411
+ types: array(_enum(DeviceType)).min(1)
13412
+ }),
13413
+ object({
13414
+ kind: literal("locations"),
13415
+ locations: array(string().min(1)).min(1)
13416
+ })
13417
+ ]);
13418
+ var DeviceTokenScopeSchema = object({
13419
+ type: literal("device"),
13420
+ /** The device SET this grant covers — resolved against the live fleet. */
13421
+ selector: DeviceSelectorSchema,
13422
+ access: array(MethodAccessSchema).min(1),
13423
+ /**
13424
+ * Whether a grant on a PARENT device transparently covers its accessory
13425
+ * CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
13426
+ * Direction is parent → children ONLY.
13427
+ *
13428
+ * Absent → the matcher DERIVES it from the access flavour: `view`
13429
+ * inherits (a camera viewer sees the camera's accessories), `create` /
13430
+ * `delete` do NOT (actuating/removing a child is an explicit act the
13431
+ * operator must grant on the child, not inherit from the parent). Set it
13432
+ * explicitly to override that default per grant.
13433
+ */
13434
+ includeLinked: boolean().optional()
13435
+ });
13436
+ /**
13437
+ * v2 → v3 lazy migration. A pre-v3 `device` grant carried
13438
+ * `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
13439
+ * `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
13440
+ * EVERY parse path — stored records AND the JWT-carried scope arrays
13441
+ * normalised at the request boundary ({@link normalizeTokenScopes} in
13442
+ * `device-selector.ts`). Chosen over a one-time DB migration because a
13443
+ * migration cannot reach a JWT already in a client's hands; parse-time
13444
+ * migration covers both without a flag day. No cast — the raw object is read
13445
+ * through `Reflect.get` (its static type is `unknown`).
13446
+ */
13447
+ function migrateLegacyTokenScope(raw) {
13448
+ if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
13449
+ if (Reflect.get(raw, "type") !== "device") return raw;
13450
+ if (Reflect.get(raw, "selector") !== void 0) return raw;
13451
+ const targets = Reflect.get(raw, "targets");
13452
+ if (!Array.isArray(targets)) return raw;
13453
+ return {
13454
+ type: "device",
13455
+ selector: {
13456
+ kind: "ids",
13457
+ ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
13458
+ },
13459
+ access: Reflect.get(raw, "access")
13460
+ };
13461
+ }
13462
+ var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
13463
+ object({
13464
+ type: literal("category"),
13465
+ target: CapScopeSchema,
13466
+ access: array(MethodAccessSchema).min(1)
13467
+ }),
13468
+ object({
13469
+ type: literal("capability"),
13470
+ target: string(),
13471
+ access: array(MethodAccessSchema).min(1)
13472
+ }),
13473
+ object({
13474
+ type: literal("addon"),
13475
+ target: string(),
13476
+ access: array(MethodAccessSchema).min(1)
13477
+ }),
13478
+ DeviceTokenScopeSchema
13479
+ ]));
13480
+ object({
13481
+ id: string(),
13482
+ username: string(),
13483
+ passwordHash: string(),
13484
+ /**
13485
+ * Admin bypass. When true, the middleware skips the scope-access
13486
+ * check entirely. There is no other axis of privilege; the legacy
13487
+ * role enum collapsed onto this boolean in v2.
13488
+ */
13489
+ isAdmin: boolean().default(false),
13490
+ allowedProviders: AllowedProviderSchema,
13491
+ allowedDevices: AllowedDevicesSchema,
13492
+ /**
13493
+ * Scopes granted to this user. Admins bypass; their `scopes` is
13494
+ * ignored. Non-admins without scopes are locked out of every
13495
+ * protected call.
13496
+ */
13497
+ scopes: array(TokenScopeSchema).default([]),
13498
+ createdAt: number(),
13499
+ updatedAt: number()
13500
+ });
13501
+ object({
13502
+ id: string(),
13503
+ label: string(),
13504
+ isAdmin: boolean().default(false),
13505
+ allowedProviders: AllowedProviderSchema,
13506
+ allowedDevices: AllowedDevicesSchema,
13507
+ tokenHash: string(),
13508
+ tokenPrefix: string(),
13509
+ createdAt: number(),
13510
+ lastUsedAt: number().optional()
13511
+ });
13512
+ object({
13513
+ id: string(),
13514
+ userId: string(),
13515
+ name: string(),
13516
+ tokenHash: string(),
13517
+ tokenPrefix: string(),
13518
+ scopes: array(TokenScopeSchema),
13519
+ expiresAt: number().nullish(),
13520
+ lastUsedAt: number().nullish(),
13521
+ createdAt: number()
13522
+ });
13523
+ /** What a share-view grant lets its holder see. */
13524
+ var ShareViewGrantSchema = object({
13525
+ kind: _enum(SHARE_VIEW_KINDS),
13526
+ deviceIds: array(number().int().nonnegative()).min(1).max(64),
13527
+ /** Talk-back, opt-in at mint time; absent means off. */
13528
+ talk: boolean().optional()
13529
+ });
13530
+ var ShareViewScopeSchema = object({
13531
+ type: literal("share-view"),
13532
+ grant: ShareViewGrantSchema
13533
+ });
13534
+ var AddonRoutesScopeSchema = object({
13535
+ type: literal("addon-routes"),
13536
+ access: array(MethodAccessSchema).min(1)
13537
+ });
13538
+ var CredentialScopeSchema = union([
13539
+ literal("*"),
13540
+ ShareViewScopeSchema,
13541
+ AddonRoutesScopeSchema,
13542
+ TokenScopeSchema
13543
+ ]);
13544
+ object({
13545
+ kind: literal("credential"),
13546
+ sub: string().min(1),
13547
+ jti: string().min(16),
13548
+ scopes: array(CredentialScopeSchema).min(1)
13549
+ });
13312
13550
  _enum(["new-session", "step-up"]);
13313
13551
  /** The languages the hub's app landing pages are written in (D858). */
13314
13552
  var AppPageLangSchema = _enum(["en", "it"]);
@@ -14025,7 +14263,14 @@ var AlertSeveritySchema = _enum([
14025
14263
  ]);
14026
14264
  var AlertActionSchema = object({
14027
14265
  label: string(),
14028
- href: string().optional()
14266
+ href: string().optional(),
14267
+ /**
14268
+ * How `href` is followed. Absent / `app`: an admin-ui route (client-side).
14269
+ * `server`: a route the HUB serves (an addon HTTP route such as an OAuth
14270
+ * start) — the browser must leave the SPA with a full navigation, because
14271
+ * the SPA has no such route and would bounce to the home page.
14272
+ */
14273
+ navigation: _enum(["app", "server"]).optional()
14029
14274
  });
14030
14275
  var AlertStatusSchema = _enum([
14031
14276
  "active",
@@ -42482,6 +42727,9 @@ var NcSystemEventKindSchema = _enum([
42482
42727
  "server-updated",
42483
42728
  "export-completed",
42484
42729
  "backup-completed",
42730
+ "alert-critical",
42731
+ "alert-error",
42732
+ "alert-critical-resolved",
42485
42733
  "camera-online",
42486
42734
  "camera-offline",
42487
42735
  "camera-disabled",
@@ -44517,202 +44765,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
44517
44765
  auth: "admin"
44518
44766
  }), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
44519
44767
  /**
44520
- * Zod schemas for persisted record types.
44521
- *
44522
- * These schemas serve as the single source of truth for types that are
44523
- * stored in the settings-store backend and retrieved via tRPC. They
44524
- * replace the manual TypeScript interfaces with schema-derived types,
44525
- * enabling runtime validation when reading from the backend.
44526
- *
44527
- * Convention: each schema is named `<Type>Schema`, the inferred TS type
44528
- * keeps the original name for backward compatibility.
44529
- */
44530
- /**
44531
- * Auth model (v2 — 2026-05-12 caps-only):
44532
- *
44533
- * Two principals:
44534
- * - `isAdmin: true` — full bypass. Admin scope set is ignored.
44535
- * - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
44536
- *
44537
- * No role enum. There used to be `viewer / agent / scoped` and earlier
44538
- * `super_admin` — collapsed onto the single boolean because every
44539
- * non-admin caller is governed by the same scope-check rules; the
44540
- * distinction was only ever used to route role-specific procedures
44541
- * which we no longer have. CLI / webhook integrations are `cst_*` tokens
44542
- * with `isAdmin: false` + an explicit scope list.
44543
- */
44544
- /** Per-method access flavour. Materialised on every cap method via codegen. */
44545
- var MethodAccessSchema = _enum([
44546
- "view",
44547
- "create",
44548
- "delete"
44549
- ]);
44550
- /**
44551
- * A single scope grant. Three forms — checked in matcher with OR
44552
- * semantics; the first match decides whether the call passes:
44553
- *
44554
- * - `category` — broadest. `target: 'device' | 'system'` selects every
44555
- * cap with the matching `scope` declaration. New caps inherit grants
44556
- * automatically — adding a device cap to the codebase makes it
44557
- * reachable to every user with `category:device [...]` without a
44558
- * re-grant. Use this for "family viewer" / "operator" tiers.
44559
- *
44560
- * - `addon` — every cap that ships inside a given addon id. Niche;
44561
- * useful when an integration needs to interact with one specific
44562
- * addon's surface regardless of how many caps it exports.
44563
- *
44564
- * - `capability` — the most precise form. Single cap name. Use for
44565
- * integration tokens where you want to grant `addons.installPackage`
44566
- * and nothing else.
44567
- *
44568
- * `access` is REQUIRED with min 1 element. `admin` bypass is the
44569
- * "give me everything" escape; there is no wildcard scope.
44570
- */
44571
- var AllowedProviderSchema = union([literal("*"), array(string())]);
44572
- var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
44573
- var CapScopeSchema = _enum(["device", "system"]);
44574
- /**
44575
- * DeviceSelector (scope model v3 — 2026-08-12).
44576
- *
44577
- * A `device` grant no longer carries a frozen list of deviceIds. It carries
44578
- * a SELECTOR the matcher resolves against the live fleet, so the grant can be
44579
- * DYNAMIC: a `types:['camera']` selector automatically covers a camera added
44580
- * AFTER the grant was minted — no re-grant, no re-login.
44581
- *
44582
- * - `all` — every device in the deployment. The broad viewer/operator
44583
- * lever without a `category` grant (a `category` grant also covers device
44584
- * caps that carry no deviceId; `all` is specifically the device set).
44585
- * - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
44586
- * grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
44587
- * is NOT covered until the grant is edited.
44588
- * - `types` — every device of a `DeviceType` (e.g. every `camera`).
44589
- * DYNAMIC. A device that changes type, or a new device of the type,
44590
- * re-resolves on the next request.
44591
- * - `locations` — every device whose operator-assigned `location` label is
44592
- * in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
44593
- * null/unset location matches NO `locations` selector.
44594
- */
44595
- var DeviceSelectorSchema = discriminatedUnion("kind", [
44596
- object({ kind: literal("all") }),
44597
- object({
44598
- kind: literal("ids"),
44599
- ids: array(number().int()).min(1)
44600
- }),
44601
- object({
44602
- kind: literal("types"),
44603
- types: array(_enum(DeviceType)).min(1)
44604
- }),
44605
- object({
44606
- kind: literal("locations"),
44607
- locations: array(string().min(1)).min(1)
44608
- })
44609
- ]);
44610
- var DeviceTokenScopeSchema = object({
44611
- type: literal("device"),
44612
- /** The device SET this grant covers — resolved against the live fleet. */
44613
- selector: DeviceSelectorSchema,
44614
- access: array(MethodAccessSchema).min(1),
44615
- /**
44616
- * Whether a grant on a PARENT device transparently covers its accessory
44617
- * CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
44618
- * Direction is parent → children ONLY.
44619
- *
44620
- * Absent → the matcher DERIVES it from the access flavour: `view`
44621
- * inherits (a camera viewer sees the camera's accessories), `create` /
44622
- * `delete` do NOT (actuating/removing a child is an explicit act the
44623
- * operator must grant on the child, not inherit from the parent). Set it
44624
- * explicitly to override that default per grant.
44625
- */
44626
- includeLinked: boolean().optional()
44627
- });
44628
- /**
44629
- * v2 → v3 lazy migration. A pre-v3 `device` grant carried
44630
- * `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
44631
- * `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
44632
- * EVERY parse path — stored records AND the JWT-carried scope arrays
44633
- * normalised at the request boundary ({@link normalizeTokenScopes} in
44634
- * `device-selector.ts`). Chosen over a one-time DB migration because a
44635
- * migration cannot reach a JWT already in a client's hands; parse-time
44636
- * migration covers both without a flag day. No cast — the raw object is read
44637
- * through `Reflect.get` (its static type is `unknown`).
44638
- */
44639
- function migrateLegacyTokenScope(raw) {
44640
- if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
44641
- if (Reflect.get(raw, "type") !== "device") return raw;
44642
- if (Reflect.get(raw, "selector") !== void 0) return raw;
44643
- const targets = Reflect.get(raw, "targets");
44644
- if (!Array.isArray(targets)) return raw;
44645
- return {
44646
- type: "device",
44647
- selector: {
44648
- kind: "ids",
44649
- ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
44650
- },
44651
- access: Reflect.get(raw, "access")
44652
- };
44653
- }
44654
- var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
44655
- object({
44656
- type: literal("category"),
44657
- target: CapScopeSchema,
44658
- access: array(MethodAccessSchema).min(1)
44659
- }),
44660
- object({
44661
- type: literal("capability"),
44662
- target: string(),
44663
- access: array(MethodAccessSchema).min(1)
44664
- }),
44665
- object({
44666
- type: literal("addon"),
44667
- target: string(),
44668
- access: array(MethodAccessSchema).min(1)
44669
- }),
44670
- DeviceTokenScopeSchema
44671
- ]));
44672
- object({
44673
- id: string(),
44674
- username: string(),
44675
- passwordHash: string(),
44676
- /**
44677
- * Admin bypass. When true, the middleware skips the scope-access
44678
- * check entirely. There is no other axis of privilege; the legacy
44679
- * role enum collapsed onto this boolean in v2.
44680
- */
44681
- isAdmin: boolean().default(false),
44682
- allowedProviders: AllowedProviderSchema,
44683
- allowedDevices: AllowedDevicesSchema,
44684
- /**
44685
- * Scopes granted to this user. Admins bypass; their `scopes` is
44686
- * ignored. Non-admins without scopes are locked out of every
44687
- * protected call.
44688
- */
44689
- scopes: array(TokenScopeSchema).default([]),
44690
- createdAt: number(),
44691
- updatedAt: number()
44692
- });
44693
- object({
44694
- id: string(),
44695
- label: string(),
44696
- isAdmin: boolean().default(false),
44697
- allowedProviders: AllowedProviderSchema,
44698
- allowedDevices: AllowedDevicesSchema,
44699
- tokenHash: string(),
44700
- tokenPrefix: string(),
44701
- createdAt: number(),
44702
- lastUsedAt: number().optional()
44703
- });
44704
- object({
44705
- id: string(),
44706
- userId: string(),
44707
- name: string(),
44708
- tokenHash: string(),
44709
- tokenPrefix: string(),
44710
- scopes: array(TokenScopeSchema),
44711
- expiresAt: number().nullish(),
44712
- lastUsedAt: number().nullish(),
44713
- createdAt: number()
44714
- });
44715
- /**
44716
44768
  * `oauth-integration` — a collection cap by which an addon declares
44717
44769
  * itself a linkable OAuth client of the hub's core `/oauth2/*` server.
44718
44770
  * Each provider returns a static descriptor; the core enumerates them
@@ -51514,7 +51566,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
51514
51566
  }), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
51515
51567
  kind: "mutation",
51516
51568
  auth: "admin"
51517
- }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
51569
+ }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
51570
+ clear: boolean(),
51571
+ repointLocationId: string().optional()
51572
+ }), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
51518
51573
  kind: "mutation",
51519
51574
  auth: "admin"
51520
51575
  }), method(StorageCleanupInputSchema, object({ jobId: string() }), {
@@ -55162,6 +55217,11 @@ object({
55162
55217
  *
55163
55218
  * `kind: 'poll'` — cloud REST APIs typically have no push channel; the
55164
55219
  * provider refreshes the slice on an interval and eagerly after commands.
55220
+ *
55221
+ * UNKNOWN IS NOT OFF. Every field the appliance reports separately is
55222
+ * nullable: `null` means "not known right now" (the appliance has not said,
55223
+ * the link is down, or the description does not carry it) and is never
55224
+ * rendered or exported as `false` / `0`. `availability` says why.
55165
55225
  */
55166
55226
  var DishwasherStateSchema = _enum([
55167
55227
  "idle",
@@ -55171,112 +55231,227 @@ var DishwasherStateSchema = _enum([
55171
55231
  "error",
55172
55232
  "unavailable"
55173
55233
  ]);
55234
+ /**
55235
+ * The appliance's own operation state, uncollapsed. `state` above is the coarse
55236
+ * view for compact surfaces; this is what the appliance said.
55237
+ */
55238
+ var DishwasherOperationStateSchema = _enum([
55239
+ "Inactive",
55240
+ "Ready",
55241
+ "DelayedStart",
55242
+ "Run",
55243
+ "Pause",
55244
+ "ActionRequired",
55245
+ "Finished",
55246
+ "Error",
55247
+ "Aborting"
55248
+ ]);
55249
+ /**
55250
+ * Why fields may be `null`:
55251
+ * - `available` — the link is up and the description is loaded;
55252
+ * - `offline` — the local link is down (values are unknown, not last-known);
55253
+ * - `description-missing` — the link is up but the appliance's description could not
55254
+ * be loaded, so its values cannot be decoded.
55255
+ */
55256
+ var DishwasherAvailabilitySchema = _enum([
55257
+ "available",
55258
+ "offline",
55259
+ "description-missing"
55260
+ ]);
55174
55261
  var DishwasherConsumableLevelSchema = _enum([
55175
55262
  "ok",
55176
55263
  "low",
55177
55264
  "empty"
55178
55265
  ]);
55179
55266
  object({
55267
+ availability: DishwasherAvailabilitySchema,
55268
+ /** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
55180
55269
  state: DishwasherStateSchema,
55181
- /** Active program id/name, or null when none selected / unknown. */
55270
+ /** The appliance's operation state as reported; null when not known. */
55271
+ operationState: DishwasherOperationStateSchema.nullable(),
55272
+ /** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
55182
55273
  program: string().nullable(),
55183
- /** Program tokens the hardware accepts — drives the UI selector. */
55274
+ /** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
55275
+ selectedProgram: string().nullable(),
55276
+ /** Feature keys of the programs the appliance currently offers — drives the UI selector. */
55184
55277
  availablePrograms: array(string()),
55185
- /** Minutes remaining on the active cycle, or null when not running. */
55186
- remainingMinutes: number().int().nonnegative().nullable(),
55278
+ /** Seconds remaining on the active cycle, or null when not running / not known. */
55279
+ remainingSeconds: number().int().nonnegative().nullable(),
55280
+ /** Seconds the delayed start is set to (time until the cycle starts), or null. */
55281
+ delayedStartSeconds: number().int().nonnegative().nullable(),
55187
55282
  /** Cycle completion 0..100, or null when not applicable. */
55188
55283
  progressPercent: number().min(0).max(100).nullable(),
55189
- /** True when the door is reported open. */
55190
- doorOpen: boolean(),
55191
- /** True when remote start is allowed (door closed, power on, etc.). */
55192
- remoteStartAllowed: boolean(),
55193
- /** Main power / switched-on state. */
55194
- powerOn: boolean(),
55284
+ /** True when the door is reported open; null when the door state is not known. */
55285
+ doorOpen: boolean().nullable(),
55286
+ /** True when the door is latched (locked) during a cycle; null when not reported. */
55287
+ doorLocked: boolean().nullable(),
55288
+ /** True when remote start is allowed (door closed, power on, etc.); null when not known. */
55289
+ remoteStartAllowed: boolean().nullable(),
55290
+ /** True when the appliance accepts remote control now; null when not known. */
55291
+ remoteControlActive: boolean().nullable(),
55292
+ /** True while somebody operates the appliance at its panel; null when not reported. */
55293
+ localControlActive: boolean().nullable(),
55294
+ /** Main power / switched-on state; null when not known. */
55295
+ powerOn: boolean().nullable(),
55296
+ /** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
55297
+ powerState: string().nullable(),
55195
55298
  saltLevel: DishwasherConsumableLevelSchema.nullable(),
55196
55299
  rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
55197
- halfLoad: boolean(),
55198
- hygienePlus: boolean(),
55300
+ /** Option states: null when the appliance does not expose the option or has not said. */
55301
+ halfLoad: boolean().nullable(),
55302
+ hygienePlus: boolean().nullable(),
55199
55303
  /** Extra dry option when the appliance exposes it. */
55200
- extraDry: boolean(),
55304
+ extraDry: boolean().nullable(),
55201
55305
  /** Intensive zone (lower basket) when the appliance exposes it. */
55202
- intensiveZone: boolean(),
55306
+ intensiveZone: boolean().nullable(),
55203
55307
  /** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
55204
- varioSpeedPlus: boolean(),
55205
- /** Child lock (controls disabled on the appliance). */
55206
- childLock: boolean(),
55308
+ varioSpeedPlus: boolean().nullable(),
55309
+ /** Child lock (controls disabled on the appliance); null when not known. */
55310
+ childLock: boolean().nullable(),
55311
+ /** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
55312
+ activeEvents: array(string()),
55313
+ /** Numeric error code when the appliance reports one; null otherwise. */
55207
55314
  errorCode: number().nullable(),
55315
+ /** Name of the raised alert-level event while the appliance is in error; null otherwise. */
55208
55316
  errorLabel: string().nullable(),
55317
+ /** Ms epoch of the last value received from the appliance; 0 = never. */
55209
55318
  lastFetchedAt: number()
55210
55319
  });
55211
- DeviceType.Dishwasher, method(object({ deviceId: number().int().nonnegative() }), _void(), {
55320
+ var DeviceIdSchema = number().int().nonnegative();
55321
+ /** A value a program option or setting can take. */
55322
+ var DishwasherValueSchema = union([
55323
+ boolean(),
55324
+ string(),
55325
+ number()
55326
+ ]);
55327
+ var DishwasherAccessSchema = _enum([
55328
+ "none",
55329
+ "read",
55330
+ "readWrite",
55331
+ "writeOnly",
55332
+ "readStatic"
55333
+ ]);
55334
+ /**
55335
+ * One option or setting the appliance declares, with the constraints its description
55336
+ * gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
55337
+ */
55338
+ var DishwasherOptionDescriptorSchema = object({
55339
+ /** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
55340
+ key: string(),
55341
+ /** Last segment of the key, for display. */
55342
+ name: string(),
55343
+ type: _enum([
55344
+ "boolean",
55345
+ "number",
55346
+ "enum",
55347
+ "string"
55348
+ ]),
55349
+ access: DishwasherAccessSchema,
55350
+ /** The appliance reports this entity as currently available. */
55351
+ available: boolean(),
55352
+ /** Unit the description declares for a number; null when it declares none. */
55353
+ unit: string().nullable(),
55354
+ min: number().nullable(),
55355
+ max: number().nullable(),
55356
+ step: number().nullable(),
55357
+ /** Allowed members of an enum; null for other types. */
55358
+ enumValues: array(string()).nullable(),
55359
+ defaultValue: DishwasherValueSchema.nullable()
55360
+ });
55361
+ var DishwasherProgramSchema = object({
55362
+ /** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
55363
+ key: string(),
55364
+ name: string(),
55365
+ /** The appliance currently offers this program. */
55366
+ available: boolean(),
55367
+ /** The options this program lists, with the program-level access / availability / default. */
55368
+ options: array(DishwasherOptionDescriptorSchema)
55369
+ });
55370
+ var DishwasherOptionsSchema = object({
55371
+ availability: DishwasherAvailabilitySchema,
55372
+ /** What the appliance can be told to do, from the commands its description declares. */
55373
+ supportsStart: boolean(),
55374
+ supportsPause: boolean(),
55375
+ supportsResume: boolean(),
55376
+ supportsStop: boolean(),
55377
+ supportsPower: boolean(),
55378
+ /** Every program the description lists, with its options. */
55379
+ programs: array(DishwasherProgramSchema),
55380
+ /** Every option and setting entity the description lists (programs reference these by key). */
55381
+ options: array(DishwasherOptionDescriptorSchema)
55382
+ });
55383
+ DeviceType.Dishwasher, method(object({
55384
+ deviceId: DeviceIdSchema,
55385
+ program: string().min(1).optional(),
55386
+ options: record(string(), DishwasherValueSchema).optional()
55387
+ }), _void(), {
55212
55388
  kind: "mutation",
55213
55389
  auth: "protected"
55214
- }), method(object({ deviceId: number().int().nonnegative() }), _void(), {
55390
+ }), method(object({ deviceId: DeviceIdSchema }), _void(), {
55215
55391
  kind: "mutation",
55216
55392
  auth: "protected"
55217
- }), method(object({ deviceId: number().int().nonnegative() }), _void(), {
55393
+ }), method(object({ deviceId: DeviceIdSchema }), _void(), {
55394
+ kind: "mutation",
55395
+ auth: "protected"
55396
+ }), method(object({ deviceId: DeviceIdSchema }), _void(), {
55218
55397
  kind: "mutation",
55219
55398
  auth: "protected"
55220
55399
  }), method(object({
55221
- deviceId: number().int().nonnegative(),
55400
+ deviceId: DeviceIdSchema,
55222
55401
  program: string().min(1)
55223
55402
  }), _void(), {
55224
55403
  kind: "mutation",
55225
55404
  auth: "protected"
55226
55405
  }), method(object({
55227
- deviceId: number().int().nonnegative(),
55406
+ deviceId: DeviceIdSchema,
55228
55407
  on: boolean()
55229
55408
  }), _void(), {
55230
55409
  kind: "mutation",
55231
55410
  auth: "protected"
55232
55411
  }), method(object({
55233
- deviceId: number().int().nonnegative(),
55412
+ deviceId: DeviceIdSchema,
55234
55413
  on: boolean()
55235
55414
  }), _void(), {
55236
55415
  kind: "mutation",
55237
55416
  auth: "protected"
55238
55417
  }), method(object({
55239
- deviceId: number().int().nonnegative(),
55418
+ deviceId: DeviceIdSchema,
55240
55419
  on: boolean()
55241
55420
  }), _void(), {
55242
55421
  kind: "mutation",
55243
55422
  auth: "protected"
55244
55423
  }), method(object({
55245
- deviceId: number().int().nonnegative(),
55424
+ deviceId: DeviceIdSchema,
55246
55425
  on: boolean()
55247
55426
  }), _void(), {
55248
55427
  kind: "mutation",
55249
55428
  auth: "protected"
55250
55429
  }), method(object({
55251
- deviceId: number().int().nonnegative(),
55430
+ deviceId: DeviceIdSchema,
55252
55431
  on: boolean()
55253
55432
  }), _void(), {
55254
55433
  kind: "mutation",
55255
55434
  auth: "protected"
55256
55435
  }), method(object({
55257
- deviceId: number().int().nonnegative(),
55436
+ deviceId: DeviceIdSchema,
55258
55437
  on: boolean()
55259
55438
  }), _void(), {
55260
55439
  kind: "mutation",
55261
55440
  auth: "protected"
55262
55441
  }), method(object({
55263
- deviceId: number().int().nonnegative(),
55442
+ deviceId: DeviceIdSchema,
55264
55443
  on: boolean()
55265
55444
  }), _void(), {
55266
55445
  kind: "mutation",
55267
55446
  auth: "protected"
55268
55447
  }), method(object({
55269
- deviceId: number().int().nonnegative(),
55448
+ deviceId: DeviceIdSchema,
55270
55449
  key: string().min(1),
55271
- value: union([
55272
- boolean(),
55273
- string(),
55274
- number()
55275
- ])
55450
+ value: DishwasherValueSchema
55276
55451
  }), _void(), {
55277
55452
  kind: "mutation",
55278
55453
  auth: "protected"
55279
- });
55454
+ }), method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" });
55280
55455
  object({
55281
55456
  /** Ms epoch of the last press. null = never observed since this provider started. */
55282
55457
  lastPressedAt: number().nullable(),
@@ -65377,6 +65552,12 @@ Object.freeze({
65377
65552
  addonId: null,
65378
65553
  access: "view"
65379
65554
  },
65555
+ "dishwasher.getOptions": {
65556
+ capName: "dishwasher",
65557
+ capScope: "device",
65558
+ addonId: null,
65559
+ access: "view"
65560
+ },
65380
65561
  "dishwasher.getStatus": {
65381
65562
  capName: "dishwasher",
65382
65563
  capScope: "device",
@@ -65389,6 +65570,12 @@ Object.freeze({
65389
65570
  addonId: null,
65390
65571
  access: "create"
65391
65572
  },
65573
+ "dishwasher.resume": {
65574
+ capName: "dishwasher",
65575
+ capScope: "device",
65576
+ addonId: null,
65577
+ access: "create"
65578
+ },
65392
65579
  "dishwasher.setChildLock": {
65393
65580
  capName: "dishwasher",
65394
65581
  capScope: "device",
@@ -69889,6 +70076,12 @@ Object.freeze({
69889
70076
  addonId: null,
69890
70077
  access: "view"
69891
70078
  },
70079
+ "storageMigration.moverClearance": {
70080
+ capName: "storage-migration",
70081
+ capScope: "system",
70082
+ addonId: null,
70083
+ access: "view"
70084
+ },
69892
70085
  "storageMigration.movers": {
69893
70086
  capName: "storage-migration",
69894
70087
  capScope: "system",
@@ -72082,6 +72275,11 @@ Object.freeze({
72082
72275
  form: "single",
72083
72276
  optional: false
72084
72277
  }],
72278
+ "dishwasher.getOptions": [{
72279
+ name: "deviceId",
72280
+ form: "single",
72281
+ optional: false
72282
+ }],
72085
72283
  "dishwasher.getStatus": [{
72086
72284
  name: "deviceId",
72087
72285
  form: "single",
@@ -72092,6 +72290,11 @@ Object.freeze({
72092
72290
  form: "single",
72093
72291
  optional: false
72094
72292
  }],
72293
+ "dishwasher.resume": [{
72294
+ name: "deviceId",
72295
+ form: "single",
72296
+ optional: false
72297
+ }],
72095
72298
  "dishwasher.setChildLock": [{
72096
72299
  name: "deviceId",
72097
72300
  form: "single",
@@ -74178,6 +74381,9 @@ new Map(Object.entries({
74178
74381
  "wrapper-update-available": "system",
74179
74382
  "backup-completed": "system",
74180
74383
  "export-completed": "system",
74384
+ "alert-critical": "system",
74385
+ "alert-error": "system",
74386
+ "alert-critical-resolved": "system",
74181
74387
  "storage-location-low": "system",
74182
74388
  "storage-location-critical": "system",
74183
74389
  "storage-location-ok": "system",
@@ -74302,6 +74508,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
74302
74508
  "storage-location-ok"
74303
74509
  ]
74304
74510
  },
74511
+ {
74512
+ id: "alerts",
74513
+ family: "system",
74514
+ label: "Alerts",
74515
+ kinds: [
74516
+ "alert-critical",
74517
+ "alert-error",
74518
+ "alert-critical-resolved"
74519
+ ]
74520
+ },
74305
74521
  {
74306
74522
  id: "alarm",
74307
74523
  family: "alarm",
@@ -74346,6 +74562,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
74346
74562
  return [[descriptor.kind, field]];
74347
74563
  })));
74348
74564
  Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
74565
+ object({
74566
+ phase: _enum(["raised", "resolved"]),
74567
+ episodeId: string().min(1),
74568
+ alertId: string().min(1),
74569
+ severity: AlertSeveritySchema,
74570
+ category: string(),
74571
+ title: string(),
74572
+ message: string(),
74573
+ sourceType: string().optional(),
74574
+ sourceId: string().optional(),
74575
+ nodeId: string().optional(),
74576
+ /** The alert's own action link (where the operator acts on it), when it has one. */
74577
+ actionUrl: string().optional(),
74578
+ at: number()
74579
+ });
74349
74580
  var RULE_BODY_ONLY = ["body"];
74350
74581
  var RULE_TEXT = ["title", "body"];
74351
74582
  var BATTERY = ["device-battery-low", "device-battery-normal"];
@@ -74355,6 +74586,11 @@ var TANK = [
74355
74586
  "device-tank-full",
74356
74587
  "device-tank-normal"
74357
74588
  ];
74589
+ var ALERT_EPISODE = [
74590
+ "alert-critical",
74591
+ "alert-error",
74592
+ "alert-critical-resolved"
74593
+ ];
74358
74594
  var UPDATES = [
74359
74595
  "addon-update-available",
74360
74596
  "server-update-available",
@@ -74547,14 +74783,14 @@ var STATE_SUMMARY_VARS = [
74547
74783
  ([...RULE_TEXT], [...CONSUMABLE]),
74548
74784
  ([...RULE_TEXT], [...TANK]),
74549
74785
  [...RULE_TEXT],
74550
- ([...RULE_TEXT], [...UPDATES]),
74551
- ([...RULE_TEXT], [...UPDATES]),
74552
- [...RULE_TEXT],
74786
+ ([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
74787
+ ([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
74553
74788
  [...RULE_TEXT],
74554
74789
  [...RULE_TEXT],
74555
74790
  [...RULE_TEXT],
74556
74791
  [...RULE_TEXT],
74557
74792
  [...RULE_TEXT],
74793
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
74558
74794
  [...RULE_TEXT],
74559
74795
  [...RULE_TEXT],
74560
74796
  [...RULE_TEXT],
@@ -74572,7 +74808,11 @@ var STATE_SUMMARY_VARS = [
74572
74808
  [...RULE_TEXT],
74573
74809
  [...RULE_TEXT],
74574
74810
  [...RULE_TEXT],
74575
- [...RULE_TEXT],
74811
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
74812
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
74813
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
74814
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
74815
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
74576
74816
  [...RULE_TEXT],
74577
74817
  [...RULE_TEXT],
74578
74818
  [...RULE_TEXT],