@camstack/addon-provider-homeassistant 1.2.603 → 1.2.605

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.
@@ -1,4 +1,4 @@
1
- //#region ../types/dist/event-category-BvOFi6PY.mjs
1
+ //#region ../types/dist/event-category-DOl51-Ij.mjs
2
2
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
3
3
  EventCategory["SystemBoot"] = "system.boot";
4
4
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -77,9 +77,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
77
77
  /**
78
78
  * The node's one-shot runner boot check (D877): planned runners against the
79
79
  * process service, `degraded` when any is failed, refused or missing. The
80
- * alert centre turns it into one alert and a direct critical push.
80
+ * alert centre turns it into one critical alert.
81
81
  */
82
82
  EventCategory["SystemRunnerCheck"] = "system.runner-check";
83
+ /**
84
+ * An alert EPISODE opened or closed, emitted by the alert centre for alerts
85
+ * of severity `critical` or `error` (`AlertEpisodePayload`). The alert
86
+ * centre sends no notification of its own: Notification Center turns this
87
+ * into the `alert-critical` / `alert-error` / `alert-critical-resolved`
88
+ * system-event kinds, and reconciles from the alerts store because a bus
89
+ * event may be dropped (D8, D11).
90
+ */
91
+ EventCategory["AlertEpisode"] = "alert.episode";
83
92
  EventCategory["AddonError"] = "addon.error";
84
93
  EventCategory["AddonPageReady"] = "addon.page-ready";
85
94
  EventCategory["AddonWidgetReady"] = "addon.widget-ready";
