@camstack/addon-export-alexa 1.2.63 → 1.2.65

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.
@@ -10775,6 +10775,89 @@ var LocationStatSchema = object({
10775
10775
  fileCount: number(),
10776
10776
  present: boolean()
10777
10777
  });
10778
+ /** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
10779
+ var BackupRunStateSchema = _enum([
10780
+ "queued",
10781
+ "running",
10782
+ "succeeded",
10783
+ "failed",
10784
+ "cancelled"
10785
+ ]);
10786
+ /**
10787
+ * Where a running backup currently is. `queued` before it starts,
10788
+ * `building` while the tar.gz is being staged, `uploading` during the
10789
+ * per-destination fan-out, `done` once terminal.
10790
+ */
10791
+ var BackupRunPhaseSchema = _enum([
10792
+ "queued",
10793
+ "building",
10794
+ "uploading",
10795
+ "done"
10796
+ ]);
10797
+ /**
10798
+ * Observable state of one backup run — readable WHILE it runs via
10799
+ * `backup.listRuns`. This is what makes the execution queue and
10800
+ * `backup.cancel` usable: the 2026-09-04 incident (two concurrent
10801
+ * multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
10802
+ * diagnosable with `du` because nothing reported that runs existed or
10803
+ * how large the staged archive had grown.
10804
+ */
10805
+ var BackupRunSchema = object({
10806
+ /** Stable run id — the handle `backup.cancel` takes. */
10807
+ id: string(),
10808
+ state: BackupRunStateSchema,
10809
+ phase: BackupRunPhaseSchema,
10810
+ /**
10811
+ * Resolved destination location ids. Empty while queued (targets are
10812
+ * resolved when the run starts, against the then-current policies).
10813
+ */
10814
+ destinationIds: array(string()).readonly(),
10815
+ label: string().optional(),
10816
+ /** ms-epoch when the run was submitted (trigger call / schedule fire). */
10817
+ requestedAt: number(),
10818
+ /** ms-epoch when the run left the queue and started building. */
10819
+ startedAt: number().optional(),
10820
+ /** ms-epoch when the run reached a terminal state. */
10821
+ finishedAt: number().optional(),
10822
+ /** Compressed bytes of the staging archive written so far. */
10823
+ stagedBytes: number(),
10824
+ /** Final staged archive size, once the build phase completes. */
10825
+ archiveSizeBytes: number().optional(),
10826
+ /** Bytes pushed to the destination currently uploading. */
10827
+ uploadedBytes: number(),
10828
+ /** Destinations where the archive fully landed (uploaded + indexed). */
10829
+ completedDestinationIds: array(string()).readonly(),
10830
+ /** Destinations that failed during the fan-out. */
10831
+ failedDestinationIds: array(string()).readonly(),
10832
+ /** Failure message when `state === 'failed'`. */
10833
+ error: string().optional(),
10834
+ /**
10835
+ * 1-based place in the execution queue — 1 = runs next. Present only
10836
+ * while `state === 'queued'`. Stamped by the orchestrator from the
10837
+ * queue's OWN pending order, never derived from timestamps, so the
10838
+ * UI cannot show an order the executor will not honour.
10839
+ */
10840
+ queuePosition: number().int().min(1).optional()
10841
+ });
10842
+ /**
10843
+ * Result of `backup.trigger`. The call still resolves when the run
10844
+ * terminates (compat with schedule-driven runs and the admin UI), but
10845
+ * it now names the run and says whether it had to WAIT: a trigger that
10846
+ * arrives while another run is in flight is enqueued (or joined onto
10847
+ * an identical already-queued run), never started concurrently.
10848
+ */
10849
+ var BackupTriggerResultSchema = object({
10850
+ /** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
10851
+ runId: string(),
10852
+ /** True when the run waited behind an in-flight run instead of starting immediately. */
10853
+ queued: boolean(),
10854
+ /** True when this trigger was coalesced onto an identical already-queued run. */
10855
+ joined: boolean(),
10856
+ /** True when the run was cancelled before completing every destination. */
10857
+ cancelled: boolean(),
10858
+ /** One entry per destination the archive landed at (partial on cancel). */
10859
+ entries: array(BackupEntrySchema).readonly()
10860
+ });
10778
10861
  /**
10779
10862
  * A backup schedule — the N:M "entry" that binds one cron cadence to a
10780
10863
  * SET of destination locations. Supersedes the per-location cron on
@@ -10822,7 +10905,10 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
10822
10905
  * retention (manual runs).
10823
10906
  */
