@camstack/addon-provider-dreame 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
@@ -61032,6 +61032,89 @@ var LocationStatSchema = object({
61032
61032
  fileCount: number(),
61033
61033
  present: boolean()
61034
61034
  });
61035
+ /** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
61036
+ var BackupRunStateSchema = _enum([
61037
+ "queued",
61038
+ "running",
61039
+ "succeeded",
61040
+ "failed",
61041
+ "cancelled"
61042
+ ]);
61043
+ /**
61044
+ * Where a running backup currently is. `queued` before it starts,
61045
+ * `building` while the tar.gz is being staged, `uploading` during the
61046
+ * per-destination fan-out, `done` once terminal.
61047
+ */
61048
+ var BackupRunPhaseSchema = _enum([
61049
+ "queued",
61050
+ "building",
61051
+ "uploading",
61052
+ "done"
61053
+ ]);
61054
+ /**
61055
+ * Observable state of one backup run — readable WHILE it runs via
61056
+ * `backup.listRuns`. This is what makes the execution queue and
61057
+ * `backup.cancel` usable: the 2026-09-04 incident (two concurrent
61058
+ * multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
61059
+ * diagnosable with `du` because nothing reported that runs existed or
61060
+ * how large the staged archive had grown.
61061
+ */
61062
+ var BackupRunSchema = object({
61063
+ /** Stable run id — the handle `backup.cancel` takes. */
61064
+ id: string(),
61065
+ state: BackupRunStateSchema,
61066
+ phase: BackupRunPhaseSchema,
61067
+ /**
61068
+ * Resolved destination location ids. Empty while queued (targets are
61069
+ * resolved when the run starts, against the then-current policies).
61070
+ */
61071
+ destinationIds: array(string()).readonly(),
61072
+ label: string().optional(),
61073
+ /** ms-epoch when the run was submitted (trigger call / schedule fire). */
61074
+ requestedAt: number(),
61075
+ /** ms-epoch when the run left the queue and started building. */
61076
+ startedAt: number().optional(),
61077
+ /** ms-epoch when the run reached a terminal state. */
61078
+ finishedAt: number().optional(),
61079
+ /** Compressed bytes of the staging archive written so far. */
61080
+ stagedBytes: number(),
61081
+ /** Final staged archive size, once the build phase completes. */
61082
+ archiveSizeBytes: number().optional(),
61083
+ /** Bytes pushed to the destination currently uploading. */
61084
+ uploadedBytes: number(),
61085
+ /** Destinations where the archive fully landed (uploaded + indexed). */
61086
+ completedDestinationIds: array(string()).readonly(),
61087
+ /** Destinations that failed during the fan-out. */
61088
+ failedDestinationIds: array(string()).readonly(),
61089
+ /** Failure message when `state === 'failed'`. */
61090
+ error: string().optional(),
61091
+ /**
61092
+ * 1-based place in the execution queue — 1 = runs next. Present only
61093
+ * while `state === 'queued'`. Stamped by the orchestrator from the
61094
+ * queue's OWN pending order, never derived from timestamps, so the
61095
+ * UI cannot show an order the executor will not honour.
61096
+ */
61097
+ queuePosition: number().int().min(1).optional()
61098
+ });
61099
+ /**
61100
+ * Result of `backup.trigger`. The call still resolves when the run
61101
+ * terminates (compat with schedule-driven runs and the admin UI), but
61102
+ * it now names the run and says whether it had to WAIT: a trigger that
61103
+ * arrives while another run is in flight is enqueued (or joined onto
61104
+ * an identical already-queued run), never started concurrently.
61105
+ */
61106
+ var BackupTriggerResultSchema = object({
61107
+ /** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
61108
+ runId: string(),
61109
+ /** True when the run waited behind an in-flight run instead of starting immediately. */
61110
+ queued: boolean(),
61111
+ /** True when this trigger was coalesced onto an identical already-queued run. */
61112
+ joined: boolean(),
61113
+ /** True when the run was cancelled before completing every destination. */
61114
+ cancelled: boolean(),
61115
+ /** One entry per destination the archive landed at (partial on cancel). */
61116
+ entries: array(BackupEntrySchema).readonly()
61117
+ });
61035
61118
  /**
61036
61119
  * A backup schedule — the N:M "entry" that binds one cron cadence to a
61037
61120
  * SET of destination locations. Supersedes the per-location cron on
@@ -61079,7 +61162,10 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
61079
61162
  * retention (manual runs).
61080
61163
  */
