@camstack/addon-provider-dreo 0.2.57 → 0.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/addon.js CHANGED
@@ -10563,6 +10563,89 @@ var LocationStatSchema = object({
10563
10563
  fileCount: number(),
10564
10564
  present: boolean()
10565
10565
  });
10566
+ /** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
10567
+ var BackupRunStateSchema = _enum([
10568
+ "queued",
10569
+ "running",
10570
+ "succeeded",
10571
+ "failed",
10572
+ "cancelled"
10573
+ ]);
10574
+ /**
10575
+ * Where a running backup currently is. `queued` before it starts,
10576
+ * `building` while the tar.gz is being staged, `uploading` during the
10577
+ * per-destination fan-out, `done` once terminal.
10578
+ */
10579
+ var BackupRunPhaseSchema = _enum([
10580
+ "queued",
10581
+ "building",
10582
+ "uploading",
10583
+ "done"
10584
+ ]);
10585
+ /**
10586
+ * Observable state of one backup run — readable WHILE it runs via
10587
+ * `backup.listRuns`. This is what makes the execution queue and
10588
+ * `backup.cancel` usable: the 2026-09-04 incident (two concurrent
10589
+ * multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
10590
+ * diagnosable with `du` because nothing reported that runs existed or
10591
+ * how large the staged archive had grown.
10592
+ */
10593
+ var BackupRunSchema = object({
10594
+ /** Stable run id — the handle `backup.cancel` takes. */
10595
+ id: string(),
10596
+ state: BackupRunStateSchema,
10597
+ phase: BackupRunPhaseSchema,
10598
+ /**
10599
+ * Resolved destination location ids. Empty while queued (targets are
10600
+ * resolved when the run starts, against the then-current policies).
10601
+ */
10602
+ destinationIds: array(string()).readonly(),
10603
+ label: string().optional(),
10604
+ /** ms-epoch when the run was submitted (trigger call / schedule fire). */
10605
+ requestedAt: number(),
10606
+ /** ms-epoch when the run left the queue and started building. */
10607
+ startedAt: number().optional(),
10608
+ /** ms-epoch when the run reached a terminal state. */
10609
+ finishedAt: number().optional(),
10610
+ /** Compressed bytes of the staging archive written so far. */
10611
+ stagedBytes: number(),
10612
+ /** Final staged archive size, once the build phase completes. */
10613
+ archiveSizeBytes: number().optional(),
10614
+ /** Bytes pushed to the destination currently uploading. */
10615
+ uploadedBytes: number(),
10616
+ /** Destinations where the archive fully landed (uploaded + indexed). */
10617
+ completedDestinationIds: array(string()).readonly(),
10618
+ /** Destinations that failed during the fan-out. */
10619
+ failedDestinationIds: array(string()).readonly(),
10620
+ /** Failure message when `state === 'failed'`. */
10621
+ error: string().optional(),
10622
+ /**
10623
+ * 1-based place in the execution queue — 1 = runs next. Present only
10624
+ * while `state === 'queued'`. Stamped by the orchestrator from the
10625
+ * queue's OWN pending order, never derived from timestamps, so the
10626
+ * UI cannot show an order the executor will not honour.
10627
+ */
10628
+ queuePosition: number().int().min(1).optional()
10629
+ });
10630
+ /**
10631
+ * Result of `backup.trigger`. The call still resolves when the run
10632
+ * terminates (compat with schedule-driven runs and the admin UI), but
10633
+ * it now names the run and says whether it had to WAIT: a trigger that
10634
+ * arrives while another run is in flight is enqueued (or joined onto
10635
+ * an identical already-queued run), never started concurrently.
10636
+ */
10637
+ var BackupTriggerResultSchema = object({
10638
+ /** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
10639
+ runId: string(),
10640
+ /** True when the run waited behind an in-flight run instead of starting immediately. */
10641
+ queued: boolean(),
10642
+ /** True when this trigger was coalesced onto an identical already-queued run. */
10643
+ joined: boolean(),
10644
+ /** True when the run was cancelled before completing every destination. */
10645
+ cancelled: boolean(),
10646
+ /** One entry per destination the archive landed at (partial on cancel). */
10647
+ entries: array(BackupEntrySchema).readonly()
10648
+ });
10566
10649
  /**
10567
10650
  * A backup schedule — the N:M "entry" that binds one cron cadence to a
10568
10651
  * SET of destination locations. Supersedes the per-location cron on
@@ -10610,7 +10693,10 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
10610
10693
  * retention (manual runs).
10611
10694
  */
10612
10695
  retentionCount: number().int().min(1).max(1e3).optional()
