@camstack/addon-export-alexa 1.2.147 → 1.2.149

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.
@@ -5,7 +5,7 @@ import "node:fs";
5
5
  import "node:path";
6
6
  import "node:child_process";
7
7
  import "node:zlib";
8
- //#region ../types/dist/event-category-BvOFi6PY.mjs
8
+ //#region ../types/dist/event-category-DOl51-Ij.mjs
9
9
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
10
10
  EventCategory["SystemBoot"] = "system.boot";
11
11
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -84,9 +84,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
84
84
  /**
85
85
  * The node's one-shot runner boot check (D877): planned runners against the
86
86
  * process service, `degraded` when any is failed, refused or missing. The
87
- * alert centre turns it into one alert and a direct critical push.
87
+ * alert centre turns it into one critical alert.
88
88
  */
89
89
  EventCategory["SystemRunnerCheck"] = "system.runner-check";
90
+ /**
91
+ * An alert EPISODE opened or closed, emitted by the alert centre for alerts
92
+ * of severity `critical` or `error` (`AlertEpisodePayload`). The alert
93
+ * centre sends no notification of its own: Notification Center turns this
94
+ * into the `alert-critical` / `alert-error` / `alert-critical-resolved`
95
+ * system-event kinds, and reconciles from the alerts store because a bus
96
+ * event may be dropped (D8, D11).
97
+ */
98
+ EventCategory["AlertEpisode"] = "alert.episode";
90
99
  EventCategory["AddonError"] = "addon.error";
91
100
  EventCategory["AddonPageReady"] = "addon.page-ready";
92
101
  EventCategory["AddonWidgetReady"] = "addon.widget-ready";
