@camstack/addon-export-google 0.1.94 → 0.1.96

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.
@@ -73,7 +73,7 @@ function createApiDeviceGateway(deps) {
73
73
  };
74
74
  }
75
75
  //#endregion
76
- //#region ../types/dist/event-category-BvOFi6PY.mjs
76
+ //#region ../types/dist/event-category-DOl51-Ij.mjs
77
77
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
78
78
  EventCategory["SystemBoot"] = "system.boot";
79
79
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -152,9 +152,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
152
152
  /**
153
153
  * The node's one-shot runner boot check (D877): planned runners against the
154
154
  * process service, `degraded` when any is failed, refused or missing. The
155
- * alert centre turns it into one alert and a direct critical push.
155
+ * alert centre turns it into one critical alert.
156
156
  */
157
157
  EventCategory["SystemRunnerCheck"] = "system.runner-check";
158
+ /**
159
+ * An alert EPISODE opened or closed, emitted by the alert centre for alerts
160
+ * of severity `critical` or `error` (`AlertEpisodePayload`). The alert
161
+ * centre sends no notification of its own: Notification Center turns this
162
+ * into the `alert-critical` / `alert-error` / `alert-critical-resolved`
163
+ * system-event kinds, and reconciles from the alerts store because a bus
164
+ * event may be dropped (D8, D11).
165
+ */
166
+ EventCategory["AlertEpisode"] = "alert.episode";
158
167
  EventCategory["AddonError"] = "addon.error";
159
168
  EventCategory["AddonPageReady"] = "addon.page-ready";
160
169
  EventCategory["AddonWidgetReady"] = "addon.widget-ready";
