@camstack/addon-smtp-nodemailer 1.2.123 → 1.2.125

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.
@@ -36,7 +36,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
36
36
  }) : target, mod));
37
37
  var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
38
38
  //#endregion
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).
@@ -7824,6 +7833,12 @@ function normalizeAddonInitResult(result) {
7824
7833
  if (Array.isArray(result)) return { providers: result };
7825
7834
  return result;
7826
7835
  }
7836
+ /**
7837
+ * The share-view scope kinds a `csv_*` share token can carry. The hub mints
7838
+ * and validates them (`share-token.service.ts` builds its enum from this
7839
+ * list); a data plane names the kinds it ACCEPTS in `share`.
7840
+ */
7841
+ var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
7827
7842
  /** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
7828
7843
  var PeerBytesTicketSchema = object({
7829
7844
  /** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
@@ -12408,6 +12423,229 @@ var ConvertResultSchema = object({
12408
12423
  files: array(string()).readonly()
12409
12424
  })).readonly()
12410
12425
  });
12426
+ /**
12427
+ * Zod schemas for persisted record types.
12428
+ *
12429
+ * These schemas serve as the single source of truth for types that are
12430
+ * stored in the settings-store backend and retrieved via tRPC. They
12431
+ * replace the manual TypeScript interfaces with schema-derived types,
12432
+ * enabling runtime validation when reading from the backend.
12433
+ *
12434
+ * Convention: each schema is named `<Type>Schema`, the inferred TS type
12435
+ * keeps the original name for backward compatibility.
12436
+ */
12437
+ /**
12438
+ * Auth model (v2 — 2026-05-12 caps-only):
12439
+ *
12440
+ * Two principals:
12441
+ * - `isAdmin: true` — full bypass. Admin scope set is ignored.
12442
+ * - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
12443
+ *
12444
+ * No role enum. There used to be `viewer / agent / scoped` and earlier
12445
+ * `super_admin` — collapsed onto the single boolean because every
12446
+ * non-admin caller is governed by the same scope-check rules; the
12447
+ * distinction was only ever used to route role-specific procedures
12448
+ * which we no longer have. CLI / webhook integrations are `cst_*` tokens
12449
+ * with `isAdmin: false` + an explicit scope list.
12450
+ */
12451
+ /** Per-method access flavour. Materialised on every cap method via codegen. */
12452
+ var MethodAccessSchema = _enum([
12453
+ "view",
12454
+ "create",
12455
+ "delete"
12456
+ ]);
12457
+ /**
12458
+ * A single scope grant. Three forms — checked in matcher with OR
12459
+ * semantics; the first match decides whether the call passes:
12460
+ *
12461
+ * - `category` — broadest. `target: 'device' | 'system'` selects every
12462
+ * cap with the matching `scope` declaration. New caps inherit grants
12463
+ * automatically — adding a device cap to the codebase makes it
12464
+ * reachable to every user with `category:device [...]` without a
12465
+ * re-grant. Use this for "family viewer" / "operator" tiers.
12466
+ *
12467
+ * - `addon` — every cap that ships inside a given addon id. Niche;
12468
+ * useful when an integration needs to interact with one specific
12469
+ * addon's surface regardless of how many caps it exports.
12470
+ *
12471
+ * - `capability` — the most precise form. Single cap name. Use for
12472
+ * integration tokens where you want to grant `addons.installPackage`
12473
+ * and nothing else.
12474
+ *
12475
+ * `access` is REQUIRED with min 1 element. `admin` bypass is the
12476
+ * "give me everything" escape; there is no wildcard scope.
12477
+ */
12478
+ var AllowedProviderSchema = union([literal("*"), array(string())]);
12479
+ var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
12480
+ var CapScopeSchema = _enum(["device", "system"]);
12481
+ /**
12482
+ * DeviceSelector (scope model v3 — 2026-08-12).
12483
+ *
12484
+ * A `device` grant no longer carries a frozen list of deviceIds. It carries
12485
+ * a SELECTOR the matcher resolves against the live fleet, so the grant can be
12486
+ * DYNAMIC: a `types:['camera']` selector automatically covers a camera added
12487
+ * AFTER the grant was minted — no re-grant, no re-login.
12488
+ *
12489
+ * - `all` — every device in the deployment. The broad viewer/operator
12490
+ * lever without a `category` grant (a `category` grant also covers device
12491
+ * caps that carry no deviceId; `all` is specifically the device set).
12492
+ * - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
12493
+ * grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
12494
+ * is NOT covered until the grant is edited.
12495
+ * - `types` — every device of a `DeviceType` (e.g. every `camera`).
12496
+ * DYNAMIC. A device that changes type, or a new device of the type,
12497
+ * re-resolves on the next request.
12498
+ * - `locations` — every device whose operator-assigned `location` label is
12499
+ * in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
12500
+ * null/unset location matches NO `locations` selector.
12501
+ */
12502
+ var DeviceSelectorSchema = discriminatedUnion("kind", [
12503
+ object({ kind: literal("all") }),
12504
+ object({
12505
+ kind: literal("ids"),
12506
+ ids: array(number().int()).min(1)
12507
+ }),
12508
+ object({
12509
+ kind: literal("types"),
12510
+ types: array(_enum(DeviceType)).min(1)
12511
+ }),
12512
+ object({
12513
+ kind: literal("locations"),
12514
+ locations: array(string().min(1)).min(1)
12515
+ })
12516
+ ]);
12517
+ var DeviceTokenScopeSchema = object({
12518
+ type: literal("device"),
12519
+ /** The device SET this grant covers — resolved against the live fleet. */
12520
+ selector: DeviceSelectorSchema,
12521
+ access: array(MethodAccessSchema).min(1),
12522
+ /**
12523
+ * Whether a grant on a PARENT device transparently covers its accessory
12524
+ * CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
12525
+ * Direction is parent → children ONLY.
12526
+ *
12527
+ * Absent → the matcher DERIVES it from the access flavour: `view`
12528
+ * inherits (a camera viewer sees the camera's accessories), `create` /
12529
+ * `delete` do NOT (actuating/removing a child is an explicit act the
12530
+ * operator must grant on the child, not inherit from the parent). Set it
12531
+ * explicitly to override that default per grant.
12532
+ */
12533
+ includeLinked: boolean().optional()
12534
+ });
12535
+ /**
12536
+ * v2 → v3 lazy migration. A pre-v3 `device` grant carried
12537
+ * `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
12538
+ * `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
12539
+ * EVERY parse path — stored records AND the JWT-carried scope arrays
12540
+ * normalised at the request boundary ({@link normalizeTokenScopes} in
12541
+ * `device-selector.ts`). Chosen over a one-time DB migration because a
12542
+ * migration cannot reach a JWT already in a client's hands; parse-time
12543
+ * migration covers both without a flag day. No cast — the raw object is read
12544
+ * through `Reflect.get` (its static type is `unknown`).
12545
+ */
12546
+ function migrateLegacyTokenScope(raw) {
12547
+ if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
12548
+ if (Reflect.get(raw, "type") !== "device") return raw;
12549
+ if (Reflect.get(raw, "selector") !== void 0) return raw;
12550
+ const targets = Reflect.get(raw, "targets");
12551
+ if (!Array.isArray(targets)) return raw;
12552
+ return {
12553
+ type: "device",
12554
+ selector: {
12555
+ kind: "ids",
12556
+ ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
12557
+ },
12558
+ access: Reflect.get(raw, "access")
12559
+ };
12560
+ }
12561
+ var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
12562
+ object({
12563
+ type: literal("category"),
12564
+ target: CapScopeSchema,
12565
+ access: array(MethodAccessSchema).min(1)
12566
+ }),
12567
+ object({
12568
+ type: literal("capability"),
12569
+ target: string(),
12570
+ access: array(MethodAccessSchema).min(1)
12571
+ }),
12572
+ object({
12573
+ type: literal("addon"),
12574
+ target: string(),
12575
+ access: array(MethodAccessSchema).min(1)
12576
+ }),
12577
+ DeviceTokenScopeSchema
12578
+ ]));
12579
+ object({
12580
+ id: string(),
12581
+ username: string(),
12582
+ passwordHash: string(),
12583
+ /**
12584
+ * Admin bypass. When true, the middleware skips the scope-access
12585
+ * check entirely. There is no other axis of privilege; the legacy
12586
+ * role enum collapsed onto this boolean in v2.
12587
+ */
12588
+ isAdmin: boolean().default(false),
12589
+ allowedProviders: AllowedProviderSchema,
12590
+ allowedDevices: AllowedDevicesSchema,
12591
+ /**
12592
+ * Scopes granted to this user. Admins bypass; their `scopes` is
12593
+ * ignored. Non-admins without scopes are locked out of every
12594
+ * protected call.
12595
+ */
12596
+ scopes: array(TokenScopeSchema).default([]),
12597
+ createdAt: number(),
12598
+ updatedAt: number()
12599
+ });
12600
+ object({
12601
+ id: string(),
12602
+ label: string(),
12603
+ isAdmin: boolean().default(false),
12604
+ allowedProviders: AllowedProviderSchema,
12605
+ allowedDevices: AllowedDevicesSchema,
12606
+ tokenHash: string(),
12607
+ tokenPrefix: string(),
12608
+ createdAt: number(),
12609
+ lastUsedAt: number().optional()
12610
+ });
12611
+ object({
12612
+ id: string(),
12613
+ userId: string(),
12614
+ name: string(),
12615
+ tokenHash: string(),
12616
+ tokenPrefix: string(),
12617
+ scopes: array(TokenScopeSchema),
12618
+ expiresAt: number().nullish(),
12619
+ lastUsedAt: number().nullish(),
12620
+ createdAt: number()
12621
+ });
12622
+ /** What a share-view grant lets its holder see. */
12623
+ var ShareViewGrantSchema = object({
12624
+ kind: _enum(SHARE_VIEW_KINDS),
12625
+ deviceIds: array(number().int().nonnegative()).min(1).max(64),
12626
+ /** Talk-back, opt-in at mint time; absent means off. */
12627
+ talk: boolean().optional()
12628
+ });
12629
+ var ShareViewScopeSchema = object({
12630
+ type: literal("share-view"),
12631
+ grant: ShareViewGrantSchema
12632
+ });
12633
+ var AddonRoutesScopeSchema = object({
12634
+ type: literal("addon-routes"),
12635
+ access: array(MethodAccessSchema).min(1)
12636
+ });
12637
+ var CredentialScopeSchema = union([
12638
+ literal("*"),
12639
+ ShareViewScopeSchema,
12640
+ AddonRoutesScopeSchema,
12641
+ TokenScopeSchema
12642
+ ]);
12643
+ object({
12644
+ kind: literal("credential"),
12645
+ sub: string().min(1),
12646
+ jti: string().min(16),
12647
+ scopes: array(CredentialScopeSchema).min(1)
12648
+ });
12411
12649
  _enum(["new-session", "step-up"]);