@@ -5537,7 +5546,7 @@ var ZodIssueCode = {
5537
5546
  var ZodFirstPartyTypeKind;
5538
5547
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5539
5548
  //#endregion
5540
- //#region ../types/dist/sleep-BegKjwUu.mjs
5549
+ //#region ../types/dist/sleep-BxjU_fJM.mjs
5541
5550
  /**
5542
5551
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5543
5552
  * window to float samples (D455).
@@ -7919,6 +7928,12 @@ function normalizeAddonInitResult(result) {
7919
7928
  if (Array.isArray(result)) return { providers: result };
7920
7929
  return result;
7921
7930
  }
7931
+ /**
7932
+ * The share-view scope kinds a `csv_*` share token can carry. The hub mints
7933
+ * and validates them (`share-token.service.ts` builds its enum from this
7934
+ * list); a data plane names the kinds it ACCEPTS in `share`.
7935
+ */
7936
+ var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
7922
7937
  /** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
7923
7938
  var PeerBytesTicketSchema = object({
7924
7939
  /** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
@@ -12987,6 +13002,229 @@ var ConvertResultSchema = object({
12987
13002
  files: array(string()).readonly()
12988
13003
  })).readonly()
12989
13004
  });
13005
+ /**
13006
+ * Zod schemas for persisted record types.
13007
+ *
13008
+ * These schemas serve as the single source of truth for types that are
13009
+ * stored in the settings-store backend and retrieved via tRPC. They
13010
+ * replace the manual TypeScript interfaces with schema-derived types,
13011
+ * enabling runtime validation when reading from the backend.
13012
+ *
13013
+ * Convention: each schema is named `<Type>Schema`, the inferred TS type
13014
+ * keeps the original name for backward compatibility.
13015
+ */
13016
+ /**
13017
+ * Auth model (v2 — 2026-05-12 caps-only):
13018
+ *
13019
+ * Two principals:
13020
+ * - `isAdmin: true` — full bypass. Admin scope set is ignored.
13021
+ * - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
13022
+ *
13023
+ * No role enum. There used to be `viewer / agent / scoped` and earlier
13024
+ * `super_admin` — collapsed onto the single boolean because every
13025
+ * non-admin caller is governed by the same scope-check rules; the
13026
+ * distinction was only ever used to route role-specific procedures
13027
+ * which we no longer have. CLI / webhook integrations are `cst_*` tokens
13028
+ * with `isAdmin: false` + an explicit scope list.
13029
+ */
13030
+ /** Per-method access flavour. Materialised on every cap method via codegen. */
13031
+ var MethodAccessSchema = _enum([
13032
+ "view",
13033
+ "create",
13034
+ "delete"
13035
+ ]);
13036
+ /**
13037
+ * A single scope grant. Three forms — checked in matcher with OR
13038
+ * semantics; the first match decides whether the call passes:
13039
+ *
13040
+ * - `category` — broadest. `target: 'device' | 'system'` selects every
13041
+ * cap with the matching `scope` declaration. New caps inherit grants
13042
+ * automatically — adding a device cap to the codebase makes it
13043
+ * reachable to every user with `category:device [...]` without a
13044
+ * re-grant. Use this for "family viewer" / "operator" tiers.
13045
+ *
13046
+ * - `addon` — every cap that ships inside a given addon id. Niche;
13047
+ * useful when an integration needs to interact with one specific
13048
+ * addon's surface regardless of how many caps it exports.
13049
+ *
13050
+ * - `capability` — the most precise form. Single cap name. Use for
13051
+ * integration tokens where you want to grant `addons.installPackage`
13052
+ * and nothing else.
13053
+ *
13054
+ * `access` is REQUIRED with min 1 element. `admin` bypass is the
13055
+ * "give me everything" escape; there is no wildcard scope.
13056
+ */
13057
+ var AllowedProviderSchema = union([literal("*"), array(string())]);
13058
+ var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
13059
+ var CapScopeSchema = _enum(["device", "system"]);
13060
+ /**
13061
+ * DeviceSelector (scope model v3 — 2026-08-12).
13062
+ *
13063
+ * A `device` grant no longer carries a frozen list of deviceIds. It carries
13064
+ * a SELECTOR the matcher resolves against the live fleet, so the grant can be
13065
+ * DYNAMIC: a `types:['camera']` selector automatically covers a camera added
13066
+ * AFTER the grant was minted — no re-grant, no re-login.
13067
+ *
13068
+ * - `all` — every device in the deployment. The broad viewer/operator
13069
+ * lever without a `category` grant (a `category` grant also covers device
13070
+ * caps that carry no deviceId; `all` is specifically the device set).
13071
+ * - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
13072
+ * grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
13073
+ * is NOT covered until the grant is edited.
13074
+ * - `types` — every device of a `DeviceType` (e.g. every `camera`).
13075
+ * DYNAMIC. A device that changes type, or a new device of the type,
13076
+ * re-resolves on the next request.
13077
+ * - `locations` — every device whose operator-assigned `location` label is
13078
+ * in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
13079
+ * null/unset location matches NO `locations` selector.
13080
+ */
13081
+ var DeviceSelectorSchema = discriminatedUnion("kind", [
13082
+ object({ kind: literal("all") }),
13083
+ object({
13084
+ kind: literal("ids"),
13085
+ ids: array(number().int()).min(1)
13086
+ }),
13087
+ object({
13088
+ kind: literal("types"),
13089
+ types: array(_enum(DeviceType)).min(1)
13090
+ }),
13091
+ object({
13092
+ kind: literal("locations"),
13093
+ locations: array(string().min(1)).min(1)
13094
+ })
13095
+ ]);
13096
+ var DeviceTokenScopeSchema = object({
13097
+ type: literal("device"),
13098
+ /** The device SET this grant covers — resolved against the live fleet. */
13099
+ selector: DeviceSelectorSchema,
13100
+ access: array(MethodAccessSchema).min(1),
13101
+ /**
13102
+ * Whether a grant on a PARENT device transparently covers its accessory
13103
+ * CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
13104
+ * Direction is parent → children ONLY.
13105
+ *
13106
+ * Absent → the matcher DERIVES it from the access flavour: `view`
13107
+ * inherits (a camera viewer sees the camera's accessories), `create` /
13108
+ * `delete` do NOT (actuating/removing a child is an explicit act the
13109
+ * operator must grant on the child, not inherit from the parent). Set it
13110
+ * explicitly to override that default per grant.
13111
+ */
13112
+ includeLinked: boolean().optional()
13113
+ });
13114
+ /**
13115
+ * v2 → v3 lazy migration. A pre-v3 `device` grant carried
13116
+ * `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
13117
+ * `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
13118
+ * EVERY parse path — stored records AND the JWT-carried scope arrays
13119
+ * normalised at the request boundary ({@link normalizeTokenScopes} in
13120
+ * `device-selector.ts`). Chosen over a one-time DB migration because a
13121
+ * migration cannot reach a JWT already in a client's hands; parse-time
13122
+ * migration covers both without a flag day. No cast — the raw object is read
13123
+ * through `Reflect.get` (its static type is `unknown`).
13124
+ */
13125
+ function migrateLegacyTokenScope(raw) {
13126
+ if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
13127
+ if (Reflect.get(raw, "type") !== "device") return raw;
13128
+ if (Reflect.get(raw, "selector") !== void 0) return raw;
13129
+ const targets = Reflect.get(raw, "targets");
13130
+ if (!Array.isArray(targets)) return raw;
13131
+ return {
13132
+ type: "device",
13133
+ selector: {
13134
+ kind: "ids",
13135
+ ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
13136
+ },
13137
+ access: Reflect.get(raw, "access")
13138
+ };
13139
+ }
13140
+ var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
13141
+ object({
13142
+ type: literal("category"),
13143
+ target: CapScopeSchema,
13144
+ access: array(MethodAccessSchema).min(1)
13145
+ }),
13146
+ object({
13147
+ type: literal("capability"),
13148
+ target: string(),
13149
+ access: array(MethodAccessSchema).min(1)
13150
+ }),
13151
+ object({
13152
+ type: literal("addon"),
13153
+ target: string(),
13154
+ access: array(MethodAccessSchema).min(1)
13155
+ }),
13156
+ DeviceTokenScopeSchema
13157
+ ]));
13158
+ object({
13159
+ id: string(),
13160
+ username: string(),
13161
+ passwordHash: string(),
13162
+ /**
13163
+ * Admin bypass. When true, the middleware skips the scope-access
13164
+ * check entirely. There is no other axis of privilege; the legacy
13165
+ * role enum collapsed onto this boolean in v2.
13166
+ */
13167
+ isAdmin: boolean().default(false),
13168
+ allowedProviders: AllowedProviderSchema,
13169
+ allowedDevices: AllowedDevicesSchema,
13170
+ /**
13171
+ * Scopes granted to this user. Admins bypass; their `scopes` is
13172
+ * ignored. Non-admins without scopes are locked out of every
13173
+ * protected call.
13174
+ */
13175
+ scopes: array(TokenScopeSchema).default([]),
13176
+ createdAt: number(),
13177
+ updatedAt: number()
13178
+ });
13179
+ object({
13180
+ id: string(),
13181
+ label: string(),
13182
+ isAdmin: boolean().default(false),
13183
+ allowedProviders: AllowedProviderSchema,
13184
+ allowedDevices: AllowedDevicesSchema,
13185
+ tokenHash: string(),
13186
+ tokenPrefix: string(),
13187
+ createdAt: number(),
13188
+ lastUsedAt: number().optional()
13189
+ });
13190
+ object({
13191
+ id: string(),
13192
+ userId: string(),
13193
+ name: string(),
13194
+ tokenHash: string(),
13195
+ tokenPrefix: string(),
13196
+ scopes: array(TokenScopeSchema),
13197
+ expiresAt: number().nullish(),
13198
+ lastUsedAt: number().nullish(),
13199
+ createdAt: number()
13200
+ });
13201
+ /** What a share-view grant lets its holder see. */
13202
+ var ShareViewGrantSchema = object({
13203
+ kind: _enum(SHARE_VIEW_KINDS),
13204
+ deviceIds: array(number().int().nonnegative()).min(1).max(64),
13205
+ /** Talk-back, opt-in at mint time; absent means off. */
13206
+ talk: boolean().optional()
13207
+ });
13208
+ var ShareViewScopeSchema = object({
13209
+ type: literal("share-view"),
13210
+ grant: ShareViewGrantSchema
13211
+ });
13212
+ var AddonRoutesScopeSchema = object({
13213
+ type: literal("addon-routes"),
13214
+ access: array(MethodAccessSchema).min(1)
13215
+ });
13216
+ var CredentialScopeSchema = union([
13217
+ literal("*"),
13218
+ ShareViewScopeSchema,
13219
+ AddonRoutesScopeSchema,
13220
+ TokenScopeSchema
13221
+ ]);
13222
+ object({
13223
+ kind: literal("credential"),
13224
+ sub: string().min(1),
13225
+ jti: string().min(16),
13226
+ scopes: array(CredentialScopeSchema).min(1)
13227
+ });
12990
13228
  _enum(["new-session", "step-up"]);
