@camstack/addon-export-ha-mqtt 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-ha-mqtt.addon.js +192 -4
- package/dist/export-ha-mqtt.addon.mjs +192 -4
- package/package.json +1 -1
|
@@ -36,7 +36,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
36
36
|
}) : target, mod));
|
|
37
37
|
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
38
38
|
//#endregion
|
|
39
|
-
//#region ../types/dist/event-category-
|
|
39
|
+
//#region ../types/dist/event-category-D4HJq7Mw.mjs
|
|
40
40
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
41
41
|
EventCategory["SystemBoot"] = "system.boot";
|
|
42
42
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -189,6 +189,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
189
189
|
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
190
190
|
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
191
191
|
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
192
|
+
/** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
|
|
193
|
+
* progress bar the client reconciles via `recordingExport.getExport`. */
|
|
194
|
+
EventCategory["RecordingExportProgress"] = "recording.export.progress";
|
|
195
|
+
EventCategory["RecordingExportCompleted"] = "recording.export.completed";
|
|
196
|
+
EventCategory["RecordingExportFailed"] = "recording.export.failed";
|
|
192
197
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
193
198
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
194
199
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -478,6 +483,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
478
483
|
*/
|
|
479
484
|
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
480
485
|
/**
|
|
486
|
+
* Fired by `addon-post-analysis` when a package-drop is confirmed inside
|
|
487
|
+
* a package zone — a newly-appeared stationary object of a package class
|
|
488
|
+
* that cleared the class / zone / dwell / size gates. Payload:
|
|
489
|
+
* `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
|
|
490
|
+
* entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
|
|
491
|
+
* Telemetry (D8): the durable record is the `package-events` store row;
|
|
492
|
+
* this bus topic drives notifier rules + live UI. See
|
|
493
|
+
* docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
|
|
494
|
+
*/
|
|
495
|
+
EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
|
|
496
|
+
/**
|
|
497
|
+
* Fired by `addon-post-analysis` when a previously-delivered package
|
|
498
|
+
* leaves its zone (the stationary entry departed — moved or swept).
|
|
499
|
+
* Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
|
|
500
|
+
* `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
|
|
501
|
+
* Telemetry (D8). See package-zones-design §5.2.
|
|
502
|
+
*/
|
|
503
|
+
EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
|
|
504
|
+
/**
|
|
481
505
|
* Fired by `addon-post-analysis` whenever a gallery face row changes:
|
|
482
506
|
* `kind:'buffered'` a new detected face was persisted, `'assigned'` /
|
|
483
507
|
* `'unassigned'` its identity link changed, `'deleted'` the row was
|
|
@@ -5226,6 +5250,25 @@ function _instanceof(cls, params = {}) {
|
|
|
5226
5250
|
return inst;
|
|
5227
5251
|
}
|
|
5228
5252
|
//#endregion
|
|
5253
|
+
//#region ../../node_modules/zod/v4/classic/compat.js
|
|
5254
|
+
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
|
5255
|
+
var ZodIssueCode = {
|
|
5256
|
+
invalid_type: "invalid_type",
|
|
5257
|
+
too_big: "too_big",
|
|
5258
|
+
too_small: "too_small",
|
|
5259
|
+
invalid_format: "invalid_format",
|
|
5260
|
+
not_multiple_of: "not_multiple_of",
|
|
5261
|
+
unrecognized_keys: "unrecognized_keys",
|
|
5262
|
+
invalid_union: "invalid_union",
|
|
5263
|
+
invalid_key: "invalid_key",
|
|
5264
|
+
invalid_element: "invalid_element",
|
|
5265
|
+
invalid_value: "invalid_value",
|
|
5266
|
+
custom: "custom"
|
|
5267
|
+
};
|
|
5268
|
+
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
|
|
5269
|
+
var ZodFirstPartyTypeKind;
|
|
5270
|
+
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5271
|
+
//#endregion
|
|
5229
5272
|
//#region ../../node_modules/zod/v4/classic/coerce.js
|
|
5230
5273
|
function number(params) {
|
|
5231
5274
|
return /* @__PURE__ */ _coercedNumber(ZodNumber, params);
|
|
@@ -12585,7 +12628,11 @@ array(ZoneRuleSchema).readonly();
|
|
|
12585
12628
|
* Extend the enum here when a new gating consumer comes online (audio
|
|
12586
12629
|
* gating, alert filtering, …) — no other surface needs to change.
|
|
12587
12630
|
*/
|
|
12588
|
-
var ZoneRuleStageEnum = _enum([
|
|
12631
|
+
var ZoneRuleStageEnum = _enum([
|
|
12632
|
+
"motion",
|
|
12633
|
+
"detection",
|
|
12634
|
+
"package"
|
|
12635
|
+
]);
|
|
12589
12636
|
DeviceType.Camera, method(object({
|
|
12590
12637
|
deviceId: number$1(),
|
|
12591
12638
|
stage: ZoneRuleStageEnum
|
|
@@ -12598,7 +12645,8 @@ DeviceType.Camera, method(object({
|
|
|
12598
12645
|
auth: "admin"
|
|
12599
12646
|
}), object({
|
|
12600
12647
|
motion: array(ZoneRuleSchema).readonly(),
|
|
12601
|
-
detection: array(ZoneRuleSchema).readonly()
|
|
12648
|
+
detection: array(ZoneRuleSchema).readonly(),
|
|
12649
|
+
package: array(ZoneRuleSchema).readonly()
|
|
12602
12650
|
});
|
|
12603
12651
|
var ProviderStatusSchema = object({
|
|
12604
12652
|
connected: boolean(),
|
|
@@ -15806,6 +15854,7 @@ var EventKindIconSchema = _enum([
|
|
|
15806
15854
|
"smoke",
|
|
15807
15855
|
"water",
|
|
15808
15856
|
"button",
|
|
15857
|
+
"package",
|
|
15809
15858
|
"generic"
|
|
15810
15859
|
]);
|
|
15811
15860
|
var EventKindCategorySchema = _enum([
|
|
@@ -15813,7 +15862,8 @@ var EventKindCategorySchema = _enum([
|
|
|
15813
15862
|
"audio",
|
|
15814
15863
|
"detection",
|
|
15815
15864
|
"sensor",
|
|
15816
|
-
"custom"
|
|
15865
|
+
"custom",
|
|
15866
|
+
"package"
|
|
15817
15867
|
]);
|
|
15818
15868
|
var EventKindDescriptorSchema = object({
|
|
15819
15869
|
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
@@ -19459,6 +19509,108 @@ method(object({
|
|
|
19459
19509
|
auth: "admin"
|
|
19460
19510
|
});
|
|
19461
19511
|
/**
|
|
19512
|
+
* `recordingExport` cap — render a footage time range into a single downloadable
|
|
19513
|
+
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
19514
|
+
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
19515
|
+
* delete-after-download.
|
|
19516
|
+
*
|
|
19517
|
+
* Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
|
|
19518
|
+
* recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
|
|
19519
|
+
* default `hub`) registers it. Device-scoped methods carry `deviceId` in their
|
|
19520
|
+
* input and dispatch to that single provider; the render runs on the node that
|
|
19521
|
+
* owns the footage (no cross-node segment transfer). Download rides the
|
|
19522
|
+
* framework addon data-plane. State persists in a DurableState blob (NOT
|
|
19523
|
+
* SQLite); history rows survive file deletion for audit.
|
|
19524
|
+
*/
|
|
19525
|
+
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
19526
|
+
var ExportSpeedSchema = number$1().min(.25).max(32);
|
|
19527
|
+
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
19528
|
+
var ExportTimelapseSchema = object({
|
|
19529
|
+
everyMs: number$1().int().positive(),
|
|
19530
|
+
outputFps: number$1().int().min(1).max(60).optional()
|
|
19531
|
+
});
|
|
19532
|
+
/**
|
|
19533
|
+
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
19534
|
+
* is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
|
|
19535
|
+
* silent. `maxLifeMs` bounds how long the finished file is kept;
|
|
19536
|
+
* `deleteAfterDownload` removes it shortly after the first complete download.
|
|
19537
|
+
*/
|
|
19538
|
+
var ExportOptionsSchema = object({
|
|
19539
|
+
speed: ExportSpeedSchema.optional(),
|
|
19540
|
+
timelapse: ExportTimelapseSchema.optional(),
|
|
19541
|
+
includeAudio: boolean(),
|
|
19542
|
+
maxLifeMs: number$1().int().positive(),
|
|
19543
|
+
deleteAfterDownload: boolean(),
|
|
19544
|
+
title: string().max(200).optional()
|
|
19545
|
+
}).superRefine((v, ctx) => {
|
|
19546
|
+
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
19547
|
+
code: ZodIssueCode.custom,
|
|
19548
|
+
message: "speed and timelapse are mutually exclusive",
|
|
19549
|
+
path: ["timelapse"]
|
|
19550
|
+
});
|
|
19551
|
+
});
|
|
19552
|
+
var ExportStateSchema = _enum([
|
|
19553
|
+
"queued",
|
|
19554
|
+
"rendering",
|
|
19555
|
+
"ready",
|
|
19556
|
+
"failed",
|
|
19557
|
+
"expired",
|
|
19558
|
+
"deleted"
|
|
19559
|
+
]);
|
|
19560
|
+
/** One export job / history row. */
|
|
19561
|
+
var ExportRecordSchema = object({
|
|
19562
|
+
id: string(),
|
|
19563
|
+
deviceId: number$1(),
|
|
19564
|
+
profile: string(),
|
|
19565
|
+
fromMs: number$1(),
|
|
19566
|
+
toMs: number$1(),
|
|
19567
|
+
options: ExportOptionsSchema,
|
|
19568
|
+
state: ExportStateSchema,
|
|
19569
|
+
/** 0–100 while rendering; null otherwise. */
|
|
19570
|
+
progressPct: number$1().nullable(),
|
|
19571
|
+
/** File size once ready; null before. */
|
|
19572
|
+
fileBytes: number$1().nullable(),
|
|
19573
|
+
expiresAt: number$1(),
|
|
19574
|
+
deleteAfterDownload: boolean(),
|
|
19575
|
+
/** Epoch of the first complete download; null until then. */
|
|
19576
|
+
downloadedAt: number$1().nullable(),
|
|
19577
|
+
createdAt: number$1(),
|
|
19578
|
+
/** User id/name that requested the export. */
|
|
19579
|
+
createdBy: string(),
|
|
19580
|
+
/** Failure reason when state is 'failed'; null otherwise. */
|
|
19581
|
+
error: string().nullable()
|
|
19582
|
+
});
|
|
19583
|
+
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
19584
|
+
var ExportDownloadSchema = object({
|
|
19585
|
+
url: string(),
|
|
19586
|
+
endpoints: array(string())
|
|
19587
|
+
});
|
|
19588
|
+
method(object({
|
|
19589
|
+
deviceId: number$1(),
|
|
19590
|
+
profile: string(),
|
|
19591
|
+
fromMs: number$1(),
|
|
19592
|
+
toMs: number$1(),
|
|
19593
|
+
options: ExportOptionsSchema
|
|
19594
|
+
}), ExportRecordSchema, {
|
|
19595
|
+
kind: "mutation",
|
|
19596
|
+
auth: "protected"
|
|
19597
|
+
}), method(object({ deviceId: number$1().optional() }), array(ExportRecordSchema), {
|
|
19598
|
+
kind: "query",
|
|
19599
|
+
auth: "protected"
|
|
19600
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19601
|
+
kind: "query",
|
|
19602
|
+
auth: "protected"
|
|
19603
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19604
|
+
kind: "mutation",
|
|
19605
|
+
auth: "protected"
|
|
19606
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19607
|
+
kind: "mutation",
|
|
19608
|
+
auth: "protected"
|
|
19609
|
+
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
19610
|
+
kind: "query",
|
|
19611
|
+
auth: "protected"
|
|
19612
|
+
});
|
|
19613
|
+
/**
|
|
19462
19614
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
19463
19615
|
* payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
|
|
19464
19616
|
* `deviceId`.
|
|
@@ -23382,6 +23534,42 @@ Object.freeze({
|
|
|
23382
23534
|
addonId: null,
|
|
23383
23535
|
access: "create"
|
|
23384
23536
|
},
|
|
23537
|
+
"recordingExport.cancelExport": {
|
|
23538
|
+
capName: "recordingExport",
|
|
23539
|
+
capScope: "system",
|
|
23540
|
+
addonId: null,
|
|
23541
|
+
access: "create"
|
|
23542
|
+
},
|
|
23543
|
+
"recordingExport.createExport": {
|
|
23544
|
+
capName: "recordingExport",
|
|
23545
|
+
capScope: "system",
|
|
23546
|
+
addonId: null,
|
|
23547
|
+
access: "create"
|
|
23548
|
+
},
|
|
23549
|
+
"recordingExport.deleteExport": {
|
|
23550
|
+
capName: "recordingExport",
|
|
23551
|
+
capScope: "system",
|
|
23552
|
+
addonId: null,
|
|
23553
|
+
access: "delete"
|
|
23554
|
+
},
|
|
23555
|
+
"recordingExport.getDownloadUrl": {
|
|
23556
|
+
capName: "recordingExport",
|
|
23557
|
+
capScope: "system",
|
|
23558
|
+
addonId: null,
|
|
23559
|
+
access: "view"
|
|
23560
|
+
},
|
|
23561
|
+
"recordingExport.getExport": {
|
|
23562
|
+
capName: "recordingExport",
|
|
23563
|
+
capScope: "system",
|
|
23564
|
+
addonId: null,
|
|
23565
|
+
access: "view"
|
|
23566
|
+
},
|
|
23567
|
+
"recordingExport.listExports": {
|
|
23568
|
+
capName: "recordingExport",
|
|
23569
|
+
capScope: "system",
|
|
23570
|
+
addonId: null,
|
|
23571
|
+
access: "view"
|
|
23572
|
+
},
|
|
23385
23573
|
"sceneMonitor.captureReference": {
|
|
23386
23574
|
capName: "scene-monitor",
|
|
23387
23575
|
capScope: "device",
|
|
@@ -34,7 +34,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
34
34
|
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
36
36
|
//#endregion
|
|
37
|
-
//#region ../types/dist/event-category-
|
|
37
|
+
//#region ../types/dist/event-category-D4HJq7Mw.mjs
|
|
38
38
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
39
39
|
EventCategory["SystemBoot"] = "system.boot";
|
|
40
40
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -187,6 +187,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
187
187
|
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
188
188
|
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
189
189
|
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
190
|
+
/** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
|
|
191
|
+
* progress bar the client reconciles via `recordingExport.getExport`. */
|
|
192
|
+
EventCategory["RecordingExportProgress"] = "recording.export.progress";
|
|
193
|
+
EventCategory["RecordingExportCompleted"] = "recording.export.completed";
|
|
194
|
+
EventCategory["RecordingExportFailed"] = "recording.export.failed";
|
|
190
195
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
191
196
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
192
197
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -476,6 +481,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
476
481
|
*/
|
|
477
482
|
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
478
483
|
/**
|
|
484
|
+
* Fired by `addon-post-analysis` when a package-drop is confirmed inside
|
|
485
|
+
* a package zone — a newly-appeared stationary object of a package class
|
|
486
|
+
* that cleared the class / zone / dwell / size gates. Payload:
|
|
487
|
+
* `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
|
|
488
|
+
* entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
|
|
489
|
+
* Telemetry (D8): the durable record is the `package-events` store row;
|
|
490
|
+
* this bus topic drives notifier rules + live UI. See
|
|
491
|
+
* docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
|
|
492
|
+
*/
|
|
493
|
+
EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
|
|
494
|
+
/**
|
|
495
|
+
* Fired by `addon-post-analysis` when a previously-delivered package
|
|
496
|
+
* leaves its zone (the stationary entry departed — moved or swept).
|
|
497
|
+
* Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
|
|
498
|
+
* `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
|
|
499
|
+
* Telemetry (D8). See package-zones-design §5.2.
|
|
500
|
+
*/
|
|
501
|
+
EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
|
|
502
|
+
/**
|
|
479
503
|
* Fired by `addon-post-analysis` whenever a gallery face row changes:
|
|
480
504
|
* `kind:'buffered'` a new detected face was persisted, `'assigned'` /
|
|
481
505
|
* `'unassigned'` its identity link changed, `'deleted'` the row was
|
|
@@ -5224,6 +5248,25 @@ function _instanceof(cls, params = {}) {
|
|
|
5224
5248
|
return inst;
|
|
5225
5249
|
}
|
|
5226
5250
|
//#endregion
|
|
5251
|
+
//#region ../../node_modules/zod/v4/classic/compat.js
|
|
5252
|
+
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
|
5253
|
+
var ZodIssueCode = {
|
|
5254
|
+
invalid_type: "invalid_type",
|
|
5255
|
+
too_big: "too_big",
|
|
5256
|
+
too_small: "too_small",
|
|
5257
|
+
invalid_format: "invalid_format",
|
|
5258
|
+
not_multiple_of: "not_multiple_of",
|
|
5259
|
+
unrecognized_keys: "unrecognized_keys",
|
|
5260
|
+
invalid_union: "invalid_union",
|
|
5261
|
+
invalid_key: "invalid_key",
|
|
5262
|
+
invalid_element: "invalid_element",
|
|
5263
|
+
invalid_value: "invalid_value",
|
|
5264
|
+
custom: "custom"
|
|
5265
|
+
};
|
|
5266
|
+
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
|
|
5267
|
+
var ZodFirstPartyTypeKind;
|
|
5268
|
+
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5269
|
+
//#endregion
|
|
5227
5270
|
//#region ../../node_modules/zod/v4/classic/coerce.js
|
|
5228
5271
|
function number(params) {
|
|
5229
5272
|
return /* @__PURE__ */ _coercedNumber(ZodNumber, params);
|
|
@@ -12583,7 +12626,11 @@ array(ZoneRuleSchema).readonly();
|
|
|
12583
12626
|
* Extend the enum here when a new gating consumer comes online (audio
|
|
12584
12627
|
* gating, alert filtering, …) — no other surface needs to change.
|
|
12585
12628
|
*/
|
|
12586
|
-
var ZoneRuleStageEnum = _enum([
|
|
12629
|
+
var ZoneRuleStageEnum = _enum([
|
|
12630
|
+
"motion",
|
|
12631
|
+
"detection",
|
|
12632
|
+
"package"
|
|
12633
|
+
]);
|
|
12587
12634
|
DeviceType.Camera, method(object({
|
|
12588
12635
|
deviceId: number$1(),
|
|
12589
12636
|
stage: ZoneRuleStageEnum
|
|
@@ -12596,7 +12643,8 @@ DeviceType.Camera, method(object({
|
|
|
12596
12643
|
auth: "admin"
|
|
12597
12644
|
}), object({
|
|
12598
12645
|
motion: array(ZoneRuleSchema).readonly(),
|
|
12599
|
-
detection: array(ZoneRuleSchema).readonly()
|
|
12646
|
+
detection: array(ZoneRuleSchema).readonly(),
|
|
12647
|
+
package: array(ZoneRuleSchema).readonly()
|
|
12600
12648
|
});
|
|
12601
12649
|
var ProviderStatusSchema = object({
|
|
12602
12650
|
connected: boolean(),
|
|
@@ -15804,6 +15852,7 @@ var EventKindIconSchema = _enum([
|
|
|
15804
15852
|
"smoke",
|
|
15805
15853
|
"water",
|
|
15806
15854
|
"button",
|
|
15855
|
+
"package",
|
|
15807
15856
|
"generic"
|
|
15808
15857
|
]);
|
|
15809
15858
|
var EventKindCategorySchema = _enum([
|
|
@@ -15811,7 +15860,8 @@ var EventKindCategorySchema = _enum([
|
|
|
15811
15860
|
"audio",
|
|
15812
15861
|
"detection",
|
|
15813
15862
|
"sensor",
|
|
15814
|
-
"custom"
|
|
15863
|
+
"custom",
|
|
15864
|
+
"package"
|
|
15815
15865
|
]);
|
|
15816
15866
|
var EventKindDescriptorSchema = object({
|
|
15817
15867
|
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
@@ -19457,6 +19507,108 @@ method(object({
|
|
|
19457
19507
|
auth: "admin"
|
|
19458
19508
|
});
|
|
19459
19509
|
/**
|
|
19510
|
+
* `recordingExport` cap — render a footage time range into a single downloadable
|
|
19511
|
+
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
19512
|
+
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
19513
|
+
* delete-after-download.
|
|
19514
|
+
*
|
|
19515
|
+
* Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
|
|
19516
|
+
* recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
|
|
19517
|
+
* default `hub`) registers it. Device-scoped methods carry `deviceId` in their
|
|
19518
|
+
* input and dispatch to that single provider; the render runs on the node that
|
|
19519
|
+
* owns the footage (no cross-node segment transfer). Download rides the
|
|
19520
|
+
* framework addon data-plane. State persists in a DurableState blob (NOT
|
|
19521
|
+
* SQLite); history rows survive file deletion for audit.
|
|
19522
|
+
*/
|
|
19523
|
+
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
19524
|
+
var ExportSpeedSchema = number$1().min(.25).max(32);
|
|
19525
|
+
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
19526
|
+
var ExportTimelapseSchema = object({
|
|
19527
|
+
everyMs: number$1().int().positive(),
|
|
19528
|
+
outputFps: number$1().int().min(1).max(60).optional()
|
|
19529
|
+
});
|
|
19530
|
+
/**
|
|
19531
|
+
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
19532
|
+
* is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
|
|
19533
|
+
* silent. `maxLifeMs` bounds how long the finished file is kept;
|
|
19534
|
+
* `deleteAfterDownload` removes it shortly after the first complete download.
|
|
19535
|
+
*/
|
|
19536
|
+
var ExportOptionsSchema = object({
|
|
19537
|
+
speed: ExportSpeedSchema.optional(),
|
|
19538
|
+
timelapse: ExportTimelapseSchema.optional(),
|
|
19539
|
+
includeAudio: boolean(),
|
|
19540
|
+
maxLifeMs: number$1().int().positive(),
|
|
19541
|
+
deleteAfterDownload: boolean(),
|
|
19542
|
+
title: string().max(200).optional()
|
|
19543
|
+
}).superRefine((v, ctx) => {
|
|
19544
|
+
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
19545
|
+
code: ZodIssueCode.custom,
|
|
19546
|
+
message: "speed and timelapse are mutually exclusive",
|
|
19547
|
+
path: ["timelapse"]
|
|
19548
|
+
});
|
|
19549
|
+
});
|
|
19550
|
+
var ExportStateSchema = _enum([
|
|
19551
|
+
"queued",
|
|
19552
|
+
"rendering",
|
|
19553
|
+
"ready",
|
|
19554
|
+
"failed",
|
|
19555
|
+
"expired",
|
|
19556
|
+
"deleted"
|
|
19557
|
+
]);
|
|
19558
|
+
/** One export job / history row. */
|
|
19559
|
+
var ExportRecordSchema = object({
|
|
19560
|
+
id: string(),
|
|
19561
|
+
deviceId: number$1(),
|
|
19562
|
+
profile: string(),
|
|
19563
|
+
fromMs: number$1(),
|
|
19564
|
+
toMs: number$1(),
|
|
19565
|
+
options: ExportOptionsSchema,
|
|
19566
|
+
state: ExportStateSchema,
|
|
19567
|
+
/** 0–100 while rendering; null otherwise. */
|
|
19568
|
+
progressPct: number$1().nullable(),
|
|
19569
|
+
/** File size once ready; null before. */
|
|
19570
|
+
fileBytes: number$1().nullable(),
|
|
19571
|
+
expiresAt: number$1(),
|
|
19572
|
+
deleteAfterDownload: boolean(),
|
|
19573
|
+
/** Epoch of the first complete download; null until then. */
|
|
19574
|
+
downloadedAt: number$1().nullable(),
|
|
19575
|
+
createdAt: number$1(),
|
|
19576
|
+
/** User id/name that requested the export. */
|
|
19577
|
+
createdBy: string(),
|
|
19578
|
+
/** Failure reason when state is 'failed'; null otherwise. */
|
|
19579
|
+
error: string().nullable()
|
|
19580
|
+
});
|
|
19581
|
+
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
19582
|
+
var ExportDownloadSchema = object({
|
|
19583
|
+
url: string(),
|
|
19584
|
+
endpoints: array(string())
|
|
19585
|
+
});
|
|
19586
|
+
method(object({
|
|
19587
|
+
deviceId: number$1(),
|
|
19588
|
+
profile: string(),
|
|
19589
|
+
fromMs: number$1(),
|
|
19590
|
+
toMs: number$1(),
|
|
19591
|
+
options: ExportOptionsSchema
|
|
19592
|
+
}), ExportRecordSchema, {
|
|
19593
|
+
kind: "mutation",
|
|
19594
|
+
auth: "protected"
|
|
19595
|
+
}), method(object({ deviceId: number$1().optional() }), array(ExportRecordSchema), {
|
|
19596
|
+
kind: "query",
|
|
19597
|
+
auth: "protected"
|
|
19598
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19599
|
+
kind: "query",
|
|
19600
|
+
auth: "protected"
|
|
19601
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19602
|
+
kind: "mutation",
|
|
19603
|
+
auth: "protected"
|
|
19604
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19605
|
+
kind: "mutation",
|
|
19606
|
+
auth: "protected"
|
|
19607
|
+
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
19608
|
+
kind: "query",
|
|
19609
|
+
auth: "protected"
|
|
19610
|
+
});
|
|
19611
|
+
/**
|
|
19460
19612
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
19461
19613
|
* payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
|
|
19462
19614
|
* `deviceId`.
|
|
@@ -23380,6 +23532,42 @@ Object.freeze({
|
|
|
23380
23532
|
addonId: null,
|
|
23381
23533
|
access: "create"
|
|
23382
23534
|
},
|
|
23535
|
+
"recordingExport.cancelExport": {
|
|
23536
|
+
capName: "recordingExport",
|
|
23537
|
+
capScope: "system",
|
|
23538
|
+
addonId: null,
|
|
23539
|
+
access: "create"
|
|
23540
|
+
},
|
|
23541
|
+
"recordingExport.createExport": {
|
|
23542
|
+
capName: "recordingExport",
|
|
23543
|
+
capScope: "system",
|
|
23544
|
+
addonId: null,
|
|
23545
|
+
access: "create"
|
|
23546
|
+
},
|
|
23547
|
+
"recordingExport.deleteExport": {
|
|
23548
|
+
capName: "recordingExport",
|
|
23549
|
+
capScope: "system",
|
|
23550
|
+
addonId: null,
|
|
23551
|
+
access: "delete"
|
|
23552
|
+
},
|
|
23553
|
+
"recordingExport.getDownloadUrl": {
|
|
23554
|
+
capName: "recordingExport",
|
|
23555
|
+
capScope: "system",
|
|
23556
|
+
addonId: null,
|
|
23557
|
+
access: "view"
|
|
23558
|
+
},
|
|
23559
|
+
"recordingExport.getExport": {
|
|
23560
|
+
capName: "recordingExport",
|
|
23561
|
+
capScope: "system",
|
|
23562
|
+
addonId: null,
|
|
23563
|
+
access: "view"
|
|
23564
|
+
},
|
|
23565
|
+
"recordingExport.listExports": {
|
|
23566
|
+
capName: "recordingExport",
|
|
23567
|
+
capScope: "system",
|
|
23568
|
+
addonId: null,
|
|
23569
|
+
access: "view"
|
|
23570
|
+
},
|
|
23383
23571
|
"sceneMonitor.captureReference": {
|
|
23384
23572
|
capName: "scene-monitor",
|
|
23385
23573
|
capScope: "device",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-export-ha-mqtt",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.25",
|
|
4
4
|
"description": "HomeAssistant MQTT discovery exporter for CamStack devices. Publishes discovery topics so HA auto-creates entities for exposed cameras/switches/intercoms/sensors.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|