@@ -5411,7 +5420,7 @@ var ZodIssueCode = {
5411
5420
  var ZodFirstPartyTypeKind;
5412
5421
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5413
5422
  //#endregion
5414
- //#region ../types/dist/sleep-BegKjwUu.mjs
5423
+ //#region ../types/dist/sleep-BxjU_fJM.mjs
5415
5424
  /**
5416
5425
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5417
5426
  * window to float samples (D455).
@@ -7793,6 +7802,12 @@ function normalizeAddonInitResult(result) {
7793
7802
  if (Array.isArray(result)) return { providers: result };
7794
7803
  return result;
7795
7804
  }
7805
+ /**
7806
+ * The share-view scope kinds a `csv_*` share token can carry. The hub mints
7807
+ * and validates them (`share-token.service.ts` builds its enum from this
7808
+ * list); a data plane names the kinds it ACCEPTS in `share`.
7809
+ */
7810
+ var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
7796
7811
  /** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
7797
7812
  var PeerBytesTicketSchema = object({
7798
7813
  /** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
@@ -12673,6 +12688,229 @@ var ConvertResultSchema = object({
12673
12688
  function scopesAllowDeviceCap(scopes, access) {
12674
12689
  return scopes.some((s) => s.type === "category" && s.target === "device" && s.access.includes(access));
12675
12690
  }
12691
+ /**
12692
+ * Zod schemas for persisted record types.
12693
+ *
12694
+ * These schemas serve as the single source of truth for types that are
12695
+ * stored in the settings-store backend and retrieved via tRPC. They
12696
+ * replace the manual TypeScript interfaces with schema-derived types,
12697
+ * enabling runtime validation when reading from the backend.
12698
+ *
12699
+ * Convention: each schema is named `<Type>Schema`, the inferred TS type
12700
+ * keeps the original name for backward compatibility.
12701
+ */
12702
+ /**
12703
+ * Auth model (v2 — 2026-05-12 caps-only):
12704
+ *
12705
+ * Two principals:
12706
+ * - `isAdmin: true` — full bypass. Admin scope set is ignored.
12707
+ * - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
12708
+ *
12709
+ * No role enum. There used to be `viewer / agent / scoped` and earlier
12710
+ * `super_admin` — collapsed onto the single boolean because every
12711
+ * non-admin caller is governed by the same scope-check rules; the
12712
+ * distinction was only ever used to route role-specific procedures
12713
+ * which we no longer have. CLI / webhook integrations are `cst_*` tokens
12714
+ * with `isAdmin: false` + an explicit scope list.
12715
+ */
12716
+ /** Per-method access flavour. Materialised on every cap method via codegen. */
12717
+ var MethodAccessSchema = _enum([
12718
+ "view",
12719
+ "create",
12720
+ "delete"
12721
+ ]);
12722
+ /**
12723
+ * A single scope grant. Three forms — checked in matcher with OR
12724
+ * semantics; the first match decides whether the call passes:
12725
+ *
12726
+ * - `category` — broadest. `target: 'device' | 'system'` selects every
12727
+ * cap with the matching `scope` declaration. New caps inherit grants
12728
+ * automatically — adding a device cap to the codebase makes it
12729
+ * reachable to every user with `category:device [...]` without a
12730
+ * re-grant. Use this for "family viewer" / "operator" tiers.
12731
+ *
12732
+ * - `addon` — every cap that ships inside a given addon id. Niche;
12733
+ * useful when an integration needs to interact with one specific
12734
+ * addon's surface regardless of how many caps it exports.
12735
+ *
12736
+ * - `capability` — the most precise form. Single cap name. Use for
12737
+ * integration tokens where you want to grant `addons.installPackage`
12738
+ * and nothing else.
12739
+ *
12740
+ * `access` is REQUIRED with min 1 element. `admin` bypass is the
12741
+ * "give me everything" escape; there is no wildcard scope.
12742
+ */
12743
+ var AllowedProviderSchema = union([literal("*"), array(string())]);
12744
+ var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
12745
+ var CapScopeSchema = _enum(["device", "system"]);
12746
+ /**
12747
+ * DeviceSelector (scope model v3 — 2026-08-12).
12748
+ *
12749
+ * A `device` grant no longer carries a frozen list of deviceIds. It carries
12750
+ * a SELECTOR the matcher resolves against the live fleet, so the grant can be
12751
+ * DYNAMIC: a `types:['camera']` selector automatically covers a camera added
12752
+ * AFTER the grant was minted — no re-grant, no re-login.
12753
+ *
12754
+ * - `all` — every device in the deployment. The broad viewer/operator
12755
+ * lever without a `category` grant (a `category` grant also covers device
12756
+ * caps that carry no deviceId; `all` is specifically the device set).
12757
+ * - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
12758
+ * grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
12759
+ * is NOT covered until the grant is edited.
12760
+ * - `types` — every device of a `DeviceType` (e.g. every `camera`).
12761
+ * DYNAMIC. A device that changes type, or a new device of the type,
12762
+ * re-resolves on the next request.
12763
+ * - `locations` — every device whose operator-assigned `location` label is
12764
+ * in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
12765
+ * null/unset location matches NO `locations` selector.
12766
+ */
12767
+ var DeviceSelectorSchema = discriminatedUnion("kind", [
12768
+ object({ kind: literal("all") }),
12769
+ object({
12770
+ kind: literal("ids"),
12771
+ ids: array(number().int()).min(1)
12772
+ }),
12773
+ object({
12774
+ kind: literal("types"),
12775
+ types: array(_enum(DeviceType)).min(1)
12776
+ }),
12777
+ object({
12778
+ kind: literal("locations"),
12779
+ locations: array(string().min(1)).min(1)
12780
+ })
12781
+ ]);
12782
+ var DeviceTokenScopeSchema = object({
12783
+ type: literal("device"),
12784
+ /** The device SET this grant covers — resolved against the live fleet. */
12785
+ selector: DeviceSelectorSchema,
12786
+ access: array(MethodAccessSchema).min(1),
12787
+ /**
12788
+ * Whether a grant on a PARENT device transparently covers its accessory
12789
+ * CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
12790
+ * Direction is parent → children ONLY.
12791
+ *
12792
+ * Absent → the matcher DERIVES it from the access flavour: `view`
12793
+ * inherits (a camera viewer sees the camera's accessories), `create` /
12794
+ * `delete` do NOT (actuating/removing a child is an explicit act the
12795
+ * operator must grant on the child, not inherit from the parent). Set it
12796
+ * explicitly to override that default per grant.
12797
+ */
12798
+ includeLinked: boolean().optional()
12799
+ });
12800
+ /**
12801
+ * v2 → v3 lazy migration. A pre-v3 `device` grant carried
12802
+ * `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
12803
+ * `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
12804
+ * EVERY parse path — stored records AND the JWT-carried scope arrays
12805
+ * normalised at the request boundary ({@link normalizeTokenScopes} in
12806
+ * `device-selector.ts`). Chosen over a one-time DB migration because a
12807
+ * migration cannot reach a JWT already in a client's hands; parse-time
12808
+ * migration covers both without a flag day. No cast — the raw object is read
12809
+ * through `Reflect.get` (its static type is `unknown`).
12810
+ */
12811
+ function migrateLegacyTokenScope(raw) {
12812
+ if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
12813
+ if (Reflect.get(raw, "type") !== "device") return raw;
12814
+ if (Reflect.get(raw, "selector") !== void 0) return raw;
12815
+ const targets = Reflect.get(raw, "targets");
12816
+ if (!Array.isArray(targets)) return raw;
12817
+ return {
12818
+ type: "device",
12819
+ selector: {
12820
+ kind: "ids",
12821
+ ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
12822
+ },
12823
+ access: Reflect.get(raw, "access")
12824
+ };
12825
+ }
12826
+ var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
12827
+ object({
12828
+ type: literal("category"),
12829
+ target: CapScopeSchema,
12830
+ access: array(MethodAccessSchema).min(1)
12831
+ }),
12832
+ object({
12833
+ type: literal("capability"),
12834
+ target: string(),
12835
+ access: array(MethodAccessSchema).min(1)
12836
+ }),
12837
+ object({
12838
+ type: literal("addon"),
12839
+ target: string(),
12840
+ access: array(MethodAccessSchema).min(1)
12841
+ }),
12842
+ DeviceTokenScopeSchema
12843
+ ]));
12844
+ object({
12845
+ id: string(),
12846
+ username: string(),
12847
+ passwordHash: string(),
12848
+ /**
12849
+ * Admin bypass. When true, the middleware skips the scope-access
12850
+ * check entirely. There is no other axis of privilege; the legacy
12851
+ * role enum collapsed onto this boolean in v2.
12852
+ */
12853
+ isAdmin: boolean().default(false),
12854
+ allowedProviders: AllowedProviderSchema,
12855
+ allowedDevices: AllowedDevicesSchema,
12856
+ /**
12857
+ * Scopes granted to this user. Admins bypass; their `scopes` is
12858
+ * ignored. Non-admins without scopes are locked out of every
12859
+ * protected call.
12860
+ */
12861
+ scopes: array(TokenScopeSchema).default([]),
12862
+ createdAt: number(),
12863
+ updatedAt: number()
12864
+ });
12865
+ object({
12866
+ id: string(),
12867
+ label: string(),
12868
+ isAdmin: boolean().default(false),
12869
+ allowedProviders: AllowedProviderSchema,
12870
+ allowedDevices: AllowedDevicesSchema,
12871
+ tokenHash: string(),
12872
+ tokenPrefix: string(),
12873
+ createdAt: number(),
12874
+ lastUsedAt: number().optional()
12875
+ });
12876
+ object({
12877
+ id: string(),
12878
+ userId: string(),
12879
+ name: string(),
12880
+ tokenHash: string(),
12881
+ tokenPrefix: string(),
12882
+ scopes: array(TokenScopeSchema),
12883
+ expiresAt: number().nullish(),
12884
+ lastUsedAt: number().nullish(),
12885
+ createdAt: number()
12886
+ });
12887
+ /** What a share-view grant lets its holder see. */
12888
+ var ShareViewGrantSchema = object({
12889
+ kind: _enum(SHARE_VIEW_KINDS),
12890
+ deviceIds: array(number().int().nonnegative()).min(1).max(64),
12891
+ /** Talk-back, opt-in at mint time; absent means off. */
12892
+ talk: boolean().optional()
12893
+ });
12894
+ var ShareViewScopeSchema = object({
12895
+ type: literal("share-view"),
12896
+ grant: ShareViewGrantSchema
12897
+ });
12898
+ var AddonRoutesScopeSchema = object({
12899
+ type: literal("addon-routes"),
12900
+ access: array(MethodAccessSchema).min(1)
12901
+ });
12902
+ var CredentialScopeSchema = union([
12903
+ literal("*"),
12904
+ ShareViewScopeSchema,
12905
+ AddonRoutesScopeSchema,
12906
+ TokenScopeSchema
12907
+ ]);
12908
+ object({
12909
+ kind: literal("credential"),
12910
+ sub: string().min(1),
12911
+ jti: string().min(16),
12912
+ scopes: array(CredentialScopeSchema).min(1)
12913
+ });
12676
12914
  _enum(["new-session", "step-up"]);
