@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.
@@ -39,7 +39,7 @@ var __copyProps = (to, from, except, desc) => {
39
39
  var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
40
40
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
41
41
  //#endregion
42
- //#region ../types/dist/event-category-BvOFi6PY.mjs
42
+ //#region ../types/dist/event-category-DOl51-Ij.mjs
43
43
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
44
44
  EventCategory["SystemBoot"] = "system.boot";
45
45
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -118,9 +118,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
118
118
  /**
119
119
  * The node's one-shot runner boot check (D877): planned runners against the
120
120
  * process service, `degraded` when any is failed, refused or missing. The
121
- * alert centre turns it into one alert and a direct critical push.
121
+ * alert centre turns it into one critical alert.
122
122
  */
123
123
  EventCategory["SystemRunnerCheck"] = "system.runner-check";
124
+ /**
125
+ * An alert EPISODE opened or closed, emitted by the alert centre for alerts
126
+ * of severity `critical` or `error` (`AlertEpisodePayload`). The alert
127
+ * centre sends no notification of its own: Notification Center turns this
128
+ * into the `alert-critical` / `alert-error` / `alert-critical-resolved`
129
+ * system-event kinds, and reconciles from the alerts store because a bus
130
+ * event may be dropped (D8, D11).
131
+ */
132
+ EventCategory["AlertEpisode"] = "alert.episode";
124
133
  EventCategory["AddonError"] = "addon.error";
125
134
  EventCategory["AddonPageReady"] = "addon.page-ready";
126
135
  EventCategory["AddonWidgetReady"] = "addon.widget-ready";
@@ -5445,7 +5454,7 @@ var ZodIssueCode = {
5445
5454
  var ZodFirstPartyTypeKind;
5446
5455
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5447
5456
  //#endregion
5448
- //#region ../types/dist/sleep-BegKjwUu.mjs
5457
+ //#region ../types/dist/sleep-BxjU_fJM.mjs
5449
5458
  /**
5450
5459
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5451
5460
  * window to float samples (D455).
@@ -7827,6 +7836,12 @@ function normalizeAddonInitResult(result) {
7827
7836
  if (Array.isArray(result)) return { providers: result };
7828
7837
  return result;
7829
7838
  }
7839
+ /**
7840
+ * The share-view scope kinds a `csv_*` share token can carry. The hub mints
7841
+ * and validates them (`share-token.service.ts` builds its enum from this
7842
+ * list); a data plane names the kinds it ACCEPTS in `share`.
7843
+ */
7844
+ var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
7830
7845
  /** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
7831
7846
  var PeerBytesTicketSchema = object({
7832
7847
  /** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
@@ -13299,6 +13314,229 @@ var ConvertResultSchema = object({
13299
13314
  files: array(string()).readonly()
13300
13315
  })).readonly()
13301
13316
  });
13317
+ /**
13318
+ * Zod schemas for persisted record types.
13319
+ *
13320
+ * These schemas serve as the single source of truth for types that are
13321
+ * stored in the settings-store backend and retrieved via tRPC. They
13322
+ * replace the manual TypeScript interfaces with schema-derived types,
13323
+ * enabling runtime validation when reading from the backend.
13324
+ *
13325
+ * Convention: each schema is named `<Type>Schema`, the inferred TS type
13326
+ * keeps the original name for backward compatibility.
13327
+ */
13328
+ /**
13329
+ * Auth model (v2 — 2026-05-12 caps-only):
13330
+ *
13331
+ * Two principals:
13332
+ * - `isAdmin: true` — full bypass. Admin scope set is ignored.
13333
+ * - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
13334
+ *
13335
+ * No role enum. There used to be `viewer / agent / scoped` and earlier
13336
+ * `super_admin` — collapsed onto the single boolean because every
13337
+ * non-admin caller is governed by the same scope-check rules; the
13338
+ * distinction was only ever used to route role-specific procedures
13339
+ * which we no longer have. CLI / webhook integrations are `cst_*` tokens
13340
+ * with `isAdmin: false` + an explicit scope list.
13341
+ */
13342
+ /** Per-method access flavour. Materialised on every cap method via codegen. */
13343
+ var MethodAccessSchema = _enum([
13344
+ "view",
13345
+ "create",
13346
+ "delete"
13347
+ ]);
13348
+ /**
13349
+ * A single scope grant. Three forms — checked in matcher with OR
13350
+ * semantics; the first match decides whether the call passes:
13351
+ *
13352
+ * - `category` — broadest. `target: 'device' | 'system'` selects every
13353
+ * cap with the matching `scope` declaration. New caps inherit grants
13354
+ * automatically — adding a device cap to the codebase makes it
13355
+ * reachable to every user with `category:device [...]` without a
13356
+ * re-grant. Use this for "family viewer" / "operator" tiers.
13357
+ *
13358
+ * - `addon` — every cap that ships inside a given addon id. Niche;
13359
+ * useful when an integration needs to interact with one specific
13360
+ * addon's surface regardless of how many caps it exports.
13361
+ *
13362
+ * - `capability` — the most precise form. Single cap name. Use for
13363
+ * integration tokens where you want to grant `addons.installPackage`
13364
+ * and nothing else.
13365
+ *
13366
+ * `access` is REQUIRED with min 1 element. `admin` bypass is the
13367
+ * "give me everything" escape; there is no wildcard scope.
13368
+ */
13369
+ var AllowedProviderSchema = union([literal("*"), array(string())]);
13370
+ var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
13371
+ var CapScopeSchema = _enum(["device", "system"]);
13372
+ /**
13373
+ * DeviceSelector (scope model v3 — 2026-08-12).
13374
+ *
13375
+ * A `device` grant no longer carries a frozen list of deviceIds. It carries
13376
+ * a SELECTOR the matcher resolves against the live fleet, so the grant can be
13377
+ * DYNAMIC: a `types:['camera']` selector automatically covers a camera added
13378
+ * AFTER the grant was minted — no re-grant, no re-login.
13379
+ *
13380
+ * - `all` — every device in the deployment. The broad viewer/operator
13381
+ * lever without a `category` grant (a `category` grant also covers device
13382
+ * caps that carry no deviceId; `all` is specifically the device set).
13383
+ * - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
13384
+ * grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
13385
+ * is NOT covered until the grant is edited.
13386
+ * - `types` — every device of a `DeviceType` (e.g. every `camera`).
13387
+ * DYNAMIC. A device that changes type, or a new device of the type,
13388
+ * re-resolves on the next request.
13389
+ * - `locations` — every device whose operator-assigned `location` label is
13390
+ * in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
13391
+ * null/unset location matches NO `locations` selector.
13392
+ */
13393
+ var DeviceSelectorSchema = discriminatedUnion("kind", [
13394
+ object({ kind: literal("all") }),
13395
+ object({
13396
+ kind: literal("ids"),
13397
+ ids: array(number().int()).min(1)
13398
+ }),
13399
+ object({
13400
+ kind: literal("types"),
13401
+ types: array(_enum(DeviceType)).min(1)
13402
+ }),
13403
+ object({
13404
+ kind: literal("locations"),
13405
+ locations: array(string().min(1)).min(1)
13406
+ })
13407
+ ]);
13408
+ var DeviceTokenScopeSchema = object({
13409
+ type: literal("device"),
13410
+ /** The device SET this grant covers — resolved against the live fleet. */
13411
+ selector: DeviceSelectorSchema,
13412
+ access: array(MethodAccessSchema).min(1),
13413
+ /**
13414
+ * Whether a grant on a PARENT device transparently covers its accessory
13415
+ * CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
13416
+ * Direction is parent → children ONLY.
13417
+ *
13418
+ * Absent → the matcher DERIVES it from the access flavour: `view`
13419
+ * inherits (a camera viewer sees the camera's accessories), `create` /
13420
+ * `delete` do NOT (actuating/removing a child is an explicit act the
13421
+ * operator must grant on the child, not inherit from the parent). Set it
13422
+ * explicitly to override that default per grant.
13423
+ */
13424
+ includeLinked: boolean().optional()
13425
+ });
13426
+ /**
13427
+ * v2 → v3 lazy migration. A pre-v3 `device` grant carried
13428
+ * `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
13429
+ * `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
13430
+ * EVERY parse path — stored records AND the JWT-carried scope arrays
13431
+ * normalised at the request boundary ({@link normalizeTokenScopes} in
13432
+ * `device-selector.ts`). Chosen over a one-time DB migration because a
13433
+ * migration cannot reach a JWT already in a client's hands; parse-time
13434
+ * migration covers both without a flag day. No cast — the raw object is read
13435
+ * through `Reflect.get` (its static type is `unknown`).
13436
+ */
13437
+ function migrateLegacyTokenScope(raw) {
13438
+ if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
13439
+ if (Reflect.get(raw, "type") !== "device") return raw;
13440
+ if (Reflect.get(raw, "selector") !== void 0) return raw;
13441
+ const targets = Reflect.get(raw, "targets");
13442
+ if (!Array.isArray(targets)) return raw;
13443
+ return {
13444
+ type: "device",
13445
+ selector: {
13446
+ kind: "ids",
13447
+ ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
13448
+ },
13449
+ access: Reflect.get(raw, "access")
13450
+ };
13451
+ }
13452
+ var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
13453
+ object({
13454
+ type: literal("category"),
13455
+ target: CapScopeSchema,
13456
+ access: array(MethodAccessSchema).min(1)
13457
+ }),
13458
+ object({
13459
+ type: literal("capability"),
13460
+ target: string(),
13461
+ access: array(MethodAccessSchema).min(1)
13462
+ }),
13463
+ object({
13464
+ type: literal("addon"),
13465
+ target: string(),
13466
+ access: array(MethodAccessSchema).min(1)
13467
+ }),
13468
+ DeviceTokenScopeSchema
13469
+ ]));
13470
+ object({
13471
+ id: string(),
13472
+ username: string(),
13473
+ passwordHash: string(),
13474
+ /**
13475
+ * Admin bypass. When true, the middleware skips the scope-access
13476
+ * check entirely. There is no other axis of privilege; the legacy
13477
+ * role enum collapsed onto this boolean in v2.
13478
+ */
13479
+ isAdmin: boolean().default(false),
13480
+ allowedProviders: AllowedProviderSchema,
13481
+ allowedDevices: AllowedDevicesSchema,
13482
+ /**
13483
+ * Scopes granted to this user. Admins bypass; their `scopes` is
13484
+ * ignored. Non-admins without scopes are locked out of every
13485
+ * protected call.
13486
+ */
13487
+ scopes: array(TokenScopeSchema).default([]),
13488
+ createdAt: number(),
13489
+ updatedAt: number()
13490
+ });
13491
+ object({
13492
+ id: string(),
13493
+ label: string(),
13494
+ isAdmin: boolean().default(false),
13495
+ allowedProviders: AllowedProviderSchema,
13496
+ allowedDevices: AllowedDevicesSchema,
13497
+ tokenHash: string(),
13498
+ tokenPrefix: string(),
13499
+ createdAt: number(),
13500
+ lastUsedAt: number().optional()
13501
+ });
13502
+ object({
13503
+ id: string(),
13504
+ userId: string(),
13505
+ name: string(),
13506
+ tokenHash: string(),
13507
+ tokenPrefix: string(),
13508
+ scopes: array(TokenScopeSchema),
13509
+ expiresAt: number().nullish(),
13510
+ lastUsedAt: number().nullish(),
13511
+ createdAt: number()
13512
+ });
13513
+ /** What a share-view grant lets its holder see. */
13514
+ var ShareViewGrantSchema = object({
13515
+ kind: _enum(SHARE_VIEW_KINDS),
13516
+ deviceIds: array(number().int().nonnegative()).min(1).max(64),
13517
+ /** Talk-back, opt-in at mint time; absent means off. */
13518
+ talk: boolean().optional()
13519
+ });
13520
+ var ShareViewScopeSchema = object({
13521
+ type: literal("share-view"),
13522
+ grant: ShareViewGrantSchema
13523
+ });
13524
+ var AddonRoutesScopeSchema = object({
13525
+ type: literal("addon-routes"),
13526
+ access: array(MethodAccessSchema).min(1)
13527
+ });
13528
+ var CredentialScopeSchema = union([
13529
+ literal("*"),
13530
+ ShareViewScopeSchema,
13531
+ AddonRoutesScopeSchema,
13532
+ TokenScopeSchema
13533
+ ]);
13534
+ object({
13535
+ kind: literal("credential"),
13536
+ sub: string().min(1),
13537
+ jti: string().min(16),
13538
+ scopes: array(CredentialScopeSchema).min(1)
13539
+ });
13302
13540
  _enum(["new-session", "step-up"]);