@@ -5479,7 +5488,7 @@ var ZodIssueCode = {
5479
5488
  var ZodFirstPartyTypeKind;
5480
5489
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5481
5490
  //#endregion
5482
- //#region ../types/dist/sleep-BegKjwUu.mjs
5491
+ //#region ../types/dist/sleep-BxjU_fJM.mjs
5483
5492
  /**
5484
5493
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5485
5494
  * window to float samples (D455).
@@ -7861,6 +7870,12 @@ function normalizeAddonInitResult(result) {
7861
7870
  if (Array.isArray(result)) return { providers: result };
7862
7871
  return result;
7863
7872
  }
7873
+ /**
7874
+ * The share-view scope kinds a `csv_*` share token can carry. The hub mints
7875
+ * and validates them (`share-token.service.ts` builds its enum from this
7876
+ * list); a data plane names the kinds it ACCEPTS in `share`.
7877
+ */
7878
+ var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
7864
7879
  /** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
7865
7880
  var PeerBytesTicketSchema = object({
7866
7881
  /** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
@@ -12601,6 +12616,229 @@ var ConvertResultSchema = object({
12601
12616
  function scopesAllowDeviceCap(scopes, access) {
12602
12617
  return scopes.some((s) => s.type === "category" && s.target === "device" && s.access.includes(access));
12603
12618
  }
12619
+ /**
12620
+ * Zod schemas for persisted record types.
12621
+ *
12622
+ * These schemas serve as the single source of truth for types that are
12623
+ * stored in the settings-store backend and retrieved via tRPC. They
12624
+ * replace the manual TypeScript interfaces with schema-derived types,
12625
+ * enabling runtime validation when reading from the backend.
12626
+ *
12627
+ * Convention: each schema is named `<Type>Schema`, the inferred TS type
12628
+ * keeps the original name for backward compatibility.
12629
+ */
12630
+ /**
12631
+ * Auth model (v2 — 2026-05-12 caps-only):
12632
+ *
12633
+ * Two principals:
12634
+ * - `isAdmin: true` — full bypass. Admin scope set is ignored.
12635
+ * - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
12636
+ *
12637
+ * No role enum. There used to be `viewer / agent / scoped` and earlier
12638
+ * `super_admin` — collapsed onto the single boolean because every
12639
+ * non-admin caller is governed by the same scope-check rules; the
12640
+ * distinction was only ever used to route role-specific procedures
12641
+ * which we no longer have. CLI / webhook integrations are `cst_*` tokens
12642
+ * with `isAdmin: false` + an explicit scope list.
12643
+ */
12644
+ /** Per-method access flavour. Materialised on every cap method via codegen. */
12645
+ var MethodAccessSchema = _enum([
12646
+ "view",
12647
+ "create",
12648
+ "delete"
12649
+ ]);
12650
+ /**
12651
+ * A single scope grant. Three forms — checked in matcher with OR
12652
+ * semantics; the first match decides whether the call passes:
12653
+ *
12654
+ * - `category` — broadest. `target: 'device' | 'system'` selects every
12655
+ * cap with the matching `scope` declaration. New caps inherit grants
12656
+ * automatically — adding a device cap to the codebase makes it
12657
+ * reachable to every user with `category:device [...]` without a
12658
+ * re-grant. Use this for "family viewer" / "operator" tiers.
12659
+ *
12660
+ * - `addon` — every cap that ships inside a given addon id. Niche;
12661
+ * useful when an integration needs to interact with one specific
12662
+ * addon's surface regardless of how many caps it exports.
12663
+ *
12664
+ * - `capability` — the most precise form. Single cap name. Use for
12665
+ * integration tokens where you want to grant `addons.installPackage`
12666
+ * and nothing else.
12667
+ *
12668
+ * `access` is REQUIRED with min 1 element. `admin` bypass is the
12669
+ * "give me everything" escape; there is no wildcard scope.
12670
+ */
12671
+ var AllowedProviderSchema = union([literal("*"), array(string())]);
12672
+ var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
12673
+ var CapScopeSchema = _enum(["device", "system"]);
12674
+ /**
12675
+ * DeviceSelector (scope model v3 — 2026-08-12).
12676
+ *
12677
+ * A `device` grant no longer carries a frozen list of deviceIds. It carries
12678
+ * a SELECTOR the matcher resolves against the live fleet, so the grant can be
12679
+ * DYNAMIC: a `types:['camera']` selector automatically covers a camera added
12680
+ * AFTER the grant was minted — no re-grant, no re-login.
12681
+ *
12682
+ * - `all` — every device in the deployment. The broad viewer/operator
12683
+ * lever without a `category` grant (a `category` grant also covers device
12684
+ * caps that carry no deviceId; `all` is specifically the device set).
12685
+ * - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
12686
+ * grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
12687
+ * is NOT covered until the grant is edited.
12688
+ * - `types` — every device of a `DeviceType` (e.g. every `camera`).
12689
+ * DYNAMIC. A device that changes type, or a new device of the type,
12690
+ * re-resolves on the next request.
12691
+ * - `locations` — every device whose operator-assigned `location` label is
12692
+ * in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
12693
+ * null/unset location matches NO `locations` selector.
12694
+ */
12695
+ var DeviceSelectorSchema = discriminatedUnion("kind", [
12696
+ object({ kind: literal("all") }),
12697
+ object({
12698
+ kind: literal("ids"),
12699
+ ids: array(number().int()).min(1)
12700
+ }),
12701
+ object({
12702
+ kind: literal("types"),
12703
+ types: array(_enum(DeviceType)).min(1)
12704
+ }),
12705
+ object({
12706
+ kind: literal("locations"),
12707
+ locations: array(string().min(1)).min(1)
12708
+ })
12709
+ ]);
12710
+ var DeviceTokenScopeSchema = object({
12711
+ type: literal("device"),
12712
+ /** The device SET this grant covers — resolved against the live fleet. */
12713
+ selector: DeviceSelectorSchema,
12714
+ access: array(MethodAccessSchema).min(1),
12715
+ /**
12716
+ * Whether a grant on a PARENT device transparently covers its accessory
12717
+ * CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
12718
+ * Direction is parent → children ONLY.
12719
+ *
12720
+ * Absent → the matcher DERIVES it from the access flavour: `view`
12721
+ * inherits (a camera viewer sees the camera's accessories), `create` /
12722
+ * `delete` do NOT (actuating/removing a child is an explicit act the
12723
+ * operator must grant on the child, not inherit from the parent). Set it
12724
+ * explicitly to override that default per grant.
12725
+ */
12726
+ includeLinked: boolean().optional()
12727
+ });
12728
+ /**
12729
+ * v2 → v3 lazy migration. A pre-v3 `device` grant carried
12730
+ * `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
12731
+ * `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
12732
+ * EVERY parse path — stored records AND the JWT-carried scope arrays
12733
+ * normalised at the request boundary ({@link normalizeTokenScopes} in
12734
+ * `device-selector.ts`). Chosen over a one-time DB migration because a
12735
+ * migration cannot reach a JWT already in a client's hands; parse-time
12736
+ * migration covers both without a flag day. No cast — the raw object is read
12737
+ * through `Reflect.get` (its static type is `unknown`).
12738
+ */
12739
+ function migrateLegacyTokenScope(raw) {
12740
+ if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
12741
+ if (Reflect.get(raw, "type") !== "device") return raw;
12742
+ if (Reflect.get(raw, "selector") !== void 0) return raw;
12743
+ const targets = Reflect.get(raw, "targets");
12744
+ if (!Array.isArray(targets)) return raw;
12745
+ return {
12746
+ type: "device",
12747
+ selector: {
12748
+ kind: "ids",
12749
+ ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
12750
+ },
12751
+ access: Reflect.get(raw, "access")
12752
+ };
12753
+ }
12754
+ var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
12755
+ object({
12756
+ type: literal("category"),
12757
+ target: CapScopeSchema,
12758
+ access: array(MethodAccessSchema).min(1)
12759
+ }),
12760
+ object({
12761
+ type: literal("capability"),
12762
+ target: string(),
12763
+ access: array(MethodAccessSchema).min(1)
12764
+ }),
12765
+ object({
12766
+ type: literal("addon"),
12767
+ target: string(),
12768
+ access: array(MethodAccessSchema).min(1)
12769
+ }),
12770
+ DeviceTokenScopeSchema
12771
+ ]));
12772
+ object({
12773
+ id: string(),
12774
+ username: string(),
12775
+ passwordHash: string(),
12776
+ /**
12777
+ * Admin bypass. When true, the middleware skips the scope-access
12778
+ * check entirely. There is no other axis of privilege; the legacy
12779
+ * role enum collapsed onto this boolean in v2.
12780
+ */
12781
+ isAdmin: boolean().default(false),
12782
+ allowedProviders: AllowedProviderSchema,
12783
+ allowedDevices: AllowedDevicesSchema,
12784
+ /**
12785
+ * Scopes granted to this user. Admins bypass; their `scopes` is
12786
+ * ignored. Non-admins without scopes are locked out of every
12787
+ * protected call.
12788
+ */
12789
+ scopes: array(TokenScopeSchema).default([]),
12790
+ createdAt: number(),
12791
+ updatedAt: number()
12792
+ });
12793
+ object({
12794
+ id: string(),
12795
+ label: string(),
12796
+ isAdmin: boolean().default(false),
12797
+ allowedProviders: AllowedProviderSchema,
12798
+ allowedDevices: AllowedDevicesSchema,
12799
+ tokenHash: string(),
12800
+ tokenPrefix: string(),
12801
+ createdAt: number(),
12802
+ lastUsedAt: number().optional()
12803
+ });
12804
+ object({
12805
+ id: string(),
12806
+ userId: string(),
12807
+ name: string(),
12808
+ tokenHash: string(),
12809
+ tokenPrefix: string(),
12810
+ scopes: array(TokenScopeSchema),
12811
+ expiresAt: number().nullish(),
12812
+ lastUsedAt: number().nullish(),
12813
+ createdAt: number()
12814
+ });
12815
+ /** What a share-view grant lets its holder see. */
12816
+ var ShareViewGrantSchema = object({
12817
+ kind: _enum(SHARE_VIEW_KINDS),
12818
+ deviceIds: array(number().int().nonnegative()).min(1).max(64),
12819
+ /** Talk-back, opt-in at mint time; absent means off. */
12820
+ talk: boolean().optional()
12821
+ });
12822
+ var ShareViewScopeSchema = object({
12823
+ type: literal("share-view"),
12824
+ grant: ShareViewGrantSchema
12825
+ });
12826
+ var AddonRoutesScopeSchema = object({
12827
+ type: literal("addon-routes"),
12828
+ access: array(MethodAccessSchema).min(1)
12829
+ });
12830
+ var CredentialScopeSchema = union([
12831
+ literal("*"),
12832
+ ShareViewScopeSchema,
12833
+ AddonRoutesScopeSchema,
12834
+ TokenScopeSchema
12835
+ ]);
12836
+ object({
12837
+ kind: literal("credential"),
12838
+ sub: string().min(1),
12839
+ jti: string().min(16),
12840
+ scopes: array(CredentialScopeSchema).min(1)
12841
+ });
12604
12842
  _enum(["new-session", "step-up"]);
