@camstack/addon-static-turn 1.1.25 → 1.1.26
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/static-turn.addon.js +192 -4
- package/dist/static-turn.addon.mjs +192 -4
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
//#region ../types/dist/event-category-
|
|
2
|
+
//#region ../types/dist/event-category-D4HJq7Mw.mjs
|
|
3
3
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4
4
|
EventCategory["SystemBoot"] = "system.boot";
|
|
5
5
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -152,6 +152,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
152
152
|
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
153
153
|
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
154
154
|
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
155
|
+
/** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
|
|
156
|
+
* progress bar the client reconciles via `recordingExport.getExport`. */
|
|
157
|
+
EventCategory["RecordingExportProgress"] = "recording.export.progress";
|
|
158
|
+
EventCategory["RecordingExportCompleted"] = "recording.export.completed";
|
|
159
|
+
EventCategory["RecordingExportFailed"] = "recording.export.failed";
|
|
155
160
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
156
161
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
157
162
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -441,6 +446,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
441
446
|
*/
|
|
442
447
|
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
443
448
|
/**
|
|
449
|
+
* Fired by `addon-post-analysis` when a package-drop is confirmed inside
|
|
450
|
+
* a package zone — a newly-appeared stationary object of a package class
|
|
451
|
+
* that cleared the class / zone / dwell / size gates. Payload:
|
|
452
|
+
* `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
|
|
453
|
+
* entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
|
|
454
|
+
* Telemetry (D8): the durable record is the `package-events` store row;
|
|
455
|
+
* this bus topic drives notifier rules + live UI. See
|
|
456
|
+
* docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
|
|
457
|
+
*/
|
|
458
|
+
EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
|
|
459
|
+
/**
|
|
460
|
+
* Fired by `addon-post-analysis` when a previously-delivered package
|
|
461
|
+
* leaves its zone (the stationary entry departed — moved or swept).
|
|
462
|
+
* Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
|
|
463
|
+
* `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
|
|
464
|
+
* Telemetry (D8). See package-zones-design §5.2.
|
|
465
|
+
*/
|
|
466
|
+
EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
|
|
467
|
+
/**
|
|
444
468
|
* Fired by `addon-post-analysis` whenever a gallery face row changes:
|
|
445
469
|
* `kind:'buffered'` a new detected face was persisted, `'assigned'` /
|
|
446
470
|
* `'unassigned'` its identity link changed, `'deleted'` the row was
|
|
@@ -5179,6 +5203,25 @@ function _instanceof(cls, params = {}) {
|
|
|
5179
5203
|
};
|
|
5180
5204
|
return inst;
|
|
5181
5205
|
}
|
|
5206
|
+
//#endregion
|
|
5207
|
+
//#region ../../node_modules/zod/v4/classic/compat.js
|
|
5208
|
+
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
|
5209
|
+
var ZodIssueCode = {
|
|
5210
|
+
invalid_type: "invalid_type",
|
|
5211
|
+
too_big: "too_big",
|
|
5212
|
+
too_small: "too_small",
|
|
5213
|
+
invalid_format: "invalid_format",
|
|
5214
|
+
not_multiple_of: "not_multiple_of",
|
|
5215
|
+
unrecognized_keys: "unrecognized_keys",
|
|
5216
|
+
invalid_union: "invalid_union",
|
|
5217
|
+
invalid_key: "invalid_key",
|
|
5218
|
+
invalid_element: "invalid_element",
|
|
5219
|
+
invalid_value: "invalid_value",
|
|
5220
|
+
custom: "custom"
|
|
5221
|
+
};
|
|
5222
|
+
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
|
|
5223
|
+
var ZodFirstPartyTypeKind;
|
|
5224
|
+
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5182
5225
|
Object.fromEntries([
|
|
5183
5226
|
{
|
|
5184
5227
|
id: "overview",
|
|
@@ -12534,7 +12577,11 @@ array(ZoneRuleSchema).readonly();
|
|
|
12534
12577
|
* Extend the enum here when a new gating consumer comes online (audio
|
|
12535
12578
|
* gating, alert filtering, …) — no other surface needs to change.
|
|
12536
12579
|
*/
|
|
12537
|
-
var ZoneRuleStageEnum = _enum([
|
|
12580
|
+
var ZoneRuleStageEnum = _enum([
|
|
12581
|
+
"motion",
|
|
12582
|
+
"detection",
|
|
12583
|
+
"package"
|
|
12584
|
+
]);
|
|
12538
12585
|
DeviceType.Camera, method(object({
|
|
12539
12586
|
deviceId: number(),
|
|
12540
12587
|
stage: ZoneRuleStageEnum
|
|
@@ -12547,7 +12594,8 @@ DeviceType.Camera, method(object({
|
|
|
12547
12594
|
auth: "admin"
|
|
12548
12595
|
}), object({
|
|
12549
12596
|
motion: array(ZoneRuleSchema).readonly(),
|
|
12550
|
-
detection: array(ZoneRuleSchema).readonly()
|
|
12597
|
+
detection: array(ZoneRuleSchema).readonly(),
|
|
12598
|
+
package: array(ZoneRuleSchema).readonly()
|
|
12551
12599
|
});
|
|
12552
12600
|
var ProviderStatusSchema = object({
|
|
12553
12601
|
connected: boolean(),
|
|
@@ -15730,6 +15778,7 @@ var EventKindIconSchema = _enum([
|
|
|
15730
15778
|
"smoke",
|
|
15731
15779
|
"water",
|
|
15732
15780
|
"button",
|
|
15781
|
+
"package",
|
|
15733
15782
|
"generic"
|
|
15734
15783
|
]);
|
|
15735
15784
|
var EventKindCategorySchema = _enum([
|
|
@@ -15737,7 +15786,8 @@ var EventKindCategorySchema = _enum([
|
|
|
15737
15786
|
"audio",
|
|
15738
15787
|
"detection",
|
|
15739
15788
|
"sensor",
|
|
15740
|
-
"custom"
|
|
15789
|
+
"custom",
|
|
15790
|
+
"package"
|
|
15741
15791
|
]);
|
|
15742
15792
|
var EventKindDescriptorSchema = object({
|
|
15743
15793
|
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
@@ -19406,6 +19456,108 @@ method(object({
|
|
|
19406
19456
|
auth: "admin"
|
|
19407
19457
|
});
|
|
19408
19458
|
/**
|
|
19459
|
+
* `recordingExport` cap — render a footage time range into a single downloadable
|
|
19460
|
+
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
19461
|
+
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
19462
|
+
* delete-after-download.
|
|
19463
|
+
*
|
|
19464
|
+
* Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
|
|
19465
|
+
* recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
|
|
19466
|
+
* default `hub`) registers it. Device-scoped methods carry `deviceId` in their
|
|
19467
|
+
* input and dispatch to that single provider; the render runs on the node that
|
|
19468
|
+
* owns the footage (no cross-node segment transfer). Download rides the
|
|
19469
|
+
* framework addon data-plane. State persists in a DurableState blob (NOT
|
|
19470
|
+
* SQLite); history rows survive file deletion for audit.
|
|
19471
|
+
*/
|
|
19472
|
+
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
19473
|
+
var ExportSpeedSchema = number().min(.25).max(32);
|
|
19474
|
+
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
19475
|
+
var ExportTimelapseSchema = object({
|
|
19476
|
+
everyMs: number().int().positive(),
|
|
19477
|
+
outputFps: number().int().min(1).max(60).optional()
|
|
19478
|
+
});
|
|
19479
|
+
/**
|
|
19480
|
+
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
19481
|
+
* is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
|
|
19482
|
+
* silent. `maxLifeMs` bounds how long the finished file is kept;
|
|
19483
|
+
* `deleteAfterDownload` removes it shortly after the first complete download.
|
|
19484
|
+
*/
|
|
19485
|
+
var ExportOptionsSchema = object({
|
|
19486
|
+
speed: ExportSpeedSchema.optional(),
|
|
19487
|
+
timelapse: ExportTimelapseSchema.optional(),
|
|
19488
|
+
includeAudio: boolean(),
|
|
19489
|
+
maxLifeMs: number().int().positive(),
|
|
19490
|
+
deleteAfterDownload: boolean(),
|
|
19491
|
+
title: string().max(200).optional()
|
|
19492
|
+
}).superRefine((v, ctx) => {
|
|
19493
|
+
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
19494
|
+
code: ZodIssueCode.custom,
|
|
19495
|
+
message: "speed and timelapse are mutually exclusive",
|
|
19496
|
+
path: ["timelapse"]
|
|
19497
|
+
});
|
|
19498
|
+
});
|
|
19499
|
+
var ExportStateSchema = _enum([
|
|
19500
|
+
"queued",
|
|
19501
|
+
"rendering",
|
|
19502
|
+
"ready",
|
|
19503
|
+
"failed",
|
|
19504
|
+
"expired",
|
|
19505
|
+
"deleted"
|
|
19506
|
+
]);
|
|
19507
|
+
/** One export job / history row. */
|
|
19508
|
+
var ExportRecordSchema = object({
|
|
19509
|
+
id: string(),
|
|
19510
|
+
deviceId: number(),
|
|
19511
|
+
profile: string(),
|
|
19512
|
+
fromMs: number(),
|
|
19513
|
+
toMs: number(),
|
|
19514
|
+
options: ExportOptionsSchema,
|
|
19515
|
+
state: ExportStateSchema,
|
|
19516
|
+
/** 0–100 while rendering; null otherwise. */
|
|
19517
|
+
progressPct: number().nullable(),
|
|
19518
|
+
/** File size once ready; null before. */
|
|
19519
|
+
fileBytes: number().nullable(),
|
|
19520
|
+
expiresAt: number(),
|
|
19521
|
+
deleteAfterDownload: boolean(),
|
|
19522
|
+
/** Epoch of the first complete download; null until then. */
|
|
19523
|
+
downloadedAt: number().nullable(),
|
|
19524
|
+
createdAt: number(),
|
|
19525
|
+
/** User id/name that requested the export. */
|
|
19526
|
+
createdBy: string(),
|
|
19527
|
+
/** Failure reason when state is 'failed'; null otherwise. */
|
|
19528
|
+
error: string().nullable()
|
|
19529
|
+
});
|
|
19530
|
+
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
19531
|
+
var ExportDownloadSchema = object({
|
|
19532
|
+
url: string(),
|
|
19533
|
+
endpoints: array(string())
|
|
19534
|
+
});
|
|
19535
|
+
method(object({
|
|
19536
|
+
deviceId: number(),
|
|
19537
|
+
profile: string(),
|
|
19538
|
+
fromMs: number(),
|
|
19539
|
+
toMs: number(),
|
|
19540
|
+
options: ExportOptionsSchema
|
|
19541
|
+
}), ExportRecordSchema, {
|
|
19542
|
+
kind: "mutation",
|
|
19543
|
+
auth: "protected"
|
|
19544
|
+
}), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
|
|
19545
|
+
kind: "query",
|
|
19546
|
+
auth: "protected"
|
|
19547
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19548
|
+
kind: "query",
|
|
19549
|
+
auth: "protected"
|
|
19550
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19551
|
+
kind: "mutation",
|
|
19552
|
+
auth: "protected"
|
|
19553
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19554
|
+
kind: "mutation",
|
|
19555
|
+
auth: "protected"
|
|
19556
|
+
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
19557
|
+
kind: "query",
|
|
19558
|
+
auth: "protected"
|
|
19559
|
+
});
|
|
19560
|
+
/**
|
|
19409
19561
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
19410
19562
|
* payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
|
|
19411
19563
|
* `deviceId`.
|
|
@@ -23329,6 +23481,42 @@ Object.freeze({
|
|
|
23329
23481
|
addonId: null,
|
|
23330
23482
|
access: "create"
|
|
23331
23483
|
},
|
|
23484
|
+
"recordingExport.cancelExport": {
|
|
23485
|
+
capName: "recordingExport",
|
|
23486
|
+
capScope: "system",
|
|
23487
|
+
addonId: null,
|
|
23488
|
+
access: "create"
|
|
23489
|
+
},
|
|
23490
|
+
"recordingExport.createExport": {
|
|
23491
|
+
capName: "recordingExport",
|
|
23492
|
+
capScope: "system",
|
|
23493
|
+
addonId: null,
|
|
23494
|
+
access: "create"
|
|
23495
|
+
},
|
|
23496
|
+
"recordingExport.deleteExport": {
|
|
23497
|
+
capName: "recordingExport",
|
|
23498
|
+
capScope: "system",
|
|
23499
|
+
addonId: null,
|
|
23500
|
+
access: "delete"
|
|
23501
|
+
},
|
|
23502
|
+
"recordingExport.getDownloadUrl": {
|
|
23503
|
+
capName: "recordingExport",
|
|
23504
|
+
capScope: "system",
|
|
23505
|
+
addonId: null,
|
|
23506
|
+
access: "view"
|
|
23507
|
+
},
|
|
23508
|
+
"recordingExport.getExport": {
|
|
23509
|
+
capName: "recordingExport",
|
|
23510
|
+
capScope: "system",
|
|
23511
|
+
addonId: null,
|
|
23512
|
+
access: "view"
|
|
23513
|
+
},
|
|
23514
|
+
"recordingExport.listExports": {
|
|
23515
|
+
capName: "recordingExport",
|
|
23516
|
+
capScope: "system",
|
|
23517
|
+
addonId: null,
|
|
23518
|
+
access: "view"
|
|
23519
|
+
},
|
|
23332
23520
|
"sceneMonitor.captureReference": {
|
|
23333
23521
|
capName: "scene-monitor",
|
|
23334
23522
|
capScope: "device",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../types/dist/event-category-
|
|
1
|
+
//#region ../types/dist/event-category-D4HJq7Mw.mjs
|
|
2
2
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
3
3
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4
4
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -151,6 +151,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
151
151
|
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
152
152
|
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
153
153
|
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
154
|
+
/** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
|
|
155
|
+
* progress bar the client reconciles via `recordingExport.getExport`. */
|
|
156
|
+
EventCategory["RecordingExportProgress"] = "recording.export.progress";
|
|
157
|
+
EventCategory["RecordingExportCompleted"] = "recording.export.completed";
|
|
158
|
+
EventCategory["RecordingExportFailed"] = "recording.export.failed";
|
|
154
159
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
155
160
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
156
161
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -440,6 +445,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
440
445
|
*/
|
|
441
446
|
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
442
447
|
/**
|
|
448
|
+
* Fired by `addon-post-analysis` when a package-drop is confirmed inside
|
|
449
|
+
* a package zone — a newly-appeared stationary object of a package class
|
|
450
|
+
* that cleared the class / zone / dwell / size gates. Payload:
|
|
451
|
+
* `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
|
|
452
|
+
* entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
|
|
453
|
+
* Telemetry (D8): the durable record is the `package-events` store row;
|
|
454
|
+
* this bus topic drives notifier rules + live UI. See
|
|
455
|
+
* docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
|
|
456
|
+
*/
|
|
457
|
+
EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
|
|
458
|
+
/**
|
|
459
|
+
* Fired by `addon-post-analysis` when a previously-delivered package
|
|
460
|
+
* leaves its zone (the stationary entry departed — moved or swept).
|
|
461
|
+
* Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
|
|
462
|
+
* `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
|
|
463
|
+
* Telemetry (D8). See package-zones-design §5.2.
|
|
464
|
+
*/
|
|
465
|
+
EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
|
|
466
|
+
/**
|
|
443
467
|
* Fired by `addon-post-analysis` whenever a gallery face row changes:
|
|
444
468
|
* `kind:'buffered'` a new detected face was persisted, `'assigned'` /
|
|
445
469
|
* `'unassigned'` its identity link changed, `'deleted'` the row was
|
|
@@ -5178,6 +5202,25 @@ function _instanceof(cls, params = {}) {
|
|
|
5178
5202
|
};
|
|
5179
5203
|
return inst;
|
|
5180
5204
|
}
|
|
5205
|
+
//#endregion
|
|
5206
|
+
//#region ../../node_modules/zod/v4/classic/compat.js
|
|
5207
|
+
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
|
5208
|
+
var ZodIssueCode = {
|
|
5209
|
+
invalid_type: "invalid_type",
|
|
5210
|
+
too_big: "too_big",
|
|
5211
|
+
too_small: "too_small",
|
|
5212
|
+
invalid_format: "invalid_format",
|
|
5213
|
+
not_multiple_of: "not_multiple_of",
|
|
5214
|
+
unrecognized_keys: "unrecognized_keys",
|
|
5215
|
+
invalid_union: "invalid_union",
|
|
5216
|
+
invalid_key: "invalid_key",
|
|
5217
|
+
invalid_element: "invalid_element",
|
|
5218
|
+
invalid_value: "invalid_value",
|
|
5219
|
+
custom: "custom"
|
|
5220
|
+
};
|
|
5221
|
+
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
|
|
5222
|
+
var ZodFirstPartyTypeKind;
|
|
5223
|
+
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5181
5224
|
Object.fromEntries([
|
|
5182
5225
|
{
|
|
5183
5226
|
id: "overview",
|
|
@@ -12533,7 +12576,11 @@ array(ZoneRuleSchema).readonly();
|
|
|
12533
12576
|
* Extend the enum here when a new gating consumer comes online (audio
|
|
12534
12577
|
* gating, alert filtering, …) — no other surface needs to change.
|
|
12535
12578
|
*/
|
|
12536
|
-
var ZoneRuleStageEnum = _enum([
|
|
12579
|
+
var ZoneRuleStageEnum = _enum([
|
|
12580
|
+
"motion",
|
|
12581
|
+
"detection",
|
|
12582
|
+
"package"
|
|
12583
|
+
]);
|
|
12537
12584
|
DeviceType.Camera, method(object({
|
|
12538
12585
|
deviceId: number(),
|
|
12539
12586
|
stage: ZoneRuleStageEnum
|
|
@@ -12546,7 +12593,8 @@ DeviceType.Camera, method(object({
|
|
|
12546
12593
|
auth: "admin"
|
|
12547
12594
|
}), object({
|
|
12548
12595
|
motion: array(ZoneRuleSchema).readonly(),
|
|
12549
|
-
detection: array(ZoneRuleSchema).readonly()
|
|
12596
|
+
detection: array(ZoneRuleSchema).readonly(),
|
|
12597
|
+
package: array(ZoneRuleSchema).readonly()
|
|
12550
12598
|
});
|
|
12551
12599
|
var ProviderStatusSchema = object({
|
|
12552
12600
|
connected: boolean(),
|
|
@@ -15729,6 +15777,7 @@ var EventKindIconSchema = _enum([
|
|
|
15729
15777
|
"smoke",
|
|
15730
15778
|
"water",
|
|
15731
15779
|
"button",
|
|
15780
|
+
"package",
|
|
15732
15781
|
"generic"
|
|
15733
15782
|
]);
|
|
15734
15783
|
var EventKindCategorySchema = _enum([
|
|
@@ -15736,7 +15785,8 @@ var EventKindCategorySchema = _enum([
|
|
|
15736
15785
|
"audio",
|
|
15737
15786
|
"detection",
|
|
15738
15787
|
"sensor",
|
|
15739
|
-
"custom"
|
|
15788
|
+
"custom",
|
|
15789
|
+
"package"
|
|
15740
15790
|
]);
|
|
15741
15791
|
var EventKindDescriptorSchema = object({
|
|
15742
15792
|
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
@@ -19405,6 +19455,108 @@ method(object({
|
|
|
19405
19455
|
auth: "admin"
|
|
19406
19456
|
});
|
|
19407
19457
|
/**
|
|
19458
|
+
* `recordingExport` cap — render a footage time range into a single downloadable
|
|
19459
|
+
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
19460
|
+
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
19461
|
+
* delete-after-download.
|
|
19462
|
+
*
|
|
19463
|
+
* Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
|
|
19464
|
+
* recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
|
|
19465
|
+
* default `hub`) registers it. Device-scoped methods carry `deviceId` in their
|
|
19466
|
+
* input and dispatch to that single provider; the render runs on the node that
|
|
19467
|
+
* owns the footage (no cross-node segment transfer). Download rides the
|
|
19468
|
+
* framework addon data-plane. State persists in a DurableState blob (NOT
|
|
19469
|
+
* SQLite); history rows survive file deletion for audit.
|
|
19470
|
+
*/
|
|
19471
|
+
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
19472
|
+
var ExportSpeedSchema = number().min(.25).max(32);
|
|
19473
|
+
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
19474
|
+
var ExportTimelapseSchema = object({
|
|
19475
|
+
everyMs: number().int().positive(),
|
|
19476
|
+
outputFps: number().int().min(1).max(60).optional()
|
|
19477
|
+
});
|
|
19478
|
+
/**
|
|
19479
|
+
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
19480
|
+
* is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
|
|
19481
|
+
* silent. `maxLifeMs` bounds how long the finished file is kept;
|
|
19482
|
+
* `deleteAfterDownload` removes it shortly after the first complete download.
|
|
19483
|
+
*/
|
|
19484
|
+
var ExportOptionsSchema = object({
|
|
19485
|
+
speed: ExportSpeedSchema.optional(),
|
|
19486
|
+
timelapse: ExportTimelapseSchema.optional(),
|
|
19487
|
+
includeAudio: boolean(),
|
|
19488
|
+
maxLifeMs: number().int().positive(),
|
|
19489
|
+
deleteAfterDownload: boolean(),
|
|
19490
|
+
title: string().max(200).optional()
|
|
19491
|
+
}).superRefine((v, ctx) => {
|
|
19492
|
+
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
19493
|
+
code: ZodIssueCode.custom,
|
|
19494
|
+
message: "speed and timelapse are mutually exclusive",
|
|
19495
|
+
path: ["timelapse"]
|
|
19496
|
+
});
|
|
19497
|
+
});
|
|
19498
|
+
var ExportStateSchema = _enum([
|
|
19499
|
+
"queued",
|
|
19500
|
+
"rendering",
|
|
19501
|
+
"ready",
|
|
19502
|
+
"failed",
|
|
19503
|
+
"expired",
|
|
19504
|
+
"deleted"
|
|
19505
|
+
]);
|
|
19506
|
+
/** One export job / history row. */
|
|
19507
|
+
var ExportRecordSchema = object({
|
|
19508
|
+
id: string(),
|
|
19509
|
+
deviceId: number(),
|
|
19510
|
+
profile: string(),
|
|
19511
|
+
fromMs: number(),
|
|
19512
|
+
toMs: number(),
|
|
19513
|
+
options: ExportOptionsSchema,
|
|
19514
|
+
state: ExportStateSchema,
|
|
19515
|
+
/** 0–100 while rendering; null otherwise. */
|
|
19516
|
+
progressPct: number().nullable(),
|
|
19517
|
+
/** File size once ready; null before. */
|
|
19518
|
+
fileBytes: number().nullable(),
|
|
19519
|
+
expiresAt: number(),
|
|
19520
|
+
deleteAfterDownload: boolean(),
|
|
19521
|
+
/** Epoch of the first complete download; null until then. */
|
|
19522
|
+
downloadedAt: number().nullable(),
|
|
19523
|
+
createdAt: number(),
|
|
19524
|
+
/** User id/name that requested the export. */
|
|
19525
|
+
createdBy: string(),
|
|
19526
|
+
/** Failure reason when state is 'failed'; null otherwise. */
|
|
19527
|
+
error: string().nullable()
|
|
19528
|
+
});
|
|
19529
|
+
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
19530
|
+
var ExportDownloadSchema = object({
|
|
19531
|
+
url: string(),
|
|
19532
|
+
endpoints: array(string())
|
|
19533
|
+
});
|
|
19534
|
+
method(object({
|
|
19535
|
+
deviceId: number(),
|
|
19536
|
+
profile: string(),
|
|
19537
|
+
fromMs: number(),
|
|
19538
|
+
toMs: number(),
|
|
19539
|
+
options: ExportOptionsSchema
|
|
19540
|
+
}), ExportRecordSchema, {
|
|
19541
|
+
kind: "mutation",
|
|
19542
|
+
auth: "protected"
|
|
19543
|
+
}), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
|
|
19544
|
+
kind: "query",
|
|
19545
|
+
auth: "protected"
|
|
19546
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19547
|
+
kind: "query",
|
|
19548
|
+
auth: "protected"
|
|
19549
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19550
|
+
kind: "mutation",
|
|
19551
|
+
auth: "protected"
|
|
19552
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19553
|
+
kind: "mutation",
|
|
19554
|
+
auth: "protected"
|
|
19555
|
+
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
19556
|
+
kind: "query",
|
|
19557
|
+
auth: "protected"
|
|
19558
|
+
});
|
|
19559
|
+
/**
|
|
19408
19560
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
19409
19561
|
* payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
|
|
19410
19562
|
* `deviceId`.
|
|
@@ -23328,6 +23480,42 @@ Object.freeze({
|
|
|
23328
23480
|
addonId: null,
|
|
23329
23481
|
access: "create"
|
|
23330
23482
|
},
|
|
23483
|
+
"recordingExport.cancelExport": {
|
|
23484
|
+
capName: "recordingExport",
|
|
23485
|
+
capScope: "system",
|
|
23486
|
+
addonId: null,
|
|
23487
|
+
access: "create"
|
|
23488
|
+
},
|
|
23489
|
+
"recordingExport.createExport": {
|
|
23490
|
+
capName: "recordingExport",
|
|
23491
|
+
capScope: "system",
|
|
23492
|
+
addonId: null,
|
|
23493
|
+
access: "create"
|
|
23494
|
+
},
|
|
23495
|
+
"recordingExport.deleteExport": {
|
|
23496
|
+
capName: "recordingExport",
|
|
23497
|
+
capScope: "system",
|
|
23498
|
+
addonId: null,
|
|
23499
|
+
access: "delete"
|
|
23500
|
+
},
|
|
23501
|
+
"recordingExport.getDownloadUrl": {
|
|
23502
|
+
capName: "recordingExport",
|
|
23503
|
+
capScope: "system",
|
|
23504
|
+
addonId: null,
|
|
23505
|
+
access: "view"
|
|
23506
|
+
},
|
|
23507
|
+
"recordingExport.getExport": {
|
|
23508
|
+
capName: "recordingExport",
|
|
23509
|
+
capScope: "system",
|
|
23510
|
+
addonId: null,
|
|
23511
|
+
access: "view"
|
|
23512
|
+
},
|
|
23513
|
+
"recordingExport.listExports": {
|
|
23514
|
+
capName: "recordingExport",
|
|
23515
|
+
capScope: "system",
|
|
23516
|
+
addonId: null,
|
|
23517
|
+
access: "view"
|
|
23518
|
+
},
|
|
23331
23519
|
"sceneMonitor.captureReference": {
|
|
23332
23520
|
capName: "scene-monitor",
|
|
23333
23521
|
capScope: "device",
|