@camstack/addon-import-alexa 0.2.56 → 0.2.58

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
@@ -10704,6 +10704,89 @@ var LocationStatSchema = object({
10704
10704
  fileCount: number(),
10705
10705
  present: boolean()
10706
10706
  });
10707
+ /** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
10708
+ var BackupRunStateSchema = _enum([
10709
+ "queued",
10710
+ "running",
10711
+ "succeeded",
10712
+ "failed",
10713
+ "cancelled"
10714
+ ]);
10715
+ /**
10716
+ * Where a running backup currently is. `queued` before it starts,
10717
+ * `building` while the tar.gz is being staged, `uploading` during the
10718
+ * per-destination fan-out, `done` once terminal.
10719
+ */
10720
+ var BackupRunPhaseSchema = _enum([
10721
+ "queued",
10722
+ "building",
10723
+ "uploading",
10724
+ "done"
10725
+ ]);
10726
+ /**
10727
+ * Observable state of one backup run — readable WHILE it runs via
10728
+ * `backup.listRuns`. This is what makes the execution queue and
10729
+ * `backup.cancel` usable: the 2026-09-04 incident (two concurrent
10730
+ * multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
10731
+ * diagnosable with `du` because nothing reported that runs existed or
10732
+ * how large the staged archive had grown.
10733
+ */
10734
+ var BackupRunSchema = object({
10735
+ /** Stable run id — the handle `backup.cancel` takes. */
10736
+ id: string(),
10737
+ state: BackupRunStateSchema,
10738
+ phase: BackupRunPhaseSchema,
10739
+ /**
10740
+ * Resolved destination location ids. Empty while queued (targets are
10741
+ * resolved when the run starts, against the then-current policies).
10742
+ */
10743
+ destinationIds: array(string()).readonly(),
10744
+ label: string().optional(),
10745
+ /** ms-epoch when the run was submitted (trigger call / schedule fire). */
10746
+ requestedAt: number(),
10747
+ /** ms-epoch when the run left the queue and started building. */
10748
+ startedAt: number().optional(),
10749
+ /** ms-epoch when the run reached a terminal state. */
10750
+ finishedAt: number().optional(),
10751
+ /** Compressed bytes of the staging archive written so far. */
10752
+ stagedBytes: number(),
10753
+ /** Final staged archive size, once the build phase completes. */
10754
+ archiveSizeBytes: number().optional(),
10755
+ /** Bytes pushed to the destination currently uploading. */
10756
+ uploadedBytes: number(),
10757
+ /** Destinations where the archive fully landed (uploaded + indexed). */
10758
+ completedDestinationIds: array(string()).readonly(),
10759
+ /** Destinations that failed during the fan-out. */
10760
+ failedDestinationIds: array(string()).readonly(),
10761
+ /** Failure message when `state === 'failed'`. */
10762
+ error: string().optional(),
10763
+ /**
10764
+ * 1-based place in the execution queue — 1 = runs next. Present only
10765
+ * while `state === 'queued'`. Stamped by the orchestrator from the
10766
+ * queue's OWN pending order, never derived from timestamps, so the
10767
+ * UI cannot show an order the executor will not honour.
10768
+ */
10769
+ queuePosition: number().int().min(1).optional()
10770
+ });
10771
+ /**
10772
+ * Result of `backup.trigger`. The call still resolves when the run
10773
+ * terminates (compat with schedule-driven runs and the admin UI), but
10774
+ * it now names the run and says whether it had to WAIT: a trigger that
10775
+ * arrives while another run is in flight is enqueued (or joined onto
10776
+ * an identical already-queued run), never started concurrently.
10777
+ */
10778
+ var BackupTriggerResultSchema = object({
10779
+ /** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
10780
+ runId: string(),
10781
+ /** True when the run waited behind an in-flight run instead of starting immediately. */
10782
+ queued: boolean(),
10783
+ /** True when this trigger was coalesced onto an identical already-queued run. */
10784
+ joined: boolean(),
10785
+ /** True when the run was cancelled before completing every destination. */
10786
+ cancelled: boolean(),
10787
+ /** One entry per destination the archive landed at (partial on cancel). */
10788
+ entries: array(BackupEntrySchema).readonly()
10789
+ });
10707
10790
  /**
10708
10791
  * A backup schedule — the N:M "entry" that binds one cron cadence to a
10709
10792
  * SET of destination locations. Supersedes the per-location cron on
@@ -10751,7 +10834,10 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
10751
10834
  * retention (manual runs).
10752
10835
  */
