@camstack/types 1.2.611 → 1.2.612

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 +7 -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 +14 -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 +55 -3
  21. package/dist/client.mjs +55 -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 +2 -2
  32. package/dist/index.js +207 -12
  33. package/dist/index.mjs +203 -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 +8 -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
@@ -1420,6 +1420,17 @@ export interface EventCatalog {
1420
1420
  readonly deviceId: number;
1421
1421
  readonly camStreamId: string;
1422
1422
  };
1423
+ /**
1424
+ * The broker re-dialed a source (a declared `maxSessionMs` limit, a
1425
+ * stall): every reader that cannot see the cut itself (the recorder's
1426
+ * writer) recovers now — see `EventCategory.StreamBrokerOnSourceRestart`.
1427
+ */
1428
+ 'stream-broker.onSourceRestart': {
1429
+ readonly deviceId: number;
1430
+ readonly camStreamId: string;
1431
+ readonly brokerId: string;
1432
+ readonly reason: string;
1433
+ };
1423
1434
  /**
1424
1435
  * Low-latency nudge: a provider changed a device's stream parameters.
1425
1436
  * Carries NO authoritative data — the stream-broker re-pulls that device's
@@ -49,6 +49,13 @@ export interface StreamSource {
49
49
  * stall is an error).
50
50
  */
51
51
  readonly allowStall?: boolean;
52
+ /**
53
+ * The longest continuous session the source keeps open, in ms. When set, the
54
+ * broker performs a PLANNED re-dial of a live source just before it elapses
55
+ * and announces it to consumers (`onSourceRestart`). Absent = never re-dialed
56
+ * on a timer.
57
+ */
58
+ readonly maxSessionMs?: number;
52
59
  /**
53
60
  * When set, the broker ingests this source THROUGH ffmpeg (`-c copy`) instead
54
61
  * of a native TS client — the "ffmpeg parser". Carries the transport + operator
@@ -42,6 +42,14 @@ export declare const AlertEpisodePayloadSchema: z.ZodObject<{
42
42
  sourceId: z.ZodOptional<z.ZodString>;
43
43
  nodeId: z.ZodOptional<z.ZodString>;
44
44
  actionUrl: z.ZodOptional<z.ZodString>;
45
+ faults: z.ZodOptional<z.ZodArray<z.ZodObject<{
46
+ code: z.ZodString;
47
+ label: z.ZodString;
48
+ severity: z.ZodEnum<{
49
+ error: "error";
50
+ warning: "warning";
51
+ }>;
52
+ }, z.core.$strip>>>;
45
53
  at: z.ZodNumber;
46
54
  }, z.core.$strip>;
47
55
  export type AlertEpisodePayload = z.infer<typeof AlertEpisodePayloadSchema>;
@@ -41,7 +41,7 @@ import { type NcSystemEventKind } from '../capabilities/notification-rules.cap.j
41
41
  * two sides has to be able to say which field it is talking about without a
42
42
  * translation table in the middle.
43
43
  */
44
- export type NcSystemEventFilterKey = 'deviceIds' | 'deviceTypes' | 'nodeIds' | 'packageNames' | 'consumableLowPercent' | 'commandActions' | 'commandOutcomes' | 'commandActorKinds';
44
+ export type NcSystemEventFilterKey = 'deviceIds' | 'deviceTypes' | 'nodeIds' | 'packageNames' | 'consumableLowPercent' | 'commandActions' | 'commandOutcomes' | 'commandActorKinds' | 'faultCodes';
45
45
  /**
46
46
  * Every filter, for the callers that must cover all of them (guards, tests).
47
47
  *
@@ -1,4 +1,4 @@
1
- import { t as EventCategory } from "./event-category-7P4A3bYA.mjs";
1
+ import { t as EventCategory } from "./event-category-BEsBTS72.mjs";
2
2
  import { a as DeviceType, i as DeviceRole, s as errMsg } from "./composed-stable-id-DIeNz933.mjs";
3
3
  import { z } from "zod";
4
4
  //#region src/audio/audio-chunk-format.ts
@@ -7535,6 +7535,15 @@ var CameraStreamSchema = z.object({
7535
7535
  */
7536
7536
  autoEligible: z.boolean().optional(),
