@camstack/addon-provider-hikvision 1.2.65 → 1.2.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/addon.js CHANGED
@@ -10803,6 +10803,89 @@ var LocationStatSchema = object({
10803
10803
  fileCount: number(),
10804
10804
  present: boolean()
10805
10805
  });
10806
+ /** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
10807
+ var BackupRunStateSchema = _enum([
10808
+ "queued",
10809
+ "running",
10810
+ "succeeded",
10811
+ "failed",
10812
+ "cancelled"
10813
+ ]);
10814
+ /**
10815
+ * Where a running backup currently is. `queued` before it starts,
10816
+ * `building` while the tar.gz is being staged, `uploading` during the
10817
+ * per-destination fan-out, `done` once terminal.
10818
+ */
10819
+ var BackupRunPhaseSchema = _enum([
10820
+ "queued",
10821
+ "building",
10822
+ "uploading",
10823
+ "done"
10824
+ ]);
10825
+ /**
10826
+ * Observable state of one backup run — readable WHILE it runs via
10827
+ * `backup.listRuns`. This is what makes the execution queue and
10828
+ * `backup.cancel` usable: the 2026-09-04 incident (two concurrent
10829
+ * multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
10830
+ * diagnosable with `du` because nothing reported that runs existed or
10831
+ * how large the staged archive had grown.
10832
+ */
10833
+ var BackupRunSchema = object({
10834
+ /** Stable run id — the handle `backup.cancel` takes. */
10835
+ id: string(),
10836
+ state: BackupRunStateSchema,
10837
+ phase: BackupRunPhaseSchema,
10838
+ /**
10839
+ * Resolved destination location ids. Empty while queued (targets are
10840
+ * resolved when the run starts, against the then-current policies).
10841
+ */
10842
+ destinationIds: array(string()).readonly(),
10843
+ label: string().optional(),
10844
+ /** ms-epoch when the run was submitted (trigger call / schedule fire). */
10845
+ requestedAt: number(),
10846
+ /** ms-epoch when the run left the queue and started building. */
10847
+ startedAt: number().optional(),
10848
+ /** ms-epoch when the run reached a terminal state. */
10849
+ finishedAt: number().optional(),
10850
+ /** Compressed bytes of the staging archive written so far. */
10851
+ stagedBytes: number(),
10852
+ /** Final staged archive size, once the build phase completes. */
10853
+ archiveSizeBytes: number().optional(),
10854
+ /** Bytes pushed to the destination currently uploading. */
10855
+ uploadedBytes: number(),
10856
+ /** Destinations where the archive fully landed (uploaded + indexed). */
10857
+ completedDestinationIds: array(string()).readonly(),
10858
+ /** Destinations that failed during the fan-out. */
10859
+ failedDestinationIds: array(string()).readonly(),
10860
+ /** Failure message when `state === 'failed'`. */
10861
+ error: string().optional(),
10862
+ /**
10863
+ * 1-based place in the execution queue — 1 = runs next. Present only
10864
+ * while `state === 'queued'`. Stamped by the orchestrator from the
10865
+ * queue's OWN pending order, never derived from timestamps, so the
10866
+ * UI cannot show an order the executor will not honour.
10867
+ */
10868
+ queuePosition: number().int().min(1).optional()
10869
+ });
10870
+ /**
10871
+ * Result of `backup.trigger`. The call still resolves when the run
10872
+ * terminates (compat with schedule-driven runs and the admin UI), but
10873
+ * it now names the run and says whether it had to WAIT: a trigger that
10874
+ * arrives while another run is in flight is enqueued (or joined onto
10875
+ * an identical already-queued run), never started concurrently.
10876
+ */
10877
+ var BackupTriggerResultSchema = object({
10878
+ /** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
10879
+ runId: string(),
10880
+ /** True when the run waited behind an in-flight run instead of starting immediately. */
10881
+ queued: boolean(),
10882
+ /** True when this trigger was coalesced onto an identical already-queued run. */
10883
+ joined: boolean(),
10884
+ /** True when the run was cancelled before completing every destination. */
10885
+ cancelled: boolean(),
10886
+ /** One entry per destination the archive landed at (partial on cancel). */
10887
+ entries: array(BackupEntrySchema).readonly()
10888
+ });
10806
10889
  /**
10807
10890
  * A backup schedule — the N:M "entry" that binds one cron cadence to a
10808
10891
  * SET of destination locations. Supersedes the per-location cron on
@@ -10850,7 +10933,10 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
10850
10933
  * retention (manual runs).
10851
10934
  */