10613
- }).optional(), array(BackupEntrySchema).readonly(), {
10696
+ }).optional(), BackupTriggerResultSchema, {
10697
+ kind: "mutation",
10698
+ auth: "admin"
10699
+ }), method(_void(), array(BackupRunSchema).readonly(), { auth: "admin" }), method(object({ runId: string() }), object({ cancelled: boolean() }), {
10614
10700
  kind: "mutation",
10615
10701
  auth: "admin"
10616
10702
  }), method(_void(), array(BackupEntrySchema).readonly(), { auth: "admin" }), method(_void(), array(LocationStatSchema).readonly(), { auth: "admin" }), method(object({
@@ -11327,6 +11413,14 @@ method(object({
11327
11413
  }), object({ success: literal(true) }), {
11328
11414
  kind: "mutation",
11329
11415
  auth: "admin"
11416
+ }), method(object({ deviceId: number().int().nonnegative() }), object({
11417
+ derivedStreamsDeleted: array(string()).readonly(),
11418
+ assignmentsPurged: boolean(),
11419
+ probeSnapshotsDropped: number().int().nonnegative(),
11420
+ rtspTokenRowsDeleted: number().int().nonnegative()
11421
+ }), {
11422
+ kind: "mutation",
11423
+ auth: "admin"
11330
11424
  }), method(object({
11331
11425
  deviceId: number(),
11332
11426
  /** Absent = the LOWEST assigned profile — a notification attachment is
@@ -19236,7 +19330,20 @@ var RecentTracksQueryInput = object({
19236
19330
  projection: TrackProjectionSchema.optional(),
19237
19331
  /** Include stationary-promoted rows (parked objects). Default false: the
19238
19332
  * feed lists passages; parking records live on the stationary registry. */
19239
- includeStationary: boolean().optional()
19333
+ includeStationary: boolean().optional(),
19334
+ /**
19335
+ * Restrict to these track classes. ABSENT or EMPTY means no filter.
19336
+ *
19337
+ * The same filter `listTracks` takes, because the timeline's class chips must
19338
+ * mean the same thing whether the scope is one camera or twelve. Until this
19339
+ * existed the scoped feed downloaded a page and narrowed it on the phone
19340
+ * while the single-camera path narrowed the read — one filter, two costs.
19341
+ *
19342
+ * A SUPERSET prefilter on `classes[]`, like its single-camera twin: rows
19343
+ * whose class list is unreadable are kept, and the client's rule stays the
19344
+ * exact one.
19345
+ */
19346
+ classes: array(string()).optional()
19240
19347
  });
19241
19348
  var RecentTracksPageSchema = object({
19242
19349
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -23406,8 +23513,22 @@ var automationControlCapability = {
23406
23513
  * threshold.
23407
23514
  */
23408
23515
  var BatteryStatusSchema = object({
23409
- /** 0..100 inclusive. Firmware-reported. */
23410
- percentage: number().min(0).max(100),
23516
+ /**
23517
+ * 0..100 inclusive, firmware-reported. **`null` means NOT YET KNOWN** — the
23518
+ * provider has registered the capability but no reading has landed.
23519
+ *
23520
+ * It is nullable because it was not, and the only value a provider could
23521
+ * seed with was `0`. A battery camera behind an NVR therefore announced
23522
+ * itself at 0% on every start and corrected itself a moment later, which is
23523
+ * indistinguishable from a real flat battery: it fires the low-battery alert
23524
+ * every time the hub restarts. Unknown is not empty (D315), and on a battery
23525
+ * reading the difference is an alarm.
23526
+ *
23527
+ * `vacuum-control` and `lawn-mower-control` already model it this way.
23528
+ * Consumers must SKIP a null rather than coerce it — `battery-band` already
23529
+ * declines to band a non-finite reading, which is the correct shape.
23530
+ */
23531
+ percentage: number().min(0).max(100).nullable(),
23411
23532
  /**
23412
23533
  * Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
23413
23534
  * Reolink-specific for the Solar Panel 2 accessory (will become
@@ -33176,6 +33297,12 @@ Object.freeze({
33176
33297
  addonId: null,
33177
33298
  access: "create"
33178
33299
  },
33300
+ "backup.cancel": {
33301
+ capName: "backup",
33302
+ capScope: "system",
33303
+ addonId: null,
33304
+ access: "create"
33305
+ },
33179
33306
  "backup.delete": {
33180
33307
  capName: "backup",
33181
33308
  capScope: "system",
@@ -33218,6 +33345,12 @@ Object.freeze({
33218
33345
  addonId: null,
33219
33346
  access: "view"
33220
33347
  },
33348
+ "backup.listRuns": {
33349
+ capName: "backup",
33350
+ capScope: "system",
33351
+ addonId: null,
33352
+ access: "view"
33353
+ },
33221
33354
  "backup.listSchedules": {
33222
33355
  capName: "backup",
33223
33356
  capScope: "system",
@@ -37784,6 +37917,12 @@ Object.freeze({
37784
37917
  addonId: null,
37785
37918
  access: "create"
37786
37919
  },
37920
+ "streamBroker.forgetDeviceHardware": {
37921
+ capName: "stream-broker",
37922
+ capScope: "system",
37923
+ addonId: null,
37924
+ access: "delete"
37925
+ },
37787
37926
  "streamBroker.getAllRtspEntries": {
37788
37927
  capName: "stream-broker",
37789
37928
  capScope: "system",
@@ -40242,6 +40381,11 @@ Object.freeze({
40242
40381
  form: "single",
40243
40382
  optional: false
40244
40383
  }],
40384
+ "streamBroker.forgetDeviceHardware": [{
40385
+ name: "deviceId",
40386
+ form: "single",
40387
+ optional: false
40388
+ }],
40245
40389
  "streamBroker.getDeviceAudioMute": [{
40246
40390
  name: "deviceId",
40247
40391
  form: "single",
package/dist/addon.mjs 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
@@ -19237,7 +19331,20 @@ var RecentTracksQueryInput = object({
19237
19331
  projection: TrackProjectionSchema.optional(),
19238
19332
  /** Include stationary-promoted rows (parked objects). Default false: the
19239
19333
  * feed lists passages; parking records live on the stationary registry. */
19240
- includeStationary: boolean().optional()
19334
+ includeStationary: boolean().optional(),
19335
+ /**
19336
+ * Restrict to these track classes. ABSENT or EMPTY means no filter.
19337
+ *
19338
+ * The same filter `listTracks` takes, because the timeline's class chips must
19339
+ * mean the same thing whether the scope is one camera or twelve. Until this
19340
+ * existed the scoped feed downloaded a page and narrowed it on the phone
19341
+ * while the single-camera path narrowed the read — one filter, two costs.
19342
+ *
19343
+ * A SUPERSET prefilter on `classes[]`, like its single-camera twin: rows
19344
+ * whose class list is unreadable are kept, and the client's rule stays the
19345
+ * exact one.
19346
+ */
19347
+ classes: array(string()).optional()
19241
19348
  });
19242
19349
  var RecentTracksPageSchema = object({
19243
19350
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -23407,8 +23514,22 @@ var automationControlCapability = {
23407
23514
  * threshold.
23408
23515
  */
23409
23516
  var BatteryStatusSchema = object({
23410
- /** 0..100 inclusive. Firmware-reported. */
23411
- percentage: number().min(0).max(100),
23517
+ /**
23518
+ * 0..100 inclusive, firmware-reported. **`null` means NOT YET KNOWN** — the
23519
+ * provider has registered the capability but no reading has landed.
23520
+ *
23521
+ * It is nullable because it was not, and the only value a provider could
23522
+ * seed with was `0`. A battery camera behind an NVR therefore announced
23523
+ * itself at 0% on every start and corrected itself a moment later, which is
23524
+ * indistinguishable from a real flat battery: it fires the low-battery alert
23525
+ * every time the hub restarts. Unknown is not empty (D315), and on a battery
23526
+ * reading the difference is an alarm.
23527
+ *
23528
+ * `vacuum-control` and `lawn-mower-control` already model it this way.
23529
+ * Consumers must SKIP a null rather than coerce it — `battery-band` already
23530
+ * declines to band a non-finite reading, which is the correct shape.
23531
+ */
23532
+ percentage: number().min(0).max(100).nullable(),
23412
23533
  /**
23413
23534
  * Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
23414
23535
  * Reolink-specific for the Solar Panel 2 accessory (will become
@@ -33177,6 +33298,12 @@ Object.freeze({
33177
33298
  addonId: null,
33178
33299
  access: "create"
33179
33300
  },
33301
+ "backup.cancel": {
33302
+ capName: "backup",
33303
+ capScope: "system",
33304
+ addonId: null,
33305
+ access: "create"
33306
+ },
33180
33307
  "backup.delete": {
33181
33308
  capName: "backup",
33182
33309
  capScope: "system",
@@ -33219,6 +33346,12 @@ Object.freeze({
33219
33346
  addonId: null,
33220
33347
  access: "view"
33221
33348
  },
33349
+ "backup.listRuns": {
33350
+ capName: "backup",
33351
+ capScope: "system",
33352
+ addonId: null,
33353
+ access: "view"
33354
+ },
33222
33355
  "backup.listSchedules": {
33223
33356
  capName: "backup",
33224
33357
  capScope: "system",
@@ -37785,6 +37918,12 @@ Object.freeze({
37785
37918
  addonId: null,
37786
37919
  access: "create"
37787
37920
  },
37921
+ "streamBroker.forgetDeviceHardware": {
37922
+ capName: "stream-broker",
37923
+ capScope: "system",
37924
+ addonId: null,
37925
+ access: "delete"
37926
+ },
37788
37927
  "streamBroker.getAllRtspEntries": {
37789
37928
  capName: "stream-broker",
37790
37929
  capScope: "system",
@@ -40243,6 +40382,11 @@ Object.freeze({
40243
40382
  form: "single",
40244
40383
  optional: false
40245
40384
  }],
40385
+ "streamBroker.forgetDeviceHardware": [{
40386
+ name: "deviceId",
40387
+ form: "single",
40388
+ optional: false
40389
+ }],
40246
40390
  "streamBroker.getDeviceAudioMute": [{
40247
40391
  name: "deviceId",
40248
40392
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-dreo",
3
- "version": "0.2.57",
3
+ "version": "0.2.59",
4
4
  "description": "Dreo smart-device (fan / air-circulator / purifier / heater / humidifier) device-provider addon for CamStack — wraps the @apocaliss92/nodedreo Dreo cloud client (REST + WebSocket)",
5
5
  "keywords": [
6
6
  "camstack",