@camstack/addon-provider-onvif 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
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
//#region \0rolldown/runtime.js
|
|
3
3
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
4
4
|
//#endregion
|
|
5
|
-
//#region ../types/dist/event-category-
|
|
5
|
+
//#region ../types/dist/event-category-D4HJq7Mw.mjs
|
|
6
6
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
7
7
|
EventCategory["SystemBoot"] = "system.boot";
|
|
8
8
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -155,6 +155,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
155
155
|
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
156
156
|
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
157
157
|
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
158
|
+
/** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
|
|
159
|
+
* progress bar the client reconciles via `recordingExport.getExport`. */
|
|
160
|
+
EventCategory["RecordingExportProgress"] = "recording.export.progress";
|
|
161
|
+
EventCategory["RecordingExportCompleted"] = "recording.export.completed";
|
|
162
|
+
EventCategory["RecordingExportFailed"] = "recording.export.failed";
|
|
158
163
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
159
164
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
160
165
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -444,6 +449,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
444
449
|
*/
|
|
445
450
|
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
446
451
|
/**
|
|
452
|
+
* Fired by `addon-post-analysis` when a package-drop is confirmed inside
|
|
453
|
+
* a package zone — a newly-appeared stationary object of a package class
|
|
454
|
+
* that cleared the class / zone / dwell / size gates. Payload:
|
|
455
|
+
* `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
|
|
456
|
+
* entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
|
|
457
|
+
* Telemetry (D8): the durable record is the `package-events` store row;
|
|
458
|
+
* this bus topic drives notifier rules + live UI. See
|
|
459
|
+
* docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
|
|
460
|
+
*/
|
|
461
|
+
EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
|
|
462
|
+
/**
|
|
463
|
+
* Fired by `addon-post-analysis` when a previously-delivered package
|
|
464
|
+
* leaves its zone (the stationary entry departed — moved or swept).
|
|
465
|
+
* Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
|
|
466
|
+
* `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
|
|
467
|
+
* Telemetry (D8). See package-zones-design §5.2.
|
|
468
|
+
*/
|
|
469
|
+
EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
|
|
470
|
+
/**
|
|
447
471
|
* Fired by `addon-post-analysis` whenever a gallery face row changes:
|
|
448
472
|
* `kind:'buffered'` a new detected face was persisted, `'assigned'` /
|
|
449
473
|
* `'unassigned'` its identity link changed, `'deleted'` the row was
|
|
@@ -5182,6 +5206,25 @@ function _instanceof(cls, params = {}) {
|
|
|
5182
5206
|
};
|
|
5183
5207
|
return inst;
|
|
5184
5208
|
}
|
|
5209
|
+
//#endregion
|
|
5210
|
+
//#region ../../node_modules/zod/v4/classic/compat.js
|
|
5211
|
+
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
|
5212
|
+
var ZodIssueCode = {
|
|
5213
|
+
invalid_type: "invalid_type",
|
|
5214
|
+
too_big: "too_big",
|
|
5215
|
+
too_small: "too_small",
|
|
5216
|
+
invalid_format: "invalid_format",
|
|
5217
|
+
not_multiple_of: "not_multiple_of",
|
|
5218
|
+
unrecognized_keys: "unrecognized_keys",
|
|
5219
|
+
invalid_union: "invalid_union",
|
|
5220
|
+
invalid_key: "invalid_key",
|
|
5221
|
+
invalid_element: "invalid_element",
|
|
5222
|
+
invalid_value: "invalid_value",
|
|
5223
|
+
custom: "custom"
|
|
5224
|
+
};
|
|
5225
|
+
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
|
|
5226
|
+
var ZodFirstPartyTypeKind;
|
|
5227
|
+
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5185
5228
|
Object.fromEntries([
|
|
5186
5229
|
{
|
|
5187
5230
|
id: "overview",
|
|
@@ -12719,7 +12762,11 @@ array(ZoneRuleSchema).readonly();
|
|
|
12719
12762
|
* Extend the enum here when a new gating consumer comes online (audio
|
|
12720
12763
|
* gating, alert filtering, …) — no other surface needs to change.
|
|
12721
12764
|
*/
|
|
12722
|
-
var ZoneRuleStageEnum = _enum([
|
|
12765
|
+
var ZoneRuleStageEnum = _enum([
|
|
12766
|
+
"motion",
|
|
12767
|
+
"detection",
|
|
12768
|
+
"package"
|
|
12769
|
+
]);
|
|
12723
12770
|
DeviceType.Camera, method(object({
|
|
12724
12771
|
deviceId: number(),
|
|
12725
12772
|
stage: ZoneRuleStageEnum
|
|
@@ -12732,7 +12779,8 @@ DeviceType.Camera, method(object({
|
|
|
12732
12779
|
auth: "admin"
|
|
12733
12780
|
}), object({
|
|
12734
12781
|
motion: array(ZoneRuleSchema).readonly(),
|
|
12735
|
-
detection: array(ZoneRuleSchema).readonly()
|
|
12782
|
+
detection: array(ZoneRuleSchema).readonly(),
|
|
12783
|
+
package: array(ZoneRuleSchema).readonly()
|
|
12736
12784
|
});
|
|
12737
12785
|
var ProviderStatusSchema = object({
|
|
12738
12786
|
connected: boolean(),
|
|
@@ -16209,6 +16257,7 @@ var EventKindIconSchema = _enum([
|
|
|
16209
16257
|
"smoke",
|
|
16210
16258
|
"water",
|
|
16211
16259
|
"button",
|
|
16260
|
+
"package",
|
|
16212
16261
|
"generic"
|
|
16213
16262
|
]);
|
|
16214
16263
|
var EventKindCategorySchema = _enum([
|
|
@@ -16216,7 +16265,8 @@ var EventKindCategorySchema = _enum([
|
|
|
16216
16265
|
"audio",
|
|
16217
16266
|
"detection",
|
|
16218
16267
|
"sensor",
|
|
16219
|
-
"custom"
|
|
16268
|
+
"custom",
|
|
16269
|
+
"package"
|
|
16220
16270
|
]);
|
|
16221
16271
|
var EventKindDescriptorSchema = object({
|
|
16222
16272
|
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
@@ -19955,6 +20005,108 @@ method(object({
|
|
|
19955
20005
|
auth: "admin"
|
|
19956
20006
|
});
|
|
19957
20007
|
/**
|
|
20008
|
+
* `recordingExport` cap — render a footage time range into a single downloadable
|
|
20009
|
+
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
20010
|
+
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
20011
|
+
* delete-after-download.
|
|
20012
|
+
*
|
|
20013
|
+
* Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
|
|
20014
|
+
* recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
|
|
20015
|
+
* default `hub`) registers it. Device-scoped methods carry `deviceId` in their
|
|
20016
|
+
* input and dispatch to that single provider; the render runs on the node that
|
|
20017
|
+
* owns the footage (no cross-node segment transfer). Download rides the
|
|
20018
|
+
* framework addon data-plane. State persists in a DurableState blob (NOT
|
|
20019
|
+
* SQLite); history rows survive file deletion for audit.
|
|
20020
|
+
*/
|
|
20021
|
+
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
20022
|
+
var ExportSpeedSchema = number().min(.25).max(32);
|
|
20023
|
+
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
20024
|
+
var ExportTimelapseSchema = object({
|
|
20025
|
+
everyMs: number().int().positive(),
|
|
20026
|
+
outputFps: number().int().min(1).max(60).optional()
|
|
20027
|
+
});
|
|
20028
|
+
/**
|
|
20029
|
+
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
20030
|
+
* is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
|
|
20031
|
+
* silent. `maxLifeMs` bounds how long the finished file is kept;
|
|
20032
|
+
* `deleteAfterDownload` removes it shortly after the first complete download.
|
|
20033
|
+
*/
|
|
20034
|
+
var ExportOptionsSchema = object({
|
|
20035
|
+
speed: ExportSpeedSchema.optional(),
|
|
20036
|
+
timelapse: ExportTimelapseSchema.optional(),
|
|
20037
|
+
includeAudio: boolean(),
|
|
20038
|
+
maxLifeMs: number().int().positive(),
|
|
20039
|
+
deleteAfterDownload: boolean(),
|
|
20040
|
+
title: string().max(200).optional()
|
|
20041
|
+
}).superRefine((v, ctx) => {
|
|
20042
|
+
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
20043
|
+
code: ZodIssueCode.custom,
|
|
20044
|
+
message: "speed and timelapse are mutually exclusive",
|
|
20045
|
+
path: ["timelapse"]
|
|
20046
|
+
});
|
|
20047
|
+
});
|
|
20048
|
+
var ExportStateSchema = _enum([
|
|
20049
|
+
"queued",
|
|
20050
|
+
"rendering",
|
|
20051
|
+
"ready",
|
|
20052
|
+
"failed",
|
|
20053
|
+
"expired",
|
|
20054
|
+
"deleted"
|
|
20055
|
+
]);
|
|
20056
|
+
/** One export job / history row. */
|
|
20057
|
+
var ExportRecordSchema = object({
|
|
20058
|
+
id: string(),
|
|
20059
|
+
deviceId: number(),
|
|
20060
|
+
profile: string(),
|
|
20061
|
+
fromMs: number(),
|
|
20062
|
+
toMs: number(),
|
|
20063
|
+
options: ExportOptionsSchema,
|
|
20064
|
+
state: ExportStateSchema,
|
|
20065
|
+
/** 0–100 while rendering; null otherwise. */
|
|
20066
|
+
progressPct: number().nullable(),
|
|
20067
|
+
/** File size once ready; null before. */
|
|
20068
|
+
fileBytes: number().nullable(),
|
|
20069
|
+
expiresAt: number(),
|
|
20070
|
+
deleteAfterDownload: boolean(),
|
|
20071
|
+
/** Epoch of the first complete download; null until then. */
|
|
20072
|
+
downloadedAt: number().nullable(),
|
|
20073
|
+
createdAt: number(),
|
|
20074
|
+
/** User id/name that requested the export. */
|
|
20075
|
+
createdBy: string(),
|
|
20076
|
+
/** Failure reason when state is 'failed'; null otherwise. */
|
|
20077
|
+
error: string().nullable()
|
|
20078
|
+
});
|
|
20079
|
+
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
20080
|
+
var ExportDownloadSchema = object({
|
|
20081
|
+
url: string(),
|
|
20082
|
+
endpoints: array(string())
|
|
20083
|
+
});
|
|
20084
|
+
method(object({
|
|
20085
|
+
deviceId: number(),
|
|
20086
|
+
profile: string(),
|
|
20087
|
+
fromMs: number(),
|
|
20088
|
+
toMs: number(),
|
|
20089
|
+
options: ExportOptionsSchema
|
|
20090
|
+
}), ExportRecordSchema, {
|
|
20091
|
+
kind: "mutation",
|
|
20092
|
+
auth: "protected"
|
|
20093
|
+
}), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
|
|
20094
|
+
kind: "query",
|
|
20095
|
+
auth: "protected"
|
|
20096
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
20097
|
+
kind: "query",
|
|
20098
|
+
auth: "protected"
|
|
20099
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
20100
|
+
kind: "mutation",
|
|
20101
|
+
auth: "protected"
|
|
20102
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
20103
|
+
kind: "mutation",
|
|
20104
|
+
auth: "protected"
|
|
20105
|
+
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
20106
|
+
kind: "query",
|
|
20107
|
+
auth: "protected"
|
|
20108
|
+
});
|
|
20109
|
+
/**
|
|
19958
20110
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
19959
20111
|
* payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
|
|
19960
20112
|
* `deviceId`.
|
|
@@ -23878,6 +24030,42 @@ Object.freeze({
|
|
|
23878
24030
|
addonId: null,
|
|
23879
24031
|
access: "create"
|
|
23880
24032
|
},
|
|
24033
|
+
"recordingExport.cancelExport": {
|
|
24034
|
+
capName: "recordingExport",
|
|
24035
|
+
capScope: "system",
|
|
24036
|
+
addonId: null,
|
|
24037
|
+
access: "create"
|
|
24038
|
+
},
|
|
24039
|
+
"recordingExport.createExport": {
|
|
24040
|
+
capName: "recordingExport",
|
|
24041
|
+
capScope: "system",
|
|
24042
|
+
addonId: null,
|
|
24043
|
+
access: "create"
|
|
24044
|
+
},
|
|
24045
|
+
"recordingExport.deleteExport": {
|
|
24046
|
+
capName: "recordingExport",
|
|
24047
|
+
capScope: "system",
|
|
24048
|
+
addonId: null,
|
|
24049
|
+
access: "delete"
|
|
24050
|
+
},
|
|
24051
|
+
"recordingExport.getDownloadUrl": {
|
|
24052
|
+
capName: "recordingExport",
|
|
24053
|
+
capScope: "system",
|
|
24054
|
+
addonId: null,
|
|
24055
|
+
access: "view"
|
|
24056
|
+
},
|
|
24057
|
+
"recordingExport.getExport": {
|
|
24058
|
+
capName: "recordingExport",
|
|
24059
|
+
capScope: "system",
|
|
24060
|
+
addonId: null,
|
|
24061
|
+
access: "view"
|
|
24062
|
+
},
|
|
24063
|
+
"recordingExport.listExports": {
|
|
24064
|
+
capName: "recordingExport",
|
|
24065
|
+
capScope: "system",
|
|
24066
|
+
addonId: null,
|
|
24067
|
+
access: "view"
|
|
24068
|
+
},
|
|
23881
24069
|
"sceneMonitor.captureReference": {
|
|
23882
24070
|
capName: "scene-monitor",
|
|
23883
24071
|
capScope: "device",
|
package/dist/addon.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { createRequire } from "node:module";
|
|
|
3
3
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
4
4
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
5
5
|
//#endregion
|
|
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",
|
|
@@ -12720,7 +12763,11 @@ array(ZoneRuleSchema).readonly();
|
|
|
12720
12763
|
* Extend the enum here when a new gating consumer comes online (audio
|
|
12721
12764
|
* gating, alert filtering, …) — no other surface needs to change.
|
|
12722
12765
|
*/
|
|
12723
|
-
var ZoneRuleStageEnum = _enum([
|
|
12766
|
+
var ZoneRuleStageEnum = _enum([
|
|
12767
|
+
"motion",
|
|
12768
|
+
"detection",
|
|
12769
|
+
"package"
|
|
12770
|
+
]);
|
|
12724
12771
|
DeviceType.Camera, method(object({
|
|
12725
12772
|
deviceId: number(),
|
|
12726
12773
|
stage: ZoneRuleStageEnum
|
|
@@ -12733,7 +12780,8 @@ DeviceType.Camera, method(object({
|
|
|
12733
12780
|
auth: "admin"
|
|
12734
12781
|
}), object({
|
|
12735
12782
|
motion: array(ZoneRuleSchema).readonly(),
|
|
12736
|
-
detection: array(ZoneRuleSchema).readonly()
|
|
12783
|
+
detection: array(ZoneRuleSchema).readonly(),
|
|
12784
|
+
package: array(ZoneRuleSchema).readonly()
|
|
12737
12785
|
});
|
|
12738
12786
|
var ProviderStatusSchema = object({
|
|
12739
12787
|
connected: boolean(),
|
|
@@ -16210,6 +16258,7 @@ var EventKindIconSchema = _enum([
|
|
|
16210
16258
|
"smoke",
|
|
16211
16259
|
"water",
|
|
16212
16260
|
"button",
|
|
16261
|
+
"package",
|
|
16213
16262
|
"generic"
|
|
16214
16263
|
]);
|
|
16215
16264
|
var EventKindCategorySchema = _enum([
|
|
@@ -16217,7 +16266,8 @@ var EventKindCategorySchema = _enum([
|
|
|
16217
16266
|
"audio",
|
|
16218
16267
|
"detection",
|
|
16219
16268
|
"sensor",
|
|
16220
|
-
"custom"
|
|
16269
|
+
"custom",
|
|
16270
|
+
"package"
|
|
16221
16271
|
]);
|
|
16222
16272
|
var EventKindDescriptorSchema = object({
|
|
16223
16273
|
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
@@ -19956,6 +20006,108 @@ method(object({
|
|
|
19956
20006
|
auth: "admin"
|
|
19957
20007
|
});
|
|
19958
20008
|
/**
|
|
20009
|
+
* `recordingExport` cap — render a footage time range into a single downloadable
|
|
20010
|
+
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
20011
|
+
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
20012
|
+
* delete-after-download.
|
|
20013
|
+
*
|
|
20014
|
+
* Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
|
|
20015
|
+
* recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
|
|
20016
|
+
* default `hub`) registers it. Device-scoped methods carry `deviceId` in their
|
|
20017
|
+
* input and dispatch to that single provider; the render runs on the node that
|
|
20018
|
+
* owns the footage (no cross-node segment transfer). Download rides the
|
|
20019
|
+
* framework addon data-plane. State persists in a DurableState blob (NOT
|
|
20020
|
+
* SQLite); history rows survive file deletion for audit.
|
|
20021
|
+
*/
|
|
20022
|
+
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
20023
|
+
var ExportSpeedSchema = number().min(.25).max(32);
|
|
20024
|
+
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
20025
|
+
var ExportTimelapseSchema = object({
|
|
20026
|
+
everyMs: number().int().positive(),
|
|
20027
|
+
outputFps: number().int().min(1).max(60).optional()
|
|
20028
|
+
});
|
|
20029
|
+
/**
|
|
20030
|
+
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
20031
|
+
* is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
|
|
20032
|
+
* silent. `maxLifeMs` bounds how long the finished file is kept;
|
|
20033
|
+
* `deleteAfterDownload` removes it shortly after the first complete download.
|
|
20034
|
+
*/
|
|
20035
|
+
var ExportOptionsSchema = object({
|
|
20036
|
+
speed: ExportSpeedSchema.optional(),
|
|
20037
|
+
timelapse: ExportTimelapseSchema.optional(),
|
|
20038
|
+
includeAudio: boolean(),
|
|
20039
|
+
maxLifeMs: number().int().positive(),
|
|
20040
|
+
deleteAfterDownload: boolean(),
|
|
20041
|
+
title: string().max(200).optional()
|
|
20042
|
+
}).superRefine((v, ctx) => {
|
|
20043
|
+
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
20044
|
+
code: ZodIssueCode.custom,
|
|
20045
|
+
message: "speed and timelapse are mutually exclusive",
|
|
20046
|
+
path: ["timelapse"]
|
|
20047
|
+
});
|
|
20048
|
+
});
|
|
20049
|
+
var ExportStateSchema = _enum([
|
|
20050
|
+
"queued",
|
|
20051
|
+
"rendering",
|
|
20052
|
+
"ready",
|
|
20053
|
+
"failed",
|
|
20054
|
+
"expired",
|
|
20055
|
+
"deleted"
|
|
20056
|
+
]);
|
|
20057
|
+
/** One export job / history row. */
|
|
20058
|
+
var ExportRecordSchema = object({
|
|
20059
|
+
id: string(),
|
|
20060
|
+
deviceId: number(),
|
|
20061
|
+
profile: string(),
|
|
20062
|
+
fromMs: number(),
|
|
20063
|
+
toMs: number(),
|
|
20064
|
+
options: ExportOptionsSchema,
|
|
20065
|
+
state: ExportStateSchema,
|
|
20066
|
+
/** 0–100 while rendering; null otherwise. */
|
|
20067
|
+
progressPct: number().nullable(),
|
|
20068
|
+
/** File size once ready; null before. */
|
|
20069
|
+
fileBytes: number().nullable(),
|
|
20070
|
+
expiresAt: number(),
|
|
20071
|
+
deleteAfterDownload: boolean(),
|
|
20072
|
+
/** Epoch of the first complete download; null until then. */
|
|
20073
|
+
downloadedAt: number().nullable(),
|
|
20074
|
+
createdAt: number(),
|
|
20075
|
+
/** User id/name that requested the export. */
|
|
20076
|
+
createdBy: string(),
|
|
20077
|
+
/** Failure reason when state is 'failed'; null otherwise. */
|
|
20078
|
+
error: string().nullable()
|
|
20079
|
+
});
|
|
20080
|
+
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
20081
|
+
var ExportDownloadSchema = object({
|
|
20082
|
+
url: string(),
|
|
20083
|
+
endpoints: array(string())
|
|
20084
|
+
});
|
|
20085
|
+
method(object({
|
|
20086
|
+
deviceId: number(),
|
|
20087
|
+
profile: string(),
|
|
20088
|
+
fromMs: number(),
|
|
20089
|
+
toMs: number(),
|
|
20090
|
+
options: ExportOptionsSchema
|
|
20091
|
+
}), ExportRecordSchema, {
|
|
20092
|
+
kind: "mutation",
|
|
20093
|
+
auth: "protected"
|
|
20094
|
+
}), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
|
|
20095
|
+
kind: "query",
|
|
20096
|
+
auth: "protected"
|
|
20097
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
20098
|
+
kind: "query",
|
|
20099
|
+
auth: "protected"
|
|
20100
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
20101
|
+
kind: "mutation",
|
|
20102
|
+
auth: "protected"
|
|
20103
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
20104
|
+
kind: "mutation",
|
|
20105
|
+
auth: "protected"
|
|
20106
|
+
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
20107
|
+
kind: "query",
|
|
20108
|
+
auth: "protected"
|
|
20109
|
+
});
|
|
20110
|
+
/**
|
|
19959
20111
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
19960
20112
|
* payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
|
|
19961
20113
|
* `deviceId`.
|
|
@@ -23879,6 +24031,42 @@ Object.freeze({
|
|
|
23879
24031
|
addonId: null,
|
|
23880
24032
|
access: "create"
|
|
23881
24033
|
},
|
|
24034
|
+
"recordingExport.cancelExport": {
|
|
24035
|
+
capName: "recordingExport",
|
|
24036
|
+
capScope: "system",
|
|
24037
|
+
addonId: null,
|
|
24038
|
+
access: "create"
|
|
24039
|
+
},
|
|
24040
|
+
"recordingExport.createExport": {
|
|
24041
|
+
capName: "recordingExport",
|
|
24042
|
+
capScope: "system",
|
|
24043
|
+
addonId: null,
|
|
24044
|
+
access: "create"
|
|
24045
|
+
},
|
|
24046
|
+
"recordingExport.deleteExport": {
|
|
24047
|
+
capName: "recordingExport",
|
|
24048
|
+
capScope: "system",
|
|
24049
|
+
addonId: null,
|
|
24050
|
+
access: "delete"
|
|
24051
|
+
},
|
|
24052
|
+
"recordingExport.getDownloadUrl": {
|
|
24053
|
+
capName: "recordingExport",
|
|
24054
|
+
capScope: "system",
|
|
24055
|
+
addonId: null,
|
|
24056
|
+
access: "view"
|
|
24057
|
+
},
|
|
24058
|
+
"recordingExport.getExport": {
|
|
24059
|
+
capName: "recordingExport",
|
|
24060
|
+
capScope: "system",
|
|
24061
|
+
addonId: null,
|
|
24062
|
+
access: "view"
|
|
24063
|
+
},
|
|
24064
|
+
"recordingExport.listExports": {
|
|
24065
|
+
capName: "recordingExport",
|
|
24066
|
+
capScope: "system",
|
|
24067
|
+
addonId: null,
|
|
24068
|
+
access: "view"
|
|
24069
|
+
},
|
|
23882
24070
|
"sceneMonitor.captureReference": {
|
|
23883
24071
|
capName: "scene-monitor",
|
|
23884
24072
|
capScope: "device",
|