12605
12843
  /** The languages the hub's app landing pages are written in (D858). */
12606
12844
  var AppPageLangSchema = _enum(["en", "it"]);
@@ -13336,7 +13574,14 @@ var AlertSeveritySchema = _enum([
13336
13574
  ]);
13337
13575
  var AlertActionSchema = object({
13338
13576
  label: string(),
13339
- href: string().optional()
13577
+ href: string().optional(),
13578
+ /**
13579
+ * How `href` is followed. Absent / `app`: an admin-ui route (client-side).
13580
+ * `server`: a route the HUB serves (an addon HTTP route such as an OAuth
13581
+ * start) — the browser must leave the SPA with a full navigation, because
13582
+ * the SPA has no such route and would bounce to the home page.
13583
+ */
13584
+ navigation: _enum(["app", "server"]).optional()
13340
13585
  });
13341
13586
  var AlertStatusSchema = _enum([
13342
13587
  "active",
@@ -41737,6 +41982,9 @@ var NcSystemEventKindSchema = _enum([
41737
41982
  "server-updated",
41738
41983
  "export-completed",
41739
41984
  "backup-completed",
41985
+ "alert-critical",
41986
+ "alert-error",
41987
+ "alert-critical-resolved",
41740
41988
  "camera-online",
41741
41989
  "camera-offline",
41742
41990
  "camera-disabled",
@@ -43772,202 +44020,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
43772
44020
  auth: "admin"
43773
44021
  }), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
43774
44022
  /**
43775
- * Zod schemas for persisted record types.
43776
- *
43777
- * These schemas serve as the single source of truth for types that are
43778
- * stored in the settings-store backend and retrieved via tRPC. They
43779
- * replace the manual TypeScript interfaces with schema-derived types,
43780
- * enabling runtime validation when reading from the backend.
43781
- *
43782
- * Convention: each schema is named `<Type>Schema`, the inferred TS type
43783
- * keeps the original name for backward compatibility.
43784
- */
43785
- /**
43786
- * Auth model (v2 — 2026-05-12 caps-only):
43787
- *
43788
- * Two principals:
43789
- * - `isAdmin: true` — full bypass. Admin scope set is ignored.
43790
- * - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
43791
- *
43792
- * No role enum. There used to be `viewer / agent / scoped` and earlier
43793
- * `super_admin` — collapsed onto the single boolean because every
43794
- * non-admin caller is governed by the same scope-check rules; the
43795
- * distinction was only ever used to route role-specific procedures
43796
- * which we no longer have. CLI / webhook integrations are `cst_*` tokens
43797
- * with `isAdmin: false` + an explicit scope list.
43798
- */
43799
- /** Per-method access flavour. Materialised on every cap method via codegen. */
43800
- var MethodAccessSchema = _enum([
43801
- "view",
43802
- "create",
43803
- "delete"
43804
- ]);
43805
- /**
43806
- * A single scope grant. Three forms — checked in matcher with OR
43807
- * semantics; the first match decides whether the call passes:
43808
- *
43809
- * - `category` — broadest. `target: 'device' | 'system'` selects every
43810
- * cap with the matching `scope` declaration. New caps inherit grants
43811
- * automatically — adding a device cap to the codebase makes it
43812
- * reachable to every user with `category:device [...]` without a
43813
- * re-grant. Use this for "family viewer" / "operator" tiers.
43814
- *
43815
- * - `addon` — every cap that ships inside a given addon id. Niche;
43816
- * useful when an integration needs to interact with one specific
43817
- * addon's surface regardless of how many caps it exports.
43818
- *
43819
- * - `capability` — the most precise form. Single cap name. Use for
43820
- * integration tokens where you want to grant `addons.installPackage`
43821
- * and nothing else.
43822
- *
43823
- * `access` is REQUIRED with min 1 element. `admin` bypass is the
43824
- * "give me everything" escape; there is no wildcard scope.
43825
- */
43826
- var AllowedProviderSchema = union([literal("*"), array(string())]);
43827
- var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
43828
- var CapScopeSchema = _enum(["device", "system"]);
43829
- /**
43830
- * DeviceSelector (scope model v3 — 2026-08-12).
43831
- *
43832
- * A `device` grant no longer carries a frozen list of deviceIds. It carries
43833
- * a SELECTOR the matcher resolves against the live fleet, so the grant can be
43834
- * DYNAMIC: a `types:['camera']` selector automatically covers a camera added
43835
- * AFTER the grant was minted — no re-grant, no re-login.
43836
- *
43837
- * - `all` — every device in the deployment. The broad viewer/operator
43838
- * lever without a `category` grant (a `category` grant also covers device
43839
- * caps that carry no deviceId; `all` is specifically the device set).
43840
- * - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
43841
- * grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
43842
- * is NOT covered until the grant is edited.
43843
- * - `types` — every device of a `DeviceType` (e.g. every `camera`).
43844
- * DYNAMIC. A device that changes type, or a new device of the type,
43845
- * re-resolves on the next request.
43846
- * - `locations` — every device whose operator-assigned `location` label is
43847
- * in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
43848
- * null/unset location matches NO `locations` selector.
43849
- */
43850
- var DeviceSelectorSchema = discriminatedUnion("kind", [
43851
- object({ kind: literal("all") }),
43852
- object({
43853
- kind: literal("ids"),
43854
- ids: array(number().int()).min(1)
43855
- }),
43856
- object({
43857
- kind: literal("types"),
43858
- types: array(_enum(DeviceType)).min(1)
43859
- }),
43860
- object({
43861
- kind: literal("locations"),
43862
- locations: array(string().min(1)).min(1)
43863
- })
43864
- ]);
43865
- var DeviceTokenScopeSchema = object({
43866
- type: literal("device"),
43867
- /** The device SET this grant covers — resolved against the live fleet. */
43868
- selector: DeviceSelectorSchema,
43869
- access: array(MethodAccessSchema).min(1),
43870
- /**
43871
- * Whether a grant on a PARENT device transparently covers its accessory
43872
- * CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
43873
- * Direction is parent → children ONLY.
43874
- *
43875
- * Absent → the matcher DERIVES it from the access flavour: `view`
43876
- * inherits (a camera viewer sees the camera's accessories), `create` /
43877
- * `delete` do NOT (actuating/removing a child is an explicit act the
43878
- * operator must grant on the child, not inherit from the parent). Set it
43879
- * explicitly to override that default per grant.
43880
- */
43881
- includeLinked: boolean().optional()
43882
- });
43883
- /**
43884
- * v2 → v3 lazy migration. A pre-v3 `device` grant carried
43885
- * `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
43886
- * `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
43887
- * EVERY parse path — stored records AND the JWT-carried scope arrays
43888
- * normalised at the request boundary ({@link normalizeTokenScopes} in
43889
- * `device-selector.ts`). Chosen over a one-time DB migration because a
43890
- * migration cannot reach a JWT already in a client's hands; parse-time
43891
- * migration covers both without a flag day. No cast — the raw object is read
43892
- * through `Reflect.get` (its static type is `unknown`).
43893
- */
43894
- function migrateLegacyTokenScope(raw) {
43895
- if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
43896
- if (Reflect.get(raw, "type") !== "device") return raw;
43897
- if (Reflect.get(raw, "selector") !== void 0) return raw;
43898
- const targets = Reflect.get(raw, "targets");
43899
- if (!Array.isArray(targets)) return raw;
43900
- return {
43901
- type: "device",
43902
- selector: {
43903
- kind: "ids",
43904
- ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
43905
- },
43906
- access: Reflect.get(raw, "access")
43907
- };
43908
- }
43909
- var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
43910
- object({
43911
- type: literal("category"),
43912
- target: CapScopeSchema,
43913
- access: array(MethodAccessSchema).min(1)
43914
- }),
43915
- object({
43916
- type: literal("capability"),
43917
- target: string(),
43918
- access: array(MethodAccessSchema).min(1)
43919
- }),
43920
- object({
43921
- type: literal("addon"),
43922
- target: string(),
43923
- access: array(MethodAccessSchema).min(1)
43924
- }),
43925
- DeviceTokenScopeSchema
43926
- ]));
43927
- object({
43928
- id: string(),
43929
- username: string(),
43930
- passwordHash: string(),
43931
- /**
43932
- * Admin bypass. When true, the middleware skips the scope-access
43933
- * check entirely. There is no other axis of privilege; the legacy
43934
- * role enum collapsed onto this boolean in v2.
43935
- */
43936
- isAdmin: boolean().default(false),
43937
- allowedProviders: AllowedProviderSchema,
43938
- allowedDevices: AllowedDevicesSchema,
43939
- /**
43940
- * Scopes granted to this user. Admins bypass; their `scopes` is
43941
- * ignored. Non-admins without scopes are locked out of every
43942
- * protected call.
43943
- */
43944
- scopes: array(TokenScopeSchema).default([]),
43945
- createdAt: number(),
43946
- updatedAt: number()
43947
- });
43948
- object({
43949
- id: string(),
43950
- label: string(),
43951
- isAdmin: boolean().default(false),
43952
- allowedProviders: AllowedProviderSchema,
43953
- allowedDevices: AllowedDevicesSchema,
43954
- tokenHash: string(),
43955
- tokenPrefix: string(),
43956
- createdAt: number(),
43957
- lastUsedAt: number().optional()
43958
- });
43959
- object({
43960
- id: string(),
43961
- userId: string(),
43962
- name: string(),
43963
- tokenHash: string(),
43964
- tokenPrefix: string(),
43965
- scopes: array(TokenScopeSchema),
43966
- expiresAt: number().nullish(),
43967
- lastUsedAt: number().nullish(),
43968
- createdAt: number()
43969
- });
43970
- /**
43971
44023
  * `oauth-integration` — a collection cap by which an addon declares
43972
44024
  * itself a linkable OAuth client of the hub's core `/oauth2/*` server.
43973
44025
  * Each provider returns a static descriptor; the core enumerates them
@@ -50785,7 +50837,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
50785
50837
  }), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
50786
50838
  kind: "mutation",
50787
50839
  auth: "admin"
50788
- }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
50840
+ }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
50841
+ clear: boolean(),
50842
+ repointLocationId: string().optional()
50843
+ }), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
50789
50844
  kind: "mutation",
50790
50845
  auth: "admin"
50791
50846
  }), method(StorageCleanupInputSchema, object({ jobId: string() }), {
@@ -54232,6 +54287,11 @@ object({
54232
54287
  *
54233
54288
  * `kind: 'poll'` — cloud REST APIs typically have no push channel; the
54234
54289
  * provider refreshes the slice on an interval and eagerly after commands.
54290
+ *
54291
+ * UNKNOWN IS NOT OFF. Every field the appliance reports separately is
54292
+ * nullable: `null` means "not known right now" (the appliance has not said,
54293
+ * the link is down, or the description does not carry it) and is never
54294
+ * rendered or exported as `false` / `0`. `availability` says why.
54235
54295
  */
