@camstack/addon-provider-gree 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
@@ -10530,6 +10530,89 @@ var LocationStatSchema = object({
10530
10530
  fileCount: number(),
10531
10531
  present: boolean()
10532
10532
  });
10533
+ /** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
10534
+ var BackupRunStateSchema = _enum([
10535
+ "queued",
10536
+ "running",
10537
+ "succeeded",
10538
+ "failed",
10539
+ "cancelled"
10540
+ ]);
10541
+ /**
10542
+ * Where a running backup currently is. `queued` before it starts,
10543
+ * `building` while the tar.gz is being staged, `uploading` during the
10544
+ * per-destination fan-out, `done` once terminal.
10545
+ */
10546
+ var BackupRunPhaseSchema = _enum([
10547
+ "queued",
10548
+ "building",
10549
+ "uploading",
10550
+ "done"
10551
+ ]);
10552
+ /**
10553
+ * Observable state of one backup run — readable WHILE it runs via
10554
+ * `backup.listRuns`. This is what makes the execution queue and
10555
+ * `backup.cancel` usable: the 2026-09-04 incident (two concurrent
10556
+ * multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
10557
+ * diagnosable with `du` because nothing reported that runs existed or
10558
+ * how large the staged archive had grown.
10559
+ */
10560
+ var BackupRunSchema = object({
10561
+ /** Stable run id — the handle `backup.cancel` takes. */
10562
+ id: string(),
10563
+ state: BackupRunStateSchema,
10564
+ phase: BackupRunPhaseSchema,
10565
+ /**
10566
+ * Resolved destination location ids. Empty while queued (targets are
10567
+ * resolved when the run starts, against the then-current policies).
10568
+ */
10569
+ destinationIds: array(string()).readonly(),
10570
+ label: string().optional(),
10571
+ /** ms-epoch when the run was submitted (trigger call / schedule fire). */
10572
+ requestedAt: number(),
10573
+ /** ms-epoch when the run left the queue and started building. */
10574
+ startedAt: number().optional(),
10575
+ /** ms-epoch when the run reached a terminal state. */
10576
+ finishedAt: number().optional(),
10577
+ /** Compressed bytes of the staging archive written so far. */
10578
+ stagedBytes: number(),
10579
+ /** Final staged archive size, once the build phase completes. */
10580
+ archiveSizeBytes: number().optional(),
10581
+ /** Bytes pushed to the destination currently uploading. */
10582
+ uploadedBytes: number(),
10583
+ /** Destinations where the archive fully landed (uploaded + indexed). */
10584
+ completedDestinationIds: array(string()).readonly(),
10585
+ /** Destinations that failed during the fan-out. */
10586
+ failedDestinationIds: array(string()).readonly(),
10587
+ /** Failure message when `state === 'failed'`. */
10588
+ error: string().optional(),
10589
+ /**
10590
+ * 1-based place in the execution queue — 1 = runs next. Present only
10591
+ * while `state === 'queued'`. Stamped by the orchestrator from the
10592
+ * queue's OWN pending order, never derived from timestamps, so the
10593
+ * UI cannot show an order the executor will not honour.
10594
+ */
10595
+ queuePosition: number().int().min(1).optional()
10596
+ });
10597
+ /**
10598
+ * Result of `backup.trigger`. The call still resolves when the run
10599
+ * terminates (compat with schedule-driven runs and the admin UI), but
10600
+ * it now names the run and says whether it had to WAIT: a trigger that
10601
+ * arrives while another run is in flight is enqueued (or joined onto
10602
+ * an identical already-queued run), never started concurrently.
10603
+ */
10604
+ var BackupTriggerResultSchema = object({
10605
+ /** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
10606
+ runId: string(),
10607
+ /** True when the run waited behind an in-flight run instead of starting immediately. */
10608
+ queued: boolean(),
10609
+ /** True when this trigger was coalesced onto an identical already-queued run. */
10610
+ joined: boolean(),
10611
+ /** True when the run was cancelled before completing every destination. */
10612
+ cancelled: boolean(),
10613
+ /** One entry per destination the archive landed at (partial on cancel). */
10614
+ entries: array(BackupEntrySchema).readonly()
10615
+ });
10533
10616
  /**
10534
10617
  * A backup schedule — the N:M "entry" that binds one cron cadence to a
10535
10618
  * SET of destination locations. Supersedes the per-location cron on
@@ -10577,7 +10660,10 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
10577
10660
  * retention (manual runs).
10578
10661
  */