10753
10836
  retentionCount: number().int().min(1).max(1e3).optional()
10754
- }).optional(), array(BackupEntrySchema).readonly(), {
10837
+ }).optional(), BackupTriggerResultSchema, {
10838
+ kind: "mutation",
10839
+ auth: "admin"
10840
+ }), method(_void(), array(BackupRunSchema).readonly(), { auth: "admin" }), method(object({ runId: string() }), object({ cancelled: boolean() }), {
10755
10841
  kind: "mutation",
10756
10842
  auth: "admin"
10757
10843
  }), method(_void(), array(BackupEntrySchema).readonly(), { auth: "admin" }), method(_void(), array(LocationStatSchema).readonly(), { auth: "admin" }), method(object({
@@ -11517,6 +11603,14 @@ method(object({
11517
11603
  }), object({ success: literal(true) }), {
11518
11604
  kind: "mutation",
11519
11605
  auth: "admin"
11606
+ }), method(object({ deviceId: number().int().nonnegative() }), object({
11607
+ derivedStreamsDeleted: array(string()).readonly(),
11608
+ assignmentsPurged: boolean(),
11609
+ probeSnapshotsDropped: number().int().nonnegative(),
11610
+ rtspTokenRowsDeleted: number().int().nonnegative()
11611
+ }), {
11612
+ kind: "mutation",
11613
+ auth: "admin"
11520
11614
  }), method(object({
11521
11615
  deviceId: number(),
11522
11616
  /** Absent = the LOWEST assigned profile — a notification attachment is
@@ -19426,7 +19520,20 @@ var RecentTracksQueryInput = object({
19426
19520
  projection: TrackProjectionSchema.optional(),
19427
19521
  /** Include stationary-promoted rows (parked objects). Default false: the
19428
19522
  * feed lists passages; parking records live on the stationary registry. */
19429
- includeStationary: boolean().optional()
19523
+ includeStationary: boolean().optional(),
19524
+ /**
19525
+ * Restrict to these track classes. ABSENT or EMPTY means no filter.
19526
+ *
19527
+ * The same filter `listTracks` takes, because the timeline's class chips must
19528
+ * mean the same thing whether the scope is one camera or twelve. Until this
19529
+ * existed the scoped feed downloaded a page and narrowed it on the phone
19530
+ * while the single-camera path narrowed the read — one filter, two costs.
19531
+ *
19532
+ * A SUPERSET prefilter on `classes[]`, like its single-camera twin: rows
19533
+ * whose class list is unreadable are kept, and the client's rule stays the
19534
+ * exact one.
19535
+ */
19536
+ classes: array(string()).optional()
19430
19537
  });
19431
19538
  var RecentTracksPageSchema = object({
19432
19539
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -23596,8 +23703,22 @@ var automationControlCapability = {
23596
23703
  * threshold.
23597
23704
  */
23598
23705
  var BatteryStatusSchema = object({
23599
- /** 0..100 inclusive. Firmware-reported. */
23600
- percentage: number().min(0).max(100),
23706
+ /**
23707
+ * 0..100 inclusive, firmware-reported. **`null` means NOT YET KNOWN** — the
23708
+ * provider has registered the capability but no reading has landed.
23709
+ *
23710
+ * It is nullable because it was not, and the only value a provider could
23711
+ * seed with was `0`. A battery camera behind an NVR therefore announced
23712
+ * itself at 0% on every start and corrected itself a moment later, which is
23713
+ * indistinguishable from a real flat battery: it fires the low-battery alert
23714
+ * every time the hub restarts. Unknown is not empty (D315), and on a battery
23715
+ * reading the difference is an alarm.
23716
+ *
23717
+ * `vacuum-control` and `lawn-mower-control` already model it this way.
23718
+ * Consumers must SKIP a null rather than coerce it — `battery-band` already
23719
+ * declines to band a non-finite reading, which is the correct shape.
23720
+ */
23721
+ percentage: number().min(0).max(100).nullable(),
23601
23722
  /**
23602
23723
  * Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
23603
23724
  * Reolink-specific for the Solar Panel 2 accessory (will become
@@ -33375,6 +33496,12 @@ Object.freeze({
33375
33496
  addonId: null,
33376
33497
  access: "create"
33377
33498
  },
33499
+ "backup.cancel": {
33500
+ capName: "backup",
33501
+ capScope: "system",
33502
+ addonId: null,
33503
+ access: "create"
33504
+ },
33378
33505
  "backup.delete": {
33379
33506
  capName: "backup",
33380
33507
  capScope: "system",
@@ -33417,6 +33544,12 @@ Object.freeze({
33417
33544
  addonId: null,
33418
33545
  access: "view"
33419
33546
  },
33547
+ "backup.listRuns": {
33548
+ capName: "backup",
33549
+ capScope: "system",
33550
+ addonId: null,
33551
+ access: "view"
33552
+ },
33420
33553
  "backup.listSchedules": {
33421
33554
  capName: "backup",
33422
33555
  capScope: "system",
@@ -37983,6 +38116,12 @@ Object.freeze({
37983
38116
  addonId: null,
37984
38117
  access: "create"
37985
38118
  },
38119
+ "streamBroker.forgetDeviceHardware": {
38120
+ capName: "stream-broker",
38121
+ capScope: "system",
38122
+ addonId: null,
38123
+ access: "delete"
38124
+ },
37986
38125
  "streamBroker.getAllRtspEntries": {
37987
38126
  capName: "stream-broker",
37988
38127
  capScope: "system",
@@ -40441,6 +40580,11 @@ Object.freeze({
40441
40580
  form: "single",
40442
40581
  optional: false
40443
40582
  }],
40583
+ "streamBroker.forgetDeviceHardware": [{
40584
+ name: "deviceId",
40585
+ form: "single",
40586
+ optional: false
40587
+ }],
40444
40588
  "streamBroker.getDeviceAudioMute": [{
40445
40589
  name: "deviceId",
40446
40590
  form: "single",
package/dist/addon.mjs CHANGED
@@ -10704,6 +10704,89 @@ var LocationStatSchema = object({
10704
10704
  fileCount: number(),
10705
10705
  present: boolean()
10706
10706
  });
10707
+ /** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
10708
+ var BackupRunStateSchema = _enum([
10709
+ "queued",
10710
+ "running",
10711
+ "succeeded",
10712
+ "failed",
10713
+ "cancelled"
10714
+ ]);
10715
+ /**
10716
+ * Where a running backup currently is. `queued` before it starts,
10717
+ * `building` while the tar.gz is being staged, `uploading` during the
10718
+ * per-destination fan-out, `done` once terminal.
10719
+ */
10720
+ var BackupRunPhaseSchema = _enum([
10721
+ "queued",
10722
+ "building",
10723
+ "uploading",
10724
+ "done"
10725
+ ]);
10726
+ /**
10727
+ * Observable state of one backup run — readable WHILE it runs via
10728
+ * `backup.listRuns`. This is what makes the execution queue and
10729
+ * `backup.cancel` usable: the 2026-09-04 incident (two concurrent
10730
+ * multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
10731
+ * diagnosable with `du` because nothing reported that runs existed or
10732
+ * how large the staged archive had grown.
10733
+ */
10734
+ var BackupRunSchema = object({
10735
+ /** Stable run id — the handle `backup.cancel` takes. */
10736
+ id: string(),
10737
+ state: BackupRunStateSchema,
10738
+ phase: BackupRunPhaseSchema,
10739
+ /**
10740
+ * Resolved destination location ids. Empty while queued (targets are
10741
+ * resolved when the run starts, against the then-current policies).
10742
+ */
10743
+ destinationIds: array(string()).readonly(),
10744
+ label: string().optional(),
10745
+ /** ms-epoch when the run was submitted (trigger call / schedule fire). */
10746
+ requestedAt: number(),
10747
+ /** ms-epoch when the run left the queue and started building. */
10748
+ startedAt: number().optional(),
10749
+ /** ms-epoch when the run reached a terminal state. */
10750
+ finishedAt: number().optional(),
10751
+ /** Compressed bytes of the staging archive written so far. */
10752
+ stagedBytes: number(),
10753
+ /** Final staged archive size, once the build phase completes. */
10754
+ archiveSizeBytes: number().optional(),
10755
+ /** Bytes pushed to the destination currently uploading. */
10756
+ uploadedBytes: number(),
10757
+ /** Destinations where the archive fully landed (uploaded + indexed). */
10758
+ completedDestinationIds: array(string()).readonly(),
10759
+ /** Destinations that failed during the fan-out. */
10760
+ failedDestinationIds: array(string()).readonly(),
10761
+ /** Failure message when `state === 'failed'`. */
10762
+ error: string().optional(),
10763
+ /**
10764
+ * 1-based place in the execution queue — 1 = runs next. Present only
10765
+ * while `state === 'queued'`. Stamped by the orchestrator from the
10766
+ * queue's OWN pending order, never derived from timestamps, so the
10767
+ * UI cannot show an order the executor will not honour.
10768
+ */
10769
+ queuePosition: number().int().min(1).optional()
10770
+ });
10771
+ /**
10772
+ * Result of `backup.trigger`. The call still resolves when the run
10773
+ * terminates (compat with schedule-driven runs and the admin UI), but
10774
+ * it now names the run and says whether it had to WAIT: a trigger that
10775
+ * arrives while another run is in flight is enqueued (or joined onto
10776
+ * an identical already-queued run), never started concurrently.
10777
+ */
10778
+ var BackupTriggerResultSchema = object({
10779
+ /** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
10780
+ runId: string(),
10781
+ /** True when the run waited behind an in-flight run instead of starting immediately. */
10782
+ queued: boolean(),
10783
+ /** True when this trigger was coalesced onto an identical already-queued run. */
10784
+ joined: boolean(),
10785
+ /** True when the run was cancelled before completing every destination. */
10786
+ cancelled: boolean(),
10787
+ /** One entry per destination the archive landed at (partial on cancel). */
10788
+ entries: array(BackupEntrySchema).readonly()
10789
+ });
10707
10790
  /**
10708
10791
  * A backup schedule — the N:M "entry" that binds one cron cadence to a
10709
10792
  * SET of destination locations. Supersedes the per-location cron on
@@ -10751,7 +10834,10 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
10751
10834
  * retention (manual runs).
10752
10835
  */
10753
10836
  retentionCount: number().int().min(1).max(1e3).optional()
10754
- }).optional(), array(BackupEntrySchema).readonly(), {
10837
+ }).optional(), BackupTriggerResultSchema, {
10838
+ kind: "mutation",
10839
+ auth: "admin"
10840
+ }), method(_void(), array(BackupRunSchema).readonly(), { auth: "admin" }), method(object({ runId: string() }), object({ cancelled: boolean() }), {
10755
10841
  kind: "mutation",
10756
10842
  auth: "admin"
10757
10843
  }), method(_void(), array(BackupEntrySchema).readonly(), { auth: "admin" }), method(_void(), array(LocationStatSchema).readonly(), { auth: "admin" }), method(object({
@@ -11517,6 +11603,14 @@ method(object({
11517
11603
  }), object({ success: literal(true) }), {
11518
11604
  kind: "mutation",
11519
11605
  auth: "admin"
11606
+ }), method(object({ deviceId: number().int().nonnegative() }), object({
11607
+ derivedStreamsDeleted: array(string()).readonly(),
11608
+ assignmentsPurged: boolean(),
11609
+ probeSnapshotsDropped: number().int().nonnegative(),
11610
+ rtspTokenRowsDeleted: number().int().nonnegative()
11611
+ }), {
11612
+ kind: "mutation",
11613
+ auth: "admin"
11520
11614
  }), method(object({
11521
11615
  deviceId: number(),
11522
11616
  /** Absent = the LOWEST assigned profile — a notification attachment is
@@ -19426,7 +19520,20 @@ var RecentTracksQueryInput = object({
19426
19520
  projection: TrackProjectionSchema.optional(),
19427
19521
  /** Include stationary-promoted rows (parked objects). Default false: the
19428
19522
  * feed lists passages; parking records live on the stationary registry. */
19429
- includeStationary: boolean().optional()
19523
+ includeStationary: boolean().optional(),
19524
+ /**
19525
+ * Restrict to these track classes. ABSENT or EMPTY means no filter.
19526
+ *
19527
+ * The same filter `listTracks` takes, because the timeline's class chips must
19528
+ * mean the same thing whether the scope is one camera or twelve. Until this
19529
+ * existed the scoped feed downloaded a page and narrowed it on the phone
19530
+ * while the single-camera path narrowed the read — one filter, two costs.
19531
+ *
19532
+ * A SUPERSET prefilter on `classes[]`, like its single-camera twin: rows
19533
+ * whose class list is unreadable are kept, and the client's rule stays the
19534
+ * exact one.
19535
+ */
19536
+ classes: array(string()).optional()
19430
19537
  });
19431
19538
  var RecentTracksPageSchema = object({
19432
19539
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -23596,8 +23703,22 @@ var automationControlCapability = {
23596
23703
  * threshold.
23597
23704
  */
23598
23705
  var BatteryStatusSchema = object({
23599
- /** 0..100 inclusive. Firmware-reported. */
23600
- percentage: number().min(0).max(100),
23706
+ /**
23707
+ * 0..100 inclusive, firmware-reported. **`null` means NOT YET KNOWN** — the
23708
+ * provider has registered the capability but no reading has landed.
23709
+ *
23710
+ * It is nullable because it was not, and the only value a provider could
23711
+ * seed with was `0`. A battery camera behind an NVR therefore announced
23712
+ * itself at 0% on every start and corrected itself a moment later, which is
23713
+ * indistinguishable from a real flat battery: it fires the low-battery alert
23714
+ * every time the hub restarts. Unknown is not empty (D315), and on a battery
23715
+ * reading the difference is an alarm.
23716
+ *
23717
+ * `vacuum-control` and `lawn-mower-control` already model it this way.
23718
+ * Consumers must SKIP a null rather than coerce it — `battery-band` already
23719
+ * declines to band a non-finite reading, which is the correct shape.
23720
+ */
23721
+ percentage: number().min(0).max(100).nullable(),
23601
23722
  /**
23602
23723
  * Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
23603
23724
  * Reolink-specific for the Solar Panel 2 accessory (will become
@@ -33375,6 +33496,12 @@ Object.freeze({
33375
33496
  addonId: null,
33376
33497
  access: "create"
33377
33498
  },
33499
+ "backup.cancel": {
33500
+ capName: "backup",
33501
+ capScope: "system",
33502
+ addonId: null,
33503
+ access: "create"
33504
+ },
33378
33505
  "backup.delete": {
33379
33506
  capName: "backup",
33380
33507
  capScope: "system",
@@ -33417,6 +33544,12 @@ Object.freeze({
33417
33544
  addonId: null,
33418
33545
  access: "view"
33419
33546
  },
33547
+ "backup.listRuns": {
33548
+ capName: "backup",
33549
+ capScope: "system",
33550
+ addonId: null,
33551
+ access: "view"
33552
+ },
33420
33553
  "backup.listSchedules": {
33421
33554
  capName: "backup",
33422
33555
  capScope: "system",
@@ -37983,6 +38116,12 @@ Object.freeze({
37983
38116
  addonId: null,
37984
38117
  access: "create"
37985
38118
  },
38119
+ "streamBroker.forgetDeviceHardware": {
38120
+ capName: "stream-broker",
38121
+ capScope: "system",
38122
+ addonId: null,
38123
+ access: "delete"
38124
+ },
37986
38125
  "streamBroker.getAllRtspEntries": {
37987
38126
  capName: "stream-broker",
37988
38127
  capScope: "system",
@@ -40441,6 +40580,11 @@ Object.freeze({
40441
40580
  form: "single",
40442
40581
  optional: false
40443
40582
  }],
40583
+ "streamBroker.forgetDeviceHardware": [{
40584
+ name: "deviceId",
40585
+ form: "single",
40586
+ optional: false
40587
+ }],
40444
40588
  "streamBroker.getDeviceAudioMute": [{
40445
40589
  name: "deviceId",
40446
40590
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-import-alexa",
3
- "version": "0.2.56",
3
+ "version": "0.2.58",
4
4
  "description": "Alexa device-import provider for CamStack — imports the smart-home devices in a user's Alexa account via the unofficial alexa-remote2 cookie/token client (the inverse of the Alexa exporter)",
5
5
  "keywords": [
6
6
  "camstack",