54236
54296
  var DishwasherStateSchema = _enum([
54237
54297
  "idle",
@@ -54241,112 +54301,227 @@ var DishwasherStateSchema = _enum([
54241
54301
  "error",
54242
54302
  "unavailable"
54243
54303
  ]);
54304
+ /**
54305
+ * The appliance's own operation state, uncollapsed. `state` above is the coarse
54306
+ * view for compact surfaces; this is what the appliance said.
54307
+ */
54308
+ var DishwasherOperationStateSchema = _enum([
54309
+ "Inactive",
54310
+ "Ready",
54311
+ "DelayedStart",
54312
+ "Run",
54313
+ "Pause",
54314
+ "ActionRequired",
54315
+ "Finished",
54316
+ "Error",
54317
+ "Aborting"
54318
+ ]);
54319
+ /**
54320
+ * Why fields may be `null`:
54321
+ * - `available` — the link is up and the description is loaded;
54322
+ * - `offline` — the local link is down (values are unknown, not last-known);
54323
+ * - `description-missing` — the link is up but the appliance's description could not
54324
+ * be loaded, so its values cannot be decoded.
54325
+ */
54326
+ var DishwasherAvailabilitySchema = _enum([
54327
+ "available",
54328
+ "offline",
54329
+ "description-missing"
54330
+ ]);
54244
54331
  var DishwasherConsumableLevelSchema = _enum([
54245
54332
  "ok",
54246
54333
  "low",
54247
54334
  "empty"
54248
54335
  ]);
54249
54336
  object({
54337
+ availability: DishwasherAvailabilitySchema,
54338
+ /** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
54250
54339
  state: DishwasherStateSchema,
54251
- /** Active program id/name, or null when none selected / unknown. */
54340
+ /** The appliance's operation state as reported; null when not known. */
54341
+ operationState: DishwasherOperationStateSchema.nullable(),
54342
+ /** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
54252
54343
  program: string().nullable(),
54253
- /** Program tokens the hardware accepts — drives the UI selector. */
54344
+ /** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
54345
+ selectedProgram: string().nullable(),
54346
+ /** Feature keys of the programs the appliance currently offers — drives the UI selector. */
54254
54347
  availablePrograms: array(string()),
54255
- /** Minutes remaining on the active cycle, or null when not running. */
54256
- remainingMinutes: number().int().nonnegative().nullable(),
54348
+ /** Seconds remaining on the active cycle, or null when not running / not known. */
54349
+ remainingSeconds: number().int().nonnegative().nullable(),
54350
+ /** Seconds the delayed start is set to (time until the cycle starts), or null. */
54351
+ delayedStartSeconds: number().int().nonnegative().nullable(),
54257
54352
  /** Cycle completion 0..100, or null when not applicable. */
54258
54353
  progressPercent: number().min(0).max(100).nullable(),
54259
- /** True when the door is reported open. */
54260
- doorOpen: boolean(),
54261
- /** True when remote start is allowed (door closed, power on, etc.). */
54262
- remoteStartAllowed: boolean(),
54263
- /** Main power / switched-on state. */
54264
- powerOn: boolean(),
54354
+ /** True when the door is reported open; null when the door state is not known. */
54355
+ doorOpen: boolean().nullable(),
54356
+ /** True when the door is latched (locked) during a cycle; null when not reported. */
54357
+ doorLocked: boolean().nullable(),
54358
+ /** True when remote start is allowed (door closed, power on, etc.); null when not known. */
54359
+ remoteStartAllowed: boolean().nullable(),
54360
+ /** True when the appliance accepts remote control now; null when not known. */
54361
+ remoteControlActive: boolean().nullable(),
54362
+ /** True while somebody operates the appliance at its panel; null when not reported. */
54363
+ localControlActive: boolean().nullable(),
54364
+ /** Main power / switched-on state; null when not known. */
54365
+ powerOn: boolean().nullable(),
54366
+ /** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
54367
+ powerState: string().nullable(),
54265
54368
  saltLevel: DishwasherConsumableLevelSchema.nullable(),
54266
54369
  rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
54267
- halfLoad: boolean(),
54268
- hygienePlus: boolean(),
54370
+ /** Option states: null when the appliance does not expose the option or has not said. */
54371
+ halfLoad: boolean().nullable(),
54372
+ hygienePlus: boolean().nullable(),
54269
54373
  /** Extra dry option when the appliance exposes it. */
54270
- extraDry: boolean(),
54374
+ extraDry: boolean().nullable(),
54271
54375
  /** Intensive zone (lower basket) when the appliance exposes it. */
54272
- intensiveZone: boolean(),
54376
+ intensiveZone: boolean().nullable(),
54273
54377
  /** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
54274
- varioSpeedPlus: boolean(),
54275
- /** Child lock (controls disabled on the appliance). */
54276
- childLock: boolean(),
54378
+ varioSpeedPlus: boolean().nullable(),
54379
+ /** Child lock (controls disabled on the appliance); null when not known. */
54380
+ childLock: boolean().nullable(),
54381
+ /** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
54382
+ activeEvents: array(string()),
54383
+ /** Numeric error code when the appliance reports one; null otherwise. */
54277
54384
  errorCode: number().nullable(),
54385
+ /** Name of the raised alert-level event while the appliance is in error; null otherwise. */
54278
54386
  errorLabel: string().nullable(),
54387
+ /** Ms epoch of the last value received from the appliance; 0 = never. */
54279
54388
  lastFetchedAt: number()
54280
54389
  });
54281
- DeviceType.Dishwasher, method(object({ deviceId: number().int().nonnegative() }), _void(), {
54390
+ var DeviceIdSchema = number().int().nonnegative();
54391
+ /** A value a program option or setting can take. */
54392
+ var DishwasherValueSchema = union([
54393
+ boolean(),
54394
+ string(),
54395
+ number()
54396
+ ]);
54397
+ var DishwasherAccessSchema = _enum([
54398
+ "none",
54399
+ "read",
54400
+ "readWrite",
54401
+ "writeOnly",
54402
+ "readStatic"
54403
+ ]);
54404
+ /**
54405
+ * One option or setting the appliance declares, with the constraints its description
54406
+ * gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
54407
+ */
54408
+ var DishwasherOptionDescriptorSchema = object({
54409
+ /** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
54410
+ key: string(),
54411
+ /** Last segment of the key, for display. */
54412
+ name: string(),
54413
+ type: _enum([
54414
+ "boolean",
54415
+ "number",
54416
+ "enum",
54417
+ "string"
54418
+ ]),
54419
+ access: DishwasherAccessSchema,
54420
+ /** The appliance reports this entity as currently available. */
54421
+ available: boolean(),
54422
+ /** Unit the description declares for a number; null when it declares none. */
54423
+ unit: string().nullable(),
54424
+ min: number().nullable(),
54425
+ max: number().nullable(),
54426
+ step: number().nullable(),
54427
+ /** Allowed members of an enum; null for other types. */
54428
+ enumValues: array(string()).nullable(),
54429
+ defaultValue: DishwasherValueSchema.nullable()
54430
+ });
54431
+ var DishwasherProgramSchema = object({
54432
+ /** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
54433
+ key: string(),
54434
+ name: string(),
54435
+ /** The appliance currently offers this program. */
54436
+ available: boolean(),
54437
+ /** The options this program lists, with the program-level access / availability / default. */
54438
+ options: array(DishwasherOptionDescriptorSchema)
54439
+ });
54440
+ var DishwasherOptionsSchema = object({
54441
+ availability: DishwasherAvailabilitySchema,
54442
+ /** What the appliance can be told to do, from the commands its description declares. */
54443
+ supportsStart: boolean(),
54444
+ supportsPause: boolean(),
54445
+ supportsResume: boolean(),
54446
+ supportsStop: boolean(),
54447
+ supportsPower: boolean(),
54448
+ /** Every program the description lists, with its options. */
54449
+ programs: array(DishwasherProgramSchema),
54450
+ /** Every option and setting entity the description lists (programs reference these by key). */
54451
+ options: array(DishwasherOptionDescriptorSchema)
54452
+ });
54453
+ DeviceType.Dishwasher, method(object({
54454
+ deviceId: DeviceIdSchema,
54455
+ program: string().min(1).optional(),
54456
+ options: record(string(), DishwasherValueSchema).optional()
54457
+ }), _void(), {
54282
54458
  kind: "mutation",
54283
54459
  auth: "protected"
54284
- }), method(object({ deviceId: number().int().nonnegative() }), _void(), {
54460
+ }), method(object({ deviceId: DeviceIdSchema }), _void(), {
54285
54461
  kind: "mutation",
54286
54462
  auth: "protected"
54287
- }), method(object({ deviceId: number().int().nonnegative() }), _void(), {
54463
+ }), method(object({ deviceId: DeviceIdSchema }), _void(), {
54464
+ kind: "mutation",
54465
+ auth: "protected"
54466
+ }), method(object({ deviceId: DeviceIdSchema }), _void(), {
54288
54467
  kind: "mutation",
54289
54468
  auth: "protected"
54290
54469
  }), method(object({
54291
- deviceId: number().int().nonnegative(),
54470
+ deviceId: DeviceIdSchema,
54292
54471
  program: string().min(1)
54293
54472
  }), _void(), {
54294
54473
  kind: "mutation",
54295
54474
  auth: "protected"
54296
54475
  }), method(object({
54297
- deviceId: number().int().nonnegative(),
54476
+ deviceId: DeviceIdSchema,
54298
54477
  on: boolean()
54299
54478
  }), _void(), {
54300
54479
  kind: "mutation",
54301
54480
  auth: "protected"
54302
54481
  }), method(object({
54303
- deviceId: number().int().nonnegative(),
54482
+ deviceId: DeviceIdSchema,
54304
54483
  on: boolean()
54305
54484
  }), _void(), {
54306
54485
  kind: "mutation",
54307
54486
  auth: "protected"
54308
54487
  }), method(object({
54309
- deviceId: number().int().nonnegative(),
54488
+ deviceId: DeviceIdSchema,
54310
54489
  on: boolean()
54311
54490
  }), _void(), {
54312
54491
  kind: "mutation",
54313
54492
  auth: "protected"
54314
54493
  }), method(object({
54315
- deviceId: number().int().nonnegative(),
54494
+ deviceId: DeviceIdSchema,
54316
54495
  on: boolean()
54317
54496
  }), _void(), {
54318
54497
  kind: "mutation",
54319
54498
  auth: "protected"
54320
54499
  }), method(object({
54321
- deviceId: number().int().nonnegative(),
54500
+ deviceId: DeviceIdSchema,
54322
54501
  on: boolean()
54323
54502
  }), _void(), {
54324
54503
  kind: "mutation",
54325
54504
  auth: "protected"
54326
54505
  }), method(object({
54327
- deviceId: number().int().nonnegative(),
54506
+ deviceId: DeviceIdSchema,
54328
54507
  on: boolean()
54329
54508
  }), _void(), {
54330
54509
  kind: "mutation",
54331
54510
  auth: "protected"
54332
54511
  }), method(object({
54333
- deviceId: number().int().nonnegative(),
54512
+ deviceId: DeviceIdSchema,
54334
54513
  on: boolean()
54335
54514
  }), _void(), {
54336
54515
  kind: "mutation",
54337
54516
  auth: "protected"
54338
54517
  }), method(object({
54339
- deviceId: number().int().nonnegative(),
54518
+ deviceId: DeviceIdSchema,
54340
54519
  key: string().min(1),
54341
- value: union([
54342
- boolean(),
54343
- string(),
54344
- number()
54345
- ])
54520
+ value: DishwasherValueSchema
54346
54521
  }), _void(), {
54347
54522
  kind: "mutation",
54348
54523
  auth: "protected"
54349
- });
54524
+ }), method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" });
54350
54525
  object({
54351
54526
  /** Ms epoch of the last press. null = never observed since this provider started. */
54352
54527
  lastPressedAt: number().nullable(),
@@ -64413,6 +64588,12 @@ Object.freeze({
64413
64588
  addonId: null,
64414
64589
  access: "view"
64415
64590
  },
64591
+ "dishwasher.getOptions": {
64592
+ capName: "dishwasher",
64593
+ capScope: "device",
64594
+ addonId: null,
64595
+ access: "view"
64596
+ },
64416
64597
  "dishwasher.getStatus": {
64417
64598
  capName: "dishwasher",
64418
64599
  capScope: "device",
@@ -64425,6 +64606,12 @@ Object.freeze({
64425
64606
  addonId: null,
64426
64607
  access: "create"
64427
64608
  },
64609
+ "dishwasher.resume": {
64610
+ capName: "dishwasher",
64611
+ capScope: "device",
64612
+ addonId: null,
64613
+ access: "create"
64614
+ },
64428
64615
  "dishwasher.setChildLock": {
64429
64616
  capName: "dishwasher",
64430
64617
  capScope: "device",
@@ -68925,6 +69112,12 @@ Object.freeze({
68925
69112
  addonId: null,
68926
69113
  access: "view"
68927
69114
  },
69115
+ "storageMigration.moverClearance": {
69116
+ capName: "storage-migration",
69117
+ capScope: "system",
69118
+ addonId: null,
69119
+ access: "view"
69120
+ },
68928
69121
  "storageMigration.movers": {
68929
69122
  capName: "storage-migration",
68930
69123
  capScope: "system",
@@ -71118,6 +71311,11 @@ Object.freeze({
71118
71311
  form: "single",
71119
71312
  optional: false
71120
71313
  }],
71314
+ "dishwasher.getOptions": [{
71315
+ name: "deviceId",
71316
+ form: "single",
71317
+ optional: false
71318
+ }],
71121
71319
  "dishwasher.getStatus": [{
71122
71320
  name: "deviceId",
71123
71321
  form: "single",
@@ -71128,6 +71326,11 @@ Object.freeze({
71128
71326
  form: "single",
71129
71327
  optional: false
71130
71328
  }],
71329
+ "dishwasher.resume": [{
71330
+ name: "deviceId",
71331
+ form: "single",
71332
+ optional: false
71333
+ }],
71131
71334
  "dishwasher.setChildLock": [{
71132
71335
  name: "deviceId",
71133
71336
  form: "single",
@@ -73214,6 +73417,9 @@ new Map(Object.entries({
73214
73417
  "wrapper-update-available": "system",
73215
73418
  "backup-completed": "system",
73216
73419
  "export-completed": "system",
73420
+ "alert-critical": "system",
73421
+ "alert-error": "system",
73422
+ "alert-critical-resolved": "system",
73217
73423
  "storage-location-low": "system",
73218
73424
  "storage-location-critical": "system",
73219
73425
  "storage-location-ok": "system",
@@ -73338,6 +73544,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
73338
73544
  "storage-location-ok"
73339
73545
  ]
73340
73546
  },
73547
+ {
73548
+ id: "alerts",
73549
+ family: "system",
73550
+ label: "Alerts",
73551
+ kinds: [
73552
+ "alert-critical",
73553
+ "alert-error",
73554
+ "alert-critical-resolved"
73555
+ ]
73556
+ },
73341
73557
  {
73342
73558
  id: "alarm",
73343
73559
  family: "alarm",
@@ -73382,6 +73598,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
73382
73598
  return [[descriptor.kind, field]];
73383
73599
  })));
73384
73600
  Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
73601
+ object({
73602
+ phase: _enum(["raised", "resolved"]),
73603
+ episodeId: string().min(1),
73604
+ alertId: string().min(1),
73605
+ severity: AlertSeveritySchema,
73606
+ category: string(),
73607
+ title: string(),
73608
+ message: string(),
73609
+ sourceType: string().optional(),
73610
+ sourceId: string().optional(),
73611
+ nodeId: string().optional(),
73612
+ /** The alert's own action link (where the operator acts on it), when it has one. */
73613
+ actionUrl: string().optional(),
73614
+ at: number()
73615
+ });
73385
73616
  var RULE_BODY_ONLY = ["body"];
73386
73617
  var RULE_TEXT = ["title", "body"];
73387
73618
  var BATTERY = ["device-battery-low", "device-battery-normal"];
@@ -73391,6 +73622,11 @@ var TANK = [
73391
73622
  "device-tank-full",
73392
73623
  "device-tank-normal"
73393
73624
  ];
73625
+ var ALERT_EPISODE = [
73626
+ "alert-critical",
73627
+ "alert-error",
73628
+ "alert-critical-resolved"
73629
+ ];
73394
73630
  var UPDATES = [
73395
73631
  "addon-update-available",
73396
73632
  "server-update-available",
@@ -73583,14 +73819,14 @@ var STATE_SUMMARY_VARS = [
73583
73819
  ([...RULE_TEXT], [...CONSUMABLE]),
73584
73820
  ([...RULE_TEXT], [...TANK]),
73585
73821
  [...RULE_TEXT],
73586
- ([...RULE_TEXT], [...UPDATES]),
73587
- ([...RULE_TEXT], [...UPDATES]),
73588
- [...RULE_TEXT],
73822
+ ([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
73823
+ ([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
73589
73824
  [...RULE_TEXT],
73590
73825
  [...RULE_TEXT],
73591
73826
  [...RULE_TEXT],
73592
73827
  [...RULE_TEXT],
73593
73828
  [...RULE_TEXT],
73829
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
73594
73830
  [...RULE_TEXT],
73595
73831
  [...RULE_TEXT],
73596
73832
  [...RULE_TEXT],
@@ -73608,7 +73844,11 @@ var STATE_SUMMARY_VARS = [
73608
73844
  [...RULE_TEXT],
73609
73845
  [...RULE_TEXT],
73610
73846
  [...RULE_TEXT],
73611
- [...RULE_TEXT],
73847
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
73848
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
73849
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
73850
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
73851
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
73612
73852
  [...RULE_TEXT],
73613
73853
  [...RULE_TEXT],
73614
73854
  [...RULE_TEXT],