@camstack/addon-remote-storage 1.2.49 → 1.2.51

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 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-BAungtYx.js");
5
+ const require_shared = require("./shared-BVnpUN0G.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-Da9FHywp.mjs";
1
+ import { c as BaseAddon, i as rearmIdleAbort, n as getOptionalBasePath, o as scheduleIdleAbort, s as storageProviderCapability, t as createSessionId } from "./shared-CCFH7Q0d.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";
@@ -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-BAungtYx.js");
5
+ const require_shared = require("./shared-BVnpUN0G.js");
6
6
  let ssh2 = require("ssh2");
7
7
  let node_path = require("node:path");
8
8
  node_path = require_shared.__toESM(node_path);
@@ -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-Da9FHywp.mjs";
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-CCFH7Q0d.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
@@ -15581,6 +15581,8 @@ var NcSystemEventKindSchema = _enum([
15581
15581
  "device-offline",
15582
15582
  "device-disabled",
15583
15583
  "device-enabled",
15584
+ "device-battery-low",
15585
+ "device-battery-normal",
15584
15586
  "stream-online",
15585
15587
  "stream-offline",
15586
15588
  "node-online",
@@ -18855,6 +18857,34 @@ var KeyEventsForDeviceSchema = object({
18855
18857
  deviceId: number(),
18856
18858
  events: array(KeyEventSchema).readonly()
18857
18859
  });
18860
+ /** One non-empty bucket of the timeline histogram. */
18861
+ var EventDensityBucketSchema = object({
18862
+ bucketStart: number(),
18863
+ motion: number().int(),
18864
+ object: number().int(),
18865
+ audio: number().int()
18866
+ });
18867
+ /**
18868
+ * One camera's row in a `getEventDensityBatch` answer.
18869
+ *
18870
+ * TWO facts, and the timeline draws them differently:
18871
+ *
18872
+ * - `read: 'read'` — the histogram for this camera. `buckets: []` is a real
18873
+ * claim: read, and nothing happened in the window.
18874
+ * - `read: 'unreadable'` — nobody could answer for this camera. `buckets` is
18875
+ * empty and that emptiness means NOTHING; the timeline must render unknown,
18876
+ * not quiet.
18877
+ *
18878
+ * Fanned out per camera the difference was free — one query rejected while the
18879
+ * others resolved — and collapsing to a batch is the exact moment it is lost
18880
+ * silently. Every requested id gets a row: a caller that asked for twelve and
18881
+ * got eleven cannot tell which one is missing, or that any is.
18882
+ */
18883
+ var EventDensityForDeviceSchema = object({
18884
+ deviceId: number(),
18885
+ read: _enum(["read", "unreadable"]),
18886
+ buckets: array(EventDensityBucketSchema).readonly()
18887
+ });
18858
18888
  object({
18859
18889
  trackId: string(),
18860
18890
  className: string(),
@@ -19165,12 +19195,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19165
19195
  since: number(),
19166
19196
  until: number(),
19167
19197
  bucketMs: number().int().positive()
19168
- }), array(object({
19169
- bucketStart: number(),
19170
- motion: number().int(),
19171
- object: number().int(),
19172
- audio: number().int()
19173
- })).readonly()), method(object({
19198
+ }), array(EventDensityBucketSchema).readonly()), method(object({
19199
+ deviceIds: array(number()).min(1).max(200),
19200
+ since: number(),
19201
+ until: number(),
19202
+ bucketMs: number().int().positive()
19203
+ }), array(EventDensityForDeviceSchema).readonly()), method(object({
19174
19204
  deviceId: number(),
19175
19205
  cutoffMs: number()
19176
19206
  }), object({
@@ -26540,6 +26570,39 @@ var RecordingDaysSchema = object({
26540
26570
  /** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
26541
26571
  days: array(number())
26542
26572
  });
26573
+ /**
26574
+ * One camera's row in a `getAvailabilityBatch` answer.
26575
+ *
26576
+ * `ranges` is EXACTLY what `getAvailability` returns for that camera — the
26577
+ * batch collapses the transport, not the work — plus the one thing the singular
26578
+ * method never had to say:
26579
+ *
26580
+ * - `read: 'read'` — answered. `ranges: []` means "read, and this camera has
26581
+ * no footage in the window", which is a real claim.
26582
+ * - `read: 'unreadable'` — the recorder could not answer for this camera (its
26583
+ * calendar rung threw, its location is unmounted). `ranges` is empty and
26584
+ * that emptiness means NOTHING.
26585
+ *
26586
+ * A timeline that renders the second as the first tells an operator there is no
26587
+ * footage when the truth is that nobody looked.
26588
+ */
26589
+ var RecordingAvailabilityForDeviceSchema = object({
26590
+ deviceId: number(),
26591
+ read: _enum(["read", "unreadable"]),
26592
+ ranges: array(RecordingRangeSchema).readonly()
26593
+ });
26594
+ /**
26595
+ * One camera's row in a `getDaysWithRecordingsBatch` answer. Same rule as
26596
+ * {@link RecordingAvailabilityForDeviceSchema}: `days: []` on a `'read'` row is
26597
+ * "no footage in this month", `read: 'unreadable'` is "nobody could look", and
26598
+ * the date-picker's day dots must not spell them the same.
26599
+ */
26600
+ var RecordingDaysForDeviceSchema = object({
26601
+ deviceId: number(),
26602
+ read: _enum(["read", "unreadable"]),
26603
+ /** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
26604
+ days: array(number()).readonly()
26605
+ });
26543
26606
  var RecordingManifestSchema = object({
26544
26607
  deviceId: number(),
26545
26608
  /** Local filesystem path to the master playlist; null when no recording exists for the requested range. */
@@ -26774,6 +26837,13 @@ method(object({
26774
26837
  }), RecordingAvailabilitySchema, {
26775
26838
  kind: "query",
26776
26839
  auth: "protected"
26840
+ }), method(object({
26841
+ deviceIds: array(number()).min(1).max(200),
26842
+ fromMs: number(),
26843
+ toMs: number()
26844
+ }), array(RecordingAvailabilityForDeviceSchema).readonly(), {
26845
+ kind: "query",
26846
+ auth: "protected"
26777
26847
  }), method(object({
26778
26848
  deviceId: number(),
26779
26849
  fromMs: number(),
@@ -26782,6 +26852,14 @@ method(object({
26782
26852
  }), RecordingDaysSchema, {
26783
26853
  kind: "query",
26784
26854
  auth: "protected"
26855
+ }), method(object({
26856
+ deviceIds: array(number()).min(1).max(200),
26857
+ fromMs: number(),
26858
+ toMs: number(),
26859
+ tzOffsetMinutes: number()
26860
+ }), array(RecordingDaysForDeviceSchema).readonly(), {
26861
+ kind: "query",
26862
+ auth: "protected"
26785
26863
  }), method(object({
26786
26864
  deviceId: number(),
26787
26865
  fromMs: number(),
@@ -31979,6 +32057,12 @@ Object.freeze({
31979
32057
  addonId: null,
31980
32058
  access: "view"
31981
32059
  },
32060
+ "pipelineAnalytics.getEventDensityBatch": {
32061
+ capName: "pipeline-analytics",
32062
+ capScope: "device",
32063
+ addonId: null,
32064
+ access: "view"
32065
+ },
31982
32066
  "pipelineAnalytics.getEventMedia": {
31983
32067
  capName: "pipeline-analytics",
31984
32068
  capScope: "device",
@@ -33101,12 +33185,24 @@ Object.freeze({
33101
33185
  addonId: null,
33102
33186
  access: "view"
33103
33187
  },
33188
+ "recording.getAvailabilityBatch": {
33189
+ capName: "recording",
33190
+ capScope: "system",
33191
+ addonId: null,
33192
+ access: "view"
33193
+ },
33104
33194
  "recording.getDaysWithRecordings": {
33105
33195
  capName: "recording",
33106
33196
  capScope: "system",
33107
33197
  addonId: null,
33108
33198
  access: "view"
33109
33199
  },
33200
+ "recording.getDaysWithRecordingsBatch": {
33201
+ capName: "recording",
33202
+ capScope: "system",
33203
+ addonId: null,
33204
+ access: "view"
33205
+ },
33110
33206
  "recording.getDeviceConfig": {
33111
33207
  capName: "recording",
33112
33208
  capScope: "system",
@@ -35711,6 +35807,11 @@ Object.freeze({
35711
35807
  form: "single",
35712
35808
  optional: false
35713
35809
  }],
35810
+ "pipelineAnalytics.getEventDensityBatch": [{
35811
+ name: "deviceIds",
35812
+ form: "array",
35813
+ optional: false
35814
+ }],
35714
35815
  "pipelineAnalytics.getEventMedia": [{
35715
35816
  name: "deviceId",
35716
35817
  form: "single",
@@ -36126,11 +36227,21 @@ Object.freeze({
36126
36227
  form: "single",
36127
36228
  optional: false
36128
36229
  }],
36230
+ "recording.getAvailabilityBatch": [{
36231
+ name: "deviceIds",
36232
+ form: "array",
36233
+ optional: false
36234
+ }],
36129
36235
  "recording.getDaysWithRecordings": [{
36130
36236
  name: "deviceId",
36131
36237
  form: "single",
36132
36238
  optional: false
36133
36239
  }],
36240
+ "recording.getDaysWithRecordingsBatch": [{
36241
+ name: "deviceIds",
36242
+ form: "array",
36243
+ optional: false
36244
+ }],
36134
36245
  "recording.getDeviceConfig": [{
36135
36246
  name: "deviceId",
36136
36247
  form: "single",
@@ -15558,6 +15558,8 @@ var NcSystemEventKindSchema = _enum([
15558
15558
  "device-offline",
15559
15559
  "device-disabled",
15560
15560
  "device-enabled",
15561
+ "device-battery-low",
15562
+ "device-battery-normal",
15561
15563
  "stream-online",
15562
15564
  "stream-offline",
15563
15565
  "node-online",
@@ -18832,6 +18834,34 @@ var KeyEventsForDeviceSchema = object({
18832
18834
  deviceId: number(),
18833
18835
  events: array(KeyEventSchema).readonly()
18834
18836
  });
18837
+ /** One non-empty bucket of the timeline histogram. */
18838
+ var EventDensityBucketSchema = object({
18839
+ bucketStart: number(),
18840
+ motion: number().int(),
18841
+ object: number().int(),
18842
+ audio: number().int()
18843
+ });
18844
+ /**
18845
+ * One camera's row in a `getEventDensityBatch` answer.
18846
+ *
18847
+ * TWO facts, and the timeline draws them differently:
18848
+ *
18849
+ * - `read: 'read'` — the histogram for this camera. `buckets: []` is a real
18850
+ * claim: read, and nothing happened in the window.
18851
+ * - `read: 'unreadable'` — nobody could answer for this camera. `buckets` is
18852
+ * empty and that emptiness means NOTHING; the timeline must render unknown,
18853
+ * not quiet.
18854
+ *
18855
+ * Fanned out per camera the difference was free — one query rejected while the
18856
+ * others resolved — and collapsing to a batch is the exact moment it is lost
18857
+ * silently. Every requested id gets a row: a caller that asked for twelve and
18858
+ * got eleven cannot tell which one is missing, or that any is.
18859
+ */
18860
+ var EventDensityForDeviceSchema = object({
18861
+ deviceId: number(),
18862
+ read: _enum(["read", "unreadable"]),
18863
+ buckets: array(EventDensityBucketSchema).readonly()
18864
+ });
18835
18865
  object({
18836
18866
  trackId: string(),
18837
18867
  className: string(),
@@ -19142,12 +19172,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19142
19172
  since: number(),
19143
19173
  until: number(),
19144
19174
  bucketMs: number().int().positive()
19145
- }), array(object({
19146
- bucketStart: number(),
19147
- motion: number().int(),
19148
- object: number().int(),
19149
- audio: number().int()
19150
- })).readonly()), method(object({
19175
+ }), array(EventDensityBucketSchema).readonly()), method(object({
19176
+ deviceIds: array(number()).min(1).max(200),
19177
+ since: number(),
19178
+ until: number(),
19179
+ bucketMs: number().int().positive()
19180
+ }), array(EventDensityForDeviceSchema).readonly()), method(object({
19151
19181
  deviceId: number(),
19152
19182
  cutoffMs: number()
19153
19183
  }), object({
@@ -26517,6 +26547,39 @@ var RecordingDaysSchema = object({
26517
26547
  /** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
26518
26548
  days: array(number())
26519
26549
  });
26550
+ /**
26551
+ * One camera's row in a `getAvailabilityBatch` answer.
26552
+ *
26553
+ * `ranges` is EXACTLY what `getAvailability` returns for that camera — the
26554
+ * batch collapses the transport, not the work — plus the one thing the singular
26555
+ * method never had to say:
26556
+ *
26557
+ * - `read: 'read'` — answered. `ranges: []` means "read, and this camera has
26558
+ * no footage in the window", which is a real claim.
26559
+ * - `read: 'unreadable'` — the recorder could not answer for this camera (its
26560
+ * calendar rung threw, its location is unmounted). `ranges` is empty and
26561
+ * that emptiness means NOTHING.
26562
+ *
26563
+ * A timeline that renders the second as the first tells an operator there is no
26564
+ * footage when the truth is that nobody looked.
26565
+ */
26566
+ var RecordingAvailabilityForDeviceSchema = object({
26567
+ deviceId: number(),
26568
+ read: _enum(["read", "unreadable"]),
26569
+ ranges: array(RecordingRangeSchema).readonly()
26570
+ });
26571
+ /**
26572
+ * One camera's row in a `getDaysWithRecordingsBatch` answer. Same rule as
26573
+ * {@link RecordingAvailabilityForDeviceSchema}: `days: []` on a `'read'` row is
26574
+ * "no footage in this month", `read: 'unreadable'` is "nobody could look", and
26575
+ * the date-picker's day dots must not spell them the same.
26576
+ */
26577
+ var RecordingDaysForDeviceSchema = object({
26578
+ deviceId: number(),
26579
+ read: _enum(["read", "unreadable"]),
26580
+ /** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
26581
+ days: array(number()).readonly()
26582
+ });
26520
26583
  var RecordingManifestSchema = object({
26521
26584
  deviceId: number(),
26522
26585
  /** Local filesystem path to the master playlist; null when no recording exists for the requested range. */
@@ -26751,6 +26814,13 @@ method(object({
26751
26814
  }), RecordingAvailabilitySchema, {
26752
26815
  kind: "query",
26753
26816
  auth: "protected"
26817
+ }), method(object({
26818
+ deviceIds: array(number()).min(1).max(200),
26819
+ fromMs: number(),
26820
+ toMs: number()
26821
+ }), array(RecordingAvailabilityForDeviceSchema).readonly(), {
26822
+ kind: "query",
26823
+ auth: "protected"
26754
26824
  }), method(object({
26755
26825
  deviceId: number(),
26756
26826
  fromMs: number(),
@@ -26759,6 +26829,14 @@ method(object({
26759
26829
  }), RecordingDaysSchema, {
26760
26830
  kind: "query",
26761
26831
  auth: "protected"
26832
+ }), method(object({
26833
+ deviceIds: array(number()).min(1).max(200),
26834
+ fromMs: number(),
26835
+ toMs: number(),
26836
+ tzOffsetMinutes: number()
26837
+ }), array(RecordingDaysForDeviceSchema).readonly(), {
26838
+ kind: "query",
26839
+ auth: "protected"
26762
26840
  }), method(object({
26763
26841
  deviceId: number(),
26764
26842
  fromMs: number(),
@@ -31956,6 +32034,12 @@ Object.freeze({
31956
32034
  addonId: null,
31957
32035
  access: "view"
31958
32036
  },
32037
+ "pipelineAnalytics.getEventDensityBatch": {
32038
+ capName: "pipeline-analytics",
32039
+ capScope: "device",
32040
+ addonId: null,
32041
+ access: "view"
32042
+ },
31959
32043
  "pipelineAnalytics.getEventMedia": {
31960
32044
  capName: "pipeline-analytics",
31961
32045
  capScope: "device",
@@ -33078,12 +33162,24 @@ Object.freeze({
33078
33162
  addonId: null,
33079
33163
  access: "view"
33080
33164
  },
33165
+ "recording.getAvailabilityBatch": {
33166
+ capName: "recording",
33167
+ capScope: "system",
33168
+ addonId: null,
33169
+ access: "view"
33170
+ },
33081
33171
  "recording.getDaysWithRecordings": {
33082
33172
  capName: "recording",
33083
33173
  capScope: "system",
33084
33174
  addonId: null,
33085
33175
  access: "view"
33086
33176
  },
33177
+ "recording.getDaysWithRecordingsBatch": {
33178
+ capName: "recording",
33179
+ capScope: "system",
33180
+ addonId: null,
33181
+ access: "view"
33182
+ },
33087
33183
  "recording.getDeviceConfig": {
33088
33184
  capName: "recording",
33089
33185
  capScope: "system",
@@ -35688,6 +35784,11 @@ Object.freeze({
35688
35784
  form: "single",
35689
35785
  optional: false
35690
35786
  }],
35787
+ "pipelineAnalytics.getEventDensityBatch": [{
35788
+ name: "deviceIds",
35789
+ form: "array",
35790
+ optional: false
35791
+ }],
35691
35792
  "pipelineAnalytics.getEventMedia": [{
35692
35793
  name: "deviceId",
35693
35794
  form: "single",
@@ -36103,11 +36204,21 @@ Object.freeze({
36103
36204
  form: "single",
36104
36205
  optional: false
36105
36206
  }],
36207
+ "recording.getAvailabilityBatch": [{
36208
+ name: "deviceIds",
36209
+ form: "array",
36210
+ optional: false
36211
+ }],
36106
36212
  "recording.getDaysWithRecordings": [{
36107
36213
  name: "deviceId",
36108
36214
  form: "single",
36109
36215
  optional: false
36110
36216
  }],
36217
+ "recording.getDaysWithRecordingsBatch": [{
36218
+ name: "deviceIds",
36219
+ form: "array",
36220
+ optional: false
36221
+ }],
36111
36222
  "recording.getDeviceConfig": [{
36112
36223
  name: "deviceId",
36113
36224
  form: "single",
package/dist/smb.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-BAungtYx.js");
5
+ const require_shared = require("./shared-BVnpUN0G.js");
6
6
  let node_crypto = require("node:crypto");
7
7
  let node_path = require("node:path");
8
8
  node_path = require_shared.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, s as storageProviderCapability } from "./shared-Da9FHywp.mjs";
1
+ import { c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, s as storageProviderCapability } from "./shared-CCFH7Q0d.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import * as path from "node:path";
4
4
  import * as fsp from "node:fs/promises";
@@ -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-BAungtYx.js");
5
+ const require_shared = require("./shared-BVnpUN0G.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
@@ -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-Da9FHywp.mjs";
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-CCFH7Q0d.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-remote-storage",
3
- "version": "1.2.49",
3
+ "version": "1.2.51",
4
4
  "description": "Remote storage providers (SFTP, S3, WebDAV, SMB) — unifies remote backends behind the storage-provider cap",
5
5
  "keywords": [
6
6
  "camstack",