12677
12915
  /** The languages the hub's app landing pages are written in (D858). */
12678
12916
  var AppPageLangSchema = _enum(["en", "it"]);
@@ -13408,7 +13646,14 @@ var AlertSeveritySchema = _enum([
13408
13646
  ]);
13409
13647
  var AlertActionSchema = object({
13410
13648
  label: string(),
13411
- href: string().optional()
13649
+ href: string().optional(),
13650
+ /**
13651
+ * How `href` is followed. Absent / `app`: an admin-ui route (client-side).
13652
+ * `server`: a route the HUB serves (an addon HTTP route such as an OAuth
13653
+ * start) — the browser must leave the SPA with a full navigation, because
13654
+ * the SPA has no such route and would bounce to the home page.
13655
+ */
13656
+ navigation: _enum(["app", "server"]).optional()
13412
13657
  });
13413
13658
  var AlertStatusSchema = _enum([
13414
13659
  "active",
@@ -41809,6 +42054,9 @@ var NcSystemEventKindSchema = _enum([
41809
42054
  "server-updated",
41810
42055
  "export-completed",
41811
42056
  "backup-completed",
42057
+ "alert-critical",
42058
+ "alert-error",
42059
+ "alert-critical-resolved",
41812
42060
  "camera-online",
41813
42061
  "camera-offline",
41814
42062
  "camera-disabled",
@@ -43844,202 +44092,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
43844
44092
  auth: "admin"
43845
44093
  }), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
43846
44094
  /**
43847
- * Zod schemas for persisted record types.
43848
- *
43849
- * These schemas serve as the single source of truth for types that are
43850
- * stored in the settings-store backend and retrieved via tRPC. They
43851
- * replace the manual TypeScript interfaces with schema-derived types,
43852
- * enabling runtime validation when reading from the backend.
43853
- *
43854
- * Convention: each schema is named `<Type>Schema`, the inferred TS type
43855
- * keeps the original name for backward compatibility.
43856
- */
43857
- /**
43858
- * Auth model (v2 — 2026-05-12 caps-only):
43859
- *
43860
- * Two principals:
43861
- * - `isAdmin: true` — full bypass. Admin scope set is ignored.
43862
- * - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
43863
- *
43864
- * No role enum. There used to be `viewer / agent / scoped` and earlier
43865
- * `super_admin` — collapsed onto the single boolean because every
43866
- * non-admin caller is governed by the same scope-check rules; the
43867
- * distinction was only ever used to route role-specific procedures
43868
- * which we no longer have. CLI / webhook integrations are `cst_*` tokens
43869
- * with `isAdmin: false` + an explicit scope list.
43870
- */
43871
- /** Per-method access flavour. Materialised on every cap method via codegen. */
43872
- var MethodAccessSchema = _enum([
43873
- "view",
43874
- "create",
43875
- "delete"
43876
- ]);
43877
- /**
43878
- * A single scope grant. Three forms — checked in matcher with OR
43879
- * semantics; the first match decides whether the call passes:
43880
- *
43881
- * - `category` — broadest. `target: 'device' | 'system'` selects every
43882
- * cap with the matching `scope` declaration. New caps inherit grants
43883
- * automatically — adding a device cap to the codebase makes it
43884
- * reachable to every user with `category:device [...]` without a
43885
- * re-grant. Use this for "family viewer" / "operator" tiers.
43886
- *
43887
- * - `addon` — every cap that ships inside a given addon id. Niche;
43888
- * useful when an integration needs to interact with one specific
43889
- * addon's surface regardless of how many caps it exports.
43890
- *
43891
- * - `capability` — the most precise form. Single cap name. Use for
43892
- * integration tokens where you want to grant `addons.installPackage`
43893
- * and nothing else.
43894
- *
43895
- * `access` is REQUIRED with min 1 element. `admin` bypass is the
43896
- * "give me everything" escape; there is no wildcard scope.
43897
- */
43898
- var AllowedProviderSchema = union([literal("*"), array(string())]);
43899
- var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
43900
- var CapScopeSchema = _enum(["device", "system"]);
43901
- /**
43902
- * DeviceSelector (scope model v3 — 2026-08-12).
43903
- *
43904
- * A `device` grant no longer carries a frozen list of deviceIds. It carries
43905
- * a SELECTOR the matcher resolves against the live fleet, so the grant can be
43906
- * DYNAMIC: a `types:['camera']` selector automatically covers a camera added
43907
- * AFTER the grant was minted — no re-grant, no re-login.
43908
- *
43909
- * - `all` — every device in the deployment. The broad viewer/operator
43910
- * lever without a `category` grant (a `category` grant also covers device
43911
- * caps that carry no deviceId; `all` is specifically the device set).
43912
- * - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
43913
- * grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
43914
- * is NOT covered until the grant is edited.
43915
- * - `types` — every device of a `DeviceType` (e.g. every `camera`).
43916
- * DYNAMIC. A device that changes type, or a new device of the type,
43917
- * re-resolves on the next request.
43918
- * - `locations` — every device whose operator-assigned `location` label is
43919
- * in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
43920
- * null/unset location matches NO `locations` selector.
43921
- */
43922
- var DeviceSelectorSchema = discriminatedUnion("kind", [
43923
- object({ kind: literal("all") }),
43924
- object({
43925
- kind: literal("ids"),
43926
- ids: array(number().int()).min(1)
43927
- }),
43928
- object({
43929
- kind: literal("types"),
43930
- types: array(_enum(DeviceType)).min(1)
43931
- }),
43932
- object({
43933
- kind: literal("locations"),
43934
- locations: array(string().min(1)).min(1)
43935
- })
43936
- ]);
43937
- var DeviceTokenScopeSchema = object({
43938
- type: literal("device"),
43939
- /** The device SET this grant covers — resolved against the live fleet. */
43940
- selector: DeviceSelectorSchema,
43941
- access: array(MethodAccessSchema).min(1),
43942
- /**
43943
- * Whether a grant on a PARENT device transparently covers its accessory
43944
- * CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
43945
- * Direction is parent → children ONLY.
43946
- *
43947
- * Absent → the matcher DERIVES it from the access flavour: `view`
43948
- * inherits (a camera viewer sees the camera's accessories), `create` /
43949
- * `delete` do NOT (actuating/removing a child is an explicit act the
43950
- * operator must grant on the child, not inherit from the parent). Set it
43951
- * explicitly to override that default per grant.
43952
- */
43953
- includeLinked: boolean().optional()
43954
- });
43955
- /**
43956
- * v2 → v3 lazy migration. A pre-v3 `device` grant carried
43957
- * `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
43958
- * `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
43959
- * EVERY parse path — stored records AND the JWT-carried scope arrays
43960
- * normalised at the request boundary ({@link normalizeTokenScopes} in
43961
- * `device-selector.ts`). Chosen over a one-time DB migration because a
43962
- * migration cannot reach a JWT already in a client's hands; parse-time
43963
- * migration covers both without a flag day. No cast — the raw object is read
43964
- * through `Reflect.get` (its static type is `unknown`).
43965
- */
43966
- function migrateLegacyTokenScope(raw) {
43967
- if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
43968
- if (Reflect.get(raw, "type") !== "device") return raw;
43969
- if (Reflect.get(raw, "selector") !== void 0) return raw;
43970
- const targets = Reflect.get(raw, "targets");
43971
- if (!Array.isArray(targets)) return raw;
43972
- return {
43973
- type: "device",
43974
- selector: {
43975
- kind: "ids",
43976
- ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
43977
- },
43978
- access: Reflect.get(raw, "access")
43979
- };
43980
- }
43981
- var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
43982
- object({
43983
- type: literal("category"),
43984
- target: CapScopeSchema,
43985
- access: array(MethodAccessSchema).min(1)
43986
- }),
43987
- object({
43988
- type: literal("capability"),
43989
- target: string(),
43990
- access: array(MethodAccessSchema).min(1)
43991
- }),
43992
- object({
43993
- type: literal("addon"),
43994
- target: string(),
43995
- access: array(MethodAccessSchema).min(1)
43996
- }),
43997
- DeviceTokenScopeSchema
43998
- ]));
43999
- object({
44000
- id: string(),
44001
- username: string(),
44002
- passwordHash: string(),
44003
- /**
44004
- * Admin bypass. When true, the middleware skips the scope-access
44005
- * check entirely. There is no other axis of privilege; the legacy
44006
- * role enum collapsed onto this boolean in v2.
44007
- */
44008
- isAdmin: boolean().default(false),
44009
- allowedProviders: AllowedProviderSchema,
44010
- allowedDevices: AllowedDevicesSchema,
44011
- /**
44012
- * Scopes granted to this user. Admins bypass; their `scopes` is
44013
- * ignored. Non-admins without scopes are locked out of every
44014
- * protected call.
44015
- */
44016
- scopes: array(TokenScopeSchema).default([]),
44017
- createdAt: number(),
44018
- updatedAt: number()
44019
- });
44020
- object({
44021
- id: string(),
44022
- label: string(),
44023
- isAdmin: boolean().default(false),
44024
- allowedProviders: AllowedProviderSchema,
44025
- allowedDevices: AllowedDevicesSchema,
44026
- tokenHash: string(),
44027
- tokenPrefix: string(),
44028
- createdAt: number(),
44029
- lastUsedAt: number().optional()
44030
- });
44031
- object({
44032
- id: string(),
44033
- userId: string(),
44034
- name: string(),
44035
- tokenHash: string(),
44036
- tokenPrefix: string(),
44037
- scopes: array(TokenScopeSchema),
44038
- expiresAt: number().nullish(),
44039
- lastUsedAt: number().nullish(),
44040
- createdAt: number()
44041
- });
44042
- /**
44043
44095
  * `oauth-integration` — a collection cap by which an addon declares
44044
44096
  * itself a linkable OAuth client of the hub's core `/oauth2/*` server.
44045
44097
  * Each provider returns a static descriptor; the core enumerates them
@@ -50857,7 +50909,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
50857
50909
  }), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
50858
50910
  kind: "mutation",
50859
50911
  auth: "admin"
50860
- }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
50912
+ }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
50913
+ clear: boolean(),
50914
+ repointLocationId: string().optional()
50915
+ }), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
50861
50916
  kind: "mutation",
50862
50917
  auth: "admin"
50863
50918
  }), method(StorageCleanupInputSchema, object({ jobId: string() }), {
@@ -54316,6 +54371,11 @@ object({
54316
54371
  *
54317
54372
  * `kind: 'poll'` — cloud REST APIs typically have no push channel; the
54318
54373
  * provider refreshes the slice on an interval and eagerly after commands.
54374
+ *
54375
+ * UNKNOWN IS NOT OFF. Every field the appliance reports separately is
54376
+ * nullable: `null` means "not known right now" (the appliance has not said,
54377
+ * the link is down, or the description does not carry it) and is never
54378
+ * rendered or exported as `false` / `0`. `availability` says why.
54319
54379
  */