12991
13229
  /** The languages the hub's app landing pages are written in (D858). */
12992
13230
  var AppPageLangSchema = _enum(["en", "it"]);
@@ -13722,7 +13960,14 @@ var AlertSeveritySchema = _enum([
13722
13960
  ]);
13723
13961
  var AlertActionSchema = object({
13724
13962
  label: string(),
13725
- href: string().optional()
13963
+ href: string().optional(),
13964
+ /**
13965
+ * How `href` is followed. Absent / `app`: an admin-ui route (client-side).
13966
+ * `server`: a route the HUB serves (an addon HTTP route such as an OAuth
13967
+ * start) — the browser must leave the SPA with a full navigation, because
13968
+ * the SPA has no such route and would bounce to the home page.
13969
+ */
13970
+ navigation: _enum(["app", "server"]).optional()
13726
13971
  });
13727
13972
  var AlertStatusSchema = _enum([
13728
13973
  "active",
@@ -42743,6 +42988,9 @@ var NcSystemEventKindSchema = _enum([
42743
42988
  "server-updated",
42744
42989
  "export-completed",
42745
42990
  "backup-completed",
42991
+ "alert-critical",
42992
+ "alert-error",
42993
+ "alert-critical-resolved",
42746
42994
  "camera-online",
42747
42995
  "camera-offline",
42748
42996
  "camera-disabled",
@@ -44778,202 +45026,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
44778
45026
  auth: "admin"
44779
45027
  }), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
44780
45028
  /**
44781
- * Zod schemas for persisted record types.
44782
- *
44783
- * These schemas serve as the single source of truth for types that are
44784
- * stored in the settings-store backend and retrieved via tRPC. They
44785
- * replace the manual TypeScript interfaces with schema-derived types,
44786
- * enabling runtime validation when reading from the backend.
44787
- *
44788
- * Convention: each schema is named `<Type>Schema`, the inferred TS type
44789
- * keeps the original name for backward compatibility.
44790
- */
44791
- /**
44792
- * Auth model (v2 — 2026-05-12 caps-only):
44793
- *
44794
- * Two principals:
44795
- * - `isAdmin: true` — full bypass. Admin scope set is ignored.
44796
- * - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
44797
- *
44798
- * No role enum. There used to be `viewer / agent / scoped` and earlier
44799
- * `super_admin` — collapsed onto the single boolean because every
44800
- * non-admin caller is governed by the same scope-check rules; the
44801
- * distinction was only ever used to route role-specific procedures
44802
- * which we no longer have. CLI / webhook integrations are `cst_*` tokens
44803
- * with `isAdmin: false` + an explicit scope list.
44804
- */
44805
- /** Per-method access flavour. Materialised on every cap method via codegen. */
44806
- var MethodAccessSchema = _enum([
44807
- "view",
44808
- "create",
44809
- "delete"
44810
- ]);
44811
- /**
44812
- * A single scope grant. Three forms — checked in matcher with OR
44813
- * semantics; the first match decides whether the call passes:
44814
- *
44815
- * - `category` — broadest. `target: 'device' | 'system'` selects every
44816
- * cap with the matching `scope` declaration. New caps inherit grants
44817
- * automatically — adding a device cap to the codebase makes it
44818
- * reachable to every user with `category:device [...]` without a
44819
- * re-grant. Use this for "family viewer" / "operator" tiers.
44820
- *
44821
- * - `addon` — every cap that ships inside a given addon id. Niche;
44822
- * useful when an integration needs to interact with one specific
44823
- * addon's surface regardless of how many caps it exports.
44824
- *
44825
- * - `capability` — the most precise form. Single cap name. Use for
44826
- * integration tokens where you want to grant `addons.installPackage`
44827
- * and nothing else.
44828
- *
44829
- * `access` is REQUIRED with min 1 element. `admin` bypass is the
44830
- * "give me everything" escape; there is no wildcard scope.
44831
- */
44832
- var AllowedProviderSchema = union([literal("*"), array(string())]);
44833
- var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
44834
- var CapScopeSchema = _enum(["device", "system"]);
44835
- /**
44836
- * DeviceSelector (scope model v3 — 2026-08-12).
44837
- *
44838
- * A `device` grant no longer carries a frozen list of deviceIds. It carries
44839
- * a SELECTOR the matcher resolves against the live fleet, so the grant can be
44840
- * DYNAMIC: a `types:['camera']` selector automatically covers a camera added
44841
- * AFTER the grant was minted — no re-grant, no re-login.
44842
- *
44843
- * - `all` — every device in the deployment. The broad viewer/operator
44844
- * lever without a `category` grant (a `category` grant also covers device
44845
- * caps that carry no deviceId; `all` is specifically the device set).
44846
- * - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
44847
- * grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
44848
- * is NOT covered until the grant is edited.
44849
- * - `types` — every device of a `DeviceType` (e.g. every `camera`).
44850
- * DYNAMIC. A device that changes type, or a new device of the type,
44851
- * re-resolves on the next request.
44852
- * - `locations` — every device whose operator-assigned `location` label is
44853
- * in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
44854
- * null/unset location matches NO `locations` selector.
44855
- */
44856
- var DeviceSelectorSchema = discriminatedUnion("kind", [
44857
- object({ kind: literal("all") }),
44858
- object({
44859
- kind: literal("ids"),
44860
- ids: array(number().int()).min(1)
44861
- }),
44862
- object({
44863
- kind: literal("types"),
44864
- types: array(_enum(DeviceType)).min(1)
44865
- }),
44866
- object({
44867
- kind: literal("locations"),
44868
- locations: array(string().min(1)).min(1)
44869
- })
44870
- ]);
44871
- var DeviceTokenScopeSchema = object({
44872
- type: literal("device"),
44873
- /** The device SET this grant covers — resolved against the live fleet. */
44874
- selector: DeviceSelectorSchema,
44875
- access: array(MethodAccessSchema).min(1),
44876
- /**
44877
- * Whether a grant on a PARENT device transparently covers its accessory
44878
- * CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
44879
- * Direction is parent → children ONLY.
44880
- *
44881
- * Absent → the matcher DERIVES it from the access flavour: `view`
44882
- * inherits (a camera viewer sees the camera's accessories), `create` /
44883
- * `delete` do NOT (actuating/removing a child is an explicit act the
44884
- * operator must grant on the child, not inherit from the parent). Set it
44885
- * explicitly to override that default per grant.
44886
- */
44887
- includeLinked: boolean().optional()
44888
- });
44889
- /**
44890
- * v2 → v3 lazy migration. A pre-v3 `device` grant carried
44891
- * `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
44892
- * `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
44893
- * EVERY parse path — stored records AND the JWT-carried scope arrays
44894
- * normalised at the request boundary ({@link normalizeTokenScopes} in
44895
- * `device-selector.ts`). Chosen over a one-time DB migration because a
44896
- * migration cannot reach a JWT already in a client's hands; parse-time
44897
- * migration covers both without a flag day. No cast — the raw object is read
44898
- * through `Reflect.get` (its static type is `unknown`).
44899
- */
44900
- function migrateLegacyTokenScope(raw) {
44901
- if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
44902
- if (Reflect.get(raw, "type") !== "device") return raw;
44903
- if (Reflect.get(raw, "selector") !== void 0) return raw;
44904
- const targets = Reflect.get(raw, "targets");
44905
- if (!Array.isArray(targets)) return raw;
44906
- return {
44907
- type: "device",
44908
- selector: {
44909
- kind: "ids",
44910
- ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
44911
- },
44912
- access: Reflect.get(raw, "access")
44913
- };
44914
- }
44915
- var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
44916
- object({
44917
- type: literal("category"),
44918
- target: CapScopeSchema,
44919
- access: array(MethodAccessSchema).min(1)
44920
- }),
44921
- object({
44922
- type: literal("capability"),
44923
- target: string(),
44924
- access: array(MethodAccessSchema).min(1)
44925
- }),
44926
- object({
44927
- type: literal("addon"),
44928
- target: string(),
44929
- access: array(MethodAccessSchema).min(1)
44930
- }),
44931
- DeviceTokenScopeSchema
44932
- ]));
44933
- object({
44934
- id: string(),
44935
- username: string(),
44936
- passwordHash: string(),
44937
- /**
44938
- * Admin bypass. When true, the middleware skips the scope-access
44939
- * check entirely. There is no other axis of privilege; the legacy
44940
- * role enum collapsed onto this boolean in v2.
44941
- */
44942
- isAdmin: boolean().default(false),
44943
- allowedProviders: AllowedProviderSchema,
44944
- allowedDevices: AllowedDevicesSchema,
44945
- /**
44946
- * Scopes granted to this user. Admins bypass; their `scopes` is
44947
- * ignored. Non-admins without scopes are locked out of every
44948
- * protected call.
44949
- */
44950
- scopes: array(TokenScopeSchema).default([]),
44951
- createdAt: number(),
44952
- updatedAt: number()
44953
- });
44954
- object({
44955
- id: string(),
44956
- label: string(),
44957
- isAdmin: boolean().default(false),
44958
- allowedProviders: AllowedProviderSchema,
44959
- allowedDevices: AllowedDevicesSchema,
44960
- tokenHash: string(),
44961
- tokenPrefix: string(),
44962
- createdAt: number(),
44963
- lastUsedAt: number().optional()
44964
- });
44965
- object({
44966
- id: string(),
44967
- userId: string(),
44968
- name: string(),
44969
- tokenHash: string(),
44970
- tokenPrefix: string(),
44971
- scopes: array(TokenScopeSchema),
44972
- expiresAt: number().nullish(),
44973
- lastUsedAt: number().nullish(),
44974
- createdAt: number()
44975
- });
44976
- /**
44977
45029
  * `oauth-integration` — a collection cap by which an addon declares
44978
45030
  * itself a linkable OAuth client of the hub's core `/oauth2/*` server.
44979
45031
  * Each provider returns a static descriptor; the core enumerates them
@@ -51835,7 +51887,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
51835
51887
  }), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
51836
51888
  kind: "mutation",
51837
51889
  auth: "admin"
51838
- }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
51890
+ }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
51891
+ clear: boolean(),
51892
+ repointLocationId: string().optional()
51893
+ }), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
51839
51894
  kind: "mutation",
51840
51895
  auth: "admin"
51841
51896
  }), method(StorageCleanupInputSchema, object({ jobId: string() }), {
@@ -56190,6 +56245,11 @@ onStatusChanged: { data: object({
56190
56245
  *
56191
56246
  * `kind: 'poll'` — cloud REST APIs typically have no push channel; the
56192
56247
  * provider refreshes the slice on an interval and eagerly after commands.
56248
+ *
56249
+ * UNKNOWN IS NOT OFF. Every field the appliance reports separately is
56250
+ * nullable: `null` means "not known right now" (the appliance has not said,
56251
+ * the link is down, or the description does not carry it) and is never
56252
+ * rendered or exported as `false` / `0`. `availability` says why.
56193
56253
  */