13303
13541
  /** The languages the hub's app landing pages are written in (D858). */
13304
13542
  var AppPageLangSchema = _enum(["en", "it"]);
@@ -14015,7 +14253,14 @@ var AlertSeveritySchema = _enum([
14015
14253
  ]);
14016
14254
  var AlertActionSchema = object({
14017
14255
  label: string(),
14018
- href: string().optional()
14256
+ href: string().optional(),
14257
+ /**
14258
+ * How `href` is followed. Absent / `app`: an admin-ui route (client-side).
14259
+ * `server`: a route the HUB serves (an addon HTTP route such as an OAuth
14260
+ * start) — the browser must leave the SPA with a full navigation, because
14261
+ * the SPA has no such route and would bounce to the home page.
14262
+ */
14263
+ navigation: _enum(["app", "server"]).optional()
14019
14264
  });
14020
14265
  var AlertStatusSchema = _enum([
14021
14266
  "active",
@@ -42472,6 +42717,9 @@ var NcSystemEventKindSchema = _enum([
42472
42717
  "server-updated",
42473
42718
  "export-completed",
42474
42719
  "backup-completed",
42720
+ "alert-critical",
42721
+ "alert-error",
42722
+ "alert-critical-resolved",
42475
42723
  "camera-online",
42476
42724
  "camera-offline",
42477
42725
  "camera-disabled",
@@ -44507,202 +44755,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
44507
44755
  auth: "admin"
44508
44756
  }), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
44509
44757
  /**
44510
- * Zod schemas for persisted record types.
44511
- *
44512
- * These schemas serve as the single source of truth for types that are
44513
- * stored in the settings-store backend and retrieved via tRPC. They
44514
- * replace the manual TypeScript interfaces with schema-derived types,
44515
- * enabling runtime validation when reading from the backend.
44516
- *
44517
- * Convention: each schema is named `<Type>Schema`, the inferred TS type
44518
- * keeps the original name for backward compatibility.
44519
- */
44520
- /**
44521
- * Auth model (v2 — 2026-05-12 caps-only):
44522
- *
44523
- * Two principals:
44524
- * - `isAdmin: true` — full bypass. Admin scope set is ignored.
44525
- * - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
44526
- *
44527
- * No role enum. There used to be `viewer / agent / scoped` and earlier
44528
- * `super_admin` — collapsed onto the single boolean because every
44529
- * non-admin caller is governed by the same scope-check rules; the
44530
- * distinction was only ever used to route role-specific procedures
44531
- * which we no longer have. CLI / webhook integrations are `cst_*` tokens
44532
- * with `isAdmin: false` + an explicit scope list.
44533
- */
44534
- /** Per-method access flavour. Materialised on every cap method via codegen. */
44535
- var MethodAccessSchema = _enum([
44536
- "view",
44537
- "create",
44538
- "delete"
44539
- ]);
44540
- /**
44541
- * A single scope grant. Three forms — checked in matcher with OR
44542
- * semantics; the first match decides whether the call passes:
44543
- *
44544
- * - `category` — broadest. `target: 'device' | 'system'` selects every
44545
- * cap with the matching `scope` declaration. New caps inherit grants
44546
- * automatically — adding a device cap to the codebase makes it
44547
- * reachable to every user with `category:device [...]` without a
44548
- * re-grant. Use this for "family viewer" / "operator" tiers.
44549
- *
44550
- * - `addon` — every cap that ships inside a given addon id. Niche;
44551
- * useful when an integration needs to interact with one specific
44552
- * addon's surface regardless of how many caps it exports.
44553
- *
44554
- * - `capability` — the most precise form. Single cap name. Use for
44555
- * integration tokens where you want to grant `addons.installPackage`
44556
- * and nothing else.
44557
- *
44558
- * `access` is REQUIRED with min 1 element. `admin` bypass is the
44559
- * "give me everything" escape; there is no wildcard scope.
44560
- */
44561
- var AllowedProviderSchema = union([literal("*"), array(string())]);
44562
- var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
44563
- var CapScopeSchema = _enum(["device", "system"]);
44564
- /**
44565
- * DeviceSelector (scope model v3 — 2026-08-12).
44566
- *
44567
- * A `device` grant no longer carries a frozen list of deviceIds. It carries
44568
- * a SELECTOR the matcher resolves against the live fleet, so the grant can be
44569
- * DYNAMIC: a `types:['camera']` selector automatically covers a camera added
44570
- * AFTER the grant was minted — no re-grant, no re-login.
44571
- *
44572
- * - `all` — every device in the deployment. The broad viewer/operator
44573
- * lever without a `category` grant (a `category` grant also covers device
44574
- * caps that carry no deviceId; `all` is specifically the device set).
44575
- * - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
44576
- * grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
44577
- * is NOT covered until the grant is edited.
44578
- * - `types` — every device of a `DeviceType` (e.g. every `camera`).
44579
- * DYNAMIC. A device that changes type, or a new device of the type,
44580
- * re-resolves on the next request.
44581
- * - `locations` — every device whose operator-assigned `location` label is
44582
- * in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
44583
- * null/unset location matches NO `locations` selector.
44584
- */
44585
- var DeviceSelectorSchema = discriminatedUnion("kind", [
44586
- object({ kind: literal("all") }),
44587
- object({
44588
- kind: literal("ids"),
44589
- ids: array(number().int()).min(1)
44590
- }),
44591
- object({
44592
- kind: literal("types"),
44593
- types: array(_enum(DeviceType)).min(1)
44594
- }),
44595
- object({
44596
- kind: literal("locations"),
44597
- locations: array(string().min(1)).min(1)
44598
- })
44599
- ]);
44600
- var DeviceTokenScopeSchema = object({
44601
- type: literal("device"),
44602
- /** The device SET this grant covers — resolved against the live fleet. */
44603
- selector: DeviceSelectorSchema,
44604
- access: array(MethodAccessSchema).min(1),
44605
- /**
44606
- * Whether a grant on a PARENT device transparently covers its accessory
44607
- * CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
44608
- * Direction is parent → children ONLY.
44609
- *
44610
- * Absent → the matcher DERIVES it from the access flavour: `view`
44611
- * inherits (a camera viewer sees the camera's accessories), `create` /
44612
- * `delete` do NOT (actuating/removing a child is an explicit act the
44613
- * operator must grant on the child, not inherit from the parent). Set it
44614
- * explicitly to override that default per grant.
44615
- */
44616
- includeLinked: boolean().optional()
44617
- });
44618
- /**
44619
- * v2 → v3 lazy migration. A pre-v3 `device` grant carried
44620
- * `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
44621
- * `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
44622
- * EVERY parse path — stored records AND the JWT-carried scope arrays
44623
- * normalised at the request boundary ({@link normalizeTokenScopes} in
44624
- * `device-selector.ts`). Chosen over a one-time DB migration because a
44625
- * migration cannot reach a JWT already in a client's hands; parse-time
44626
- * migration covers both without a flag day. No cast — the raw object is read
44627
- * through `Reflect.get` (its static type is `unknown`).
44628
- */
44629
- function migrateLegacyTokenScope(raw) {
44630
- if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
44631
- if (Reflect.get(raw, "type") !== "device") return raw;
44632
- if (Reflect.get(raw, "selector") !== void 0) return raw;
44633
- const targets = Reflect.get(raw, "targets");
44634
- if (!Array.isArray(targets)) return raw;
44635
- return {
44636
- type: "device",
44637
- selector: {
44638
- kind: "ids",
44639
- ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
44640
- },
44641
- access: Reflect.get(raw, "access")
44642
- };
44643
- }
44644
- var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
44645
- object({
44646
- type: literal("category"),
44647
- target: CapScopeSchema,
44648
- access: array(MethodAccessSchema).min(1)
44649
- }),
44650
- object({
44651
- type: literal("capability"),
44652
- target: string(),
44653
- access: array(MethodAccessSchema).min(1)
44654
- }),
44655
- object({
44656
- type: literal("addon"),
44657
- target: string(),
44658
- access: array(MethodAccessSchema).min(1)
44659
- }),
44660
- DeviceTokenScopeSchema
44661
- ]));
44662
- object({
44663
- id: string(),
44664
- username: string(),
44665
- passwordHash: string(),
44666
- /**
44667
- * Admin bypass. When true, the middleware skips the scope-access
44668
- * check entirely. There is no other axis of privilege; the legacy
44669
- * role enum collapsed onto this boolean in v2.
44670
- */
44671
- isAdmin: boolean().default(false),
44672
- allowedProviders: AllowedProviderSchema,
44673
- allowedDevices: AllowedDevicesSchema,
44674
- /**
44675
- * Scopes granted to this user. Admins bypass; their `scopes` is
44676
- * ignored. Non-admins without scopes are locked out of every
44677
- * protected call.
44678
- */
44679
- scopes: array(TokenScopeSchema).default([]),
44680
- createdAt: number(),
44681
- updatedAt: number()
44682
- });
44683
- object({
44684
- id: string(),
44685
- label: string(),
44686
- isAdmin: boolean().default(false),
44687
- allowedProviders: AllowedProviderSchema,
44688
- allowedDevices: AllowedDevicesSchema,
44689
- tokenHash: string(),
44690
- tokenPrefix: string(),
44691
- createdAt: number(),
44692
- lastUsedAt: number().optional()
44693
- });
44694
- object({
44695
- id: string(),
44696
- userId: string(),
44697
- name: string(),
44698
- tokenHash: string(),
44699
- tokenPrefix: string(),
44700
- scopes: array(TokenScopeSchema),
44701
- expiresAt: number().nullish(),
44702
- lastUsedAt: number().nullish(),
44703
- createdAt: number()
44704
- });
44705
- /**
44706
44758
  * `oauth-integration` — a collection cap by which an addon declares
44707
44759
  * itself a linkable OAuth client of the hub's core `/oauth2/*` server.
44708
44760
  * Each provider returns a static descriptor; the core enumerates them
@@ -51504,7 +51556,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
51504
51556
  }), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
51505
51557
  kind: "mutation",
51506
51558
  auth: "admin"
51507
- }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
51559
+ }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
51560
+ clear: boolean(),
51561
+ repointLocationId: string().optional()
51562
+ }), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
51508
51563
  kind: "mutation",
51509
51564
  auth: "admin"
51510
51565
  }), method(StorageCleanupInputSchema, object({ jobId: string() }), {
@@ -55152,6 +55207,11 @@ object({
55152
55207
  *
55153
55208
  * `kind: 'poll'` — cloud REST APIs typically have no push channel; the
55154
55209
  * provider refreshes the slice on an interval and eagerly after commands.
55210
+ *
55211
+ * UNKNOWN IS NOT OFF. Every field the appliance reports separately is
55212
+ * nullable: `null` means "not known right now" (the appliance has not said,
55213
+ * the link is down, or the description does not carry it) and is never
55214
+ * rendered or exported as `false` / `0`. `availability` says why.
55155
55215
  */