10579
10662
  retentionCount: number().int().min(1).max(1e3).optional()
10580
- }).optional(), array(BackupEntrySchema).readonly(), {
10663
+ }).optional(), BackupTriggerResultSchema, {
10664
+ kind: "mutation",
10665
+ auth: "admin"
10666
+ }), method(_void(), array(BackupRunSchema).readonly(), { auth: "admin" }), method(object({ runId: string() }), object({ cancelled: boolean() }), {
10581
10667
  kind: "mutation",
10582
10668
  auth: "admin"
10583
10669
  }), method(_void(), array(BackupEntrySchema).readonly(), { auth: "admin" }), method(_void(), array(LocationStatSchema).readonly(), { auth: "admin" }), method(object({
@@ -11294,6 +11380,14 @@ method(object({
11294
11380
  }), object({ success: literal(true) }), {
11295
11381
  kind: "mutation",
11296
11382
  auth: "admin"
11383
+ }), method(object({ deviceId: number().int().nonnegative() }), object({
11384
+ derivedStreamsDeleted: array(string()).readonly(),
11385
+ assignmentsPurged: boolean(),
11386
+ probeSnapshotsDropped: number().int().nonnegative(),
11387
+ rtspTokenRowsDeleted: number().int().nonnegative()
11388
+ }), {
11389
+ kind: "mutation",
11390
+ auth: "admin"
11297
11391
  }), method(object({
11298
11392
  deviceId: number(),
11299
11393
  /** Absent = the LOWEST assigned profile — a notification attachment is
@@ -19186,7 +19280,20 @@ var RecentTracksQueryInput = object({
19186
19280
  projection: TrackProjectionSchema.optional(),
19187
19281
  /** Include stationary-promoted rows (parked objects). Default false: the
19188
19282
  * feed lists passages; parking records live on the stationary registry. */
19189
- includeStationary: boolean().optional()
19283
+ includeStationary: boolean().optional(),
19284
+ /**
19285
+ * Restrict to these track classes. ABSENT or EMPTY means no filter.
19286
+ *
19287
+ * The same filter `listTracks` takes, because the timeline's class chips must
19288
+ * mean the same thing whether the scope is one camera or twelve. Until this
19289
+ * existed the scoped feed downloaded a page and narrowed it on the phone
19290
+ * while the single-camera path narrowed the read — one filter, two costs.
19291
+ *
19292
+ * A SUPERSET prefilter on `classes[]`, like its single-camera twin: rows
19293
+ * whose class list is unreadable are kept, and the client's rule stays the
19294
+ * exact one.
19295
+ */
19296
+ classes: array(string()).optional()
19190
19297
  });
19191
19298
  var RecentTracksPageSchema = object({
19192
19299
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -23356,8 +23463,22 @@ var automationControlCapability = {
23356
23463
  * threshold.
23357
23464
  */
23358
23465
  var BatteryStatusSchema = object({
23359
- /** 0..100 inclusive. Firmware-reported. */
23360
- percentage: number().min(0).max(100),
23466
+ /**
23467
+ * 0..100 inclusive, firmware-reported. **`null` means NOT YET KNOWN** — the
23468
+ * provider has registered the capability but no reading has landed.
23469
+ *
23470
+ * It is nullable because it was not, and the only value a provider could
23471
+ * seed with was `0`. A battery camera behind an NVR therefore announced
23472
+ * itself at 0% on every start and corrected itself a moment later, which is
23473
+ * indistinguishable from a real flat battery: it fires the low-battery alert
23474
+ * every time the hub restarts. Unknown is not empty (D315), and on a battery
23475
+ * reading the difference is an alarm.
23476
+ *
23477
+ * `vacuum-control` and `lawn-mower-control` already model it this way.
23478
+ * Consumers must SKIP a null rather than coerce it — `battery-band` already
23479
+ * declines to band a non-finite reading, which is the correct shape.
23480
+ */
23481
+ percentage: number().min(0).max(100).nullable(),
23361
23482
  /**
23362
23483
  * Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
23363
23484
  * Reolink-specific for the Solar Panel 2 accessory (will become
@@ -33118,6 +33239,12 @@ Object.freeze({
33118
33239
  addonId: null,
33119
33240
  access: "create"
33120
33241
  },
33242
+ "backup.cancel": {
33243
+ capName: "backup",
33244
+ capScope: "system",
33245
+ addonId: null,
33246
+ access: "create"
33247
+ },
33121
33248
  "backup.delete": {
33122
33249
  capName: "backup",
33123
33250
  capScope: "system",
@@ -33160,6 +33287,12 @@ Object.freeze({
33160
33287
  addonId: null,
33161
33288
  access: "view"
33162
33289
  },
33290
+ "backup.listRuns": {
33291
+ capName: "backup",
33292
+ capScope: "system",
33293
+ addonId: null,
33294
+ access: "view"
33295
+ },
33163
33296
  "backup.listSchedules": {
33164
33297
  capName: "backup",
33165
33298
  capScope: "system",
@@ -37726,6 +37859,12 @@ Object.freeze({
37726
37859
  addonId: null,
37727
37860
  access: "create"
37728
37861
  },
37862
+ "streamBroker.forgetDeviceHardware": {
37863
+ capName: "stream-broker",
37864
+ capScope: "system",
37865
+ addonId: null,
37866
+ access: "delete"
37867
+ },
37729
37868
  "streamBroker.getAllRtspEntries": {
37730
37869
  capName: "stream-broker",
37731
37870
  capScope: "system",
@@ -40184,6 +40323,11 @@ Object.freeze({
40184
40323
  form: "single",
40185
40324
  optional: false
40186
40325
  }],
40326
+ "streamBroker.forgetDeviceHardware": [{
40327
+ name: "deviceId",
40328
+ form: "single",
40329
+ optional: false
40330
+ }],
40187
40331
  "streamBroker.getDeviceAudioMute": [{
40188
40332
  name: "deviceId",
40189
40333
  form: "single",
package/dist/addon.mjs CHANGED
@@ -10529,6 +10529,89 @@ var LocationStatSchema = object({
10529
10529
  fileCount: number(),
10530
10530
  present: boolean()
10531
10531
  });
10532
+ /** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
10533
+ var BackupRunStateSchema = _enum([
10534
+ "queued",
10535
+ "running",
10536
+ "succeeded",
10537
+ "failed",
10538
+ "cancelled"
10539
+ ]);
10540
+ /**
10541
+ * Where a running backup currently is. `queued` before it starts,
10542
+ * `building` while the tar.gz is being staged, `uploading` during the
10543
+ * per-destination fan-out, `done` once terminal.
10544
+ */
10545
+ var BackupRunPhaseSchema = _enum([
10546
+ "queued",
10547
+ "building",
10548
+ "uploading",
10549
+ "done"
10550
+ ]);
10551
+ /**
10552
+ * Observable state of one backup run — readable WHILE it runs via
10553
+ * `backup.listRuns`. This is what makes the execution queue and
10554
+ * `backup.cancel` usable: the 2026-09-04 incident (two concurrent
10555
+ * multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
10556
+ * diagnosable with `du` because nothing reported that runs existed or
10557
+ * how large the staged archive had grown.
10558
+ */
10559
+ var BackupRunSchema = object({
10560
+ /** Stable run id — the handle `backup.cancel` takes. */
10561
+ id: string(),
10562
+ state: BackupRunStateSchema,
10563
+ phase: BackupRunPhaseSchema,
10564
+ /**
10565
+ * Resolved destination location ids. Empty while queued (targets are
10566
+ * resolved when the run starts, against the then-current policies).
10567
+ */
10568
+ destinationIds: array(string()).readonly(),
10569
+ label: string().optional(),
10570
+ /** ms-epoch when the run was submitted (trigger call / schedule fire). */
10571
+ requestedAt: number(),
10572
+ /** ms-epoch when the run left the queue and started building. */
10573
+ startedAt: number().optional(),
10574
+ /** ms-epoch when the run reached a terminal state. */
10575
+ finishedAt: number().optional(),
10576
+ /** Compressed bytes of the staging archive written so far. */
10577
+ stagedBytes: number(),
10578
+ /** Final staged archive size, once the build phase completes. */
10579
+ archiveSizeBytes: number().optional(),
10580
+ /** Bytes pushed to the destination currently uploading. */
10581
+ uploadedBytes: number(),
10582
+ /** Destinations where the archive fully landed (uploaded + indexed). */
10583
+ completedDestinationIds: array(string()).readonly(),
10584
+ /** Destinations that failed during the fan-out. */
10585
+ failedDestinationIds: array(string()).readonly(),
10586
+ /** Failure message when `state === 'failed'`. */
10587
+ error: string().optional(),
10588
+ /**
10589
+ * 1-based place in the execution queue — 1 = runs next. Present only
10590
+ * while `state === 'queued'`. Stamped by the orchestrator from the
10591
+ * queue's OWN pending order, never derived from timestamps, so the
10592
+ * UI cannot show an order the executor will not honour.
10593
+ */
10594
+ queuePosition: number().int().min(1).optional()
10595
+ });
10596
+ /**
10597
+ * Result of `backup.trigger`. The call still resolves when the run
10598
+ * terminates (compat with schedule-driven runs and the admin UI), but
10599
+ * it now names the run and says whether it had to WAIT: a trigger that
10600
+ * arrives while another run is in flight is enqueued (or joined onto
10601
+ * an identical already-queued run), never started concurrently.
10602
+ */
10603
+ var BackupTriggerResultSchema = object({
10604
+ /** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
10605
+ runId: string(),
10606
+ /** True when the run waited behind an in-flight run instead of starting immediately. */
10607
+ queued: boolean(),
10608
+ /** True when this trigger was coalesced onto an identical already-queued run. */
10609
+ joined: boolean(),
10610
+ /** True when the run was cancelled before completing every destination. */
10611
+ cancelled: boolean(),
10612
+ /** One entry per destination the archive landed at (partial on cancel). */
10613
+ entries: array(BackupEntrySchema).readonly()
10614
+ });
10532
10615
  /**
10533
10616
  * A backup schedule — the N:M "entry" that binds one cron cadence to a
10534
10617
  * SET of destination locations. Supersedes the per-location cron on
@@ -10576,7 +10659,10 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
10576
10659
  * retention (manual runs).
10577
10660
  */
10578
10661
  retentionCount: number().int().min(1).max(1e3).optional()
10579
- }).optional(), array(BackupEntrySchema).readonly(), {
10662
+ }).optional(), BackupTriggerResultSchema, {
10663
+ kind: "mutation",
10664
+ auth: "admin"
10665
+ }), method(_void(), array(BackupRunSchema).readonly(), { auth: "admin" }), method(object({ runId: string() }), object({ cancelled: boolean() }), {
10580
10666
  kind: "mutation",
10581
10667
  auth: "admin"
10582
10668
  }), method(_void(), array(BackupEntrySchema).readonly(), { auth: "admin" }), method(_void(), array(LocationStatSchema).readonly(), { auth: "admin" }), method(object({
@@ -11293,6 +11379,14 @@ method(object({
11293
11379
  }), object({ success: literal(true) }), {
11294
11380
  kind: "mutation",
11295
11381
  auth: "admin"
11382
+ }), method(object({ deviceId: number().int().nonnegative() }), object({
11383
+ derivedStreamsDeleted: array(string()).readonly(),
11384
+ assignmentsPurged: boolean(),
11385
+ probeSnapshotsDropped: number().int().nonnegative(),
11386
+ rtspTokenRowsDeleted: number().int().nonnegative()
11387
+ }), {
11388
+ kind: "mutation",
11389
+ auth: "admin"
11296
11390
  }), method(object({
11297
11391
  deviceId: number(),
11298
11392
  /** Absent = the LOWEST assigned profile — a notification attachment is
@@ -19185,7 +19279,20 @@ var RecentTracksQueryInput = object({
19185
19279
  projection: TrackProjectionSchema.optional(),
19186
19280
  /** Include stationary-promoted rows (parked objects). Default false: the
19187
19281
  * feed lists passages; parking records live on the stationary registry. */
19188
- includeStationary: boolean().optional()
19282
+ includeStationary: boolean().optional(),
19283
+ /**
19284
+ * Restrict to these track classes. ABSENT or EMPTY means no filter.
19285
+ *
19286
+ * The same filter `listTracks` takes, because the timeline's class chips must
19287
+ * mean the same thing whether the scope is one camera or twelve. Until this
19288
+ * existed the scoped feed downloaded a page and narrowed it on the phone
19289
+ * while the single-camera path narrowed the read — one filter, two costs.
19290
+ *
19291
+ * A SUPERSET prefilter on `classes[]`, like its single-camera twin: rows
19292
+ * whose class list is unreadable are kept, and the client's rule stays the
19293
+ * exact one.
19294
+ */
19295
+ classes: array(string()).optional()
19189
19296
  });
19190
19297
  var RecentTracksPageSchema = object({
19191
19298
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -23355,8 +23462,22 @@ var automationControlCapability = {
23355
23462
  * threshold.
23356
23463
  */
23357
23464
  var BatteryStatusSchema = object({
23358
- /** 0..100 inclusive. Firmware-reported. */
23359
- percentage: number().min(0).max(100),
23465
+ /**
23466
+ * 0..100 inclusive, firmware-reported. **`null` means NOT YET KNOWN** — the
23467
+ * provider has registered the capability but no reading has landed.
23468
+ *
23469
+ * It is nullable because it was not, and the only value a provider could
23470
+ * seed with was `0`. A battery camera behind an NVR therefore announced
23471
+ * itself at 0% on every start and corrected itself a moment later, which is
23472
+ * indistinguishable from a real flat battery: it fires the low-battery alert
23473
+ * every time the hub restarts. Unknown is not empty (D315), and on a battery
23474
+ * reading the difference is an alarm.
23475
+ *
23476
+ * `vacuum-control` and `lawn-mower-control` already model it this way.
23477
+ * Consumers must SKIP a null rather than coerce it — `battery-band` already
23478
+ * declines to band a non-finite reading, which is the correct shape.
23479
+ */
23480
+ percentage: number().min(0).max(100).nullable(),
23360
23481
  /**
23361
23482
  * Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
23362
23483
  * Reolink-specific for the Solar Panel 2 accessory (will become
@@ -33117,6 +33238,12 @@ Object.freeze({
33117
33238
  addonId: null,
33118
33239
  access: "create"
33119
33240
  },
33241
+ "backup.cancel": {
33242
+ capName: "backup",
33243
+ capScope: "system",
33244
+ addonId: null,
33245
+ access: "create"
33246
+ },
33120
33247
  "backup.delete": {
33121
33248
  capName: "backup",
33122
33249
  capScope: "system",
@@ -33159,6 +33286,12 @@ Object.freeze({
33159
33286
  addonId: null,
33160
33287
  access: "view"
33161
33288
  },
33289
+ "backup.listRuns": {
33290
+ capName: "backup",
33291
+ capScope: "system",
33292
+ addonId: null,
33293
+ access: "view"
33294
+ },
33162
33295
  "backup.listSchedules": {
33163
33296
  capName: "backup",
33164
33297
  capScope: "system",
@@ -37725,6 +37858,12 @@ Object.freeze({
37725
37858
  addonId: null,
37726
37859
  access: "create"
37727
37860
  },
37861
+ "streamBroker.forgetDeviceHardware": {
37862
+ capName: "stream-broker",
37863
+ capScope: "system",
37864
+ addonId: null,
37865
+ access: "delete"
37866
+ },
37728
37867
  "streamBroker.getAllRtspEntries": {
37729
37868
  capName: "stream-broker",
37730
37869
  capScope: "system",
@@ -40183,6 +40322,11 @@ Object.freeze({
40183
40322
  form: "single",
40184
40323
  optional: false
40185
40324
  }],
40325
+ "streamBroker.forgetDeviceHardware": [{
40326
+ name: "deviceId",
40327
+ form: "single",
40328
+ optional: false
40329
+ }],
40186
40330
  "streamBroker.getDeviceAudioMute": [{
40187
40331
  name: "deviceId",
40188
40332
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-gree",
3
- "version": "0.2.56",
3
+ "version": "0.2.58",
4
4
  "description": "Gree air-conditioner device-provider addon for CamStack — wraps the @apocaliss92/nodegree local-UDP client (LAN discovery + AES control), exposing climate-control and fan-control",
5
5
  "keywords": [
6
6
  "camstack",