@camstack/addon-decoder-nodeav 1.1.15 → 1.1.16
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/index.js +192 -4
- package/dist/index.mjs +192 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
let node_crypto = require("node:crypto");
|
|
6
|
-
//#region ../types/dist/event-category-
|
|
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",
|
|
@@ -12550,7 +12593,11 @@ array(ZoneRuleSchema).readonly();
|
|
|
12550
12593
|
* Extend the enum here when a new gating consumer comes online (audio
|
|
12551
12594
|
* gating, alert filtering, …) — no other surface needs to change.
|
|
12552
12595
|
*/
|
|
12553
|
-
var ZoneRuleStageEnum = _enum([
|
|
12596
|
+
var ZoneRuleStageEnum = _enum([
|
|
12597
|
+
"motion",
|
|
12598
|
+
"detection",
|
|
12599
|
+
"package"
|
|
12600
|
+
]);
|
|
12554
12601
|
DeviceType.Camera, method(object({
|
|
12555
12602
|
deviceId: number(),
|
|
12556
12603
|
stage: ZoneRuleStageEnum
|
|
@@ -12563,7 +12610,8 @@ DeviceType.Camera, method(object({
|
|
|
12563
12610
|
auth: "admin"
|
|
12564
12611
|
}), object({
|
|
12565
12612
|
motion: array(ZoneRuleSchema).readonly(),
|
|
12566
|
-
detection: array(ZoneRuleSchema).readonly()
|
|
12613
|
+
detection: array(ZoneRuleSchema).readonly(),
|
|
12614
|
+
package: array(ZoneRuleSchema).readonly()
|
|
12567
12615
|
});
|
|
12568
12616
|
var ProviderStatusSchema = object({
|
|
12569
12617
|
connected: boolean(),
|
|
@@ -15876,6 +15924,7 @@ var EventKindIconSchema = _enum([
|
|
|
15876
15924
|
"smoke",
|
|
15877
15925
|
"water",
|
|
15878
15926
|
"button",
|
|
15927
|
+
"package",
|
|
15879
15928
|
"generic"
|
|
15880
15929
|
]);
|
|
15881
15930
|
var EventKindCategorySchema = _enum([
|
|
@@ -15883,7 +15932,8 @@ var EventKindCategorySchema = _enum([
|
|
|
15883
15932
|
"audio",
|
|
15884
15933
|
"detection",
|
|
15885
15934
|
"sensor",
|
|
15886
|
-
"custom"
|
|
15935
|
+
"custom",
|
|
15936
|
+
"package"
|
|
15887
15937
|
]);
|
|
15888
15938
|
var EventKindDescriptorSchema = object({
|
|
15889
15939
|
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
@@ -19529,6 +19579,108 @@ method(object({
|
|
|
19529
19579
|
auth: "admin"
|
|
19530
19580
|
});
|
|
19531
19581
|
/**
|
|
19582
|
+
* `recordingExport` cap — render a footage time range into a single downloadable
|
|
19583
|
+
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
19584
|
+
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
19585
|
+
* delete-after-download.
|
|
19586
|
+
*
|
|
19587
|
+
* Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
|
|
19588
|
+
* recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
|
|
19589
|
+
* default `hub`) registers it. Device-scoped methods carry `deviceId` in their
|
|
19590
|
+
* input and dispatch to that single provider; the render runs on the node that
|
|
19591
|
+
* owns the footage (no cross-node segment transfer). Download rides the
|
|
19592
|
+
* framework addon data-plane. State persists in a DurableState blob (NOT
|
|
19593
|
+
* SQLite); history rows survive file deletion for audit.
|
|
19594
|
+
*/
|
|
19595
|
+
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
19596
|
+
var ExportSpeedSchema = number().min(.25).max(32);
|
|
19597
|
+
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
19598
|
+
var ExportTimelapseSchema = object({
|
|
19599
|
+
everyMs: number().int().positive(),
|
|
19600
|
+
outputFps: number().int().min(1).max(60).optional()
|
|
19601
|
+
});
|
|
19602
|
+
/**
|
|
19603
|
+
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
19604
|
+
* is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
|
|
19605
|
+
* silent. `maxLifeMs` bounds how long the finished file is kept;
|
|
19606
|
+
* `deleteAfterDownload` removes it shortly after the first complete download.
|
|
19607
|
+
*/
|
|
19608
|
+
var ExportOptionsSchema = object({
|
|
19609
|
+
speed: ExportSpeedSchema.optional(),
|
|
19610
|
+
timelapse: ExportTimelapseSchema.optional(),
|
|
19611
|
+
includeAudio: boolean(),
|
|
19612
|
+
maxLifeMs: number().int().positive(),
|
|
19613
|
+
deleteAfterDownload: boolean(),
|
|
19614
|
+
title: string().max(200).optional()
|
|
19615
|
+
}).superRefine((v, ctx) => {
|
|
19616
|
+
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
19617
|
+
code: ZodIssueCode.custom,
|
|
19618
|
+
message: "speed and timelapse are mutually exclusive",
|
|
19619
|
+
path: ["timelapse"]
|
|
19620
|
+
});
|
|
19621
|
+
});
|
|
19622
|
+
var ExportStateSchema = _enum([
|
|
19623
|
+
"queued",
|
|
19624
|
+
"rendering",
|
|
19625
|
+
"ready",
|
|
19626
|
+
"failed",
|
|
19627
|
+
"expired",
|
|
19628
|
+
"deleted"
|
|
19629
|
+
]);
|
|
19630
|
+
/** One export job / history row. */
|
|
19631
|
+
var ExportRecordSchema = object({
|
|
19632
|
+
id: string(),
|
|
19633
|
+
deviceId: number(),
|
|
19634
|
+
profile: string(),
|
|
19635
|
+
fromMs: number(),
|
|
19636
|
+
toMs: number(),
|
|
19637
|
+
options: ExportOptionsSchema,
|
|
19638
|
+
state: ExportStateSchema,
|
|
19639
|
+
/** 0–100 while rendering; null otherwise. */
|
|
19640
|
+
progressPct: number().nullable(),
|
|
19641
|
+
/** File size once ready; null before. */
|
|
19642
|
+
fileBytes: number().nullable(),
|
|
19643
|
+
expiresAt: number(),
|
|
19644
|
+
deleteAfterDownload: boolean(),
|
|
19645
|
+
/** Epoch of the first complete download; null until then. */
|
|
19646
|
+
downloadedAt: number().nullable(),
|
|
19647
|
+
createdAt: number(),
|
|
19648
|
+
/** User id/name that requested the export. */
|
|
19649
|
+
createdBy: string(),
|
|
19650
|
+
/** Failure reason when state is 'failed'; null otherwise. */
|
|
19651
|
+
error: string().nullable()
|
|
19652
|
+
});
|
|
19653
|
+
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
19654
|
+
var ExportDownloadSchema = object({
|
|
19655
|
+
url: string(),
|
|
19656
|
+
endpoints: array(string())
|
|
19657
|
+
});
|
|
19658
|
+
method(object({
|
|
19659
|
+
deviceId: number(),
|
|
19660
|
+
profile: string(),
|
|
19661
|
+
fromMs: number(),
|
|
19662
|
+
toMs: number(),
|
|
19663
|
+
options: ExportOptionsSchema
|
|
19664
|
+
}), ExportRecordSchema, {
|
|
19665
|
+
kind: "mutation",
|
|
19666
|
+
auth: "protected"
|
|
19667
|
+
}), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
|
|
19668
|
+
kind: "query",
|
|
19669
|
+
auth: "protected"
|
|
19670
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19671
|
+
kind: "query",
|
|
19672
|
+
auth: "protected"
|
|
19673
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19674
|
+
kind: "mutation",
|
|
19675
|
+
auth: "protected"
|
|
19676
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19677
|
+
kind: "mutation",
|
|
19678
|
+
auth: "protected"
|
|
19679
|
+
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
19680
|
+
kind: "query",
|
|
19681
|
+
auth: "protected"
|
|
19682
|
+
});
|
|
19683
|
+
/**
|
|
19532
19684
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
19533
19685
|
* payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
|
|
19534
19686
|
* `deviceId`.
|
|
@@ -23452,6 +23604,42 @@ Object.freeze({
|
|
|
23452
23604
|
addonId: null,
|
|
23453
23605
|
access: "create"
|
|
23454
23606
|
},
|
|
23607
|
+
"recordingExport.cancelExport": {
|
|
23608
|
+
capName: "recordingExport",
|
|
23609
|
+
capScope: "system",
|
|
23610
|
+
addonId: null,
|
|
23611
|
+
access: "create"
|
|
23612
|
+
},
|
|
23613
|
+
"recordingExport.createExport": {
|
|
23614
|
+
capName: "recordingExport",
|
|
23615
|
+
capScope: "system",
|
|
23616
|
+
addonId: null,
|
|
23617
|
+
access: "create"
|
|
23618
|
+
},
|
|
23619
|
+
"recordingExport.deleteExport": {
|
|
23620
|
+
capName: "recordingExport",
|
|
23621
|
+
capScope: "system",
|
|
23622
|
+
addonId: null,
|
|
23623
|
+
access: "delete"
|
|
23624
|
+
},
|
|
23625
|
+
"recordingExport.getDownloadUrl": {
|
|
23626
|
+
capName: "recordingExport",
|
|
23627
|
+
capScope: "system",
|
|
23628
|
+
addonId: null,
|
|
23629
|
+
access: "view"
|
|
23630
|
+
},
|
|
23631
|
+
"recordingExport.getExport": {
|
|
23632
|
+
capName: "recordingExport",
|
|
23633
|
+
capScope: "system",
|
|
23634
|
+
addonId: null,
|
|
23635
|
+
access: "view"
|
|
23636
|
+
},
|
|
23637
|
+
"recordingExport.listExports": {
|
|
23638
|
+
capName: "recordingExport",
|
|
23639
|
+
capScope: "system",
|
|
23640
|
+
addonId: null,
|
|
23641
|
+
access: "view"
|
|
23642
|
+
},
|
|
23455
23643
|
"sceneMonitor.captureReference": {
|
|
23456
23644
|
capName: "scene-monitor",
|
|
23457
23645
|
capScope: "device",
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
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",
|
|
@@ -12546,7 +12589,11 @@ array(ZoneRuleSchema).readonly();
|
|
|
12546
12589
|
* Extend the enum here when a new gating consumer comes online (audio
|
|
12547
12590
|
* gating, alert filtering, …) — no other surface needs to change.
|
|
12548
12591
|
*/
|
|
12549
|
-
var ZoneRuleStageEnum = _enum([
|
|
12592
|
+
var ZoneRuleStageEnum = _enum([
|
|
12593
|
+
"motion",
|
|
12594
|
+
"detection",
|
|
12595
|
+
"package"
|
|
12596
|
+
]);
|
|
12550
12597
|
DeviceType.Camera, method(object({
|
|
12551
12598
|
deviceId: number(),
|
|
12552
12599
|
stage: ZoneRuleStageEnum
|
|
@@ -12559,7 +12606,8 @@ DeviceType.Camera, method(object({
|
|
|
12559
12606
|
auth: "admin"
|
|
12560
12607
|
}), object({
|
|
12561
12608
|
motion: array(ZoneRuleSchema).readonly(),
|
|
12562
|
-
detection: array(ZoneRuleSchema).readonly()
|
|
12609
|
+
detection: array(ZoneRuleSchema).readonly(),
|
|
12610
|
+
package: array(ZoneRuleSchema).readonly()
|
|
12563
12611
|
});
|
|
12564
12612
|
var ProviderStatusSchema = object({
|
|
12565
12613
|
connected: boolean(),
|
|
@@ -15872,6 +15920,7 @@ var EventKindIconSchema = _enum([
|
|
|
15872
15920
|
"smoke",
|
|
15873
15921
|
"water",
|
|
15874
15922
|
"button",
|
|
15923
|
+
"package",
|
|
15875
15924
|
"generic"
|
|
15876
15925
|
]);
|
|
15877
15926
|
var EventKindCategorySchema = _enum([
|
|
@@ -15879,7 +15928,8 @@ var EventKindCategorySchema = _enum([
|
|
|
15879
15928
|
"audio",
|
|
15880
15929
|
"detection",
|
|
15881
15930
|
"sensor",
|
|
15882
|
-
"custom"
|
|
15931
|
+
"custom",
|
|
15932
|
+
"package"
|
|
15883
15933
|
]);
|
|
15884
15934
|
var EventKindDescriptorSchema = object({
|
|
15885
15935
|
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
@@ -19525,6 +19575,108 @@ method(object({
|
|
|
19525
19575
|
auth: "admin"
|
|
19526
19576
|
});
|
|
19527
19577
|
/**
|
|
19578
|
+
* `recordingExport` cap — render a footage time range into a single downloadable
|
|
19579
|
+
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
19580
|
+
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
19581
|
+
* delete-after-download.
|
|
19582
|
+
*
|
|
19583
|
+
* Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
|
|
19584
|
+
* recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
|
|
19585
|
+
* default `hub`) registers it. Device-scoped methods carry `deviceId` in their
|
|
19586
|
+
* input and dispatch to that single provider; the render runs on the node that
|
|
19587
|
+
* owns the footage (no cross-node segment transfer). Download rides the
|
|
19588
|
+
* framework addon data-plane. State persists in a DurableState blob (NOT
|
|
19589
|
+
* SQLite); history rows survive file deletion for audit.
|
|
19590
|
+
*/
|
|
19591
|
+
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
19592
|
+
var ExportSpeedSchema = number().min(.25).max(32);
|
|
19593
|
+
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
19594
|
+
var ExportTimelapseSchema = object({
|
|
19595
|
+
everyMs: number().int().positive(),
|
|
19596
|
+
outputFps: number().int().min(1).max(60).optional()
|
|
19597
|
+
});
|
|
19598
|
+
/**
|
|
19599
|
+
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
19600
|
+
* is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
|
|
19601
|
+
* silent. `maxLifeMs` bounds how long the finished file is kept;
|
|
19602
|
+
* `deleteAfterDownload` removes it shortly after the first complete download.
|
|
19603
|
+
*/
|
|
19604
|
+
var ExportOptionsSchema = object({
|
|
19605
|
+
speed: ExportSpeedSchema.optional(),
|
|
19606
|
+
timelapse: ExportTimelapseSchema.optional(),
|
|
19607
|
+
includeAudio: boolean(),
|
|
19608
|
+
maxLifeMs: number().int().positive(),
|
|
19609
|
+
deleteAfterDownload: boolean(),
|
|
19610
|
+
title: string().max(200).optional()
|
|
19611
|
+
}).superRefine((v, ctx) => {
|
|
19612
|
+
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
19613
|
+
code: ZodIssueCode.custom,
|
|
19614
|
+
message: "speed and timelapse are mutually exclusive",
|
|
19615
|
+
path: ["timelapse"]
|
|
19616
|
+
});
|
|
19617
|
+
});
|
|
19618
|
+
var ExportStateSchema = _enum([
|
|
19619
|
+
"queued",
|
|
19620
|
+
"rendering",
|
|
19621
|
+
"ready",
|
|
19622
|
+
"failed",
|
|
19623
|
+
"expired",
|
|
19624
|
+
"deleted"
|
|
19625
|
+
]);
|
|
19626
|
+
/** One export job / history row. */
|
|
19627
|
+
var ExportRecordSchema = object({
|
|
19628
|
+
id: string(),
|
|
19629
|
+
deviceId: number(),
|
|
19630
|
+
profile: string(),
|
|
19631
|
+
fromMs: number(),
|
|
19632
|
+
toMs: number(),
|
|
19633
|
+
options: ExportOptionsSchema,
|
|
19634
|
+
state: ExportStateSchema,
|
|
19635
|
+
/** 0–100 while rendering; null otherwise. */
|
|
19636
|
+
progressPct: number().nullable(),
|
|
19637
|
+
/** File size once ready; null before. */
|
|
19638
|
+
fileBytes: number().nullable(),
|
|
19639
|
+
expiresAt: number(),
|
|
19640
|
+
deleteAfterDownload: boolean(),
|
|
19641
|
+
/** Epoch of the first complete download; null until then. */
|
|
19642
|
+
downloadedAt: number().nullable(),
|
|
19643
|
+
createdAt: number(),
|
|
19644
|
+
/** User id/name that requested the export. */
|
|
19645
|
+
createdBy: string(),
|
|
19646
|
+
/** Failure reason when state is 'failed'; null otherwise. */
|
|
19647
|
+
error: string().nullable()
|
|
19648
|
+
});
|
|
19649
|
+
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
19650
|
+
var ExportDownloadSchema = object({
|
|
19651
|
+
url: string(),
|
|
19652
|
+
endpoints: array(string())
|
|
19653
|
+
});
|
|
19654
|
+
method(object({
|
|
19655
|
+
deviceId: number(),
|
|
19656
|
+
profile: string(),
|
|
19657
|
+
fromMs: number(),
|
|
19658
|
+
toMs: number(),
|
|
19659
|
+
options: ExportOptionsSchema
|
|
19660
|
+
}), ExportRecordSchema, {
|
|
19661
|
+
kind: "mutation",
|
|
19662
|
+
auth: "protected"
|
|
19663
|
+
}), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
|
|
19664
|
+
kind: "query",
|
|
19665
|
+
auth: "protected"
|
|
19666
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19667
|
+
kind: "query",
|
|
19668
|
+
auth: "protected"
|
|
19669
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19670
|
+
kind: "mutation",
|
|
19671
|
+
auth: "protected"
|
|
19672
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19673
|
+
kind: "mutation",
|
|
19674
|
+
auth: "protected"
|
|
19675
|
+
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
19676
|
+
kind: "query",
|
|
19677
|
+
auth: "protected"
|
|
19678
|
+
});
|
|
19679
|
+
/**
|
|
19528
19680
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
19529
19681
|
* payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
|
|
19530
19682
|
* `deviceId`.
|
|
@@ -23448,6 +23600,42 @@ Object.freeze({
|
|
|
23448
23600
|
addonId: null,
|
|
23449
23601
|
access: "create"
|
|
23450
23602
|
},
|
|
23603
|
+
"recordingExport.cancelExport": {
|
|
23604
|
+
capName: "recordingExport",
|
|
23605
|
+
capScope: "system",
|
|
23606
|
+
addonId: null,
|
|
23607
|
+
access: "create"
|
|
23608
|
+
},
|
|
23609
|
+
"recordingExport.createExport": {
|
|
23610
|
+
capName: "recordingExport",
|
|
23611
|
+
capScope: "system",
|
|
23612
|
+
addonId: null,
|
|
23613
|
+
access: "create"
|
|
23614
|
+
},
|
|
23615
|
+
"recordingExport.deleteExport": {
|
|
23616
|
+
capName: "recordingExport",
|
|
23617
|
+
capScope: "system",
|
|
23618
|
+
addonId: null,
|
|
23619
|
+
access: "delete"
|
|
23620
|
+
},
|
|
23621
|
+
"recordingExport.getDownloadUrl": {
|
|
23622
|
+
capName: "recordingExport",
|
|
23623
|
+
capScope: "system",
|
|
23624
|
+
addonId: null,
|
|
23625
|
+
access: "view"
|
|
23626
|
+
},
|
|
23627
|
+
"recordingExport.getExport": {
|
|
23628
|
+
capName: "recordingExport",
|
|
23629
|
+
capScope: "system",
|
|
23630
|
+
addonId: null,
|
|
23631
|
+
access: "view"
|
|
23632
|
+
},
|
|
23633
|
+
"recordingExport.listExports": {
|
|
23634
|
+
capName: "recordingExport",
|
|
23635
|
+
capScope: "system",
|
|
23636
|
+
addonId: null,
|
|
23637
|
+
access: "view"
|
|
23638
|
+
},
|
|
23451
23639
|
"sceneMonitor.captureReference": {
|
|
23452
23640
|
capName: "scene-monitor",
|
|
23453
23641
|
capScope: "device",
|