@camstack/addon-provider-hikvision 1.2.23 → 1.2.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/addon.js CHANGED
@@ -19631,6 +19631,39 @@ var snapshotCapability = {
19631
19631
  etag: string().nullable()
19632
19632
  }))),
19633
19633
  /**
19634
+ * The full decision chain for ONE device, for the viewer's debug readout —
19635
+ * the answer to "why does this tile show what it shows" in a single poll:
19636
+ * the battery slice the state was derived from, the resolved state + its
19637
+ * reason, the cached frame's identity/age, whether a wake window is open,
19638
+ * and whether a fresh capture is in flight. Cache-only and capture-free:
19639
+ * a debug read must never wake a battery camera.
19640
+ */
19641
+ getDebugState: systemMethod(object({ deviceId: number() }), object({
19642
+ /** The battery slice as read, or null when the device has none. */
19643
+ battery: object({
19644
+ sleeping: boolean(),
19645
+ lastUpdated: number(),
19646
+ lastContactAt: number().optional()
19647
+ }).nullable(),
19648
+ /** The resolved snapshot state (what the overlay decision used). */
19649
+ state: object({
19650
+ isBattery: boolean(),
19651
+ reason: _enum([
19652
+ "disabled",
19653
+ "sleeping",
19654
+ "unreachable",
19655
+ "waking"
19656
+ ]).nullable()
19657
+ }),
19658
+ /** The cached frame behind the next paint. */
19659
+ frame: object({
19660
+ capturedAt: number().nullable(),
19661
+ ageMs: number().nullable()
19662
+ }),
19663
+ /** A wake window is currently open (the Waking overlay's source). */
19664
+ waking: boolean()
19665
+ })),
19666
+ /**
19634
19667
  * Signed, expiring links to a CLIENT-SIZED frame — and the demand signal
19635
19668
  * that makes those frames current.
19636
19669
  *
@@ -19712,7 +19745,14 @@ targets: array(object({
19712
19745
  "sleeping",
19713
19746
  "unreachable",
19714
19747
  "waking"
19715
- ]).nullable()
19748
+ ]).nullable(),
19749
+ /** A battery camera (whatever its current state). An AWAKE battery
19750
+ * camera is deliberately NOT recaptured on the poll cadence — every
19751
+ * capture is a camera hit that would keep it out of sleep — so its
19752
+ * cached frame legitimately ages past the currency ceiling while
19753
+ * nothing is streaming. A surface must keep painting it (a fresh
19754
+ * frame is captured at each wake), not blank to "unavailable". */
19755
+ battery: boolean()
19716
19756
  })))
19717
19757
  },
19718
19758
  status: {
@@ -34744,6 +34784,12 @@ Object.freeze({
34744
34784
  addonId: null,
34745
34785
  access: "view"
34746
34786
  },
34787
+ "snapshot.getDebugState": {
34788
+ capName: "snapshot",
34789
+ capScope: "device",
34790
+ addonId: null,
34791
+ access: "view"
34792
+ },
34747
34793
  "snapshot.getSnapshot": {
34748
34794
  capName: "snapshot",
34749
34795
  capScope: "device",
@@ -37341,6 +37387,11 @@ Object.freeze({
37341
37387
  form: "single",
37342
37388
  optional: false
37343
37389
  }],
37390
+ "snapshot.getDebugState": [{
37391
+ name: "deviceId",
37392
+ form: "single",
37393
+ optional: false
37394
+ }],
37344
37395
  "snapshot.getSnapshot": [{
37345
37396
  name: "deviceId",
37346
37397
  form: "single",
package/dist/addon.mjs CHANGED
@@ -19632,6 +19632,39 @@ var snapshotCapability = {
19632
19632
  etag: string().nullable()
19633
19633
  }))),
19634
19634
  /**
19635
+ * The full decision chain for ONE device, for the viewer's debug readout —
19636
+ * the answer to "why does this tile show what it shows" in a single poll:
19637
+ * the battery slice the state was derived from, the resolved state + its
19638
+ * reason, the cached frame's identity/age, whether a wake window is open,
19639
+ * and whether a fresh capture is in flight. Cache-only and capture-free:
19640
+ * a debug read must never wake a battery camera.
19641
+ */
19642
+ getDebugState: systemMethod(object({ deviceId: number() }), object({
19643
+ /** The battery slice as read, or null when the device has none. */
19644
+ battery: object({
19645
+ sleeping: boolean(),
19646
+ lastUpdated: number(),
19647
+ lastContactAt: number().optional()
19648
+ }).nullable(),
19649
+ /** The resolved snapshot state (what the overlay decision used). */
19650
+ state: object({
19651
+ isBattery: boolean(),
19652
+ reason: _enum([
19653
+ "disabled",
19654
+ "sleeping",
19655
+ "unreachable",
19656
+ "waking"
19657
+ ]).nullable()
19658
+ }),
19659
+ /** The cached frame behind the next paint. */
19660
+ frame: object({
19661
+ capturedAt: number().nullable(),
19662
+ ageMs: number().nullable()
19663
+ }),
19664
+ /** A wake window is currently open (the Waking overlay's source). */
19665
+ waking: boolean()
19666
+ })),
19667
+ /**
19635
19668
  * Signed, expiring links to a CLIENT-SIZED frame — and the demand signal
19636
19669
  * that makes those frames current.
19637
19670
  *
@@ -19713,7 +19746,14 @@ targets: array(object({
19713
19746
  "sleeping",
19714
19747
  "unreachable",
19715
19748
  "waking"
19716
- ]).nullable()
19749
+ ]).nullable(),
19750
+ /** A battery camera (whatever its current state). An AWAKE battery
19751
+ * camera is deliberately NOT recaptured on the poll cadence — every
19752
+ * capture is a camera hit that would keep it out of sleep — so its
19753
+ * cached frame legitimately ages past the currency ceiling while
19754
+ * nothing is streaming. A surface must keep painting it (a fresh
19755
+ * frame is captured at each wake), not blank to "unavailable". */
19756
+ battery: boolean()
19717
19757
  })))
19718
19758
  },
19719
19759
  status: {
@@ -34745,6 +34785,12 @@ Object.freeze({
34745
34785
  addonId: null,
34746
34786
  access: "view"
34747
34787
  },
34788
+ "snapshot.getDebugState": {
34789
+ capName: "snapshot",
34790
+ capScope: "device",
34791
+ addonId: null,
34792
+ access: "view"
34793
+ },
34748
34794
  "snapshot.getSnapshot": {
34749
34795
  capName: "snapshot",
34750
34796
  capScope: "device",
@@ -37342,6 +37388,11 @@ Object.freeze({
37342
37388
  form: "single",
37343
37389
  optional: false
37344
37390
  }],
37391
+ "snapshot.getDebugState": [{
37392
+ name: "deviceId",
37393
+ form: "single",
37394
+ optional: false
37395
+ }],
37345
37396
  "snapshot.getSnapshot": [{
37346
37397
  name: "deviceId",
37347
37398
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-hikvision",
3
- "version": "1.2.23",
3
+ "version": "1.2.25",
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",