@camstack/server 1.2.936 → 1.2.938

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.
Files changed (149) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/api/core/api-catalog.js +4 -0
  3. package/dist/api/trpc/generated-cap-routers.js +8 -0
  4. package/package.json +11 -9
  5. package/system/dist/{addon-pages.cap-Df9FQwN1.js → addon-pages.cap-B3gHFDYW.js} +4 -2
  6. package/system/dist/{addon-pages.cap-DksUlE8j.mjs → addon-pages.cap-BLNN6ypr.mjs} +4 -2
  7. package/system/dist/{addon-settings.cap-3-TIIMq_.mjs → addon-settings.cap-CZ4MC7ha.mjs} +9 -1
  8. package/system/dist/{addon-settings.cap-DAiE0Nb0.js → addon-settings.cap-DrLdMFIe.js} +9 -1
  9. package/system/dist/{addon-widgets.cap-D9m48X78.mjs → addon-widgets.cap-BbmWMzIH.mjs} +4 -2
  10. package/system/dist/{addon-widgets.cap-C4jxflbF.js → addon-widgets.cap-DuCe2VRj.js} +4 -2
  11. package/system/dist/{base-device-Bwiblqmn.mjs → base-device-BcGO6LTT.mjs} +2 -2
  12. package/system/dist/{base-device-C1z4zYGR.js → base-device-CH8rfD9j.js} +2 -2
  13. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  14. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  15. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  16. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  17. package/system/dist/builtins/alerts/alerts.addon.js +2 -2
  18. package/system/dist/builtins/alerts/alerts.addon.mjs +2 -2
  19. package/system/dist/builtins/autotrack/index.js +1 -1
  20. package/system/dist/builtins/autotrack/index.mjs +1 -1
  21. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  22. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  23. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  24. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  25. package/system/dist/builtins/camera-grid/index.js +4 -4
  26. package/system/dist/builtins/camera-grid/index.mjs +4 -4
  27. package/system/dist/builtins/composer/composer.addon.js +8 -8
  28. package/system/dist/builtins/composer/composer.addon.mjs +8 -8
  29. package/system/dist/builtins/console-logging/index.js +1 -1
  30. package/system/dist/builtins/console-logging/index.mjs +1 -1
  31. package/system/dist/builtins/core-blocks/core-blocks.addon.js +11 -11
  32. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +11 -11
  33. package/system/dist/builtins/core-notifier/core-notifier.addon.js +3 -3
  34. package/system/dist/builtins/core-notifier/core-notifier.addon.mjs +3 -3
  35. package/system/dist/builtins/device-history/device-history.addon.js +3 -3
  36. package/system/dist/builtins/device-history/device-history.addon.mjs +3 -3
  37. package/system/dist/builtins/device-manager/device-manager.addon.js +16 -9
  38. package/system/dist/builtins/device-manager/device-manager.addon.mjs +16 -9
  39. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  40. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  41. package/system/dist/builtins/keychain/index.js +1 -1
  42. package/system/dist/builtins/keychain/index.mjs +1 -1
  43. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  44. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  45. package/system/dist/builtins/local-auth/local-auth.addon.js +1 -1
  46. package/system/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  47. package/system/dist/builtins/local-network/local-network.addon.js +2 -2
  48. package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
  49. package/system/dist/builtins/loki-logging/index.js +3 -3
  50. package/system/dist/builtins/loki-logging/index.mjs +3 -3
  51. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  52. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  53. package/system/dist/builtins/platform-probe/index.js +1 -1
  54. package/system/dist/builtins/platform-probe/index.mjs +1 -1
  55. package/system/dist/builtins/record-entries/index.js +1 -1
  56. package/system/dist/builtins/record-entries/index.mjs +1 -1
  57. package/system/dist/builtins/snapshot/index.js +2 -2
  58. package/system/dist/builtins/snapshot/index.mjs +2 -2
  59. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  60. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  61. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  62. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  63. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +7 -7
  64. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +7 -7
  65. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +3 -3
  66. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +3 -3
  67. package/system/dist/builtins/winston-logging/index.js +2 -2
  68. package/system/dist/builtins/winston-logging/index.mjs +2 -2
  69. package/system/dist/{calendars.cap-CaFlShS9.js → calendars.cap-CGeOtL7Q.js} +7 -1
  70. package/system/dist/{calendars.cap-_C4eD4fi.mjs → calendars.cap-DQc6Q6qS.mjs} +7 -1
  71. package/system/dist/{capability-definition-HCmTem8c.js → capability-definition-BEVd01Xj.js} +9 -4
  72. package/system/dist/{capability-definition-C2rJdVeX.mjs → capability-definition-C1TLUVJR.mjs} +9 -4
  73. package/system/dist/{capture-engine-DiwbjoWp.mjs → capture-engine-CUZ3W0oZ.mjs} +1 -1
  74. package/system/dist/{capture-engine-DZ0LIUqA.js → capture-engine-mtDXEBAq.js} +1 -1
  75. package/system/dist/{composition-sources-BtUx1MfU.js → composition-sources-DCi-ldEb.js} +2 -2
  76. package/system/dist/{composition-sources-B0QW4g86.mjs → composition-sources-DgayqgHH.mjs} +2 -2
  77. package/system/dist/{core-blocks.cap-CnwBuf7E.mjs → core-blocks.cap-CWKQSevR.mjs} +38 -3
  78. package/system/dist/{core-blocks.cap-DlEuHq-S.js → core-blocks.cap-yLx6soaY.js} +38 -3
  79. package/system/dist/{database-snapshot.cap-DF38e-0P.js → database-snapshot.cap-BNS5c60M.js} +2 -2
  80. package/system/dist/{database-snapshot.cap-dhrc9xnY.mjs → database-snapshot.cap-a3lSf4hl.mjs} +2 -2
  81. package/system/dist/{device-manager.cap-CFZSPfUh.mjs → device-manager.cap-DIBK62-r.mjs} +14 -3
  82. package/system/dist/{device-manager.cap-2abwVLCM.js → device-manager.cap-DyHOIh5T.js} +14 -3
  83. package/system/dist/{device-provider.cap-D7TV2kVH.js → device-provider.cap-BKUGJSo0.js} +9 -1
  84. package/system/dist/{device-provider.cap-3Uvk6f5-.mjs → device-provider.cap-DU6HMUXH.mjs} +9 -1
  85. package/system/dist/{device-row-store-YF3jtmkk.mjs → device-row-store-C-_R-h1Z.mjs} +1 -1
  86. package/system/dist/{device-row-store-doTfMOqn.js → device-row-store-O4mNbp5q.js} +1 -1
  87. package/system/dist/{device-transitions.cap-DojcwEuX.mjs → device-transitions.cap-DCXP3zwY.mjs} +7 -1
  88. package/system/dist/{device-transitions.cap-B5w5PYU_.js → device-transitions.cap-zOGvAIHz.js} +7 -1
  89. package/system/dist/{error.cap-BCqzFlo2.js → error.cap-BxLEHP6z.js} +1 -1
  90. package/system/dist/{error.cap-5zNPAgU2.mjs → error.cap-DCwbIGEF.mjs} +1 -1
  91. package/system/dist/file-host-worker.js +1 -1
  92. package/system/dist/file-host-worker.mjs +1 -1
  93. package/system/dist/index.js +7 -7
  94. package/system/dist/index.mjs +7 -7
  95. package/system/dist/{integration-instances.cap-Cl9O-k4h.mjs → integration-instances.cap-BWttO42A.mjs} +10 -1
  96. package/system/dist/{integration-instances.cap-dJIxg2_s.js → integration-instances.cap-DSieF1w3.js} +10 -1
  97. package/system/dist/{keychain-admin.cap-GtM7gVGG.mjs → keychain-admin.cap-DOvL8TMG.mjs} +5 -1
  98. package/system/dist/{keychain-admin.cap-Db_oFX4H.js → keychain-admin.cap-DcRCRWtu.js} +5 -1
  99. package/system/dist/{log-destination.cap-DELPJkZ0.js → log-destination.cap-BzTWMj-T.js} +4 -1
  100. package/system/dist/{log-destination.cap-CxZzAVaR.mjs → log-destination.cap-QYMJPJwK.mjs} +4 -1
  101. package/system/dist/{low-power-sleep.cap-7lfVU41N.js → low-power-sleep.cap-B6mz6ojP.js} +1 -1
  102. package/system/dist/{low-power-sleep.cap-tGPmaZ_V.mjs → low-power-sleep.cap-C3Vi8Vxj.mjs} +1 -1
  103. package/system/dist/{metrics-provider.cap-BNmcHDkQ.mjs → metrics-provider.cap-01SwpLu5.mjs} +1 -1
  104. package/system/dist/{metrics-provider.cap-BcmQUt6l.js → metrics-provider.cap-BMKD5FH3.js} +1 -1
  105. package/system/dist/{migration-BMjgkyG2.js → migration-BOQlFZCN.js} +1 -1
  106. package/system/dist/{migration-DRJAtdy7.mjs → migration-DGAc6ywR.mjs} +1 -1
  107. package/system/dist/{network-access.cap-B5TWLDCC.js → network-access.cap-BEN_uRVb.js} +12 -2
  108. package/system/dist/{network-access.cap-BJnGbE6n.mjs → network-access.cap-Dy8FNNVs.mjs} +12 -2
  109. package/system/dist/{notification-rules.cap-DUmiMBQB.mjs → notification-rules.cap-0vVvsxQ1.mjs} +14 -1
  110. package/system/dist/{notification-rules.cap-BDh0LDhV.js → notification-rules.cap-Drwz-A4n.js} +14 -1
  111. package/system/dist/{notification-targets-CRH-9Dy5.js → notification-targets-Cc_3OBH9.js} +1 -1
  112. package/system/dist/{notification-targets-DaNE-pIt.mjs → notification-targets-DR-D-vIt.mjs} +1 -1
  113. package/system/dist/{platform-probe.cap-1WrMhWHx.js → platform-probe.cap-C0N9CugQ.js} +5 -1
  114. package/system/dist/{platform-probe.cap-BFeqFLtQ.mjs → platform-probe.cap-DzZ7xUfS.mjs} +5 -1
  115. package/system/dist/{prefix-walk-DD1BM923.js → prefix-walk-BRlQiqVg.js} +2 -2
  116. package/system/dist/{prefix-walk-CRnbYJcC.mjs → prefix-walk-BrrMuJBM.mjs} +2 -2
  117. package/system/dist/{ptz-autotrack.cap-DT2GypXw.mjs → ptz-autotrack.cap-CDF6FeTK.mjs} +1 -1
  118. package/system/dist/{ptz-autotrack.cap-BW7w0zHD.js → ptz-autotrack.cap-DOz0xL0O.js} +1 -1
  119. package/system/dist/{record-entries.cap-sMUhTvTU.mjs → record-entries.cap-BINjYZ1Q.mjs} +5 -2
  120. package/system/dist/{record-entries.cap-ti1C046R.js → record-entries.cap-NYExLM0O.js} +5 -2
  121. package/system/dist/{recording-archive.cap-D7bo-QSM.js → recording-archive.cap-BPJ7kvnd.js} +6 -1
  122. package/system/dist/{recording-archive.cap-7OrIn9e5.mjs → recording-archive.cap-RHAN45fa.mjs} +6 -1
  123. package/system/dist/{records.cap-CwLT2ByG.mjs → records.cap-DRwT1JbL.mjs} +10 -1
  124. package/system/dist/{records.cap-ClcWV64i.js → records.cap-wLi7r4Hj.js} +10 -1
  125. package/system/dist/{rename-composition-block-BRgyBO25.js → rename-composition-block-D44wnN_m.js} +464 -45
  126. package/system/dist/{rename-composition-block-BYRBlx-V.mjs → rename-composition-block-SPaUkmam.mjs} +464 -45
  127. package/system/dist/{restore-archive-CjAyKpgX.mjs → restore-archive-BHkSRJYW.mjs} +2 -2
  128. package/system/dist/{restore-archive-CkTkv3Ss.js → restore-archive-DRv1bPY7.js} +2 -2
  129. package/system/dist/{settings-store.cap-wlJhCspr.js → settings-store.cap-BhOIBtO4.js} +1 -1
  130. package/system/dist/{settings-store.cap-Ci4F2zul.mjs → settings-store.cap-CaDSOqgK.mjs} +1 -1
  131. package/system/dist/{snapshot.cap-Bs8Oyaqh.mjs → snapshot.cap-BkfHpJVO.mjs} +3 -1
  132. package/system/dist/{snapshot.cap-3suPdBHV.js → snapshot.cap-Cis6JRwn.js} +3 -1
  133. package/system/dist/{storage-admin.cap-BSv1NjKJ.mjs → storage-admin.cap-Ci4QbL6P.mjs} +4 -4
  134. package/system/dist/{storage-admin.cap-he0OqvVM.js → storage-admin.cap-DqW1ol4j.js} +4 -4
  135. package/system/dist/{storage-migration.cap-CyyATY_p.js → storage-migration.cap-CDOhpCQw.js} +23 -1
  136. package/system/dist/{storage-migration.cap-D7QqGobp.mjs → storage-migration.cap-Ciw84XPm.mjs} +23 -1
  137. package/system/dist/{storage-occupancy.cap-2rmnS58Z.js → storage-occupancy.cap-B-Z8f8TZ.js} +5 -3
  138. package/system/dist/{storage-occupancy.cap-CqBztTl9.mjs → storage-occupancy.cap-B-wbMPmx.mjs} +5 -3
  139. package/system/dist/{storage-provider.cap-Bw0CfxVc.js → storage-provider.cap-B3Hm_BGM.js} +15 -1
  140. package/system/dist/{storage-provider.cap-CMeck2w4.mjs → storage-provider.cap-CnN9ULbc.mjs} +15 -1
  141. package/system/dist/{stream-catalog.cap-Bp7SkgIf.mjs → stream-catalog.cap-D1Hy19Yc.mjs} +126 -10
  142. package/system/dist/{stream-catalog.cap-D3uwePiA.js → stream-catalog.cap-D8Y-uXcy.js} +131 -9
  143. package/system/dist/{user-management.cap-DBIi77sB.mjs → user-management.cap-Ctd4c_im.mjs} +26 -1
  144. package/system/dist/{user-management.cap-B9QDu8NE.js → user-management.cap-DyVb68rY.js} +26 -1
  145. package/system/dist/{vector-store.cap-DnyfrYDn.js → vector-store.cap-DEVI-XJC.js} +6 -1
  146. package/system/dist/{vector-store.cap-h2GHWQ1t.mjs → vector-store.cap-Df60cnrJ.mjs} +6 -1
  147. package/system/dist/{wal-maintenance-BG01rOn9.mjs → wal-maintenance-O6zTzaI7.mjs} +0 -0
  148. package/system/dist/{wal-maintenance-DyrebYKF.js → wal-maintenance-mV4OR3LR.js} +0 -0
  149. package/system/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  const require_streaming_shared = require("./streaming-shared-DQwFZOSi.js");
