@camstack/addon-decoder-nodeav 1.2.57 → 1.2.59

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/index.js CHANGED
@@ -10564,6 +10564,89 @@ var LocationStatSchema = object({
10564
10564
  fileCount: number(),
10565
10565
  present: boolean()
10566
10566
  });
10567
+ /** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
10568
+ var BackupRunStateSchema = _enum([
10569
+ "queued",
10570
+ "running",
10571
+ "succeeded",
10572
+ "failed",
10573
+ "cancelled"
10574
+ ]);
10575
+ /**
10576
+ * Where a running backup currently is. `queued` before it starts,
10577
+ * `building` while the tar.gz is being staged, `uploading` during the
10578
+ * per-destination fan-out, `done` once terminal.
10579
+ */
10580
+ var BackupRunPhaseSchema = _enum([
10581
+ "queued",
10582
+ "building",
10583
+ "uploading",
10584
+ "done"
10585
+ ]);
10586
+ /**
10587
+ * Observable state of one backup run — readable WHILE it runs via
10588
+ * `backup.listRuns`. This is what makes the execution queue and
10589
+ * `backup.cancel` usable: the 2026-09-04 incident (two concurrent
10590
+ * multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
10591
+ * diagnosable with `du` because nothing reported that runs existed or
10592
+ * how large the staged archive had grown.
10593
+ */
10594
+ var BackupRunSchema = object({
10595
+ /** Stable run id — the handle `backup.cancel` takes. */
10596
+ id: string(),
10597
+ state: BackupRunStateSchema,
10598
+ phase: BackupRunPhaseSchema,
10599
+ /**
10600
+ * Resolved destination location ids. Empty while queued (targets are
10601
+ * resolved when the run starts, against the then-current policies).
10602
+ */
10603
+ destinationIds: array(string()).readonly(),
10604
+ label: string().optional(),
10605
+ /** ms-epoch when the run was submitted (trigger call / schedule fire). */
10606
+ requestedAt: number(),
10607
+ /** ms-epoch when the run left the queue and started building. */
10608
+ startedAt: number().optional(),
10609
+ /** ms-epoch when the run reached a terminal state. */
10610
+ finishedAt: number().optional(),
10611
+ /** Compressed bytes of the staging archive written so far. */
10612
+ stagedBytes: number(),
10613
+ /** Final staged archive size, once the build phase completes. */
10614
+ archiveSizeBytes: number().optional(),
10615
+ /** Bytes pushed to the destination currently uploading. */
10616
+ uploadedBytes: number(),
10617
+ /** Destinations where the archive fully landed (uploaded + indexed). */
10618
+ completedDestinationIds: array(string()).readonly(),
10619
+ /** Destinations that failed during the fan-out. */
10620
+ failedDestinationIds: array(string()).readonly(),
10621
+ /** Failure message when `state === 'failed'`. */
10622
+ error: string().optional(),
10623
+ /**
10624
+ * 1-based place in the execution queue — 1 = runs next. Present only
10625
+ * while `state === 'queued'`. Stamped by the orchestrator from the
10626
+ * queue's OWN pending order, never derived from timestamps, so the
10627
+ * UI cannot show an order the executor will not honour.
10628
+ */
10629
+ queuePosition: number().int().min(1).optional()
10630
+ });
10631
+ /**
10632
+ * Result of `backup.trigger`. The call still resolves when the run
10633
+ * terminates (compat with schedule-driven runs and the admin UI), but
10634
+ * it now names the run and says whether it had to WAIT: a trigger that
10635
+ * arrives while another run is in flight is enqueued (or joined onto
10636
+ * an identical already-queued run), never started concurrently.
10637
+ */
10638
+ var BackupTriggerResultSchema = object({
10639
+ /** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
10640
+ runId: string(),
10641
+ /** True when the run waited behind an in-flight run instead of starting immediately. */
10642
+ queued: boolean(),
10643
+ /** True when this trigger was coalesced onto an identical already-queued run. */
10644
+ joined: boolean(),
10645
+ /** True when the run was cancelled before completing every destination. */
10646
+ cancelled: boolean(),
10647
+ /** One entry per destination the archive landed at (partial on cancel). */
10648
+ entries: array(BackupEntrySchema).readonly()
10649
+ });
10567
10650
  /**
10568
10651
  * A backup schedule — the N:M "entry" that binds one cron cadence to a
10569
10652
  * SET of destination locations. Supersedes the per-location cron on
@@ -10611,7 +10694,10 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
10611
10694
  * retention (manual runs).
10612
10695
  */