7537
7537
  /**
7538
+ * The longest continuous session the SOURCE will keep open, in ms, declared by
7539
+ * the provider that knows it (a hub that cuts every child's session on a
7540
+ * timer). Absent = no limit. The broker re-dials a live source a little
7541
+ * BEFORE this elapses, on its own terms and announced to consumers, so the
7542
+ * source's cut never lands mid-recording. Declare slightly under what was
7543
+ * observed.
7544
+ */
7545
+ maxSessionMs: z.number().int().positive().optional(),
7546
+ /**
7538
7547
  * The profile slot the PUBLISHER says this stream is: `low` for a stream
7539
7548
  * whose only sensible role is the low-bandwidth one, `high` for a main
7540
7549
  * stream. Consulted by the broker's automatic ranking
@@ -22987,7 +22996,10 @@ function createDeviceProxy(api, binding, opts) {
22987
22996
  const doorbellInterface = { getStatus: (input, options) => dispatch("doorbell", "doorbell", "getStatus", "query", input, void 0, options) };
22988
22997
  const energySystemInterface = { getStatus: (input, options) => dispatch("energy-system", "energySystem", "getStatus", "query", input, void 0, options) };
22989
22998
  const enumSensorInterface = { getStatus: (input, options) => dispatch("enum-sensor", "enumSensor", "getStatus", "query", input, void 0, options) };
22990
- const errorInterface = { getStatus: (input, options) => dispatch("error", "error", "getStatus", "query", input, void 0, options) };
22999
+ const errorInterface = {
23000
+ listFaultTypes: (input, options) => dispatch("error", "error", "listFaultTypes", "query", input, void 0, options),
23001
+ getStatus: (input, options) => dispatch("error", "error", "getStatus", "query", input, void 0, options)
23002
+ };
22991
23003
  const eventEmitterInterface = { getStatus: (input, options) => dispatch("event-emitter", "eventEmitter", "getStatus", "query", input, void 0, options) };
22992
23004
  const fanControlInterface = {
22993
23005
  setPercentage: (input, options) => dispatch("fan-control", "fanControl", "setPercentage", "mutation", input, void 0, options),
@@ -1,4 +1,4 @@
1
- const require_event_category = require("./event-category-CMA0-jGW.js");
1
+ const require_event_category = require("./event-category-CbY1jgIP.js");
2
2
  const require_composed_stable_id = require("./composed-stable-id-DkF5-kuf.js");
3
3
  let zod = require("zod");
4
4
  //#region src/audio/audio-chunk-format.ts
@@ -7535,6 +7535,15 @@ var CameraStreamSchema = zod.z.object({
7535
7535
  */
7536
7536
  autoEligible: zod.z.boolean().optional(),
7537
7537
  /**
7538
+ * The longest continuous session the SOURCE will keep open, in ms, declared by
7539
+ * the provider that knows it (a hub that cuts every child's session on a
7540
+ * timer). Absent = no limit. The broker re-dials a live source a little
7541
+ * BEFORE this elapses, on its own terms and announced to consumers, so the
7542
+ * source's cut never lands mid-recording. Declare slightly under what was
7543
+ * observed.
7544
+ */
7545
+ maxSessionMs: zod.z.number().int().positive().optional(),
7546
+ /**
7538
7547
  * The profile slot the PUBLISHER says this stream is: `low` for a stream
7539
7548
  * whose only sensible role is the low-bandwidth one, `high` for a main
7540
7549
  * stream. Consulted by the broker's automatic ranking
@@ -22987,7 +22996,10 @@ function createDeviceProxy(api, binding, opts) {
22987
22996
  const doorbellInterface = { getStatus: (input, options) => dispatch("doorbell", "doorbell", "getStatus", "query", input, void 0, options) };
22988
22997
  const energySystemInterface = { getStatus: (input, options) => dispatch("energy-system", "energySystem", "getStatus", "query", input, void 0, options) };
22989
22998
  const enumSensorInterface = { getStatus: (input, options) => dispatch("enum-sensor", "enumSensor", "getStatus", "query", input, void 0, options) };
22990
- const errorInterface = { getStatus: (input, options) => dispatch("error", "error", "getStatus", "query", input, void 0, options) };
22999
+ const errorInterface = {
23000
+ listFaultTypes: (input, options) => dispatch("error", "error", "listFaultTypes", "query", input, void 0, options),
23001
+ getStatus: (input, options) => dispatch("error", "error", "getStatus", "query", input, void 0, options)
23002
+ };
22991
23003
  const eventEmitterInterface = { getStatus: (input, options) => dispatch("event-emitter", "eventEmitter", "getStatus", "query", input, void 0, options) };
22992
23004
  const fanControlInterface = {
22993
23005
  setPercentage: (input, options) => dispatch("fan-control", "fanControl", "setPercentage", "mutation", input, void 0, options),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.611",
3
+ "version": "1.2.612",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",