@camstack/addon-export-hap 1.2.69 → 1.2.71

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
@@ -13301,7 +13395,10 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
13301
13395
  id: string(),
13302
13396
  name: string(),
13303
13397
  type: string()
13304
- }))), method(object({}), boolean()), method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
13398
+ }))), method(object({ stableId: string() }), object({ deviceId: number() }), {
13399
+ kind: "mutation",
13400
+ timeoutMs: 3 * 6e4
13401
+ }), method(object({}), boolean()), method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
13305
13402
  kind: "mutation",
13306
13403
  auth: "admin"
13307
13404
  }), method(object({}), CreationSchemaOutputSchema), method(object({}), object({ deviceType: _enum(DeviceType).nullable() })), method(object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
@@ -13582,7 +13679,8 @@ method(object({
13582
13679
  targetId: number()
13583
13680
  }), MigrateDeviceResultSchema, {
13584
13681
  kind: "mutation",
13585
- auth: "admin"
13682
+ auth: "admin",
13683
+ timeoutMs: 12 * 6e4
13586
13684
  }), method(DeviceRegisterPayloadSchema, _void(), { kind: "mutation" }), method(DeviceRemovePayloadSchema, _void(), { kind: "mutation" }), method(DevicePersistConfigPayloadSchema, _void(), { kind: "mutation" }), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), DeviceMetaSchema.nullable()), method(object({
13587
13685
  deviceId: number(),
13588
13686
  name: string()
@@ -30260,6 +30358,12 @@ Object.freeze({
30260
30358
  addonId: null,
30261
30359
  access: "create"
30262
30360
  },
30361
+ "backup.cancel": {
30362
+ capName: "backup",
30363
+ capScope: "system",
30364
+ addonId: null,
30365
+ access: "create"
30366
+ },
30263
30367
  "backup.delete": {
30264
30368
  capName: "backup",
30265
30369
  capScope: "system",
@@ -30302,6 +30406,12 @@ Object.freeze({
30302
30406
  addonId: null,
30303
30407
  access: "view"
30304
30408
  },
30409
+ "backup.listRuns": {
30410
+ capName: "backup",
30411
+ capScope: "system",
30412
+ addonId: null,
30413
+ access: "view"
30414
+ },
30305
30415
  "backup.listSchedules": {
30306
30416
  capName: "backup",
30307
30417
  capScope: "system",
@@ -31502,6 +31612,12 @@ Object.freeze({
31502
31612
  addonId: null,
31503
31613
  access: "view"
31504
31614
  },
31615
+ "deviceProvider.reloadDevice": {
31616
+ capName: "device-provider",
31617
+ capScope: "system",
31618
+ addonId: null,
31619
+ access: "create"
31620
+ },
31505
31621
  "deviceProvider.start": {
31506
31622
  capName: "device-provider",
31507
31623
  capScope: "system",
@@ -34868,6 +34984,12 @@ Object.freeze({
34868
34984
  addonId: null,
34869
34985
  access: "create"
34870
34986
  },
34987
+ "streamBroker.forgetDeviceHardware": {
34988
+ capName: "stream-broker",
34989
+ capScope: "system",
34990
+ addonId: null,
34991
+ access: "delete"
34992
+ },
34871
34993
  "streamBroker.getAllRtspEntries": {
34872
34994
  capName: "stream-broker",
34873
34995
  capScope: "system",
@@ -37326,6 +37448,11 @@ Object.freeze({
37326
37448
  form: "single",
37327
37449
  optional: false
37328
37450
  }],
37451
+ "streamBroker.forgetDeviceHardware": [{
37452
+ name: "deviceId",
37453
+ form: "single",
37454
+ optional: false
37455
+ }],
37329
37456
  "streamBroker.getDeviceAudioMute": [{
37330
37457
  name: "deviceId",
37331
37458
  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
@@ -13289,7 +13383,10 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
13289
13383
  id: string(),
13290
13384
  name: string(),
13291
13385
  type: string()
13292
- }))), method(object({}), boolean()), method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
13386
+ }))), method(object({ stableId: string() }), object({ deviceId: number() }), {
13387
+ kind: "mutation",
13388
+ timeoutMs: 3 * 6e4
13389
+ }), method(object({}), boolean()), method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
13293
13390
  kind: "mutation",
13294
13391
  auth: "admin"
13295
13392
  }), method(object({}), CreationSchemaOutputSchema), method(object({}), object({ deviceType: _enum(DeviceType).nullable() })), method(object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
@@ -13570,7 +13667,8 @@ method(object({
13570
13667
  targetId: number()
13571
13668
  }), MigrateDeviceResultSchema, {
13572
13669
  kind: "mutation",
13573
- auth: "admin"
13670
+ auth: "admin",
13671
+ timeoutMs: 12 * 6e4
13574
13672
  }), method(DeviceRegisterPayloadSchema, _void(), { kind: "mutation" }), method(DeviceRemovePayloadSchema, _void(), { kind: "mutation" }), method(DevicePersistConfigPayloadSchema, _void(), { kind: "mutation" }), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), DeviceMetaSchema.nullable()), method(object({
13575
13673
  deviceId: number(),
13576
13674
  name: string()
@@ -30248,6 +30346,12 @@ Object.freeze({
30248
30346
  addonId: null,
30249
30347
  access: "create"
30250
30348
  },
30349
+ "backup.cancel": {
30350
+ capName: "backup",
30351
+ capScope: "system",
30352
+ addonId: null,
30353
+ access: "create"
30354
+ },
30251
30355
  "backup.delete": {
30252
30356
  capName: "backup",
30253
30357
  capScope: "system",
@@ -30290,6 +30394,12 @@ Object.freeze({
30290
30394
  addonId: null,
30291
30395
  access: "view"
30292
30396
  },
30397
+ "backup.listRuns": {
30398
+ capName: "backup",
30399
+ capScope: "system",
30400
+ addonId: null,
30401
+ access: "view"
30402
+ },
30293
30403
  "backup.listSchedules": {
30294
30404
  capName: "backup",
30295
30405
  capScope: "system",
@@ -31490,6 +31600,12 @@ Object.freeze({
31490
31600
  addonId: null,
31491
31601
  access: "view"
31492
31602
  },
31603
+ "deviceProvider.reloadDevice": {
31604
+ capName: "device-provider",
31605
+ capScope: "system",
31606
+ addonId: null,
31607
+ access: "create"
31608
+ },
31493
31609
  "deviceProvider.start": {
31494
31610
  capName: "device-provider",
31495
31611
  capScope: "system",
@@ -34856,6 +34972,12 @@ Object.freeze({
34856
34972
  addonId: null,
34857
34973
  access: "create"
34858
34974
  },
34975
+ "streamBroker.forgetDeviceHardware": {
34976
+ capName: "stream-broker",
34977
+ capScope: "system",
34978
+ addonId: null,
34979
+ access: "delete"
34980
+ },
34859
34981
  "streamBroker.getAllRtspEntries": {
34860
34982
  capName: "stream-broker",
34861
34983
  capScope: "system",
@@ -37314,6 +37436,11 @@ Object.freeze({
37314
37436
  form: "single",
37315
37437
  optional: false
37316
37438
  }],
37439
+ "streamBroker.forgetDeviceHardware": [{
37440
+ name: "deviceId",
37441
+ form: "single",
37442
+ optional: false
37443
+ }],
37317
37444
  "streamBroker.getDeviceAudioMute": [{
37318
37445
  name: "deviceId",
37319
37446
  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.71",
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",