10613
10696
  retentionCount: number().int().min(1).max(1e3).optional()
10614
- }).optional(), array(BackupEntrySchema).readonly(), {
10697
+ }).optional(), BackupTriggerResultSchema, {
10698
+ kind: "mutation",
10699
+ auth: "admin"
10700
+ }), method(_void(), array(BackupRunSchema).readonly(), { auth: "admin" }), method(object({ runId: string() }), object({ cancelled: boolean() }), {
10615
10701
  kind: "mutation",
10616
10702
  auth: "admin"
10617
10703
  }), method(_void(), array(BackupEntrySchema).readonly(), { auth: "admin" }), method(_void(), array(LocationStatSchema).readonly(), { auth: "admin" }), method(object({
@@ -11328,6 +11414,14 @@ method(object({
11328
11414
  }), object({ success: literal(true) }), {
11329
11415
  kind: "mutation",
11330
11416
  auth: "admin"
11417
+ }), method(object({ deviceId: number().int().nonnegative() }), object({
11418
+ derivedStreamsDeleted: array(string()).readonly(),
11419
+ assignmentsPurged: boolean(),
11420
+ probeSnapshotsDropped: number().int().nonnegative(),
11421
+ rtspTokenRowsDeleted: number().int().nonnegative()
11422
+ }), {
11423
+ kind: "mutation",
11424
+ auth: "admin"
11331
11425
  }), method(object({
11332
11426
  deviceId: number(),
11333
11427
  /** Absent = the LOWEST assigned profile — a notification attachment is
@@ -18971,7 +19065,20 @@ var RecentTracksQueryInput = object({
18971
19065
  projection: TrackProjectionSchema.optional(),
18972
19066
  /** Include stationary-promoted rows (parked objects). Default false: the
18973
19067
  * feed lists passages; parking records live on the stationary registry. */
18974
- includeStationary: boolean().optional()
19068
+ includeStationary: boolean().optional(),
19069
+ /**
19070
+ * Restrict to these track classes. ABSENT or EMPTY means no filter.
19071
+ *
19072
+ * The same filter `listTracks` takes, because the timeline's class chips must
19073
+ * mean the same thing whether the scope is one camera or twelve. Until this
19074
+ * existed the scoped feed downloaded a page and narrowed it on the phone
19075
+ * while the single-camera path narrowed the read — one filter, two costs.
19076
+ *
19077
+ * A SUPERSET prefilter on `classes[]`, like its single-camera twin: rows
19078
+ * whose class list is unreadable are kept, and the client's rule stays the
19079
+ * exact one.
19080
+ */
19081
+ classes: array(string()).optional()
18975
19082
  });
18976
19083
  var RecentTracksPageSchema = object({
18977
19084
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -23009,8 +23116,22 @@ DeviceType.Automation, method(object({ deviceId: number().int().nonnegative() })
23009
23116
  * threshold.
23010
23117
  */
23011
23118
  var BatteryStatusSchema = object({
23012
- /** 0..100 inclusive. Firmware-reported. */
23013
- percentage: number().min(0).max(100),
23119
+ /**
23120
+ * 0..100 inclusive, firmware-reported. **`null` means NOT YET KNOWN** — the
23121
+ * provider has registered the capability but no reading has landed.
23122
+ *
23123
+ * It is nullable because it was not, and the only value a provider could
23124
+ * seed with was `0`. A battery camera behind an NVR therefore announced
23125
+ * itself at 0% on every start and corrected itself a moment later, which is
23126
+ * indistinguishable from a real flat battery: it fires the low-battery alert
23127
+ * every time the hub restarts. Unknown is not empty (D315), and on a battery
23128
+ * reading the difference is an alarm.
23129
+ *
23130
+ * `vacuum-control` and `lawn-mower-control` already model it this way.
23131
+ * Consumers must SKIP a null rather than coerce it — `battery-band` already
23132
+ * declines to band a non-finite reading, which is the correct shape.
23133
+ */
23134
+ percentage: number().min(0).max(100).nullable(),
23014
23135
  /**
23015
23136
  * Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
23016
23137
  * Reolink-specific for the Solar Panel 2 accessory (will become
@@ -29489,6 +29610,12 @@ Object.freeze({
29489
29610
  addonId: null,
29490
29611
  access: "create"
29491
29612
  },
29613
+ "backup.cancel": {
29614
+ capName: "backup",
29615
+ capScope: "system",
29616
+ addonId: null,
29617
+ access: "create"
29618
+ },
29492
29619
  "backup.delete": {
29493
29620
  capName: "backup",
29494
29621
  capScope: "system",
@@ -29531,6 +29658,12 @@ Object.freeze({
29531
29658
  addonId: null,
29532
29659
  access: "view"
29533
29660
  },
29661
+ "backup.listRuns": {
29662
+ capName: "backup",
29663
+ capScope: "system",
29664
+ addonId: null,
29665
+ access: "view"
29666
+ },
29534
29667
  "backup.listSchedules": {
29535
29668
  capName: "backup",
29536
29669
  capScope: "system",
@@ -34097,6 +34230,12 @@ Object.freeze({
34097
34230
  addonId: null,
34098
34231
  access: "create"
34099
34232
  },
34233
+ "streamBroker.forgetDeviceHardware": {
34234
+ capName: "stream-broker",
34235
+ capScope: "system",
34236
+ addonId: null,
34237
+ access: "delete"
34238
+ },
34100
34239
  "streamBroker.getAllRtspEntries": {
34101
34240
  capName: "stream-broker",
34102
34241
  capScope: "system",
@@ -36555,6 +36694,11 @@ Object.freeze({
36555
36694
  form: "single",
36556
36695
  optional: false
36557
36696
  }],
36697
+ "streamBroker.forgetDeviceHardware": [{
36698
+ name: "deviceId",
36699
+ form: "single",
36700
+ optional: false
36701
+ }],
36558
36702
  "streamBroker.getDeviceAudioMute": [{
36559
36703
  name: "deviceId",
36560
36704
  form: "single",
package/dist/index.mjs CHANGED
@@ -10560,6 +10560,89 @@ var LocationStatSchema = object({
10560
10560
  fileCount: number(),
10561
10561
  present: boolean()
10562
10562
  });
10563
+ /** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
10564
+ var BackupRunStateSchema = _enum([
10565
+ "queued",
10566
+ "running",
10567
+ "succeeded",
10568
+ "failed",
10569
+ "cancelled"
10570
+ ]);
10571
+ /**
10572
+ * Where a running backup currently is. `queued` before it starts,
10573
+ * `building` while the tar.gz is being staged, `uploading` during the
10574
+ * per-destination fan-out, `done` once terminal.
10575
+ */
10576
+ var BackupRunPhaseSchema = _enum([
10577
+ "queued",
10578
+ "building",
10579
+ "uploading",
10580
+ "done"
10581
+ ]);
10582
+ /**
10583
+ * Observable state of one backup run — readable WHILE it runs via
10584
+ * `backup.listRuns`. This is what makes the execution queue and
10585
+ * `backup.cancel` usable: the 2026-09-04 incident (two concurrent
10586
+ * multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
10587
+ * diagnosable with `du` because nothing reported that runs existed or
10588
+ * how large the staged archive had grown.
10589
+ */
10590
+ var BackupRunSchema = object({
10591
+ /** Stable run id — the handle `backup.cancel` takes. */
10592
+ id: string(),
10593
+ state: BackupRunStateSchema,
10594
+ phase: BackupRunPhaseSchema,
10595
+ /**
10596
+ * Resolved destination location ids. Empty while queued (targets are
10597
+ * resolved when the run starts, against the then-current policies).
10598
+ */
10599
+ destinationIds: array(string()).readonly(),
10600
+ label: string().optional(),
10601
+ /** ms-epoch when the run was submitted (trigger call / schedule fire). */
10602
+ requestedAt: number(),
10603
+ /** ms-epoch when the run left the queue and started building. */
10604
+ startedAt: number().optional(),
10605
+ /** ms-epoch when the run reached a terminal state. */
10606
+ finishedAt: number().optional(),
10607
+ /** Compressed bytes of the staging archive written so far. */
10608
+ stagedBytes: number(),
10609
+ /** Final staged archive size, once the build phase completes. */
10610
+ archiveSizeBytes: number().optional(),
10611
+ /** Bytes pushed to the destination currently uploading. */
10612
+ uploadedBytes: number(),
10613
+ /** Destinations where the archive fully landed (uploaded + indexed). */
10614
+ completedDestinationIds: array(string()).readonly(),
10615
+ /** Destinations that failed during the fan-out. */
10616
+ failedDestinationIds: array(string()).readonly(),
10617
+ /** Failure message when `state === 'failed'`. */
10618
+ error: string().optional(),
10619
+ /**
10620
+ * 1-based place in the execution queue — 1 = runs next. Present only
10621
+ * while `state === 'queued'`. Stamped by the orchestrator from the
10622
+ * queue's OWN pending order, never derived from timestamps, so the
10623
+ * UI cannot show an order the executor will not honour.
10624
+ */
10625
+ queuePosition: number().int().min(1).optional()
10626
+ });
10627
+ /**
10628
+ * Result of `backup.trigger`. The call still resolves when the run
10629
+ * terminates (compat with schedule-driven runs and the admin UI), but
10630
+ * it now names the run and says whether it had to WAIT: a trigger that
10631
+ * arrives while another run is in flight is enqueued (or joined onto
10632
+ * an identical already-queued run), never started concurrently.
10633
+ */
10634
+ var BackupTriggerResultSchema = object({
10635
+ /** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
10636
+ runId: string(),
10637
+ /** True when the run waited behind an in-flight run instead of starting immediately. */
10638
+ queued: boolean(),
10639
+ /** True when this trigger was coalesced onto an identical already-queued run. */
10640
+ joined: boolean(),
10641
+ /** True when the run was cancelled before completing every destination. */
10642
+ cancelled: boolean(),
10643
+ /** One entry per destination the archive landed at (partial on cancel). */
10644
+ entries: array(BackupEntrySchema).readonly()
10645
+ });
10563
10646
  /**
10564
10647
  * A backup schedule — the N:M "entry" that binds one cron cadence to a
10565
10648
  * SET of destination locations. Supersedes the per-location cron on
@@ -10607,7 +10690,10 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
10607
10690
  * retention (manual runs).
10608
10691
  */
10609
10692
  retentionCount: number().int().min(1).max(1e3).optional()
10610
- }).optional(), array(BackupEntrySchema).readonly(), {
10693
+ }).optional(), BackupTriggerResultSchema, {
10694
+ kind: "mutation",
10695
+ auth: "admin"
10696
+ }), method(_void(), array(BackupRunSchema).readonly(), { auth: "admin" }), method(object({ runId: string() }), object({ cancelled: boolean() }), {
10611
10697
  kind: "mutation",
10612
10698
  auth: "admin"
10613
10699
  }), method(_void(), array(BackupEntrySchema).readonly(), { auth: "admin" }), method(_void(), array(LocationStatSchema).readonly(), { auth: "admin" }), method(object({
@@ -11324,6 +11410,14 @@ method(object({
11324
11410
  }), object({ success: literal(true) }), {
11325
11411
  kind: "mutation",
11326
11412
  auth: "admin"
11413
+ }), method(object({ deviceId: number().int().nonnegative() }), object({
11414
+ derivedStreamsDeleted: array(string()).readonly(),
11415
+ assignmentsPurged: boolean(),
11416
+ probeSnapshotsDropped: number().int().nonnegative(),
11417
+ rtspTokenRowsDeleted: number().int().nonnegative()
11418
+ }), {
11419
+ kind: "mutation",
11420
+ auth: "admin"
11327
11421
  }), method(object({
11328
11422
  deviceId: number(),
11329
11423
  /** Absent = the LOWEST assigned profile — a notification attachment is
@@ -18967,7 +19061,20 @@ var RecentTracksQueryInput = object({
18967
19061
  projection: TrackProjectionSchema.optional(),
18968
19062
  /** Include stationary-promoted rows (parked objects). Default false: the
18969
19063
  * feed lists passages; parking records live on the stationary registry. */
18970
- includeStationary: boolean().optional()
19064
+ includeStationary: boolean().optional(),
19065
+ /**
19066
+ * Restrict to these track classes. ABSENT or EMPTY means no filter.
19067
+ *
19068
+ * The same filter `listTracks` takes, because the timeline's class chips must
19069
+ * mean the same thing whether the scope is one camera or twelve. Until this
19070
+ * existed the scoped feed downloaded a page and narrowed it on the phone
19071
+ * while the single-camera path narrowed the read — one filter, two costs.
19072
+ *
19073
+ * A SUPERSET prefilter on `classes[]`, like its single-camera twin: rows
19074
+ * whose class list is unreadable are kept, and the client's rule stays the
19075
+ * exact one.
19076
+ */
19077
+ classes: array(string()).optional()
18971
19078
  });
18972
19079
  var RecentTracksPageSchema = object({
18973
19080
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -23005,8 +23112,22 @@ DeviceType.Automation, method(object({ deviceId: number().int().nonnegative() })
23005
23112
  * threshold.
23006
23113
  */
23007
23114
  var BatteryStatusSchema = object({
23008
- /** 0..100 inclusive. Firmware-reported. */
23009
- percentage: number().min(0).max(100),
23115
+ /**
23116
+ * 0..100 inclusive, firmware-reported. **`null` means NOT YET KNOWN** — the
23117
+ * provider has registered the capability but no reading has landed.
23118
+ *
23119
+ * It is nullable because it was not, and the only value a provider could
23120
+ * seed with was `0`. A battery camera behind an NVR therefore announced
23121
+ * itself at 0% on every start and corrected itself a moment later, which is
23122
+ * indistinguishable from a real flat battery: it fires the low-battery alert
23123
+ * every time the hub restarts. Unknown is not empty (D315), and on a battery
23124
+ * reading the difference is an alarm.
23125
+ *
23126
+ * `vacuum-control` and `lawn-mower-control` already model it this way.
23127
+ * Consumers must SKIP a null rather than coerce it — `battery-band` already
23128
+ * declines to band a non-finite reading, which is the correct shape.
23129
+ */
23130
+ percentage: number().min(0).max(100).nullable(),
23010
23131
  /**
23011
23132
  * Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
23012
23133
  * Reolink-specific for the Solar Panel 2 accessory (will become
@@ -29485,6 +29606,12 @@ Object.freeze({
29485
29606
  addonId: null,
29486
29607
  access: "create"
29487
29608
  },
29609
+ "backup.cancel": {
29610
+ capName: "backup",
29611
+ capScope: "system",
29612
+ addonId: null,
29613
+ access: "create"
29614
+ },
29488
29615
  "backup.delete": {
29489
29616
  capName: "backup",
29490
29617
  capScope: "system",
@@ -29527,6 +29654,12 @@ Object.freeze({
29527
29654
  addonId: null,
29528
29655
  access: "view"
29529
29656
  },
29657
+ "backup.listRuns": {
29658
+ capName: "backup",
29659
+ capScope: "system",
29660
+ addonId: null,
29661
+ access: "view"
29662
+ },
29530
29663
  "backup.listSchedules": {
29531
29664
  capName: "backup",
29532
29665
  capScope: "system",
@@ -34093,6 +34226,12 @@ Object.freeze({
34093
34226
  addonId: null,
34094
34227
  access: "create"
34095
34228
  },
34229
+ "streamBroker.forgetDeviceHardware": {
34230
+ capName: "stream-broker",
34231
+ capScope: "system",
34232
+ addonId: null,
34233
+ access: "delete"
34234
+ },
34096
34235
  "streamBroker.getAllRtspEntries": {
34097
34236
  capName: "stream-broker",
34098
34237
  capScope: "system",
@@ -36551,6 +36690,11 @@ Object.freeze({
36551
36690
  form: "single",
36552
36691
  optional: false
36553
36692
  }],
36693
+ "streamBroker.forgetDeviceHardware": [{
36694
+ name: "deviceId",
36695
+ form: "single",
36696
+ optional: false
36697
+ }],
36554
36698
  "streamBroker.getDeviceAudioMute": [{
36555
36699
  name: "deviceId",
36556
36700
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-decoder-nodeav",
3
- "version": "1.2.57",
3
+ "version": "1.2.59",
4
4
  "description": "Standalone in-process node-av decoder addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",