12412
12650
  /** The languages the hub's app landing pages are written in (D858). */
12413
12651
  var AppPageLangSchema = _enum(["en", "it"]);
@@ -13124,7 +13362,14 @@ var AlertSeveritySchema = _enum([
13124
13362
  ]);
13125
13363
  var AlertActionSchema = object({
13126
13364
  label: string(),
13127
- href: string().optional()
13365
+ href: string().optional(),
13366
+ /**
13367
+ * How `href` is followed. Absent / `app`: an admin-ui route (client-side).
13368
+ * `server`: a route the HUB serves (an addon HTTP route such as an OAuth
13369
+ * start) — the browser must leave the SPA with a full navigation, because
13370
+ * the SPA has no such route and would bounce to the home page.
13371
+ */
13372
+ navigation: _enum(["app", "server"]).optional()
13128
13373
  });
13129
13374
  var AlertStatusSchema = _enum([
13130
13375
  "active",
@@ -41500,6 +41745,9 @@ var NcSystemEventKindSchema = _enum([
41500
41745
  "server-updated",
41501
41746
  "export-completed",
41502
41747
  "backup-completed",
41748
+ "alert-critical",
41749
+ "alert-error",
41750
+ "alert-critical-resolved",
41503
41751
  "camera-online",
41504
41752
  "camera-offline",
41505
41753
  "camera-disabled",
@@ -43535,202 +43783,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
43535
43783
  auth: "admin"
43536
43784
  }), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
43537
43785
  /**
43538
- * Zod schemas for persisted record types.
43539
- *
43540
- * These schemas serve as the single source of truth for types that are
43541
- * stored in the settings-store backend and retrieved via tRPC. They
43542
- * replace the manual TypeScript interfaces with schema-derived types,
43543
- * enabling runtime validation when reading from the backend.
43544
- *
43545
- * Convention: each schema is named `<Type>Schema`, the inferred TS type
43546
- * keeps the original name for backward compatibility.
43547
- */
43548
- /**
43549
- * Auth model (v2 — 2026-05-12 caps-only):
43550
- *
43551
- * Two principals:
43552
- * - `isAdmin: true` — full bypass. Admin scope set is ignored.
43553
- * - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
43554
- *
43555
- * No role enum. There used to be `viewer / agent / scoped` and earlier
43556
- * `super_admin` — collapsed onto the single boolean because every
43557
- * non-admin caller is governed by the same scope-check rules; the
43558
- * distinction was only ever used to route role-specific procedures
43559
- * which we no longer have. CLI / webhook integrations are `cst_*` tokens
43560
- * with `isAdmin: false` + an explicit scope list.
43561
- */
43562
- /** Per-method access flavour. Materialised on every cap method via codegen. */
43563
- var MethodAccessSchema = _enum([
43564
- "view",
43565
- "create",
43566
- "delete"
43567
- ]);
43568
- /**
43569
- * A single scope grant. Three forms — checked in matcher with OR
43570
- * semantics; the first match decides whether the call passes:
43571
- *
43572
- * - `category` — broadest. `target: 'device' | 'system'` selects every
43573
- * cap with the matching `scope` declaration. New caps inherit grants
43574
- * automatically — adding a device cap to the codebase makes it
43575
- * reachable to every user with `category:device [...]` without a
43576
- * re-grant. Use this for "family viewer" / "operator" tiers.
43577
- *
43578
- * - `addon` — every cap that ships inside a given addon id. Niche;
43579
- * useful when an integration needs to interact with one specific
43580
- * addon's surface regardless of how many caps it exports.
43581
- *
43582
- * - `capability` — the most precise form. Single cap name. Use for
43583
- * integration tokens where you want to grant `addons.installPackage`
43584
- * and nothing else.
43585
- *
43586
- * `access` is REQUIRED with min 1 element. `admin` bypass is the
43587
- * "give me everything" escape; there is no wildcard scope.
43588
- */
43589
- var AllowedProviderSchema = union([literal("*"), array(string())]);
43590
- var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
43591
- var CapScopeSchema = _enum(["device", "system"]);
43592
- /**
43593
- * DeviceSelector (scope model v3 — 2026-08-12).
43594
- *
43595
- * A `device` grant no longer carries a frozen list of deviceIds. It carries
43596
- * a SELECTOR the matcher resolves against the live fleet, so the grant can be
43597
- * DYNAMIC: a `types:['camera']` selector automatically covers a camera added
43598
- * AFTER the grant was minted — no re-grant, no re-login.
43599
- *
43600
- * - `all` — every device in the deployment. The broad viewer/operator
43601
- * lever without a `category` grant (a `category` grant also covers device
43602
- * caps that carry no deviceId; `all` is specifically the device set).
43603
- * - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
43604
- * grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
43605
- * is NOT covered until the grant is edited.
43606
- * - `types` — every device of a `DeviceType` (e.g. every `camera`).
43607
- * DYNAMIC. A device that changes type, or a new device of the type,
43608
- * re-resolves on the next request.
43609
- * - `locations` — every device whose operator-assigned `location` label is
43610
- * in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
43611
- * null/unset location matches NO `locations` selector.
43612
- */
43613
- var DeviceSelectorSchema = discriminatedUnion("kind", [
43614
- object({ kind: literal("all") }),
43615
- object({
43616
- kind: literal("ids"),
43617
- ids: array(number().int()).min(1)
43618
- }),
43619
- object({
43620
- kind: literal("types"),
43621
- types: array(_enum(DeviceType)).min(1)
43622
- }),
43623
- object({
43624
- kind: literal("locations"),
43625
- locations: array(string().min(1)).min(1)
43626
- })
43627
- ]);
43628
- var DeviceTokenScopeSchema = object({
43629
- type: literal("device"),
43630
- /** The device SET this grant covers — resolved against the live fleet. */
43631
- selector: DeviceSelectorSchema,
43632
- access: array(MethodAccessSchema).min(1),
43633
- /**
43634
- * Whether a grant on a PARENT device transparently covers its accessory
43635
- * CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
43636
- * Direction is parent → children ONLY.
43637
- *
43638
- * Absent → the matcher DERIVES it from the access flavour: `view`
43639
- * inherits (a camera viewer sees the camera's accessories), `create` /
43640
- * `delete` do NOT (actuating/removing a child is an explicit act the
43641
- * operator must grant on the child, not inherit from the parent). Set it
43642
- * explicitly to override that default per grant.
43643
- */
43644
- includeLinked: boolean().optional()
43645
- });
43646
- /**
43647
- * v2 → v3 lazy migration. A pre-v3 `device` grant carried
43648
- * `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
43649
- * `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
43650
- * EVERY parse path — stored records AND the JWT-carried scope arrays
43651
- * normalised at the request boundary ({@link normalizeTokenScopes} in
43652
- * `device-selector.ts`). Chosen over a one-time DB migration because a
43653
- * migration cannot reach a JWT already in a client's hands; parse-time
43654
- * migration covers both without a flag day. No cast — the raw object is read
43655
- * through `Reflect.get` (its static type is `unknown`).
43656
- */
43657
- function migrateLegacyTokenScope(raw) {
43658
- if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
43659
- if (Reflect.get(raw, "type") !== "device") return raw;
43660
- if (Reflect.get(raw, "selector") !== void 0) return raw;
43661
- const targets = Reflect.get(raw, "targets");
43662
- if (!Array.isArray(targets)) return raw;
43663
- return {
43664
- type: "device",
43665
- selector: {
43666
- kind: "ids",
43667
- ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
43668
- },
43669
- access: Reflect.get(raw, "access")
43670
- };
43671
- }
43672
- var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
43673
- object({
43674
- type: literal("category"),
43675
- target: CapScopeSchema,
43676
- access: array(MethodAccessSchema).min(1)
43677
- }),
43678
- object({
43679
- type: literal("capability"),
43680
- target: string(),
43681
- access: array(MethodAccessSchema).min(1)
43682
- }),
43683
- object({
43684
- type: literal("addon"),
43685
- target: string(),
43686
- access: array(MethodAccessSchema).min(1)
43687
- }),
43688
- DeviceTokenScopeSchema
43689
- ]));
43690
- object({
43691
- id: string(),
43692
- username: string(),
43693
- passwordHash: string(),
43694
- /**
43695
- * Admin bypass. When true, the middleware skips the scope-access
43696
- * check entirely. There is no other axis of privilege; the legacy
43697
- * role enum collapsed onto this boolean in v2.
43698
- */
43699
- isAdmin: boolean().default(false),
43700
- allowedProviders: AllowedProviderSchema,
43701
- allowedDevices: AllowedDevicesSchema,
43702
- /**
43703
- * Scopes granted to this user. Admins bypass; their `scopes` is
43704
- * ignored. Non-admins without scopes are locked out of every
43705
- * protected call.
43706
- */
43707
- scopes: array(TokenScopeSchema).default([]),
43708
- createdAt: number(),
43709
- updatedAt: number()
43710
- });
43711
- object({
43712
- id: string(),
43713
- label: string(),
43714
- isAdmin: boolean().default(false),
43715
- allowedProviders: AllowedProviderSchema,
43716
- allowedDevices: AllowedDevicesSchema,
43717
- tokenHash: string(),
43718
- tokenPrefix: string(),
43719
- createdAt: number(),
43720
- lastUsedAt: number().optional()
43721
- });
43722
- object({
43723
- id: string(),
43724
- userId: string(),
43725
- name: string(),
43726
- tokenHash: string(),
43727
- tokenPrefix: string(),
43728
- scopes: array(TokenScopeSchema),
43729
- expiresAt: number().nullish(),
43730
- lastUsedAt: number().nullish(),
43731
- createdAt: number()
43732
- });
43733
- /**
43734
43786
  * `oauth-integration` — a collection cap by which an addon declares
43735
43787
  * itself a linkable OAuth client of the hub's core `/oauth2/*` server.
43736
43788
  * Each provider returns a static descriptor; the core enumerates them
@@ -50545,7 +50597,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
50545
50597
  }), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
50546
50598
  kind: "mutation",
50547
50599
  auth: "admin"
50548
- }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
50600
+ }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
50601
+ clear: boolean(),
50602
+ repointLocationId: string().optional()
50603
+ }), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
50549
50604
  kind: "mutation",
50550
50605
  auth: "admin"
50551
50606
  }), method(StorageCleanupInputSchema, object({ jobId: string() }), {
@@ -53980,6 +54035,11 @@ object({
53980
54035
  *
53981
54036
  * `kind: 'poll'` — cloud REST APIs typically have no push channel; the
53982
54037
  * provider refreshes the slice on an interval and eagerly after commands.
54038
+ *
54039
+ * UNKNOWN IS NOT OFF. Every field the appliance reports separately is
54040
+ * nullable: `null` means "not known right now" (the appliance has not said,
54041
+ * the link is down, or the description does not carry it) and is never
54042
+ * rendered or exported as `false` / `0`. `availability` says why.
53983
54043
  */
