@camstack/addon-post-analysis 1.2.160 → 1.2.162

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.
@@ -16309,6 +16309,8 @@ var NcSystemEventKindSchema = _enum([
16309
16309
  "device-offline",
16310
16310
  "device-disabled",
16311
16311
  "device-enabled",
16312
+ "device-battery-low",
16313
+ "device-battery-normal",
16312
16314
  "stream-online",
16313
16315
  "stream-offline",
16314
16316
  "node-online",
@@ -20219,6 +20221,34 @@ var KeyEventsForDeviceSchema = object({
20219
20221
  deviceId: number(),
20220
20222
  events: array(KeyEventSchema).readonly()
20221
20223
  });
20224
+ /** One non-empty bucket of the timeline histogram. */
20225
+ var EventDensityBucketSchema = object({
20226
+ bucketStart: number(),
20227
+ motion: number().int(),
20228
+ object: number().int(),
20229
+ audio: number().int()
20230
+ });
20231
+ /**
20232
+ * One camera's row in a `getEventDensityBatch` answer.
20233
+ *
20234
+ * TWO facts, and the timeline draws them differently:
20235
+ *
20236
+ * - `read: 'read'` — the histogram for this camera. `buckets: []` is a real
20237
+ * claim: read, and nothing happened in the window.
20238
+ * - `read: 'unreadable'` — nobody could answer for this camera. `buckets` is
20239
+ * empty and that emptiness means NOTHING; the timeline must render unknown,
20240
+ * not quiet.
20241
+ *
20242
+ * Fanned out per camera the difference was free — one query rejected while the
20243
+ * others resolved — and collapsing to a batch is the exact moment it is lost
20244
+ * silently. Every requested id gets a row: a caller that asked for twelve and
20245
+ * got eleven cannot tell which one is missing, or that any is.
20246
+ */
20247
+ var EventDensityForDeviceSchema = object({
20248
+ deviceId: number(),
20249
+ read: _enum(["read", "unreadable"]),
20250
+ buckets: array(EventDensityBucketSchema).readonly()
20251
+ });
20222
20252
  object({
20223
20253
  trackId: string(),
20224
20254
  className: string(),
@@ -20618,12 +20648,31 @@ var pipelineAnalyticsCapability = {
20618
20648
  since: number(),
20619
20649
  until: number(),
20620
20650
  bucketMs: number().int().positive()
20621
- }), array(object({
20622
- bucketStart: number(),
20623
- motion: number().int(),
20624
- object: number().int(),
20625
- audio: number().int()
20626
- })).readonly()),
20651
+ }), array(EventDensityBucketSchema).readonly()),
20652
+ /**
20653
+ * The same histogram, for a SET of cameras, in one round trip.
20654
+ *
20655
+ * A multi-camera timeline (the tablet grid) re-asks this of every camera in
20656
+ * the grid on every day change — N browser → hub → post-analysis round
20657
+ * trips for N independent, already-indexed store queries. The queries are
20658
+ * unchanged and still run per camera (`densityByKind`, one per deviceId,
20659
+ * concurrently INSIDE the owner); only the transport collapses.
20660
+ *
20661
+ * Deliberately per-device rather than pre-merged: a timeline lane belongs
20662
+ * to a camera, and a caller that merged would have to un-merge.
20663
+ * `getEventDensity` stays for single-camera callers.
20664
+ *
20665
+ * Every requested id gets a row, marked — see
20666
+ * {@link EventDensityForDeviceSchema}. `deviceIds` is capped at
20667
+ * {@link EVENT_DENSITY_BATCH_MAX}, and an over-cap ask is refused rather
20668
+ * than truncated.
20669
+ */
20670
+ getEventDensityBatch: method(object({
20671
+ deviceIds: array(number()).min(1).max(200),
20672
+ since: number(),
20673
+ until: number(),
20674
+ bucketMs: number().int().positive()
20675
+ }), array(EventDensityForDeviceSchema).readonly()),
20627
20676
  /**
20628
20677
  * @deprecated Prefer `pruneTracksBefore` — the track is the ROOT of the
20629
20678
  * analytics model and retention must cascade from it (design §5.1). This
@@ -30181,6 +30230,39 @@ var RecordingDaysSchema = object({
30181
30230
  /** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
30182
30231
  days: array(number())
30183
30232
  });
30233
+ /**
30234
+ * One camera's row in a `getAvailabilityBatch` answer.
30235
+ *
30236
+ * `ranges` is EXACTLY what `getAvailability` returns for that camera — the
30237
+ * batch collapses the transport, not the work — plus the one thing the singular
30238
+ * method never had to say:
30239
+ *
30240
+ * - `read: 'read'` — answered. `ranges: []` means "read, and this camera has
30241
+ * no footage in the window", which is a real claim.
30242
+ * - `read: 'unreadable'` — the recorder could not answer for this camera (its
30243
+ * calendar rung threw, its location is unmounted). `ranges` is empty and
30244
+ * that emptiness means NOTHING.
30245
+ *
30246
+ * A timeline that renders the second as the first tells an operator there is no
30247
+ * footage when the truth is that nobody looked.
30248
+ */
30249
+ var RecordingAvailabilityForDeviceSchema = object({
30250
+ deviceId: number(),
30251
+ read: _enum(["read", "unreadable"]),
30252
+ ranges: array(RecordingRangeSchema).readonly()
30253
+ });
30254
+ /**
30255
+ * One camera's row in a `getDaysWithRecordingsBatch` answer. Same rule as
30256
+ * {@link RecordingAvailabilityForDeviceSchema}: `days: []` on a `'read'` row is
30257
+ * "no footage in this month", `read: 'unreadable'` is "nobody could look", and
30258
+ * the date-picker's day dots must not spell them the same.
30259
+ */
30260
+ var RecordingDaysForDeviceSchema = object({
30261
+ deviceId: number(),
30262
+ read: _enum(["read", "unreadable"]),
30263
+ /** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
30264
+ days: array(number()).readonly()
30265
+ });
30184
30266
  var RecordingManifestSchema = object({
30185
30267
  deviceId: number(),
30186
30268
  /** Local filesystem path to the master playlist; null when no recording exists for the requested range. */
@@ -30415,6 +30497,13 @@ method(object({
30415
30497
  }), RecordingAvailabilitySchema, {
30416
30498
  kind: "query",
30417
30499
  auth: "protected"
30500
+ }), method(object({
30501
+ deviceIds: array(number()).min(1).max(200),
30502
+ fromMs: number(),
30503
+ toMs: number()
30504
+ }), array(RecordingAvailabilityForDeviceSchema).readonly(), {
30505
+ kind: "query",
30506
+ auth: "protected"
30418
30507
  }), method(object({
30419
30508
  deviceId: number(),
30420
30509
  fromMs: number(),
@@ -30423,6 +30512,14 @@ method(object({
30423
30512
  }), RecordingDaysSchema, {
30424
30513
  kind: "query",
30425
30514
  auth: "protected"
30515
+ }), method(object({
30516
+ deviceIds: array(number()).min(1).max(200),
30517
+ fromMs: number(),
30518
+ toMs: number(),
30519
+ tzOffsetMinutes: number()
30520
+ }), array(RecordingDaysForDeviceSchema).readonly(), {
30521
+ kind: "query",
30522
+ auth: "protected"
30426
30523
  }), method(object({
30427
30524
  deviceId: number(),
30428
30525
  fromMs: number(),
@@ -37536,6 +37633,12 @@ Object.freeze({
37536
37633
  addonId: null,
37537
37634
  access: "view"
37538
37635
  },
37636
+ "pipelineAnalytics.getEventDensityBatch": {
37637
+ capName: "pipeline-analytics",
37638
+ capScope: "device",
37639
+ addonId: null,
37640
+ access: "view"
37641
+ },
37539
37642
  "pipelineAnalytics.getEventMedia": {
37540
37643
  capName: "pipeline-analytics",
37541
37644
  capScope: "device",
@@ -38658,12 +38761,24 @@ Object.freeze({
38658
38761
  addonId: null,
38659
38762
  access: "view"
38660
38763
  },
38764
+ "recording.getAvailabilityBatch": {
38765
+ capName: "recording",
38766
+ capScope: "system",
38767
+ addonId: null,
38768
+ access: "view"
38769
+ },
38661
38770
  "recording.getDaysWithRecordings": {
38662
38771
  capName: "recording",
38663
38772
  capScope: "system",
38664
38773
  addonId: null,
38665
38774
  access: "view"
38666
38775
  },
38776
+ "recording.getDaysWithRecordingsBatch": {
38777
+ capName: "recording",
38778
+ capScope: "system",
38779
+ addonId: null,
38780
+ access: "view"
38781
+ },
38667
38782
  "recording.getDeviceConfig": {
38668
38783
  capName: "recording",
38669
38784
  capScope: "system",
@@ -41268,6 +41383,11 @@ Object.freeze({
41268
41383
  form: "single",
41269
41384
  optional: false
41270
41385
  }],
41386
+ "pipelineAnalytics.getEventDensityBatch": [{
41387
+ name: "deviceIds",
41388
+ form: "array",
41389
+ optional: false
41390
+ }],
41271
41391
  "pipelineAnalytics.getEventMedia": [{
41272
41392
  name: "deviceId",
41273
41393
  form: "single",
@@ -41683,11 +41803,21 @@ Object.freeze({
41683
41803
  form: "single",
41684
41804
  optional: false
41685
41805
  }],
41806
+ "recording.getAvailabilityBatch": [{
41807
+ name: "deviceIds",
41808
+ form: "array",
41809
+ optional: false
41810
+ }],
41686
41811
  "recording.getDaysWithRecordings": [{
41687
41812
  name: "deviceId",
41688
41813
  form: "single",
41689
41814
  optional: false
41690
41815
  }],
41816
+ "recording.getDaysWithRecordingsBatch": [{
41817
+ name: "deviceIds",
41818
+ form: "array",
41819
+ optional: false
41820
+ }],
41691
41821
  "recording.getDeviceConfig": [{
41692
41822
  name: "deviceId",
41693
41823
  form: "single",
@@ -16278,6 +16278,8 @@ var NcSystemEventKindSchema = _enum([
16278
16278
  "device-offline",
16279
16279
  "device-disabled",
16280
16280
  "device-enabled",
16281
+ "device-battery-low",
16282
+ "device-battery-normal",
16281
16283
  "stream-online",
16282
16284
  "stream-offline",
16283
16285
  "node-online",
@@ -20188,6 +20190,34 @@ var KeyEventsForDeviceSchema = object({
20188
20190
  deviceId: number(),
20189
20191
  events: array(KeyEventSchema).readonly()
20190
20192
  });
20193
+ /** One non-empty bucket of the timeline histogram. */
20194
+ var EventDensityBucketSchema = object({
20195
+ bucketStart: number(),
20196
+ motion: number().int(),
20197
+ object: number().int(),
20198
+ audio: number().int()
20199
+ });
20200
+ /**
20201
+ * One camera's row in a `getEventDensityBatch` answer.
20202
+ *
20203
+ * TWO facts, and the timeline draws them differently:
20204
+ *
20205
+ * - `read: 'read'` — the histogram for this camera. `buckets: []` is a real
20206
+ * claim: read, and nothing happened in the window.
20207
+ * - `read: 'unreadable'` — nobody could answer for this camera. `buckets` is
20208
+ * empty and that emptiness means NOTHING; the timeline must render unknown,
20209
+ * not quiet.
20210
+ *
20211
+ * Fanned out per camera the difference was free — one query rejected while the
20212
+ * others resolved — and collapsing to a batch is the exact moment it is lost
20213
+ * silently. Every requested id gets a row: a caller that asked for twelve and
20214
+ * got eleven cannot tell which one is missing, or that any is.
20215
+ */
20216
+ var EventDensityForDeviceSchema = object({
20217
+ deviceId: number(),
20218
+ read: _enum(["read", "unreadable"]),
20219
+ buckets: array(EventDensityBucketSchema).readonly()
20220
+ });
20191
20221
  object({
20192
20222
  trackId: string(),
20193
20223
  className: string(),
@@ -20587,12 +20617,31 @@ var pipelineAnalyticsCapability = {
20587
20617
  since: number(),
20588
20618
  until: number(),
20589
20619
  bucketMs: number().int().positive()
20590
- }), array(object({
20591
- bucketStart: number(),
20592
- motion: number().int(),
20593
- object: number().int(),
20594
- audio: number().int()
20595
- })).readonly()),
20620
+ }), array(EventDensityBucketSchema).readonly()),
20621
+ /**
20622
+ * The same histogram, for a SET of cameras, in one round trip.
20623
+ *
20624
+ * A multi-camera timeline (the tablet grid) re-asks this of every camera in
20625
+ * the grid on every day change — N browser → hub → post-analysis round
20626
+ * trips for N independent, already-indexed store queries. The queries are
20627
+ * unchanged and still run per camera (`densityByKind`, one per deviceId,
20628
+ * concurrently INSIDE the owner); only the transport collapses.
20629
+ *
20630
+ * Deliberately per-device rather than pre-merged: a timeline lane belongs
20631
+ * to a camera, and a caller that merged would have to un-merge.
20632
+ * `getEventDensity` stays for single-camera callers.
20633
+ *
20634
+ * Every requested id gets a row, marked — see
20635
+ * {@link EventDensityForDeviceSchema}. `deviceIds` is capped at
20636
+ * {@link EVENT_DENSITY_BATCH_MAX}, and an over-cap ask is refused rather
20637
+ * than truncated.
20638
+ */
20639
+ getEventDensityBatch: method(object({
20640
+ deviceIds: array(number()).min(1).max(200),
20641
+ since: number(),
20642
+ until: number(),
20643
+ bucketMs: number().int().positive()
20644
+ }), array(EventDensityForDeviceSchema).readonly()),
20596
20645
  /**
20597
20646
  * @deprecated Prefer `pruneTracksBefore` — the track is the ROOT of the
20598
20647
  * analytics model and retention must cascade from it (design §5.1). This
@@ -30150,6 +30199,39 @@ var RecordingDaysSchema = object({
30150
30199
  /** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
30151
30200
  days: array(number())
30152
30201
  });
30202
+ /**
30203
+ * One camera's row in a `getAvailabilityBatch` answer.
30204
+ *
30205
+ * `ranges` is EXACTLY what `getAvailability` returns for that camera — the
30206
+ * batch collapses the transport, not the work — plus the one thing the singular
30207
+ * method never had to say:
30208
+ *
30209
+ * - `read: 'read'` — answered. `ranges: []` means "read, and this camera has
30210
+ * no footage in the window", which is a real claim.
30211
+ * - `read: 'unreadable'` — the recorder could not answer for this camera (its
30212
+ * calendar rung threw, its location is unmounted). `ranges` is empty and
30213
+ * that emptiness means NOTHING.
30214
+ *
30215
+ * A timeline that renders the second as the first tells an operator there is no
30216
+ * footage when the truth is that nobody looked.
30217
+ */
30218
+ var RecordingAvailabilityForDeviceSchema = object({
30219
+ deviceId: number(),
30220
+ read: _enum(["read", "unreadable"]),
30221
+ ranges: array(RecordingRangeSchema).readonly()
30222
+ });
30223
+ /**
30224
+ * One camera's row in a `getDaysWithRecordingsBatch` answer. Same rule as
30225
+ * {@link RecordingAvailabilityForDeviceSchema}: `days: []` on a `'read'` row is
30226
+ * "no footage in this month", `read: 'unreadable'` is "nobody could look", and
30227
+ * the date-picker's day dots must not spell them the same.
30228
+ */
30229
+ var RecordingDaysForDeviceSchema = object({
30230
+ deviceId: number(),
30231
+ read: _enum(["read", "unreadable"]),
30232
+ /** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
30233
+ days: array(number()).readonly()
30234
+ });
30153
30235
  var RecordingManifestSchema = object({
30154
30236
  deviceId: number(),
30155
30237
  /** Local filesystem path to the master playlist; null when no recording exists for the requested range. */
@@ -30384,6 +30466,13 @@ method(object({
30384
30466
  }), RecordingAvailabilitySchema, {
30385
30467
  kind: "query",
30386
30468
  auth: "protected"
30469
+ }), method(object({
30470
+ deviceIds: array(number()).min(1).max(200),
30471
+ fromMs: number(),
30472
+ toMs: number()
30473
+ }), array(RecordingAvailabilityForDeviceSchema).readonly(), {
30474
+ kind: "query",
30475
+ auth: "protected"
30387
30476
  }), method(object({
30388
30477
  deviceId: number(),
30389
30478
  fromMs: number(),
@@ -30392,6 +30481,14 @@ method(object({
30392
30481
  }), RecordingDaysSchema, {
30393
30482
  kind: "query",
30394
30483
  auth: "protected"
30484
+ }), method(object({
30485
+ deviceIds: array(number()).min(1).max(200),
30486
+ fromMs: number(),
30487
+ toMs: number(),
30488
+ tzOffsetMinutes: number()
30489
+ }), array(RecordingDaysForDeviceSchema).readonly(), {
30490
+ kind: "query",
30491
+ auth: "protected"
30395
30492
  }), method(object({
30396
30493
  deviceId: number(),
30397
30494
  fromMs: number(),
@@ -37505,6 +37602,12 @@ Object.freeze({
37505
37602
  addonId: null,
37506
37603
  access: "view"
37507
37604
  },
37605
+ "pipelineAnalytics.getEventDensityBatch": {
37606
+ capName: "pipeline-analytics",
37607
+ capScope: "device",
37608
+ addonId: null,
37609
+ access: "view"
37610
+ },
37508
37611
  "pipelineAnalytics.getEventMedia": {
37509
37612
  capName: "pipeline-analytics",
37510
37613
  capScope: "device",
@@ -38627,12 +38730,24 @@ Object.freeze({
38627
38730
  addonId: null,
38628
38731
  access: "view"
38629
38732
  },
38733
+ "recording.getAvailabilityBatch": {
38734
+ capName: "recording",
38735
+ capScope: "system",
38736
+ addonId: null,
38737
+ access: "view"
38738
+ },
38630
38739
  "recording.getDaysWithRecordings": {
38631
38740
  capName: "recording",
38632
38741
  capScope: "system",
38633
38742
  addonId: null,
38634
38743
  access: "view"
38635
38744
  },
38745
+ "recording.getDaysWithRecordingsBatch": {
38746
+ capName: "recording",
38747
+ capScope: "system",
38748
+ addonId: null,
38749
+ access: "view"
38750
+ },
38636
38751
  "recording.getDeviceConfig": {
38637
38752
  capName: "recording",
38638
38753
  capScope: "system",
@@ -41237,6 +41352,11 @@ Object.freeze({
41237
41352
  form: "single",
41238
41353
  optional: false
41239
41354
  }],
41355
+ "pipelineAnalytics.getEventDensityBatch": [{
41356
+ name: "deviceIds",
41357
+ form: "array",
41358
+ optional: false
41359
+ }],
41240
41360
  "pipelineAnalytics.getEventMedia": [{
41241
41361
  name: "deviceId",
41242
41362
  form: "single",
@@ -41652,11 +41772,21 @@ Object.freeze({
41652
41772
  form: "single",
41653
41773
  optional: false
41654
41774
  }],
41775
+ "recording.getAvailabilityBatch": [{
41776
+ name: "deviceIds",
41777
+ form: "array",
41778
+ optional: false
41779
+ }],
41655
41780
  "recording.getDaysWithRecordings": [{
41656
41781
  name: "deviceId",
41657
41782
  form: "single",
41658
41783
  optional: false
41659
41784
  }],
41785
+ "recording.getDaysWithRecordingsBatch": [{
41786
+ name: "deviceIds",
41787
+ form: "array",
41788
+ optional: false
41789
+ }],
41660
41790
  "recording.getDeviceConfig": [{
41661
41791
  name: "deviceId",
41662
41792
  form: "single",
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-WrUmjaGQ.js");
5
+ const require_dist = require("../dist-BHNF6L4b.js");
6
6
  let node_fs = require("node:fs");
7
7
  node_fs = require_dist.__toESM(node_fs);
8
8
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { P as PoolMemoryWatchdog, ht as parseProcStatus, it as embeddingEncoderCapability, kt as BaseAddon, lt as hfModelUrl, xt as resolvePoolMemoryPolicy } from "../dist-BnxvdGGq.mjs";
1
+ import { P as PoolMemoryWatchdog, ht as parseProcStatus, it as embeddingEncoderCapability, kt as BaseAddon, lt as hfModelUrl, xt as resolvePoolMemoryPolicy } from "../dist-C-Owk01b.mjs";
2
2
  import { createRequire } from "node:module";
3
3
  import * as fs from "node:fs";
4
4
  import * as path$1 from "node:path";
@@ -1,6 +1,6 @@
1
1
  import { a as e, i as t, n, o as r, r as i, t as a } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare__react__loadShare__.js-C0AuF9av.mjs";
2
2
  import { t as o } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-B3Wx5J80.mjs";
3
- import { a as s, i as c, n as l, o as u, r as d, s as f, t as p } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Be4GMf6Z.mjs";
3
+ import { a as s, i as c, n as l, o as u, r as d, s as f, t as p } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-BiD2rcOn.mjs";
4
4
  import { n as m, r as h, t as g } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-Bm-iyjmq.mjs";
5
5
  //#region ../../node_modules/lucide-react/dist/esm/shared/src/utils.js
6
6
  var _ = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), v = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), y = (e) => {
@@ -3,7 +3,7 @@ import "./dist-CYZr2fwk.mjs";
3
3
  var e = {
4
4
  "@camstack/sdk": {
5
5
  name: "@camstack/sdk",
6
- version: "1.2.53",
6
+ version: "1.2.55",
7
7
  scope: ["default"],
8
8
  loaded: !1,
9
9
  from: "addon_pipeline_analytics_widgets",
@@ -18,7 +18,7 @@ var e = {
18
18
  },
19
19
  "@camstack/types": {
20
20
  name: "@camstack/types",
21
- version: "1.2.133",
21
+ version: "1.2.135",
22
22
  scope: ["default"],
23
23
  loaded: !1,
24
24
  from: "addon_pipeline_analytics_widgets",
@@ -33,7 +33,7 @@ var e = {
33
33
  },
34
34
  "@camstack/ui-library": {
35
35
  name: "@camstack/ui-library",
36
- version: "1.2.98",
36
+ version: "1.2.100",
37
37
  scope: ["default"],
38
38
  loaded: !1,
39
39
  from: "addon_pipeline_analytics_widgets",