@camstack/types 1.2.611 → 1.2.613

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.
Files changed (40) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/addon.js +2 -2
  3. package/dist/addon.mjs +2 -2
  4. package/dist/automation/action.d.ts +12 -0
  5. package/dist/automation/index.d.ts +2 -2
  6. package/dist/automation/recipe.d.ts +3473 -0
  7. package/dist/automation/scheduler.d.ts +24 -0
  8. package/dist/automation/step-runner.d.ts +4 -0
  9. package/dist/capabilities/action-source.cap.d.ts +6 -0
  10. package/dist/capabilities/actions.cap.d.ts +42 -0
  11. package/dist/capabilities/camera-streams.cap.d.ts +2 -0
  12. package/dist/capabilities/error.cap.d.ts +44 -1
  13. package/dist/capabilities/index.d.ts +1 -1
  14. package/dist/capabilities/notification-rules.cap.d.ts +26 -0
  15. package/dist/capabilities/osd-manager.cap.d.ts +6 -0
  16. package/dist/capabilities/schedulers.cap.d.ts +48 -0
  17. package/dist/capabilities/schemas/streaming-shared.d.ts +1 -0
  18. package/dist/capabilities/stream-broker.cap.d.ts +8 -0
  19. package/dist/capabilities/stream-catalog.cap.d.ts +4 -0
  20. package/dist/client.js +64 -3
  21. package/dist/client.mjs +64 -3
  22. package/dist/device/base-device.d.ts +10 -1
  23. package/dist/enums/event-category.d.ts +8 -0
  24. package/dist/enums.js +2 -1
  25. package/dist/enums.mjs +2 -1
  26. package/dist/{event-category-7P4A3bYA.mjs → event-category-BEsBTS72.mjs} +8 -0
  27. package/dist/{event-category-CMA0-jGW.js → event-category-CbY1jgIP.js} +8 -0
  28. package/dist/generated/addon-api.d.ts +8 -0
  29. package/dist/generated/method-access-map.d.ts +1 -1
  30. package/dist/generated/method-device-selectors.d.ts +1 -1
  31. package/dist/index.d.ts +3 -3
  32. package/dist/index.js +225 -12
  33. package/dist/index.mjs +221 -13
  34. package/dist/interfaces/event-bus.d.ts +11 -0
  35. package/dist/interfaces/stream-broker.d.ts +7 -0
  36. package/dist/notification/alert-episode.d.ts +23 -0
  37. package/dist/notification/system-event-filters.d.ts +1 -1
  38. package/dist/{runtime-capabilities-CK6y0W5U.mjs → runtime-capabilities-CG61dYnO.mjs} +14 -2
  39. package/dist/{runtime-capabilities-1FIC5jNX.js → runtime-capabilities-LaTKVCAw.js} +14 -2
  40. package/package.json +1 -1
