@camstack/addon-export-ha-mqtt 1.1.23 → 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 +218 -5
- package/dist/export-ha-mqtt.addon.mjs +218 -5
- 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);
|
|
@@ -7272,6 +7315,24 @@ var RecordingRetentionSchema = object({
|
|
|
7272
7315
|
maxSizeGb: number$1().min(0).optional()
|
|
7273
7316
|
});
|
|
7274
7317
|
/**
|
|
7318
|
+
* Scrub-thumbnail fidelity preset — the single per-camera selector bundling the
|
|
7319
|
+
* sprite tile RESOLUTION + JPEG QUALITY the recorder packs timeline-scrub
|
|
7320
|
+
* previews at. Five graduated steps; absent on a config = `standard` (the
|
|
7321
|
+
* shipped default, matching `sheet-geometry`/`sheet-composer`).
|
|
7322
|
+
*
|
|
7323
|
+
* Existing sheets are IMMUTABLE — a changed preset applies to NEW windows only.
|
|
7324
|
+
* Each window's index sidecar carries its own tile dims, so a camera whose
|
|
7325
|
+
* preset changed over time renders every historical window at the dims it was
|
|
7326
|
+
* written with.
|
|
7327
|
+
*/
|
|
7328
|
+
var ScrubThumbnailPresetSchema = _enum([
|
|
7329
|
+
"minimal",
|
|
7330
|
+
"low",
|
|
7331
|
+
"standard",
|
|
7332
|
+
"high",
|
|
7333
|
+
"max"
|
|
7334
|
+
]);
|
|
7335
|
+
/**
|
|
7275
7336
|
* The full per-camera recording intent — the wire shape of a RecordingTarget.
|
|
7276
7337
|
*
|
|
7277
7338
|
* `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
|
|
@@ -7308,7 +7369,14 @@ var RecordingConfigSchema = object({
|
|
|
7308
7369
|
* derived into bands once via `migrateConfigToBands`.
|
|
7309
7370
|
*/
|
|
7310
7371
|
bands: array(RecordingBandSchema).optional(),
|
|
7311
|
-
retention: RecordingRetentionSchema.optional()
|
|
7372
|
+
retention: RecordingRetentionSchema.optional(),
|
|
7373
|
+
/**
|
|
7374
|
+
* Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
|
|
7375
|
+
* timeline-scrub sprite previews). Absent = `standard`. Applies to NEW
|
|
7376
|
+
* windows only — existing sheets are immutable, and each window's index
|
|
7377
|
+
* carries its own tile dims so mixed-preset history renders correctly.
|
|
7378
|
+
*/
|
|
7379
|
+
scrubThumbnails: ScrubThumbnailPresetSchema.optional()
|
|
7312
7380
|
});
|
|
7313
7381
|
/**
|
|
7314
7382
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -12560,7 +12628,11 @@ array(ZoneRuleSchema).readonly();
|
|
|
12560
12628
|
* Extend the enum here when a new gating consumer comes online (audio
|
|
12561
12629
|
* gating, alert filtering, …) — no other surface needs to change.
|
|
12562
12630
|
*/
|
|
12563
|
-
var ZoneRuleStageEnum = _enum([
|
|
12631
|
+
var ZoneRuleStageEnum = _enum([
|
|
12632
|
+
"motion",
|
|
12633
|
+
"detection",
|
|
12634
|
+
"package"
|
|
12635
|
+
]);
|
|
12564
12636
|
DeviceType.Camera, method(object({
|
|
12565
12637
|
deviceId: number$1(),
|
|
12566
12638
|
stage: ZoneRuleStageEnum
|
|
@@ -12573,7 +12645,8 @@ DeviceType.Camera, method(object({
|
|
|
12573
12645
|
auth: "admin"
|
|
12574
12646
|
}), object({
|
|
12575
12647
|
motion: array(ZoneRuleSchema).readonly(),
|
|
12576
|
-
detection: array(ZoneRuleSchema).readonly()
|
|
12648
|
+
detection: array(ZoneRuleSchema).readonly(),
|
|
12649
|
+
package: array(ZoneRuleSchema).readonly()
|
|
12577
12650
|
});
|
|
12578
12651
|
var ProviderStatusSchema = object({
|
|
12579
12652
|
connected: boolean(),
|
|
@@ -15781,6 +15854,7 @@ var EventKindIconSchema = _enum([
|
|
|
15781
15854
|
"smoke",
|
|
15782
15855
|
"water",
|
|
15783
15856
|
"button",
|
|
15857
|
+
"package",
|
|
15784
15858
|
"generic"
|
|
15785
15859
|
]);
|
|
15786
15860
|
var EventKindCategorySchema = _enum([
|
|
@@ -15788,7 +15862,8 @@ var EventKindCategorySchema = _enum([
|
|
|
15788
15862
|
"audio",
|
|
15789
15863
|
"detection",
|
|
15790
15864
|
"sensor",
|
|
15791
|
-
"custom"
|
|
15865
|
+
"custom",
|
|
15866
|
+
"package"
|
|
15792
15867
|
]);
|
|
15793
15868
|
var EventKindDescriptorSchema = object({
|
|
15794
15869
|
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
@@ -19434,6 +19509,108 @@ method(object({
|
|
|
19434
19509
|
auth: "admin"
|
|
19435
19510
|
});
|
|
19436
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
|
+
/**
|
|
19437
19614
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
19438
19615
|
* payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
|
|
19439
19616
|
* `deviceId`.
|
|
@@ -23357,6 +23534,42 @@ Object.freeze({
|
|
|
23357
23534
|
addonId: null,
|
|
23358
23535
|
access: "create"
|
|
23359
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
|
+
},
|
|
23360
23573
|
"sceneMonitor.captureReference": {
|
|
23361
23574
|
capName: "scene-monitor",
|
|
23362
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);
|
|
@@ -7270,6 +7313,24 @@ var RecordingRetentionSchema = object({
|
|
|
7270
7313
|
maxSizeGb: number$1().min(0).optional()
|
|
7271
7314
|
});
|
|
7272
7315
|
/**
|
|
7316
|
+
* Scrub-thumbnail fidelity preset — the single per-camera selector bundling the
|
|
7317
|
+
* sprite tile RESOLUTION + JPEG QUALITY the recorder packs timeline-scrub
|
|
7318
|
+
* previews at. Five graduated steps; absent on a config = `standard` (the
|
|
7319
|
+
* shipped default, matching `sheet-geometry`/`sheet-composer`).
|
|
7320
|
+
*
|
|
7321
|
+
* Existing sheets are IMMUTABLE — a changed preset applies to NEW windows only.
|
|
7322
|
+
* Each window's index sidecar carries its own tile dims, so a camera whose
|
|
7323
|
+
* preset changed over time renders every historical window at the dims it was
|
|
7324
|
+
* written with.
|
|
7325
|
+
*/
|
|
7326
|
+
var ScrubThumbnailPresetSchema = _enum([
|
|
7327
|
+
"minimal",
|
|
7328
|
+
"low",
|
|
7329
|
+
"standard",
|
|
7330
|
+
"high",
|
|
7331
|
+
"max"
|
|
7332
|
+
]);
|
|
7333
|
+
/**
|
|
7273
7334
|
* The full per-camera recording intent — the wire shape of a RecordingTarget.
|
|
7274
7335
|
*
|
|
7275
7336
|
* `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
|
|
@@ -7306,7 +7367,14 @@ var RecordingConfigSchema = object({
|
|
|
7306
7367
|
* derived into bands once via `migrateConfigToBands`.
|
|
7307
7368
|
*/
|
|
7308
7369
|
bands: array(RecordingBandSchema).optional(),
|
|
7309
|
-
retention: RecordingRetentionSchema.optional()
|
|
7370
|
+
retention: RecordingRetentionSchema.optional(),
|
|
7371
|
+
/**
|
|
7372
|
+
* Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
|
|
7373
|
+
* timeline-scrub sprite previews). Absent = `standard`. Applies to NEW
|
|
7374
|
+
* windows only — existing sheets are immutable, and each window's index
|
|
7375
|
+
* carries its own tile dims so mixed-preset history renders correctly.
|
|
7376
|
+
*/
|
|
7377
|
+
scrubThumbnails: ScrubThumbnailPresetSchema.optional()
|
|
7310
7378
|
});
|
|
7311
7379
|
/**
|
|
7312
7380
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -12558,7 +12626,11 @@ array(ZoneRuleSchema).readonly();
|
|
|
12558
12626
|
* Extend the enum here when a new gating consumer comes online (audio
|
|
12559
12627
|
* gating, alert filtering, …) — no other surface needs to change.
|
|
12560
12628
|
*/
|
|
12561
|
-
var ZoneRuleStageEnum = _enum([
|
|
12629
|
+
var ZoneRuleStageEnum = _enum([
|
|
12630
|
+
"motion",
|
|
12631
|
+
"detection",
|
|
12632
|
+
"package"
|
|
12633
|
+
]);
|
|
12562
12634
|
DeviceType.Camera, method(object({
|
|
12563
12635
|
deviceId: number$1(),
|
|
12564
12636
|
stage: ZoneRuleStageEnum
|
|
@@ -12571,7 +12643,8 @@ DeviceType.Camera, method(object({
|
|
|
12571
12643
|
auth: "admin"
|
|
12572
12644
|
}), object({
|
|
12573
12645
|
motion: array(ZoneRuleSchema).readonly(),
|
|
12574
|
-
detection: array(ZoneRuleSchema).readonly()
|
|
12646
|
+
detection: array(ZoneRuleSchema).readonly(),
|
|
12647
|
+
package: array(ZoneRuleSchema).readonly()
|
|
12575
12648
|
});
|
|
12576
12649
|
var ProviderStatusSchema = object({
|
|
12577
12650
|
connected: boolean(),
|
|
@@ -15779,6 +15852,7 @@ var EventKindIconSchema = _enum([
|
|
|
15779
15852
|
"smoke",
|
|
15780
15853
|
"water",
|
|
15781
15854
|
"button",
|
|
15855
|
+
"package",
|
|
15782
15856
|
"generic"
|
|
15783
15857
|
]);
|
|
15784
15858
|
var EventKindCategorySchema = _enum([
|
|
@@ -15786,7 +15860,8 @@ var EventKindCategorySchema = _enum([
|
|
|
15786
15860
|
"audio",
|
|
15787
15861
|
"detection",
|
|
15788
15862
|
"sensor",
|
|
15789
|
-
"custom"
|
|
15863
|
+
"custom",
|
|
15864
|
+
"package"
|
|
15790
15865
|
]);
|
|
15791
15866
|
var EventKindDescriptorSchema = object({
|
|
15792
15867
|
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
@@ -19432,6 +19507,108 @@ method(object({
|
|
|
19432
19507
|
auth: "admin"
|
|
19433
19508
|
});
|
|
19434
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
|
+
/**
|
|
19435
19612
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
19436
19613
|
* payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
|
|
19437
19614
|
* `deviceId`.
|
|
@@ -23355,6 +23532,42 @@ Object.freeze({
|
|
|
23355
23532
|
addonId: null,
|
|
23356
23533
|
access: "create"
|
|
23357
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
|
+
},
|
|
23358
23571
|
"sceneMonitor.captureReference": {
|
|
23359
23572
|
capName: "scene-monitor",
|
|
23360
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",
|