@camstack/addon-advanced-notifier 1.1.27 → 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 +192 -4
- package/dist/addon.mjs +192 -4
- package/package.json +1 -1
package/dist/addon.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",
|
|
@@ -12552,7 +12595,11 @@ array(ZoneRuleSchema).readonly();
|
|
|
12552
12595
|
* Extend the enum here when a new gating consumer comes online (audio
|
|
12553
12596
|
* gating, alert filtering, …) — no other surface needs to change.
|
|
12554
12597
|
*/
|
|
12555
|
-
var ZoneRuleStageEnum = _enum([
|
|
12598
|
+
var ZoneRuleStageEnum = _enum([
|
|
12599
|
+
"motion",
|
|
12600
|
+
"detection",
|
|
12601
|
+
"package"
|
|
12602
|
+
]);
|
|
12556
12603
|
DeviceType.Camera, method(object({
|
|
12557
12604
|
deviceId: number(),
|
|
12558
12605
|
stage: ZoneRuleStageEnum
|
|
@@ -12565,7 +12612,8 @@ DeviceType.Camera, method(object({
|
|
|
12565
12612
|
auth: "admin"
|
|
12566
12613
|
}), object({
|
|
12567
12614
|
motion: array(ZoneRuleSchema).readonly(),
|
|
12568
|
-
detection: array(ZoneRuleSchema).readonly()
|
|
12615
|
+
detection: array(ZoneRuleSchema).readonly(),
|
|
12616
|
+
package: array(ZoneRuleSchema).readonly()
|
|
12569
12617
|
});
|
|
12570
12618
|
var ProviderStatusSchema = object({
|
|
12571
12619
|
connected: boolean(),
|
|
@@ -15774,6 +15822,7 @@ var EventKindIconSchema = _enum([
|
|
|
15774
15822
|
"smoke",
|
|
15775
15823
|
"water",
|
|
15776
15824
|
"button",
|
|
15825
|
+
"package",
|
|
15777
15826
|
"generic"
|
|
15778
15827
|
]);
|
|
15779
15828
|
var EventKindCategorySchema = _enum([
|
|
@@ -15781,7 +15830,8 @@ var EventKindCategorySchema = _enum([
|
|
|
15781
15830
|
"audio",
|
|
15782
15831
|
"detection",
|
|
15783
15832
|
"sensor",
|
|
15784
|
-
"custom"
|
|
15833
|
+
"custom",
|
|
15834
|
+
"package"
|
|
15785
15835
|
]);
|
|
15786
15836
|
var EventKindDescriptorSchema = object({
|
|
15787
15837
|
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
@@ -19427,6 +19477,108 @@ method(object({
|
|
|
19427
19477
|
auth: "admin"
|
|
19428
19478
|
});
|
|
19429
19479
|
/**
|
|
19480
|
+
* `recordingExport` cap — render a footage time range into a single downloadable
|
|
19481
|
+
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
19482
|
+
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
19483
|
+
* delete-after-download.
|
|
19484
|
+
*
|
|
19485
|
+
* Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
|
|
19486
|
+
* recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
|
|
19487
|
+
* default `hub`) registers it. Device-scoped methods carry `deviceId` in their
|
|
19488
|
+
* input and dispatch to that single provider; the render runs on the node that
|
|
19489
|
+
* owns the footage (no cross-node segment transfer). Download rides the
|
|
19490
|
+
* framework addon data-plane. State persists in a DurableState blob (NOT
|
|
19491
|
+
* SQLite); history rows survive file deletion for audit.
|
|
19492
|
+
*/
|
|
19493
|
+
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
19494
|
+
var ExportSpeedSchema = number().min(.25).max(32);
|
|
19495
|
+
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
19496
|
+
var ExportTimelapseSchema = object({
|
|
19497
|
+
everyMs: number().int().positive(),
|
|
19498
|
+
outputFps: number().int().min(1).max(60).optional()
|
|
19499
|
+
});
|
|
19500
|
+
/**
|
|
19501
|
+
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
19502
|
+
* is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
|
|
19503
|
+
* silent. `maxLifeMs` bounds how long the finished file is kept;
|
|
19504
|
+
* `deleteAfterDownload` removes it shortly after the first complete download.
|
|
19505
|
+
*/
|
|
19506
|
+
var ExportOptionsSchema = object({
|
|
19507
|
+
speed: ExportSpeedSchema.optional(),
|
|
19508
|
+
timelapse: ExportTimelapseSchema.optional(),
|
|
19509
|
+
includeAudio: boolean(),
|
|
19510
|
+
maxLifeMs: number().int().positive(),
|
|
19511
|
+
deleteAfterDownload: boolean(),
|
|
19512
|
+
title: string().max(200).optional()
|
|
19513
|
+
}).superRefine((v, ctx) => {
|
|
19514
|
+
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
19515
|
+
code: ZodIssueCode.custom,
|
|
19516
|
+
message: "speed and timelapse are mutually exclusive",
|
|
19517
|
+
path: ["timelapse"]
|
|
19518
|
+
});
|
|
19519
|
+
});
|
|
19520
|
+
var ExportStateSchema = _enum([
|
|
19521
|
+
"queued",
|
|
19522
|
+
"rendering",
|
|
19523
|
+
"ready",
|
|
19524
|
+
"failed",
|
|
19525
|
+
"expired",
|
|
19526
|
+
"deleted"
|
|
19527
|
+
]);
|
|
19528
|
+
/** One export job / history row. */
|
|
19529
|
+
var ExportRecordSchema = object({
|
|
19530
|
+
id: string(),
|
|
19531
|
+
deviceId: number(),
|
|
19532
|
+
profile: string(),
|
|
19533
|
+
fromMs: number(),
|
|
19534
|
+
toMs: number(),
|
|
19535
|
+
options: ExportOptionsSchema,
|
|
19536
|
+
state: ExportStateSchema,
|
|
19537
|
+
/** 0–100 while rendering; null otherwise. */
|
|
19538
|
+
progressPct: number().nullable(),
|
|
19539
|
+
/** File size once ready; null before. */
|
|
19540
|
+
fileBytes: number().nullable(),
|
|
19541
|
+
expiresAt: number(),
|
|
19542
|
+
deleteAfterDownload: boolean(),
|
|
19543
|
+
/** Epoch of the first complete download; null until then. */
|
|
19544
|
+
downloadedAt: number().nullable(),
|
|
19545
|
+
createdAt: number(),
|
|
19546
|
+
/** User id/name that requested the export. */
|
|
19547
|
+
createdBy: string(),
|
|
19548
|
+
/** Failure reason when state is 'failed'; null otherwise. */
|
|
19549
|
+
error: string().nullable()
|
|
19550
|
+
});
|
|
19551
|
+
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
19552
|
+
var ExportDownloadSchema = object({
|
|
19553
|
+
url: string(),
|
|
19554
|
+
endpoints: array(string())
|
|
19555
|
+
});
|
|
19556
|
+
method(object({
|
|
19557
|
+
deviceId: number(),
|
|
19558
|
+
profile: string(),
|
|
19559
|
+
fromMs: number(),
|
|
19560
|
+
toMs: number(),
|
|
19561
|
+
options: ExportOptionsSchema
|
|
19562
|
+
}), ExportRecordSchema, {
|
|
19563
|
+
kind: "mutation",
|
|
19564
|
+
auth: "protected"
|
|
19565
|
+
}), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
|
|
19566
|
+
kind: "query",
|
|
19567
|
+
auth: "protected"
|
|
19568
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19569
|
+
kind: "query",
|
|
19570
|
+
auth: "protected"
|
|
19571
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19572
|
+
kind: "mutation",
|
|
19573
|
+
auth: "protected"
|
|
19574
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19575
|
+
kind: "mutation",
|
|
19576
|
+
auth: "protected"
|
|
19577
|
+
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
19578
|
+
kind: "query",
|
|
19579
|
+
auth: "protected"
|
|
19580
|
+
});
|
|
19581
|
+
/**
|
|
19430
19582
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
19431
19583
|
* payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
|
|
19432
19584
|
* `deviceId`.
|
|
@@ -23350,6 +23502,42 @@ Object.freeze({
|
|
|
23350
23502
|
addonId: null,
|
|
23351
23503
|
access: "create"
|
|
23352
23504
|
},
|
|
23505
|
+
"recordingExport.cancelExport": {
|
|
23506
|
+
capName: "recordingExport",
|
|
23507
|
+
capScope: "system",
|
|
23508
|
+
addonId: null,
|
|
23509
|
+
access: "create"
|
|
23510
|
+
},
|
|
23511
|
+
"recordingExport.createExport": {
|
|
23512
|
+
capName: "recordingExport",
|
|
23513
|
+
capScope: "system",
|
|
23514
|
+
addonId: null,
|
|
23515
|
+
access: "create"
|
|
23516
|
+
},
|
|
23517
|
+
"recordingExport.deleteExport": {
|
|
23518
|
+
capName: "recordingExport",
|
|
23519
|
+
capScope: "system",
|
|
23520
|
+
addonId: null,
|
|
23521
|
+
access: "delete"
|
|
23522
|
+
},
|
|
23523
|
+
"recordingExport.getDownloadUrl": {
|
|
23524
|
+
capName: "recordingExport",
|
|
23525
|
+
capScope: "system",
|
|
23526
|
+
addonId: null,
|
|
23527
|
+
access: "view"
|
|
23528
|
+
},
|
|
23529
|
+
"recordingExport.getExport": {
|
|
23530
|
+
capName: "recordingExport",
|
|
23531
|
+
capScope: "system",
|
|
23532
|
+
addonId: null,
|
|
23533
|
+
access: "view"
|
|
23534
|
+
},
|
|
23535
|
+
"recordingExport.listExports": {
|
|
23536
|
+
capName: "recordingExport",
|
|
23537
|
+
capScope: "system",
|
|
23538
|
+
addonId: null,
|
|
23539
|
+
access: "view"
|
|
23540
|
+
},
|
|
23353
23541
|
"sceneMonitor.captureReference": {
|
|
23354
23542
|
capName: "scene-monitor",
|
|
23355
23543
|
capScope: "device",
|
package/dist/addon.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",
|
|
@@ -12548,7 +12591,11 @@ array(ZoneRuleSchema).readonly();
|
|
|
12548
12591
|
* Extend the enum here when a new gating consumer comes online (audio
|
|
12549
12592
|
* gating, alert filtering, …) — no other surface needs to change.
|
|
12550
12593
|
*/
|
|
12551
|
-
var ZoneRuleStageEnum = _enum([
|
|
12594
|
+
var ZoneRuleStageEnum = _enum([
|
|
12595
|
+
"motion",
|
|
12596
|
+
"detection",
|
|
12597
|
+
"package"
|
|
12598
|
+
]);
|
|
12552
12599
|
DeviceType.Camera, method(object({
|
|
12553
12600
|
deviceId: number(),
|
|
12554
12601
|
stage: ZoneRuleStageEnum
|
|
@@ -12561,7 +12608,8 @@ DeviceType.Camera, method(object({
|
|
|
12561
12608
|
auth: "admin"
|
|
12562
12609
|
}), object({
|
|
12563
12610
|
motion: array(ZoneRuleSchema).readonly(),
|
|
12564
|
-
detection: array(ZoneRuleSchema).readonly()
|
|
12611
|
+
detection: array(ZoneRuleSchema).readonly(),
|
|
12612
|
+
package: array(ZoneRuleSchema).readonly()
|
|
12565
12613
|
});
|
|
12566
12614
|
var ProviderStatusSchema = object({
|
|
12567
12615
|
connected: boolean(),
|
|
@@ -15770,6 +15818,7 @@ var EventKindIconSchema = _enum([
|
|
|
15770
15818
|
"smoke",
|
|
15771
15819
|
"water",
|
|
15772
15820
|
"button",
|
|
15821
|
+
"package",
|
|
15773
15822
|
"generic"
|
|
15774
15823
|
]);
|
|
15775
15824
|
var EventKindCategorySchema = _enum([
|
|
@@ -15777,7 +15826,8 @@ var EventKindCategorySchema = _enum([
|
|
|
15777
15826
|
"audio",
|
|
15778
15827
|
"detection",
|
|
15779
15828
|
"sensor",
|
|
15780
|
-
"custom"
|
|
15829
|
+
"custom",
|
|
15830
|
+
"package"
|
|
15781
15831
|
]);
|
|
15782
15832
|
var EventKindDescriptorSchema = object({
|
|
15783
15833
|
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
@@ -19423,6 +19473,108 @@ method(object({
|
|
|
19423
19473
|
auth: "admin"
|
|
19424
19474
|
});
|
|
19425
19475
|
/**
|
|
19476
|
+
* `recordingExport` cap — render a footage time range into a single downloadable
|
|
19477
|
+
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
19478
|
+
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
19479
|
+
* delete-after-download.
|
|
19480
|
+
*
|
|
19481
|
+
* Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
|
|
19482
|
+
* recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
|
|
19483
|
+
* default `hub`) registers it. Device-scoped methods carry `deviceId` in their
|
|
19484
|
+
* input and dispatch to that single provider; the render runs on the node that
|
|
19485
|
+
* owns the footage (no cross-node segment transfer). Download rides the
|
|
19486
|
+
* framework addon data-plane. State persists in a DurableState blob (NOT
|
|
19487
|
+
* SQLite); history rows survive file deletion for audit.
|
|
19488
|
+
*/
|
|
19489
|
+
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
19490
|
+
var ExportSpeedSchema = number().min(.25).max(32);
|
|
19491
|
+
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
19492
|
+
var ExportTimelapseSchema = object({
|
|
19493
|
+
everyMs: number().int().positive(),
|
|
19494
|
+
outputFps: number().int().min(1).max(60).optional()
|
|
19495
|
+
});
|
|
19496
|
+
/**
|
|
19497
|
+
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
19498
|
+
* is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
|
|
19499
|
+
* silent. `maxLifeMs` bounds how long the finished file is kept;
|
|
19500
|
+
* `deleteAfterDownload` removes it shortly after the first complete download.
|
|
19501
|
+
*/
|
|
19502
|
+
var ExportOptionsSchema = object({
|
|
19503
|
+
speed: ExportSpeedSchema.optional(),
|
|
19504
|
+
timelapse: ExportTimelapseSchema.optional(),
|
|
19505
|
+
includeAudio: boolean(),
|
|
19506
|
+
maxLifeMs: number().int().positive(),
|
|
19507
|
+
deleteAfterDownload: boolean(),
|
|
19508
|
+
title: string().max(200).optional()
|
|
19509
|
+
}).superRefine((v, ctx) => {
|
|
19510
|
+
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
19511
|
+
code: ZodIssueCode.custom,
|
|
19512
|
+
message: "speed and timelapse are mutually exclusive",
|
|
19513
|
+
path: ["timelapse"]
|
|
19514
|
+
});
|
|
19515
|
+
});
|
|
19516
|
+
var ExportStateSchema = _enum([
|
|
19517
|
+
"queued",
|
|
19518
|
+
"rendering",
|
|
19519
|
+
"ready",
|
|
19520
|
+
"failed",
|
|
19521
|
+
"expired",
|
|
19522
|
+
"deleted"
|
|
19523
|
+
]);
|
|
19524
|
+
/** One export job / history row. */
|
|
19525
|
+
var ExportRecordSchema = object({
|
|
19526
|
+
id: string(),
|
|
19527
|
+
deviceId: number(),
|
|
19528
|
+
profile: string(),
|
|
19529
|
+
fromMs: number(),
|
|
19530
|
+
toMs: number(),
|
|
19531
|
+
options: ExportOptionsSchema,
|
|
19532
|
+
state: ExportStateSchema,
|
|
19533
|
+
/** 0–100 while rendering; null otherwise. */
|
|
19534
|
+
progressPct: number().nullable(),
|
|
19535
|
+
/** File size once ready; null before. */
|
|
19536
|
+
fileBytes: number().nullable(),
|
|
19537
|
+
expiresAt: number(),
|
|
19538
|
+
deleteAfterDownload: boolean(),
|
|
19539
|
+
/** Epoch of the first complete download; null until then. */
|
|
19540
|
+
downloadedAt: number().nullable(),
|
|
19541
|
+
createdAt: number(),
|
|
19542
|
+
/** User id/name that requested the export. */
|
|
19543
|
+
createdBy: string(),
|
|
19544
|
+
/** Failure reason when state is 'failed'; null otherwise. */
|
|
19545
|
+
error: string().nullable()
|
|
19546
|
+
});
|
|
19547
|
+
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
19548
|
+
var ExportDownloadSchema = object({
|
|
19549
|
+
url: string(),
|
|
19550
|
+
endpoints: array(string())
|
|
19551
|
+
});
|
|
19552
|
+
method(object({
|
|
19553
|
+
deviceId: number(),
|
|
19554
|
+
profile: string(),
|
|
19555
|
+
fromMs: number(),
|
|
19556
|
+
toMs: number(),
|
|
19557
|
+
options: ExportOptionsSchema
|
|
19558
|
+
}), ExportRecordSchema, {
|
|
19559
|
+
kind: "mutation",
|
|
19560
|
+
auth: "protected"
|
|
19561
|
+
}), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
|
|
19562
|
+
kind: "query",
|
|
19563
|
+
auth: "protected"
|
|
19564
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19565
|
+
kind: "query",
|
|
19566
|
+
auth: "protected"
|
|
19567
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19568
|
+
kind: "mutation",
|
|
19569
|
+
auth: "protected"
|
|
19570
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19571
|
+
kind: "mutation",
|
|
19572
|
+
auth: "protected"
|
|
19573
|
+
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
19574
|
+
kind: "query",
|
|
19575
|
+
auth: "protected"
|
|
19576
|
+
});
|
|
19577
|
+
/**
|
|
19426
19578
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
19427
19579
|
* payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
|
|
19428
19580
|
* `deviceId`.
|
|
@@ -23346,6 +23498,42 @@ Object.freeze({
|
|
|
23346
23498
|
addonId: null,
|
|
23347
23499
|
access: "create"
|
|
23348
23500
|
},
|
|
23501
|
+
"recordingExport.cancelExport": {
|
|
23502
|
+
capName: "recordingExport",
|
|
23503
|
+
capScope: "system",
|
|
23504
|
+
addonId: null,
|
|
23505
|
+
access: "create"
|
|
23506
|
+
},
|
|
23507
|
+
"recordingExport.createExport": {
|
|
23508
|
+
capName: "recordingExport",
|
|
23509
|
+
capScope: "system",
|
|
23510
|
+
addonId: null,
|
|
23511
|
+
access: "create"
|
|
23512
|
+
},
|
|
23513
|
+
"recordingExport.deleteExport": {
|
|
23514
|
+
capName: "recordingExport",
|
|
23515
|
+
capScope: "system",
|
|
23516
|
+
addonId: null,
|
|
23517
|
+
access: "delete"
|
|
23518
|
+
},
|
|
23519
|
+
"recordingExport.getDownloadUrl": {
|
|
23520
|
+
capName: "recordingExport",
|
|
23521
|
+
capScope: "system",
|
|
23522
|
+
addonId: null,
|
|
23523
|
+
access: "view"
|
|
23524
|
+
},
|
|
23525
|
+
"recordingExport.getExport": {
|
|
23526
|
+
capName: "recordingExport",
|
|
23527
|
+
capScope: "system",
|
|
23528
|
+
addonId: null,
|
|
23529
|
+
access: "view"
|
|
23530
|
+
},
|
|
23531
|
+
"recordingExport.listExports": {
|
|
23532
|
+
capName: "recordingExport",
|
|
23533
|
+
capScope: "system",
|
|
23534
|
+
addonId: null,
|
|
23535
|
+
access: "view"
|
|
23536
|
+
},
|
|
23349
23537
|
"sceneMonitor.captureReference": {
|
|
23350
23538
|
capName: "scene-monitor",
|
|
23351
23539
|
capScope: "device",
|