@camstack/addon-export-hap 1.2.69 → 1.2.70

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.
@@ -11247,6 +11247,89 @@ var LocationStatSchema = object({
11247
11247
  fileCount: number(),
11248
11248
  present: boolean()
11249
11249
  });
11250
+ /** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
11251
+ var BackupRunStateSchema = _enum([
11252
+ "queued",
11253
+ "running",
11254
+ "succeeded",
11255
+ "failed",
11256
+ "cancelled"
11257
+ ]);
11258
+ /**
11259
+ * Where a running backup currently is. `queued` before it starts,
11260
+ * `building` while the tar.gz is being staged, `uploading` during the
11261
+ * per-destination fan-out, `done` once terminal.
11262
+ */
11263
+ var BackupRunPhaseSchema = _enum([
11264
+ "queued",
11265
+ "building",
11266
+ "uploading",
11267
+ "done"
11268
+ ]);
11269
+ /**
11270
+ * Observable state of one backup run — readable WHILE it runs via
11271
+ * `backup.listRuns`. This is what makes the execution queue and
11272
+ * `backup.cancel` usable: the 2026-09-04 incident (two concurrent
11273
+ * multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
11274
+ * diagnosable with `du` because nothing reported that runs existed or
11275
+ * how large the staged archive had grown.
11276
+ */
11277
+ var BackupRunSchema = object({
11278
+ /** Stable run id — the handle `backup.cancel` takes. */
11279
+ id: string(),
11280
+ state: BackupRunStateSchema,
11281
+ phase: BackupRunPhaseSchema,
11282
+ /**
11283
+ * Resolved destination location ids. Empty while queued (targets are
11284
+ * resolved when the run starts, against the then-current policies).
11285
+ */
11286
+ destinationIds: array(string()).readonly(),
11287
+ label: string().optional(),
11288
+ /** ms-epoch when the run was submitted (trigger call / schedule fire). */
11289
+ requestedAt: number(),
11290
+ /** ms-epoch when the run left the queue and started building. */
11291
+ startedAt: number().optional(),
11292
+ /** ms-epoch when the run reached a terminal state. */
11293
+ finishedAt: number().optional(),
11294
+ /** Compressed bytes of the staging archive written so far. */
11295
+ stagedBytes: number(),
11296
+ /** Final staged archive size, once the build phase completes. */
11297
+ archiveSizeBytes: number().optional(),
11298
+ /** Bytes pushed to the destination currently uploading. */
11299
+ uploadedBytes: number(),
11300
+ /** Destinations where the archive fully landed (uploaded + indexed). */
11301
+ completedDestinationIds: array(string()).readonly(),
11302
+ /** Destinations that failed during the fan-out. */
11303
+ failedDestinationIds: array(string()).readonly(),
11304
+ /** Failure message when `state === 'failed'`. */
11305
+ error: string().optional(),
11306
+ /**
11307
+ * 1-based place in the execution queue — 1 = runs next. Present only
11308
+ * while `state === 'queued'`. Stamped by the orchestrator from the
11309
+ * queue's OWN pending order, never derived from timestamps, so the
11310
+ * UI cannot show an order the executor will not honour.
11311
+ */
11312
+ queuePosition: number().int().min(1).optional()
11313
+ });
11314
+ /**
11315
+ * Result of `backup.trigger`. The call still resolves when the run
11316
+ * terminates (compat with schedule-driven runs and the admin UI), but
11317
+ * it now names the run and says whether it had to WAIT: a trigger that
11318
+ * arrives while another run is in flight is enqueued (or joined onto
11319
+ * an identical already-queued run), never started concurrently.
11320
+ */
11321
+ var BackupTriggerResultSchema = object({
11322
+ /** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
11323
+ runId: string(),
11324
+ /** True when the run waited behind an in-flight run instead of starting immediately. */
11325
+ queued: boolean(),
11326
+ /** True when this trigger was coalesced onto an identical already-queued run. */
11327
+ joined: boolean(),
11328
+ /** True when the run was cancelled before completing every destination. */
11329
+ cancelled: boolean(),
11330
+ /** One entry per destination the archive landed at (partial on cancel). */
11331
+ entries: array(BackupEntrySchema).readonly()
11332
+ });
11250
11333
  /**
11251
11334
  * A backup schedule — the N:M "entry" that binds one cron cadence to a
11252
11335
  * SET of destination locations. Supersedes the per-location cron on
@@ -11294,7 +11377,10 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
11294
11377
  * retention (manual runs).
11295
11378
  */