53984
54044
  var DishwasherStateSchema = _enum([
53985
54045
  "idle",
@@ -53989,112 +54049,227 @@ var DishwasherStateSchema = _enum([
53989
54049
  "error",
53990
54050
  "unavailable"
53991
54051
  ]);
54052
+ /**
54053
+ * The appliance's own operation state, uncollapsed. `state` above is the coarse
54054
+ * view for compact surfaces; this is what the appliance said.
54055
+ */
54056
+ var DishwasherOperationStateSchema = _enum([
54057
+ "Inactive",
54058
+ "Ready",
54059
+ "DelayedStart",
54060
+ "Run",
54061
+ "Pause",
54062
+ "ActionRequired",
54063
+ "Finished",
54064
+ "Error",
54065
+ "Aborting"
54066
+ ]);
54067
+ /**
54068
+ * Why fields may be `null`:
54069
+ * - `available` — the link is up and the description is loaded;
54070
+ * - `offline` — the local link is down (values are unknown, not last-known);
54071
+ * - `description-missing` — the link is up but the appliance's description could not
54072
+ * be loaded, so its values cannot be decoded.
54073
+ */
54074
+ var DishwasherAvailabilitySchema = _enum([
54075
+ "available",
54076
+ "offline",
54077
+ "description-missing"
54078
+ ]);
53992
54079
  var DishwasherConsumableLevelSchema = _enum([
53993
54080
  "ok",
53994
54081
  "low",
53995
54082
  "empty"
53996
54083
  ]);
53997
54084
  object({
54085
+ availability: DishwasherAvailabilitySchema,
54086
+ /** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
53998
54087
  state: DishwasherStateSchema,
53999
- /** Active program id/name, or null when none selected / unknown. */
54088
+ /** The appliance's operation state as reported; null when not known. */
54089
+ operationState: DishwasherOperationStateSchema.nullable(),
54090
+ /** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
54000
54091
  program: string().nullable(),
54001
- /** Program tokens the hardware accepts — drives the UI selector. */
54092
+ /** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
54093
+ selectedProgram: string().nullable(),
54094
+ /** Feature keys of the programs the appliance currently offers — drives the UI selector. */
54002
54095
  availablePrograms: array(string()),
54003
- /** Minutes remaining on the active cycle, or null when not running. */
54004
- remainingMinutes: number().int().nonnegative().nullable(),
54096
+ /** Seconds remaining on the active cycle, or null when not running / not known. */
54097
+ remainingSeconds: number().int().nonnegative().nullable(),
54098
+ /** Seconds the delayed start is set to (time until the cycle starts), or null. */
54099
+ delayedStartSeconds: number().int().nonnegative().nullable(),
54005
54100
  /** Cycle completion 0..100, or null when not applicable. */
54006
54101
  progressPercent: number().min(0).max(100).nullable(),
54007
- /** True when the door is reported open. */
54008
- doorOpen: boolean(),
54009
- /** True when remote start is allowed (door closed, power on, etc.). */
54010
- remoteStartAllowed: boolean(),
54011
- /** Main power / switched-on state. */
54012
- powerOn: boolean(),
54102
+ /** True when the door is reported open; null when the door state is not known. */
54103
+ doorOpen: boolean().nullable(),
54104
+ /** True when the door is latched (locked) during a cycle; null when not reported. */
54105
+ doorLocked: boolean().nullable(),
54106
+ /** True when remote start is allowed (door closed, power on, etc.); null when not known. */
54107
+ remoteStartAllowed: boolean().nullable(),
54108
+ /** True when the appliance accepts remote control now; null when not known. */
54109
+ remoteControlActive: boolean().nullable(),
54110
+ /** True while somebody operates the appliance at its panel; null when not reported. */
54111
+ localControlActive: boolean().nullable(),
54112
+ /** Main power / switched-on state; null when not known. */
54113
+ powerOn: boolean().nullable(),
54114
+ /** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
54115
+ powerState: string().nullable(),
54013
54116
  saltLevel: DishwasherConsumableLevelSchema.nullable(),
54014
54117
  rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
54015
- halfLoad: boolean(),
54016
- hygienePlus: boolean(),
54118
+ /** Option states: null when the appliance does not expose the option or has not said. */
54119
+ halfLoad: boolean().nullable(),
54120
+ hygienePlus: boolean().nullable(),
54017
54121
  /** Extra dry option when the appliance exposes it. */
54018
- extraDry: boolean(),
54122
+ extraDry: boolean().nullable(),
54019
54123
  /** Intensive zone (lower basket) when the appliance exposes it. */
54020
- intensiveZone: boolean(),
54124
+ intensiveZone: boolean().nullable(),
54021
54125
  /** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
54022
- varioSpeedPlus: boolean(),
54023
- /** Child lock (controls disabled on the appliance). */
54024
- childLock: boolean(),
54126
+ varioSpeedPlus: boolean().nullable(),
54127
+ /** Child lock (controls disabled on the appliance); null when not known. */
54128
+ childLock: boolean().nullable(),
54129
+ /** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
54130
+ activeEvents: array(string()),
54131
+ /** Numeric error code when the appliance reports one; null otherwise. */
54025
54132
  errorCode: number().nullable(),
54133
+ /** Name of the raised alert-level event while the appliance is in error; null otherwise. */
54026
54134
  errorLabel: string().nullable(),
54135
+ /** Ms epoch of the last value received from the appliance; 0 = never. */
54027
54136
  lastFetchedAt: number()
54028
54137
  });
54029
- DeviceType.Dishwasher, method(object({ deviceId: number().int().nonnegative() }), _void(), {
54138
+ var DeviceIdSchema = number().int().nonnegative();
54139
+ /** A value a program option or setting can take. */
54140
+ var DishwasherValueSchema = union([
54141
+ boolean(),
54142
+ string(),
54143
+ number()
54144
+ ]);
54145
+ var DishwasherAccessSchema = _enum([
54146
+ "none",
54147
+ "read",
54148
+ "readWrite",
54149
+ "writeOnly",
54150
+ "readStatic"
54151
+ ]);
54152
+ /**
54153
+ * One option or setting the appliance declares, with the constraints its description
54154
+ * gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
54155
+ */
54156
+ var DishwasherOptionDescriptorSchema = object({
54157
+ /** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
54158
+ key: string(),
54159
+ /** Last segment of the key, for display. */
54160
+ name: string(),
54161
+ type: _enum([
54162
+ "boolean",
54163
+ "number",
54164
+ "enum",
54165
+ "string"
54166
+ ]),
54167
+ access: DishwasherAccessSchema,
54168
+ /** The appliance reports this entity as currently available. */
54169
+ available: boolean(),
54170
+ /** Unit the description declares for a number; null when it declares none. */
54171
+ unit: string().nullable(),
54172
+ min: number().nullable(),
54173
+ max: number().nullable(),
54174
+ step: number().nullable(),
54175
+ /** Allowed members of an enum; null for other types. */
54176
+ enumValues: array(string()).nullable(),
54177
+ defaultValue: DishwasherValueSchema.nullable()
54178
+ });
54179
+ var DishwasherProgramSchema = object({
54180
+ /** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
54181
+ key: string(),
54182
+ name: string(),
54183
+ /** The appliance currently offers this program. */
54184
+ available: boolean(),
54185
+ /** The options this program lists, with the program-level access / availability / default. */
54186
+ options: array(DishwasherOptionDescriptorSchema)
54187
+ });
54188
+ var DishwasherOptionsSchema = object({
54189
+ availability: DishwasherAvailabilitySchema,
54190
+ /** What the appliance can be told to do, from the commands its description declares. */
54191
+ supportsStart: boolean(),
54192
+ supportsPause: boolean(),
54193
+ supportsResume: boolean(),
54194
+ supportsStop: boolean(),
54195
+ supportsPower: boolean(),
54196
+ /** Every program the description lists, with its options. */
54197
+ programs: array(DishwasherProgramSchema),
54198
+ /** Every option and setting entity the description lists (programs reference these by key). */
54199
+ options: array(DishwasherOptionDescriptorSchema)
54200
+ });
54201
+ DeviceType.Dishwasher, method(object({
54202
+ deviceId: DeviceIdSchema,
54203
+ program: string().min(1).optional(),
54204
+ options: record(string(), DishwasherValueSchema).optional()
54205
+ }), _void(), {
54030
54206
  kind: "mutation",
54031
54207
  auth: "protected"
54032
- }), method(object({ deviceId: number().int().nonnegative() }), _void(), {
54208
+ }), method(object({ deviceId: DeviceIdSchema }), _void(), {
54033
54209
  kind: "mutation",
54034
54210
  auth: "protected"
54035
- }), method(object({ deviceId: number().int().nonnegative() }), _void(), {
54211
+ }), method(object({ deviceId: DeviceIdSchema }), _void(), {
54212
+ kind: "mutation",
54213
+ auth: "protected"
54214
+ }), method(object({ deviceId: DeviceIdSchema }), _void(), {
54036
54215
  kind: "mutation",
54037
54216
  auth: "protected"
54038
54217
  }), method(object({
54039
- deviceId: number().int().nonnegative(),
54218
+ deviceId: DeviceIdSchema,
54040
54219
  program: string().min(1)
54041
54220
  }), _void(), {
54042
54221
  kind: "mutation",
54043
54222
  auth: "protected"
54044
54223
  }), method(object({
54045
- deviceId: number().int().nonnegative(),
54224
+ deviceId: DeviceIdSchema,
54046
54225
  on: boolean()
54047
54226
  }), _void(), {
54048
54227
  kind: "mutation",
54049
54228
  auth: "protected"
54050
54229
  }), method(object({
54051
- deviceId: number().int().nonnegative(),
54230
+ deviceId: DeviceIdSchema,
54052
54231
  on: boolean()
54053
54232
  }), _void(), {
54054
54233
  kind: "mutation",
54055
54234
  auth: "protected"
54056
54235
  }), method(object({
54057
- deviceId: number().int().nonnegative(),
54236
+ deviceId: DeviceIdSchema,
54058
54237
  on: boolean()
54059
54238
  }), _void(), {
54060
54239
  kind: "mutation",
54061
54240
  auth: "protected"
54062
54241
  }), method(object({
54063
- deviceId: number().int().nonnegative(),
54242
+ deviceId: DeviceIdSchema,
54064
54243
  on: boolean()
54065
54244
  }), _void(), {
54066
54245
  kind: "mutation",
54067
54246
  auth: "protected"
54068
54247
  }), method(object({
54069
- deviceId: number().int().nonnegative(),
54248
+ deviceId: DeviceIdSchema,
54070
54249
  on: boolean()
54071
54250
  }), _void(), {
54072
54251
  kind: "mutation",
54073
54252
  auth: "protected"
54074
54253
  }), method(object({
54075
- deviceId: number().int().nonnegative(),
54254
+ deviceId: DeviceIdSchema,
54076
54255
  on: boolean()
54077
54256
  }), _void(), {
54078
54257
  kind: "mutation",
54079
54258
  auth: "protected"
54080
54259
  }), method(object({
54081
- deviceId: number().int().nonnegative(),
54260
+ deviceId: DeviceIdSchema,
54082
54261
  on: boolean()
54083
54262
  }), _void(), {
54084
54263
  kind: "mutation",
54085
54264
  auth: "protected"
54086
54265
  }), method(object({
54087
- deviceId: number().int().nonnegative(),
54266
+ deviceId: DeviceIdSchema,
54088
54267
  key: string().min(1),
54089
- value: union([
54090
- boolean(),
54091
- string(),
54092
- number()
54093
- ])
54268
+ value: DishwasherValueSchema
54094
54269
  }), _void(), {
54095
54270
  kind: "mutation",
54096
54271
  auth: "protected"
54097
- });
54272
+ }), method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" });
54098
54273
  object({
54099
54274
  /** Ms epoch of the last press. null = never observed since this provider started. */
54100
54275
  lastPressedAt: number().nullable(),
@@ -64154,6 +64329,12 @@ Object.freeze({
64154
64329
  addonId: null,
64155
64330
  access: "view"
64156
64331
  },
64332
+ "dishwasher.getOptions": {
64333
+ capName: "dishwasher",
64334
+ capScope: "device",
64335
+ addonId: null,
64336
+ access: "view"
64337
+ },
64157
64338
  "dishwasher.getStatus": {
64158
64339
  capName: "dishwasher",
64159
64340
  capScope: "device",
@@ -64166,6 +64347,12 @@ Object.freeze({
64166
64347
  addonId: null,
64167
64348
  access: "create"
64168
64349
  },
64350
+ "dishwasher.resume": {
64351
+ capName: "dishwasher",
64352
+ capScope: "device",
64353
+ addonId: null,
64354
+ access: "create"
64355
+ },
64169
64356
  "dishwasher.setChildLock": {
64170
64357
  capName: "dishwasher",
64171
64358
  capScope: "device",
@@ -68666,6 +68853,12 @@ Object.freeze({
68666
68853
  addonId: null,
68667
68854
  access: "view"
68668
68855
  },
68856
+ "storageMigration.moverClearance": {
68857
+ capName: "storage-migration",
68858
+ capScope: "system",
68859
+ addonId: null,
68860
+ access: "view"
68861
+ },
68669
68862
  "storageMigration.movers": {
68670
68863
  capName: "storage-migration",
68671
68864
  capScope: "system",
@@ -70859,6 +71052,11 @@ Object.freeze({
70859
71052
  form: "single",
70860
71053
  optional: false
70861
71054
  }],
71055
+ "dishwasher.getOptions": [{
71056
+ name: "deviceId",
71057
+ form: "single",
71058
+ optional: false
71059
+ }],
70862
71060
  "dishwasher.getStatus": [{
70863
71061
  name: "deviceId",
70864
71062
  form: "single",
@@ -70869,6 +71067,11 @@ Object.freeze({
70869
71067
  form: "single",
70870
71068
  optional: false
70871
71069
  }],
71070
+ "dishwasher.resume": [{
71071
+ name: "deviceId",
71072
+ form: "single",
71073
+ optional: false
71074
+ }],
70872
71075
  "dishwasher.setChildLock": [{
70873
71076
  name: "deviceId",
70874
71077
  form: "single",
@@ -72955,6 +73158,9 @@ new Map(Object.entries({
72955
73158
  "wrapper-update-available": "system",
72956
73159
  "backup-completed": "system",
72957
73160
  "export-completed": "system",
73161
+ "alert-critical": "system",
73162
+ "alert-error": "system",
73163
+ "alert-critical-resolved": "system",
72958
73164
  "storage-location-low": "system",
72959
73165
  "storage-location-critical": "system",
72960
73166
  "storage-location-ok": "system",
@@ -73079,6 +73285,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
73079
73285
  "storage-location-ok"
73080
73286
  ]
73081
73287
  },
73288
+ {
73289
+ id: "alerts",
73290
+ family: "system",
73291
+ label: "Alerts",
73292
+ kinds: [
73293
+ "alert-critical",
73294
+ "alert-error",
73295
+ "alert-critical-resolved"
73296
+ ]
73297
+ },
73082
73298
  {
73083
73299
  id: "alarm",
73084
73300
  family: "alarm",
@@ -73123,6 +73339,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
73123
73339
  return [[descriptor.kind, field]];
73124
73340
  })));
73125
73341
  Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
73342
+ object({
73343
+ phase: _enum(["raised", "resolved"]),
73344
+ episodeId: string().min(1),
73345
+ alertId: string().min(1),
73346
+ severity: AlertSeveritySchema,
73347
+ category: string(),
73348
+ title: string(),
73349
+ message: string(),
73350
+ sourceType: string().optional(),
73351
+ sourceId: string().optional(),
73352
+ nodeId: string().optional(),
73353
+ /** The alert's own action link (where the operator acts on it), when it has one. */
73354
+ actionUrl: string().optional(),
73355
+ at: number()
73356
+ });
73126
73357
  var RULE_BODY_ONLY = ["body"];
73127
73358
  var RULE_TEXT = ["title", "body"];
73128
73359
  var BATTERY = ["device-battery-low", "device-battery-normal"];
@@ -73132,6 +73363,11 @@ var TANK = [
73132
73363
  "device-tank-full",
73133
73364
  "device-tank-normal"
73134
73365
  ];
73366
+ var ALERT_EPISODE = [
73367
+ "alert-critical",
73368
+ "alert-error",
73369
+ "alert-critical-resolved"
73370
+ ];
73135
73371
  var UPDATES = [
73136
73372
  "addon-update-available",
73137
73373
  "server-update-available",
@@ -73324,14 +73560,14 @@ var STATE_SUMMARY_VARS = [
73324
73560
  ([...RULE_TEXT], [...CONSUMABLE]),
73325
73561
  ([...RULE_TEXT], [...TANK]),
73326
73562
  [...RULE_TEXT],
73327
- ([...RULE_TEXT], [...UPDATES]),
73328
- ([...RULE_TEXT], [...UPDATES]),
73329
- [...RULE_TEXT],
73563
+ ([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
73564
+ ([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
73330
73565
  [...RULE_TEXT],
73331
73566
  [...RULE_TEXT],
73332
73567
  [...RULE_TEXT],
73333
73568
  [...RULE_TEXT],
73334
73569
  [...RULE_TEXT],
73570
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
73335
73571
  [...RULE_TEXT],
73336
73572
  [...RULE_TEXT],
73337
73573
  [...RULE_TEXT],
@@ -73349,7 +73585,11 @@ var STATE_SUMMARY_VARS = [
73349
73585
  [...RULE_TEXT],
73350
73586
  [...RULE_TEXT],
73351
73587
  [...RULE_TEXT],
73352
- [...RULE_TEXT],
73588
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
73589
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
73590
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
73591
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
73592
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
73353
73593
  [...RULE_TEXT],
73354
73594
  [...RULE_TEXT],
73355
73595
  [...RULE_TEXT],