@camstack/addon-provider-unifi 0.2.58 → 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
@@ -10527,6 +10527,89 @@ var LocationStatSchema = object({
10527
10527
  fileCount: number(),
10528
10528
  present: boolean()
10529
10529
  });
10530
+ /** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
10531
+ var BackupRunStateSchema = _enum([
10532
+ "queued",
10533
+ "running",
10534
+ "succeeded",
10535
+ "failed",
10536
+ "cancelled"
10537
+ ]);
10538
+ /**
10539
+ * Where a running backup currently is. `queued` before it starts,
10540
+ * `building` while the tar.gz is being staged, `uploading` during the
10541
+ * per-destination fan-out, `done` once terminal.
10542
+ */
10543
+ var BackupRunPhaseSchema = _enum([
10544
+ "queued",
10545
+ "building",
10546
+ "uploading",
10547
+ "done"
10548
+ ]);
10549
+ /**
10550
+ * Observable state of one backup run — readable WHILE it runs via
10551
+ * `backup.listRuns`. This is what makes the execution queue and
10552
+ * `backup.cancel` usable: the 2026-09-04 incident (two concurrent
10553
+ * multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
10554
+ * diagnosable with `du` because nothing reported that runs existed or
10555
+ * how large the staged archive had grown.
10556
+ */
10557
+ var BackupRunSchema = object({
10558
+ /** Stable run id — the handle `backup.cancel` takes. */
10559
+ id: string(),
10560
+ state: BackupRunStateSchema,
10561
+ phase: BackupRunPhaseSchema,
10562
+ /**
10563
+ * Resolved destination location ids. Empty while queued (targets are
10564
+ * resolved when the run starts, against the then-current policies).
10565
+ */
10566
+ destinationIds: array(string()).readonly(),
10567
+ label: string().optional(),
10568
+ /** ms-epoch when the run was submitted (trigger call / schedule fire). */
10569
+ requestedAt: number(),
10570
+ /** ms-epoch when the run left the queue and started building. */
10571
+ startedAt: number().optional(),
10572
+ /** ms-epoch when the run reached a terminal state. */
10573
+ finishedAt: number().optional(),
10574
+ /** Compressed bytes of the staging archive written so far. */
10575
+ stagedBytes: number(),
10576
+ /** Final staged archive size, once the build phase completes. */
10577
+ archiveSizeBytes: number().optional(),
10578
+ /** Bytes pushed to the destination currently uploading. */
10579
+ uploadedBytes: number(),
10580
+ /** Destinations where the archive fully landed (uploaded + indexed). */
10581
+ completedDestinationIds: array(string()).readonly(),
10582
+ /** Destinations that failed during the fan-out. */
10583
+ failedDestinationIds: array(string()).readonly(),
10584
+ /** Failure message when `state === 'failed'`. */
10585
+ error: string().optional(),
10586
+ /**
10587
+ * 1-based place in the execution queue — 1 = runs next. Present only
10588
+ * while `state === 'queued'`. Stamped by the orchestrator from the
10589
+ * queue's OWN pending order, never derived from timestamps, so the
10590
+ * UI cannot show an order the executor will not honour.
10591
+ */
10592
+ queuePosition: number().int().min(1).optional()
10593
+ });
10594
+ /**
10595
+ * Result of `backup.trigger`. The call still resolves when the run
10596
+ * terminates (compat with schedule-driven runs and the admin UI), but
10597
+ * it now names the run and says whether it had to WAIT: a trigger that
10598
+ * arrives while another run is in flight is enqueued (or joined onto
10599
+ * an identical already-queued run), never started concurrently.
10600
+ */
10601
+ var BackupTriggerResultSchema = object({
10602
+ /** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
10603
+ runId: string(),
10604
+ /** True when the run waited behind an in-flight run instead of starting immediately. */
10605
+ queued: boolean(),
10606
+ /** True when this trigger was coalesced onto an identical already-queued run. */
10607
+ joined: boolean(),
10608
+ /** True when the run was cancelled before completing every destination. */
10609
+ cancelled: boolean(),
10610
+ /** One entry per destination the archive landed at (partial on cancel). */
10611
+ entries: array(BackupEntrySchema).readonly()
10612
+ });
10530
10613
  /**
10531
10614
  * A backup schedule — the N:M "entry" that binds one cron cadence to a
10532
10615
  * SET of destination locations. Supersedes the per-location cron on
@@ -10574,7 +10657,10 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
10574
10657
  * retention (manual runs).
10575
10658
  */