56194
56254
  var DishwasherStateSchema = _enum([
56195
56255
  "idle",
@@ -56199,43 +56259,155 @@ var DishwasherStateSchema = _enum([
56199
56259
  "error",
56200
56260
  "unavailable"
56201
56261
  ]);
56262
+ /**
56263
+ * The appliance's own operation state, uncollapsed. `state` above is the coarse
56264
+ * view for compact surfaces; this is what the appliance said.
56265
+ */
56266
+ var DishwasherOperationStateSchema = _enum([
56267
+ "Inactive",
56268
+ "Ready",
56269
+ "DelayedStart",
56270
+ "Run",
56271
+ "Pause",
56272
+ "ActionRequired",
56273
+ "Finished",
56274
+ "Error",
56275
+ "Aborting"
56276
+ ]);
56277
+ /**
56278
+ * Why fields may be `null`:
56279
+ * - `available` — the link is up and the description is loaded;
56280
+ * - `offline` — the local link is down (values are unknown, not last-known);
56281
+ * - `description-missing` — the link is up but the appliance's description could not
56282
+ * be loaded, so its values cannot be decoded.
56283
+ */
56284
+ var DishwasherAvailabilitySchema = _enum([
56285
+ "available",
56286
+ "offline",
56287
+ "description-missing"
56288
+ ]);
56202
56289
  var DishwasherConsumableLevelSchema = _enum([
56203
56290
  "ok",
56204
56291
  "low",
56205
56292
  "empty"
56206
56293
  ]);
56207
56294
  var DishwasherStatusSchema = object({
56295
+ availability: DishwasherAvailabilitySchema,
56296
+ /** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
56208
56297
  state: DishwasherStateSchema,
56209
- /** Active program id/name, or null when none selected / unknown. */
56298
+ /** The appliance's operation state as reported; null when not known. */
56299
+ operationState: DishwasherOperationStateSchema.nullable(),
56300
+ /** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
56210
56301
  program: string().nullable(),
56211
- /** Program tokens the hardware accepts — drives the UI selector. */
56302
+ /** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
56303
+ selectedProgram: string().nullable(),
56304
+ /** Feature keys of the programs the appliance currently offers — drives the UI selector. */
56212
56305
  availablePrograms: array(string()),
56213
- /** Minutes remaining on the active cycle, or null when not running. */
56214
- remainingMinutes: number().int().nonnegative().nullable(),
56306
+ /** Seconds remaining on the active cycle, or null when not running / not known. */
56307
+ remainingSeconds: number().int().nonnegative().nullable(),
56308
+ /** Seconds the delayed start is set to (time until the cycle starts), or null. */
56309
+ delayedStartSeconds: number().int().nonnegative().nullable(),
56215
56310
  /** Cycle completion 0..100, or null when not applicable. */
56216
56311
  progressPercent: number().min(0).max(100).nullable(),
56217
- /** True when the door is reported open. */
56218
- doorOpen: boolean(),
56219
- /** True when remote start is allowed (door closed, power on, etc.). */
56220
- remoteStartAllowed: boolean(),
56221
- /** Main power / switched-on state. */
56222
- powerOn: boolean(),
56312
+ /** True when the door is reported open; null when the door state is not known. */
56313
+ doorOpen: boolean().nullable(),
56314
+ /** True when the door is latched (locked) during a cycle; null when not reported. */
56315
+ doorLocked: boolean().nullable(),
56316
+ /** True when remote start is allowed (door closed, power on, etc.); null when not known. */
56317
+ remoteStartAllowed: boolean().nullable(),
56318
+ /** True when the appliance accepts remote control now; null when not known. */
56319
+ remoteControlActive: boolean().nullable(),
56320
+ /** True while somebody operates the appliance at its panel; null when not reported. */
56321
+ localControlActive: boolean().nullable(),
56322
+ /** Main power / switched-on state; null when not known. */
56323
+ powerOn: boolean().nullable(),
56324
+ /** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
56325
+ powerState: string().nullable(),
56223
56326
  saltLevel: DishwasherConsumableLevelSchema.nullable(),
56224
56327
  rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
56225
- halfLoad: boolean(),
56226
- hygienePlus: boolean(),
56328
+ /** Option states: null when the appliance does not expose the option or has not said. */
56329
+ halfLoad: boolean().nullable(),
56330
+ hygienePlus: boolean().nullable(),
56227
56331
  /** Extra dry option when the appliance exposes it. */
56228
- extraDry: boolean(),
56332
+ extraDry: boolean().nullable(),
56229
56333
  /** Intensive zone (lower basket) when the appliance exposes it. */
56230
- intensiveZone: boolean(),
56334
+ intensiveZone: boolean().nullable(),
56231
56335
  /** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
56232
- varioSpeedPlus: boolean(),
56233
- /** Child lock (controls disabled on the appliance). */
56234
- childLock: boolean(),
56336
+ varioSpeedPlus: boolean().nullable(),
56337
+ /** Child lock (controls disabled on the appliance); null when not known. */
56338
+ childLock: boolean().nullable(),
56339
+ /** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
56340
+ activeEvents: array(string()),
56341
+ /** Numeric error code when the appliance reports one; null otherwise. */
56235
56342
  errorCode: number().nullable(),
56343
+ /** Name of the raised alert-level event while the appliance is in error; null otherwise. */
56236
56344
  errorLabel: string().nullable(),
56345
+ /** Ms epoch of the last value received from the appliance; 0 = never. */
56237
56346
  lastFetchedAt: number()
56238
56347
  });
56348
+ var DeviceIdSchema = number().int().nonnegative();
56349
+ /** A value a program option or setting can take. */
56350
+ var DishwasherValueSchema = union([
56351
+ boolean(),
56352
+ string(),
56353
+ number()
56354
+ ]);
56355
+ var DishwasherAccessSchema = _enum([
56356
+ "none",
56357
+ "read",
56358
+ "readWrite",
56359
+ "writeOnly",
56360
+ "readStatic"
56361
+ ]);
56362
+ /**
56363
+ * One option or setting the appliance declares, with the constraints its description
56364
+ * gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
56365
+ */
56366
+ var DishwasherOptionDescriptorSchema = object({
56367
+ /** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
56368
+ key: string(),
56369
+ /** Last segment of the key, for display. */
56370
+ name: string(),
56371
+ type: _enum([
56372
+ "boolean",
56373
+ "number",
56374
+ "enum",
56375
+ "string"
56376
+ ]),
56377
+ access: DishwasherAccessSchema,
56378
+ /** The appliance reports this entity as currently available. */
56379
+ available: boolean(),
56380
+ /** Unit the description declares for a number; null when it declares none. */
56381
+ unit: string().nullable(),
56382
+ min: number().nullable(),
56383
+ max: number().nullable(),
56384
+ step: number().nullable(),
56385
+ /** Allowed members of an enum; null for other types. */
56386
+ enumValues: array(string()).nullable(),
56387
+ defaultValue: DishwasherValueSchema.nullable()
56388
+ });
56389
+ var DishwasherProgramSchema = object({
56390
+ /** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
56391
+ key: string(),
56392
+ name: string(),
56393
+ /** The appliance currently offers this program. */
56394
+ available: boolean(),
56395
+ /** The options this program lists, with the program-level access / availability / default. */
56396
+ options: array(DishwasherOptionDescriptorSchema)
56397
+ });
56398
+ var DishwasherOptionsSchema = object({
56399
+ availability: DishwasherAvailabilitySchema,
56400
+ /** What the appliance can be told to do, from the commands its description declares. */
56401
+ supportsStart: boolean(),
56402
+ supportsPause: boolean(),
56403
+ supportsResume: boolean(),
56404
+ supportsStop: boolean(),
56405
+ supportsPower: boolean(),
56406
+ /** Every program the description lists, with its options. */
56407
+ programs: array(DishwasherProgramSchema),
56408
+ /** Every option and setting entity the description lists (programs reference these by key). */
56409
+ options: array(DishwasherOptionDescriptorSchema)
56410
+ });
56239
56411
  var dishwasherCapability = {
56240
56412
  name: "dishwasher",
56241
56413
  scope: "device",
@@ -56243,86 +56415,102 @@ var dishwasherCapability = {
56243
56415
  mode: "singleton",
56244
56416
  deviceTypes: [DeviceType.Dishwasher],
56245
56417
  methods: {
56246
- start: method(object({ deviceId: number().int().nonnegative() }), _void(), {
56418
+ /**
56419
+ * Start a program. Without `program` the selected one starts. `options` are
56420
+ * option feature keys; each is checked against the program's constraints.
56421
+ */
56422
+ start: method(object({
56423
+ deviceId: DeviceIdSchema,
56424
+ program: string().min(1).optional(),
56425
+ options: record(string(), DishwasherValueSchema).optional()
56426
+ }), _void(), {
56247
56427
  kind: "mutation",
56248
56428
  auth: "protected"
56249
56429
  }),
56250
- pause: method(object({ deviceId: number().int().nonnegative() }), _void(), {
56430
+ pause: method(object({ deviceId: DeviceIdSchema }), _void(), {
56251
56431
  kind: "mutation",
56252
56432
  auth: "protected"
56253
56433
  }),
56254
- stop: method(object({ deviceId: number().int().nonnegative() }), _void(), {
56434
+ resume: method(object({ deviceId: DeviceIdSchema }), _void(), {
56435
+ kind: "mutation",
56436
+ auth: "protected"
56437
+ }),
56438
+ stop: method(object({ deviceId: DeviceIdSchema }), _void(), {
56255
56439
  kind: "mutation",
56256
56440
  auth: "protected"
56257
56441
  }),
56442
+ /** Select (not start) a program; refused when the appliance does not offer it. */
56258
56443
  setProgram: method(object({
56259
- deviceId: number().int().nonnegative(),
56444
+ deviceId: DeviceIdSchema,
56260
56445
  program: string().min(1)
56261
56446
  }), _void(), {
56262
56447
  kind: "mutation",
56263
56448
  auth: "protected"
56264
56449
  }),
56265
56450
  setPower: method(object({
56266
- deviceId: number().int().nonnegative(),
56451
+ deviceId: DeviceIdSchema,
56267
56452
  on: boolean()
56268
56453
  }), _void(), {
56269
56454
  kind: "mutation",
56270
56455
  auth: "protected"
56271
56456
  }),
56272
56457
  setHalfLoad: method(object({
56273
- deviceId: number().int().nonnegative(),
56458
+ deviceId: DeviceIdSchema,
56274
56459
  on: boolean()
56275
56460
  }), _void(), {
56276
56461
  kind: "mutation",
56277
56462
  auth: "protected"
56278
56463
  }),
56279
56464
  setHygienePlus: method(object({
56280
- deviceId: number().int().nonnegative(),
56465
+ deviceId: DeviceIdSchema,
56281
56466
  on: boolean()
56282
56467
  }), _void(), {
56283
56468
  kind: "mutation",
56284
56469
  auth: "protected"
56285
56470
  }),
56286
56471
  setExtraDry: method(object({
56287
- deviceId: number().int().nonnegative(),
56472
+ deviceId: DeviceIdSchema,
56288
56473
  on: boolean()
56289
56474
  }), _void(), {
56290
56475
  kind: "mutation",
56291
56476
  auth: "protected"
56292
56477
  }),
56293
56478
  setIntensiveZone: method(object({
56294
- deviceId: number().int().nonnegative(),
56479
+ deviceId: DeviceIdSchema,
56295
56480
  on: boolean()
56296
56481
  }), _void(), {
56297
56482
  kind: "mutation",
56298
56483
  auth: "protected"
56299
56484
  }),
56300
56485
  setVarioSpeedPlus: method(object({
56301
- deviceId: number().int().nonnegative(),
56486
+ deviceId: DeviceIdSchema,
56302
56487
  on: boolean()
56303
56488
  }), _void(), {
56304
56489
  kind: "mutation",
56305
56490
  auth: "protected"
56306
56491
  }),
56307
56492
  setChildLock: method(object({
56308
- deviceId: number().int().nonnegative(),
56493
+ deviceId: DeviceIdSchema,
56309
56494
  on: boolean()
56310
56495
  }), _void(), {
56311
56496
  kind: "mutation",
56312
56497
  auth: "protected"
56313
56498
  }),
56499
+ /**
56500
+ * Write any option or setting by feature key. Refused when the description does
56501
+ * not list it, it is not writable or not available now, or the value is outside
56502
+ * its declared range / members.
56503
+ */
56314
56504
  setOption: method(object({
56315
- deviceId: number().int().nonnegative(),
56505
+ deviceId: DeviceIdSchema,
56316
56506
  key: string().min(1),
56317
- value: union([
56318
- boolean(),
56319
- string(),
56320
- number()
56321
- ])
56507
+ value: DishwasherValueSchema
56322
56508
  }), _void(), {
56323
56509
  kind: "mutation",
56324
56510
  auth: "protected"
56325
- })
56511
+ }),
56512
+ /** What this appliance can do, from its own description — the UI is derived from it. */
56513
+ getOptions: method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" })
56326
56514
  },
56327
56515
  status: {
56328
56516
  schema: DishwasherStatusSchema,
@@ -70271,6 +70459,12 @@ Object.freeze({
70271
70459
  addonId: null,
70272
70460
  access: "view"
70273
70461
  },
70462
+ "dishwasher.getOptions": {
70463
+ capName: "dishwasher",
70464
+ capScope: "device",
70465
+ addonId: null,
70466
+ access: "view"
70467
+ },
70274
70468
  "dishwasher.getStatus": {
70275
70469
  capName: "dishwasher",
70276
70470
  capScope: "device",
@@ -70283,6 +70477,12 @@ Object.freeze({
70283
70477
  addonId: null,
70284
70478
  access: "create"
70285
70479
  },
70480
+ "dishwasher.resume": {
70481
+ capName: "dishwasher",
70482
+ capScope: "device",
70483
+ addonId: null,
70484
+ access: "create"
70485
+ },
70286
70486
  "dishwasher.setChildLock": {
70287
70487
  capName: "dishwasher",
70288
70488
  capScope: "device",
@@ -74783,6 +74983,12 @@ Object.freeze({
74783
74983
  addonId: null,
74784
74984
  access: "view"
74785
74985
  },
74986
+ "storageMigration.moverClearance": {
74987
+ capName: "storage-migration",
74988
+ capScope: "system",
74989
+ addonId: null,
74990
+ access: "view"
74991
+ },
74786
74992
  "storageMigration.movers": {
74787
74993
  capName: "storage-migration",
74788
74994
  capScope: "system",
@@ -76976,6 +77182,11 @@ Object.freeze({
76976
77182
  form: "single",
76977
77183
  optional: false
76978
77184
  }],
77185
+ "dishwasher.getOptions": [{
77186
+ name: "deviceId",
77187
+ form: "single",
77188
+ optional: false
77189
+ }],
76979
77190
  "dishwasher.getStatus": [{
76980
77191
  name: "deviceId",
76981
77192
  form: "single",
@@ -76986,6 +77197,11 @@ Object.freeze({
76986
77197
  form: "single",
76987
77198
  optional: false
76988
77199
  }],
77200
+ "dishwasher.resume": [{
77201
+ name: "deviceId",
77202
+ form: "single",
77203
+ optional: false
77204
+ }],
76989
77205
  "dishwasher.setChildLock": [{
76990
77206
  name: "deviceId",
76991
77207
  form: "single",
@@ -79279,6 +79495,9 @@ new Map(Object.entries({
79279
79495
  "wrapper-update-available": "system",
79280
79496
  "backup-completed": "system",
79281
79497
  "export-completed": "system",
79498
+ "alert-critical": "system",
79499
+ "alert-error": "system",
79500
+ "alert-critical-resolved": "system",
79282
79501
  "storage-location-low": "system",
79283
79502
  "storage-location-critical": "system",
79284
79503
  "storage-location-ok": "system",
@@ -79403,6 +79622,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
79403
79622
  "storage-location-ok"
79404
79623
  ]
79405
79624
  },
79625
+ {
79626
+ id: "alerts",
79627
+ family: "system",
79628
+ label: "Alerts",
79629
+ kinds: [
79630
+ "alert-critical",
79631
+ "alert-error",
79632
+ "alert-critical-resolved"
79633
+ ]
79634
+ },
79406
79635
  {
79407
79636
  id: "alarm",
79408
79637
  family: "alarm",
@@ -79447,6 +79676,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
79447
79676
  return [[descriptor.kind, field]];
79448
79677
  })));
79449
79678
  Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
79679
+ object({
79680
+ phase: _enum(["raised", "resolved"]),
79681
+ episodeId: string().min(1),
79682
+ alertId: string().min(1),
79683
+ severity: AlertSeveritySchema,
79684
+ category: string(),
79685
+ title: string(),
79686
+ message: string(),
79687
+ sourceType: string().optional(),
79688
+ sourceId: string().optional(),
79689
+ nodeId: string().optional(),
79690
+ /** The alert's own action link (where the operator acts on it), when it has one. */
79691
+ actionUrl: string().optional(),
79692
+ at: number()
79693
+ });
79450
79694
  var RULE_BODY_ONLY = ["body"];
79451
79695
  var RULE_TEXT = ["title", "body"];
79452
79696
  var BATTERY = ["device-battery-low", "device-battery-normal"];
@@ -79456,6 +79700,11 @@ var TANK = [
79456
79700
  "device-tank-full",
79457
79701
  "device-tank-normal"
79458
79702
  ];
79703
+ var ALERT_EPISODE = [
79704
+ "alert-critical",
79705
+ "alert-error",
79706
+ "alert-critical-resolved"
79707
+ ];
79459
79708
  var UPDATES = [
79460
79709
  "addon-update-available",
79461
79710
  "server-update-available",
@@ -79648,14 +79897,14 @@ var STATE_SUMMARY_VARS = [
79648
79897
  ([...RULE_TEXT], [...CONSUMABLE]),
79649
79898
  ([...RULE_TEXT], [...TANK]),
79650
79899
  [...RULE_TEXT],
79651
- ([...RULE_TEXT], [...UPDATES]),
79652
- ([...RULE_TEXT], [...UPDATES]),
79653
- [...RULE_TEXT],
79900
+ ([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
79901
+ ([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
79654
79902
  [...RULE_TEXT],
79655
79903
  [...RULE_TEXT],
79656
79904
  [...RULE_TEXT],
79657
79905
  [...RULE_TEXT],
79658
79906
  [...RULE_TEXT],
79907
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
79659
79908
  [...RULE_TEXT],
79660
79909
  [...RULE_TEXT],
79661
79910
  [...RULE_TEXT],
@@ -79673,7 +79922,11 @@ var STATE_SUMMARY_VARS = [
79673
79922
  [...RULE_TEXT],
79674
79923
  [...RULE_TEXT],
79675
79924
  [...RULE_TEXT],
79676
- [...RULE_TEXT],
79925
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
79926
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
79927
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
79928
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
79929
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
79677
79930
  [...RULE_TEXT],
79678
79931
  [...RULE_TEXT],
79679
79932
  [...RULE_TEXT],