10852
10935
  retentionCount: number().int().min(1).max(1e3).optional()
10853
- }).optional(), array(BackupEntrySchema).readonly(), {
10936
+ }).optional(), BackupTriggerResultSchema, {
10937
+ kind: "mutation",
10938
+ auth: "admin"
10939
+ }), method(_void(), array(BackupRunSchema).readonly(), { auth: "admin" }), method(object({ runId: string() }), object({ cancelled: boolean() }), {
10854
10940
  kind: "mutation",
10855
10941
  auth: "admin"
10856
10942
  }), method(_void(), array(BackupEntrySchema).readonly(), { auth: "admin" }), method(_void(), array(LocationStatSchema).readonly(), { auth: "admin" }), method(object({
@@ -11567,6 +11653,14 @@ method(object({
11567
11653
  }), object({ success: literal(true) }), {
11568
11654
  kind: "mutation",
11569
11655
  auth: "admin"
11656
+ }), method(object({ deviceId: number().int().nonnegative() }), object({
11657
+ derivedStreamsDeleted: array(string()).readonly(),
11658
+ assignmentsPurged: boolean(),
11659
+ probeSnapshotsDropped: number().int().nonnegative(),
11660
+ rtspTokenRowsDeleted: number().int().nonnegative()
11661
+ }), {
11662
+ kind: "mutation",
11663
+ auth: "admin"
11570
11664
  }), method(object({
11571
11665
  deviceId: number(),
11572
11666
  /** Absent = the LOWEST assigned profile — a notification attachment is
@@ -19490,7 +19584,20 @@ var RecentTracksQueryInput = object({
19490
19584
  projection: TrackProjectionSchema.optional(),
19491
19585
  /** Include stationary-promoted rows (parked objects). Default false: the
19492
19586
  * feed lists passages; parking records live on the stationary registry. */
19493
- includeStationary: boolean().optional()
19587
+ includeStationary: boolean().optional(),
19588
+ /**
19589
+ * Restrict to these track classes. ABSENT or EMPTY means no filter.
19590
+ *
19591
+ * The same filter `listTracks` takes, because the timeline's class chips must
19592
+ * mean the same thing whether the scope is one camera or twelve. Until this
19593
+ * existed the scoped feed downloaded a page and narrowed it on the phone
19594
+ * while the single-camera path narrowed the read — one filter, two costs.
19595
+ *
19596
+ * A SUPERSET prefilter on `classes[]`, like its single-camera twin: rows
19597
+ * whose class list is unreadable are kept, and the client's rule stays the
19598
+ * exact one.
19599
+ */
19600
+ classes: array(string()).optional()
19494
19601
  });
19495
19602
  var RecentTracksPageSchema = object({
19496
19603
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -23764,8 +23871,22 @@ var automationControlCapability = {
23764
23871
  * threshold.
23765
23872
  */
23766
23873
  var BatteryStatusSchema = object({
23767
- /** 0..100 inclusive. Firmware-reported. */
23768
- percentage: number().min(0).max(100),
23874
+ /**
23875
+ * 0..100 inclusive, firmware-reported. **`null` means NOT YET KNOWN** — the
23876
+ * provider has registered the capability but no reading has landed.
23877
+ *
23878
+ * It is nullable because it was not, and the only value a provider could
23879
+ * seed with was `0`. A battery camera behind an NVR therefore announced
23880
+ * itself at 0% on every start and corrected itself a moment later, which is
23881
+ * indistinguishable from a real flat battery: it fires the low-battery alert
23882
+ * every time the hub restarts. Unknown is not empty (D315), and on a battery
23883
+ * reading the difference is an alarm.
23884
+ *
23885
+ * `vacuum-control` and `lawn-mower-control` already model it this way.
23886
+ * Consumers must SKIP a null rather than coerce it — `battery-band` already
23887
+ * declines to band a non-finite reading, which is the correct shape.
23888
+ */
23889
+ percentage: number().min(0).max(100).nullable(),
23769
23890
  /**
23770
23891
  * Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
23771
23892
  * Reolink-specific for the Solar Panel 2 accessory (will become
@@ -34090,6 +34211,12 @@ Object.freeze({
34090
34211
  addonId: null,
34091
34212
  access: "create"
34092
34213
  },
34214
+ "backup.cancel": {
34215
+ capName: "backup",
34216
+ capScope: "system",
34217
+ addonId: null,
34218
+ access: "create"
34219
+ },
34093
34220
  "backup.delete": {
34094
34221
  capName: "backup",
34095
34222
  capScope: "system",
@@ -34132,6 +34259,12 @@ Object.freeze({
34132
34259
  addonId: null,
34133
34260
  access: "view"
34134
34261
  },
34262
+ "backup.listRuns": {
34263
+ capName: "backup",
34264
+ capScope: "system",
34265
+ addonId: null,
34266
+ access: "view"
34267
+ },
34135
34268
  "backup.listSchedules": {
34136
34269
  capName: "backup",
34137
34270
  capScope: "system",
@@ -38698,6 +38831,12 @@ Object.freeze({
38698
38831
  addonId: null,
38699
38832
  access: "create"
38700
38833
  },
38834
+ "streamBroker.forgetDeviceHardware": {
38835
+ capName: "stream-broker",
38836
+ capScope: "system",
38837
+ addonId: null,
38838
+ access: "delete"
38839
+ },
38701
38840
  "streamBroker.getAllRtspEntries": {
38702
38841
  capName: "stream-broker",
38703
38842
  capScope: "system",
@@ -41156,6 +41295,11 @@ Object.freeze({
41156
41295
  form: "single",
41157
41296
  optional: false
41158
41297
  }],
41298
+ "streamBroker.forgetDeviceHardware": [{
41299
+ name: "deviceId",
41300
+ form: "single",
41301
+ optional: false
41302
+ }],
41159
41303
  "streamBroker.getDeviceAudioMute": [{
41160
41304
  name: "deviceId",
41161
41305
  form: "single",
package/dist/addon.mjs CHANGED
@@ -10804,6 +10804,89 @@ var LocationStatSchema = object({
10804
10804
  fileCount: number(),
10805
10805
  present: boolean()
10806
10806
  });
10807
+ /** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
10808
+ var BackupRunStateSchema = _enum([
10809
+ "queued",
10810
+ "running",
10811
+ "succeeded",
10812
+ "failed",
10813
+ "cancelled"
10814
+ ]);
10815
+ /**
10816
+ * Where a running backup currently is. `queued` before it starts,
10817
+ * `building` while the tar.gz is being staged, `uploading` during the
10818
+ * per-destination fan-out, `done` once terminal.
10819
+ */
10820
+ var BackupRunPhaseSchema = _enum([
10821
+ "queued",
10822
+ "building",
10823
+ "uploading",
10824
+ "done"
10825
+ ]);
10826
+ /**
10827
+ * Observable state of one backup run — readable WHILE it runs via
10828
+ * `backup.listRuns`. This is what makes the execution queue and
10829
+ * `backup.cancel` usable: the 2026-09-04 incident (two concurrent
10830
+ * multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
10831
+ * diagnosable with `du` because nothing reported that runs existed or
10832
+ * how large the staged archive had grown.
10833
+ */
10834
+ var BackupRunSchema = object({
10835
+ /** Stable run id — the handle `backup.cancel` takes. */
10836
+ id: string(),
10837
+ state: BackupRunStateSchema,
10838
+ phase: BackupRunPhaseSchema,
10839
+ /**
10840
+ * Resolved destination location ids. Empty while queued (targets are
10841
+ * resolved when the run starts, against the then-current policies).
10842
+ */
10843
+ destinationIds: array(string()).readonly(),
10844
+ label: string().optional(),
10845
+ /** ms-epoch when the run was submitted (trigger call / schedule fire). */
10846
+ requestedAt: number(),
10847
+ /** ms-epoch when the run left the queue and started building. */
10848
+ startedAt: number().optional(),
10849
+ /** ms-epoch when the run reached a terminal state. */
10850
+ finishedAt: number().optional(),
10851
+ /** Compressed bytes of the staging archive written so far. */
10852
+ stagedBytes: number(),
10853
+ /** Final staged archive size, once the build phase completes. */
10854
+ archiveSizeBytes: number().optional(),
10855
+ /** Bytes pushed to the destination currently uploading. */
10856
+ uploadedBytes: number(),
10857
+ /** Destinations where the archive fully landed (uploaded + indexed). */
10858
+ completedDestinationIds: array(string()).readonly(),
10859
+ /** Destinations that failed during the fan-out. */
10860
+ failedDestinationIds: array(string()).readonly(),
10861
+ /** Failure message when `state === 'failed'`. */
10862
+ error: string().optional(),
10863
+ /**
10864
+ * 1-based place in the execution queue — 1 = runs next. Present only
10865
+ * while `state === 'queued'`. Stamped by the orchestrator from the
10866
+ * queue's OWN pending order, never derived from timestamps, so the
10867
+ * UI cannot show an order the executor will not honour.
10868
+ */
10869
+ queuePosition: number().int().min(1).optional()
10870
+ });
10871
+ /**
10872
+ * Result of `backup.trigger`. The call still resolves when the run
10873
+ * terminates (compat with schedule-driven runs and the admin UI), but
10874
+ * it now names the run and says whether it had to WAIT: a trigger that
10875
+ * arrives while another run is in flight is enqueued (or joined onto
10876
+ * an identical already-queued run), never started concurrently.
10877
+ */
10878
+ var BackupTriggerResultSchema = object({
10879
+ /** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
10880
+ runId: string(),
10881
+ /** True when the run waited behind an in-flight run instead of starting immediately. */
10882
+ queued: boolean(),
10883
+ /** True when this trigger was coalesced onto an identical already-queued run. */
10884
+ joined: boolean(),
10885
+ /** True when the run was cancelled before completing every destination. */
10886
+ cancelled: boolean(),
10887
+ /** One entry per destination the archive landed at (partial on cancel). */
10888
+ entries: array(BackupEntrySchema).readonly()
10889
+ });
10807
10890
  /**
10808
10891
  * A backup schedule — the N:M "entry" that binds one cron cadence to a
10809
10892
  * SET of destination locations. Supersedes the per-location cron on
@@ -10851,7 +10934,10 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
10851
10934
  * retention (manual runs).
10852
10935
  */
10853
10936
  retentionCount: number().int().min(1).max(1e3).optional()
10854
- }).optional(), array(BackupEntrySchema).readonly(), {
10937
+ }).optional(), BackupTriggerResultSchema, {
10938
+ kind: "mutation",
10939
+ auth: "admin"
10940
+ }), method(_void(), array(BackupRunSchema).readonly(), { auth: "admin" }), method(object({ runId: string() }), object({ cancelled: boolean() }), {
10855
10941
  kind: "mutation",
10856
10942
  auth: "admin"
10857
10943
  }), method(_void(), array(BackupEntrySchema).readonly(), { auth: "admin" }), method(_void(), array(LocationStatSchema).readonly(), { auth: "admin" }), method(object({
@@ -11568,6 +11654,14 @@ method(object({
11568
11654
  }), object({ success: literal(true) }), {
11569
11655
  kind: "mutation",
11570
11656
  auth: "admin"
11657
+ }), method(object({ deviceId: number().int().nonnegative() }), object({
11658
+ derivedStreamsDeleted: array(string()).readonly(),
11659
+ assignmentsPurged: boolean(),
11660
+ probeSnapshotsDropped: number().int().nonnegative(),
11661
+ rtspTokenRowsDeleted: number().int().nonnegative()
11662
+ }), {
11663
+ kind: "mutation",
11664
+ auth: "admin"
11571
11665
  }), method(object({
11572
11666
  deviceId: number(),
11573
11667
  /** Absent = the LOWEST assigned profile — a notification attachment is
@@ -19491,7 +19585,20 @@ var RecentTracksQueryInput = object({
19491
19585
  projection: TrackProjectionSchema.optional(),
19492
19586
  /** Include stationary-promoted rows (parked objects). Default false: the
19493
19587
  * feed lists passages; parking records live on the stationary registry. */
19494
- includeStationary: boolean().optional()
19588
+ includeStationary: boolean().optional(),
19589
+ /**
19590
+ * Restrict to these track classes. ABSENT or EMPTY means no filter.
19591
+ *
19592
+ * The same filter `listTracks` takes, because the timeline's class chips must
19593
+ * mean the same thing whether the scope is one camera or twelve. Until this
19594
+ * existed the scoped feed downloaded a page and narrowed it on the phone
19595
+ * while the single-camera path narrowed the read — one filter, two costs.
19596
+ *
19597
+ * A SUPERSET prefilter on `classes[]`, like its single-camera twin: rows
19598
+ * whose class list is unreadable are kept, and the client's rule stays the
19599
+ * exact one.
19600
+ */
19601
+ classes: array(string()).optional()
19495
19602
  });
19496
19603
  var RecentTracksPageSchema = object({
19497
19604
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -23765,8 +23872,22 @@ var automationControlCapability = {
23765
23872
  * threshold.
23766
23873
  */
23767
23874
  var BatteryStatusSchema = object({
23768
- /** 0..100 inclusive. Firmware-reported. */
23769
- percentage: number().min(0).max(100),
23875
+ /**
23876
+ * 0..100 inclusive, firmware-reported. **`null` means NOT YET KNOWN** — the
23877
+ * provider has registered the capability but no reading has landed.
23878
+ *
23879
+ * It is nullable because it was not, and the only value a provider could
23880
+ * seed with was `0`. A battery camera behind an NVR therefore announced
23881
+ * itself at 0% on every start and corrected itself a moment later, which is
23882
+ * indistinguishable from a real flat battery: it fires the low-battery alert
23883
+ * every time the hub restarts. Unknown is not empty (D315), and on a battery
23884
+ * reading the difference is an alarm.
23885
+ *
23886
+ * `vacuum-control` and `lawn-mower-control` already model it this way.
23887
+ * Consumers must SKIP a null rather than coerce it — `battery-band` already
23888
+ * declines to band a non-finite reading, which is the correct shape.
23889
+ */
23890
+ percentage: number().min(0).max(100).nullable(),
23770
23891
  /**
23771
23892
  * Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
23772
23893
  * Reolink-specific for the Solar Panel 2 accessory (will become
@@ -34091,6 +34212,12 @@ Object.freeze({
34091
34212
  addonId: null,
34092
34213
  access: "create"
34093
34214
  },
34215
+ "backup.cancel": {
34216
+ capName: "backup",
34217
+ capScope: "system",
34218
+ addonId: null,
34219
+ access: "create"
34220
+ },
34094
34221
  "backup.delete": {
34095
34222
  capName: "backup",
34096
34223
  capScope: "system",
@@ -34133,6 +34260,12 @@ Object.freeze({
34133
34260
  addonId: null,
34134
34261
  access: "view"
34135
34262
  },
34263
+ "backup.listRuns": {
34264
+ capName: "backup",
34265
+ capScope: "system",
34266
+ addonId: null,
34267
+ access: "view"
34268
+ },
34136
34269
  "backup.listSchedules": {
34137
34270
  capName: "backup",
34138
34271
  capScope: "system",
@@ -38699,6 +38832,12 @@ Object.freeze({
38699
38832
  addonId: null,
38700
38833
  access: "create"
38701
38834
  },
38835
+ "streamBroker.forgetDeviceHardware": {
38836
+ capName: "stream-broker",
38837
+ capScope: "system",
38838
+ addonId: null,
38839
+ access: "delete"
38840
+ },
38702
38841
  "streamBroker.getAllRtspEntries": {
38703
38842
  capName: "stream-broker",
38704
38843
  capScope: "system",
@@ -41157,6 +41296,11 @@ Object.freeze({
41157
41296
  form: "single",
41158
41297
  optional: false
41159
41298
  }],
41299
+ "streamBroker.forgetDeviceHardware": [{
41300
+ name: "deviceId",
41301
+ form: "single",
41302
+ optional: false
41303
+ }],
41160
41304
  "streamBroker.getDeviceAudioMute": [{
41161
41305
  name: "deviceId",
41162
41306
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-hikvision",
3
- "version": "1.2.65",
3
+ "version": "1.2.67",
4
4
  "description": "Hikvision camera device provider addon for CamStack — ISAPI over HTTP(S) with digest auth (snapshot, alarm stream, RTSP discovery)",
5
5
  "keywords": [
6
6
  "camstack",