10576
10659
  retentionCount: number().int().min(1).max(1e3).optional()
10577
- }).optional(), array(BackupEntrySchema).readonly(), {
10660
+ }).optional(), BackupTriggerResultSchema, {
10661
+ kind: "mutation",
10662
+ auth: "admin"
10663
+ }), method(_void(), array(BackupRunSchema).readonly(), { auth: "admin" }), method(object({ runId: string() }), object({ cancelled: boolean() }), {
10578
10664
  kind: "mutation",
10579
10665
  auth: "admin"
10580
10666
  }), method(_void(), array(BackupEntrySchema).readonly(), { auth: "admin" }), method(_void(), array(LocationStatSchema).readonly(), { auth: "admin" }), method(object({
@@ -11291,6 +11377,14 @@ method(object({
11291
11377
  }), object({ success: literal(true) }), {
11292
11378
  kind: "mutation",
11293
11379
  auth: "admin"
11380
+ }), method(object({ deviceId: number().int().nonnegative() }), object({
11381
+ derivedStreamsDeleted: array(string()).readonly(),
11382
+ assignmentsPurged: boolean(),
11383
+ probeSnapshotsDropped: number().int().nonnegative(),
11384
+ rtspTokenRowsDeleted: number().int().nonnegative()
11385
+ }), {
11386
+ kind: "mutation",
11387
+ auth: "admin"
11294
11388
  }), method(object({
11295
11389
  deviceId: number(),
11296
11390
  /** Absent = the LOWEST assigned profile — a notification attachment is
@@ -33159,6 +33253,12 @@ Object.freeze({
33159
33253
  addonId: null,
33160
33254
  access: "create"
33161
33255
  },
33256
+ "backup.cancel": {
33257
+ capName: "backup",
33258
+ capScope: "system",
33259
+ addonId: null,
33260
+ access: "create"
33261
+ },
33162
33262
  "backup.delete": {
33163
33263
  capName: "backup",
33164
33264
  capScope: "system",
@@ -33201,6 +33301,12 @@ Object.freeze({
33201
33301
  addonId: null,
33202
33302
  access: "view"
33203
33303
  },
33304
+ "backup.listRuns": {
33305
+ capName: "backup",
33306
+ capScope: "system",
33307
+ addonId: null,
33308
+ access: "view"
33309
+ },
33204
33310
  "backup.listSchedules": {
33205
33311
  capName: "backup",
33206
33312
  capScope: "system",
@@ -37767,6 +37873,12 @@ Object.freeze({
37767
37873
  addonId: null,
37768
37874
  access: "create"
37769
37875
  },
37876
+ "streamBroker.forgetDeviceHardware": {
37877
+ capName: "stream-broker",
37878
+ capScope: "system",
37879
+ addonId: null,
37880
+ access: "delete"
37881
+ },
37770
37882
  "streamBroker.getAllRtspEntries": {
37771
37883
  capName: "stream-broker",
37772
37884
  capScope: "system",
@@ -40225,6 +40337,11 @@ Object.freeze({
40225
40337
  form: "single",
40226
40338
  optional: false
40227
40339
  }],
40340
+ "streamBroker.forgetDeviceHardware": [{
40341
+ name: "deviceId",
40342
+ form: "single",
40343
+ optional: false
40344
+ }],
40228
40345
  "streamBroker.getDeviceAudioMute": [{
40229
40346
  name: "deviceId",
40230
40347
  form: "single",
package/dist/addon.mjs CHANGED
@@ -10526,6 +10526,89 @@ var LocationStatSchema = object({
10526
10526
  fileCount: number(),
10527
10527
  present: boolean()
10528
10528
  });
10529
+ /** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
10530
+ var BackupRunStateSchema = _enum([
10531
+ "queued",
10532
+ "running",
10533
+ "succeeded",
10534
+ "failed",
10535
+ "cancelled"
10536
+ ]);
10537
+ /**
10538
+ * Where a running backup currently is. `queued` before it starts,
10539
+ * `building` while the tar.gz is being staged, `uploading` during the
10540
+ * per-destination fan-out, `done` once terminal.
10541
+ */
10542
+ var BackupRunPhaseSchema = _enum([
10543
+ "queued",
10544
+ "building",
10545
+ "uploading",
10546
+ "done"
10547
+ ]);
10548
+ /**
10549
+ * Observable state of one backup run — readable WHILE it runs via
10550
+ * `backup.listRuns`. This is what makes the execution queue and
10551
+ * `backup.cancel` usable: the 2026-09-04 incident (two concurrent
10552
+ * multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
10553
+ * diagnosable with `du` because nothing reported that runs existed or
10554
+ * how large the staged archive had grown.
10555
+ */
10556
+ var BackupRunSchema = object({
10557
+ /** Stable run id — the handle `backup.cancel` takes. */
10558
+ id: string(),
10559
+ state: BackupRunStateSchema,
10560
+ phase: BackupRunPhaseSchema,
10561
+ /**
10562
+ * Resolved destination location ids. Empty while queued (targets are
10563
+ * resolved when the run starts, against the then-current policies).
10564
+ */
10565
+ destinationIds: array(string()).readonly(),
10566
+ label: string().optional(),
10567
+ /** ms-epoch when the run was submitted (trigger call / schedule fire). */
10568
+ requestedAt: number(),
10569
+ /** ms-epoch when the run left the queue and started building. */
10570
+ startedAt: number().optional(),
10571
+ /** ms-epoch when the run reached a terminal state. */
10572
+ finishedAt: number().optional(),
10573
+ /** Compressed bytes of the staging archive written so far. */
10574
+ stagedBytes: number(),
10575
+ /** Final staged archive size, once the build phase completes. */
10576
+ archiveSizeBytes: number().optional(),
10577
+ /** Bytes pushed to the destination currently uploading. */
10578
+ uploadedBytes: number(),
10579
+ /** Destinations where the archive fully landed (uploaded + indexed). */
10580
+ completedDestinationIds: array(string()).readonly(),
10581
+ /** Destinations that failed during the fan-out. */
10582
+ failedDestinationIds: array(string()).readonly(),
10583
+ /** Failure message when `state === 'failed'`. */
10584
+ error: string().optional(),
10585
+ /**
10586
+ * 1-based place in the execution queue — 1 = runs next. Present only
10587
+ * while `state === 'queued'`. Stamped by the orchestrator from the
10588
+ * queue's OWN pending order, never derived from timestamps, so the
10589
+ * UI cannot show an order the executor will not honour.
10590
+ */
10591
+ queuePosition: number().int().min(1).optional()
10592
+ });
10593
+ /**
10594
+ * Result of `backup.trigger`. The call still resolves when the run
10595
+ * terminates (compat with schedule-driven runs and the admin UI), but
10596
+ * it now names the run and says whether it had to WAIT: a trigger that
10597
+ * arrives while another run is in flight is enqueued (or joined onto
10598
+ * an identical already-queued run), never started concurrently.
10599
+ */
10600
+ var BackupTriggerResultSchema = object({
10601
+ /** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
10602
+ runId: string(),
10603
+ /** True when the run waited behind an in-flight run instead of starting immediately. */
10604
+ queued: boolean(),
10605
+ /** True when this trigger was coalesced onto an identical already-queued run. */
10606
+ joined: boolean(),
10607
+ /** True when the run was cancelled before completing every destination. */
10608
+ cancelled: boolean(),
10609
+ /** One entry per destination the archive landed at (partial on cancel). */
10610
+ entries: array(BackupEntrySchema).readonly()
10611
+ });
10529
10612
  /**
10530
10613
  * A backup schedule — the N:M "entry" that binds one cron cadence to a
10531
10614
  * SET of destination locations. Supersedes the per-location cron on
@@ -10573,7 +10656,10 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
10573
10656
  * retention (manual runs).
10574
10657
  */
10575
10658
  retentionCount: number().int().min(1).max(1e3).optional()
10576
- }).optional(), array(BackupEntrySchema).readonly(), {
10659
+ }).optional(), BackupTriggerResultSchema, {
10660
+ kind: "mutation",
10661
+ auth: "admin"
10662
+ }), method(_void(), array(BackupRunSchema).readonly(), { auth: "admin" }), method(object({ runId: string() }), object({ cancelled: boolean() }), {
10577
10663
  kind: "mutation",
10578
10664
  auth: "admin"
10579
10665
  }), method(_void(), array(BackupEntrySchema).readonly(), { auth: "admin" }), method(_void(), array(LocationStatSchema).readonly(), { auth: "admin" }), method(object({
@@ -11290,6 +11376,14 @@ method(object({
11290
11376
  }), object({ success: literal(true) }), {
11291
11377
  kind: "mutation",
11292
11378
  auth: "admin"
11379
+ }), method(object({ deviceId: number().int().nonnegative() }), object({
11380
+ derivedStreamsDeleted: array(string()).readonly(),
11381
+ assignmentsPurged: boolean(),
11382
+ probeSnapshotsDropped: number().int().nonnegative(),
11383
+ rtspTokenRowsDeleted: number().int().nonnegative()
11384
+ }), {
11385
+ kind: "mutation",
11386
+ auth: "admin"
11293
11387
  }), method(object({
11294
11388
  deviceId: number(),
11295
11389
  /** Absent = the LOWEST assigned profile — a notification attachment is
@@ -33158,6 +33252,12 @@ Object.freeze({
33158
33252
  addonId: null,
33159
33253
  access: "create"
33160
33254
  },
33255
+ "backup.cancel": {
33256
+ capName: "backup",
33257
+ capScope: "system",
33258
+ addonId: null,
33259
+ access: "create"
33260
+ },
33161
33261
  "backup.delete": {
33162
33262
  capName: "backup",
33163
33263
  capScope: "system",
@@ -33200,6 +33300,12 @@ Object.freeze({
33200
33300
  addonId: null,
33201
33301
  access: "view"
33202
33302
  },
33303
+ "backup.listRuns": {
33304
+ capName: "backup",
33305
+ capScope: "system",
33306
+ addonId: null,
33307
+ access: "view"
33308
+ },
33203
33309
  "backup.listSchedules": {
33204
33310
  capName: "backup",
33205
33311
  capScope: "system",
@@ -37766,6 +37872,12 @@ Object.freeze({
37766
37872
  addonId: null,
37767
37873
  access: "create"
37768
37874
  },
37875
+ "streamBroker.forgetDeviceHardware": {
37876
+ capName: "stream-broker",
37877
+ capScope: "system",
37878
+ addonId: null,
37879
+ access: "delete"
37880
+ },
37769
37881
  "streamBroker.getAllRtspEntries": {
37770
37882
  capName: "stream-broker",
37771
37883
  capScope: "system",
@@ -40224,6 +40336,11 @@ Object.freeze({
40224
40336
  form: "single",
40225
40337
  optional: false
40226
40338
  }],
40339
+ "streamBroker.forgetDeviceHardware": [{
40340
+ name: "deviceId",
40341
+ form: "single",
40342
+ optional: false
40343
+ }],
40227
40344
  "streamBroker.getDeviceAudioMute": [{
40228
40345
  name: "deviceId",
40229
40346
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-unifi",
3
- "version": "0.2.58",
3
+ "version": "0.2.59",
4
4
  "description": "UniFi Network controller device-provider addon for CamStack — local-controller infra switches/APs (as containers) + network-client presence. NO cameras/Protect.",
5
5
  "keywords": [
6
6
  "camstack",