@camstack/addon-remote-storage 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/s3.addon.js +1 -1
- package/dist/s3.addon.mjs +1 -1
- package/dist/sftp.addon.js +1 -1
- package/dist/sftp.addon.mjs +1 -1
- package/dist/{shared-BMMO0bPW.js → shared-BuH7csTY.js} +176 -12
- package/dist/{shared-CZllXqB6.mjs → shared-uJtt1S2z.mjs} +176 -12
- package/dist/webdav.addon.js +1 -1
- package/dist/webdav.addon.mjs +1 -1
- package/package.json +1 -1
package/dist/s3.addon.js
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_shared = require("./shared-
|
|
5
|
+
const require_shared = require("./shared-BuH7csTY.js");
|
|
6
6
|
let node_stream = require("node:stream");
|
|
7
7
|
let _aws_sdk_client_s3 = require("@aws-sdk/client-s3");
|
|
8
8
|
let _aws_sdk_lib_storage = require("@aws-sdk/lib-storage");
|
package/dist/s3.addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as BaseAddon, i as rearmIdleAbort, n as getOptionalBasePath, o as scheduleIdleAbort, s as storageProviderCapability, t as createSessionId } from "./shared-
|
|
1
|
+
import { c as BaseAddon, i as rearmIdleAbort, n as getOptionalBasePath, o as scheduleIdleAbort, s as storageProviderCapability, t as createSessionId } from "./shared-uJtt1S2z.mjs";
|
|
2
2
|
import { PassThrough } from "node:stream";
|
|
3
3
|
import { DeleteObjectCommand, GetObjectCommand, HeadBucketCommand, HeadObjectCommand, ListObjectsV2Command, PutObjectCommand, S3Client } from "@aws-sdk/client-s3";
|
|
4
4
|
import { Upload } from "@aws-sdk/lib-storage";
|
package/dist/sftp.addon.js
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_shared = require("./shared-
|
|
5
|
+
const require_shared = require("./shared-BuH7csTY.js");
|
|
6
6
|
let ssh2 = require("ssh2");
|
|
7
7
|
let node_path = require("node:path");
|
|
8
8
|
node_path = require_shared.__toESM(node_path);
|
package/dist/sftp.addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-
|
|
1
|
+
import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-uJtt1S2z.mjs";
|
|
2
2
|
import { Client } from "ssh2";
|
|
3
3
|
import * as path from "node:path";
|
|
4
4
|
//#region src/providers/sftp/sftp-config-schema.ts
|
|
@@ -23,7 +23,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
23
23
|
let node_path = require("node:path");
|
|
24
24
|
node_path = __toESM(node_path);
|
|
25
25
|
let node_crypto = require("node:crypto");
|
|
26
|
-
//#region ../types/dist/event-category-
|
|
26
|
+
//#region ../types/dist/event-category-H4AVePnn.mjs
|
|
27
27
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
28
28
|
EventCategory["SystemBoot"] = "system.boot";
|
|
29
29
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -173,6 +173,9 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
173
173
|
EventCategory["RecordingSegmentWritten"] = "recording.segment.written";
|
|
174
174
|
EventCategory["RecordingPolicyFallback"] = "recording.policy.fallback";
|
|
175
175
|
EventCategory["RecordingRetentionCompleted"] = "recording.retention.completed";
|
|
176
|
+
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
177
|
+
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
178
|
+
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
176
179
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
177
180
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
178
181
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -9837,7 +9840,7 @@ object({
|
|
|
9837
9840
|
deviceId: number(),
|
|
9838
9841
|
timestamp: number()
|
|
9839
9842
|
});
|
|
9840
|
-
DeviceType.Button;
|
|
9843
|
+
DeviceType.Button, DeviceType.Camera;
|
|
9841
9844
|
/**
|
|
9842
9845
|
* Enum-state sensor — a string value picked from a finite option set.
|
|
9843
9846
|
* Drives HA `sensor` entries with `state_class: enum` (HVAC action
|
|
@@ -14207,6 +14210,14 @@ var ConfigEntrySchema = object({
|
|
|
14207
14210
|
value: unknown(),
|
|
14208
14211
|
description: string().optional()
|
|
14209
14212
|
});
|
|
14213
|
+
var DeviceLinkModeSchema = _enum(["auto", "manual"]);
|
|
14214
|
+
/** One resolved linked device — the compact projection consumers need. */
|
|
14215
|
+
var LinkedDeviceSchema = object({
|
|
14216
|
+
deviceId: number(),
|
|
14217
|
+
name: string(),
|
|
14218
|
+
location: string().nullable(),
|
|
14219
|
+
features: array(string())
|
|
14220
|
+
});
|
|
14210
14221
|
var SavedDeviceRowSchema = object({
|
|
14211
14222
|
/** Numeric id reserved at allocateDeviceId time. */
|
|
14212
14223
|
id: number(),
|
|
@@ -14428,7 +14439,10 @@ method(object({
|
|
|
14428
14439
|
}), _void(), {
|
|
14429
14440
|
kind: "mutation",
|
|
14430
14441
|
auth: "admin"
|
|
14431
|
-
}), method(object({ addonId: string() }), array(SavedDeviceRowSchema)), method(object({ addonId: string().optional() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }),
|
|
14442
|
+
}), method(object({ addonId: string() }), array(SavedDeviceRowSchema)), method(object({ addonId: string().optional() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
|
|
14443
|
+
mode: DeviceLinkModeSchema,
|
|
14444
|
+
devices: array(LinkedDeviceSchema)
|
|
14445
|
+
})), method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
|
|
14432
14446
|
deviceId: number(),
|
|
14433
14447
|
values: record(string(), unknown())
|
|
14434
14448
|
}), object({ success: literal(true) }), {
|
|
@@ -15697,6 +15711,61 @@ var EventKindSchema = _enum([
|
|
|
15697
15711
|
"object",
|
|
15698
15712
|
"audio"
|
|
15699
15713
|
]);
|
|
15714
|
+
/**
|
|
15715
|
+
* Spatial filter for `listTracks` — the rect + polygon variants of the shared
|
|
15716
|
+
* MaskShape vocabulary (see `mask-shape.ts`). Coordinates are NORMALIZED 0..1
|
|
15717
|
+
* of the camera frame (top-left origin), matching the drawing-plane editor.
|
|
15718
|
+
*/
|
|
15719
|
+
var TrackZoneFilterSchema = discriminatedUnion("kind", [MaskRectShapeSchema, MaskPolygonShapeSchema]);
|
|
15720
|
+
/** Closed icon vocabulary so clients render a known glyph per kind. */
|
|
15721
|
+
var EventKindIconSchema = _enum([
|
|
15722
|
+
"motion",
|
|
15723
|
+
"audio",
|
|
15724
|
+
"person",
|
|
15725
|
+
"vehicle",
|
|
15726
|
+
"animal",
|
|
15727
|
+
"door",
|
|
15728
|
+
"pir",
|
|
15729
|
+
"smoke",
|
|
15730
|
+
"water",
|
|
15731
|
+
"button",
|
|
15732
|
+
"generic"
|
|
15733
|
+
]);
|
|
15734
|
+
var EventKindCategorySchema = _enum([
|
|
15735
|
+
"motion",
|
|
15736
|
+
"audio",
|
|
15737
|
+
"detection",
|
|
15738
|
+
"sensor",
|
|
15739
|
+
"custom"
|
|
15740
|
+
]);
|
|
15741
|
+
var EventKindDescriptorSchema = object({
|
|
15742
|
+
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
15743
|
+
kind: string(),
|
|
15744
|
+
label: string(),
|
|
15745
|
+
/** Hex color for timeline/legend rendering. */
|
|
15746
|
+
color: string(),
|
|
15747
|
+
icon: EventKindIconSchema,
|
|
15748
|
+
category: EventKindCategorySchema,
|
|
15749
|
+
/** Which cap + device contributes this kind. For built-ins the camera
|
|
15750
|
+
* itself; for sensor kinds the LINKED source device. */
|
|
15751
|
+
source: object({
|
|
15752
|
+
capName: string(),
|
|
15753
|
+
deviceId: number()
|
|
15754
|
+
})
|
|
15755
|
+
});
|
|
15756
|
+
var SensorEventSchema = object({
|
|
15757
|
+
id: string(),
|
|
15758
|
+
/** The CAMERA the event is attributed to (a sensor linked to N cameras
|
|
15759
|
+
* yields N rows, one per camera). */
|
|
15760
|
+
deviceId: number(),
|
|
15761
|
+
/** The linked sensor device whose state changed. */
|
|
15762
|
+
sourceDeviceId: number(),
|
|
15763
|
+
/** Event kind id — matches an `EventKindDescriptor.kind`. */
|
|
15764
|
+
kind: string(),
|
|
15765
|
+
/** Snapshot of the sensor cap's runtime-state slice at the change. */
|
|
15766
|
+
value: record(string(), unknown()).nullable(),
|
|
15767
|
+
timestamp: number()
|
|
15768
|
+
});
|
|
15700
15769
|
var TrackPositionSchema = object({
|
|
15701
15770
|
x: number(),
|
|
15702
15771
|
y: number(),
|
|
@@ -15710,6 +15779,30 @@ var TrackSnapshotSchema = object({
|
|
|
15710
15779
|
mediaKey: string()
|
|
15711
15780
|
});
|
|
15712
15781
|
/**
|
|
15782
|
+
* Normalized 0..1 trajectory envelope (min/max over every position bbox,
|
|
15783
|
+
* divided by the track's detection-frame dims), computed at persist time.
|
|
15784
|
+
* Absent when the frame dims were unknown when the track was persisted
|
|
15785
|
+
* (legacy rows / dims-less sources) and on active (in-RAM) tracks.
|
|
15786
|
+
*/
|
|
15787
|
+
var TrackEnvelopeSchema = object({
|
|
15788
|
+
minX: number(),
|
|
15789
|
+
minY: number(),
|
|
15790
|
+
maxX: number(),
|
|
15791
|
+
maxY: number()
|
|
15792
|
+
});
|
|
15793
|
+
/**
|
|
15794
|
+
* Row projection for track list queries. `full` (default) returns the
|
|
15795
|
+
* complete Track including the frame-rate `positions[]` history and the
|
|
15796
|
+
* `snapshots[]` references — megabytes across a page of tracks. `slim`
|
|
15797
|
+
* keeps every scalar the list surfaces actually render (ids, class(es),
|
|
15798
|
+
* label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
|
|
15799
|
+
* zonesVisited, bestEventId, envelope) and returns `positions` /
|
|
15800
|
+
* `snapshots` as EMPTY arrays — detail views re-fetch the full row via
|
|
15801
|
+
* `getTrack`. Mirrors the event-store `projection` convention
|
|
15802
|
+
* (`getObjectEvents` et al.).
|
|
15803
|
+
*/
|
|
15804
|
+
var TrackProjectionSchema = _enum(["full", "slim"]);
|
|
15805
|
+
/**
|
|
15713
15806
|
* One audio-classification label heard on the track's camera while the
|
|
15714
15807
|
* track was alive, aggregated per label. An "episode" is one persisted
|
|
15715
15808
|
* audio event (the confident-classification path: score ≥ the device's
|
|
@@ -15760,7 +15853,11 @@ var TrackSchema = object({
|
|
|
15760
15853
|
/** Audio-classification labels heard on the camera during the track's
|
|
15761
15854
|
* life (score ≥ device `classificationMinScore`), aggregated per label.
|
|
15762
15855
|
* Absent on legacy rows / tracks with no confident audio. */
|
|
15763
|
-
audioLabels: array(TrackAudioLabelSchema).readonly().optional()
|
|
15856
|
+
audioLabels: array(TrackAudioLabelSchema).readonly().optional(),
|
|
15857
|
+
/** Normalized 0..1 trajectory envelope (see {@link TrackEnvelopeSchema}).
|
|
15858
|
+
* Populated from the persisted envelope columns on historical reads;
|
|
15859
|
+
* absent on legacy rows, dims-less tracks and active (in-RAM) tracks. */
|
|
15860
|
+
envelope: TrackEnvelopeSchema.optional()
|
|
15764
15861
|
});
|
|
15765
15862
|
var BaseEventFields = {
|
|
15766
15863
|
id: string(),
|
|
@@ -15870,11 +15967,13 @@ var MediaFileSchema = object({
|
|
|
15870
15967
|
sizeBytes: number(),
|
|
15871
15968
|
timestamp: number()
|
|
15872
15969
|
});
|
|
15970
|
+
var DEFAULT_EVENT_QUERY_LIMIT = 1e3;
|
|
15971
|
+
var MAX_EVENT_QUERY_LIMIT = 5e3;
|
|
15873
15972
|
var DeviceEventQueryInput = object({
|
|
15874
15973
|
deviceId: number(),
|
|
15875
15974
|
since: number().optional(),
|
|
15876
15975
|
until: number().optional(),
|
|
15877
|
-
limit: number().int().min(1).max(
|
|
15976
|
+
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT),
|
|
15878
15977
|
/** `slim` drops heavy JSON fields (regions/bbox/zones) and carries an
|
|
15879
15978
|
* optional `mediaUrl` (populated by B5). `full` (default) keeps today's
|
|
15880
15979
|
* exact behaviour. Callers may omit this field — the store defaults to
|
|
@@ -15882,6 +15981,27 @@ var DeviceEventQueryInput = object({
|
|
|
15882
15981
|
projection: _enum(["full", "slim"]).optional()
|
|
15883
15982
|
});
|
|
15884
15983
|
var ObjectEventQueryInput = DeviceEventQueryInput.extend({ classFilter: string().optional() });
|
|
15984
|
+
var RecentTracksQueryInput = object({
|
|
15985
|
+
/** Devices to merge. An empty array yields `{ tracks: [], nextCursor: null }`. */
|
|
15986
|
+
deviceIds: array(number()),
|
|
15987
|
+
/** Window lower bound on `lastSeen` (inclusive). */
|
|
15988
|
+
since: number().optional(),
|
|
15989
|
+
/** Window upper bound on `lastSeen` (inclusive). */
|
|
15990
|
+
until: number().optional(),
|
|
15991
|
+
/** Page size. Default 200, max 1000. */
|
|
15992
|
+
limit: number().int().min(1).max(1e3).default(200),
|
|
15993
|
+
/** Opaque continuation cursor from a previous page's `nextCursor`.
|
|
15994
|
+
* Encodes the (lastSeen, trackId) sort position — treat as opaque. */
|
|
15995
|
+
cursor: string().optional(),
|
|
15996
|
+
/** See {@link TrackProjectionSchema}. Default `full`. */
|
|
15997
|
+
projection: TrackProjectionSchema.optional()
|
|
15998
|
+
});
|
|
15999
|
+
var RecentTracksPageSchema = object({
|
|
16000
|
+
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
16001
|
+
tracks: array(TrackSchema).readonly(),
|
|
16002
|
+
/** Cursor for the next page, or null when this page is the last. */
|
|
16003
|
+
nextCursor: string().nullable()
|
|
16004
|
+
});
|
|
15885
16005
|
var KeyEventQueryInput = object({
|
|
15886
16006
|
deviceId: number(),
|
|
15887
16007
|
/** Window lower bound (track firstSeen ≥ since). */
|
|
@@ -15964,11 +16084,25 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
15964
16084
|
deviceId: number(),
|
|
15965
16085
|
since: number().optional(),
|
|
15966
16086
|
until: number().optional(),
|
|
15967
|
-
limit: number().optional()
|
|
15968
|
-
|
|
15969
|
-
|
|
15970
|
-
|
|
15971
|
-
|
|
16087
|
+
limit: number().optional(),
|
|
16088
|
+
/** Spatial filter — only tracks whose trajectory intersects the zone
|
|
16089
|
+
* (normalized 0..1 rect or polygon). SQL-prefiltered on the persisted
|
|
16090
|
+
* envelope columns, then precisely tested per position. Tracks with
|
|
16091
|
+
* an unknown envelope (no frame dims at persist time) always match. */
|
|
16092
|
+
zone: TrackZoneFilterSchema.optional(),
|
|
16093
|
+
/** See {@link TrackProjectionSchema}. Default `full` (backward
|
|
16094
|
+
* compatible — omitting the field keeps today's exact behaviour). */
|
|
16095
|
+
projection: TrackProjectionSchema.optional()
|
|
16096
|
+
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
|
|
16097
|
+
kind: "mutation",
|
|
16098
|
+
auth: "admin"
|
|
16099
|
+
}), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({
|
|
16100
|
+
deviceId: number(),
|
|
16101
|
+
since: number().optional(),
|
|
16102
|
+
until: number().optional(),
|
|
16103
|
+
kinds: array(string()).optional(),
|
|
16104
|
+
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
16105
|
+
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
15972
16106
|
deviceId: number(),
|
|
15973
16107
|
since: number(),
|
|
15974
16108
|
until: number(),
|
|
@@ -19214,7 +19348,12 @@ var RecordingStorageUsageSchema = object({
|
|
|
19214
19348
|
/**
|
|
19215
19349
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
19216
19350
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
19217
|
-
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
19351
|
+
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
19352
|
+
* and the backward covered edge `prevEndMs` (exclusive end of the nearest
|
|
19353
|
+
* footage behind the epoch; `null` when none — optional so older providers
|
|
19354
|
+
* that omit it stay valid). `prevEndMs` lets a backward frame-step hop the
|
|
19355
|
+
* small inter-segment cracks (durMs under-covers the span to the next
|
|
19356
|
+
* startMs by ~11-17 ms) instead of no-opping at a segment head.
|
|
19218
19357
|
*/
|
|
19219
19358
|
var LocateSegmentResultSchema = discriminatedUnion("kind", [object({
|
|
19220
19359
|
kind: literal("segment"),
|
|
@@ -19223,7 +19362,8 @@ var LocateSegmentResultSchema = discriminatedUnion("kind", [object({
|
|
|
19223
19362
|
bytes: number()
|
|
19224
19363
|
}), object({
|
|
19225
19364
|
kind: literal("gap"),
|
|
19226
|
-
nearestEdgeMs: number().nullable()
|
|
19365
|
+
nearestEdgeMs: number().nullable(),
|
|
19366
|
+
prevEndMs: number().nullable().optional()
|
|
19227
19367
|
})]);
|
|
19228
19368
|
/** Raw bytes of one finalized footage segment (read off disk on the recording node). */
|
|
19229
19369
|
var ReadSegmentBytesResultSchema = object({ data: _instanceof(Uint8Array) });
|
|
@@ -20792,6 +20932,12 @@ Object.freeze({
|
|
|
20792
20932
|
addonId: null,
|
|
20793
20933
|
access: "view"
|
|
20794
20934
|
},
|
|
20935
|
+
"deviceManager.getLinkedDevices": {
|
|
20936
|
+
capName: "device-manager",
|
|
20937
|
+
capScope: "system",
|
|
20938
|
+
addonId: null,
|
|
20939
|
+
access: "view"
|
|
20940
|
+
},
|
|
20795
20941
|
"deviceManager.getRoleDisplayDefaults": {
|
|
20796
20942
|
capName: "device-manager",
|
|
20797
20943
|
capScope: "system",
|
|
@@ -22346,6 +22492,12 @@ Object.freeze({
|
|
|
22346
22492
|
addonId: null,
|
|
22347
22493
|
access: "view"
|
|
22348
22494
|
},
|
|
22495
|
+
"pipelineAnalytics.getSensorEvents": {
|
|
22496
|
+
capName: "pipeline-analytics",
|
|
22497
|
+
capScope: "device",
|
|
22498
|
+
addonId: null,
|
|
22499
|
+
access: "view"
|
|
22500
|
+
},
|
|
22349
22501
|
"pipelineAnalytics.getTrack": {
|
|
22350
22502
|
capName: "pipeline-analytics",
|
|
22351
22503
|
capScope: "device",
|
|
@@ -22358,6 +22510,18 @@ Object.freeze({
|
|
|
22358
22510
|
addonId: null,
|
|
22359
22511
|
access: "view"
|
|
22360
22512
|
},
|
|
22513
|
+
"pipelineAnalytics.listEventKinds": {
|
|
22514
|
+
capName: "pipeline-analytics",
|
|
22515
|
+
capScope: "device",
|
|
22516
|
+
addonId: null,
|
|
22517
|
+
access: "view"
|
|
22518
|
+
},
|
|
22519
|
+
"pipelineAnalytics.listRecentTracks": {
|
|
22520
|
+
capName: "pipeline-analytics",
|
|
22521
|
+
capScope: "device",
|
|
22522
|
+
addonId: null,
|
|
22523
|
+
access: "view"
|
|
22524
|
+
},
|
|
22361
22525
|
"pipelineAnalytics.listTracks": {
|
|
22362
22526
|
capName: "pipeline-analytics",
|
|
22363
22527
|
capScope: "device",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as path from "node:path";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
|
-
//#region ../types/dist/event-category-
|
|
3
|
+
//#region ../types/dist/event-category-H4AVePnn.mjs
|
|
4
4
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
5
5
|
EventCategory["SystemBoot"] = "system.boot";
|
|
6
6
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -150,6 +150,9 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
150
150
|
EventCategory["RecordingSegmentWritten"] = "recording.segment.written";
|
|
151
151
|
EventCategory["RecordingPolicyFallback"] = "recording.policy.fallback";
|
|
152
152
|
EventCategory["RecordingRetentionCompleted"] = "recording.retention.completed";
|
|
153
|
+
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
154
|
+
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
155
|
+
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
153
156
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
154
157
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
155
158
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -9814,7 +9817,7 @@ object({
|
|
|
9814
9817
|
deviceId: number(),
|
|
9815
9818
|
timestamp: number()
|
|
9816
9819
|
});
|
|
9817
|
-
DeviceType.Button;
|
|
9820
|
+
DeviceType.Button, DeviceType.Camera;
|
|
9818
9821
|
/**
|
|
9819
9822
|
* Enum-state sensor — a string value picked from a finite option set.
|
|
9820
9823
|
* Drives HA `sensor` entries with `state_class: enum` (HVAC action
|
|
@@ -14184,6 +14187,14 @@ var ConfigEntrySchema = object({
|
|
|
14184
14187
|
value: unknown(),
|
|
14185
14188
|
description: string().optional()
|
|
14186
14189
|
});
|
|
14190
|
+
var DeviceLinkModeSchema = _enum(["auto", "manual"]);
|
|
14191
|
+
/** One resolved linked device — the compact projection consumers need. */
|
|
14192
|
+
var LinkedDeviceSchema = object({
|
|
14193
|
+
deviceId: number(),
|
|
14194
|
+
name: string(),
|
|
14195
|
+
location: string().nullable(),
|
|
14196
|
+
features: array(string())
|
|
14197
|
+
});
|
|
14187
14198
|
var SavedDeviceRowSchema = object({
|
|
14188
14199
|
/** Numeric id reserved at allocateDeviceId time. */
|
|
14189
14200
|
id: number(),
|
|
@@ -14405,7 +14416,10 @@ method(object({
|
|
|
14405
14416
|
}), _void(), {
|
|
14406
14417
|
kind: "mutation",
|
|
14407
14418
|
auth: "admin"
|
|
14408
|
-
}), method(object({ addonId: string() }), array(SavedDeviceRowSchema)), method(object({ addonId: string().optional() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }),
|
|
14419
|
+
}), method(object({ addonId: string() }), array(SavedDeviceRowSchema)), method(object({ addonId: string().optional() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
|
|
14420
|
+
mode: DeviceLinkModeSchema,
|
|
14421
|
+
devices: array(LinkedDeviceSchema)
|
|
14422
|
+
})), method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
|
|
14409
14423
|
deviceId: number(),
|
|
14410
14424
|
values: record(string(), unknown())
|
|
14411
14425
|
}), object({ success: literal(true) }), {
|
|
@@ -15674,6 +15688,61 @@ var EventKindSchema = _enum([
|
|
|
15674
15688
|
"object",
|
|
15675
15689
|
"audio"
|
|
15676
15690
|
]);
|
|
15691
|
+
/**
|
|
15692
|
+
* Spatial filter for `listTracks` — the rect + polygon variants of the shared
|
|
15693
|
+
* MaskShape vocabulary (see `mask-shape.ts`). Coordinates are NORMALIZED 0..1
|
|
15694
|
+
* of the camera frame (top-left origin), matching the drawing-plane editor.
|
|
15695
|
+
*/
|
|
15696
|
+
var TrackZoneFilterSchema = discriminatedUnion("kind", [MaskRectShapeSchema, MaskPolygonShapeSchema]);
|
|
15697
|
+
/** Closed icon vocabulary so clients render a known glyph per kind. */
|
|
15698
|
+
var EventKindIconSchema = _enum([
|
|
15699
|
+
"motion",
|
|
15700
|
+
"audio",
|
|
15701
|
+
"person",
|
|
15702
|
+
"vehicle",
|
|
15703
|
+
"animal",
|
|
15704
|
+
"door",
|
|
15705
|
+
"pir",
|
|
15706
|
+
"smoke",
|
|
15707
|
+
"water",
|
|
15708
|
+
"button",
|
|
15709
|
+
"generic"
|
|
15710
|
+
]);
|
|
15711
|
+
var EventKindCategorySchema = _enum([
|
|
15712
|
+
"motion",
|
|
15713
|
+
"audio",
|
|
15714
|
+
"detection",
|
|
15715
|
+
"sensor",
|
|
15716
|
+
"custom"
|
|
15717
|
+
]);
|
|
15718
|
+
var EventKindDescriptorSchema = object({
|
|
15719
|
+
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
15720
|
+
kind: string(),
|
|
15721
|
+
label: string(),
|
|
15722
|
+
/** Hex color for timeline/legend rendering. */
|
|
15723
|
+
color: string(),
|
|
15724
|
+
icon: EventKindIconSchema,
|
|
15725
|
+
category: EventKindCategorySchema,
|
|
15726
|
+
/** Which cap + device contributes this kind. For built-ins the camera
|
|
15727
|
+
* itself; for sensor kinds the LINKED source device. */
|
|
15728
|
+
source: object({
|
|
15729
|
+
capName: string(),
|
|
15730
|
+
deviceId: number()
|
|
15731
|
+
})
|
|
15732
|
+
});
|
|
15733
|
+
var SensorEventSchema = object({
|
|
15734
|
+
id: string(),
|
|
15735
|
+
/** The CAMERA the event is attributed to (a sensor linked to N cameras
|
|
15736
|
+
* yields N rows, one per camera). */
|
|
15737
|
+
deviceId: number(),
|
|
15738
|
+
/** The linked sensor device whose state changed. */
|
|
15739
|
+
sourceDeviceId: number(),
|
|
15740
|
+
/** Event kind id — matches an `EventKindDescriptor.kind`. */
|
|
15741
|
+
kind: string(),
|
|
15742
|
+
/** Snapshot of the sensor cap's runtime-state slice at the change. */
|
|
15743
|
+
value: record(string(), unknown()).nullable(),
|
|
15744
|
+
timestamp: number()
|
|
15745
|
+
});
|
|
15677
15746
|
var TrackPositionSchema = object({
|
|
15678
15747
|
x: number(),
|
|
15679
15748
|
y: number(),
|
|
@@ -15687,6 +15756,30 @@ var TrackSnapshotSchema = object({
|
|
|
15687
15756
|
mediaKey: string()
|
|
15688
15757
|
});
|
|
15689
15758
|
/**
|
|
15759
|
+
* Normalized 0..1 trajectory envelope (min/max over every position bbox,
|
|
15760
|
+
* divided by the track's detection-frame dims), computed at persist time.
|
|
15761
|
+
* Absent when the frame dims were unknown when the track was persisted
|
|
15762
|
+
* (legacy rows / dims-less sources) and on active (in-RAM) tracks.
|
|
15763
|
+
*/
|
|
15764
|
+
var TrackEnvelopeSchema = object({
|
|
15765
|
+
minX: number(),
|
|
15766
|
+
minY: number(),
|
|
15767
|
+
maxX: number(),
|
|
15768
|
+
maxY: number()
|
|
15769
|
+
});
|
|
15770
|
+
/**
|
|
15771
|
+
* Row projection for track list queries. `full` (default) returns the
|
|
15772
|
+
* complete Track including the frame-rate `positions[]` history and the
|
|
15773
|
+
* `snapshots[]` references — megabytes across a page of tracks. `slim`
|
|
15774
|
+
* keeps every scalar the list surfaces actually render (ids, class(es),
|
|
15775
|
+
* label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
|
|
15776
|
+
* zonesVisited, bestEventId, envelope) and returns `positions` /
|
|
15777
|
+
* `snapshots` as EMPTY arrays — detail views re-fetch the full row via
|
|
15778
|
+
* `getTrack`. Mirrors the event-store `projection` convention
|
|
15779
|
+
* (`getObjectEvents` et al.).
|
|
15780
|
+
*/
|
|
15781
|
+
var TrackProjectionSchema = _enum(["full", "slim"]);
|
|
15782
|
+
/**
|
|
15690
15783
|
* One audio-classification label heard on the track's camera while the
|
|
15691
15784
|
* track was alive, aggregated per label. An "episode" is one persisted
|
|
15692
15785
|
* audio event (the confident-classification path: score ≥ the device's
|
|
@@ -15737,7 +15830,11 @@ var TrackSchema = object({
|
|
|
15737
15830
|
/** Audio-classification labels heard on the camera during the track's
|
|
15738
15831
|
* life (score ≥ device `classificationMinScore`), aggregated per label.
|
|
15739
15832
|
* Absent on legacy rows / tracks with no confident audio. */
|
|
15740
|
-
audioLabels: array(TrackAudioLabelSchema).readonly().optional()
|
|
15833
|
+
audioLabels: array(TrackAudioLabelSchema).readonly().optional(),
|
|
15834
|
+
/** Normalized 0..1 trajectory envelope (see {@link TrackEnvelopeSchema}).
|
|
15835
|
+
* Populated from the persisted envelope columns on historical reads;
|
|
15836
|
+
* absent on legacy rows, dims-less tracks and active (in-RAM) tracks. */
|
|
15837
|
+
envelope: TrackEnvelopeSchema.optional()
|
|
15741
15838
|
});
|
|
15742
15839
|
var BaseEventFields = {
|
|
15743
15840
|
id: string(),
|
|
@@ -15847,11 +15944,13 @@ var MediaFileSchema = object({
|
|
|
15847
15944
|
sizeBytes: number(),
|
|
15848
15945
|
timestamp: number()
|
|
15849
15946
|
});
|
|
15947
|
+
var DEFAULT_EVENT_QUERY_LIMIT = 1e3;
|
|
15948
|
+
var MAX_EVENT_QUERY_LIMIT = 5e3;
|
|
15850
15949
|
var DeviceEventQueryInput = object({
|
|
15851
15950
|
deviceId: number(),
|
|
15852
15951
|
since: number().optional(),
|
|
15853
15952
|
until: number().optional(),
|
|
15854
|
-
limit: number().int().min(1).max(
|
|
15953
|
+
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT),
|
|
15855
15954
|
/** `slim` drops heavy JSON fields (regions/bbox/zones) and carries an
|
|
15856
15955
|
* optional `mediaUrl` (populated by B5). `full` (default) keeps today's
|
|
15857
15956
|
* exact behaviour. Callers may omit this field — the store defaults to
|
|
@@ -15859,6 +15958,27 @@ var DeviceEventQueryInput = object({
|
|
|
15859
15958
|
projection: _enum(["full", "slim"]).optional()
|
|
15860
15959
|
});
|
|
15861
15960
|
var ObjectEventQueryInput = DeviceEventQueryInput.extend({ classFilter: string().optional() });
|
|
15961
|
+
var RecentTracksQueryInput = object({
|
|
15962
|
+
/** Devices to merge. An empty array yields `{ tracks: [], nextCursor: null }`. */
|
|
15963
|
+
deviceIds: array(number()),
|
|
15964
|
+
/** Window lower bound on `lastSeen` (inclusive). */
|
|
15965
|
+
since: number().optional(),
|
|
15966
|
+
/** Window upper bound on `lastSeen` (inclusive). */
|
|
15967
|
+
until: number().optional(),
|
|
15968
|
+
/** Page size. Default 200, max 1000. */
|
|
15969
|
+
limit: number().int().min(1).max(1e3).default(200),
|
|
15970
|
+
/** Opaque continuation cursor from a previous page's `nextCursor`.
|
|
15971
|
+
* Encodes the (lastSeen, trackId) sort position — treat as opaque. */
|
|
15972
|
+
cursor: string().optional(),
|
|
15973
|
+
/** See {@link TrackProjectionSchema}. Default `full`. */
|
|
15974
|
+
projection: TrackProjectionSchema.optional()
|
|
15975
|
+
});
|
|
15976
|
+
var RecentTracksPageSchema = object({
|
|
15977
|
+
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
15978
|
+
tracks: array(TrackSchema).readonly(),
|
|
15979
|
+
/** Cursor for the next page, or null when this page is the last. */
|
|
15980
|
+
nextCursor: string().nullable()
|
|
15981
|
+
});
|
|
15862
15982
|
var KeyEventQueryInput = object({
|
|
15863
15983
|
deviceId: number(),
|
|
15864
15984
|
/** Window lower bound (track firstSeen ≥ since). */
|
|
@@ -15941,11 +16061,25 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
15941
16061
|
deviceId: number(),
|
|
15942
16062
|
since: number().optional(),
|
|
15943
16063
|
until: number().optional(),
|
|
15944
|
-
limit: number().optional()
|
|
15945
|
-
|
|
15946
|
-
|
|
15947
|
-
|
|
15948
|
-
|
|
16064
|
+
limit: number().optional(),
|
|
16065
|
+
/** Spatial filter — only tracks whose trajectory intersects the zone
|
|
16066
|
+
* (normalized 0..1 rect or polygon). SQL-prefiltered on the persisted
|
|
16067
|
+
* envelope columns, then precisely tested per position. Tracks with
|
|
16068
|
+
* an unknown envelope (no frame dims at persist time) always match. */
|
|
16069
|
+
zone: TrackZoneFilterSchema.optional(),
|
|
16070
|
+
/** See {@link TrackProjectionSchema}. Default `full` (backward
|
|
16071
|
+
* compatible — omitting the field keeps today's exact behaviour). */
|
|
16072
|
+
projection: TrackProjectionSchema.optional()
|
|
16073
|
+
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
|
|
16074
|
+
kind: "mutation",
|
|
16075
|
+
auth: "admin"
|
|
16076
|
+
}), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({
|
|
16077
|
+
deviceId: number(),
|
|
16078
|
+
since: number().optional(),
|
|
16079
|
+
until: number().optional(),
|
|
16080
|
+
kinds: array(string()).optional(),
|
|
16081
|
+
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
16082
|
+
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
15949
16083
|
deviceId: number(),
|
|
15950
16084
|
since: number(),
|
|
15951
16085
|
until: number(),
|
|
@@ -19191,7 +19325,12 @@ var RecordingStorageUsageSchema = object({
|
|
|
19191
19325
|
/**
|
|
19192
19326
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
19193
19327
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
19194
|
-
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
19328
|
+
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
19329
|
+
* and the backward covered edge `prevEndMs` (exclusive end of the nearest
|
|
19330
|
+
* footage behind the epoch; `null` when none — optional so older providers
|
|
19331
|
+
* that omit it stay valid). `prevEndMs` lets a backward frame-step hop the
|
|
19332
|
+
* small inter-segment cracks (durMs under-covers the span to the next
|
|
19333
|
+
* startMs by ~11-17 ms) instead of no-opping at a segment head.
|
|
19195
19334
|
*/
|
|
19196
19335
|
var LocateSegmentResultSchema = discriminatedUnion("kind", [object({
|
|
19197
19336
|
kind: literal("segment"),
|
|
@@ -19200,7 +19339,8 @@ var LocateSegmentResultSchema = discriminatedUnion("kind", [object({
|
|
|
19200
19339
|
bytes: number()
|
|
19201
19340
|
}), object({
|
|
19202
19341
|
kind: literal("gap"),
|
|
19203
|
-
nearestEdgeMs: number().nullable()
|
|
19342
|
+
nearestEdgeMs: number().nullable(),
|
|
19343
|
+
prevEndMs: number().nullable().optional()
|
|
19204
19344
|
})]);
|
|
19205
19345
|
/** Raw bytes of one finalized footage segment (read off disk on the recording node). */
|
|
19206
19346
|
var ReadSegmentBytesResultSchema = object({ data: _instanceof(Uint8Array) });
|
|
@@ -20769,6 +20909,12 @@ Object.freeze({
|
|
|
20769
20909
|
addonId: null,
|
|
20770
20910
|
access: "view"
|
|
20771
20911
|
},
|
|
20912
|
+
"deviceManager.getLinkedDevices": {
|
|
20913
|
+
capName: "device-manager",
|
|
20914
|
+
capScope: "system",
|
|
20915
|
+
addonId: null,
|
|
20916
|
+
access: "view"
|
|
20917
|
+
},
|
|
20772
20918
|
"deviceManager.getRoleDisplayDefaults": {
|
|
20773
20919
|
capName: "device-manager",
|
|
20774
20920
|
capScope: "system",
|
|
@@ -22323,6 +22469,12 @@ Object.freeze({
|
|
|
22323
22469
|
addonId: null,
|
|
22324
22470
|
access: "view"
|
|
22325
22471
|
},
|
|
22472
|
+
"pipelineAnalytics.getSensorEvents": {
|
|
22473
|
+
capName: "pipeline-analytics",
|
|
22474
|
+
capScope: "device",
|
|
22475
|
+
addonId: null,
|
|
22476
|
+
access: "view"
|
|
22477
|
+
},
|
|
22326
22478
|
"pipelineAnalytics.getTrack": {
|
|
22327
22479
|
capName: "pipeline-analytics",
|
|
22328
22480
|
capScope: "device",
|
|
@@ -22335,6 +22487,18 @@ Object.freeze({
|
|
|
22335
22487
|
addonId: null,
|
|
22336
22488
|
access: "view"
|
|
22337
22489
|
},
|
|
22490
|
+
"pipelineAnalytics.listEventKinds": {
|
|
22491
|
+
capName: "pipeline-analytics",
|
|
22492
|
+
capScope: "device",
|
|
22493
|
+
addonId: null,
|
|
22494
|
+
access: "view"
|
|
22495
|
+
},
|
|
22496
|
+
"pipelineAnalytics.listRecentTracks": {
|
|
22497
|
+
capName: "pipeline-analytics",
|
|
22498
|
+
capScope: "device",
|
|
22499
|
+
addonId: null,
|
|
22500
|
+
access: "view"
|
|
22501
|
+
},
|
|
22338
22502
|
"pipelineAnalytics.listTracks": {
|
|
22339
22503
|
capName: "pipeline-analytics",
|
|
22340
22504
|
capScope: "device",
|
package/dist/webdav.addon.js
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_shared = require("./shared-
|
|
5
|
+
const require_shared = require("./shared-BuH7csTY.js");
|
|
6
6
|
let node_stream = require("node:stream");
|
|
7
7
|
let webdav = require("webdav");
|
|
8
8
|
//#region src/providers/webdav/webdav-config-schema.ts
|
package/dist/webdav.addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-
|
|
1
|
+
import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-uJtt1S2z.mjs";
|
|
2
2
|
import { PassThrough } from "node:stream";
|
|
3
3
|
import { AuthType, createClient } from "webdav";
|
|
4
4
|
//#region src/providers/webdav/webdav-config-schema.ts
|
package/package.json
CHANGED