10824
10907
  retentionCount: number().int().min(1).max(1e3).optional()
10825
- }).optional(), array(BackupEntrySchema).readonly(), {
10908
+ }).optional(), BackupTriggerResultSchema, {
10909
+ kind: "mutation",
10910
+ auth: "admin"
10911
+ }), method(_void(), array(BackupRunSchema).readonly(), { auth: "admin" }), method(object({ runId: string() }), object({ cancelled: boolean() }), {
10826
10912
  kind: "mutation",
10827
10913
  auth: "admin"
10828
10914
  }), method(_void(), array(BackupEntrySchema).readonly(), { auth: "admin" }), method(_void(), array(LocationStatSchema).readonly(), { auth: "admin" }), method(object({
@@ -11539,6 +11625,14 @@ method(object({
11539
11625
  }), object({ success: literal(true) }), {
11540
11626
  kind: "mutation",
11541
11627
  auth: "admin"
11628
+ }), method(object({ deviceId: number().int().nonnegative() }), object({
11629
+ derivedStreamsDeleted: array(string()).readonly(),
11630
+ assignmentsPurged: boolean(),
11631
+ probeSnapshotsDropped: number().int().nonnegative(),
11632
+ rtspTokenRowsDeleted: number().int().nonnegative()
11633
+ }), {
11634
+ kind: "mutation",
11635
+ auth: "admin"
11542
11636
  }), method(object({
11543
11637
  deviceId: number(),
11544
11638
  /** Absent = the LOWEST assigned profile — a notification attachment is
@@ -19152,7 +19246,20 @@ var RecentTracksQueryInput = object({
19152
19246
  projection: TrackProjectionSchema.optional(),
19153
19247
  /** Include stationary-promoted rows (parked objects). Default false: the
19154
19248
  * feed lists passages; parking records live on the stationary registry. */
19155
- includeStationary: boolean().optional()
19249
+ includeStationary: boolean().optional(),
19250
+ /**
19251
+ * Restrict to these track classes. ABSENT or EMPTY means no filter.
19252
+ *
19253
+ * The same filter `listTracks` takes, because the timeline's class chips must
19254
+ * mean the same thing whether the scope is one camera or twelve. Until this
19255
+ * existed the scoped feed downloaded a page and narrowed it on the phone
19256
+ * while the single-camera path narrowed the read — one filter, two costs.
19257
+ *
19258
+ * A SUPERSET prefilter on `classes[]`, like its single-camera twin: rows
19259
+ * whose class list is unreadable are kept, and the client's rule stays the
19260
+ * exact one.
19261
+ */
19262
+ classes: array(string()).optional()
19156
19263
  });
19157
19264
  var RecentTracksPageSchema = object({
19158
19265
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -23190,8 +23297,22 @@ DeviceType.Automation, method(object({ deviceId: number().int().nonnegative() })
23190
23297
  * threshold.
23191
23298
  */
23192
23299
  var BatteryStatusSchema = object({
23193
- /** 0..100 inclusive. Firmware-reported. */
23194
- percentage: number().min(0).max(100),
23300
+ /**
23301
+ * 0..100 inclusive, firmware-reported. **`null` means NOT YET KNOWN** — the
23302
+ * provider has registered the capability but no reading has landed.
23303
+ *
23304
+ * It is nullable because it was not, and the only value a provider could
23305
+ * seed with was `0`. A battery camera behind an NVR therefore announced
23306
+ * itself at 0% on every start and corrected itself a moment later, which is
23307
+ * indistinguishable from a real flat battery: it fires the low-battery alert
23308
+ * every time the hub restarts. Unknown is not empty (D315), and on a battery
23309
+ * reading the difference is an alarm.
23310
+ *
23311
+ * `vacuum-control` and `lawn-mower-control` already model it this way.
23312
+ * Consumers must SKIP a null rather than coerce it — `battery-band` already
23313
+ * declines to band a non-finite reading, which is the correct shape.
23314
+ */
23315
+ percentage: number().min(0).max(100).nullable(),
23195
23316
  /**
23196
23317
  * Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
23197
23318
  * Reolink-specific for the Solar Panel 2 accessory (will become
@@ -29670,6 +29791,12 @@ Object.freeze({
29670
29791
  addonId: null,
29671
29792
  access: "create"
29672
29793
  },
29794
+ "backup.cancel": {
29795
+ capName: "backup",
29796
+ capScope: "system",
29797
+ addonId: null,
29798
+ access: "create"
29799
+ },
29673
29800
  "backup.delete": {
29674
29801
  capName: "backup",
29675
29802
  capScope: "system",
@@ -29712,6 +29839,12 @@ Object.freeze({
29712
29839
  addonId: null,
29713
29840
  access: "view"
29714
29841
  },
29842
+ "backup.listRuns": {
29843
+ capName: "backup",
29844
+ capScope: "system",
29845
+ addonId: null,
29846
+ access: "view"
29847
+ },
29715
29848
  "backup.listSchedules": {
29716
29849
  capName: "backup",
29717
29850
  capScope: "system",
@@ -34278,6 +34411,12 @@ Object.freeze({
34278
34411
  addonId: null,
34279
34412
  access: "create"
34280
34413
  },
34414
+ "streamBroker.forgetDeviceHardware": {
34415
+ capName: "stream-broker",
34416
+ capScope: "system",
34417
+ addonId: null,
34418
+ access: "delete"
34419
+ },
34281
34420
  "streamBroker.getAllRtspEntries": {
34282
34421
  capName: "stream-broker",
34283
34422
  capScope: "system",
@@ -36736,6 +36875,11 @@ Object.freeze({
36736
36875
  form: "single",
36737
36876
  optional: false
36738
36877
  }],
36878
+ "streamBroker.forgetDeviceHardware": [{
36879
+ name: "deviceId",
36880
+ form: "single",
36881
+ optional: false
36882
+ }],
36739
36883
  "streamBroker.getDeviceAudioMute": [{
36740
36884
  name: "deviceId",
36741
36885
  form: "single",
@@ -10748,6 +10748,89 @@ var LocationStatSchema = object({
10748
10748
  fileCount: number(),
10749
10749
  present: boolean()
10750
10750
  });
10751
+ /** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
10752
+ var BackupRunStateSchema = _enum([
10753
+ "queued",
10754
+ "running",
10755
+ "succeeded",
10756
+ "failed",
10757
+ "cancelled"
10758
+ ]);
10759
+ /**
10760
+ * Where a running backup currently is. `queued` before it starts,
10761
+ * `building` while the tar.gz is being staged, `uploading` during the
10762
+ * per-destination fan-out, `done` once terminal.
10763
+ */
10764
+ var BackupRunPhaseSchema = _enum([
10765
+ "queued",
10766
+ "building",
10767
+ "uploading",
10768
+ "done"
10769
+ ]);
10770
+ /**
10771
+ * Observable state of one backup run — readable WHILE it runs via
10772
+ * `backup.listRuns`. This is what makes the execution queue and
10773
+ * `backup.cancel` usable: the 2026-09-04 incident (two concurrent
10774
+ * multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
10775
+ * diagnosable with `du` because nothing reported that runs existed or
10776
+ * how large the staged archive had grown.
10777
+ */
10778
+ var BackupRunSchema = object({
10779
+ /** Stable run id — the handle `backup.cancel` takes. */
10780
+ id: string(),
10781
+ state: BackupRunStateSchema,
10782
+ phase: BackupRunPhaseSchema,
10783
+ /**
10784
+ * Resolved destination location ids. Empty while queued (targets are
10785
+ * resolved when the run starts, against the then-current policies).
10786
+ */
10787
+ destinationIds: array(string()).readonly(),
10788
+ label: string().optional(),
10789
+ /** ms-epoch when the run was submitted (trigger call / schedule fire). */
10790
+ requestedAt: number(),
10791
+ /** ms-epoch when the run left the queue and started building. */
10792
+ startedAt: number().optional(),
10793
+ /** ms-epoch when the run reached a terminal state. */
10794
+ finishedAt: number().optional(),
10795
+ /** Compressed bytes of the staging archive written so far. */
10796
+ stagedBytes: number(),
10797
+ /** Final staged archive size, once the build phase completes. */
10798
+ archiveSizeBytes: number().optional(),
10799
+ /** Bytes pushed to the destination currently uploading. */
10800
+ uploadedBytes: number(),
10801
+ /** Destinations where the archive fully landed (uploaded + indexed). */
10802
+ completedDestinationIds: array(string()).readonly(),
10803
+ /** Destinations that failed during the fan-out. */
10804
+ failedDestinationIds: array(string()).readonly(),
10805
+ /** Failure message when `state === 'failed'`. */
10806
+ error: string().optional(),
10807
+ /**
10808
+ * 1-based place in the execution queue — 1 = runs next. Present only
10809
+ * while `state === 'queued'`. Stamped by the orchestrator from the
10810
+ * queue's OWN pending order, never derived from timestamps, so the
10811
+ * UI cannot show an order the executor will not honour.
10812
+ */
10813
+ queuePosition: number().int().min(1).optional()
10814
+ });
10815
+ /**
10816
+ * Result of `backup.trigger`. The call still resolves when the run
10817
+ * terminates (compat with schedule-driven runs and the admin UI), but
10818
+ * it now names the run and says whether it had to WAIT: a trigger that
10819
+ * arrives while another run is in flight is enqueued (or joined onto
10820
+ * an identical already-queued run), never started concurrently.
10821
+ */
10822
+ var BackupTriggerResultSchema = object({
10823
+ /** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
10824
+ runId: string(),
10825
+ /** True when the run waited behind an in-flight run instead of starting immediately. */
10826
+ queued: boolean(),
10827
+ /** True when this trigger was coalesced onto an identical already-queued run. */
10828
+ joined: boolean(),
10829
+ /** True when the run was cancelled before completing every destination. */
10830
+ cancelled: boolean(),
10831
+ /** One entry per destination the archive landed at (partial on cancel). */
10832
+ entries: array(BackupEntrySchema).readonly()
10833
+ });
10751
10834
  /**
10752
10835
  * A backup schedule — the N:M "entry" that binds one cron cadence to a
10753
10836
  * SET of destination locations. Supersedes the per-location cron on
@@ -10795,7 +10878,10 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
10795
10878
  * retention (manual runs).
10796
10879
  */
10797
10880
  retentionCount: number().int().min(1).max(1e3).optional()
10798
- }).optional(), array(BackupEntrySchema).readonly(), {
10881
+ }).optional(), BackupTriggerResultSchema, {
10882
+ kind: "mutation",
10883
+ auth: "admin"
10884
+ }), method(_void(), array(BackupRunSchema).readonly(), { auth: "admin" }), method(object({ runId: string() }), object({ cancelled: boolean() }), {
10799
10885
  kind: "mutation",
10800
10886
  auth: "admin"
10801
10887
  }), method(_void(), array(BackupEntrySchema).readonly(), { auth: "admin" }), method(_void(), array(LocationStatSchema).readonly(), { auth: "admin" }), method(object({
@@ -11512,6 +11598,14 @@ method(object({
11512
11598
  }), object({ success: literal(true) }), {
11513
11599
  kind: "mutation",
11514
11600
  auth: "admin"
11601
+ }), method(object({ deviceId: number().int().nonnegative() }), object({
11602
+ derivedStreamsDeleted: array(string()).readonly(),
11603
+ assignmentsPurged: boolean(),
11604
+ probeSnapshotsDropped: number().int().nonnegative(),
11605
+ rtspTokenRowsDeleted: number().int().nonnegative()
11606
+ }), {
11607
+ kind: "mutation",
11608
+ auth: "admin"
11515
11609
  }), method(object({
11516
11610
  deviceId: number(),
11517
11611
  /** Absent = the LOWEST assigned profile — a notification attachment is
@@ -19125,7 +19219,20 @@ var RecentTracksQueryInput = object({
19125
19219
  projection: TrackProjectionSchema.optional(),
19126
19220
  /** Include stationary-promoted rows (parked objects). Default false: the
19127
19221
  * feed lists passages; parking records live on the stationary registry. */
19128
- includeStationary: boolean().optional()
19222
+ includeStationary: boolean().optional(),
19223
+ /**
19224
+ * Restrict to these track classes. ABSENT or EMPTY means no filter.
19225
+ *
19226
+ * The same filter `listTracks` takes, because the timeline's class chips must
19227
+ * mean the same thing whether the scope is one camera or twelve. Until this
19228
+ * existed the scoped feed downloaded a page and narrowed it on the phone
19229
+ * while the single-camera path narrowed the read — one filter, two costs.
19230
+ *
19231
+ * A SUPERSET prefilter on `classes[]`, like its single-camera twin: rows
19232
+ * whose class list is unreadable are kept, and the client's rule stays the
19233
+ * exact one.
19234
+ */
19235
+ classes: array(string()).optional()
19129
19236
  });
19130
19237
  var RecentTracksPageSchema = object({
19131
19238
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -23163,8 +23270,22 @@ DeviceType.Automation, method(object({ deviceId: number().int().nonnegative() })
23163
23270
  * threshold.
23164
23271
  */
23165
23272
  var BatteryStatusSchema = object({
23166
- /** 0..100 inclusive. Firmware-reported. */
23167
- percentage: number().min(0).max(100),
23273
+ /**
23274
+ * 0..100 inclusive, firmware-reported. **`null` means NOT YET KNOWN** — the
23275
+ * provider has registered the capability but no reading has landed.
23276
+ *
23277
+ * It is nullable because it was not, and the only value a provider could
23278
+ * seed with was `0`. A battery camera behind an NVR therefore announced
23279
+ * itself at 0% on every start and corrected itself a moment later, which is
23280
+ * indistinguishable from a real flat battery: it fires the low-battery alert
23281
+ * every time the hub restarts. Unknown is not empty (D315), and on a battery
23282
+ * reading the difference is an alarm.
23283
+ *
23284
+ * `vacuum-control` and `lawn-mower-control` already model it this way.
23285
+ * Consumers must SKIP a null rather than coerce it — `battery-band` already
23286
+ * declines to band a non-finite reading, which is the correct shape.
23287
+ */
23288
+ percentage: number().min(0).max(100).nullable(),
23168
23289
  /**
23169
23290
  * Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
23170
23291
  * Reolink-specific for the Solar Panel 2 accessory (will become
@@ -29643,6 +29764,12 @@ Object.freeze({
29643
29764
  addonId: null,
29644
29765
  access: "create"
29645
29766
  },
29767
+ "backup.cancel": {
29768
+ capName: "backup",
29769
+ capScope: "system",
29770
+ addonId: null,
29771
+ access: "create"
29772
+ },
29646
29773
  "backup.delete": {
29647
29774
  capName: "backup",
29648
29775
  capScope: "system",
@@ -29685,6 +29812,12 @@ Object.freeze({
29685
29812
  addonId: null,
29686
29813
  access: "view"
29687
29814
  },
29815
+ "backup.listRuns": {
29816
+ capName: "backup",
29817
+ capScope: "system",
29818
+ addonId: null,
29819
+ access: "view"
29820
+ },
29688
29821
  "backup.listSchedules": {
29689
29822
  capName: "backup",
29690
29823
  capScope: "system",
@@ -34251,6 +34384,12 @@ Object.freeze({
34251
34384
  addonId: null,
34252
34385
  access: "create"
34253
34386
  },
34387
+ "streamBroker.forgetDeviceHardware": {
34388
+ capName: "stream-broker",
34389
+ capScope: "system",
34390
+ addonId: null,
34391
+ access: "delete"
34392
+ },
34254
34393
  "streamBroker.getAllRtspEntries": {
34255
34394
  capName: "stream-broker",
34256
34395
  capScope: "system",
@@ -36709,6 +36848,11 @@ Object.freeze({
36709
36848
  form: "single",
36710
36849
  optional: false
36711
36850
  }],
36851
+ "streamBroker.forgetDeviceHardware": [{
36852
+ name: "deviceId",
36853
+ form: "single",
36854
+ optional: false
36855
+ }],
36712
36856
  "streamBroker.getDeviceAudioMute": [{
36713
36857
  name: "deviceId",
36714
36858
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-alexa",
3
- "version": "1.2.63",
3
+ "version": "1.2.65",
4
4
  "description": "Alexa Smart Home Skill export — hub-side OAuth provider + directive handler. The companion AWS Lambda forwards Alexa directives to this addon's /addon/export-alexa/directive endpoint.",
5
5
  "keywords": [
6
6
  "camstack",