@camstack/addon-export-alexa 1.1.24 → 1.1.25
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/export-alexa.addon.js +192 -4
- package/dist/export-alexa.addon.mjs +192 -4
- package/package.json +1 -1
|
@@ -26,7 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
//#endregion
|
|
27
27
|
let node_crypto = require("node:crypto");
|
|
28
28
|
node_crypto = __toESM(node_crypto);
|
|
29
|
-
//#region ../types/dist/event-category-
|
|
29
|
+
//#region ../types/dist/event-category-D4HJq7Mw.mjs
|
|
30
30
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
31
31
|
EventCategory["SystemBoot"] = "system.boot";
|
|
32
32
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -179,6 +179,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
179
179
|
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
180
180
|
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
181
181
|
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
182
|
+
/** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
|
|
183
|
+
* progress bar the client reconciles via `recordingExport.getExport`. */
|
|
184
|
+
EventCategory["RecordingExportProgress"] = "recording.export.progress";
|
|
185
|
+
EventCategory["RecordingExportCompleted"] = "recording.export.completed";
|
|
186
|
+
EventCategory["RecordingExportFailed"] = "recording.export.failed";
|
|
182
187
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
183
188
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
184
189
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -468,6 +473,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
468
473
|
*/
|
|
469
474
|
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
470
475
|
/**
|
|
476
|
+
* Fired by `addon-post-analysis` when a package-drop is confirmed inside
|
|
477
|
+
* a package zone — a newly-appeared stationary object of a package class
|
|
478
|
+
* that cleared the class / zone / dwell / size gates. Payload:
|
|
479
|
+
* `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
|
|
480
|
+
* entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
|
|
481
|
+
* Telemetry (D8): the durable record is the `package-events` store row;
|
|
482
|
+
* this bus topic drives notifier rules + live UI. See
|
|
483
|
+
* docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
|
|
484
|
+
*/
|
|
485
|
+
EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
|
|
486
|
+
/**
|
|
487
|
+
* Fired by `addon-post-analysis` when a previously-delivered package
|
|
488
|
+
* leaves its zone (the stationary entry departed — moved or swept).
|
|
489
|
+
* Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
|
|
490
|
+
* `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
|
|
491
|
+
* Telemetry (D8). See package-zones-design §5.2.
|
|
492
|
+
*/
|
|
493
|
+
EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
|
|
494
|
+
/**
|
|
471
495
|
* Fired by `addon-post-analysis` whenever a gallery face row changes:
|
|
472
496
|
* `kind:'buffered'` a new detected face was persisted, `'assigned'` /
|
|
473
497
|
* `'unassigned'` its identity link changed, `'deleted'` the row was
|
|
@@ -5206,6 +5230,25 @@ function _instanceof(cls, params = {}) {
|
|
|
5206
5230
|
};
|
|
5207
5231
|
return inst;
|
|
5208
5232
|
}
|
|
5233
|
+
//#endregion
|
|
5234
|
+
//#region ../../node_modules/zod/v4/classic/compat.js
|
|
5235
|
+
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
|
5236
|
+
var ZodIssueCode = {
|
|
5237
|
+
invalid_type: "invalid_type",
|
|
5238
|
+
too_big: "too_big",
|
|
5239
|
+
too_small: "too_small",
|
|
5240
|
+
invalid_format: "invalid_format",
|
|
5241
|
+
not_multiple_of: "not_multiple_of",
|
|
5242
|
+
unrecognized_keys: "unrecognized_keys",
|
|
5243
|
+
invalid_union: "invalid_union",
|
|
5244
|
+
invalid_key: "invalid_key",
|
|
5245
|
+
invalid_element: "invalid_element",
|
|
5246
|
+
invalid_value: "invalid_value",
|
|
5247
|
+
custom: "custom"
|
|
5248
|
+
};
|
|
5249
|
+
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
|
|
5250
|
+
var ZodFirstPartyTypeKind;
|
|
5251
|
+
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5209
5252
|
Object.fromEntries([
|
|
5210
5253
|
{
|
|
5211
5254
|
id: "overview",
|
|
@@ -12755,7 +12798,11 @@ array(ZoneRuleSchema).readonly();
|
|
|
12755
12798
|
* Extend the enum here when a new gating consumer comes online (audio
|
|
12756
12799
|
* gating, alert filtering, …) — no other surface needs to change.
|
|
12757
12800
|
*/
|
|
12758
|
-
var ZoneRuleStageEnum = _enum([
|
|
12801
|
+
var ZoneRuleStageEnum = _enum([
|
|
12802
|
+
"motion",
|
|
12803
|
+
"detection",
|
|
12804
|
+
"package"
|
|
12805
|
+
]);
|
|
12759
12806
|
DeviceType.Camera, method(object({
|
|
12760
12807
|
deviceId: number(),
|
|
12761
12808
|
stage: ZoneRuleStageEnum
|
|
@@ -12768,7 +12815,8 @@ DeviceType.Camera, method(object({
|
|
|
12768
12815
|
auth: "admin"
|
|
12769
12816
|
}), object({
|
|
12770
12817
|
motion: array(ZoneRuleSchema).readonly(),
|
|
12771
|
-
detection: array(ZoneRuleSchema).readonly()
|
|
12818
|
+
detection: array(ZoneRuleSchema).readonly(),
|
|
12819
|
+
package: array(ZoneRuleSchema).readonly()
|
|
12772
12820
|
});
|
|
12773
12821
|
var ProviderStatusSchema = object({
|
|
12774
12822
|
connected: boolean(),
|
|
@@ -16022,6 +16070,7 @@ var EventKindIconSchema = _enum([
|
|
|
16022
16070
|
"smoke",
|
|
16023
16071
|
"water",
|
|
16024
16072
|
"button",
|
|
16073
|
+
"package",
|
|
16025
16074
|
"generic"
|
|
16026
16075
|
]);
|
|
16027
16076
|
var EventKindCategorySchema = _enum([
|
|
@@ -16029,7 +16078,8 @@ var EventKindCategorySchema = _enum([
|
|
|
16029
16078
|
"audio",
|
|
16030
16079
|
"detection",
|
|
16031
16080
|
"sensor",
|
|
16032
|
-
"custom"
|
|
16081
|
+
"custom",
|
|
16082
|
+
"package"
|
|
16033
16083
|
]);
|
|
16034
16084
|
var EventKindDescriptorSchema = object({
|
|
16035
16085
|
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
@@ -19675,6 +19725,108 @@ method(object({
|
|
|
19675
19725
|
auth: "admin"
|
|
19676
19726
|
});
|
|
19677
19727
|
/**
|
|
19728
|
+
* `recordingExport` cap — render a footage time range into a single downloadable
|
|
19729
|
+
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
19730
|
+
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
19731
|
+
* delete-after-download.
|
|
19732
|
+
*
|
|
19733
|
+
* Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
|
|
19734
|
+
* recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
|
|
19735
|
+
* default `hub`) registers it. Device-scoped methods carry `deviceId` in their
|
|
19736
|
+
* input and dispatch to that single provider; the render runs on the node that
|
|
19737
|
+
* owns the footage (no cross-node segment transfer). Download rides the
|
|
19738
|
+
* framework addon data-plane. State persists in a DurableState blob (NOT
|
|
19739
|
+
* SQLite); history rows survive file deletion for audit.
|
|
19740
|
+
*/
|
|
19741
|
+
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
19742
|
+
var ExportSpeedSchema = number().min(.25).max(32);
|
|
19743
|
+
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
19744
|
+
var ExportTimelapseSchema = object({
|
|
19745
|
+
everyMs: number().int().positive(),
|
|
19746
|
+
outputFps: number().int().min(1).max(60).optional()
|
|
19747
|
+
});
|
|
19748
|
+
/**
|
|
19749
|
+
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
19750
|
+
* is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
|
|
19751
|
+
* silent. `maxLifeMs` bounds how long the finished file is kept;
|
|
19752
|
+
* `deleteAfterDownload` removes it shortly after the first complete download.
|
|
19753
|
+
*/
|
|
19754
|
+
var ExportOptionsSchema = object({
|
|
19755
|
+
speed: ExportSpeedSchema.optional(),
|
|
19756
|
+
timelapse: ExportTimelapseSchema.optional(),
|
|
19757
|
+
includeAudio: boolean(),
|
|
19758
|
+
maxLifeMs: number().int().positive(),
|
|
19759
|
+
deleteAfterDownload: boolean(),
|
|
19760
|
+
title: string().max(200).optional()
|
|
19761
|
+
}).superRefine((v, ctx) => {
|
|
19762
|
+
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
19763
|
+
code: ZodIssueCode.custom,
|
|
19764
|
+
message: "speed and timelapse are mutually exclusive",
|
|
19765
|
+
path: ["timelapse"]
|
|
19766
|
+
});
|
|
19767
|
+
});
|
|
19768
|
+
var ExportStateSchema = _enum([
|
|
19769
|
+
"queued",
|
|
19770
|
+
"rendering",
|
|
19771
|
+
"ready",
|
|
19772
|
+
"failed",
|
|
19773
|
+
"expired",
|
|
19774
|
+
"deleted"
|
|
19775
|
+
]);
|
|
19776
|
+
/** One export job / history row. */
|
|
19777
|
+
var ExportRecordSchema = object({
|
|
19778
|
+
id: string(),
|
|
19779
|
+
deviceId: number(),
|
|
19780
|
+
profile: string(),
|
|
19781
|
+
fromMs: number(),
|
|
19782
|
+
toMs: number(),
|
|
19783
|
+
options: ExportOptionsSchema,
|
|
19784
|
+
state: ExportStateSchema,
|
|
19785
|
+
/** 0–100 while rendering; null otherwise. */
|
|
19786
|
+
progressPct: number().nullable(),
|
|
19787
|
+
/** File size once ready; null before. */
|
|
19788
|
+
fileBytes: number().nullable(),
|
|
19789
|
+
expiresAt: number(),
|
|
19790
|
+
deleteAfterDownload: boolean(),
|
|
19791
|
+
/** Epoch of the first complete download; null until then. */
|
|
19792
|
+
downloadedAt: number().nullable(),
|
|
19793
|
+
createdAt: number(),
|
|
19794
|
+
/** User id/name that requested the export. */
|
|
19795
|
+
createdBy: string(),
|
|
19796
|
+
/** Failure reason when state is 'failed'; null otherwise. */
|
|
19797
|
+
error: string().nullable()
|
|
19798
|
+
});
|
|
19799
|
+
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
19800
|
+
var ExportDownloadSchema = object({
|
|
19801
|
+
url: string(),
|
|
19802
|
+
endpoints: array(string())
|
|
19803
|
+
});
|
|
19804
|
+
method(object({
|
|
19805
|
+
deviceId: number(),
|
|
19806
|
+
profile: string(),
|
|
19807
|
+
fromMs: number(),
|
|
19808
|
+
toMs: number(),
|
|
19809
|
+
options: ExportOptionsSchema
|
|
19810
|
+
}), ExportRecordSchema, {
|
|
19811
|
+
kind: "mutation",
|
|
19812
|
+
auth: "protected"
|
|
19813
|
+
}), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
|
|
19814
|
+
kind: "query",
|
|
19815
|
+
auth: "protected"
|
|
19816
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19817
|
+
kind: "query",
|
|
19818
|
+
auth: "protected"
|
|
19819
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19820
|
+
kind: "mutation",
|
|
19821
|
+
auth: "protected"
|
|
19822
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19823
|
+
kind: "mutation",
|
|
19824
|
+
auth: "protected"
|
|
19825
|
+
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
19826
|
+
kind: "query",
|
|
19827
|
+
auth: "protected"
|
|
19828
|
+
});
|
|
19829
|
+
/**
|
|
19678
19830
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
19679
19831
|
* payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
|
|
19680
19832
|
* `deviceId`.
|
|
@@ -23598,6 +23750,42 @@ Object.freeze({
|
|
|
23598
23750
|
addonId: null,
|
|
23599
23751
|
access: "create"
|
|
23600
23752
|
},
|
|
23753
|
+
"recordingExport.cancelExport": {
|
|
23754
|
+
capName: "recordingExport",
|
|
23755
|
+
capScope: "system",
|
|
23756
|
+
addonId: null,
|
|
23757
|
+
access: "create"
|
|
23758
|
+
},
|
|
23759
|
+
"recordingExport.createExport": {
|
|
23760
|
+
capName: "recordingExport",
|
|
23761
|
+
capScope: "system",
|
|
23762
|
+
addonId: null,
|
|
23763
|
+
access: "create"
|
|
23764
|
+
},
|
|
23765
|
+
"recordingExport.deleteExport": {
|
|
23766
|
+
capName: "recordingExport",
|
|
23767
|
+
capScope: "system",
|
|
23768
|
+
addonId: null,
|
|
23769
|
+
access: "delete"
|
|
23770
|
+
},
|
|
23771
|
+
"recordingExport.getDownloadUrl": {
|
|
23772
|
+
capName: "recordingExport",
|
|
23773
|
+
capScope: "system",
|
|
23774
|
+
addonId: null,
|
|
23775
|
+
access: "view"
|
|
23776
|
+
},
|
|
23777
|
+
"recordingExport.getExport": {
|
|
23778
|
+
capName: "recordingExport",
|
|
23779
|
+
capScope: "system",
|
|
23780
|
+
addonId: null,
|
|
23781
|
+
access: "view"
|
|
23782
|
+
},
|
|
23783
|
+
"recordingExport.listExports": {
|
|
23784
|
+
capName: "recordingExport",
|
|
23785
|
+
capScope: "system",
|
|
23786
|
+
addonId: null,
|
|
23787
|
+
access: "view"
|
|
23788
|
+
},
|
|
23601
23789
|
"sceneMonitor.captureReference": {
|
|
23602
23790
|
capName: "scene-monitor",
|
|
23603
23791
|
capScope: "device",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as crypto$1 from "node:crypto";
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
|
-
//#region ../types/dist/event-category-
|
|
3
|
+
//#region ../types/dist/event-category-D4HJq7Mw.mjs
|
|
4
4
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
5
5
|
EventCategory["SystemBoot"] = "system.boot";
|
|
6
6
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -153,6 +153,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
153
153
|
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
154
154
|
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
155
155
|
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
156
|
+
/** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
|
|
157
|
+
* progress bar the client reconciles via `recordingExport.getExport`. */
|
|
158
|
+
EventCategory["RecordingExportProgress"] = "recording.export.progress";
|
|
159
|
+
EventCategory["RecordingExportCompleted"] = "recording.export.completed";
|
|
160
|
+
EventCategory["RecordingExportFailed"] = "recording.export.failed";
|
|
156
161
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
157
162
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
158
163
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -442,6 +447,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
442
447
|
*/
|
|
443
448
|
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
444
449
|
/**
|
|
450
|
+
* Fired by `addon-post-analysis` when a package-drop is confirmed inside
|
|
451
|
+
* a package zone — a newly-appeared stationary object of a package class
|
|
452
|
+
* that cleared the class / zone / dwell / size gates. Payload:
|
|
453
|
+
* `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
|
|
454
|
+
* entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
|
|
455
|
+
* Telemetry (D8): the durable record is the `package-events` store row;
|
|
456
|
+
* this bus topic drives notifier rules + live UI. See
|
|
457
|
+
* docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
|
|
458
|
+
*/
|
|
459
|
+
EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
|
|
460
|
+
/**
|
|
461
|
+
* Fired by `addon-post-analysis` when a previously-delivered package
|
|
462
|
+
* leaves its zone (the stationary entry departed — moved or swept).
|
|
463
|
+
* Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
|
|
464
|
+
* `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
|
|
465
|
+
* Telemetry (D8). See package-zones-design §5.2.
|
|
466
|
+
*/
|
|
467
|
+
EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
|
|
468
|
+
/**
|
|
445
469
|
* Fired by `addon-post-analysis` whenever a gallery face row changes:
|
|
446
470
|
* `kind:'buffered'` a new detected face was persisted, `'assigned'` /
|
|
447
471
|
* `'unassigned'` its identity link changed, `'deleted'` the row was
|
|
@@ -5180,6 +5204,25 @@ function _instanceof(cls, params = {}) {
|
|
|
5180
5204
|
};
|
|
5181
5205
|
return inst;
|
|
5182
5206
|
}
|
|
5207
|
+
//#endregion
|
|
5208
|
+
//#region ../../node_modules/zod/v4/classic/compat.js
|
|
5209
|
+
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
|
5210
|
+
var ZodIssueCode = {
|
|
5211
|
+
invalid_type: "invalid_type",
|
|
5212
|
+
too_big: "too_big",
|
|
5213
|
+
too_small: "too_small",
|
|
5214
|
+
invalid_format: "invalid_format",
|
|
5215
|
+
not_multiple_of: "not_multiple_of",
|
|
5216
|
+
unrecognized_keys: "unrecognized_keys",
|
|
5217
|
+
invalid_union: "invalid_union",
|
|
5218
|
+
invalid_key: "invalid_key",
|
|
5219
|
+
invalid_element: "invalid_element",
|
|
5220
|
+
invalid_value: "invalid_value",
|
|
5221
|
+
custom: "custom"
|
|
5222
|
+
};
|
|
5223
|
+
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
|
|
5224
|
+
var ZodFirstPartyTypeKind;
|
|
5225
|
+
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5183
5226
|
Object.fromEntries([
|
|
5184
5227
|
{
|
|
5185
5228
|
id: "overview",
|
|
@@ -12729,7 +12772,11 @@ array(ZoneRuleSchema).readonly();
|
|
|
12729
12772
|
* Extend the enum here when a new gating consumer comes online (audio
|
|
12730
12773
|
* gating, alert filtering, …) — no other surface needs to change.
|
|
12731
12774
|
*/
|
|
12732
|
-
var ZoneRuleStageEnum = _enum([
|
|
12775
|
+
var ZoneRuleStageEnum = _enum([
|
|
12776
|
+
"motion",
|
|
12777
|
+
"detection",
|
|
12778
|
+
"package"
|
|
12779
|
+
]);
|
|
12733
12780
|
DeviceType.Camera, method(object({
|
|
12734
12781
|
deviceId: number(),
|
|
12735
12782
|
stage: ZoneRuleStageEnum
|
|
@@ -12742,7 +12789,8 @@ DeviceType.Camera, method(object({
|
|
|
12742
12789
|
auth: "admin"
|
|
12743
12790
|
}), object({
|
|
12744
12791
|
motion: array(ZoneRuleSchema).readonly(),
|
|
12745
|
-
detection: array(ZoneRuleSchema).readonly()
|
|
12792
|
+
detection: array(ZoneRuleSchema).readonly(),
|
|
12793
|
+
package: array(ZoneRuleSchema).readonly()
|
|
12746
12794
|
});
|
|
12747
12795
|
var ProviderStatusSchema = object({
|
|
12748
12796
|
connected: boolean(),
|
|
@@ -15996,6 +16044,7 @@ var EventKindIconSchema = _enum([
|
|
|
15996
16044
|
"smoke",
|
|
15997
16045
|
"water",
|
|
15998
16046
|
"button",
|
|
16047
|
+
"package",
|
|
15999
16048
|
"generic"
|
|
16000
16049
|
]);
|
|
16001
16050
|
var EventKindCategorySchema = _enum([
|
|
@@ -16003,7 +16052,8 @@ var EventKindCategorySchema = _enum([
|
|
|
16003
16052
|
"audio",
|
|
16004
16053
|
"detection",
|
|
16005
16054
|
"sensor",
|
|
16006
|
-
"custom"
|
|
16055
|
+
"custom",
|
|
16056
|
+
"package"
|
|
16007
16057
|
]);
|
|
16008
16058
|
var EventKindDescriptorSchema = object({
|
|
16009
16059
|
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
@@ -19649,6 +19699,108 @@ method(object({
|
|
|
19649
19699
|
auth: "admin"
|
|
19650
19700
|
});
|
|
19651
19701
|
/**
|
|
19702
|
+
* `recordingExport` cap — render a footage time range into a single downloadable
|
|
19703
|
+
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
19704
|
+
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
19705
|
+
* delete-after-download.
|
|
19706
|
+
*
|
|
19707
|
+
* Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
|
|
19708
|
+
* recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
|
|
19709
|
+
* default `hub`) registers it. Device-scoped methods carry `deviceId` in their
|
|
19710
|
+
* input and dispatch to that single provider; the render runs on the node that
|
|
19711
|
+
* owns the footage (no cross-node segment transfer). Download rides the
|
|
19712
|
+
* framework addon data-plane. State persists in a DurableState blob (NOT
|
|
19713
|
+
* SQLite); history rows survive file deletion for audit.
|
|
19714
|
+
*/
|
|
19715
|
+
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
19716
|
+
var ExportSpeedSchema = number().min(.25).max(32);
|
|
19717
|
+
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
19718
|
+
var ExportTimelapseSchema = object({
|
|
19719
|
+
everyMs: number().int().positive(),
|
|
19720
|
+
outputFps: number().int().min(1).max(60).optional()
|
|
19721
|
+
});
|
|
19722
|
+
/**
|
|
19723
|
+
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
19724
|
+
* is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
|
|
19725
|
+
* silent. `maxLifeMs` bounds how long the finished file is kept;
|
|
19726
|
+
* `deleteAfterDownload` removes it shortly after the first complete download.
|
|
19727
|
+
*/
|
|
19728
|
+
var ExportOptionsSchema = object({
|
|
19729
|
+
speed: ExportSpeedSchema.optional(),
|
|
19730
|
+
timelapse: ExportTimelapseSchema.optional(),
|
|
19731
|
+
includeAudio: boolean(),
|
|
19732
|
+
maxLifeMs: number().int().positive(),
|
|
19733
|
+
deleteAfterDownload: boolean(),
|
|
19734
|
+
title: string().max(200).optional()
|
|
19735
|
+
}).superRefine((v, ctx) => {
|
|
19736
|
+
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
19737
|
+
code: ZodIssueCode.custom,
|
|
19738
|
+
message: "speed and timelapse are mutually exclusive",
|
|
19739
|
+
path: ["timelapse"]
|
|
19740
|
+
});
|
|
19741
|
+
});
|
|
19742
|
+
var ExportStateSchema = _enum([
|
|
19743
|
+
"queued",
|
|
19744
|
+
"rendering",
|
|
19745
|
+
"ready",
|
|
19746
|
+
"failed",
|
|
19747
|
+
"expired",
|
|
19748
|
+
"deleted"
|
|
19749
|
+
]);
|
|
19750
|
+
/** One export job / history row. */
|
|
19751
|
+
var ExportRecordSchema = object({
|
|
19752
|
+
id: string(),
|
|
19753
|
+
deviceId: number(),
|
|
19754
|
+
profile: string(),
|
|
19755
|
+
fromMs: number(),
|
|
19756
|
+
toMs: number(),
|
|
19757
|
+
options: ExportOptionsSchema,
|
|
19758
|
+
state: ExportStateSchema,
|
|
19759
|
+
/** 0–100 while rendering; null otherwise. */
|
|
19760
|
+
progressPct: number().nullable(),
|
|
19761
|
+
/** File size once ready; null before. */
|
|
19762
|
+
fileBytes: number().nullable(),
|
|
19763
|
+
expiresAt: number(),
|
|
19764
|
+
deleteAfterDownload: boolean(),
|
|
19765
|
+
/** Epoch of the first complete download; null until then. */
|
|
19766
|
+
downloadedAt: number().nullable(),
|
|
19767
|
+
createdAt: number(),
|
|
19768
|
+
/** User id/name that requested the export. */
|
|
19769
|
+
createdBy: string(),
|
|
19770
|
+
/** Failure reason when state is 'failed'; null otherwise. */
|
|
19771
|
+
error: string().nullable()
|
|
19772
|
+
});
|
|
19773
|
+
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
19774
|
+
var ExportDownloadSchema = object({
|
|
19775
|
+
url: string(),
|
|
19776
|
+
endpoints: array(string())
|
|
19777
|
+
});
|
|
19778
|
+
method(object({
|
|
19779
|
+
deviceId: number(),
|
|
19780
|
+
profile: string(),
|
|
19781
|
+
fromMs: number(),
|
|
19782
|
+
toMs: number(),
|
|
19783
|
+
options: ExportOptionsSchema
|
|
19784
|
+
}), ExportRecordSchema, {
|
|
19785
|
+
kind: "mutation",
|
|
19786
|
+
auth: "protected"
|
|
19787
|
+
}), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
|
|
19788
|
+
kind: "query",
|
|
19789
|
+
auth: "protected"
|
|
19790
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19791
|
+
kind: "query",
|
|
19792
|
+
auth: "protected"
|
|
19793
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19794
|
+
kind: "mutation",
|
|
19795
|
+
auth: "protected"
|
|
19796
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19797
|
+
kind: "mutation",
|
|
19798
|
+
auth: "protected"
|
|
19799
|
+
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
19800
|
+
kind: "query",
|
|
19801
|
+
auth: "protected"
|
|
19802
|
+
});
|
|
19803
|
+
/**
|
|
19652
19804
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
19653
19805
|
* payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
|
|
19654
19806
|
* `deviceId`.
|
|
@@ -23572,6 +23724,42 @@ Object.freeze({
|
|
|
23572
23724
|
addonId: null,
|
|
23573
23725
|
access: "create"
|
|
23574
23726
|
},
|
|
23727
|
+
"recordingExport.cancelExport": {
|
|
23728
|
+
capName: "recordingExport",
|
|
23729
|
+
capScope: "system",
|
|
23730
|
+
addonId: null,
|
|
23731
|
+
access: "create"
|
|
23732
|
+
},
|
|
23733
|
+
"recordingExport.createExport": {
|
|
23734
|
+
capName: "recordingExport",
|
|
23735
|
+
capScope: "system",
|
|
23736
|
+
addonId: null,
|
|
23737
|
+
access: "create"
|
|
23738
|
+
},
|
|
23739
|
+
"recordingExport.deleteExport": {
|
|
23740
|
+
capName: "recordingExport",
|
|
23741
|
+
capScope: "system",
|
|
23742
|
+
addonId: null,
|
|
23743
|
+
access: "delete"
|
|
23744
|
+
},
|
|
23745
|
+
"recordingExport.getDownloadUrl": {
|
|
23746
|
+
capName: "recordingExport",
|
|
23747
|
+
capScope: "system",
|
|
23748
|
+
addonId: null,
|
|
23749
|
+
access: "view"
|
|
23750
|
+
},
|
|
23751
|
+
"recordingExport.getExport": {
|
|
23752
|
+
capName: "recordingExport",
|
|
23753
|
+
capScope: "system",
|
|
23754
|
+
addonId: null,
|
|
23755
|
+
access: "view"
|
|
23756
|
+
},
|
|
23757
|
+
"recordingExport.listExports": {
|
|
23758
|
+
capName: "recordingExport",
|
|
23759
|
+
capScope: "system",
|
|
23760
|
+
addonId: null,
|
|
23761
|
+
access: "view"
|
|
23762
|
+
},
|
|
23575
23763
|
"sceneMonitor.captureReference": {
|
|
23576
23764
|
capName: "scene-monitor",
|
|
23577
23765
|
capScope: "device",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-export-alexa",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.25",
|
|
4
4
|
"description": "Alexa Smart Home Skill export — hub-side OAuth provider + directive handler. The companion AWS Lambda forwards Alexa directives to this addon's /addon/export-alexa/directive endpoint.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|