2
2
  const require_base_addon = require("./base-addon-DD5dIfcZ.js");
3
- const require_capability_definition = require("./capability-definition-HCmTem8c.js");
3
+ const require_capability_definition = require("./capability-definition-BEVd01Xj.js");
4
4
  const require_system_reasons = require("./system-reasons-Be_k1W8g.js");
5
5
  const require_ops_log = require("./ops-log-pxt9176Z.js");
6
6
  const require_quantity = require("./quantity-lY1KiTSZ.js");
@@ -1019,6 +1019,7 @@ var motionDetectionCapability = {
1019
1019
  deviceTypes: [require_device_type.DeviceType.Camera],
1020
1020
  exposesDeviceSettings: true,
1021
1021
  methods: {
1022
+ /** Analyse a frame of a camera for motion and return the motion regions. */
1022
1023
  analyze: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({
1023
1024
  deviceId: /* @__PURE__ */ zod.z.number(),
1024
1025
  frame: /* @__PURE__ */ FrameInputSchema.optional(),
@@ -1028,11 +1029,13 @@ var motionDetectionCapability = {
1028
1029
  kind: "mutation",
1029
1030
  notOperatorFacing: "the pipeline feeds it frames — an internal stage, never called by a person"
1030
1031
  }),
1032
+ /** Forget the motion state kept for a camera. */
1031
1033
  removeCamera: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({ deviceId: /* @__PURE__ */ zod.z.number() }), /* @__PURE__ */ zod.z.void(), {
1032
1034
  role: "admin",
1033
1035
  kind: "mutation",
1034
1036
  notOperatorFacing: "pipeline housekeeping when a camera leaves"
1035
1037
  }),
1038
+ /** Reset the motion detector's state for every camera. */
1036
1039
  reset: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.void(), /* @__PURE__ */ zod.z.void(), {
1037
1040
  role: "admin",
1038
1041
  kind: "mutation",
@@ -3232,7 +3235,9 @@ var pipelineAnalyticsCapability = {
3232
3235
  deviceTypes: [require_device_type.DeviceType.Camera],
3233
3236
  exposesDeviceSettings: true,
3234
3237
  methods: {
3238
+ /** List the tracks currently active on a camera. */
3235
3239
  getActiveTracks: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({ deviceId: /* @__PURE__ */ zod.z.number() }), /* @__PURE__ */ zod.z.array(TrackSchema).readonly()),
3240
+ /** Fetch one track of a camera by its id; null when unknown. */
3236
3241
  getTrack: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({
3237
3242
  deviceId: /* @__PURE__ */ zod.z.number(),
3238
3243
  trackId: /* @__PURE__ */ zod.z.string()
@@ -3285,12 +3290,16 @@ var pipelineAnalyticsCapability = {
3285
3290
  * are not included (same contract as `listTracks`).
3286
3291
  */
3287
3292
  listRecentTracks: /* @__PURE__ */ require_capability_definition.method(RecentTracksQueryInput, RecentTracksPageSchema),
3293
+ /** Drop every active track of a camera. */
3288
3294
  clearTracks: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({ deviceId: /* @__PURE__ */ zod.z.number() }), /* @__PURE__ */ zod.z.void(), {
3289
3295
  kind: "mutation",
3290
3296
  auth: "admin"
3291
3297
  }),
3298
+ /** Query a camera's recorded motion events in a time window. */
3292
3299
  getMotionEvents: /* @__PURE__ */ require_capability_definition.method(DeviceEventQueryInput, /* @__PURE__ */ zod.z.array(MotionEventSchema).readonly()),
3300
+ /** Query a camera's recorded object-detection events in a time window. */
3293
3301
  getObjectEvents: /* @__PURE__ */ require_capability_definition.method(ObjectEventQueryInput, /* @__PURE__ */ zod.z.array(ObjectEventSchema).readonly()),
3302
+ /** Query a camera's recorded audio events in a time window. */
3294
3303
  getAudioEvents: /* @__PURE__ */ require_capability_definition.method(DeviceEventQueryInput, /* @__PURE__ */ zod.z.array(AudioEventSchema).readonly()),
3295
3304
  /**
3296
3305
  * Every event kind the device can produce: built-ins (motion + audio),
@@ -3381,6 +3390,7 @@ var pipelineAnalyticsCapability = {
3381
3390
  to: /* @__PURE__ */ zod.z.number(),
3382
3391
  limit: /* @__PURE__ */ zod.z.number().int().positive().optional()
3383
3392
  }), /* @__PURE__ */ zod.z.array(LtsBucketSchema).readonly()),
3393
+ /** Event counts per time bucket for a camera between two timestamps, for activity charts. */
3384
3394
  getEventDensity: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({
3385
3395
  deviceId: /* @__PURE__ */ zod.z.number(),
3386
3396
  since: /* @__PURE__ */ zod.z.number(),
@@ -3412,6 +3422,8 @@ var pipelineAnalyticsCapability = {
3412
3422
  bucketMs: /* @__PURE__ */ zod.z.number().int().positive()
3413
3423
  }), /* @__PURE__ */ zod.z.array(EventDensityForDeviceSchema).readonly()),
3414
3424
  /**
3425
+ * Delete a camera's motion, object and audio events older than a cutoff and report how many were removed.
3426
+ *
3415
3427
  * @deprecated Prefer `pruneTracksBefore` — the track is the ROOT of the
3416
3428
  * analytics model and retention must cascade from it (design §5.1). This
3417
3429
  * event-only prune leaves orphaned tracks/faces/plates/embeddings behind.
@@ -3683,6 +3695,7 @@ var pipelineAnalyticsCapability = {
3683
3695
  kind: "mutation",
3684
3696
  auth: "admin"
3685
3697
  }),
3698
+ /** Resume the analytics media work that was paused for a storage migration. */
3686
3699
  resumeForStorageMigration: /* @__PURE__ */ require_capability_definition.method(require_relocate.StorageMigrationLeaseInputSchema, /* @__PURE__ */ zod.z.object({ resumed: /* @__PURE__ */ zod.z.literal(true) }), {
3687
3700
  kind: "mutation",
3688
3701
  auth: "admin"
@@ -3693,11 +3706,14 @@ var pipelineAnalyticsCapability = {
3693
3706
  kind: "mutation",
3694
3707
  auth: "admin"
3695
3708
  }),
3709
+ /** Start moving analytics media to its new storage location and return the job id. */
3696
3710
  startStorageMigrationMove: /* @__PURE__ */ require_capability_definition.method(require_relocate.StorageMigrationMediaMoveInputSchema, /* @__PURE__ */ zod.z.object({ jobId: /* @__PURE__ */ zod.z.string() }), {
3697
3711
  kind: "mutation",
3698
3712
  auth: "admin"
3699
3713
  }),
3714
+ /** Progress of an analytics media move job; null when the job is unknown. */
3700
3715
  getStorageMigrationMoveStatus: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({ jobId: /* @__PURE__ */ zod.z.string() }), /* @__PURE__ */ require_relocate.RelocateJobSchema.nullable(), { auth: "admin" }),
3716
+ /** Cancel a running analytics media move job. */
3701
3717
  cancelStorageMigrationMove: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({ jobId: /* @__PURE__ */ zod.z.string() }), /* @__PURE__ */ zod.z.object({ cancelled: /* @__PURE__ */ zod.z.boolean() }), {
3702
3718
  kind: "mutation",
3703
3719
  auth: "admin"
@@ -3776,6 +3792,7 @@ var pipelineAnalyticsCapability = {
3776
3792
  kind: "mutation",
3777
3793
  auth: "admin"
3778
3794
  }),
3795
+ /** List entries of the analytics operations log (what ran, when, with what outcome). */
3779
3796
  listOpsLog: /* @__PURE__ */ require_capability_definition.method(require_ops_log.OpsLogQueryInputSchema, /* @__PURE__ */ zod.z.array(require_ops_log.OpsLogEntrySchema).readonly(), {
3780
3797
  kind: "query",
3781
3798
  auth: "admin"
@@ -3790,6 +3807,7 @@ var pipelineAnalyticsCapability = {
3790
3807
  kind: "mutation",
3791
3808
  auth: "admin"
3792
3809
  }),
3810
+ /** Status of the media space-reclaim pass. */
3793
3811
  getMediaReclaimStatus: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({}), MediaReclaimStatusSchema, {
3794
3812
  kind: "query",
3795
3813
  auth: "admin"
@@ -4219,6 +4237,7 @@ var pipelineAnalyticsCapability = {
4219
4237
  auth: "admin",
4220
4238
  timeoutMs: 6e4
4221
4239
  }),
4240
+ /** Rename a retrain collection. */
4222
4241
  renameRetrainCollection: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({
4223
4242
  id: /* @__PURE__ */ zod.z.string(),
4224
4243
  name: /* @__PURE__ */ zod.z.string().max(120)
@@ -4406,14 +4425,17 @@ var pipelineAnalyticsCapability = {
4406
4425
  * `minScore`, sorted descending by score.
4407
4426
  */
4408
4427
  searchObjectEvents: /* @__PURE__ */ require_capability_definition.method(SearchObjectEventsInput, /* @__PURE__ */ zod.z.array(ScoredObjectEventSchema).readonly(), { caller: "required" }),
4428
+ /** Delete every stored object embedding so the vector index can be rebuilt from scratch. */
4409
4429
  wipeObjectEmbeddings: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({}), WipeObjectEmbeddingsResultSchema, {
4410
4430
  kind: "mutation",
4411
4431
  auth: "admin"
4412
4432
  }),
4433
+ /** Start rebuilding the object embeddings from stored media. */
4413
4434
  rebuildObjectEmbeddings: /* @__PURE__ */ require_capability_definition.method(RebuildObjectEmbeddingsInput, RebuildObjectEmbeddingsResultSchema, {
4414
4435
  kind: "mutation",
4415
4436
  auth: "admin"
4416
4437
  }),
4438
+ /** Progress of the object-embedding rebuild. */
4417
4439
  getObjectEmbeddingRebuildStatus: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({}), RebuildStatusSchema)
4418
4440
  },
4419
4441
  events: {
@@ -4607,7 +4629,9 @@ var zonesCapability = {
4607
4629
  mode: "singleton",
4608
4630
  deviceTypes: [require_device_type.DeviceType.Camera],
4609
4631
  methods: {
4632
+ /** List the zones drawn on a camera. */
4610
4633
  listZones: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({ deviceId: /* @__PURE__ */ zod.z.number() }), /* @__PURE__ */ zod.z.array(ZoneSchema).readonly()),
4634
+ /** Add a zone to a camera. */
4611
4635
  addZone: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({
4612
4636
  deviceId: /* @__PURE__ */ zod.z.number(),
4613
4637
  zone: ZoneSchema
@@ -4615,6 +4639,7 @@ var zonesCapability = {
4615
4639
  kind: "mutation",
4616
4640
  auth: "admin"
4617
4641
  }),
4642
+ /** Remove a zone from a camera. */
4618
4643
  removeZone: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({
4619
4644
  deviceId: /* @__PURE__ */ zod.z.number(),
4620
4645
  zoneId: /* @__PURE__ */ zod.z.string()
@@ -4622,6 +4647,7 @@ var zonesCapability = {
4622
4647
  kind: "mutation",
4623
4648
  auth: "admin"
4624
4649
  }),
4650
+ /** Replace a zone's geometry and name. */
4625
4651
  updateZone: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({
4626
4652
  deviceId: /* @__PURE__ */ zod.z.number(),
4627
4653
  zone: ZoneSchema
@@ -4677,7 +4703,12 @@ var zonesCapability = {
4677
4703
  * - `pipeline` — the chosen detector plus the operator's detail steps
4678
4704
  * (faces, plates, classifiers, CLIP…), on varied frames from the bench
4679
4705
  * clip: how many parallel sessions the node carries before latency, drops,
4680
- * CPU, RAM or the event loop give out.
4706
+ * CPU, RAM or the event loop give out;
4707
+ * - `decode` — the node, no accelerator of the inference plane: an encoded
4708
+ * camera-like stream (a profile: resolution, rate, codec) served on the
4709
+ * loopback and decoded by the session decode worker a camera gets, with a
4710
+ * motion pass on its frames: how many concurrent streams keep the profile
4711
+ * frame rate inside the same CPU and RAM limits (D1078).
4681
4712
  */
4682
4713
  /** Defaults and bounds, one place. */
4683
4714
  var NODE_BENCHMARK_DEFAULTS = {
@@ -4696,8 +4727,34 @@ var NODE_BENCHMARK_DEFAULTS = {
4696
4727
  /** Candidate models per device in one run. */
4697
4728
  maxModelsPerDevice: 6
4698
4729
  };
4699
- /** The two measurements a run can make. */
4700
- var NodeBenchmarkPhaseSchema = /* @__PURE__ */ zod.z.enum(["device", "pipeline"]);
4730
+ /** The measurements a run can make. */
4731
+ var NodeBenchmarkPhaseSchema = /* @__PURE__ */ zod.z.enum([
4732
+ "device",
4733
+ "pipeline",
4734
+ "decode"
4735
+ ]);
4736
+ /** The encoded stream shape a decode measurement offers. */
4737
+ var NodeDecodeProfileSchema = /* @__PURE__ */ zod.z.object({
4738
+ width: /* @__PURE__ */ zod.z.number(),
4739
+ height: /* @__PURE__ */ zod.z.number(),
4740
+ fps: /* @__PURE__ */ zod.z.number(),
4741
+ codec: /* @__PURE__ */ zod.z.enum(["h264", "h265"])
4742
+ });
4743
+ /**
4744
+ * The camera-like streams the `decode` measurement ramps, heaviest first: a
4745
+ * 4K H.265 main stream and a 1080p H.264 one, at a camera frame rate.
4746
+ */
4747
+ var NODE_BENCH_DECODE_PROFILES = [{
4748
+ width: 3840,
4749
+ height: 2160,
4750
+ fps: 15,
4751
+ codec: "h265"
4752
+ }, {
4753
+ width: 1920,
4754
+ height: 1080,
4755
+ fps: 15,
4756
+ codec: "h264"
4757
+ }];
4701
4758
  var NodeBenchmarkDevicePlanSchema = /* @__PURE__ */ zod.z.object({
4702
4759
  /** `<backend>:<device>` — `openvino:npu`, `coreml:all`, `cpu`. */
4703
4760
  deviceKey: /* @__PURE__ */ zod.z.string().min(1),
@@ -4712,7 +4769,11 @@ var NodeBenchmarkPlanSchema = /* @__PURE__ */ zod.z.object({
4712
4769
  nodeId: /* @__PURE__ */ zod.z.string().min(1),
4713
4770
  devices: /* @__PURE__ */ zod.z.array(NodeBenchmarkDevicePlanSchema).min(1),
4714
4771
  /** Which measurements run. At least one. */
4715
- phases: /* @__PURE__ */ zod.z.array(NodeBenchmarkPhaseSchema).min(1).default(["device", "pipeline"]),
4772
+ phases: /* @__PURE__ */ zod.z.array(NodeBenchmarkPhaseSchema).min(1).default([
4773
+ "device",
4774
+ "pipeline",
4775
+ "decode"
4776
+ ]),
4716
4777
  /**
4717
4778
  * Detail steps (catalog step ids under the root: faces, plates,
4718
4779
  * classifiers, CLIP…) the `pipeline` measurement enables. The root
@@ -4780,19 +4841,24 @@ var NodeBenchProgressSchema = /* @__PURE__ */ zod.z.object({
4780
4841
  "preparing",
4781
4842
  "device",
4782
4843
  "pipeline",
4844
+ "decode",
4783
4845
  "cleanup"
4784
4846
  ]),
4785
4847
  deviceKey: /* @__PURE__ */ zod.z.string().nullable(),
4786
4848
  modelId: /* @__PURE__ */ zod.z.string().nullable(),
4787
- /** Streams (device) or sessions (pipeline) of the step running now. */
4849
+ /** Streams (device, decode) or sessions (pipeline) of the step running now. */
4788
4850
  load: /* @__PURE__ */ zod.z.number().nullable(),
4789
4851
  cellsDone: /* @__PURE__ */ zod.z.number(),
4790
4852
  cellsTotal: /* @__PURE__ */ zod.z.number(),
4791
4853
  message: /* @__PURE__ */ zod.z.string()
4792
4854
  });
4793
- /** What limited a ramp. `none` = the ramp ran out of steps still passing. */
4855
+ /**
4856
+ * What limited a ramp. `none` = the ramp ran out of steps still passing;
4857
+ * `fps` = a decode stream fell under the profile frame rate.
4858
+ */
4794
4859
  var NodeBenchLimitSchema = /* @__PURE__ */ zod.z.enum([
4795
4860
  "p95",
4861
+ "fps",
4796
4862
  "drops",
4797
4863
  "errors",
4798
4864
  "stall",
@@ -4843,7 +4909,47 @@ var NodeBenchPipelineCellSchema = /* @__PURE__ */ zod.z.object({
4843
4909
  warmupMs: /* @__PURE__ */ zod.z.number(),
4844
4910
  ramp: /* @__PURE__ */ zod.z.array(NodeBenchRampStepSchema).readonly()
4845
4911
  });
4846
- var NodeBenchCellSchema = /* @__PURE__ */ zod.z.discriminatedUnion("phase", [NodeBenchDeviceCellSchema, NodeBenchPipelineCellSchema]);
4912
+ /** One step of a decode ramp: `load` concurrent streams of one profile. */
4913
+ var NodeBenchDecodeRampStepSchema = /* @__PURE__ */ zod.z.object({
4914
+ load: /* @__PURE__ */ zod.z.number(),
4915
+ pass: /* @__PURE__ */ zod.z.boolean(),
4916
+ /** Frames per second the SLOWEST stream delivered; null when one never started. */
4917
+ minFps: /* @__PURE__ */ zod.z.number().nullable(),
4918
+ /** p95 age of a delivered frame on the worst stream; null when none was delivered. */
4919
+ ageP95Ms: /* @__PURE__ */ zod.z.number().nullable(),
4920
+ cpuPct: /* @__PURE__ */ zod.z.number().nullable(),
4921
+ ramFreePct: /* @__PURE__ */ zod.z.number().nullable(),
4922
+ failReasons: /* @__PURE__ */ zod.z.array(/* @__PURE__ */ zod.z.string()).readonly()
4923
+ });
4924
+ /**
4925
+ * One measured decode profile (the `decode` measurement) on the node. It names
4926
+ * no inference device and no model: decode is the node's, not an accelerator's.
4927
+ */
4928
+ var NodeBenchDecodeCellSchema = /* @__PURE__ */ zod.z.object({
4929
+ phase: /* @__PURE__ */ zod.z.literal("decode"),
4930
+ profile: NodeDecodeProfileSchema,
4931
+ /** Concurrent streams that kept the profile frame rate; 0 = not even one. */
4932
+ maxStreams: /* @__PURE__ */ zod.z.number(),
4933
+ limitedBy: NodeBenchLimitSchema,
4934
+ /** Every held stream ran on a hardware decoder (false = at least one in software). */
4935
+ hardware: /* @__PURE__ */ zod.z.boolean(),
4936
+ /**
4937
+ * The decode backend the workers reported at the last step that held:
4938
+ * `vaapi`, `videotoolbox`, … or `software`; several joined by `+` when the
4939
+ * streams did not all get the same one (a hardware decoder out of sessions).
4940
+ */
4941
+ decoder: /* @__PURE__ */ zod.z.string(),
4942
+ /** A motion pass ran on the decoded frames, as a session runs it. */
4943
+ motion: /* @__PURE__ */ zod.z.boolean(),
4944
+ /** Milliseconds from the first worker fork to every stream of the first step decoding. */
4945
+ warmupMs: /* @__PURE__ */ zod.z.number(),
4946
+ ramp: /* @__PURE__ */ zod.z.array(NodeBenchDecodeRampStepSchema).readonly()
4947
+ });
4948
+ var NodeBenchCellSchema = /* @__PURE__ */ zod.z.discriminatedUnion("phase", [
4949
+ NodeBenchDeviceCellSchema,
4950
+ NodeBenchPipelineCellSchema,
4951
+ NodeBenchDecodeCellSchema
4952
+ ]);
4847
4953
  /**
4848
4954
  * What a result was measured ON. A result whose fingerprint no longer matches
4849
4955
  * the node no longer beats the table.
@@ -4874,6 +4980,8 @@ var NodeBenchRunnerInputSchema = /* @__PURE__ */ zod.z.object({
4874
4980
  runId: /* @__PURE__ */ zod.z.string().min(1),
4875
4981
  devices: /* @__PURE__ */ zod.z.array(NodeBenchmarkDevicePlanSchema).min(1),
4876
4982
  phases: /* @__PURE__ */ zod.z.array(NodeBenchmarkPhaseSchema).min(1),
4983
+ /** The profiles the `decode` measurement ramps, in order. */
4984
+ decodeProfiles: /* @__PURE__ */ zod.z.array(NodeDecodeProfileSchema).default([...NODE_BENCH_DECODE_PROFILES]),
4877
4985
  /** The full detail step tree root for the `pipeline` measurement is built on the node from these ids. */
4878
4986
  steps: /* @__PURE__ */ zod.z.array(/* @__PURE__ */ zod.z.string()).default([]),
4879
4987
  fpsPerStream: /* @__PURE__ */ zod.z.number().int().min(1).max(30),
@@ -4902,6 +5010,12 @@ var NodeBenchRunnerStatusSchema = /* @__PURE__ */ zod.z.object({
4902
5010
  activeCameraIds: /* @__PURE__ */ zod.z.array(/* @__PURE__ */ zod.z.number()).readonly(),
4903
5011
  /** Models the run downloaded and then deleted (not installed before). */
4904
5012
  deletedModels: /* @__PURE__ */ zod.z.array(/* @__PURE__ */ zod.z.string()).readonly(),
5013
+ /**
5014
+ * Measurements the run asked for and could not make, each with its reason
5015
+ * (`decode 2160p-h265-15: no libx265 encoder`). A cell that is absent
5016
+ * without a line here was never asked for.
5017
+ */
5018
+ skipped: /* @__PURE__ */ zod.z.array(/* @__PURE__ */ zod.z.string()).readonly().default([]),
4905
5019
  error: /* @__PURE__ */ zod.z.string().nullable(),
4906
5020
  startedAtMs: /* @__PURE__ */ zod.z.number(),
4907
5021
  finishedAtMs: /* @__PURE__ */ zod.z.number().nullable()
@@ -6529,7 +6643,9 @@ var streamCatalogCapability = {
6529
6643
  deviceNative: true,
6530
6644
  mode: "singleton",
6531
6645
  deviceTypes: [require_device_type.DeviceType.Camera],
6532
- methods: { getCatalog: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({ deviceId: /* @__PURE__ */ zod.z.number().int().nonnegative() }), /* @__PURE__ */ zod.z.array(CamStreamDescriptorSchema).readonly()) },
6646
+ methods: {
6647
+ /** List the streams a camera offers. */
6648
+ getCatalog: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({ deviceId: /* @__PURE__ */ zod.z.number().int().nonnegative() }), /* @__PURE__ */ zod.z.array(CamStreamDescriptorSchema).readonly()) },
6533
6649
  runtimeState: StreamCatalogStateSchema,
6534
6650
  /**
6535
6651
  * Runtime-state durability: **restored** — see the schema doc. A cold
@@ -6677,6 +6793,12 @@ Object.defineProperty(exports, "NodeBenchmarkStatusSchema", {
6677
6793
  return NodeBenchmarkStatusSchema;
6678
6794
  }
6679
6795
  });
6796
+ Object.defineProperty(exports, "NodeDecodeProfileSchema", {
6797
+ enumerable: true,
6798
+ get: function() {
6799
+ return NodeDecodeProfileSchema;
6800
+ }
6801
+ });
6680
6802
  Object.defineProperty(exports, "PeerBytesTicketSchema", {
6681
6803
  enumerable: true,
6682
6804
  get: function() {
@@ -1,4 +1,4 @@
1
- import { c as method } from "./capability-definition-C2rJdVeX.mjs";
1
+ import { c as method } from "./capability-definition-C1TLUVJR.mjs";
2
2
  import { t as NOT_A_DEVICE } from "./system-reasons-CYj4qwyS.mjs";
3
3
  import { r as DeviceType } from "./device-type-DgEvK3ch.mjs";
4
4
  import { t as canonicalStoredDeviceType } from "./device-kind-BJ2pfsjw.mjs";
@@ -261,12 +261,16 @@ var authProviderCapability = {
261
261
  mode: "collection",
262
262
  internal: true,
263
263
  methods: {
264
+ /** Check a username and password with this provider; null when invalid. */
264
265
  validateCredentials: /* @__PURE__ */ method(/* @__PURE__ */ z.object({
265
266
  username: /* @__PURE__ */ z.string(),
266
267
  password: /* @__PURE__ */ z.string()
267
268
  }), /* @__PURE__ */ AuthResultSchema.nullable(), { kind: "mutation" }),
269
+ /** The provider's sign-in URL for an external login flow, carrying the given state. */
268
270
  getLoginUrl: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ state: /* @__PURE__ */ z.string() }), /* @__PURE__ */ z.string()),
271
+ /** Complete an external login flow from the callback parameters. */
269
272
  handleCallback: /* @__PURE__ */ method(/* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), AuthResultSchema, { kind: "mutation" }),
273
+ /** Check a token with this provider; null when invalid. */
270
274
  validateToken: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ token: /* @__PURE__ */ z.string() }), /* @__PURE__ */ AuthResultSchema.nullable())
271
275
  },
272
276
  /** BIG PLAN 2: declarative mount hint — read by `@camstack/server/system` `buildCapRouters`. */
@@ -350,6 +354,7 @@ var deviceCredentialsCapability = {
350
354
  * unaffected. Hub-wide only (no per-role switch).
351
355
  */
352
356
  getDeviceCertificateSettings: /* @__PURE__ */ method(/* @__PURE__ */ z.object({}), DeviceCertificateSettingsSchema, { auth: "admin" }),
357
+ /** Set the certificate settings used to reach devices and return the stored ones. */
353
358
  setDeviceCertificateSettings: /* @__PURE__ */ method(DeviceCertificateSettingsSchema, DeviceCertificateSettingsSchema, {
354
359
  kind: "mutation",
355
360
  auth: "admin"
@@ -515,6 +520,7 @@ var ssoBridgeCapability = {
515
520
  */
516
521
  ttlSec: /* @__PURE__ */ z.union([/* @__PURE__ */ z.number().int().positive(), /* @__PURE__ */ z.literal("never")]).optional()
517
522
  }), /* @__PURE__ */ z.object({ token: /* @__PURE__ */ z.string() }), { auth: "admin" }),
523
+ /** Verify a signed SSO bridge token and return its claims; null when invalid. */
518
524
  verifyBridgeToken: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ token: /* @__PURE__ */ z.string() }), /* @__PURE__ */ SsoBridgeClaimsSchema.nullable(), { auth: "admin" })
519
525
  },
520
526
  vocabulary: { notOperatorFacing: NOT_A_DEVICE.IDENTITY }
@@ -606,6 +612,7 @@ var userManagementCapability = {
606
612
  scope: "system",
607
613
  mode: "singleton",
608
614
  methods: {
615
+ /** List every user account. */
609
616
  listUsers: /* @__PURE__ */ method(/* @__PURE__ */ z.void(), /* @__PURE__ */ z.array(UserSummarySchema), { auth: "admin" }),
610
617
  /**
611
618
  * Read-only: does an admin account still carry the first-boot password
@@ -613,21 +620,25 @@ var userManagementCapability = {
613
620
  * the hub. Backs the `setup_wizard` admin step.
614
621
  */
615
622
  getAdminBootstrapStatus: /* @__PURE__ */ method(/* @__PURE__ */ z.void(), /* @__PURE__ */ z.object({ defaultPasswordInUse: /* @__PURE__ */ z.boolean() }), { auth: "admin" }),
623
+ /** Create a user account. */
616
624
  createUser: /* @__PURE__ */ method(CreateUserInputSchema, UserSummarySchema, {
617
625
  kind: "mutation",
618
626
  auth: "admin",
619
627
  access: "create"
620
628
  }),
629
+ /** Update a user's admin flag, allowed providers and devices, or scopes. */
621
630
  updateUser: /* @__PURE__ */ method(UpdateUserInputSchema, /* @__PURE__ */ z.object({ success: /* @__PURE__ */ z.literal(true) }), {
622
631
  kind: "mutation",
623
632
  auth: "admin",
624
633
  access: "create"
625
634
  }),
635
+ /** Delete a user account. */
626
636
  deleteUser: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ id: /* @__PURE__ */ z.string() }), /* @__PURE__ */ z.object({ success: /* @__PURE__ */ z.literal(true) }), {
627
637
  kind: "mutation",
628
638
  auth: "admin",
629
639
  access: "delete"
630
640
  }),
641
+ /** Set a new password for a user. */
631
642
  resetPassword: /* @__PURE__ */ method(/* @__PURE__ */ z.object({
632
643
  id: /* @__PURE__ */ z.string(),
633
644
  newPassword: /* @__PURE__ */ z.string().min(6)
@@ -636,6 +647,7 @@ var userManagementCapability = {
636
647
  auth: "admin",
637
648
  access: "create"
638
649
  }),
650
+ /** Replace the camera and feature scopes a user is allowed to access. */
639
651
  setUserScopes: /* @__PURE__ */ method(/* @__PURE__ */ z.object({
640
652
  userId: /* @__PURE__ */ z.string(),
641
653
  scopes: /* @__PURE__ */ z.array(UserScopeSchema)
@@ -644,6 +656,7 @@ var userManagementCapability = {
644
656
  auth: "admin",
645
657
  access: "create"
646
658
  }),
659
+ /** Check a username and password; returns the user when valid, otherwise null. */
647
660
  validateCredentials: /* @__PURE__ */ method(/* @__PURE__ */ z.object({
648
661
  username: /* @__PURE__ */ z.string(),
649
662
  password: /* @__PURE__ */ z.string()
@@ -651,11 +664,13 @@ var userManagementCapability = {
651
664
  kind: "mutation",
652
665
  access: "view"
653
666
  }),
667
+ /** Start two-factor setup for a user and return the secret and QR data to enrol. */
654
668
  setupTotp: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ userId: /* @__PURE__ */ z.string() }), TotpSetupResultSchema, {
655
669
  kind: "mutation",
656
670
  auth: "admin",
657
671
  access: "create"
658
672
  }),
673
+ /** Confirm two-factor setup by checking the first code from the authenticator. */
659
674
  confirmTotp: /* @__PURE__ */ method(/* @__PURE__ */ z.object({
660
675
  userId: /* @__PURE__ */ z.string(),
661
676
  code: /* @__PURE__ */ z.string()
@@ -664,11 +679,13 @@ var userManagementCapability = {
664
679
  auth: "admin",
665
680
  access: "create"
666
681
  }),
682
+ /** Turn off two-factor authentication for a user. */
667
683
  disableTotp: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ userId: /* @__PURE__ */ z.string() }), /* @__PURE__ */ z.object({ success: /* @__PURE__ */ z.literal(true) }), {
668
684
  kind: "mutation",
669
685
  auth: "admin",
670
686
  access: "delete"
671
687
  }),
688
+ /** Whether two-factor authentication is enabled for a user. */
672
689
  getTotpStatus: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ userId: /* @__PURE__ */ z.string() }), TotpStatusSchema, { auth: "admin" }),
673
690
  /**
674
691
  * D878: move every TOTP seed stored in plaintext into the keychain (owner
@@ -680,6 +697,7 @@ var userManagementCapability = {
680
697
  auth: "admin",
681
698
  access: "create"
682
699
  }),
700
+ /** Check a two-factor code for a user. */
683
701
  verifyTotp: /* @__PURE__ */ method(/* @__PURE__ */ z.object({
684
702
  userId: /* @__PURE__ */ z.string(),
685
703
  code: /* @__PURE__ */ z.string()
@@ -687,6 +705,7 @@ var userManagementCapability = {
687
705
  kind: "mutation",
688
706
  access: "view"
689
707
  }),
708
+ /** Issue a one-time OAuth authorization code that links a user to an integration instance. */
690
709
  oauthIssueCode: /* @__PURE__ */ method(/* @__PURE__ */ z.object({
691
710
  integrationId: /* @__PURE__ */ z.string(),
692
711
  /** The integration instance the link is for. Omit for the default
@@ -709,6 +728,7 @@ var userManagementCapability = {
709
728
  kind: "mutation",
710
729
  access: "create"
711
730
  }),
731
+ /** Exchange an OAuth authorization code (with PKCE verifier when required) for access and refresh tokens. */
712
732
  oauthExchangeCode: /* @__PURE__ */ method(/* @__PURE__ */ z.object({
713
733
  code: /* @__PURE__ */ z.string(),
714
734
  redirectUri: /* @__PURE__ */ z.string(),
@@ -722,6 +742,7 @@ var userManagementCapability = {
722
742
  kind: "mutation",
723
743
  access: "view"
724
744
  }),
745
+ /** Exchange a refresh token for a new access and refresh token pair; null when invalid. */
725
746
  oauthRefresh: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ refreshToken: /* @__PURE__ */ z.string() }), /* @__PURE__ */ z.object({
726
747
  accessToken: /* @__PURE__ */ z.string(),
727
748
  refreshToken: /* @__PURE__ */ z.string(),
@@ -730,6 +751,7 @@ var userManagementCapability = {
730
751
  kind: "mutation",
731
752
  access: "view"
732
753
  }),
754
+ /** Validate an OAuth access token and return its user, scopes and linked instance; null when invalid. */
733
755
  oauthVerifyAccessToken: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ token: /* @__PURE__ */ z.string() }), /* @__PURE__ */ z.object({
734
756
  userId: /* @__PURE__ */ z.string(),
735
757
  username: /* @__PURE__ */ z.string(),
@@ -741,6 +763,7 @@ var userManagementCapability = {
741
763
  * per-instance route, T3, is the first consumer). */
742
764
  instanceId: /* @__PURE__ */ z.string().optional()
743
765
  }).nullable(), { access: "view" }),
766
+ /** List the external identities (SSO accounts) linked to a user. */
744
767
  listExternalIdentities: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ userId: /* @__PURE__ */ z.string() }), /* @__PURE__ */ z.array(ExternalIdentitySchema), { auth: "admin" }),
745
768
  /** The user an identity is linked to, or `null`. */
746
769
  findUserByExternalIdentity: /* @__PURE__ */ method(ExternalIdentityKeySchema, /* @__PURE__ */ z.object({
@@ -753,7 +776,9 @@ var userManagementCapability = {
753
776
  auth: "admin",
754
777
  access: "delete"
755
778
  }),
779
+ /** List the active OAuth sessions of all users. */
756
780
  listOauthSessions: /* @__PURE__ */ method(/* @__PURE__ */ z.void(), /* @__PURE__ */ z.array(OauthSessionSummarySchema), { auth: "admin" }),
781
+ /** Revoke one OAuth session so its tokens stop working. */
757
782
  revokeOauthSession: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ id: /* @__PURE__ */ z.string() }), /* @__PURE__ */ z.object({ success: /* @__PURE__ */ z.boolean() }), {
758
783
  kind: "mutation",
759
784
  auth: "admin",