54320
54380
  var DishwasherStateSchema = _enum([
54321
54381
  "idle",
@@ -54325,112 +54385,227 @@ var DishwasherStateSchema = _enum([
54325
54385
  "error",
54326
54386
  "unavailable"
54327
54387
  ]);
54388
+ /**
54389
+ * The appliance's own operation state, uncollapsed. `state` above is the coarse
54390
+ * view for compact surfaces; this is what the appliance said.
54391
+ */
54392
+ var DishwasherOperationStateSchema = _enum([
54393
+ "Inactive",
54394
+ "Ready",
54395
+ "DelayedStart",
54396
+ "Run",
54397
+ "Pause",
54398
+ "ActionRequired",
54399
+ "Finished",
54400
+ "Error",
54401
+ "Aborting"
54402
+ ]);
54403
+ /**
54404
+ * Why fields may be `null`:
54405
+ * - `available` — the link is up and the description is loaded;
54406
+ * - `offline` — the local link is down (values are unknown, not last-known);
54407
+ * - `description-missing` — the link is up but the appliance's description could not
54408
+ * be loaded, so its values cannot be decoded.
54409
+ */
54410
+ var DishwasherAvailabilitySchema = _enum([
54411
+ "available",
54412
+ "offline",
54413
+ "description-missing"
54414
+ ]);
54328
54415
  var DishwasherConsumableLevelSchema = _enum([
54329
54416
  "ok",
54330
54417
  "low",
54331
54418
  "empty"
54332
54419
  ]);
54333
54420
  object({
54421
+ availability: DishwasherAvailabilitySchema,
54422
+ /** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
54334
54423
  state: DishwasherStateSchema,
54335
- /** Active program id/name, or null when none selected / unknown. */
54424
+ /** The appliance's operation state as reported; null when not known. */
54425
+ operationState: DishwasherOperationStateSchema.nullable(),
54426
+ /** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
54336
54427
  program: string().nullable(),
54337
- /** Program tokens the hardware accepts — drives the UI selector. */
54428
+ /** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
54429
+ selectedProgram: string().nullable(),
54430
+ /** Feature keys of the programs the appliance currently offers — drives the UI selector. */
54338
54431
  availablePrograms: array(string()),
54339
- /** Minutes remaining on the active cycle, or null when not running. */
54340
- remainingMinutes: number().int().nonnegative().nullable(),
54432
+ /** Seconds remaining on the active cycle, or null when not running / not known. */
54433
+ remainingSeconds: number().int().nonnegative().nullable(),
54434
+ /** Seconds the delayed start is set to (time until the cycle starts), or null. */
54435
+ delayedStartSeconds: number().int().nonnegative().nullable(),
54341
54436
  /** Cycle completion 0..100, or null when not applicable. */
54342
54437
  progressPercent: number().min(0).max(100).nullable(),
54343
- /** True when the door is reported open. */
54344
- doorOpen: boolean(),
54345
- /** True when remote start is allowed (door closed, power on, etc.). */
54346
- remoteStartAllowed: boolean(),
54347
- /** Main power / switched-on state. */
54348
- powerOn: boolean(),
54438
+ /** True when the door is reported open; null when the door state is not known. */
54439
+ doorOpen: boolean().nullable(),
54440
+ /** True when the door is latched (locked) during a cycle; null when not reported. */
54441
+ doorLocked: boolean().nullable(),
54442
+ /** True when remote start is allowed (door closed, power on, etc.); null when not known. */
54443
+ remoteStartAllowed: boolean().nullable(),
54444
+ /** True when the appliance accepts remote control now; null when not known. */
54445
+ remoteControlActive: boolean().nullable(),
54446
+ /** True while somebody operates the appliance at its panel; null when not reported. */
54447
+ localControlActive: boolean().nullable(),
54448
+ /** Main power / switched-on state; null when not known. */
54449
+ powerOn: boolean().nullable(),
54450
+ /** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
54451
+ powerState: string().nullable(),
54349
54452
  saltLevel: DishwasherConsumableLevelSchema.nullable(),
54350
54453
  rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
54351
- halfLoad: boolean(),
54352
- hygienePlus: boolean(),
54454
+ /** Option states: null when the appliance does not expose the option or has not said. */
54455
+ halfLoad: boolean().nullable(),
54456
+ hygienePlus: boolean().nullable(),
54353
54457
  /** Extra dry option when the appliance exposes it. */
54354
- extraDry: boolean(),
54458
+ extraDry: boolean().nullable(),
54355
54459
  /** Intensive zone (lower basket) when the appliance exposes it. */
54356
- intensiveZone: boolean(),
54460
+ intensiveZone: boolean().nullable(),
54357
54461
  /** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
54358
- varioSpeedPlus: boolean(),
54359
- /** Child lock (controls disabled on the appliance). */
54360
- childLock: boolean(),
54462
+ varioSpeedPlus: boolean().nullable(),
54463
+ /** Child lock (controls disabled on the appliance); null when not known. */
54464
+ childLock: boolean().nullable(),
54465
+ /** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
54466
+ activeEvents: array(string()),
54467
+ /** Numeric error code when the appliance reports one; null otherwise. */
54361
54468
  errorCode: number().nullable(),
54469
+ /** Name of the raised alert-level event while the appliance is in error; null otherwise. */
54362
54470
  errorLabel: string().nullable(),
54471
+ /** Ms epoch of the last value received from the appliance; 0 = never. */
54363
54472
  lastFetchedAt: number()
54364
54473
  });
54365
- DeviceType.Dishwasher, method(object({ deviceId: number().int().nonnegative() }), _void(), {
54474
+ var DeviceIdSchema = number().int().nonnegative();
54475
+ /** A value a program option or setting can take. */
54476
+ var DishwasherValueSchema = union([
54477
+ boolean(),
54478
+ string(),
54479
+ number()
54480
+ ]);
54481
+ var DishwasherAccessSchema = _enum([
54482
+ "none",
54483
+ "read",
54484
+ "readWrite",
54485
+ "writeOnly",
54486
+ "readStatic"
54487
+ ]);
54488
+ /**
54489
+ * One option or setting the appliance declares, with the constraints its description
54490
+ * gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
54491
+ */
54492
+ var DishwasherOptionDescriptorSchema = object({
54493
+ /** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
54494
+ key: string(),
54495
+ /** Last segment of the key, for display. */
54496
+ name: string(),
54497
+ type: _enum([
54498
+ "boolean",
54499
+ "number",
54500
+ "enum",
54501
+ "string"
54502
+ ]),
54503
+ access: DishwasherAccessSchema,
54504
+ /** The appliance reports this entity as currently available. */
54505
+ available: boolean(),
54506
+ /** Unit the description declares for a number; null when it declares none. */
54507
+ unit: string().nullable(),
54508
+ min: number().nullable(),
54509
+ max: number().nullable(),
54510
+ step: number().nullable(),
54511
+ /** Allowed members of an enum; null for other types. */
54512
+ enumValues: array(string()).nullable(),
54513
+ defaultValue: DishwasherValueSchema.nullable()
54514
+ });
54515
+ var DishwasherProgramSchema = object({
54516
+ /** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
54517
+ key: string(),
54518
+ name: string(),
54519
+ /** The appliance currently offers this program. */
54520
+ available: boolean(),
54521
+ /** The options this program lists, with the program-level access / availability / default. */
54522
+ options: array(DishwasherOptionDescriptorSchema)
54523
+ });
54524
+ var DishwasherOptionsSchema = object({
54525
+ availability: DishwasherAvailabilitySchema,
54526
+ /** What the appliance can be told to do, from the commands its description declares. */
54527
+ supportsStart: boolean(),
54528
+ supportsPause: boolean(),
54529
+ supportsResume: boolean(),
54530
+ supportsStop: boolean(),
54531
+ supportsPower: boolean(),
54532
+ /** Every program the description lists, with its options. */
54533
+ programs: array(DishwasherProgramSchema),
54534
+ /** Every option and setting entity the description lists (programs reference these by key). */
54535
+ options: array(DishwasherOptionDescriptorSchema)
54536
+ });
54537
+ DeviceType.Dishwasher, method(object({
54538
+ deviceId: DeviceIdSchema,
54539
+ program: string().min(1).optional(),
54540
+ options: record(string(), DishwasherValueSchema).optional()
54541
+ }), _void(), {
54366
54542
  kind: "mutation",
54367
54543
  auth: "protected"
54368
- }), method(object({ deviceId: number().int().nonnegative() }), _void(), {
54544
+ }), method(object({ deviceId: DeviceIdSchema }), _void(), {
54369
54545
  kind: "mutation",
54370
54546
  auth: "protected"
54371
- }), method(object({ deviceId: number().int().nonnegative() }), _void(), {
54547
+ }), method(object({ deviceId: DeviceIdSchema }), _void(), {
54548
+ kind: "mutation",
54549
+ auth: "protected"
54550
+ }), method(object({ deviceId: DeviceIdSchema }), _void(), {
54372
54551
  kind: "mutation",
54373
54552
  auth: "protected"
54374
54553
  }), method(object({
54375
- deviceId: number().int().nonnegative(),
54554
+ deviceId: DeviceIdSchema,
54376
54555
  program: string().min(1)
54377
54556
  }), _void(), {
54378
54557
  kind: "mutation",
54379
54558
  auth: "protected"
54380
54559
  }), method(object({
54381
- deviceId: number().int().nonnegative(),
54560
+ deviceId: DeviceIdSchema,
54382
54561
  on: boolean()
54383
54562
  }), _void(), {
54384
54563
  kind: "mutation",
54385
54564
  auth: "protected"
54386
54565
  }), method(object({
54387
- deviceId: number().int().nonnegative(),
54566
+ deviceId: DeviceIdSchema,
54388
54567
  on: boolean()
54389
54568
  }), _void(), {
54390
54569
  kind: "mutation",
54391
54570
  auth: "protected"
54392
54571
  }), method(object({
54393
- deviceId: number().int().nonnegative(),
54572
+ deviceId: DeviceIdSchema,
54394
54573
  on: boolean()
54395
54574
  }), _void(), {
54396
54575
  kind: "mutation",
54397
54576
  auth: "protected"
54398
54577
  }), method(object({
54399
- deviceId: number().int().nonnegative(),
54578
+ deviceId: DeviceIdSchema,
54400
54579
  on: boolean()
54401
54580
  }), _void(), {
54402
54581
  kind: "mutation",
54403
54582
  auth: "protected"
54404
54583
  }), method(object({
54405
- deviceId: number().int().nonnegative(),
54584
+ deviceId: DeviceIdSchema,
54406
54585
  on: boolean()
54407
54586
  }), _void(), {
54408
54587
  kind: "mutation",
54409
54588
  auth: "protected"
54410
54589
  }), method(object({
54411
- deviceId: number().int().nonnegative(),
54590
+ deviceId: DeviceIdSchema,
54412
54591
  on: boolean()
54413
54592
  }), _void(), {
54414
54593
  kind: "mutation",
54415
54594
  auth: "protected"
54416
54595
  }), method(object({
54417
- deviceId: number().int().nonnegative(),
54596
+ deviceId: DeviceIdSchema,
54418
54597
  on: boolean()
54419
54598
  }), _void(), {
54420
54599
  kind: "mutation",
54421
54600
  auth: "protected"
54422
54601
  }), method(object({
54423
- deviceId: number().int().nonnegative(),
54602
+ deviceId: DeviceIdSchema,
54424
54603
  key: string().min(1),
54425
- value: union([
54426
- boolean(),
54427
- string(),
54428
- number()
54429
- ])
54604
+ value: DishwasherValueSchema
54430
54605
  }), _void(), {
54431
54606
  kind: "mutation",
54432
54607
  auth: "protected"
54433
- });
54608
+ }), method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" });
54434
54609
  object({
54435
54610
  /** Ms epoch of the last press. null = never observed since this provider started. */
54436
54611
  lastPressedAt: number().nullable(),
@@ -64521,6 +64696,12 @@ Object.freeze({
64521
64696
  addonId: null,
64522
64697
  access: "view"
64523
64698
  },
64699
+ "dishwasher.getOptions": {
64700
+ capName: "dishwasher",
64701
+ capScope: "device",
64702
+ addonId: null,
64703
+ access: "view"
64704
+ },
64524
64705
  "dishwasher.getStatus": {
64525
64706
  capName: "dishwasher",
64526
64707
  capScope: "device",
@@ -64533,6 +64714,12 @@ Object.freeze({
64533
64714
  addonId: null,
64534
64715
  access: "create"
64535
64716
  },
64717
+ "dishwasher.resume": {
64718
+ capName: "dishwasher",
64719
+ capScope: "device",
64720
+ addonId: null,
64721
+ access: "create"
64722
+ },
64536
64723
  "dishwasher.setChildLock": {
64537
64724
  capName: "dishwasher",
64538
64725
  capScope: "device",
@@ -69033,6 +69220,12 @@ Object.freeze({
69033
69220
  addonId: null,
69034
69221
  access: "view"
69035
69222
  },
69223
+ "storageMigration.moverClearance": {
69224
+ capName: "storage-migration",
69225
+ capScope: "system",
69226
+ addonId: null,
69227
+ access: "view"
69228
+ },
69036
69229
  "storageMigration.movers": {
69037
69230
  capName: "storage-migration",
69038
69231
  capScope: "system",
@@ -71226,6 +71419,11 @@ Object.freeze({
71226
71419
  form: "single",
71227
71420
  optional: false
71228
71421
  }],
71422
+ "dishwasher.getOptions": [{
71423
+ name: "deviceId",
71424
+ form: "single",
71425
+ optional: false
71426
+ }],
71229
71427
  "dishwasher.getStatus": [{
71230
71428
  name: "deviceId",
71231
71429
  form: "single",
@@ -71236,6 +71434,11 @@ Object.freeze({
71236
71434
  form: "single",
71237
71435
  optional: false
71238
71436
  }],
71437
+ "dishwasher.resume": [{
71438
+ name: "deviceId",
71439
+ form: "single",
71440
+ optional: false
71441
+ }],
71239
71442
  "dishwasher.setChildLock": [{
71240
71443
  name: "deviceId",
71241
71444
  form: "single",
@@ -73322,6 +73525,9 @@ new Map(Object.entries({
73322
73525
  "wrapper-update-available": "system",
73323
73526
  "backup-completed": "system",
73324
73527
  "export-completed": "system",
73528
+ "alert-critical": "system",
73529
+ "alert-error": "system",
73530
+ "alert-critical-resolved": "system",
73325
73531
  "storage-location-low": "system",
73326
73532
  "storage-location-critical": "system",
73327
73533
  "storage-location-ok": "system",
@@ -73446,6 +73652,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
73446
73652
  "storage-location-ok"
73447
73653
  ]
73448
73654
  },
73655
+ {
73656
+ id: "alerts",
73657
+ family: "system",
73658
+ label: "Alerts",
73659
+ kinds: [
73660
+ "alert-critical",
73661
+ "alert-error",
73662
+ "alert-critical-resolved"
73663
+ ]
73664
+ },
73449
73665
  {
73450
73666
  id: "alarm",
73451
73667
  family: "alarm",
@@ -73490,6 +73706,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
73490
73706
  return [[descriptor.kind, field]];
73491
73707
  })));
73492
73708
  Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
73709
+ object({
73710
+ phase: _enum(["raised", "resolved"]),
73711
+ episodeId: string().min(1),
73712
+ alertId: string().min(1),
73713
+ severity: AlertSeveritySchema,
73714
+ category: string(),
73715
+ title: string(),
73716
+ message: string(),
73717
+ sourceType: string().optional(),
73718
+ sourceId: string().optional(),
73719
+ nodeId: string().optional(),
73720
+ /** The alert's own action link (where the operator acts on it), when it has one. */
73721
+ actionUrl: string().optional(),
73722
+ at: number()
73723
+ });
73493
73724
  var RULE_BODY_ONLY = ["body"];
73494
73725
  var RULE_TEXT = ["title", "body"];
73495
73726
  var BATTERY = ["device-battery-low", "device-battery-normal"];
@@ -73499,6 +73730,11 @@ var TANK = [
73499
73730
  "device-tank-full",
73500
73731
  "device-tank-normal"
73501
73732
  ];
73733
+ var ALERT_EPISODE = [
73734
+ "alert-critical",
73735
+ "alert-error",
73736
+ "alert-critical-resolved"
73737
+ ];
73502
73738
  var UPDATES = [
73503
73739
  "addon-update-available",
73504
73740
  "server-update-available",
@@ -73691,14 +73927,14 @@ var STATE_SUMMARY_VARS = [
73691
73927
  ([...RULE_TEXT], [...CONSUMABLE]),
73692
73928
  ([...RULE_TEXT], [...TANK]),
73693
73929
  [...RULE_TEXT],
73694
- ([...RULE_TEXT], [...UPDATES]),
73695
- ([...RULE_TEXT], [...UPDATES]),
73696
- [...RULE_TEXT],
73930
+ ([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
73931
+ ([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
73697
73932
  [...RULE_TEXT],
73698
73933
  [...RULE_TEXT],
73699
73934
  [...RULE_TEXT],
73700
73935
  [...RULE_TEXT],
73701
73936
  [...RULE_TEXT],
73937
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
73702
73938
  [...RULE_TEXT],
73703
73939
  [...RULE_TEXT],
73704
73940
  [...RULE_TEXT],
@@ -73716,7 +73952,11 @@ var STATE_SUMMARY_VARS = [
73716
73952
  [...RULE_TEXT],
73717
73953
  [...RULE_TEXT],
73718
73954
  [...RULE_TEXT],
73719
- [...RULE_TEXT],
73955
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
73956
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
73957
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
73958
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
73959
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
73720
73960
  [...RULE_TEXT],
73721
73961
  [...RULE_TEXT],
73722
73962
  [...RULE_TEXT],
@@ -83605,13 +83845,20 @@ function buildAlexaOauthIntegration(publicHubUrl) {
83605
83845
  function buildAlexaSetupBlock(input) {
83606
83846
  const base = input.publicHubUrl.replace(/\/+$/, "");
83607
83847
  return {
83608
- fields: [...base ? [{
83609
- label: "Directive endpoint",
83610
- value: `${base}/addon/export-alexa/directive`
83611
- }] : [], ...input.ingressToken && input.skillMode === "custom" ? [{
83612
- label: "Ingress token (Lambda HUB_INGRESS_TOKEN) — use \"Show ingress token\" in settings",
83613
- value: maskSecretTail(input.ingressToken)
83614
- }] : []],
83848
+ fields: [
83849
+ ...base ? [{
83850
+ label: "Hub address to enter in the Alexa app",
83851
+ value: base
83852
+ }] : [],
83853
+ ...base ? [{
83854
+ label: "Directive endpoint",
83855
+ value: `${base}/addon/export-alexa/directive`
83856
+ }] : [],
83857
+ ...input.ingressToken && input.skillMode === "custom" ? [{
83858
+ label: "Ingress token (Lambda HUB_INGRESS_TOKEN) — use \"Show ingress token\" in settings",
83859
+ value: maskSecretTail(input.ingressToken)
83860
+ }] : []
83861
+ ],
83615
83862
  note: base ? "Account linking is handled by the core OAuth server. Use the hub's /api/oauth2/authorize endpoint with integration=export-alexa." : "Set the public hub URL on the settings form first — the directive endpoint URL is derived from it."
83616
83863
  };
83617
83864
  }