@camstack/addon-provider-onvif 1.1.26 → 1.1.28

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.
package/dist/addon.js CHANGED
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  //#region \0rolldown/runtime.js
3
3
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
4
4
  //#endregion
5
- //#region ../types/dist/event-category-H4AVePnn.mjs
5
+ //#region ../types/dist/event-category-D4HJq7Mw.mjs
6
6
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
7
7
  EventCategory["SystemBoot"] = "system.boot";
8
8
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -155,6 +155,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
155
155
  /** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
156
156
  * thumb is a scrub gap the recorder's keyframe backfill covers. */
157
157
  EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
158
+ /** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
159
+ * progress bar the client reconciles via `recordingExport.getExport`. */
160
+ EventCategory["RecordingExportProgress"] = "recording.export.progress";
161
+ EventCategory["RecordingExportCompleted"] = "recording.export.completed";
162
+ EventCategory["RecordingExportFailed"] = "recording.export.failed";
158
163
  EventCategory["DetectionEvent"] = "detection.event";
159
164
  EventCategory["SessionTrackNew"] = "session.track.new";
160
165
  EventCategory["SessionTrackExpired"] = "session.track.expired";
@@ -444,6 +449,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
444
449
  */
445
450
  EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
446
451
  /**
452
+ * Fired by `addon-post-analysis` when a package-drop is confirmed inside
453
+ * a package zone — a newly-appeared stationary object of a package class
454
+ * that cleared the class / zone / dwell / size gates. Payload:
455
+ * `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
456
+ * entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
457
+ * Telemetry (D8): the durable record is the `package-events` store row;
458
+ * this bus topic drives notifier rules + live UI. See
459
+ * docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
460
+ */
461
+ EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
462
+ /**
463
+ * Fired by `addon-post-analysis` when a previously-delivered package
464
+ * leaves its zone (the stationary entry departed — moved or swept).
465
+ * Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
466
+ * `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
467
+ * Telemetry (D8). See package-zones-design §5.2.
468
+ */
469
+ EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
470
+ /**
447
471
  * Fired by `addon-post-analysis` whenever a gallery face row changes:
448
472
  * `kind:'buffered'` a new detected face was persisted, `'assigned'` /
449
473
  * `'unassigned'` its identity link changed, `'deleted'` the row was
@@ -5182,6 +5206,25 @@ function _instanceof(cls, params = {}) {
5182
5206
  };
5183
5207
  return inst;
5184
5208
  }
5209
+ //#endregion
5210
+ //#region ../../node_modules/zod/v4/classic/compat.js
5211
+ /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
5212
+ var ZodIssueCode = {
5213
+ invalid_type: "invalid_type",
5214
+ too_big: "too_big",
5215
+ too_small: "too_small",
5216
+ invalid_format: "invalid_format",
5217
+ not_multiple_of: "not_multiple_of",
5218
+ unrecognized_keys: "unrecognized_keys",
5219
+ invalid_union: "invalid_union",
5220
+ invalid_key: "invalid_key",
5221
+ invalid_element: "invalid_element",
5222
+ invalid_value: "invalid_value",
5223
+ custom: "custom"
5224
+ };
5225
+ /** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
5226
+ var ZodFirstPartyTypeKind;
5227
+ ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5185
5228
  Object.fromEntries([
5186
5229
  {
5187
5230
  id: "overview",
@@ -7236,6 +7279,24 @@ var RecordingRetentionSchema = object({
7236
7279
  maxSizeGb: number().min(0).optional()
7237
7280
  });
7238
7281
  /**
7282
+ * Scrub-thumbnail fidelity preset — the single per-camera selector bundling the
7283
+ * sprite tile RESOLUTION + JPEG QUALITY the recorder packs timeline-scrub
7284
+ * previews at. Five graduated steps; absent on a config = `standard` (the
7285
+ * shipped default, matching `sheet-geometry`/`sheet-composer`).
7286
+ *
7287
+ * Existing sheets are IMMUTABLE — a changed preset applies to NEW windows only.
7288
+ * Each window's index sidecar carries its own tile dims, so a camera whose
7289
+ * preset changed over time renders every historical window at the dims it was
7290
+ * written with.
7291
+ */
7292
+ var ScrubThumbnailPresetSchema = _enum([
7293
+ "minimal",
7294
+ "low",
7295
+ "standard",
7296
+ "high",
7297
+ "max"
7298
+ ]);
7299
+ /**
7239
7300
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7240
7301
  *
7241
7302
  * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
@@ -7272,7 +7333,14 @@ var RecordingConfigSchema = object({
7272
7333
  * derived into bands once via `migrateConfigToBands`.
7273
7334
  */