55156
55216
  var DishwasherStateSchema = _enum([
55157
55217
  "idle",
@@ -55161,112 +55221,227 @@ var DishwasherStateSchema = _enum([
55161
55221
  "error",
55162
55222
  "unavailable"
55163
55223
  ]);
55224
+ /**
55225
+ * The appliance's own operation state, uncollapsed. `state` above is the coarse
55226
+ * view for compact surfaces; this is what the appliance said.
55227
+ */
55228
+ var DishwasherOperationStateSchema = _enum([
55229
+ "Inactive",
55230
+ "Ready",
55231
+ "DelayedStart",
55232
+ "Run",
55233
+ "Pause",
55234
+ "ActionRequired",
55235
+ "Finished",
55236
+ "Error",
55237
+ "Aborting"
55238
+ ]);
55239
+ /**
55240
+ * Why fields may be `null`:
55241
+ * - `available` — the link is up and the description is loaded;
55242
+ * - `offline` — the local link is down (values are unknown, not last-known);
55243
+ * - `description-missing` — the link is up but the appliance's description could not
55244
+ * be loaded, so its values cannot be decoded.
55245
+ */
55246
+ var DishwasherAvailabilitySchema = _enum([
55247
+ "available",
55248
+ "offline",
55249
+ "description-missing"
55250
+ ]);
55164
55251
  var DishwasherConsumableLevelSchema = _enum([
55165
55252
  "ok",
55166
55253
  "low",
55167
55254
  "empty"
55168
55255
  ]);
55169
55256
  object({
55257
+ availability: DishwasherAvailabilitySchema,
55258
+ /** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
55170
55259
  state: DishwasherStateSchema,
55171
- /** Active program id/name, or null when none selected / unknown. */
55260
+ /** The appliance's operation state as reported; null when not known. */
55261
+ operationState: DishwasherOperationStateSchema.nullable(),
55262
+ /** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
55172
55263
  program: string().nullable(),
55173
- /** Program tokens the hardware accepts — drives the UI selector. */
55264
+ /** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
55265
+ selectedProgram: string().nullable(),
55266
+ /** Feature keys of the programs the appliance currently offers — drives the UI selector. */
55174
55267
  availablePrograms: array(string()),
55175
- /** Minutes remaining on the active cycle, or null when not running. */
55176
- remainingMinutes: number().int().nonnegative().nullable(),
55268
+ /** Seconds remaining on the active cycle, or null when not running / not known. */
55269
+ remainingSeconds: number().int().nonnegative().nullable(),
55270
+ /** Seconds the delayed start is set to (time until the cycle starts), or null. */
55271
+ delayedStartSeconds: number().int().nonnegative().nullable(),
55177
55272
  /** Cycle completion 0..100, or null when not applicable. */
55178
55273
  progressPercent: number().min(0).max(100).nullable(),
55179
- /** True when the door is reported open. */
55180
- doorOpen: boolean(),
55181
- /** True when remote start is allowed (door closed, power on, etc.). */
55182
- remoteStartAllowed: boolean(),
55183
- /** Main power / switched-on state. */
55184
- powerOn: boolean(),
55274
+ /** True when the door is reported open; null when the door state is not known. */
55275
+ doorOpen: boolean().nullable(),
55276
+ /** True when the door is latched (locked) during a cycle; null when not reported. */
55277
+ doorLocked: boolean().nullable(),
55278
+ /** True when remote start is allowed (door closed, power on, etc.); null when not known. */
55279
+ remoteStartAllowed: boolean().nullable(),
55280
+ /** True when the appliance accepts remote control now; null when not known. */
55281
+ remoteControlActive: boolean().nullable(),
55282
+ /** True while somebody operates the appliance at its panel; null when not reported. */
55283
+ localControlActive: boolean().nullable(),
55284
+ /** Main power / switched-on state; null when not known. */
55285
+ powerOn: boolean().nullable(),
55286
+ /** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
55287
+ powerState: string().nullable(),
55185
55288
  saltLevel: DishwasherConsumableLevelSchema.nullable(),
55186
55289
  rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
55187
- halfLoad: boolean(),
55188
- hygienePlus: boolean(),
55290
+ /** Option states: null when the appliance does not expose the option or has not said. */
55291
+ halfLoad: boolean().nullable(),
55292
+ hygienePlus: boolean().nullable(),
55189
55293
  /** Extra dry option when the appliance exposes it. */
55190
- extraDry: boolean(),
55294
+ extraDry: boolean().nullable(),
55191
55295
  /** Intensive zone (lower basket) when the appliance exposes it. */
55192
- intensiveZone: boolean(),
55296
+ intensiveZone: boolean().nullable(),
55193
55297
  /** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
55194
- varioSpeedPlus: boolean(),
55195
- /** Child lock (controls disabled on the appliance). */
55196
- childLock: boolean(),
55298
+ varioSpeedPlus: boolean().nullable(),
55299
+ /** Child lock (controls disabled on the appliance); null when not known. */
55300
+ childLock: boolean().nullable(),
55301
+ /** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
55302
+ activeEvents: array(string()),
55303
+ /** Numeric error code when the appliance reports one; null otherwise. */
55197
55304
  errorCode: number().nullable(),
55305
+ /** Name of the raised alert-level event while the appliance is in error; null otherwise. */
55198
55306
  errorLabel: string().nullable(),
55307
+ /** Ms epoch of the last value received from the appliance; 0 = never. */
55199
55308
  lastFetchedAt: number()
55200
55309
  });
55201
- DeviceType.Dishwasher, method(object({ deviceId: number().int().nonnegative() }), _void(), {
55310
+ var DeviceIdSchema = number().int().nonnegative();
55311
+ /** A value a program option or setting can take. */
55312
+ var DishwasherValueSchema = union([
55313
+ boolean(),
55314
+ string(),
55315
+ number()
55316
+ ]);
55317
+ var DishwasherAccessSchema = _enum([
55318
+ "none",
55319
+ "read",
55320
+ "readWrite",
55321
+ "writeOnly",
55322
+ "readStatic"
55323
+ ]);
55324
+ /**
55325
+ * One option or setting the appliance declares, with the constraints its description
55326
+ * gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
55327
+ */
55328
+ var DishwasherOptionDescriptorSchema = object({
55329
+ /** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
55330
+ key: string(),
55331
+ /** Last segment of the key, for display. */
55332
+ name: string(),
55333
+ type: _enum([
55334
+ "boolean",
55335
+ "number",
55336
+ "enum",
55337
+ "string"
55338
+ ]),
55339
+ access: DishwasherAccessSchema,
55340
+ /** The appliance reports this entity as currently available. */
55341
+ available: boolean(),
55342
+ /** Unit the description declares for a number; null when it declares none. */
55343
+ unit: string().nullable(),
55344
+ min: number().nullable(),
55345
+ max: number().nullable(),
55346
+ step: number().nullable(),
55347
+ /** Allowed members of an enum; null for other types. */
55348
+ enumValues: array(string()).nullable(),
55349
+ defaultValue: DishwasherValueSchema.nullable()
55350
+ });
55351
+ var DishwasherProgramSchema = object({
55352
+ /** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
55353
+ key: string(),
55354
+ name: string(),
55355
+ /** The appliance currently offers this program. */
55356
+ available: boolean(),
55357
+ /** The options this program lists, with the program-level access / availability / default. */
55358
+ options: array(DishwasherOptionDescriptorSchema)
55359
+ });
55360
+ var DishwasherOptionsSchema = object({
55361
+ availability: DishwasherAvailabilitySchema,
55362
+ /** What the appliance can be told to do, from the commands its description declares. */
55363
+ supportsStart: boolean(),
55364
+ supportsPause: boolean(),
55365
+ supportsResume: boolean(),
55366
+ supportsStop: boolean(),
55367
+ supportsPower: boolean(),
55368
+ /** Every program the description lists, with its options. */
55369
+ programs: array(DishwasherProgramSchema),
55370
+ /** Every option and setting entity the description lists (programs reference these by key). */
55371
+ options: array(DishwasherOptionDescriptorSchema)
55372
+ });
55373
+ DeviceType.Dishwasher, method(object({
55374
+ deviceId: DeviceIdSchema,
55375
+ program: string().min(1).optional(),
55376
+ options: record(string(), DishwasherValueSchema).optional()
55377
+ }), _void(), {
55202
55378
  kind: "mutation",
55203
55379
  auth: "protected"
55204
- }), method(object({ deviceId: number().int().nonnegative() }), _void(), {
55380
+ }), method(object({ deviceId: DeviceIdSchema }), _void(), {
55205
55381
  kind: "mutation",
55206
55382
  auth: "protected"
55207
- }), method(object({ deviceId: number().int().nonnegative() }), _void(), {
55383
+ }), method(object({ deviceId: DeviceIdSchema }), _void(), {
55384
+ kind: "mutation",
55385
+ auth: "protected"
55386
+ }), method(object({ deviceId: DeviceIdSchema }), _void(), {
55208
55387
  kind: "mutation",
55209
55388
  auth: "protected"
55210
55389
  }), method(object({
55211
- deviceId: number().int().nonnegative(),
55390
+ deviceId: DeviceIdSchema,
55212
55391
  program: string().min(1)
55213
55392
  }), _void(), {
55214
55393
  kind: "mutation",
55215
55394
  auth: "protected"
55216
55395
  }), method(object({
55217
- deviceId: number().int().nonnegative(),
55396
+ deviceId: DeviceIdSchema,
55218
55397
  on: boolean()
55219
55398
  }), _void(), {
55220
55399
  kind: "mutation",
55221
55400
  auth: "protected"
55222
55401
  }), method(object({
55223
- deviceId: number().int().nonnegative(),
55402
+ deviceId: DeviceIdSchema,
55224
55403
  on: boolean()
55225
55404
  }), _void(), {
55226
55405
  kind: "mutation",
55227
55406
  auth: "protected"
55228
55407
  }), method(object({
55229
- deviceId: number().int().nonnegative(),
55408
+ deviceId: DeviceIdSchema,
55230
55409
  on: boolean()
55231
55410
  }), _void(), {
55232
55411
  kind: "mutation",
55233
55412
  auth: "protected"
55234
55413
  }), method(object({
55235
- deviceId: number().int().nonnegative(),
55414
+ deviceId: DeviceIdSchema,
55236
55415
  on: boolean()
55237
55416
  }), _void(), {
55238
55417
  kind: "mutation",
55239
55418
  auth: "protected"
55240
55419
  }), method(object({
55241
- deviceId: number().int().nonnegative(),
55420
+ deviceId: DeviceIdSchema,
55242
55421
  on: boolean()
55243
55422
  }), _void(), {
55244
55423
  kind: "mutation",
55245
55424
  auth: "protected"
55246
55425
  }), method(object({
55247
- deviceId: number().int().nonnegative(),
55426
+ deviceId: DeviceIdSchema,
55248
55427
  on: boolean()
55249
55428
  }), _void(), {
55250
55429
  kind: "mutation",
55251
55430
  auth: "protected"
55252
55431
  }), method(object({
55253
- deviceId: number().int().nonnegative(),
55432
+ deviceId: DeviceIdSchema,
55254
55433
  on: boolean()
55255
55434
  }), _void(), {
55256
55435
  kind: "mutation",
55257
55436
  auth: "protected"
55258
55437
  }), method(object({
55259
- deviceId: number().int().nonnegative(),
55438
+ deviceId: DeviceIdSchema,
55260
55439
  key: string().min(1),
55261
- value: union([
55262
- boolean(),
55263
- string(),
55264
- number()
55265
- ])
55440
+ value: DishwasherValueSchema
55266
55441
  }), _void(), {
55267
55442
  kind: "mutation",
55268
55443
  auth: "protected"
55269
- });
55444
+ }), method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" });
55270
55445
  object({
55271
55446
  /** Ms epoch of the last press. null = never observed since this provider started. */
55272
55447
  lastPressedAt: number().nullable(),
@@ -65367,6 +65542,12 @@ Object.freeze({
65367
65542
  addonId: null,
65368
65543
  access: "view"
65369
65544
  },
65545
+ "dishwasher.getOptions": {
65546
+ capName: "dishwasher",
65547
+ capScope: "device",
65548
+ addonId: null,
65549
+ access: "view"
65550
+ },
65370
65551
  "dishwasher.getStatus": {
65371
65552
  capName: "dishwasher",
65372
65553
  capScope: "device",
@@ -65379,6 +65560,12 @@ Object.freeze({
65379
65560
  addonId: null,
65380
65561
  access: "create"
65381
65562
  },
65563
+ "dishwasher.resume": {
65564
+ capName: "dishwasher",
65565
+ capScope: "device",
65566
+ addonId: null,
65567
+ access: "create"
65568
+ },
65382
65569
  "dishwasher.setChildLock": {
65383
65570
  capName: "dishwasher",
65384
65571
  capScope: "device",
@@ -69879,6 +70066,12 @@ Object.freeze({
69879
70066
  addonId: null,
69880
70067
  access: "view"
69881
70068
  },
70069
+ "storageMigration.moverClearance": {
70070
+ capName: "storage-migration",
70071
+ capScope: "system",
70072
+ addonId: null,
70073
+ access: "view"
70074
+ },
69882
70075
  "storageMigration.movers": {
69883
70076
  capName: "storage-migration",
69884
70077
  capScope: "system",
@@ -72072,6 +72265,11 @@ Object.freeze({
72072
72265
  form: "single",
72073
72266
  optional: false
72074
72267
  }],
72268
+ "dishwasher.getOptions": [{
72269
+ name: "deviceId",
72270
+ form: "single",
72271
+ optional: false
72272
+ }],
72075
72273
  "dishwasher.getStatus": [{
72076
72274
  name: "deviceId",
72077
72275
  form: "single",
@@ -72082,6 +72280,11 @@ Object.freeze({
72082
72280
  form: "single",
72083
72281
  optional: false
72084
72282
  }],
72283
+ "dishwasher.resume": [{
72284
+ name: "deviceId",
72285
+ form: "single",
72286
+ optional: false
72287
+ }],
72085
72288
  "dishwasher.setChildLock": [{
72086
72289
  name: "deviceId",
72087
72290
  form: "single",
@@ -74168,6 +74371,9 @@ new Map(Object.entries({
74168
74371
  "wrapper-update-available": "system",
74169
74372
  "backup-completed": "system",
74170
74373
  "export-completed": "system",
74374
+ "alert-critical": "system",
74375
+ "alert-error": "system",
74376
+ "alert-critical-resolved": "system",
74171
74377
  "storage-location-low": "system",
74172
74378
  "storage-location-critical": "system",
74173
74379
  "storage-location-ok": "system",
@@ -74292,6 +74498,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
74292
74498
  "storage-location-ok"
74293
74499
  ]
74294
74500
  },
74501
+ {
74502
+ id: "alerts",
74503
+ family: "system",
74504
+ label: "Alerts",
74505
+ kinds: [
74506
+ "alert-critical",
74507
+ "alert-error",
74508
+ "alert-critical-resolved"
74509
+ ]
74510
+ },
74295
74511
  {
74296
74512
  id: "alarm",
74297
74513
  family: "alarm",
@@ -74336,6 +74552,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
74336
74552
  return [[descriptor.kind, field]];
74337
74553
  })));
74338
74554
  Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
74555
+ object({
74556
+ phase: _enum(["raised", "resolved"]),
74557
+ episodeId: string().min(1),
74558
+ alertId: string().min(1),
74559
+ severity: AlertSeveritySchema,
74560
+ category: string(),
74561
+ title: string(),
74562
+ message: string(),
74563
+ sourceType: string().optional(),
74564
+ sourceId: string().optional(),
74565
+ nodeId: string().optional(),
74566
+ /** The alert's own action link (where the operator acts on it), when it has one. */
74567
+ actionUrl: string().optional(),
74568
+ at: number()
74569
+ });
74339
74570
  var RULE_BODY_ONLY = ["body"];
74340
74571
  var RULE_TEXT = ["title", "body"];
74341
74572
  var BATTERY = ["device-battery-low", "device-battery-normal"];
@@ -74345,6 +74576,11 @@ var TANK = [
74345
74576
  "device-tank-full",
74346
74577
  "device-tank-normal"
74347
74578
  ];
74579
+ var ALERT_EPISODE = [
74580
+ "alert-critical",
74581
+ "alert-error",
74582
+ "alert-critical-resolved"
74583
+ ];
74348
74584
  var UPDATES = [
74349
74585
  "addon-update-available",
74350
74586
  "server-update-available",
@@ -74537,14 +74773,14 @@ var STATE_SUMMARY_VARS = [
74537
74773
  ([...RULE_TEXT], [...CONSUMABLE]),
74538
74774
  ([...RULE_TEXT], [...TANK]),
74539
74775
  [...RULE_TEXT],
74540
- ([...RULE_TEXT], [...UPDATES]),
74541
- ([...RULE_TEXT], [...UPDATES]),
74542
- [...RULE_TEXT],
74776
+ ([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
74777
+ ([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
74543
74778
  [...RULE_TEXT],
74544
74779
  [...RULE_TEXT],
74545
74780
  [...RULE_TEXT],
74546
74781
  [...RULE_TEXT],
74547
74782
  [...RULE_TEXT],
74783
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
74548
74784
  [...RULE_TEXT],
74549
74785
  [...RULE_TEXT],
74550
74786
  [...RULE_TEXT],
@@ -74562,7 +74798,11 @@ var STATE_SUMMARY_VARS = [
74562
74798
  [...RULE_TEXT],
74563
74799
  [...RULE_TEXT],
74564
74800
  [...RULE_TEXT],
74565
- [...RULE_TEXT],
74801
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
74802
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
74803
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
74804
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
74805
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
74566
74806
  [...RULE_TEXT],
74567
74807
  [...RULE_TEXT],
74568
74808
  [...RULE_TEXT],