package/dist/client.js CHANGED
@@ -927,6 +927,15 @@ zod.z.object({
927
927
  */
928
928
  autoEligible: zod.z.boolean().optional(),
929
929
  /**
930
+ * The longest continuous session the SOURCE will keep open, in ms, declared by
931
+ * the provider that knows it (a hub that cuts every child's session on a
932
+ * timer). Absent = no limit. The broker re-dials a live source a little
933
+ * BEFORE this elapses, on its own terms and announced to consumers, so the
934
+ * source's cut never lands mid-recording. Declare slightly under what was
935
+ * observed.
936
+ */
937
+ maxSessionMs: zod.z.number().int().positive().optional(),
938
+ /**
930
939
  * The profile slot the PUBLISHER says this stream is: `low` for a stream
931
940
  * whose only sensible role is the low-bandwidth one, `high` for a main
932
941
  * stream. Consulted by the broker's automatic ranking
@@ -23647,6 +23656,13 @@ var NcSystemEventConditionSchema = zod.z.object({
23647
23656
  * pick from. The hub refuses an id the action index does not know.
23648
23657
  */
23649
23658
  commandActions: zod.z.array(zod.z.string().min(1)).min(1).optional(),
23659
+ /**
23660
+ * `device-attention-*` only: the fault CODES this rule speaks about (the
23661
+ * integration declares them through `error.listFaultTypes`; free text is
23662
+ * accepted too). Absent or empty = any fault. The rule matches when any
23663
+ * fault of the episode is in the list.
23664
+ */
23665
+ faultCodes: zod.z.array(zod.z.string().min(1)).optional(),
23650
23666
  /** `device-command` only: how the command settled. A device's own change is not a command. */
23651
23667
  commandOutcomes: zod.z.array(zod.z.enum([
23652
23668
  "confirmed",
@@ -24679,6 +24695,15 @@ var NcRuleInputSchema = zod.z.object({
24679
24695
  */
24680
24696
  askVerdict: zod.z.boolean().optional(),
24681
24697
  /**
24698
+ * An ALERT notification (`alert-critical`, `alert-error`, device attention)
24699
+ * carries the alert's own action — an open-URL button and, for an `invoke`
24700
+ * action, a token-authed button that runs it. Absent and `true` mean ON;
24701
+ * `false` switches it off for this rule. `.optional()`, never `.default()`
24702
+ * (a Zod default does not run on the addon cap path), so a rule authored
24703
+ * before this field keeps the action.
24704
+ */
24705
+ offerAlertAction: zod.z.boolean().optional(),
24706
+ /**
24682
24707
  * Operator tags (D1054), kept on the rule like a core block's. Absent = no
24683
24708
  * tags. `.optional()`, never `.default()`: a partial `updateRule` patch that
24684
24709
  * does not name `tags` keeps the stored ones (the store merges), and an
@@ -27924,7 +27949,10 @@ function createDeviceProxy(api, binding, opts) {
27924
27949
  const doorbellInterface = { getStatus: (input, options) => dispatch("doorbell", "doorbell", "getStatus", "query", input, void 0, options) };
27925
27950
  const energySystemInterface = { getStatus: (input, options) => dispatch("energy-system", "energySystem", "getStatus", "query", input, void 0, options) };
27926
27951
  const enumSensorInterface = { getStatus: (input, options) => dispatch("enum-sensor", "enumSensor", "getStatus", "query", input, void 0, options) };
27927
- const errorInterface = { getStatus: (input, options) => dispatch("error", "error", "getStatus", "query", input, void 0, options) };
27952
+ const errorInterface = {
27953
+ listFaultTypes: (input, options) => dispatch("error", "error", "listFaultTypes", "query", input, void 0, options),
27954
+ getStatus: (input, options) => dispatch("error", "error", "getStatus", "query", input, void 0, options)
27955
+ };
27928
27956
  const eventEmitterInterface = { getStatus: (input, options) => dispatch("event-emitter", "eventEmitter", "getStatus", "query", input, void 0, options) };
27929
27957
  const fanControlInterface = {
27930
27958
  setPercentage: (input, options) => dispatch("fan-control", "fanControl", "setPercentage", "mutation", input, void 0, options),
@@ -30642,7 +30670,8 @@ var NC_SYSTEM_EVENT_FILTER_KEYS = [
30642
30670
  "consumableLowPercent",
30643
30671
  "commandActions",
30644
30672
  "commandOutcomes",
30645
- "commandActorKinds"
30673
+ "commandActorKinds",
30674
+ "faultCodes"
30646
30675
  ];
30647
30676
  /**
30648
30677
  * Does `filter` say anything about `kind`?
@@ -30661,6 +30690,7 @@ function systemEventFilterApplies(kind, filter) {
30661
30690
  case "commandActions":
30662
30691
  case "commandOutcomes":
30663
30692
  case "commandActorKinds": return kind === "device-command";
30693
+ case "faultCodes": return kind === "device-attention-required" || kind === "device-attention-resolved";
30664
30694
  }
30665
30695
  }
30666
30696
  /**
@@ -30776,7 +30806,8 @@ var NC_SYSTEM_EVENT_FAMILY_FILTERS = {
30776
30806
  "consumableLowPercent",
30777
30807
  "commandActions",
30778
30808
  "commandOutcomes",
30779
- "commandActorKinds"
30809
+ "commandActorKinds",
30810
+ "faultCodes"
30780
30811
  ],
30781
30812
  system: ["nodeIds", "packageNames"],
30782
30813
  alarm: ["deviceIds"]
@@ -32942,6 +32973,36 @@ var NC_TEMPLATE_VARS = [
32942
32973
  kinds: ["system"],
32943
32974
  systemEventKinds: [...DEVICE_ATTENTION, ...ALERT_EPISODE]
32944
32975
  },
32976
+ {
32977
+ name: "faultCode",
32978
+ label: "Fault code",
32979
+ example: "hb-rf-eth-connection",
32980
+ group: "system",
32981
+ families: ["rule"],
32982
+ fields: [...RULE_TEXT],
32983
+ kinds: ["system"],
32984
+ systemEventKinds: [...DEVICE_ATTENTION]
32985
+ },
32986
+ {
32987
+ name: "faultLabel",
32988
+ label: "Fault",
32989
+ example: "HB-RF-ETH connection lost",
32990
+ group: "system",
32991
+ families: ["rule"],
32992
+ fields: [...RULE_TEXT],
32993
+ kinds: ["system"],
32994
+ systemEventKinds: [...DEVICE_ATTENTION]
32995
+ },
32996
+ {
32997
+ name: "faults",
32998
+ label: "All active faults",
32999
+ example: "HB-RF-ETH connection lost, CCU supply voltage low",
33000
+ group: "system",
33001
+ families: ["rule"],
33002
+ fields: [...RULE_TEXT],
33003
+ kinds: ["system"],
33004
+ systemEventKinds: [...DEVICE_ATTENTION]
33005
+ },
32945
33006
  {
32946
33007
  name: "exportId",
32947
33008
  label: "Export id",
package/dist/client.mjs CHANGED
@@ -926,6 +926,15 @@ z.object({
926
926
  */
927
927
  autoEligible: z.boolean().optional(),
928
928
  /**
929
+ * The longest continuous session the SOURCE will keep open, in ms, declared by
930
+ * the provider that knows it (a hub that cuts every child's session on a
931
+ * timer). Absent = no limit. The broker re-dials a live source a little
932
+ * BEFORE this elapses, on its own terms and announced to consumers, so the
933
+ * source's cut never lands mid-recording. Declare slightly under what was
934
+ * observed.
935
+ */
936
+ maxSessionMs: z.number().int().positive().optional(),
937
+ /**
929
938
  * The profile slot the PUBLISHER says this stream is: `low` for a stream
930
939
  * whose only sensible role is the low-bandwidth one, `high` for a main
931
940
  * stream. Consulted by the broker's automatic ranking
@@ -23646,6 +23655,13 @@ var NcSystemEventConditionSchema = z.object({
23646
23655
  * pick from. The hub refuses an id the action index does not know.
23647
23656
  */
23648
23657
  commandActions: z.array(z.string().min(1)).min(1).optional(),
23658
+ /**
23659
+ * `device-attention-*` only: the fault CODES this rule speaks about (the
23660
+ * integration declares them through `error.listFaultTypes`; free text is
23661
+ * accepted too). Absent or empty = any fault. The rule matches when any
23662
+ * fault of the episode is in the list.
23663
+ */
23664
+ faultCodes: z.array(z.string().min(1)).optional(),
23649
23665
  /** `device-command` only: how the command settled. A device's own change is not a command. */
23650
23666
  commandOutcomes: z.array(z.enum([
23651
23667
  "confirmed",
@@ -24678,6 +24694,15 @@ var NcRuleInputSchema = z.object({
24678
24694
  */
24679
24695
  askVerdict: z.boolean().optional(),
24680
24696
  /**
24697
+ * An ALERT notification (`alert-critical`, `alert-error`, device attention)
24698
+ * carries the alert's own action — an open-URL button and, for an `invoke`
24699
+ * action, a token-authed button that runs it. Absent and `true` mean ON;
24700
+ * `false` switches it off for this rule. `.optional()`, never `.default()`
24701
+ * (a Zod default does not run on the addon cap path), so a rule authored
24702
+ * before this field keeps the action.
24703
+ */
24704
+ offerAlertAction: z.boolean().optional(),
24705
+ /**
24681
24706
  * Operator tags (D1054), kept on the rule like a core block's. Absent = no
24682
24707
  * tags. `.optional()`, never `.default()`: a partial `updateRule` patch that
24683
24708
  * does not name `tags` keeps the stored ones (the store merges), and an
@@ -27923,7 +27948,10 @@ function createDeviceProxy(api, binding, opts) {
27923
27948
  const doorbellInterface = { getStatus: (input, options) => dispatch("doorbell", "doorbell", "getStatus", "query", input, void 0, options) };
27924
27949
  const energySystemInterface = { getStatus: (input, options) => dispatch("energy-system", "energySystem", "getStatus", "query", input, void 0, options) };
27925
27950
  const enumSensorInterface = { getStatus: (input, options) => dispatch("enum-sensor", "enumSensor", "getStatus", "query", input, void 0, options) };
27926
- const errorInterface = { getStatus: (input, options) => dispatch("error", "error", "getStatus", "query", input, void 0, options) };
27951
+ const errorInterface = {
27952
+ listFaultTypes: (input, options) => dispatch("error", "error", "listFaultTypes", "query", input, void 0, options),
27953
+ getStatus: (input, options) => dispatch("error", "error", "getStatus", "query", input, void 0, options)
27954
+ };
27927
27955
  const eventEmitterInterface = { getStatus: (input, options) => dispatch("event-emitter", "eventEmitter", "getStatus", "query", input, void 0, options) };
27928
27956
  const fanControlInterface = {
27929
27957
  setPercentage: (input, options) => dispatch("fan-control", "fanControl", "setPercentage", "mutation", input, void 0, options),
@@ -30641,7 +30669,8 @@ var NC_SYSTEM_EVENT_FILTER_KEYS = [
30641
30669
  "consumableLowPercent",
30642
30670
  "commandActions",
30643
30671
  "commandOutcomes",
30644
- "commandActorKinds"
30672
+ "commandActorKinds",
30673
+ "faultCodes"
30645
30674
  ];
30646
30675
  /**
30647
30676
  * Does `filter` say anything about `kind`?
@@ -30660,6 +30689,7 @@ function systemEventFilterApplies(kind, filter) {
30660
30689
  case "commandActions":
30661
30690
  case "commandOutcomes":
30662
30691
  case "commandActorKinds": return kind === "device-command";
30692
+ case "faultCodes": return kind === "device-attention-required" || kind === "device-attention-resolved";
30663
30693
  }
30664
30694
  }
30665
30695
  /**
@@ -30775,7 +30805,8 @@ var NC_SYSTEM_EVENT_FAMILY_FILTERS = {
30775
30805
  "consumableLowPercent",
30776
30806
  "commandActions",
30777
30807
  "commandOutcomes",
30778
- "commandActorKinds"
30808
+ "commandActorKinds",
30809
+ "faultCodes"
30779
30810
  ],
30780
30811
  system: ["nodeIds", "packageNames"],
30781
30812
  alarm: ["deviceIds"]
@@ -32941,6 +32972,36 @@ var NC_TEMPLATE_VARS = [
32941
32972
  kinds: ["system"],
32942
32973
  systemEventKinds: [...DEVICE_ATTENTION, ...ALERT_EPISODE]
32943
32974
  },
32975
+ {
32976
+ name: "faultCode",
32977
+ label: "Fault code",
32978
+ example: "hb-rf-eth-connection",
32979
+ group: "system",
32980
+ families: ["rule"],
32981
+ fields: [...RULE_TEXT],
32982
+ kinds: ["system"],
32983
+ systemEventKinds: [...DEVICE_ATTENTION]
32984
+ },
32985
+ {
32986
+ name: "faultLabel",
32987
+ label: "Fault",
32988
+ example: "HB-RF-ETH connection lost",
32989
+ group: "system",
32990
+ families: ["rule"],
32991
+ fields: [...RULE_TEXT],
32992
+ kinds: ["system"],
32993
+ systemEventKinds: [...DEVICE_ATTENTION]
32994
+ },
32995
+ {
32996
+ name: "faults",
32997
+ label: "All active faults",
32998
+ example: "HB-RF-ETH connection lost, CCU supply voltage low",
32999
+ group: "system",
33000
+ families: ["rule"],
33001
+ fields: [...RULE_TEXT],
33002
+ kinds: ["system"],
33003
+ systemEventKinds: [...DEVICE_ATTENTION]
33004
+ },
32944
33005
  {
32945
33006
  name: "exportId",
32946
33007
  label: "Export id",
@@ -10,7 +10,7 @@ import { type DeviceLocalState } from '../generated/device-local-state.js';
10
10
  import { type SourceInfo } from './source-info.js';
11
11
  import { type DeclareIdentifiersOptions, type DeclareIdentifiersResult } from './declare-identifiers.js';
12
12
  import type { RawDeviceIdentifiers } from './device-identifiers.js';
13
- import { type ErrorStatus } from '../capabilities/error.cap.js';
13
+ import { type DeviceFaultType, type ErrorStatus } from '../capabilities/error.cap.js';
14
14
  import type { CustomActionSpec } from '../capabilities/custom-actions.js';
15
15
  /**
16
16
  * Who writes a device's base slices (`device-status`, `feature-probe`): the
@@ -23,6 +23,8 @@ export declare abstract class BaseDevice<T extends z.ZodObject<z.core.$ZodLooseS
23
23
  readonly type: DeviceType;
24
24
  /** True when another process owns the base slices (`options.deviceStatus: 'external'`). */
25
25
  private readonly statusIsExternal;
26
+ /** The fault catalog the integration declared; `[]` until it does. */
27
+ private faultTypes;
26
28
  readonly name: string;
27
29
  readonly parentDeviceId: number | null;
28
30
  readonly role?: DeviceRole;
@@ -217,6 +219,13 @@ export declare abstract class BaseDevice<T extends z.ZodObject<z.core.$ZodLooseS
217
219
  * a restart is compared, not announced again.
218
220
  */
219
221
  protected registerErrorCap(): void;
222
+ /**
223
+ * Declare the fault kinds this device's integration can raise (code, label,
224
+ * severity), served by `error.listFaultTypes` so a rule's code picker is
225
+ * offered the integration's own words. The default is `[]`; a fault outside
226
+ * the catalog is still published. Call it before or after `registerErrorCap`.
227
+ */
228
+ protected declareFaultTypes(types: readonly DeviceFaultType[]): void;
220
229
  /**
221
230
  * Publish the device's fault. The slice is written; on an EDGE (a fault
222
231
  * starts, or one resolves) an attention episode opens or closes through the
@@ -443,6 +443,14 @@ export declare enum EventCategory {
443
443
  * Payload: `{ deviceId, camStreamId, brokerId }`.
444
444
  */
445
445
  StreamBrokerOnRequestStreamSourceRefresh = "stream-broker.onRequestStreamSourceRefresh",
446
+ /**
447
+ * A broker RE-DIALED its source (every dial after the first). A consumer that
448
+ * reads the broker over a transport that does not announce the cut — the
449
+ * recorder's ffmpeg writer — learns here instead of through its idle clock.
450
+ * Telemetry: a dropped event only means the idle clock recovers it later.
451
+ * Payload: `{ deviceId, camStreamId, brokerId, reason }`.
452
+ */
453
+ StreamBrokerOnSourceRestart = "stream-broker.onSourceRestart",
446
454
  /**
447
455
  * A camera provider changed a device's stream parameters (codec /
448
456
  * resolution / bitrate / a stream added or removed). A LOW-LATENCY NUDGE
package/dist/enums.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_event_category = require("./event-category-CMA0-jGW.js");
2
+ const require_event_category = require("./event-category-CbY1jgIP.js");
3
3
  //#region src/enums/event-category-catalog.ts
4
4
  /**
5
5
  * The event-category catalogue: what an operator-facing surface (a picker, the
@@ -143,6 +143,7 @@ var EVENT_CATEGORY_CATALOG = {
143
143
  [require_event_category.EventCategory.StreamBrokerOnCamStreamDemand]: e("streams", "Stream requested", "Stream richiesto"),
144
144
  [require_event_category.EventCategory.StreamBrokerOnCamStreamIdle]: e("streams", "Stream idle", "Stream inattivo"),
145
145
  [require_event_category.EventCategory.StreamBrokerOnRequestStreamSourceRefresh]: e("streams", "Stream source refresh requested", "Aggiornamento sorgente stream richiesto"),
146
+ [require_event_category.EventCategory.StreamBrokerOnSourceRestart]: e("streams", "Stream source restarted", "Sorgente stream riavviata"),
146
147
  [require_event_category.EventCategory.StreamParamsChanged]: e("streams", "Stream parameters changed", "Parametri dello stream cambiati"),
147
148
  [require_event_category.EventCategory.DeviceStateChanged]: e("devices", "Device state changed", "Stato dispositivo cambiato"),
148
149
  [require_event_category.EventCategory.DeviceCommandSettled]: e("devices", "Device command settled", "Comando al dispositivo concluso"),
package/dist/enums.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { r as isOwnerOnlyEventCategory, t as EventCategory } from "./event-category-7P4A3bYA.mjs";
1
+ import { r as isOwnerOnlyEventCategory, t as EventCategory } from "./event-category-BEsBTS72.mjs";
2
2
  //#region src/enums/event-category-catalog.ts
3
3
  /**
4
4
  * The event-category catalogue: what an operator-facing surface (a picker, the
@@ -142,6 +142,7 @@ var EVENT_CATEGORY_CATALOG = {
142
142
  [EventCategory.StreamBrokerOnCamStreamDemand]: e("streams", "Stream requested", "Stream richiesto"),
143
143
  [EventCategory.StreamBrokerOnCamStreamIdle]: e("streams", "Stream idle", "Stream inattivo"),
144
144
  [EventCategory.StreamBrokerOnRequestStreamSourceRefresh]: e("streams", "Stream source refresh requested", "Aggiornamento sorgente stream richiesto"),
145
+ [EventCategory.StreamBrokerOnSourceRestart]: e("streams", "Stream source restarted", "Sorgente stream riavviata"),
145
146
  [EventCategory.StreamParamsChanged]: e("streams", "Stream parameters changed", "Parametri dello stream cambiati"),
146
147
  [EventCategory.DeviceStateChanged]: e("devices", "Device state changed", "Stato dispositivo cambiato"),
147
148
  [EventCategory.DeviceCommandSettled]: e("devices", "Device command settled", "Comando al dispositivo concluso"),
@@ -445,6 +445,14 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
445
445
  */
446
446
  EventCategory["StreamBrokerOnRequestStreamSourceRefresh"] = "stream-broker.onRequestStreamSourceRefresh";
447
447
  /**
448
+ * A broker RE-DIALED its source (every dial after the first). A consumer that
449
+ * reads the broker over a transport that does not announce the cut — the
450
+ * recorder's ffmpeg writer — learns here instead of through its idle clock.
451
+ * Telemetry: a dropped event only means the idle clock recovers it later.
452
+ * Payload: `{ deviceId, camStreamId, brokerId, reason }`.
453
+ */
454
+ EventCategory["StreamBrokerOnSourceRestart"] = "stream-broker.onSourceRestart";
455
+ /**
448
456
  * A camera provider changed a device's stream parameters (codec /
449
457
  * resolution / bitrate / a stream added or removed). A LOW-LATENCY NUDGE
450
458
  * for the stream-broker's catalog reconcile: it carries NO authoritative
@@ -445,6 +445,14 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
445
445
  */
446
446
  EventCategory["StreamBrokerOnRequestStreamSourceRefresh"] = "stream-broker.onRequestStreamSourceRefresh";
447
447
  /**
448
+ * A broker RE-DIALED its source (every dial after the first). A consumer that
449
+ * reads the broker over a transport that does not announce the cut — the
450
+ * recorder's ffmpeg writer — learns here instead of through its idle clock.
451
+ * Telemetry: a dropped event only means the idle clock recovers it later.
452
+ * Payload: `{ deviceId, camStreamId, brokerId, reason }`.
453
+ */
454
+ EventCategory["StreamBrokerOnSourceRestart"] = "stream-broker.onSourceRestart";
455
+ /**
448
456
  * A camera provider changed a device's stream parameters (codec /
449
457
  * resolution / bitrate / a stream added or removed). A LOW-LATENCY NUDGE
450
458
  * for the stream-broker's catalog reconcile: it carries NO authoritative
@@ -60,6 +60,7 @@ import type { dishwasherCapability } from '../capabilities/dishwasher.cap.js';
60
60
  import type { displayPaletteCapability } from '../capabilities/display-palette.cap.js';
61
61
  import type { doNotDisturbCapability } from '../capabilities/do-not-disturb.cap.js';
62
62
  import type { embeddingEncoderCapability } from '../capabilities/embedding-encoder.cap.js';
63
+ import type { errorCapability } from '../capabilities/error.cap.js';
63
64
  import type { faceGalleryCapability } from '../capabilities/face-gallery.cap.js';
64
65
  import type { failureContributionCapability } from '../capabilities/failure-contribution.cap.js';
65
66
  import type { fanControlCapability } from '../capabilities/fan-control.cap.js';
@@ -4023,6 +4024,13 @@ export type AppRouter = TrpcCoreRouter<{
4023
4024
  output: z.infer<typeof DEVICE_STATUS_METHOD.getStatus.output>;
4024
4025
  meta: object;
4025
4026
  }>;
4027
+ listFaultTypes: TRPCQueryProcedure<{
4028
+ input: {
4029
+ [x: string]: unknown;
4030
+ } & z.input<typeof errorCapability.methods.listFaultTypes.input>;
4031
+ output: z.infer<typeof errorCapability.methods.listFaultTypes.output>;
4032
+ meta: object;
4033
+ }>;
4026
4034
  }>>;
4027
4035
  eventEmitter: TRPCBuiltRouter<{
4028
4036
  ctx: TrpcContext;
@@ -6,7 +6,7 @@
6
6
  * scope+access check inside `protectedProcedure` (see
7
7
  * `server/backend/src/api/trpc/trpc.middleware.ts`).
8
8
  *
9
- * Coverage: 1536 method paths across 214 capabilities.
9
+ * Coverage: 1537 method paths across 214 capabilities.
10
10
  */
11
11
  import type { MethodRole } from '../auth/viewer-access.js';
12
12
  import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
@@ -6,7 +6,7 @@
6
6
  * system-scope cap that takes a deviceId was previously never device-filtered
7
7
  * — see the generator header).
8
8
  *
9
- * Coverage: 648 methods carry a device reference, of which
9
+ * Coverage: 649 methods carry a device reference, of which
10
10
  * 202 are on SYSTEM-scope caps.
11
11
  *
12
12
  * Top-level fields, number arrays, and one-level arrays of objects carrying
package/dist/index.d.ts CHANGED
@@ -201,8 +201,8 @@ export { APP_FLOW_DEFAULT_REDIRECT, APP_FLOW_REFUSAL_MESSAGES, APP_FLOW_STATE_PR
201
201
  export { SSO_STATE_COOKIE, SSO_STATE_COOKIE_MAX_AGE_SEC } from './auth/sso-state.js';
202
202
  export { buildDeviceEnrollmentLink, buildDeviceSignatureMessage, type CompleteEnrollmentInput, CompleteEnrollmentInputSchema, type CompleteEnrollmentOutput, CompleteEnrollmentOutputSchema, DEVICE_CERT_RENEW_WINDOW_DAYS, DEVICE_CERT_SIGNATURE, DEVICE_CERT_VALIDITY_DAYS, DEVICE_ENROLLMENT_TTL_MS, DEVICE_NONCE_TTL_MS, DEVICE_SAN_CREDENTIAL_PREFIX, DEVICE_SAN_USER_PREFIX, DEVICE_SIGNATURE_MESSAGE_VERSION, type DeviceCertificateLoginMethod, DeviceCertificateLoginMethodSchema, type DeviceChallenge, DeviceChallengeSchema, type DeviceCredential, DeviceCredentialSchema, type DeviceCredentialStatus, DeviceCredentialStatusSchema, type DevicePlatform, DevicePlatformSchema, type DeviceProofInput, DeviceProofInputSchema, type CompleteEnrollmentResult, CompleteEnrollmentResultSchema, DEFINITIVE_DEVICE_REFUSALS, DEVICE_DEFINITIVE_REFUSALS_BEFORE_DELETE, DEVICE_REFRESH_REFUSAL_PREFIX, deviceRefusalFromMessage, type DeviceChallengeResult, DeviceChallengeResultSchema, DeviceEnrollProofSchema, type DeviceRefusal, type DeviceRefusalReason, DeviceRefusalReasonSchema, DeviceRefusalSchema, type DeviceRevoker, type EnrollSelfInput, EnrollSelfInputSchema, formatDeviceRevoker, isDefinitiveDeviceRefusal, type RenewDeviceCertificateResult, RenewDeviceCertificateResultSchema, type RevokeOwnDeviceCertificateResult, RevokeOwnDeviceCertificateResultSchema, type DeviceSignaturePurpose, DeviceSignaturePurposeSchema, type RenewDeviceCertificateOutput, RenewDeviceCertificateOutputSchema, type StartEnrollmentOutput, StartEnrollmentOutputSchema, parseDeviceEnrollmentLink, } from './auth/device-certificate.js';
203
203
  export { advertisedHubOrigins, claimedRequestOrigins, normalizeOrigin, pickRequestOrigin, type RequestHeaders, requestMountPrefix, } from './auth/request-origin.js';
204
- export type { ActionStep, AutomationAction, AutomationAll, AutomationAny, AutomationCommandStep, AutomationConditionOperator, AutomationConditionTraceNode, AutomationEventLeaf, AutomationLeaf, AutomationNot, AutomationStateLeaf, AutomationWhen, DetectionLabelSource, DetectionLeaf, DetectionSubject, DeviceBecomesLeaf, BecomesDeps, BecomesEffect, BecomesOperator, BecomesSpec, DeviceIsLeaf, ExpressionLeaf, TimeIsLeaf, TriggeredByLeaf, DeviceFiredLeaf, DeviceFiredMatch, IdentifiedEventLeaf, WhenSiteIssue, HoldMode, HoldReading, HoldSpec, HoldTrace, IdentityLabel, LegacyAutomationRecipe, AutomationBodyStep, AutomationBranchStep, AutomationRecipeInput, AutomationChooseStep, AutomationWaitUntilStep, AutomationParallelStep, AutomationRepeatLoop, AutomationRepeatStep, AutomationSetStep, StepConditionRef, AutomationStopStep, StepDeviceTrace, LegacyCondition, LegacyTrigger, PlateLabel, StationaryLeaf, StationaryPresentLeaf, SubClassLabel, SubjectObservation, SubjectVerdict, AutomationRecipe, AutomationRunMode, AutomationRunOutcome, AutomationRunTrace, AutomationRunVerdict, AutomationStateDoc, AutomationStepTrace, NestedStepTrace, AutomationTriggerTrace, ConditionEvaluation, ConditionReader, DetectionDecision, DetectionTrigger, DetectionVars, GenerateAutomationBlockInput, MirrorRefreshFetchers, RunTrigger, MirrorRefreshReport, MirrorSource, StationaryChangedInput, StationaryDecision, StationaryTrigger, StationaryVars, DeviceFiredDecision, DeviceFiredVars, FiredDataScalar, FiredDataVars, TraceNodeOutcome, TraceValue, TrackLifecycleInput, TriggerVariable, } from './automation/index.js';
205
- export { ActionStepSchema, AutomationActionSchema, AutomationCommandStepBaseSchema, AutomationCommandStepSchema, AutomationWaitStepSchema, AutomationChooseStepSchema, AutomationWaitUntilStepSchema, AutomationParallelStepSchema, AutomationRepeatLoopSchema, AutomationRepeatStepSchema, AutomationSetStepSchema, CHOOSE_BRANCHES_MAX, WAIT_UNTIL_TIMEOUT_MAX_S, PARALLEL_STEPS_MAX, REPEAT_COUNT_MAX, REPEAT_DEVICES_MAX, REPEAT_ITEM_VAR, REPEAT_ITERATIONS_MAX, REPEAT_STEPS_MAX, STEP_NEST_MAX, PARALLEL_STEPS_MIN, nestedStepsOf, stepConditionsOf, AutomationStopStepSchema, RESERVED_RUN_VARS, SET_VAR_NAME_RE, SET_VAR_VALUE_MAX, SET_VARS_MAX, STOP_REASON_MAX, stepGuardOf, WAIT_MAX_SECONDS, EMPTY_AUTOMATION_STATE, mergeSkipTraces, AutomationConditionOperatorSchema, AutomationConditionTraceNodeSchema, AutomationRecipeSchema, AutomationWhenSchema, CurrentAutomationRecipeSchema, DETECTION_LABEL_SOURCES, DetectionSubjectSchema, LegacyAutomationRecipeSchema, LegacyConditionSchema, LegacyTriggerSchema, MAX_TRACE_ARG_LENGTH, MAX_STEP_DEVICE_OUTCOMES, MAX_TRACE_ARGS, MAX_WHEN_DEPTH, StepDeviceTraceSchema, MAX_WHEN_LEAVES, REDACTED_ARG, StationarySubjectSchema, anySubjectMatches, buildStepArgsTrace, collectWhenMirrorSources, convertLegacyCondition, convertLegacyRecipe, convertLegacyWhen, countWhenLeaves, describeSubject, evaluateWhenTree, eventLeafIdAt, identifiedEventLeaves, hasTriggeredByLeaves, triggeredByIssue, EVENT_LEAF_ID_RE, TRIGGERED_BY_MAX_IDS, recipeSiteIssues, stepGuardSiteIssues, whenSiteIssues, forEachLeaf, BecomesOperatorSchema, BecomesWatch, HoldCore, HoldSpecSchema, HoldTraceSchema, HoldTracker, describeHold, describeHoldMs, hasEventLeaves, hasHoldLeaves, hasTimeLeaves, nextTimeBoundaryInMs, holdOf, observeHoldLeaves, isEventLeaf, isLeaf, subClassesOf, subjectFromClassName, subjectMatches, validateWhenTree, whenDepth, AutomationRunModeSchema, AutomationRunOutcomeSchema, AutomationRunTraceSchema, AutomationRunVerdictSchema, AutomationStateDocSchema, AutomationStepTraceSchema, AutomationTriggerTraceSchema, appendTrace, foldHoldEpisodes, buildTriggerTrace, collectMirrorSources, ConditionMirror, stableIdKey, stableIdMapOf, DEFAULT_TRACE_KEEP, DetectionTriggerFilter, detectionClassMatches, evaluateConditionTree, evaluateStationaryTrigger, DeviceFiredWatch, FIRED_RECOVERED_NOTE, firedDataVars, DeviceFiredMatchSchema, generateAutomationBlock, isSkippedTrace, MAX_CONDITION_DEPTH, MAX_CONDITION_LEAVES, MAX_TRACE_KEEP, RunGate, skipSignature, TraceNodeOutcomeSchema, TraceValueSchema, triggerLeafVariables, triggerVariablesOf, validateRecipeBounds, } from './automation/index.js';
204
+ export type { ActionStep, AutomationAction, AutomationAll, AutomationAny, AutomationCommandStep, AutomationConditionOperator, AutomationConditionTraceNode, AutomationEventLeaf, AutomationLeaf, AutomationNot, AutomationStateLeaf, AutomationWhen, DetectionLabelSource, DetectionLeaf, DetectionSubject, DeviceBecomesLeaf, BecomesDeps, BecomesEffect, BecomesOperator, BecomesSpec, DeviceIsLeaf, ExpressionLeaf, TimeIsLeaf, TriggeredByLeaf, DeviceFiredLeaf, DeviceFiredMatch, IdentifiedEventLeaf, WhenSiteIssue, HoldMode, HoldReading, HoldSpec, HoldTrace, IdentityLabel, LegacyAutomationRecipe, AutomationBodyStep, AutomationBranchStep, AutomationRecipeInput, AutomationChooseStep, AutomationWaitUntilStep, AutomationNotifyStep, AutomationParallelStep, AutomationRepeatLoop, AutomationRepeatStep, AutomationSetStep, StepConditionRef, AutomationStopStep, StepDeviceTrace, LegacyCondition, LegacyTrigger, PlateLabel, StationaryLeaf, StationaryPresentLeaf, SubClassLabel, SubjectObservation, SubjectVerdict, AutomationRecipe, AutomationRunMode, AutomationRunOutcome, AutomationRunTrace, AutomationRunVerdict, AutomationStateDoc, AutomationStepTrace, NestedStepTrace, AutomationTriggerTrace, ConditionEvaluation, ConditionReader, DetectionDecision, DetectionTrigger, DetectionVars, GenerateAutomationBlockInput, MirrorRefreshFetchers, RunTrigger, MirrorRefreshReport, MirrorSource, StationaryChangedInput, StationaryDecision, StationaryTrigger, StationaryVars, DeviceFiredDecision, DeviceFiredVars, FiredDataScalar, FiredDataVars, TraceNodeOutcome, TraceValue, TrackLifecycleInput, TriggerVariable, } from './automation/index.js';
205
+ export { ActionStepSchema, AutomationActionSchema, AutomationCommandStepBaseSchema, AutomationCommandStepSchema, AutomationWaitStepSchema, AutomationChooseStepSchema, AutomationWaitUntilStepSchema, AutomationNotifyStepSchema, AutomationParallelStepSchema, AutomationRepeatLoopSchema, AutomationRepeatStepSchema, AutomationSetStepSchema, CHOOSE_BRANCHES_MAX, WAIT_UNTIL_TIMEOUT_MAX_S, PARALLEL_STEPS_MAX, REPEAT_COUNT_MAX, REPEAT_DEVICES_MAX, REPEAT_ITEM_VAR, REPEAT_ITERATIONS_MAX, REPEAT_STEPS_MAX, STEP_NEST_MAX, PARALLEL_STEPS_MIN, nestedStepsOf, stepConditionsOf, AutomationStopStepSchema, RESERVED_RUN_VARS, SET_VAR_NAME_RE, SET_VAR_VALUE_MAX, SET_VARS_MAX, STOP_REASON_MAX, stepGuardOf, WAIT_MAX_SECONDS, EMPTY_AUTOMATION_STATE, mergeSkipTraces, AutomationConditionOperatorSchema, AutomationConditionTraceNodeSchema, AutomationRecipeSchema, AutomationWhenSchema, CurrentAutomationRecipeSchema, DETECTION_LABEL_SOURCES, DetectionSubjectSchema, LegacyAutomationRecipeSchema, LegacyConditionSchema, LegacyTriggerSchema, MAX_TRACE_ARG_LENGTH, MAX_STEP_DEVICE_OUTCOMES, MAX_TRACE_ARGS, MAX_WHEN_DEPTH, StepDeviceTraceSchema, MAX_WHEN_LEAVES, REDACTED_ARG, StationarySubjectSchema, anySubjectMatches, buildStepArgsTrace, collectWhenMirrorSources, convertLegacyCondition, convertLegacyRecipe, convertLegacyWhen, countWhenLeaves, describeSubject, evaluateWhenTree, eventLeafIdAt, identifiedEventLeaves, hasTriggeredByLeaves, triggeredByIssue, EVENT_LEAF_ID_RE, TRIGGERED_BY_MAX_IDS, recipeSiteIssues, stepGuardSiteIssues, whenSiteIssues, forEachLeaf, BecomesOperatorSchema, BecomesWatch, HoldCore, HoldSpecSchema, HoldTraceSchema, HoldTracker, describeHold, describeHoldMs, hasEventLeaves, hasHoldLeaves, hasTimeLeaves, nextTimeBoundaryInMs, holdOf, observeHoldLeaves, isEventLeaf, isLeaf, subClassesOf, subjectFromClassName, subjectMatches, validateWhenTree, whenDepth, AutomationRunModeSchema, AutomationRunOutcomeSchema, AutomationRunTraceSchema, AutomationRunVerdictSchema, AutomationStateDocSchema, AutomationStepTraceSchema, AutomationTriggerTraceSchema, appendTrace, foldHoldEpisodes, buildTriggerTrace, collectMirrorSources, ConditionMirror, stableIdKey, stableIdMapOf, DEFAULT_TRACE_KEEP, DetectionTriggerFilter, detectionClassMatches, evaluateConditionTree, evaluateStationaryTrigger, DeviceFiredWatch, FIRED_RECOVERED_NOTE, firedDataVars, DeviceFiredMatchSchema, generateAutomationBlock, isSkippedTrace, MAX_CONDITION_DEPTH, MAX_CONDITION_LEAVES, MAX_TRACE_KEEP, RunGate, skipSignature, TraceNodeOutcomeSchema, TraceValueSchema, triggerLeafVariables, triggerVariablesOf, validateRecipeBounds, } from './automation/index.js';
206
206
  export { UnitWarningSchema, assertStepsOffered, type BoundCapsReader, capUnitResolver, normalizeActionUnits, normalizeConditionUnits, normalizeRecipeUnits, prepareRecipeUnits, } from './automation/index.js';
207
207
  export type { PreparedRecipe, UnitResolver, UnitWarning, UnitsNormalized, } from './automation/index.js';
208
208
  export * from './automation/action.js';
@@ -407,7 +407,7 @@ export { alarmPatchLanded, applyBlockingEdit, applyModeDelaysEdits, applyModeDev
407
407
  export { activateAlarmProfile, alarmProfileById, cloneAlarmSettings, createAlarmProfile, deleteAlarmProfile, ensureAlarmProfiles, isDefaultAlarmProfileId, NC_ALARM_DEFAULT_PROFILE_ID, NC_ALARM_DEFAULT_PROFILE_NAME, NC_ALARM_SYSTEM_DEFAULT_DELAYS, ncAlarmSystemDefaultSettings, type NcAlarmProfileCreateSource, type NcAlarmProfileRecord, type NcAlarmProfilesMutationResult, type NcAlarmProfilesRefuseReason, type NcAlarmProfilesState, renameAlarmProfile, syncActiveAlarmProfileSettings, } from './notification/alarm-profiles.js';
408
408
  export { NC_SENSOR_RAISED_FIELD_BY_KIND, NC_SENSOR_TRANSITION_KINDS, NC_SENSOR_TRANSITION_UNSUPPORTED_REASON, sensorRaisedOf, sensorTransitionOffered, } from './notification/sensor-raised.js';
409
409
  export { NC_SENSOR_TRANSITION_MEANINGS, sensorTransitionMeaning, type NcSensorTransitionLocale, type NcSensorTransitionMeaning, type NcSensorTransitionPhrase, } from './notification/sensor-transition-meanings.js';
410
- export { alertEpisodeId, alertEpisodeKind, alertEpisodePayload, alertNodeId, deviceAttentionKind, isAlertEpisodeOpen, isAlertEpisodeSeverity, parseAlertEpisodePayload, AlertEpisodePayloadSchema, type AlertEpisodePayload, type AlertEpisodePhase, } from './notification/alert-episode.js';
410
+ export { alertEpisodeId, alertEpisodeKind, alertEpisodePayload, alertNodeId, deviceAttentionKind, isAlertEpisodeOpen, isAlertEpisodeSeverity, parseAlertEpisodePayload, AlertEpisodePayloadSchema, type AlertEpisodeAction, type AlertEpisodePayload, type AlertEpisodePhase, } from './notification/alert-episode.js';
411
411
  export { NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS, NC_TEMPLATE_VARS, isHeldBackTemplateVar, isKnownTemplateVar, servedTemplateVars, templateVarDeliveryApplies, templateVarKindApplies, templateVarSystemEventApplies, templateVarsFor, } from './notification/template-vars.js';
412
412
  export { NC_SYSTEM_EVENT_FILTER_KEYS, type NcSystemEventFilterKey, systemEventFilterApplies, systemEventFilterAppliesToAnyKind, } from './notification/system-event-filters.js';
413
413
  export { describeSystemEventFamilyProblem, isSystemEventFamily, NC_SYSTEM_EVENT_CONDITION_FILTER_KEYS, NC_SYSTEM_EVENT_FAMILIES, NC_SYSTEM_EVENT_FAMILY, NC_SYSTEM_EVENT_FAMILY_FILTERS, NC_SYSTEM_EVENT_KIND_GROUP_SPECS, type NcSystemEventConditionFilterKey, type NcSystemEventFamily, type NcSystemEventFamilyProblem, type NcSystemEventFamilyVerdict, type NcSystemEventKindGroupSpec, systemEventFamilyOf, systemEventFamilyProblems, systemEventKindNamesOf, systemEventKindsOfFamily, } from './notification/system-event-families.js';