7274
7335
  bands: array(RecordingBandSchema).optional(),
7275
- retention: RecordingRetentionSchema.optional()
7336
+ retention: RecordingRetentionSchema.optional(),
7337
+ /**
7338
+ * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
7339
+ * timeline-scrub sprite previews). Absent = `standard`. Applies to NEW
7340
+ * windows only — existing sheets are immutable, and each window's index
7341
+ * carries its own tile dims so mixed-preset history renders correctly.
7342
+ */
7343
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7276
7344
  });
7277
7345
  /**
7278
7346
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -12694,7 +12762,11 @@ array(ZoneRuleSchema).readonly();
12694
12762
  * Extend the enum here when a new gating consumer comes online (audio
12695
12763
  * gating, alert filtering, …) — no other surface needs to change.
12696
12764
  */
12697
- var ZoneRuleStageEnum = _enum(["motion", "detection"]);
12765
+ var ZoneRuleStageEnum = _enum([
12766
+ "motion",
12767
+ "detection",
12768
+ "package"
12769
+ ]);
12698
12770
  DeviceType.Camera, method(object({
12699
12771
  deviceId: number(),
12700
12772
  stage: ZoneRuleStageEnum
@@ -12707,7 +12779,8 @@ DeviceType.Camera, method(object({
12707
12779
  auth: "admin"
12708
12780
  }), object({
12709
12781
  motion: array(ZoneRuleSchema).readonly(),
12710
- detection: array(ZoneRuleSchema).readonly()
12782
+ detection: array(ZoneRuleSchema).readonly(),
12783
+ package: array(ZoneRuleSchema).readonly()
12711
12784
  });
12712
12785
  var ProviderStatusSchema = object({
12713
12786
  connected: boolean(),
@@ -16184,6 +16257,7 @@ var EventKindIconSchema = _enum([
16184
16257
  "smoke",
16185
16258
  "water",
16186
16259
  "button",
16260
+ "package",
16187
16261
  "generic"
16188
16262
  ]);
16189
16263
  var EventKindCategorySchema = _enum([
@@ -16191,7 +16265,8 @@ var EventKindCategorySchema = _enum([
16191
16265
  "audio",
16192
16266
  "detection",
16193
16267
  "sensor",
16194
- "custom"
16268
+ "custom",
16269
+ "package"
16195
16270
  ]);
16196
16271
  var EventKindDescriptorSchema = object({
16197
16272
  /** Stable kind id (e.g. 'motion', 'person', 'contact'). */
@@ -19930,6 +20005,108 @@ method(object({
19930
20005
  auth: "admin"
19931
20006
  });
19932
20007
  /**
20008
+ * `recordingExport` cap — render a footage time range into a single downloadable
20009
+ * MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
20010
+ * bounded lifetime with a durable history, auto-expiry, and optional
20011
+ * delete-after-download.
20012
+ *
20013
+ * Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
20014
+ * recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
20015
+ * default `hub`) registers it. Device-scoped methods carry `deviceId` in their
20016
+ * input and dispatch to that single provider; the render runs on the node that
20017
+ * owns the footage (no cross-node segment transfer). Download rides the
20018
+ * framework addon data-plane. State persists in a DurableState blob (NOT
20019
+ * SQLite); history rows survive file deletion for audit.
20020
+ */
20021
+ /** Playback-speed multiplier for the render (1 = realtime). */
20022
+ var ExportSpeedSchema = number().min(.25).max(32);
20023
+ /** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
20024
+ var ExportTimelapseSchema = object({
20025
+ everyMs: number().int().positive(),
20026
+ outputFps: number().int().min(1).max(60).optional()
20027
+ });
20028
+ /**
20029
+ * Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
20030
+ * is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
20031
+ * silent. `maxLifeMs` bounds how long the finished file is kept;
20032
+ * `deleteAfterDownload` removes it shortly after the first complete download.
20033
+ */
20034
+ var ExportOptionsSchema = object({
20035
+ speed: ExportSpeedSchema.optional(),
20036
+ timelapse: ExportTimelapseSchema.optional(),
20037
+ includeAudio: boolean(),
20038
+ maxLifeMs: number().int().positive(),
20039
+ deleteAfterDownload: boolean(),
20040
+ title: string().max(200).optional()
20041
+ }).superRefine((v, ctx) => {
20042
+ if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
20043
+ code: ZodIssueCode.custom,
20044
+ message: "speed and timelapse are mutually exclusive",
20045
+ path: ["timelapse"]
20046
+ });
20047
+ });
20048
+ var ExportStateSchema = _enum([
20049
+ "queued",
20050
+ "rendering",
20051
+ "ready",
20052
+ "failed",
20053
+ "expired",
20054
+ "deleted"
20055
+ ]);
20056
+ /** One export job / history row. */
20057
+ var ExportRecordSchema = object({
20058
+ id: string(),
20059
+ deviceId: number(),
20060
+ profile: string(),
20061
+ fromMs: number(),
20062
+ toMs: number(),
20063
+ options: ExportOptionsSchema,
20064
+ state: ExportStateSchema,
20065
+ /** 0–100 while rendering; null otherwise. */
20066
+ progressPct: number().nullable(),
20067
+ /** File size once ready; null before. */
20068
+ fileBytes: number().nullable(),
20069
+ expiresAt: number(),
20070
+ deleteAfterDownload: boolean(),
20071
+ /** Epoch of the first complete download; null until then. */
20072
+ downloadedAt: number().nullable(),
20073
+ createdAt: number(),
20074
+ /** User id/name that requested the export. */
20075
+ createdBy: string(),
20076
+ /** Failure reason when state is 'failed'; null otherwise. */
20077
+ error: string().nullable()
20078
+ });
20079
+ /** Candidate download URLs (LAN first, then operator extra hosts). */
20080
+ var ExportDownloadSchema = object({
20081
+ url: string(),
20082
+ endpoints: array(string())
20083
+ });
20084
+ method(object({
20085
+ deviceId: number(),
20086
+ profile: string(),
20087
+ fromMs: number(),
20088
+ toMs: number(),
20089
+ options: ExportOptionsSchema
20090
+ }), ExportRecordSchema, {
20091
+ kind: "mutation",
20092
+ auth: "protected"
20093
+ }), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
20094
+ kind: "query",
20095
+ auth: "protected"
20096
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
20097
+ kind: "query",
20098
+ auth: "protected"
20099
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
20100
+ kind: "mutation",
20101
+ auth: "protected"
20102
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
20103
+ kind: "mutation",
20104
+ auth: "protected"
20105
+ }), method(object({ exportId: string() }), ExportDownloadSchema, {
20106
+ kind: "query",
20107
+ auth: "protected"
20108
+ });
20109
+ /**
19933
20110
  * One publishable camera stream as its OWNING PROVIDER describes it — the same
19934
20111
  * payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
19935
20112
  * `deviceId`.
@@ -23853,6 +24030,42 @@ Object.freeze({
23853
24030
  addonId: null,
23854
24031
  access: "create"
23855
24032
  },
24033
+ "recordingExport.cancelExport": {
24034
+ capName: "recordingExport",
24035
+ capScope: "system",
24036
+ addonId: null,
24037
+ access: "create"
24038
+ },
24039
+ "recordingExport.createExport": {
24040
+ capName: "recordingExport",
24041
+ capScope: "system",
24042
+ addonId: null,
24043
+ access: "create"
24044
+ },
24045
+ "recordingExport.deleteExport": {
24046
+ capName: "recordingExport",
24047
+ capScope: "system",
24048
+ addonId: null,
24049
+ access: "delete"
24050
+ },
24051
+ "recordingExport.getDownloadUrl": {
24052
+ capName: "recordingExport",
24053
+ capScope: "system",
24054
+ addonId: null,
24055
+ access: "view"
24056
+ },
24057
+ "recordingExport.getExport": {
24058
+ capName: "recordingExport",
24059
+ capScope: "system",
24060
+ addonId: null,
24061
+ access: "view"
24062
+ },
24063
+ "recordingExport.listExports": {
24064
+ capName: "recordingExport",
24065
+ capScope: "system",
24066
+ addonId: null,
24067
+ access: "view"
24068
+ },
23856
24069
  "sceneMonitor.captureReference": {
23857
24070
  capName: "scene-monitor",
23858
24071
  capScope: "device",
package/dist/addon.mjs CHANGED
@@ -3,7 +3,7 @@ import { createRequire } from "node:module";
3
3
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
4
4
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
5
5
  //#endregion
6
- //#region ../types/dist/event-category-H4AVePnn.mjs
6
+ //#region ../types/dist/event-category-D4HJq7Mw.mjs
7
7
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
8
8
  EventCategory["SystemBoot"] = "system.boot";
9
9
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -156,6 +156,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
156
156
  /** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
157
157
  * thumb is a scrub gap the recorder's keyframe backfill covers. */
158
158
  EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
159
+ /** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
160
+ * progress bar the client reconciles via `recordingExport.getExport`. */
161
+ EventCategory["RecordingExportProgress"] = "recording.export.progress";
162
+ EventCategory["RecordingExportCompleted"] = "recording.export.completed";
163
+ EventCategory["RecordingExportFailed"] = "recording.export.failed";
159
164
  EventCategory["DetectionEvent"] = "detection.event";
160
165
  EventCategory["SessionTrackNew"] = "session.track.new";
161
166
  EventCategory["SessionTrackExpired"] = "session.track.expired";
@@ -445,6 +450,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
445
450
  */
446
451
  EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
447
452
  /**
453
+ * Fired by `addon-post-analysis` when a package-drop is confirmed inside
454
+ * a package zone — a newly-appeared stationary object of a package class
455
+ * that cleared the class / zone / dwell / size gates. Payload:
456
+ * `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
457
+ * entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
458
+ * Telemetry (D8): the durable record is the `package-events` store row;
459
+ * this bus topic drives notifier rules + live UI. See
460
+ * docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
461
+ */
462
+ EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
463
+ /**
464
+ * Fired by `addon-post-analysis` when a previously-delivered package
465
+ * leaves its zone (the stationary entry departed — moved or swept).
466
+ * Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
467
+ * `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
468
+ * Telemetry (D8). See package-zones-design §5.2.
469
+ */
470
+ EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
471
+ /**
448
472
  * Fired by `addon-post-analysis` whenever a gallery face row changes:
449
473
  * `kind:'buffered'` a new detected face was persisted, `'assigned'` /
450
474
  * `'unassigned'` its identity link changed, `'deleted'` the row was
@@ -5183,6 +5207,25 @@ function _instanceof(cls, params = {}) {
5183
5207
  };
5184
5208
  return inst;
5185
5209
  }
5210
+ //#endregion
5211
+ //#region ../../node_modules/zod/v4/classic/compat.js
5212
+ /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
5213
+ var ZodIssueCode = {
5214
+ invalid_type: "invalid_type",
5215
+ too_big: "too_big",
5216
+ too_small: "too_small",
5217
+ invalid_format: "invalid_format",
5218
+ not_multiple_of: "not_multiple_of",
5219
+ unrecognized_keys: "unrecognized_keys",
5220
+ invalid_union: "invalid_union",
5221
+ invalid_key: "invalid_key",
5222
+ invalid_element: "invalid_element",
5223
+ invalid_value: "invalid_value",
5224
+ custom: "custom"
5225
+ };
5226
+ /** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
5227
+ var ZodFirstPartyTypeKind;
5228
+ ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5186
5229
  Object.fromEntries([
5187
5230
  {
5188
5231
  id: "overview",
@@ -7237,6 +7280,24 @@ var RecordingRetentionSchema = object({
7237
7280
  maxSizeGb: number().min(0).optional()
7238
7281
  });
7239
7282
  /**
7283
+ * Scrub-thumbnail fidelity preset — the single per-camera selector bundling the
7284
+ * sprite tile RESOLUTION + JPEG QUALITY the recorder packs timeline-scrub
7285
+ * previews at. Five graduated steps; absent on a config = `standard` (the
7286
+ * shipped default, matching `sheet-geometry`/`sheet-composer`).
7287
+ *
7288
+ * Existing sheets are IMMUTABLE — a changed preset applies to NEW windows only.
7289
+ * Each window's index sidecar carries its own tile dims, so a camera whose
7290
+ * preset changed over time renders every historical window at the dims it was
7291
+ * written with.
7292
+ */
7293
+ var ScrubThumbnailPresetSchema = _enum([
7294
+ "minimal",
7295
+ "low",
7296
+ "standard",
7297
+ "high",
7298
+ "max"
7299
+ ]);
7300
+ /**
7240
7301
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7241
7302
  *
7242
7303
  * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
@@ -7273,7 +7334,14 @@ var RecordingConfigSchema = object({
7273
7334
  * derived into bands once via `migrateConfigToBands`.
7274
7335
  */
7275
7336
  bands: array(RecordingBandSchema).optional(),
7276
- retention: RecordingRetentionSchema.optional()
7337
+ retention: RecordingRetentionSchema.optional(),
7338
+ /**
7339
+ * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
7340
+ * timeline-scrub sprite previews). Absent = `standard`. Applies to NEW
7341
+ * windows only — existing sheets are immutable, and each window's index
7342
+ * carries its own tile dims so mixed-preset history renders correctly.
7343
+ */
7344
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7277
7345
  });
7278
7346
  /**
7279
7347
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -12695,7 +12763,11 @@ array(ZoneRuleSchema).readonly();
12695
12763
  * Extend the enum here when a new gating consumer comes online (audio
12696
12764
  * gating, alert filtering, …) — no other surface needs to change.
12697
12765
  */
12698
- var ZoneRuleStageEnum = _enum(["motion", "detection"]);
12766
+ var ZoneRuleStageEnum = _enum([
12767
+ "motion",
12768
+ "detection",
12769
+ "package"
12770
+ ]);
12699
12771
  DeviceType.Camera, method(object({
12700
12772
  deviceId: number(),
12701
12773
  stage: ZoneRuleStageEnum
@@ -12708,7 +12780,8 @@ DeviceType.Camera, method(object({
12708
12780
  auth: "admin"
12709
12781
  }), object({
12710
12782
  motion: array(ZoneRuleSchema).readonly(),
12711
- detection: array(ZoneRuleSchema).readonly()
12783
+ detection: array(ZoneRuleSchema).readonly(),
12784
+ package: array(ZoneRuleSchema).readonly()
12712
12785
  });
12713
12786
  var ProviderStatusSchema = object({
12714
12787
  connected: boolean(),
@@ -16185,6 +16258,7 @@ var EventKindIconSchema = _enum([
16185
16258
  "smoke",
16186
16259
  "water",
16187
16260
  "button",
16261
+ "package",
16188
16262
  "generic"
16189
16263
  ]);
16190
16264
  var EventKindCategorySchema = _enum([
@@ -16192,7 +16266,8 @@ var EventKindCategorySchema = _enum([
16192
16266
  "audio",
16193
16267
  "detection",
16194
16268
  "sensor",
16195
- "custom"
16269
+ "custom",
16270
+ "package"
16196
16271
  ]);
16197
16272
  var EventKindDescriptorSchema = object({
16198
16273
  /** Stable kind id (e.g. 'motion', 'person', 'contact'). */
@@ -19931,6 +20006,108 @@ method(object({
19931
20006
  auth: "admin"
19932
20007
  });
19933
20008
  /**
20009
+ * `recordingExport` cap — render a footage time range into a single downloadable
20010
+ * MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
20011
+ * bounded lifetime with a durable history, auto-expiry, and optional
20012
+ * delete-after-download.
20013
+ *
20014
+ * Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
20015
+ * recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
20016
+ * default `hub`) registers it. Device-scoped methods carry `deviceId` in their
20017
+ * input and dispatch to that single provider; the render runs on the node that
20018
+ * owns the footage (no cross-node segment transfer). Download rides the
20019
+ * framework addon data-plane. State persists in a DurableState blob (NOT
20020
+ * SQLite); history rows survive file deletion for audit.
20021
+ */
20022
+ /** Playback-speed multiplier for the render (1 = realtime). */
20023
+ var ExportSpeedSchema = number().min(.25).max(32);
20024
+ /** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
20025
+ var ExportTimelapseSchema = object({
20026
+ everyMs: number().int().positive(),
20027
+ outputFps: number().int().min(1).max(60).optional()
20028
+ });
20029
+ /**
20030
+ * Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
20031
+ * is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
20032
+ * silent. `maxLifeMs` bounds how long the finished file is kept;
20033
+ * `deleteAfterDownload` removes it shortly after the first complete download.
20034
+ */
20035
+ var ExportOptionsSchema = object({
20036
+ speed: ExportSpeedSchema.optional(),
20037
+ timelapse: ExportTimelapseSchema.optional(),
20038
+ includeAudio: boolean(),
20039
+ maxLifeMs: number().int().positive(),
20040
+ deleteAfterDownload: boolean(),
20041
+ title: string().max(200).optional()
20042
+ }).superRefine((v, ctx) => {
20043
+ if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
20044
+ code: ZodIssueCode.custom,
20045
+ message: "speed and timelapse are mutually exclusive",
20046
+ path: ["timelapse"]
20047
+ });
20048
+ });
20049
+ var ExportStateSchema = _enum([
20050
+ "queued",
20051
+ "rendering",
20052
+ "ready",
20053
+ "failed",
20054
+ "expired",
20055
+ "deleted"
20056
+ ]);
20057
+ /** One export job / history row. */
20058
+ var ExportRecordSchema = object({
20059
+ id: string(),
20060
+ deviceId: number(),
20061
+ profile: string(),
20062
+ fromMs: number(),
20063
+ toMs: number(),
20064
+ options: ExportOptionsSchema,
20065
+ state: ExportStateSchema,
20066
+ /** 0–100 while rendering; null otherwise. */
20067
+ progressPct: number().nullable(),
20068
+ /** File size once ready; null before. */
20069
+ fileBytes: number().nullable(),
20070
+ expiresAt: number(),
20071
+ deleteAfterDownload: boolean(),
20072
+ /** Epoch of the first complete download; null until then. */
20073
+ downloadedAt: number().nullable(),
20074
+ createdAt: number(),
20075
+ /** User id/name that requested the export. */
20076
+ createdBy: string(),
20077
+ /** Failure reason when state is 'failed'; null otherwise. */
20078
+ error: string().nullable()
20079
+ });
20080
+ /** Candidate download URLs (LAN first, then operator extra hosts). */
20081
+ var ExportDownloadSchema = object({
20082
+ url: string(),
20083
+ endpoints: array(string())
20084
+ });
20085
+ method(object({
20086
+ deviceId: number(),
20087
+ profile: string(),
20088
+ fromMs: number(),
20089
+ toMs: number(),
20090
+ options: ExportOptionsSchema
20091
+ }), ExportRecordSchema, {
20092
+ kind: "mutation",
20093
+ auth: "protected"
20094
+ }), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
20095
+ kind: "query",
20096
+ auth: "protected"
20097
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
20098
+ kind: "query",
20099
+ auth: "protected"
20100
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
20101
+ kind: "mutation",
20102
+ auth: "protected"
20103
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
20104
+ kind: "mutation",
20105
+ auth: "protected"
20106
+ }), method(object({ exportId: string() }), ExportDownloadSchema, {
20107
+ kind: "query",
20108
+ auth: "protected"
20109
+ });
20110
+ /**
19934
20111
  * One publishable camera stream as its OWNING PROVIDER describes it — the same
19935
20112
  * payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
19936
20113
  * `deviceId`.
@@ -23854,6 +24031,42 @@ Object.freeze({
23854
24031
  addonId: null,
23855
24032
  access: "create"
23856
24033
  },
24034
+ "recordingExport.cancelExport": {
24035
+ capName: "recordingExport",
24036
+ capScope: "system",
24037
+ addonId: null,
24038
+ access: "create"
24039
+ },
24040
+ "recordingExport.createExport": {
24041
+ capName: "recordingExport",
24042
+ capScope: "system",
24043
+ addonId: null,
24044
+ access: "create"
24045
+ },
24046
+ "recordingExport.deleteExport": {
24047
+ capName: "recordingExport",
24048
+ capScope: "system",
24049
+ addonId: null,
24050
+ access: "delete"
24051
+ },
24052
+ "recordingExport.getDownloadUrl": {
24053
+ capName: "recordingExport",
24054
+ capScope: "system",
24055
+ addonId: null,
24056
+ access: "view"
24057
+ },
24058
+ "recordingExport.getExport": {
24059
+ capName: "recordingExport",
24060
+ capScope: "system",
24061
+ addonId: null,
24062
+ access: "view"
24063
+ },
24064
+ "recordingExport.listExports": {
24065
+ capName: "recordingExport",
24066
+ capScope: "system",
24067
+ addonId: null,
24068
+ access: "view"
24069
+ },
23857
24070
  "sceneMonitor.captureReference": {
23858
24071
  capName: "scene-monitor",
23859
24072
  capScope: "device",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-onvif",
3
- "version": "1.1.26",
3
+ "version": "1.1.28",
4
4
  "description": "ONVIF camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",