11296
11379
  retentionCount: number().int().min(1).max(1e3).optional()
11297
- }).optional(), array(BackupEntrySchema).readonly(), {
11380
+ }).optional(), BackupTriggerResultSchema, {
11381
+ kind: "mutation",
11382
+ auth: "admin"
11383
+ }), method(_void(), array(BackupRunSchema).readonly(), { auth: "admin" }), method(object({ runId: string() }), object({ cancelled: boolean() }), {
11298
11384
  kind: "mutation",
11299
11385
  auth: "admin"
11300
11386
  }), method(_void(), array(BackupEntrySchema).readonly(), { auth: "admin" }), method(_void(), array(LocationStatSchema).readonly(), { auth: "admin" }), method(object({
@@ -12011,6 +12097,14 @@ method(object({
12011
12097
  }), object({ success: literal(true) }), {
12012
12098
  kind: "mutation",
12013
12099
  auth: "admin"
12100
+ }), method(object({ deviceId: number().int().nonnegative() }), object({
12101
+ derivedStreamsDeleted: array(string()).readonly(),
12102
+ assignmentsPurged: boolean(),
12103
+ probeSnapshotsDropped: number().int().nonnegative(),
12104
+ rtspTokenRowsDeleted: number().int().nonnegative()
12105
+ }), {
12106
+ kind: "mutation",
12107
+ auth: "admin"
12014
12108
  }), method(object({
12015
12109
  deviceId: number(),
12016
12110
  /** Absent = the LOWEST assigned profile — a notification attachment is
@@ -30260,6 +30354,12 @@ Object.freeze({
30260
30354
  addonId: null,
30261
30355
  access: "create"
30262
30356
  },
30357
+ "backup.cancel": {
30358
+ capName: "backup",
30359
+ capScope: "system",
30360
+ addonId: null,
30361
+ access: "create"
30362
+ },
30263
30363
  "backup.delete": {
30264
30364
  capName: "backup",
30265
30365
  capScope: "system",
@@ -30302,6 +30402,12 @@ Object.freeze({
30302
30402
  addonId: null,
30303
30403
  access: "view"
30304
30404
  },
30405
+ "backup.listRuns": {
30406
+ capName: "backup",
30407
+ capScope: "system",
30408
+ addonId: null,
30409
+ access: "view"
30410
+ },
30305
30411
  "backup.listSchedules": {
30306
30412
  capName: "backup",
30307
30413
  capScope: "system",
@@ -34868,6 +34974,12 @@ Object.freeze({
34868
34974
  addonId: null,
34869
34975
  access: "create"
34870
34976
  },
34977
+ "streamBroker.forgetDeviceHardware": {
34978
+ capName: "stream-broker",
34979
+ capScope: "system",
34980
+ addonId: null,
34981
+ access: "delete"
34982
+ },
34871
34983
  "streamBroker.getAllRtspEntries": {
34872
34984
  capName: "stream-broker",
34873
34985
  capScope: "system",
@@ -37326,6 +37438,11 @@ Object.freeze({
37326
37438
  form: "single",
37327
37439
  optional: false
37328
37440
  }],
37441
+ "streamBroker.forgetDeviceHardware": [{
37442
+ name: "deviceId",
37443
+ form: "single",
37444
+ optional: false
37445
+ }],
37329
37446
  "streamBroker.getDeviceAudioMute": [{
37330
37447
  name: "deviceId",
37331
37448
  form: "single",
@@ -11235,6 +11235,89 @@ var LocationStatSchema = object({
11235
11235
  fileCount: number(),
11236
11236
  present: boolean()
11237
11237
  });
11238
+ /** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
11239
+ var BackupRunStateSchema = _enum([
11240
+ "queued",
11241
+ "running",
11242
+ "succeeded",
11243
+ "failed",
11244
+ "cancelled"
11245
+ ]);
11246
+ /**
11247
+ * Where a running backup currently is. `queued` before it starts,
11248
+ * `building` while the tar.gz is being staged, `uploading` during the
11249
+ * per-destination fan-out, `done` once terminal.
11250
+ */
11251
+ var BackupRunPhaseSchema = _enum([
11252
+ "queued",
11253
+ "building",
11254
+ "uploading",
11255
+ "done"
11256
+ ]);
11257
+ /**
11258
+ * Observable state of one backup run — readable WHILE it runs via
11259
+ * `backup.listRuns`. This is what makes the execution queue and
11260
+ * `backup.cancel` usable: the 2026-09-04 incident (two concurrent
11261
+ * multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
11262
+ * diagnosable with `du` because nothing reported that runs existed or
11263
+ * how large the staged archive had grown.
11264
+ */
11265
+ var BackupRunSchema = object({
11266
+ /** Stable run id — the handle `backup.cancel` takes. */
11267
+ id: string(),
11268
+ state: BackupRunStateSchema,
11269
+ phase: BackupRunPhaseSchema,
11270
+ /**
11271
+ * Resolved destination location ids. Empty while queued (targets are
11272
+ * resolved when the run starts, against the then-current policies).
11273
+ */
11274
+ destinationIds: array(string()).readonly(),
11275
+ label: string().optional(),
11276
+ /** ms-epoch when the run was submitted (trigger call / schedule fire). */
11277
+ requestedAt: number(),
11278
+ /** ms-epoch when the run left the queue and started building. */
11279
+ startedAt: number().optional(),
11280
+ /** ms-epoch when the run reached a terminal state. */
11281
+ finishedAt: number().optional(),
11282
+ /** Compressed bytes of the staging archive written so far. */
11283
+ stagedBytes: number(),
11284
+ /** Final staged archive size, once the build phase completes. */
11285
+ archiveSizeBytes: number().optional(),
11286
+ /** Bytes pushed to the destination currently uploading. */
11287
+ uploadedBytes: number(),
11288
+ /** Destinations where the archive fully landed (uploaded + indexed). */
11289
+ completedDestinationIds: array(string()).readonly(),
11290
+ /** Destinations that failed during the fan-out. */
11291
+ failedDestinationIds: array(string()).readonly(),
11292
+ /** Failure message when `state === 'failed'`. */
11293
+ error: string().optional(),
11294
+ /**
11295
+ * 1-based place in the execution queue — 1 = runs next. Present only
11296
+ * while `state === 'queued'`. Stamped by the orchestrator from the
11297
+ * queue's OWN pending order, never derived from timestamps, so the
11298
+ * UI cannot show an order the executor will not honour.
11299
+ */
11300
+ queuePosition: number().int().min(1).optional()
11301
+ });
11302
+ /**
11303
+ * Result of `backup.trigger`. The call still resolves when the run
11304
+ * terminates (compat with schedule-driven runs and the admin UI), but
11305
+ * it now names the run and says whether it had to WAIT: a trigger that
11306
+ * arrives while another run is in flight is enqueued (or joined onto
11307
+ * an identical already-queued run), never started concurrently.
11308
+ */
11309
+ var BackupTriggerResultSchema = object({
11310
+ /** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
11311
+ runId: string(),
11312
+ /** True when the run waited behind an in-flight run instead of starting immediately. */
11313
+ queued: boolean(),
11314
+ /** True when this trigger was coalesced onto an identical already-queued run. */
11315
+ joined: boolean(),
11316
+ /** True when the run was cancelled before completing every destination. */
11317
+ cancelled: boolean(),
11318
+ /** One entry per destination the archive landed at (partial on cancel). */
11319
+ entries: array(BackupEntrySchema).readonly()
11320
+ });
11238
11321
  /**
11239
11322
  * A backup schedule — the N:M "entry" that binds one cron cadence to a
11240
11323
  * SET of destination locations. Supersedes the per-location cron on
@@ -11282,7 +11365,10 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
11282
11365
  * retention (manual runs).
11283
11366
  */
11284
11367
  retentionCount: number().int().min(1).max(1e3).optional()
11285
- }).optional(), array(BackupEntrySchema).readonly(), {
11368
+ }).optional(), BackupTriggerResultSchema, {
11369
+ kind: "mutation",
11370
+ auth: "admin"
11371
+ }), method(_void(), array(BackupRunSchema).readonly(), { auth: "admin" }), method(object({ runId: string() }), object({ cancelled: boolean() }), {
11286
11372
  kind: "mutation",
11287
11373
  auth: "admin"
11288
11374
  }), method(_void(), array(BackupEntrySchema).readonly(), { auth: "admin" }), method(_void(), array(LocationStatSchema).readonly(), { auth: "admin" }), method(object({
@@ -11999,6 +12085,14 @@ method(object({
11999
12085
  }), object({ success: literal(true) }), {
12000
12086
  kind: "mutation",
12001
12087
  auth: "admin"
12088
+ }), method(object({ deviceId: number().int().nonnegative() }), object({
12089
+ derivedStreamsDeleted: array(string()).readonly(),
12090
+ assignmentsPurged: boolean(),
12091
+ probeSnapshotsDropped: number().int().nonnegative(),
12092
+ rtspTokenRowsDeleted: number().int().nonnegative()
12093
+ }), {
12094
+ kind: "mutation",
12095
+ auth: "admin"
12002
12096
  }), method(object({
12003
12097
  deviceId: number(),
12004
12098
  /** Absent = the LOWEST assigned profile — a notification attachment is
@@ -30248,6 +30342,12 @@ Object.freeze({
30248
30342
  addonId: null,
30249
30343
  access: "create"
30250
30344
  },
30345
+ "backup.cancel": {
30346
+ capName: "backup",
30347
+ capScope: "system",
30348
+ addonId: null,
30349
+ access: "create"
30350
+ },
30251
30351
  "backup.delete": {
30252
30352
  capName: "backup",
30253
30353
  capScope: "system",
@@ -30290,6 +30390,12 @@ Object.freeze({
30290
30390
  addonId: null,
30291
30391
  access: "view"
30292
30392
  },
30393
+ "backup.listRuns": {
30394
+ capName: "backup",
30395
+ capScope: "system",
30396
+ addonId: null,
30397
+ access: "view"
30398
+ },
30293
30399
  "backup.listSchedules": {
30294
30400
  capName: "backup",
30295
30401
  capScope: "system",
@@ -34856,6 +34962,12 @@ Object.freeze({
34856
34962
  addonId: null,
34857
34963
  access: "create"
34858
34964
  },
34965
+ "streamBroker.forgetDeviceHardware": {
34966
+ capName: "stream-broker",
34967
+ capScope: "system",
34968
+ addonId: null,
34969
+ access: "delete"
34970
+ },
34859
34971
  "streamBroker.getAllRtspEntries": {
34860
34972
  capName: "stream-broker",
34861
34973
  capScope: "system",
@@ -37314,6 +37426,11 @@ Object.freeze({
37314
37426
  form: "single",
37315
37427
  optional: false
37316
37428
  }],
37429
+ "streamBroker.forgetDeviceHardware": [{
37430
+ name: "deviceId",
37431
+ form: "single",
37432
+ optional: false
37433
+ }],
37317
37434
  "streamBroker.getDeviceAudioMute": [{
37318
37435
  name: "deviceId",
37319
37436
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-hap",
3
- "version": "1.2.69",
3
+ "version": "1.2.70",
4
4
  "description": "HomeKit (HAP) exporter for CamStack devices. Publishes each exposed device as its own HomeKit accessory: cameras and doorbells with SRTP streaming, HomeKit Secure Video, motion, two-way audio, PTZ and battery; switches, lights, locks and sensors through a capability→service table.",
5
5
  "keywords": [
6
6
  "camstack",