61081
61164
  retentionCount: number().int().min(1).max(1e3).optional()
61082
- }).optional(), array(BackupEntrySchema).readonly(), {
61165
+ }).optional(), BackupTriggerResultSchema, {
61166
+ kind: "mutation",
61167
+ auth: "admin"
61168
+ }), method(_void(), array(BackupRunSchema).readonly(), { auth: "admin" }), method(object({ runId: string() }), object({ cancelled: boolean() }), {
61083
61169
  kind: "mutation",
61084
61170
  auth: "admin"
61085
61171
  }), method(_void(), array(BackupEntrySchema).readonly(), { auth: "admin" }), method(_void(), array(LocationStatSchema).readonly(), { auth: "admin" }), method(object({
@@ -61796,6 +61882,14 @@ method(object({
61796
61882
  }), object({ success: literal(true) }), {
61797
61883
  kind: "mutation",
61798
61884
  auth: "admin"
61885
+ }), method(object({ deviceId: number().int().nonnegative() }), object({
61886
+ derivedStreamsDeleted: array(string()).readonly(),
61887
+ assignmentsPurged: boolean(),
61888
+ probeSnapshotsDropped: number().int().nonnegative(),
61889
+ rtspTokenRowsDeleted: number().int().nonnegative()
61890
+ }), {
61891
+ kind: "mutation",
61892
+ auth: "admin"
61799
61893
  }), method(object({
61800
61894
  deviceId: number(),
61801
61895
  /** Absent = the LOWEST assigned profile — a notification attachment is
@@ -69705,7 +69799,20 @@ var RecentTracksQueryInput = object({
69705
69799
  projection: TrackProjectionSchema.optional(),
69706
69800
  /** Include stationary-promoted rows (parked objects). Default false: the
69707
69801
  * feed lists passages; parking records live on the stationary registry. */
69708
- includeStationary: boolean().optional()
69802
+ includeStationary: boolean().optional(),
69803
+ /**
69804
+ * Restrict to these track classes. ABSENT or EMPTY means no filter.
69805
+ *
69806
+ * The same filter `listTracks` takes, because the timeline's class chips must
69807
+ * mean the same thing whether the scope is one camera or twelve. Until this
69808
+ * existed the scoped feed downloaded a page and narrowed it on the phone
69809
+ * while the single-camera path narrowed the read — one filter, two costs.
69810
+ *
69811
+ * A SUPERSET prefilter on `classes[]`, like its single-camera twin: rows
69812
+ * whose class list is unreadable are kept, and the client's rule stays the
69813
+ * exact one.
69814
+ */
69815
+ classes: array(string()).optional()
69709
69816
  });
69710
69817
  var RecentTracksPageSchema = object({
69711
69818
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -73875,8 +73982,22 @@ var automationControlCapability = {
73875
73982
  * threshold.
73876
73983
  */
73877
73984
  var BatteryStatusSchema = object({
73878
- /** 0..100 inclusive. Firmware-reported. */
73879
- percentage: number().min(0).max(100),
73985
+ /**
73986
+ * 0..100 inclusive, firmware-reported. **`null` means NOT YET KNOWN** — the
73987
+ * provider has registered the capability but no reading has landed.
73988
+ *
73989
+ * It is nullable because it was not, and the only value a provider could
73990
+ * seed with was `0`. A battery camera behind an NVR therefore announced
73991
+ * itself at 0% on every start and corrected itself a moment later, which is
73992
+ * indistinguishable from a real flat battery: it fires the low-battery alert
73993
+ * every time the hub restarts. Unknown is not empty (D315), and on a battery
73994
+ * reading the difference is an alarm.
73995
+ *
73996
+ * `vacuum-control` and `lawn-mower-control` already model it this way.
73997
+ * Consumers must SKIP a null rather than coerce it — `battery-band` already
73998
+ * declines to band a non-finite reading, which is the correct shape.
73999
+ */
74000
+ percentage: number().min(0).max(100).nullable(),
73880
74001
  /**
73881
74002
  * Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
73882
74003
  * Reolink-specific for the Solar Panel 2 accessory (will become
@@ -83662,6 +83783,12 @@ Object.freeze({
83662
83783
  addonId: null,
83663
83784
  access: "create"
83664
83785
  },
83786
+ "backup.cancel": {
83787
+ capName: "backup",
83788
+ capScope: "system",
83789
+ addonId: null,
83790
+ access: "create"
83791
+ },
83665
83792
  "backup.delete": {
83666
83793
  capName: "backup",
83667
83794
  capScope: "system",
@@ -83704,6 +83831,12 @@ Object.freeze({
83704
83831
  addonId: null,
83705
83832
  access: "view"
83706
83833
  },
83834
+ "backup.listRuns": {
83835
+ capName: "backup",
83836
+ capScope: "system",
83837
+ addonId: null,
83838
+ access: "view"
83839
+ },
83707
83840
  "backup.listSchedules": {
83708
83841
  capName: "backup",
83709
83842
  capScope: "system",
@@ -88270,6 +88403,12 @@ Object.freeze({
88270
88403
  addonId: null,
88271
88404
  access: "create"
88272
88405
  },
88406
+ "streamBroker.forgetDeviceHardware": {
88407
+ capName: "stream-broker",
88408
+ capScope: "system",
88409
+ addonId: null,
88410
+ access: "delete"
88411
+ },
88273
88412
  "streamBroker.getAllRtspEntries": {
88274
88413
  capName: "stream-broker",
88275
88414
  capScope: "system",
@@ -90728,6 +90867,11 @@ Object.freeze({
90728
90867
  form: "single",
90729
90868
  optional: false
90730
90869
  }],
90870
+ "streamBroker.forgetDeviceHardware": [{
90871
+ name: "deviceId",
90872
+ form: "single",
90873
+ optional: false
90874
+ }],
90731
90875
  "streamBroker.getDeviceAudioMute": [{
90732
90876
  name: "deviceId",
90733
90877
  form: "single",
package/dist/addon.mjs CHANGED
@@ -61032,6 +61032,89 @@ var LocationStatSchema = object({
61032
61032
  fileCount: number(),
61033
61033
  present: boolean()
61034
61034
  });
61035
+ /** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
61036
+ var BackupRunStateSchema = _enum([
61037
+ "queued",
61038
+ "running",
61039
+ "succeeded",
61040
+ "failed",
61041
+ "cancelled"
61042
+ ]);
61043
+ /**
61044
+ * Where a running backup currently is. `queued` before it starts,
61045
+ * `building` while the tar.gz is being staged, `uploading` during the
61046
+ * per-destination fan-out, `done` once terminal.
61047
+ */
61048
+ var BackupRunPhaseSchema = _enum([
61049
+ "queued",
61050
+ "building",
61051
+ "uploading",
61052
+ "done"
61053
+ ]);
61054
+ /**
61055
+ * Observable state of one backup run — readable WHILE it runs via
61056
+ * `backup.listRuns`. This is what makes the execution queue and
61057
+ * `backup.cancel` usable: the 2026-09-04 incident (two concurrent
61058
+ * multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
61059
+ * diagnosable with `du` because nothing reported that runs existed or
61060
+ * how large the staged archive had grown.
61061
+ */
61062
+ var BackupRunSchema = object({
61063
+ /** Stable run id — the handle `backup.cancel` takes. */
61064
+ id: string(),
61065
+ state: BackupRunStateSchema,
61066
+ phase: BackupRunPhaseSchema,
61067
+ /**
61068
+ * Resolved destination location ids. Empty while queued (targets are
61069
+ * resolved when the run starts, against the then-current policies).
61070
+ */
61071
+ destinationIds: array(string()).readonly(),
61072
+ label: string().optional(),
61073
+ /** ms-epoch when the run was submitted (trigger call / schedule fire). */
61074
+ requestedAt: number(),
61075
+ /** ms-epoch when the run left the queue and started building. */
61076
+ startedAt: number().optional(),
61077
+ /** ms-epoch when the run reached a terminal state. */
61078
+ finishedAt: number().optional(),
61079
+ /** Compressed bytes of the staging archive written so far. */
61080
+ stagedBytes: number(),
61081
+ /** Final staged archive size, once the build phase completes. */
61082
+ archiveSizeBytes: number().optional(),
61083
+ /** Bytes pushed to the destination currently uploading. */
61084
+ uploadedBytes: number(),
61085
+ /** Destinations where the archive fully landed (uploaded + indexed). */
61086
+ completedDestinationIds: array(string()).readonly(),
61087
+ /** Destinations that failed during the fan-out. */
61088
+ failedDestinationIds: array(string()).readonly(),
61089
+ /** Failure message when `state === 'failed'`. */
61090
+ error: string().optional(),
61091
+ /**
61092
+ * 1-based place in the execution queue — 1 = runs next. Present only
61093
+ * while `state === 'queued'`. Stamped by the orchestrator from the
61094
+ * queue's OWN pending order, never derived from timestamps, so the
61095
+ * UI cannot show an order the executor will not honour.
61096
+ */
61097
+ queuePosition: number().int().min(1).optional()
61098
+ });
61099
+ /**
61100
+ * Result of `backup.trigger`. The call still resolves when the run
61101
+ * terminates (compat with schedule-driven runs and the admin UI), but
61102
+ * it now names the run and says whether it had to WAIT: a trigger that
61103
+ * arrives while another run is in flight is enqueued (or joined onto
61104
+ * an identical already-queued run), never started concurrently.
61105
+ */
61106
+ var BackupTriggerResultSchema = object({
61107
+ /** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
61108
+ runId: string(),
61109
+ /** True when the run waited behind an in-flight run instead of starting immediately. */
61110
+ queued: boolean(),
61111
+ /** True when this trigger was coalesced onto an identical already-queued run. */
61112
+ joined: boolean(),
61113
+ /** True when the run was cancelled before completing every destination. */
61114
+ cancelled: boolean(),
61115
+ /** One entry per destination the archive landed at (partial on cancel). */
61116
+ entries: array(BackupEntrySchema).readonly()
61117
+ });
61035
61118
  /**
61036
61119
  * A backup schedule — the N:M "entry" that binds one cron cadence to a
61037
61120
  * SET of destination locations. Supersedes the per-location cron on
@@ -61079,7 +61162,10 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
61079
61162
  * retention (manual runs).
61080
61163
  */
61081
61164
  retentionCount: number().int().min(1).max(1e3).optional()
61082
- }).optional(), array(BackupEntrySchema).readonly(), {
61165
+ }).optional(), BackupTriggerResultSchema, {
61166
+ kind: "mutation",
61167
+ auth: "admin"
61168
+ }), method(_void(), array(BackupRunSchema).readonly(), { auth: "admin" }), method(object({ runId: string() }), object({ cancelled: boolean() }), {
61083
61169
  kind: "mutation",
61084
61170
  auth: "admin"
61085
61171
  }), method(_void(), array(BackupEntrySchema).readonly(), { auth: "admin" }), method(_void(), array(LocationStatSchema).readonly(), { auth: "admin" }), method(object({
@@ -61796,6 +61882,14 @@ method(object({
61796
61882
  }), object({ success: literal(true) }), {
61797
61883
  kind: "mutation",
61798
61884
  auth: "admin"
61885
+ }), method(object({ deviceId: number().int().nonnegative() }), object({
61886
+ derivedStreamsDeleted: array(string()).readonly(),
61887
+ assignmentsPurged: boolean(),
61888
+ probeSnapshotsDropped: number().int().nonnegative(),
61889
+ rtspTokenRowsDeleted: number().int().nonnegative()
61890
+ }), {
61891
+ kind: "mutation",
61892
+ auth: "admin"
61799
61893
  }), method(object({
61800
61894
  deviceId: number(),
61801
61895
  /** Absent = the LOWEST assigned profile — a notification attachment is
@@ -69705,7 +69799,20 @@ var RecentTracksQueryInput = object({
69705
69799
  projection: TrackProjectionSchema.optional(),
69706
69800
  /** Include stationary-promoted rows (parked objects). Default false: the
69707
69801
  * feed lists passages; parking records live on the stationary registry. */
69708
- includeStationary: boolean().optional()
69802
+ includeStationary: boolean().optional(),
69803
+ /**
69804
+ * Restrict to these track classes. ABSENT or EMPTY means no filter.
69805
+ *
69806
+ * The same filter `listTracks` takes, because the timeline's class chips must
69807
+ * mean the same thing whether the scope is one camera or twelve. Until this
69808
+ * existed the scoped feed downloaded a page and narrowed it on the phone
69809
+ * while the single-camera path narrowed the read — one filter, two costs.
69810
+ *
69811
+ * A SUPERSET prefilter on `classes[]`, like its single-camera twin: rows
69812
+ * whose class list is unreadable are kept, and the client's rule stays the
69813
+ * exact one.
69814
+ */
69815
+ classes: array(string()).optional()
69709
69816
  });
69710
69817
  var RecentTracksPageSchema = object({
69711
69818
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -73875,8 +73982,22 @@ var automationControlCapability = {
73875
73982
  * threshold.
73876
73983
  */
73877
73984
  var BatteryStatusSchema = object({
73878
- /** 0..100 inclusive. Firmware-reported. */
73879
- percentage: number().min(0).max(100),
73985
+ /**
73986
+ * 0..100 inclusive, firmware-reported. **`null` means NOT YET KNOWN** — the
73987
+ * provider has registered the capability but no reading has landed.
73988
+ *
73989
+ * It is nullable because it was not, and the only value a provider could
73990
+ * seed with was `0`. A battery camera behind an NVR therefore announced
73991
+ * itself at 0% on every start and corrected itself a moment later, which is
73992
+ * indistinguishable from a real flat battery: it fires the low-battery alert
73993
+ * every time the hub restarts. Unknown is not empty (D315), and on a battery
73994
+ * reading the difference is an alarm.
73995
+ *
73996
+ * `vacuum-control` and `lawn-mower-control` already model it this way.
73997
+ * Consumers must SKIP a null rather than coerce it — `battery-band` already
73998
+ * declines to band a non-finite reading, which is the correct shape.
73999
+ */
74000
+ percentage: number().min(0).max(100).nullable(),
73880
74001
  /**
73881
74002
  * Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
73882
74003
  * Reolink-specific for the Solar Panel 2 accessory (will become
@@ -83662,6 +83783,12 @@ Object.freeze({
83662
83783
  addonId: null,
83663
83784
  access: "create"
83664
83785
  },
83786
+ "backup.cancel": {
83787
+ capName: "backup",
83788
+ capScope: "system",
83789
+ addonId: null,
83790
+ access: "create"
83791
+ },
83665
83792
  "backup.delete": {
83666
83793
  capName: "backup",
83667
83794
  capScope: "system",
@@ -83704,6 +83831,12 @@ Object.freeze({
83704
83831
  addonId: null,
83705
83832
  access: "view"
83706
83833
  },
83834
+ "backup.listRuns": {
83835
+ capName: "backup",
83836
+ capScope: "system",
83837
+ addonId: null,
83838
+ access: "view"
83839
+ },
83707
83840
  "backup.listSchedules": {
83708
83841
  capName: "backup",
83709
83842
  capScope: "system",
@@ -88270,6 +88403,12 @@ Object.freeze({
88270
88403
  addonId: null,
88271
88404
  access: "create"
88272
88405
  },
88406
+ "streamBroker.forgetDeviceHardware": {
88407
+ capName: "stream-broker",
88408
+ capScope: "system",
88409
+ addonId: null,
88410
+ access: "delete"
88411
+ },
88273
88412
  "streamBroker.getAllRtspEntries": {
88274
88413
  capName: "stream-broker",
88275
88414
  capScope: "system",
@@ -90728,6 +90867,11 @@ Object.freeze({
90728
90867
  form: "single",
90729
90868
  optional: false
90730
90869
  }],
90870
+ "streamBroker.forgetDeviceHardware": [{
90871
+ name: "deviceId",
90872
+ form: "single",
90873
+ optional: false
90874
+ }],
90731
90875
  "streamBroker.getDeviceAudioMute": [{
90732
90876
  name: "deviceId",
90733
90877
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-dreame",
3
- "version": "0.2.57",
3
+ "version": "0.2.59",
4
4
  "description": "Dreame robot-vacuum / lawn-mower device-provider addon for CamStack — wraps the @apocaliss92/nodedreame Dreamehome cloud client",
5
5
  "keywords": [
6
6
  "camstack",