@camstack/types 0.1.14 → 0.1.16

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 (467) hide show
  1. package/dist/addon/base-addon.d.ts +262 -0
  2. package/dist/addon/base-addon.d.ts.map +1 -0
  3. package/dist/auth-records-BDg37fy9.mjs +8297 -0
  4. package/dist/auth-records-BDg37fy9.mjs.map +1 -0
  5. package/dist/auth-records-D5ZNaUos.js +8296 -0
  6. package/dist/auth-records-D5ZNaUos.js.map +1 -0
  7. package/dist/capabilities/accessories.cap.d.ts +42 -0
  8. package/dist/capabilities/accessories.cap.d.ts.map +1 -0
  9. package/dist/capabilities/addon-pages-source.cap.d.ts +41 -0
  10. package/dist/capabilities/addon-pages-source.cap.d.ts.map +1 -0
  11. package/dist/capabilities/addon-pages.cap.d.ts +36 -0
  12. package/dist/capabilities/addon-pages.cap.d.ts.map +1 -0
  13. package/dist/capabilities/addon-routes.cap.d.ts +22 -0
  14. package/dist/capabilities/addon-routes.cap.d.ts.map +1 -0
  15. package/dist/capabilities/addon-settings.cap.d.ts +170 -0
  16. package/dist/capabilities/addon-settings.cap.d.ts.map +1 -0
  17. package/dist/capabilities/addon-widgets-source.cap.d.ts +103 -0
  18. package/dist/capabilities/addon-widgets-source.cap.d.ts.map +1 -0
  19. package/dist/capabilities/addon-widgets.cap.d.ts +98 -0
  20. package/dist/capabilities/addon-widgets.cap.d.ts.map +1 -0
  21. package/dist/capabilities/addons.cap.d.ts +356 -0
  22. package/dist/capabilities/addons.cap.d.ts.map +1 -0
  23. package/dist/capabilities/admin-ui.cap.d.ts +14 -0
  24. package/dist/capabilities/admin-ui.cap.d.ts.map +1 -0
  25. package/dist/capabilities/advanced-notifier.cap.d.ts +60 -0
  26. package/dist/capabilities/advanced-notifier.cap.d.ts.map +1 -0
  27. package/dist/capabilities/alerts.cap.d.ts +164 -0
  28. package/dist/capabilities/alerts.cap.d.ts.map +1 -0
  29. package/dist/capabilities/audio-analysis.cap.d.ts +46 -0
  30. package/dist/capabilities/audio-analysis.cap.d.ts.map +1 -0
  31. package/dist/capabilities/audio-analyzer.cap.d.ts +148 -0
  32. package/dist/capabilities/audio-analyzer.cap.d.ts.map +1 -0
  33. package/dist/capabilities/audio-codec.cap.d.ts +202 -0
  34. package/dist/capabilities/audio-codec.cap.d.ts.map +1 -0
  35. package/dist/capabilities/audio-metrics.cap.d.ts +174 -0
  36. package/dist/capabilities/audio-metrics.cap.d.ts.map +1 -0
  37. package/dist/capabilities/auth-provider.cap.d.ts +49 -0
  38. package/dist/capabilities/auth-provider.cap.d.ts.map +1 -0
  39. package/dist/capabilities/authentication.cap.d.ts +83 -0
  40. package/dist/capabilities/authentication.cap.d.ts.map +1 -0
  41. package/dist/capabilities/backup.cap.d.ts +269 -0
  42. package/dist/capabilities/backup.cap.d.ts.map +1 -0
  43. package/dist/capabilities/battery.cap.d.ts +85 -0
  44. package/dist/capabilities/battery.cap.d.ts.map +1 -0
  45. package/dist/capabilities/brightness.cap.d.ts +64 -0
  46. package/dist/capabilities/brightness.cap.d.ts.map +1 -0
  47. package/dist/capabilities/camera-credentials.cap.d.ts +102 -0
  48. package/dist/capabilities/camera-credentials.cap.d.ts.map +1 -0
  49. package/dist/capabilities/camera-streams.cap.d.ts +214 -0
  50. package/dist/capabilities/camera-streams.cap.d.ts.map +1 -0
  51. package/dist/capabilities/capability-definition.d.ts +474 -0
  52. package/dist/capabilities/capability-definition.d.ts.map +1 -0
  53. package/dist/capabilities/custom-actions.d.ts +47 -0
  54. package/dist/capabilities/custom-actions.d.ts.map +1 -0
  55. package/dist/capabilities/decoder.cap.d.ts +173 -0
  56. package/dist/capabilities/decoder.cap.d.ts.map +1 -0
  57. package/dist/capabilities/detection-pipeline.cap.d.ts +34 -0
  58. package/dist/capabilities/detection-pipeline.cap.d.ts.map +1 -0
  59. package/dist/capabilities/device-discovery.cap.d.ts +247 -0
  60. package/dist/capabilities/device-discovery.cap.d.ts.map +1 -0
  61. package/dist/capabilities/device-manager.cap.d.ts +709 -0
  62. package/dist/capabilities/device-manager.cap.d.ts.map +1 -0
  63. package/dist/capabilities/device-ops.cap.d.ts +87 -0
  64. package/dist/capabilities/device-ops.cap.d.ts.map +1 -0
  65. package/dist/capabilities/device-provider.cap.d.ts +151 -0
  66. package/dist/capabilities/device-provider.cap.d.ts.map +1 -0
  67. package/dist/capabilities/device-state.cap.d.ts +97 -0
  68. package/dist/capabilities/device-state.cap.d.ts.map +1 -0
  69. package/dist/capabilities/device-status.cap.d.ts +54 -0
  70. package/dist/capabilities/device-status.cap.d.ts.map +1 -0
  71. package/dist/capabilities/doorbell.cap.d.ts +62 -0
  72. package/dist/capabilities/doorbell.cap.d.ts.map +1 -0
  73. package/dist/capabilities/embedding-encoder.cap.d.ts +41 -0
  74. package/dist/capabilities/embedding-encoder.cap.d.ts.map +1 -0
  75. package/dist/capabilities/events.cap.d.ts +48 -0
  76. package/dist/capabilities/events.cap.d.ts.map +1 -0
  77. package/dist/capabilities/feature-probe.cap.d.ts +79 -0
  78. package/dist/capabilities/feature-probe.cap.d.ts.map +1 -0
  79. package/dist/capabilities/index.d.ts +191 -0
  80. package/dist/capabilities/index.d.ts.map +1 -0
  81. package/dist/capabilities/integrations.cap.d.ts +182 -0
  82. package/dist/capabilities/integrations.cap.d.ts.map +1 -0
  83. package/dist/capabilities/intercom.cap.d.ts +108 -0
  84. package/dist/capabilities/intercom.cap.d.ts.map +1 -0
  85. package/dist/capabilities/local-network.cap.d.ts +216 -0
  86. package/dist/capabilities/local-network.cap.d.ts.map +1 -0
  87. package/dist/capabilities/log-destination.cap.d.ts +70 -0
  88. package/dist/capabilities/log-destination.cap.d.ts.map +1 -0
  89. package/dist/capabilities/mesh-network.cap.d.ts +160 -0
  90. package/dist/capabilities/mesh-network.cap.d.ts.map +1 -0
  91. package/dist/capabilities/mesh-orchestrator.cap.d.ts +96 -0
  92. package/dist/capabilities/mesh-orchestrator.cap.d.ts.map +1 -0
  93. package/dist/capabilities/metrics-provider.cap.d.ts +522 -0
  94. package/dist/capabilities/metrics-provider.cap.d.ts.map +1 -0
  95. package/dist/capabilities/motion-detection.cap.d.ts +107 -0
  96. package/dist/capabilities/motion-detection.cap.d.ts.map +1 -0
  97. package/dist/capabilities/motion-trigger.cap.d.ts +78 -0
  98. package/dist/capabilities/motion-trigger.cap.d.ts.map +1 -0
  99. package/dist/capabilities/motion.cap.d.ts +122 -0
  100. package/dist/capabilities/motion.cap.d.ts.map +1 -0
  101. package/dist/capabilities/native-object-detection.cap.d.ts +127 -0
  102. package/dist/capabilities/native-object-detection.cap.d.ts.map +1 -0
  103. package/dist/capabilities/network-access.cap.d.ts +67 -0
  104. package/dist/capabilities/network-access.cap.d.ts.map +1 -0
  105. package/dist/capabilities/network-quality.cap.d.ts +95 -0
  106. package/dist/capabilities/network-quality.cap.d.ts.map +1 -0
  107. package/dist/capabilities/nodes.cap.d.ts +200 -0
  108. package/dist/capabilities/nodes.cap.d.ts.map +1 -0
  109. package/dist/capabilities/notification-output.cap.d.ts +44 -0
  110. package/dist/capabilities/notification-output.cap.d.ts.map +1 -0
  111. package/dist/capabilities/osd.cap.d.ts +236 -0
  112. package/dist/capabilities/osd.cap.d.ts.map +1 -0
  113. package/dist/capabilities/pipeline-analytics.cap.d.ts +501 -0
  114. package/dist/capabilities/pipeline-analytics.cap.d.ts.map +1 -0
  115. package/dist/capabilities/pipeline-executor.cap.d.ts +922 -0
  116. package/dist/capabilities/pipeline-executor.cap.d.ts.map +1 -0
  117. package/dist/capabilities/pipeline-orchestrator.cap.d.ts +793 -0
  118. package/dist/capabilities/pipeline-orchestrator.cap.d.ts.map +1 -0
  119. package/dist/capabilities/pipeline-runner.cap.d.ts +393 -0
  120. package/dist/capabilities/pipeline-runner.cap.d.ts.map +1 -0
  121. package/dist/capabilities/platform-probe.cap.d.ts +168 -0
  122. package/dist/capabilities/platform-probe.cap.d.ts.map +1 -0
  123. package/dist/capabilities/ptz-autotrack.cap.d.ts +188 -0
  124. package/dist/capabilities/ptz-autotrack.cap.d.ts.map +1 -0
  125. package/dist/capabilities/ptz.cap.d.ts +80 -0
  126. package/dist/capabilities/ptz.cap.d.ts.map +1 -0
  127. package/dist/capabilities/reboot.cap.d.ts +32 -0
  128. package/dist/capabilities/reboot.cap.d.ts.map +1 -0
  129. package/dist/capabilities/recording-engine.cap.d.ts +477 -0
  130. package/dist/capabilities/recording-engine.cap.d.ts.map +1 -0
  131. package/dist/capabilities/recording.cap.d.ts +43 -0
  132. package/dist/capabilities/recording.cap.d.ts.map +1 -0
  133. package/dist/capabilities/remote-access.cap.d.ts +103 -0
  134. package/dist/capabilities/remote-access.cap.d.ts.map +1 -0
  135. package/dist/capabilities/restreamer.cap.d.ts +51 -0
  136. package/dist/capabilities/restreamer.cap.d.ts.map +1 -0
  137. package/dist/capabilities/schemas/detection-shared.d.ts +63 -0
  138. package/dist/capabilities/schemas/detection-shared.d.ts.map +1 -0
  139. package/dist/capabilities/schemas/orchestrator-metrics.d.ts +44 -0
  140. package/dist/capabilities/schemas/orchestrator-metrics.d.ts.map +1 -0
  141. package/dist/capabilities/schemas/streaming-shared.d.ts +177 -0
  142. package/dist/capabilities/schemas/streaming-shared.d.ts.map +1 -0
  143. package/dist/capabilities/schemas/zone-rule.d.ts +74 -0
  144. package/dist/capabilities/schemas/zone-rule.d.ts.map +1 -0
  145. package/dist/capabilities/settings-store.cap.d.ts +198 -0
  146. package/dist/capabilities/settings-store.cap.d.ts.map +1 -0
  147. package/dist/capabilities/snapshot-provider.cap.d.ts +40 -0
  148. package/dist/capabilities/snapshot-provider.cap.d.ts.map +1 -0
  149. package/dist/capabilities/snapshot.cap.d.ts +78 -0
  150. package/dist/capabilities/snapshot.cap.d.ts.map +1 -0
  151. package/dist/capabilities/storage-provider.cap.d.ts +432 -0
  152. package/dist/capabilities/storage-provider.cap.d.ts.map +1 -0
  153. package/dist/capabilities/storage.cap.d.ts +367 -0
  154. package/dist/capabilities/storage.cap.d.ts.map +1 -0
  155. package/dist/capabilities/stream-broker.cap.d.ts +416 -0
  156. package/dist/capabilities/stream-broker.cap.d.ts.map +1 -0
  157. package/dist/capabilities/streaming-engine.cap.d.ts +58 -0
  158. package/dist/capabilities/streaming-engine.cap.d.ts.map +1 -0
  159. package/dist/capabilities/switch.cap.d.ts +66 -0
  160. package/dist/capabilities/switch.cap.d.ts.map +1 -0
  161. package/dist/capabilities/system.cap.d.ts +86 -0
  162. package/dist/capabilities/system.cap.d.ts.map +1 -0
  163. package/dist/capabilities/toast.cap.d.ts +56 -0
  164. package/dist/capabilities/toast.cap.d.ts.map +1 -0
  165. package/dist/capabilities/turn-orchestrator.cap.d.ts +74 -0
  166. package/dist/capabilities/turn-orchestrator.cap.d.ts.map +1 -0
  167. package/dist/capabilities/turn-provider.cap.d.ts +43 -0
  168. package/dist/capabilities/turn-provider.cap.d.ts.map +1 -0
  169. package/dist/capabilities/user-management.cap.d.ts +378 -0
  170. package/dist/capabilities/user-management.cap.d.ts.map +1 -0
  171. package/dist/capabilities/webrtc-session.cap.d.ts +181 -0
  172. package/dist/capabilities/webrtc-session.cap.d.ts.map +1 -0
  173. package/dist/capabilities/webrtc.cap.d.ts +72 -0
  174. package/dist/capabilities/webrtc.cap.d.ts.map +1 -0
  175. package/dist/capabilities/zone-analytics.cap.d.ts +213 -0
  176. package/dist/capabilities/zone-analytics.cap.d.ts.map +1 -0
  177. package/dist/capabilities/zone-rules.cap.d.ts +129 -0
  178. package/dist/capabilities/zone-rules.cap.d.ts.map +1 -0
  179. package/dist/capabilities/zones.cap.d.ts +151 -0
  180. package/dist/capabilities/zones.cap.d.ts.map +1 -0
  181. package/dist/catalogs/audio-classmap.d.ts +16 -0
  182. package/dist/catalogs/audio-classmap.d.ts.map +1 -0
  183. package/dist/catalogs/coco-classmap.d.ts.map +1 -1
  184. package/dist/constants.d.ts +50 -0
  185. package/dist/constants.d.ts.map +1 -1
  186. package/dist/deps/binary-downloader.d.ts +41 -0
  187. package/dist/deps/binary-downloader.d.ts.map +1 -0
  188. package/dist/deps/ffmpeg-downloader.d.ts +13 -0
  189. package/dist/deps/ffmpeg-downloader.d.ts.map +1 -0
  190. package/dist/deps/index.d.ts +4 -0
  191. package/dist/deps/index.d.ts.map +1 -0
  192. package/dist/deps/python-downloader.d.ts +34 -0
  193. package/dist/deps/python-downloader.d.ts.map +1 -0
  194. package/dist/device/accessory.d.ts +62 -0
  195. package/dist/device/accessory.d.ts.map +1 -0
  196. package/dist/device/base-device-provider.d.ts +178 -0
  197. package/dist/device/base-device-provider.d.ts.map +1 -0
  198. package/dist/device/base-device.d.ts +287 -0
  199. package/dist/device/base-device.d.ts.map +1 -0
  200. package/dist/device/camera-device.d.ts +49 -0
  201. package/dist/device/camera-device.d.ts.map +1 -0
  202. package/dist/device/device-binding.d.ts +23 -0
  203. package/dist/device/device-binding.d.ts.map +1 -0
  204. package/dist/device/device-config.d.ts +65 -0
  205. package/dist/device/device-config.d.ts.map +1 -0
  206. package/dist/device/device-context.d.ts +256 -0
  207. package/dist/device/device-context.d.ts.map +1 -0
  208. package/dist/device/device-management.d.ts +118 -0
  209. package/dist/device/device-management.d.ts.map +1 -0
  210. package/dist/device/device-profile.d.ts +161 -0
  211. package/dist/device/device-profile.d.ts.map +1 -0
  212. package/dist/device/device-runtime-state.d.ts +124 -0
  213. package/dist/device/device-runtime-state.d.ts.map +1 -0
  214. package/dist/device/device-state-handle.d.ts +161 -0
  215. package/dist/device/device-state-handle.d.ts.map +1 -0
  216. package/dist/device/device-type.d.ts +68 -0
  217. package/dist/device/device-type.d.ts.map +1 -0
  218. package/dist/device/device.d.ts +87 -0
  219. package/dist/device/device.d.ts.map +1 -0
  220. package/dist/device/features.d.ts +29 -0
  221. package/dist/device/features.d.ts.map +1 -0
  222. package/dist/device/index.d.ts +20 -0
  223. package/dist/device/index.d.ts.map +1 -0
  224. package/dist/device/runtime-state-helpers.d.ts +69 -0
  225. package/dist/device/runtime-state-helpers.d.ts.map +1 -0
  226. package/dist/device/system-mirror.d.ts +318 -0
  227. package/dist/device/system-mirror.d.ts.map +1 -0
  228. package/dist/device/zod-to-config-ui.d.ts +23 -0
  229. package/dist/device/zod-to-config-ui.d.ts.map +1 -0
  230. package/dist/disposer-chain.d.ts +32 -0
  231. package/dist/disposer-chain.d.ts.map +1 -0
  232. package/dist/enums/event-category.d.ts +361 -0
  233. package/dist/enums/event-category.d.ts.map +1 -0
  234. package/dist/enums/event-source-type.d.ts +8 -0
  235. package/dist/enums/event-source-type.d.ts.map +1 -0
  236. package/dist/enums/index.d.ts +3 -0
  237. package/dist/enums/index.d.ts.map +1 -0
  238. package/dist/generated/addon-api.d.ts +14604 -3217
  239. package/dist/generated/addon-api.d.ts.map +1 -1
  240. package/dist/generated/cap-status-types.d.ts +51 -0
  241. package/dist/generated/cap-status-types.d.ts.map +1 -0
  242. package/dist/generated/capability-router-map.d.ts +278 -0
  243. package/dist/generated/capability-router-map.d.ts.map +1 -0
  244. package/dist/generated/device-local-state.d.ts +82 -0
  245. package/dist/generated/device-local-state.d.ts.map +1 -0
  246. package/dist/generated/device-proxy.d.ts +146 -0
  247. package/dist/generated/device-proxy.d.ts.map +1 -0
  248. package/dist/generated/system-proxy.d.ts +92 -0
  249. package/dist/generated/system-proxy.d.ts.map +1 -0
  250. package/dist/helpers/bind-addon-actions.d.ts +19 -0
  251. package/dist/helpers/bind-addon-actions.d.ts.map +1 -0
  252. package/dist/index.d.ts +91 -22
  253. package/dist/index.d.ts.map +1 -1
  254. package/dist/index.js +4843 -477
  255. package/dist/index.js.map +1 -1
  256. package/dist/index.mjs +4832 -415
  257. package/dist/index.mjs.map +1 -1
  258. package/dist/interfaces/addon.d.ts +760 -132
  259. package/dist/interfaces/addon.d.ts.map +1 -1
  260. package/dist/interfaces/advanced-notifier.d.ts +3 -2
  261. package/dist/interfaces/advanced-notifier.d.ts.map +1 -1
  262. package/dist/interfaces/agent-protocol.d.ts +17 -173
  263. package/dist/interfaces/agent-protocol.d.ts.map +1 -1
  264. package/dist/interfaces/agent.d.ts +61 -0
  265. package/dist/interfaces/agent.d.ts.map +1 -1
  266. package/dist/interfaces/alerts.d.ts +14 -0
  267. package/dist/interfaces/alerts.d.ts.map +1 -0
  268. package/dist/interfaces/analysis-persistence.d.ts +37 -19
  269. package/dist/interfaces/analysis-persistence.d.ts.map +1 -1
  270. package/dist/interfaces/analysis.d.ts +33 -4
  271. package/dist/interfaces/analysis.d.ts.map +1 -1
  272. package/dist/interfaces/api-responses.d.ts +124 -0
  273. package/dist/interfaces/api-responses.d.ts.map +1 -0
  274. package/dist/interfaces/api-shared.d.ts +5 -79
  275. package/dist/interfaces/api-shared.d.ts.map +1 -1
  276. package/dist/interfaces/audio-analyzer.d.ts +49 -0
  277. package/dist/interfaces/audio-analyzer.d.ts.map +1 -0
  278. package/dist/interfaces/audio-codec.d.ts +123 -0
  279. package/dist/interfaces/audio-codec.d.ts.map +1 -0
  280. package/dist/interfaces/audio-inference-engine.d.ts +19 -0
  281. package/dist/interfaces/audio-inference-engine.d.ts.map +1 -0
  282. package/dist/interfaces/auth-provider.d.ts.map +1 -1
  283. package/dist/interfaces/auth.d.ts +4 -25
  284. package/dist/interfaces/auth.d.ts.map +1 -1
  285. package/dist/interfaces/camera-pipeline.d.ts +7 -20
  286. package/dist/interfaces/camera-pipeline.d.ts.map +1 -1
  287. package/dist/interfaces/capability.d.ts +171 -24
  288. package/dist/interfaces/capability.d.ts.map +1 -1
  289. package/dist/interfaces/config-ui.d.ts +746 -24
  290. package/dist/interfaces/config-ui.d.ts.map +1 -1
  291. package/dist/interfaces/context.d.ts +9 -4
  292. package/dist/interfaces/context.d.ts.map +1 -1
  293. package/dist/interfaces/decoder.d.ts +38 -3
  294. package/dist/interfaces/decoder.d.ts.map +1 -1
  295. package/dist/interfaces/detection-addon.d.ts +6 -6
  296. package/dist/interfaces/detection-addon.d.ts.map +1 -1
  297. package/dist/interfaces/device-capabilities/camera.d.ts +95 -18
  298. package/dist/interfaces/device-capabilities/camera.d.ts.map +1 -1
  299. package/dist/interfaces/device-capabilities/index.d.ts +0 -13
  300. package/dist/interfaces/device-capabilities/index.d.ts.map +1 -1
  301. package/dist/interfaces/device-provider.d.ts +18 -16
  302. package/dist/interfaces/device-provider.d.ts.map +1 -1
  303. package/dist/interfaces/device.d.ts +4 -21
  304. package/dist/interfaces/device.d.ts.map +1 -1
  305. package/dist/interfaces/embedding-encoder.d.ts +19 -0
  306. package/dist/interfaces/embedding-encoder.d.ts.map +1 -0
  307. package/dist/interfaces/engine-slots.d.ts +10 -0
  308. package/dist/interfaces/engine-slots.d.ts.map +1 -0
  309. package/dist/interfaces/event-bus.d.ts +710 -26
  310. package/dist/interfaces/event-bus.d.ts.map +1 -1
  311. package/dist/interfaces/inference-capabilities.d.ts +0 -17
  312. package/dist/interfaces/inference-capabilities.d.ts.map +1 -1
  313. package/dist/interfaces/inference-engine.d.ts +30 -10
  314. package/dist/interfaces/inference-engine.d.ts.map +1 -1
  315. package/dist/interfaces/integration-registry.d.ts +20 -20
  316. package/dist/interfaces/integration-registry.d.ts.map +1 -1
  317. package/dist/interfaces/kernel-abstractions.d.ts +83 -0
  318. package/dist/interfaces/kernel-abstractions.d.ts.map +1 -0
  319. package/dist/interfaces/logging.d.ts +89 -8
  320. package/dist/interfaces/logging.d.ts.map +1 -1
  321. package/dist/interfaces/metrics-provider.d.ts +17 -0
  322. package/dist/interfaces/metrics-provider.d.ts.map +1 -0
  323. package/dist/interfaces/network-quality.d.ts +4 -4
  324. package/dist/interfaces/network.d.ts +0 -16
  325. package/dist/interfaces/network.d.ts.map +1 -1
  326. package/dist/interfaces/notification.d.ts +1 -1
  327. package/dist/interfaces/pipeline-executor-capability.d.ts +200 -0
  328. package/dist/interfaces/pipeline-executor-capability.d.ts.map +1 -0
  329. package/dist/interfaces/pipeline-orchestrator-capability.d.ts +165 -0
  330. package/dist/interfaces/pipeline-orchestrator-capability.d.ts.map +1 -0
  331. package/dist/interfaces/pipeline-runner-capability.d.ts +147 -0
  332. package/dist/interfaces/pipeline-runner-capability.d.ts.map +1 -0
  333. package/dist/interfaces/pipeline-runner.d.ts +18 -2
  334. package/dist/interfaces/pipeline-runner.d.ts.map +1 -1
  335. package/dist/interfaces/platform.d.ts +1 -1
  336. package/dist/interfaces/platform.d.ts.map +1 -1
  337. package/dist/interfaces/queryable.d.ts +26 -0
  338. package/dist/interfaces/queryable.d.ts.map +1 -0
  339. package/dist/interfaces/raw-tensor-engine.d.ts +16 -0
  340. package/dist/interfaces/raw-tensor-engine.d.ts.map +1 -0
  341. package/dist/interfaces/readiness.d.ts +101 -0
  342. package/dist/interfaces/readiness.d.ts.map +1 -0
  343. package/dist/interfaces/repl.d.ts +1 -1
  344. package/dist/interfaces/restreamer.d.ts +3 -3
  345. package/dist/interfaces/scoped-token.d.ts +1 -21
  346. package/dist/interfaces/scoped-token.d.ts.map +1 -1
  347. package/dist/interfaces/server-analysis.d.ts +30 -87
  348. package/dist/interfaces/server-analysis.d.ts.map +1 -1
  349. package/dist/interfaces/storage-location.d.ts +120 -0
  350. package/dist/interfaces/storage-location.d.ts.map +1 -0
  351. package/dist/interfaces/storage.d.ts +124 -50
  352. package/dist/interfaces/storage.d.ts.map +1 -1
  353. package/dist/interfaces/stream-broker.d.ts +285 -17
  354. package/dist/interfaces/stream-broker.d.ts.map +1 -1
  355. package/dist/interfaces/webrtc-provider.d.ts +24 -0
  356. package/dist/interfaces/webrtc-provider.d.ts.map +1 -1
  357. package/dist/node.d.ts +6 -0
  358. package/dist/node.d.ts.map +1 -0
  359. package/dist/node.js +481 -0
  360. package/dist/node.js.map +1 -0
  361. package/dist/node.mjs +443 -0
  362. package/dist/node.mjs.map +1 -0
  363. package/dist/readiness/index.d.ts +3 -0
  364. package/dist/readiness/index.d.ts.map +1 -0
  365. package/dist/readiness/readiness-registry.d.ts +183 -0
  366. package/dist/readiness/readiness-registry.d.ts.map +1 -0
  367. package/dist/schemas/auth-records.d.ts +81 -0
  368. package/dist/schemas/auth-records.d.ts.map +1 -0
  369. package/dist/storage/filesystem-storage-provider.d.ts +37 -0
  370. package/dist/storage/filesystem-storage-provider.d.ts.map +1 -0
  371. package/dist/types/agent-pipeline-settings.d.ts +94 -0
  372. package/dist/types/agent-pipeline-settings.d.ts.map +1 -0
  373. package/dist/types/camera-pipeline.d.ts +58 -0
  374. package/dist/types/camera-pipeline.d.ts.map +1 -0
  375. package/dist/types/detection.d.ts +195 -38
  376. package/dist/types/detection.d.ts.map +1 -1
  377. package/dist/types/device-type.d.ts +4 -0
  378. package/dist/types/device-type.d.ts.map +1 -1
  379. package/dist/types/engine-output.d.ts +24 -0
  380. package/dist/types/engine-output.d.ts.map +1 -0
  381. package/dist/types/io.d.ts +57 -3
  382. package/dist/types/io.d.ts.map +1 -1
  383. package/dist/types/models.d.ts +3 -1
  384. package/dist/types/models.d.ts.map +1 -1
  385. package/dist/types/pipeline-schema.d.ts +15 -72
  386. package/dist/types/pipeline-schema.d.ts.map +1 -1
  387. package/dist/types/pipeline-step.d.ts +201 -0
  388. package/dist/types/pipeline-step.d.ts.map +1 -0
  389. package/dist/types/pipeline.d.ts +24 -1
  390. package/dist/types/pipeline.d.ts.map +1 -1
  391. package/dist/utils/element-config-store.d.ts +29 -0
  392. package/dist/utils/element-config-store.d.ts.map +1 -0
  393. package/dist/utils/err-msg.d.ts +7 -0
  394. package/dist/utils/err-msg.d.ts.map +1 -0
  395. package/dist/utils/json-safe.d.ts +33 -0
  396. package/dist/utils/json-safe.d.ts.map +1 -0
  397. package/dist/utils/mask-url.d.ts +10 -0
  398. package/dist/utils/mask-url.d.ts.map +1 -0
  399. package/dist/utils/ring-buffer.d.ts +16 -0
  400. package/dist/utils/ring-buffer.d.ts.map +1 -0
  401. package/dist/utils/run-inference-step.d.ts +26 -0
  402. package/dist/utils/run-inference-step.d.ts.map +1 -0
  403. package/dist/utils/runtime-mapping.d.ts +88 -0
  404. package/dist/utils/runtime-mapping.d.ts.map +1 -0
  405. package/dist/utils/zone-rule-eval.d.ts +47 -0
  406. package/dist/utils/zone-rule-eval.d.ts.map +1 -0
  407. package/package.json +11 -2
  408. package/dist/__tests__/addon-capability-provider.test.d.ts +0 -2
  409. package/dist/__tests__/addon-capability-provider.test.d.ts.map +0 -1
  410. package/dist/__tests__/addon-declaration.test.d.ts +0 -2
  411. package/dist/__tests__/addon-declaration.test.d.ts.map +0 -1
  412. package/dist/__tests__/capability.test.d.ts +0 -2
  413. package/dist/__tests__/capability.test.d.ts.map +0 -1
  414. package/dist/interfaces/addon-i18n.d.ts +0 -41
  415. package/dist/interfaces/addon-i18n.d.ts.map +0 -1
  416. package/dist/interfaces/classifier.d.ts +0 -8
  417. package/dist/interfaces/classifier.d.ts.map +0 -1
  418. package/dist/interfaces/cropper.d.ts +0 -8
  419. package/dist/interfaces/cropper.d.ts.map +0 -1
  420. package/dist/interfaces/detector.d.ts +0 -8
  421. package/dist/interfaces/detector.d.ts.map +0 -1
  422. package/dist/interfaces/device-capabilities/accessory.d.ts +0 -14
  423. package/dist/interfaces/device-capabilities/accessory.d.ts.map +0 -1
  424. package/dist/interfaces/device-capabilities/audio-detector.d.ts +0 -12
  425. package/dist/interfaces/device-capabilities/audio-detector.d.ts.map +0 -1
  426. package/dist/interfaces/device-capabilities/doorbell.d.ts +0 -10
  427. package/dist/interfaces/device-capabilities/doorbell.d.ts.map +0 -1
  428. package/dist/interfaces/device-capabilities/events.d.ts +0 -47
  429. package/dist/interfaces/device-capabilities/events.d.ts.map +0 -1
  430. package/dist/interfaces/device-capabilities/motion-sensor.d.ts +0 -7
  431. package/dist/interfaces/device-capabilities/motion-sensor.d.ts.map +0 -1
  432. package/dist/interfaces/device-capabilities/native-detection.d.ts +0 -14
  433. package/dist/interfaces/device-capabilities/native-detection.d.ts.map +0 -1
  434. package/dist/interfaces/device-capabilities/object-detector.d.ts +0 -59
  435. package/dist/interfaces/device-capabilities/object-detector.d.ts.map +0 -1
  436. package/dist/interfaces/device-capabilities/pan-tilt-zoom.d.ts +0 -29
  437. package/dist/interfaces/device-capabilities/pan-tilt-zoom.d.ts.map +0 -1
  438. package/dist/interfaces/device-capabilities/recording.d.ts +0 -18
  439. package/dist/interfaces/device-capabilities/recording.d.ts.map +0 -1
  440. package/dist/interfaces/device-capabilities/siren.d.ts +0 -8
  441. package/dist/interfaces/device-capabilities/siren.d.ts.map +0 -1
  442. package/dist/interfaces/device-capabilities/status-light.d.ts +0 -7
  443. package/dist/interfaces/device-capabilities/status-light.d.ts.map +0 -1
  444. package/dist/interfaces/device-capabilities/switch.d.ts +0 -8
  445. package/dist/interfaces/device-capabilities/switch.d.ts.map +0 -1
  446. package/dist/interfaces/device-capabilities/two-way-audio.d.ts +0 -8
  447. package/dist/interfaces/device-capabilities/two-way-audio.d.ts.map +0 -1
  448. package/dist/interfaces/device-capability.d.ts +0 -14
  449. package/dist/interfaces/device-capability.d.ts.map +0 -1
  450. package/dist/interfaces/model-catalog.d.ts +0 -25
  451. package/dist/interfaces/model-catalog.d.ts.map +0 -1
  452. package/dist/interfaces/refiner.d.ts +0 -8
  453. package/dist/interfaces/refiner.d.ts.map +0 -1
  454. package/dist/interfaces/repositories.d.ts +0 -20
  455. package/dist/interfaces/repositories.d.ts.map +0 -1
  456. package/dist/interfaces/scene-intelligence.d.ts +0 -21
  457. package/dist/interfaces/scene-intelligence.d.ts.map +0 -1
  458. package/dist/interfaces/storage-backend.d.ts +0 -27
  459. package/dist/interfaces/storage-backend.d.ts.map +0 -1
  460. package/dist/interfaces/worker-protocol.d.ts +0 -110
  461. package/dist/interfaces/worker-protocol.d.ts.map +0 -1
  462. package/dist/schemas/system-settings-schemas.d.ts +0 -27
  463. package/dist/schemas/system-settings-schemas.d.ts.map +0 -1
  464. package/dist/types/benchmark.d.ts +0 -112
  465. package/dist/types/benchmark.d.ts.map +0 -1
  466. package/dist/types/zones.d.ts +0 -48
  467. package/dist/types/zones.d.ts.map +0 -1
@@ -2,31 +2,221 @@ import type { ModelCatalogEntry, ModelFormat, ModelOutputFormat, CustomModelMeta
2
2
  /**
3
3
  * Configuration UI Schema -- declarative form definition for any element.
4
4
  *
5
- * Used by addons, providers, and devices to declare their settings UI.
6
- * The admin UI renders these schemas as responsive forms.
5
+ * Used by addons to declare their settings UI. The admin UI collects schemas
6
+ * from all active addons, merges tabs with the same ID, and renders responsive forms.
7
+ *
8
+ * Layout hierarchy: Tab → Section → Field
9
+ * Multiple addons can contribute sections to the same tab.
7
10
  */
11
+ /** Predefined tab identifiers that addons reference by ID. */
12
+ export type WellKnownTabId = 'overview' | 'general' | 'image' | 'light' | 'motion' | 'audio' | 'snapshot' | 'osd' | 'alarms' | 'pipeline' | 'stream-broker' | 'streaming' | 'zones' | 'live-stats' | 'recording' | 'notifications' | 'network' | 'storage' | 'engine' | 'scheduler' | 'decoder' | 'advanced';
13
+ export interface WellKnownTab {
14
+ readonly id: WellKnownTabId;
15
+ readonly label: string;
16
+ readonly icon: string;
17
+ readonly order: number;
18
+ }
19
+ /** Predefined tabs with standard label, icon, and sort order.
20
+ *
21
+ * Pipeline (renamed Orchestrator in the UI) holds the four
22
+ * pipeline-orchestrator sections: General, Object Detection, Audio,
23
+ * and Cluster Assignment. Motion stays its own tab.
24
+ * `streaming` remains for older payloads that haven't been retagged. */
25
+ export declare const WELL_KNOWN_TABS: readonly WellKnownTab[];
26
+ /** Lookup map for well-known tabs by ID. */
27
+ export declare const WELL_KNOWN_TAB_MAP: Readonly<Record<WellKnownTabId, WellKnownTab>>;
28
+ /**
29
+ * Custom tab declaration by an addon.
30
+ * Use well-known tab IDs when possible. Custom tabs are for addon-specific UI.
31
+ */
32
+ export interface ConfigTabDeclaration {
33
+ /** Unique tab identifier. Use WellKnownTabId for standard tabs. */
34
+ readonly id: string;
35
+ /** Display label (ignored for well-known tabs — their label is used). */
36
+ readonly label: string;
37
+ /** Icon identifier (ignored for well-known tabs — their icon is used). */
38
+ readonly icon: string;
39
+ /** Sort order within the tab bar. Lower = left. */
40
+ readonly order?: number;
41
+ }
8
42
  export interface ConfigUISchema {
9
- sections: ConfigSection[];
43
+ /**
44
+ * Tabs contributed by this addon.
45
+ * Multiple addons can reference the same tab ID — the UI merges them.
46
+ * For well-known tabs, label/icon from WELL_KNOWN_TABS takes precedence.
47
+ * Omit to use only well-known tabs referenced by sections.
48
+ */
49
+ readonly tabs?: readonly ConfigTabDeclaration[];
50
+ readonly sections: readonly ConfigSection[];
10
51
  }
11
52
  export interface ConfigSection {
12
- id: string;
13
- title: string;
14
- description?: string;
15
- style?: 'card' | 'accordion';
16
- defaultCollapsed?: boolean;
17
- columns?: 1 | 2 | 3 | 4;
18
- fields: ConfigField[];
53
+ readonly id: string;
54
+ readonly title: string;
55
+ readonly description?: string;
56
+ readonly style?: 'card' | 'accordion';
57
+ readonly defaultCollapsed?: boolean;
58
+ readonly columns?: 1 | 2 | 3 | 4;
59
+ /** Which tab this section belongs to. Default: 'general'. */
60
+ readonly tab?: string;
61
+ /**
62
+ * Where the section is rendered in the device page. Default
63
+ * `'settings'` keeps the section under the device Settings panel
64
+ * (existing behavior). `'top-tab'` hoists the section into a
65
+ * top-level device tab (sibling of Live / Streams / Recordings /
66
+ * Settings) keyed by the section's `tab` value. Multiple addons
67
+ * targeting the same `(tab, location: 'top-tab')` pair render
68
+ * inside the same top tab in `order` sequence — used for the
69
+ * Zones tab where orchestrator (geometry CRUD) + motion-wasm
70
+ * (motion rules) + detection-pipeline (detection rules) all
71
+ * contribute to one operator surface.
72
+ */
73
+ readonly location?: 'settings' | 'top-tab';
74
+ /** Sort order within the tab. Lower = top. */
75
+ readonly order?: number;
76
+ /**
77
+ * When true, every field in this section saves immediately on change
78
+ * (no Save button needed). Per-field `immediate: false` overrides this.
79
+ */
80
+ readonly immediate?: boolean;
81
+ readonly fields: readonly ConfigField[];
19
82
  }
20
- export type ConfigField = ConfigTextField | ConfigNumberField | ConfigBooleanField | ConfigSelectField | ConfigMultiSelectField | ConfigColorField | ConfigPasswordField | ConfigTextAreaField | ConfigSliderField | ConfigTagsField | ConfigGroupField | ConfigSeparatorField | ConfigInfoField | ConfigModelSelectorField | ConfigStorageLocationField;
83
+ export type ConfigField = ConfigTextField | ConfigNumberField | ConfigBooleanField | ConfigSelectField | ConfigMultiSelectField | ConfigColorField | ConfigPasswordField | ConfigTextAreaField | ConfigSliderField | ConfigTagsField | ConfigGroupField | ConfigSubTabsField | ConfigSeparatorField | ConfigInfoField | ConfigObjectArrayField | ConfigEditableArrayField | ConfigModelSelectorField | ConfigStorageLocationField | ConfigProbeField | ConfigButtonField | ConfigPipelineEditorField | ConfigNodeSelectField | ConfigNodeMultiSelectField | ConfigZoneEditorField | ConfigLiveStatsField | ConfigLiveStreamViewerField | ConfigPipelineStatsField | ConfigStreamNetworkStatsField | ConfigDoorbellRecentField | ConfigDeviceInfoField | ConfigWidgetField | ConfigAddonActionSelectField | ConfigAddonActionButtonField;
21
84
  export interface ConfigFieldBase {
22
- key: string;
23
- label: string;
24
- description?: string;
25
- required?: boolean;
26
- disabled?: boolean;
27
- placeholder?: string;
28
- span?: 1 | 2 | 3 | 4;
29
- showWhen?: ConfigCondition;
85
+ readonly key: string;
86
+ readonly label: string;
87
+ readonly description?: string;
88
+ readonly required?: boolean;
89
+ readonly disabled?: boolean;
90
+ readonly placeholder?: string;
91
+ /** Default value used when the current value is undefined */
92
+ readonly default?: unknown;
93
+ readonly span?: 1 | 2 | 3 | 4;
94
+ readonly showWhen?: ConfigCondition;
95
+ /**
96
+ * Save behavior when value changes.
97
+ * - true: save immediately on change (toggles, selects, checkboxes)
98
+ * - false (default): debounce 2 seconds for text/number inputs before saving
99
+ *
100
+ * The UI FormBuilder reads this flag and applies debounce accordingly.
101
+ */
102
+ readonly immediate?: boolean;
103
+ /**
104
+ * Declares that changes to this field can only take effect after the
105
+ * owning addon is (re)started — the field is bound at boot time and
106
+ * cannot be hot-reloaded from `onConfigChanged()`. Example: Python
107
+ * inference-pool `concurrency` (pool threads are allocated at pool
108
+ * spawn). The UI surfaces a "Restart required" hint, and the
109
+ * framework auto-restarts the addon after the update lands on a flag
110
+ * transition — see `BaseAddon.updateGlobalSettings` /
111
+ * `updateAddonSettings`.
112
+ */
113
+ readonly requiresRestart?: boolean;
114
+ /**
115
+ * Override the default placement of this field.
116
+ * Moves it to a different tab and/or section than its parent section.
117
+ * Useful for placing a single setting in a shared tab (e.g., 'advanced').
118
+ */
119
+ readonly placement?: {
120
+ /** Target tab ID (well-known or custom). */
121
+ readonly tab?: string;
122
+ /** Target section ID within the tab. Created if it doesn't exist. */
123
+ readonly section?: string;
124
+ };
125
+ /**
126
+ * Device-aggregator metadata — only meaningful when this field is part of
127
+ * a `ConfigUISchemaWithValues` merged by `deviceManager.getDeviceSettingsAggregate`
128
+ * / `getDeviceLiveInfoAggregate`.
129
+ *
130
+ * - `readonlyField: true` — render as display-only, no mutation handler
131
+ * - `source: 'live'` — the value comes from the fast-poll live
132
+ * aggregator; the UI re-queries it on its own
133
+ * cadence and swaps the value in place. Default:
134
+ * 'settings' (slow, cached, invalidated on save)
135
+ * - `writerCapName` — when editable, the capability whose provider
136
+ * accepts the mutation via
137
+ * `deviceManager.updateDeviceField`.
138
+ * - `writerAddonId` — when editable, the addon id of the provider
139
+ * for `writerCapName`. Ignored for
140
+ * `readonlyField: true`.
141
+ * - `minRole` — minimum user role required to edit this
142
+ * field. UI uses it to disable the input and
143
+ * show a lock icon; the server still enforces
144
+ * cap-level auth (`admin` for the aggregator
145
+ * writers today). Default: 'admin'.
146
+ *
147
+ * The aggregator tags fields with `writerCapName` + `writerAddonId` before
148
+ * returning them — providers produce clean schemas; provenance is injected
149
+ * based on which (cap, provider) contributed the section.
150
+ *
151
+ * Named `readonlyField` instead of `readonly` to avoid colliding with the
152
+ * TS modifier already implied by the interface fields.
153
+ */
154
+ readonly readonlyField?: boolean;
155
+ readonly source?: 'settings' | 'live';
156
+ readonly writerCapName?: string;
157
+ readonly writerAddonId?: string;
158
+ readonly minRole?: 'viewer' | 'admin' | 'super_admin';
159
+ /**
160
+ * Optional inline action icons shown on the right of the field
161
+ * control. Each action is a compact icon button that dispatches
162
+ * through the same `onAction(action, key)` handler the button-field
163
+ * type uses — keeps the action pipeline single-sourced. Common use:
164
+ * readonly URL field with a "regenerate" icon, probe field with a
165
+ * "copy" shortcut, etc.
166
+ */
167
+ readonly actions?: readonly FieldInlineAction[];
168
+ /**
169
+ * Declare this field as a *collection* of its underlying primitive.
170
+ * When set, the stored value is an array (`T[]`) instead of a scalar
171
+ * (`T`), and the form renderer shows:
172
+ * - `min` initial instances (empty slots if no value stored yet)
173
+ * - an `+ Add` button when the current count < `max`
174
+ * - a remove icon on each instance when the current count > `min`
175
+ * - an item counter badge (e.g. `2/3`) next to the section header
176
+ *
177
+ * Applies uniformly to every scalar-valued field type (text, number,
178
+ * boolean, select, color, probe, password, textarea, slider, tags,
179
+ * model-selector, storage-location). Structural fields (separator,
180
+ * info, button) and group fields ignore this flag.
181
+ *
182
+ * Probe fields hit `testCreationField` / settings-contribution
183
+ * probing per-index — the handler receives the full array and an
184
+ * `index` hint so it can resolve just that slot.
185
+ */
186
+ readonly multiple?: ConfigFieldMultiple;
187
+ }
188
+ /**
189
+ * Array-widget metadata for a `ConfigFieldBase`. See `multiple` on
190
+ * `ConfigFieldBase` for the activation semantics.
191
+ */
192
+ export interface ConfigFieldMultiple {
193
+ /** Minimum item count — always rendered, no remove button when count == min. */
194
+ readonly min: number;
195
+ /** Maximum item count — Add button hidden when count == max. */
196
+ readonly max: number;
197
+ /** Label for the "add" affordance. Default: "Add". */
198
+ readonly addLabel?: string;
199
+ /** Template for each item's label (${n} = 1-based index). Default: none. */
200
+ readonly itemLabel?: string;
201
+ /**
202
+ * Default value each newly-added instance starts with. Falls back to
203
+ * the field-level `default`, then to the empty string for string
204
+ * fields or `null` for everything else.
205
+ */
206
+ readonly itemDefault?: unknown;
207
+ }
208
+ /** Inline action icon attached to any ConfigField. */
209
+ export interface FieldInlineAction {
210
+ /** Action identifier forwarded to the FormBuilder `onAction` handler. */
211
+ readonly action: string;
212
+ /** Lucide icon name (e.g. 'refresh-cw', 'copy', 'external-link'). */
213
+ readonly icon: string;
214
+ /** Tooltip shown on hover. */
215
+ readonly tooltip: string;
216
+ /** Visual variant — `danger` flags destructive actions in red. */
217
+ readonly variant?: 'default' | 'danger' | 'primary';
218
+ /** Optional confirmation prompt before dispatching. */
219
+ readonly confirmMessage?: string;
30
220
  }
31
221
  export interface ConfigCondition {
32
222
  field: string;
@@ -34,6 +224,16 @@ export interface ConfigCondition {
34
224
  notEquals?: unknown;
35
225
  in?: unknown[];
36
226
  notIn?: unknown[];
227
+ /**
228
+ * For `multiselect` / `tags` / array-valued fields: matches when the
229
+ * referenced field's array value INCLUDES the given primitive. Example:
230
+ * `{ field: 'motionSources', includes: 'analyzer' }` shows the
231
+ * dependent field only when the analyzer source is selected.
232
+ */
233
+ includes?: unknown;
234
+ /** Inverse of `includes` — show when the field's array value does NOT
235
+ * contain the given primitive. */
236
+ notIncludes?: unknown;
37
237
  }
38
238
  export interface ConfigTextField extends ConfigFieldBase {
39
239
  type: 'text';
@@ -66,6 +266,20 @@ export interface ConfigColorField extends ConfigFieldBase {
66
266
  type: 'color';
67
267
  presets?: string[];
68
268
  }
269
+ /** Select a single cluster node from the live topology. Options are
270
+ * populated dynamically by the UI via useClusterNodes — no server-side
271
+ * option list needed. */
272
+ export interface ConfigNodeSelectField extends ConfigFieldBase {
273
+ type: 'node-select';
274
+ /** When true, include offline nodes (greyed out). Default: false. */
275
+ showOffline?: boolean;
276
+ }
277
+ /** Select multiple cluster nodes from the live topology. */
278
+ export interface ConfigNodeMultiSelectField extends ConfigFieldBase {
279
+ type: 'node-multiselect';
280
+ showOffline?: boolean;
281
+ maxItems?: number;
282
+ }
69
283
  export interface ConfigPasswordField extends ConfigFieldBase {
70
284
  type: 'password';
71
285
  showToggle?: boolean;
@@ -74,6 +288,18 @@ export interface ConfigTextAreaField extends ConfigFieldBase {
74
288
  type: 'textarea';
75
289
  rows?: number;
76
290
  maxLength?: number;
291
+ /**
292
+ * When true, the stored value is a JSON-serializable object/array and
293
+ * the UI shows it as pretty-printed JSON, with parse-on-save semantics.
294
+ * `hydrateSchema` takes care of stringifying on the way out; the
295
+ * FormBuilder is expected to parse before emitting the patch.
296
+ *
297
+ * Used by `zodEntriesToConfigUI` when the Zod schema is an
298
+ * array/object — falls back gracefully when the FormBuilder hasn't
299
+ * implemented parse-on-save yet (the field still renders the JSON
300
+ * string instead of `[object Object],…`).
301
+ */
302
+ isJson?: boolean;
77
303
  }
78
304
  export interface ConfigSliderField extends ConfigFieldBase {
79
305
  type: 'slider';
@@ -83,6 +309,19 @@ export interface ConfigSliderField extends ConfigFieldBase {
83
309
  showValue?: boolean;
84
310
  unit?: string;
85
311
  default?: number;
312
+ /** Display scale factor: displayed = stored / displayScale. E.g., displayScale=1000 shows ms as seconds. */
313
+ displayScale?: number;
314
+ /** When true, allows a "not set" state where the value is null (e.g., "Auto" mode) */
315
+ nullable?: boolean;
316
+ /** Label shown when the value is null (default: "Auto") */
317
+ nullLabel?: string;
318
+ /**
319
+ * When true, render +/− stepper buttons flanking the numeric input.
320
+ * Each click increments/decrements by `step` (default 1) and clamps
321
+ * to `[min, max]`. Pairs with `showValue` so the operator can fine-
322
+ * tune from the keyboard / pointer without scrubbing the slider.
323
+ */
324
+ showStepper?: boolean;
86
325
  }
87
326
  export interface ConfigTagsField extends ConfigFieldBase {
88
327
  type: 'tags';
@@ -91,7 +330,7 @@ export interface ConfigTagsField extends ConfigFieldBase {
91
330
  }
92
331
  export interface ConfigGroupField extends ConfigFieldBase {
93
332
  type: 'group';
94
- fields: ConfigField[];
333
+ fields: readonly ConfigField[];
95
334
  style?: 'card' | 'inline' | 'accordion';
96
335
  defaultCollapsed?: boolean;
97
336
  }
@@ -100,6 +339,20 @@ export interface ConfigSeparatorField {
100
339
  type: 'separator';
101
340
  key: string;
102
341
  }
342
+ /** A single sub-tab inside a `ConfigSubTabsField`. */
343
+ export interface ConfigSubTabDefinition {
344
+ readonly id: string;
345
+ readonly label: string;
346
+ readonly icon?: string;
347
+ /** Short text shown next to the label (e.g. live status / counter). */
348
+ readonly badge?: string;
349
+ readonly fields: readonly ConfigField[];
350
+ }
351
+ export interface ConfigSubTabsField extends ConfigFieldBase {
352
+ type: 'sub-tabs';
353
+ /** Tab definitions; rendered in array order. The first tab is active by default. */
354
+ tabs: readonly ConfigSubTabDefinition[];
355
+ }
103
356
  /** Read-only informational text */
104
357
  export interface ConfigInfoField {
105
358
  type: 'info';
@@ -107,6 +360,60 @@ export interface ConfigInfoField {
107
360
  label: string;
108
361
  content: string;
109
362
  variant?: 'info' | 'warning' | 'success' | 'danger';
363
+ /**
364
+ * Rendering mode for `content`. Default `'text'` keeps the legacy
365
+ * "plain string with auto-newlines" behaviour. `'html'` interprets
366
+ * `content` as inline HTML (sanitised in the renderer to a small
367
+ * allowlist: a, ul, ol, li, strong, em, code, br) so addons can ship
368
+ * clickable links and bulleted steps without inventing markdown.
369
+ *
370
+ * HTML mode is for addon-authored copy that lives in the bundle (no
371
+ * user-supplied input flows here), so the surface stays narrow.
372
+ */
373
+ format?: 'text' | 'html';
374
+ /** Same semantics as `ConfigFieldBase.showWhen` — lets info banners
375
+ * conditionally appear (e.g. "Cloudflare API token instructions"
376
+ * only when mode === 'custom'). */
377
+ showWhen?: ConfigCondition;
378
+ }
379
+ /**
380
+ * Read-only structured table for diagnostic data. Renders as a row-per-
381
+ * entry list with column headers. Use when a section needs to surface
382
+ * multiple parallel records (live sessions, socket-pool entries, recent
383
+ * doorbell presses, …) — replaces the older "joined-string in an info
384
+ * field" pattern that lost structure on long entries.
385
+ *
386
+ * Columns describe how to render each cell. Each entry in `value` is a
387
+ * record keyed by the column `key`. Missing keys render as em-dash.
388
+ *
389
+ * NOT editable — the FormBuilder ignores the field for save patches.
390
+ */
391
+ export interface ConfigObjectArrayField {
392
+ type: 'object-array';
393
+ key: string;
394
+ label: string;
395
+ description?: string;
396
+ /**
397
+ * Column definitions in render order. The `kind` hint controls cell
398
+ * formatting:
399
+ * - `text` (default): plain string; null/undefined → em-dash
400
+ * - `monospace`: monospace font (good for IPs, sessionIds)
401
+ * - `status`: small colored dot + label, value should be one of
402
+ * 'ok' | 'warn' | 'danger' | 'idle' | 'unknown'
403
+ * - `duration`: number of ms, formatted as "1m 23s"
404
+ * - `timestamp`: number (ms epoch), formatted as locale time
405
+ */
406
+ columns: ReadonlyArray<{
407
+ readonly key: string;
408
+ readonly label: string;
409
+ readonly kind?: 'text' | 'monospace' | 'status' | 'duration' | 'timestamp';
410
+ /** Optional fixed width hint (CSS values: '120px', '20%', etc). */
411
+ readonly width?: string;
412
+ }>;
413
+ /** Rows. Empty array renders `emptyMessage`. */
414
+ value: ReadonlyArray<Record<string, unknown>>;
415
+ /** Shown when `value` is empty. Default: "No entries". */
416
+ emptyMessage?: string;
110
417
  }
111
418
  export interface ConfigOption {
112
419
  value: string;
@@ -114,6 +421,50 @@ export interface ConfigOption {
114
421
  description?: string;
115
422
  icon?: string;
116
423
  }
424
+ /**
425
+ * Editable array of records. Each row exposes the fields declared in
426
+ * `itemFields`; the form renderer reuses the standard scalar field
427
+ * components (text / number / select / password / boolean) for each
428
+ * cell. Add/Remove row buttons mutate `value` (the FormBuilder picks
429
+ * up the new array via the standard onChange flow).
430
+ *
431
+ * Use for "configure N items" cases — e.g. a backup-sftp addon
432
+ * exposing a list of remote destinations the operator can add or
433
+ * remove. Don't use for fixed-cardinality data; a flat group of
434
+ * fields reads better.
435
+ *
436
+ * Constraints inside `itemFields`:
437
+ * - Only scalar field types are supported (text/number/select/
438
+ * multiselect/password/boolean/textarea/color/tags/slider). Nested
439
+ * groups, sub-tabs, probes, button actions, and other arrays are
440
+ * intentionally rejected — they conflate row-state with section-
441
+ * state and the FormBuilder's flat onChange contract can't carry
442
+ * the nesting cleanly. Build a custom-renderer if you need that.
443
+ * - Field `key`s are scoped to the row (no global collisions with
444
+ * the surrounding section).
445
+ * - `showWhen` inside a row references siblings within the same row.
446
+ */
447
+ export interface ConfigEditableArrayField extends ConfigFieldBase {
448
+ readonly type: 'editable-array';
449
+ /** Per-row schema. Same shape as section.fields, scalar-only. */
450
+ readonly itemFields: readonly ConfigField[];
451
+ /** Default values used when the operator clicks "Add". */
452
+ readonly defaultItem?: Record<string, unknown>;
453
+ /** Minimum number of rows allowed. Remove disabled below this count. */
454
+ readonly minRows?: number;
455
+ /** Maximum number of rows allowed. Add disabled at this count. */
456
+ readonly maxRows?: number;
457
+ /** Label for the "Add" button. Defaults to "Add". */
458
+ readonly addLabel?: string;
459
+ /** Shown when the array is empty. Default: "No entries". */
460
+ readonly emptyMessage?: string;
461
+ /**
462
+ * Optional template for each row's title (e.g. "{displayName}" or
463
+ * "{host}:{port}"). Resolved against the row's values; missing keys
464
+ * collapse to an em-dash. Falls back to `Row N` when not provided.
465
+ */
466
+ readonly rowTitleTemplate?: string;
467
+ }
117
468
  export interface ConfigModelSelectorField extends ConfigFieldBase {
118
469
  type: 'model-selector';
119
470
  /** Filter models by type */
@@ -136,6 +487,37 @@ export interface ConfigModelSelectorField extends ConfigFieldBase {
136
487
  requiredMetadata?: readonly (keyof CustomModelMetadata)[];
137
488
  outputFormatHint?: ModelOutputFormat;
138
489
  }
490
+ /** Result of probing a single field value (returned by IDeviceProvider.testField) */
491
+ export interface FieldProbeResult {
492
+ status: 'ok' | 'error';
493
+ /** Labels to display as chips (e.g. "1920×1080", "H.265", "25fps") */
494
+ labels?: readonly string[];
495
+ /** Error message when status is 'error' */
496
+ error?: string;
497
+ /**
498
+ * Optional values the provider suggests applying to other form fields
499
+ * after a successful probe. The form-builder merges these into the
500
+ * working snapshot ONLY for fields the operator hasn't filled yet,
501
+ * never overwriting user input. Typical use: a host-probe that
502
+ * autodetects the camera model and proposes it as the device `name`.
503
+ */
504
+ suggestedValues?: Readonly<Record<string, unknown>>;
505
+ }
506
+ /**
507
+ * A probeable input field. Renders as a text input with a test button.
508
+ * The provider implements the actual probing logic via IDeviceProvider.testField.
509
+ *
510
+ * UX states:
511
+ * - idle: muted icon, no labels
512
+ * - probing: spinner icon
513
+ * - ok: green check icon + provider-returned labels as chips
514
+ * - error: red icon + error message
515
+ */
516
+ export interface ConfigProbeField extends ConfigFieldBase {
517
+ type: 'probe';
518
+ /** Input type hint for the text input (default: 'url') */
519
+ inputType?: 'url' | 'text';
520
+ }
139
521
  import type { StorageLocationType } from './storage.js';
140
522
  export interface ConfigStorageLocationField extends ConfigFieldBase {
141
523
  type: 'storage-location';
@@ -144,9 +526,349 @@ export interface ConfigStorageLocationField extends ConfigFieldBase {
144
526
  /** Show available space indicator next to each provider option */
145
527
  showAvailableSpace?: boolean;
146
528
  }
147
- export interface IConfigurable {
148
- getConfigSchema(): ConfigUISchema;
149
- getConfig(): Record<string, unknown>;
150
- onConfigChange(config: Record<string, unknown>): Promise<void>;
529
+ export interface ConfigButtonField extends ConfigFieldBase {
530
+ type: 'button';
531
+ /** Button label text */
532
+ buttonLabel: string;
533
+ /** Visual variant */
534
+ variant?: 'default' | 'danger' | 'primary';
535
+ /** tRPC action identifier — the form handler calls this action when pressed */
536
+ action: string;
537
+ /** Confirmation prompt before executing (optional) */
538
+ confirmMessage?: string;
539
+ }
540
+ /**
541
+ * Select whose options are pulled from a customAction on an addon at
542
+ * render time. Generalises the "user pastes a token, server returns
543
+ * the list of zones / buckets / dirs they can pick from" UX pattern
544
+ * across every addon that integrates with an external API.
545
+ *
546
+ * Wiring at render time (admin-ui side):
547
+ * 1. Collect `paramsFromForm` keys from the current form values.
548
+ * 2. Merge with `paramsStatic`.
549
+ * 3. Call `trpc.addons.custom({addonId, action, input}).query()`.
550
+ * 4. Map each result item via `mapOption` → `{value, label, description?}`.
551
+ * 5. If `refreshOn` is set, re-fetch when any listed form key changes.
552
+ *
553
+ * Example (cloudflare-tunnel zone picker):
554
+ * { type: 'addon-action-select',
555
+ * key: 'zoneId', label: 'Zone',
556
+ * addonId: 'cloudflare-tunnel',
557
+ * action: 'listZones',
558
+ * paramsFromForm: { token: 'apiToken' },
559
+ * refreshOn: ['apiToken'],
560
+ * mapOption: { value: 'id', label: 'name' } }
561
+ */
562
+ export interface ConfigAddonActionSelectField extends ConfigFieldBase {
563
+ type: 'addon-action-select';
564
+ addonId: string;
565
+ action: string;
566
+ /** Map form-value keys → action input keys. */
567
+ paramsFromForm?: Readonly<Record<string, string>>;
568
+ /** Static params merged into the action input. */
569
+ paramsStatic?: Readonly<Record<string, unknown>>;
570
+ /** Form keys that trigger an options refresh when changed. */
571
+ refreshOn?: readonly string[];
572
+ /** Map a result row to the dropdown option shape. */
573
+ mapOption: {
574
+ readonly value: string;
575
+ readonly label: string;
576
+ readonly description?: string;
577
+ };
578
+ /** Optional message shown when the form is missing required params (e.g. token). */
579
+ emptyParamsMessage?: string;
580
+ /** Optional message shown when the action returns no results. */
581
+ emptyResultsMessage?: string;
582
+ }
583
+ /**
584
+ * Button that invokes an addon customAction. Used for "Verify token /
585
+ * Test connection / Refresh credentials" affordances inside addon
586
+ * settings panels. The form renderer surfaces success + error inline.
587
+ */
588
+ export interface ConfigAddonActionButtonField extends ConfigFieldBase {
589
+ type: 'addon-action-button';
590
+ addonId: string;
591
+ action: string;
592
+ /** Visible label. */
593
+ buttonLabel: string;
594
+ /** Visual variant. */
595
+ variant?: 'default' | 'primary' | 'danger';
596
+ /** Map form-value keys → action input keys. */
597
+ paramsFromForm?: Readonly<Record<string, string>>;
598
+ /** Static params merged into the action input. */
599
+ paramsStatic?: Readonly<Record<string, unknown>>;
600
+ /** Toast/inline success message template. `{key}` placeholders are
601
+ * resolved against the action result. */
602
+ successMessage?: string;
603
+ /** Confirmation prompt before executing. */
604
+ confirmMessage?: string;
151
605
  }
606
+ /**
607
+ * Describes an async resolver that the form renderer should call to
608
+ * fetch deferred-load data a field depends on (e.g. the addon catalog
609
+ * for a pipeline-editor, a dynamic options list for a select, …).
610
+ *
611
+ * The renderer dispatches through `client.trpc[capName][methodName]
612
+ * .query(input)` — the field declares WHICH cap + method + input to
613
+ * call, and the renderer stays oblivious to the endpoint naming.
614
+ * Results are cached client-side keyed by `(capName, methodName,
615
+ * input)` so two fields pointing at the same resolver deduplicate
616
+ * automatically.
617
+ *
618
+ * Not an endpoint to arbitrary HTTP — the tRPC proxy gates it to the
619
+ * server's declared cap surface + each cap's auth rules, same as
620
+ * every other `.query()` call the UI makes.
621
+ */
622
+ export interface AsyncResolverRef {
623
+ /** tRPC cap namespace (e.g. `pipelineExecutor`, `pipelineOrchestrator`). */
624
+ readonly capName: string;
625
+ /** Method on that cap — must be a `.query()` (no mutations via resolvers). */
626
+ readonly methodName: string;
627
+ /** Input payload passed verbatim; serialised into the React Query key. */
628
+ readonly input?: Readonly<Record<string, unknown>>;
629
+ }
630
+ /**
631
+ * Camera pipeline editor field (stateless-pipeline Phase 6, option B).
632
+ *
633
+ * The FormBuilder renders this as the rich `PipelineBuilder` composite
634
+ * (step tree + engine picker + template picker) instead of a flat
635
+ * input. `value` is always a fully-resolved `CameraPipelineConfig` —
636
+ * when the camera has no persisted pipeline, the contributor
637
+ * (orchestrator) fills it with the cluster default server-side so
638
+ * the renderer stays dumb about nullability.
639
+ *
640
+ * `nodeId` names the runner node whose addon catalog powers the
641
+ * editor. It's exposed explicitly (rather than buried inside the
642
+ * resolver) for diagnostics, UI labels, and cache keying. The
643
+ * catalog itself isn't embedded — `catalogResolver` tells the
644
+ * renderer how to lazy-load it via the shared resolver hook, which
645
+ * React Query caches once per `(capName, methodName, input)`. That
646
+ * way 50 cameras assigned to the same node don't each trigger 50
647
+ * catalog fetches.
648
+ *
649
+ * Templates are NOT described by a resolver — they're a hub-wide
650
+ * library fetched in one place by the editor directly.
651
+ */
652
+ export interface ConfigPipelineEditorField extends ConfigFieldBase {
653
+ type: 'pipeline-editor';
654
+ /** Runner node whose catalog powers the editor. */
655
+ readonly nodeId: string;
656
+ /** The camera this field edits — used by the renderer to fetch per-camera settings. */
657
+ readonly deviceId: number;
658
+ /** How to fetch the addon catalog for this node. */
659
+ readonly catalogResolver: AsyncResolverRef;
660
+ }
661
+ /**
662
+ * Polygon zone CRUD editor field. Renders a canvas with a backdrop
663
+ * (stream snapshot or live preview) where the operator draws polygon
664
+ * zones, plus the list of existing zones (user + onboard) with
665
+ * editing affordances.
666
+ *
667
+ * Stateless from the form's point of view: bound directly to
668
+ * `api.zones.*` mutations, NOT to the form's `value`. The renderer
669
+ * subscribes to `dev.state.zones.onChanged` for live updates so two
670
+ * operators editing the same camera see each other's changes
671
+ * immediately. `value` is therefore not consumed by the renderer
672
+ * (kept on the discriminated union only so the form layout engine
673
+ * stays homogeneous).
674
+ *
675
+ * Every zone is operator-drawn and fully editable — firmware-reported
676
+ * onboard zones are deliberately out of scope for the first iteration.
677
+ */
678
+ export interface ConfigZoneEditorField extends ConfigFieldBase {
679
+ type: 'zone-editor';
680
+ /**
681
+ * Optional backdrop hint. `'snapshot'` (default) fetches a still
682
+ * via the snapshot cap; `'stream'` overlays the live WebRTC view.
683
+ *
684
+ * The renderer reads the `deviceId` from the device-details page
685
+ * context — the field doesn't carry it inline so the schema stays
686
+ * device-agnostic and addons can ship a static contribution.
687
+ */
688
+ readonly backdrop?: 'snapshot' | 'stream';
689
+ }
690
+ /**
691
+ * Live statistics field — bound to the "Live Stats" top-tab declared
692
+ * by the analytics addon. Renders occupancy snapshots, audio metrics
693
+ * (current + history), and rolling-window charts. The form's `value`
694
+ * is unused; the renderer reads `deviceId` from the device-details
695
+ * page context and pulls live data through DeviceProxy.
696
+ */
697
+ export interface ConfigLiveStatsField extends ConfigFieldBase {
698
+ type: 'live-stats';
699
+ }
700
+ /**
701
+ * Live-stream player block — snapshot poster + play/stop + quality
702
+ * selector + detection overlay. Contributed by `addon-stream-broker`.
703
+ */
704
+ export interface ConfigLiveStreamViewerField extends ConfigFieldBase {
705
+ type: 'live-stream-viewer';
706
+ }
707
+ /**
708
+ * Pipeline-quick-stats block — Phase / Detection FPS / Inference time /
709
+ * Active Tracks. Contributed by `addon-pipeline-orchestrator`. The
710
+ * adapter pulls live values from `pipelineRunner.getCameraMetrics` +
711
+ * `pipelineAnalytics.getActiveTracks` via the device proxy.
712
+ */
713
+ export interface ConfigPipelineStatsField extends ConfigFieldBase {
714
+ type: 'pipeline-stats';
715
+ }
716
+ /**
717
+ * Stream network-quality block — per-stream bitrate / packet loss
718
+ * table sourced from the network-quality cap.
719
+ */
720
+ export interface ConfigStreamNetworkStatsField extends ConfigFieldBase {
721
+ type: 'stream-network-stats';
722
+ }
723
+ /**
724
+ * Doorbell recent-press history block. Contributed by
725
+ * `addon-provider-reolink` only when the device advertises the
726
+ * `DoorbellButton` feature; absent on every other camera.
727
+ */
728
+ export interface ConfigDoorbellRecentField extends ConfigFieldBase {
729
+ type: 'doorbell-recent';
730
+ /** Max history rows to render (default: 10). */
731
+ readonly historyLimit?: number;
732
+ }
733
+ /**
734
+ * Device-info block — id / stableId / name / type / provider / capability
735
+ * badges. Contributed by `device-manager`'s base section, redirected to
736
+ * the overview tab via `placement.tab = 'overview'`.
737
+ */
738
+ export interface ConfigDeviceInfoField extends ConfigFieldBase {
739
+ type: 'device-info';
740
+ }
741
+ /**
742
+ * Generic widget field — addon-contributed widget mounted by the
743
+ * shared `<WidgetSlot>` runtime via the `WidgetRegistry`.
744
+ *
745
+ * The form-builder reads `widgetId` as the public widget identifier
746
+ * (`<addonId>/<stableId>`) and forwards `widgetConfig` as `props.config`
747
+ * to the widget. Different from the legacy bespoke field types
748
+ * (`'live-stats'`, `'zone-editor'`, `'pipeline-stats'`, …) which are now
749
+ * DEPRECATED — those required per-type renderer registration in
750
+ * admin-ui; widget fields go through the generic registry without a
751
+ * code change in admin-ui.
752
+ *
753
+ * `key` is the form-field's unique identifier (kept distinct from the
754
+ * widget identifier so the same widget can be mounted twice in the
755
+ * same form). `widgetId` is the public id resolved against the
756
+ * WidgetRegistry.
757
+ *
758
+ * Field carries no stored value — the widget owns its own state via
759
+ * DeviceProxy / runtime-state hooks. Placed in
760
+ * `ConfigFieldWithValue` only so the discriminated-union round-trip
761
+ * through `hydrateSchema` stays homogeneous (`value: null`).
762
+ */
763
+ export interface ConfigWidgetField extends ConfigFieldBase {
764
+ readonly type: 'widget';
765
+ /** `<addonId>/<stableId>` — resolved via the WidgetRegistry. */
766
+ readonly widgetId: string;
767
+ /** Per-instance config payload forwarded to the widget as `props.config`. */
768
+ readonly widgetConfig?: Readonly<Record<string, unknown>>;
769
+ }
770
+ /** A `ConfigField` with its current value attached inline. */
771
+ export type ConfigFieldWithValue = (ConfigTextField & {
772
+ readonly value: unknown;
773
+ }) | (ConfigNumberField & {
774
+ readonly value: unknown;
775
+ }) | (ConfigBooleanField & {
776
+ readonly value: unknown;
777
+ }) | (ConfigSelectField & {
778
+ readonly value: unknown;
779
+ }) | (ConfigMultiSelectField & {
780
+ readonly value: unknown;
781
+ }) | (ConfigColorField & {
782
+ readonly value: unknown;
783
+ }) | (ConfigPasswordField & {
784
+ readonly value: unknown;
785
+ }) | (ConfigTextAreaField & {
786
+ readonly value: unknown;
787
+ }) | (ConfigSliderField & {
788
+ readonly value: unknown;
789
+ }) | (ConfigTagsField & {
790
+ readonly value: unknown;
791
+ }) | (ConfigGroupFieldWithValue) | (ConfigSubTabsFieldWithValue) | ConfigSeparatorField | ConfigInfoField | ConfigObjectArrayField | (ConfigEditableArrayField & {
792
+ readonly value: unknown;
793
+ }) | (ConfigModelSelectorField & {
794
+ readonly value: unknown;
795
+ }) | (ConfigStorageLocationField & {
796
+ readonly value: unknown;
797
+ }) | (ConfigProbeField & {
798
+ readonly value: unknown;
799
+ }) | (ConfigButtonField) | (ConfigPipelineEditorField & {
800
+ readonly value: unknown;
801
+ }) | (ConfigNodeSelectField & {
802
+ readonly value: unknown;
803
+ }) | (ConfigNodeMultiSelectField & {
804
+ readonly value: unknown;
805
+ }) | (ConfigZoneEditorField & {
806
+ readonly value: unknown;
807
+ }) | (ConfigLiveStatsField & {
808
+ readonly value: unknown;
809
+ }) | (ConfigLiveStreamViewerField & {
810
+ readonly value: unknown;
811
+ }) | (ConfigPipelineStatsField & {
812
+ readonly value: unknown;
813
+ }) | (ConfigStreamNetworkStatsField & {
814
+ readonly value: unknown;
815
+ }) | (ConfigDoorbellRecentField & {
816
+ readonly value: unknown;
817
+ }) | (ConfigDeviceInfoField & {
818
+ readonly value: unknown;
819
+ }) | ConfigWidgetField | (ConfigAddonActionSelectField & {
820
+ readonly value: unknown;
821
+ }) | ConfigAddonActionButtonField;
822
+ /** Recursive version of `ConfigGroupField` with hydrated child fields. */
823
+ export interface ConfigGroupFieldWithValue extends ConfigFieldBase {
824
+ readonly type: 'group';
825
+ readonly fields: readonly ConfigFieldWithValue[];
826
+ readonly style?: 'card' | 'inline' | 'accordion';
827
+ readonly defaultCollapsed?: boolean;
828
+ readonly value?: undefined;
829
+ }
830
+ /** Hydrated sibling of `ConfigSubTabDefinition` — fields inside each
831
+ * sub-tab carry their resolved values. */
832
+ export interface ConfigSubTabDefinitionWithValue {
833
+ readonly id: string;
834
+ readonly label: string;
835
+ readonly icon?: string;
836
+ readonly badge?: string;
837
+ readonly fields: readonly ConfigFieldWithValue[];
838
+ }
839
+ /** Recursive version of `ConfigSubTabsField` with hydrated child fields. */
840
+ export interface ConfigSubTabsFieldWithValue extends ConfigFieldBase {
841
+ readonly type: 'sub-tabs';
842
+ readonly tabs: readonly ConfigSubTabDefinitionWithValue[];
843
+ readonly value?: undefined;
844
+ }
845
+ export interface ConfigSectionWithValues extends Omit<ConfigSection, 'fields'> {
846
+ /**
847
+ * Array kept mutable (not `readonly`) to stay assignable to the Zod-inferred
848
+ * wire shape produced by `DEVICE_SETTINGS_CONTRIBUTION_METHODS.getDeviceSettingsContribution.output`.
849
+ * Consumers treat it as immutable by convention — mutation is never
850
+ * expected and would be a bug.
851
+ */
852
+ fields: ConfigFieldWithValue[];
853
+ }
854
+ export interface ConfigUISchemaWithValues {
855
+ /** See `ConfigSectionWithValues.fields` — kept mutable for Zod wire compat. */
856
+ tabs?: ConfigTabDeclaration[];
857
+ sections: ConfigSectionWithValues[];
858
+ }
859
+ /**
860
+ * Merge a `ConfigUISchema` with a raw `values` record into a
861
+ * `ConfigUISchemaWithValues`. Used by every `get*Settings` backend endpoint
862
+ * before returning to the admin UI. Groups are walked recursively.
863
+ *
864
+ * For each leaf field:
865
+ * - structural fields (`separator`, `info`, `button`) pass through unchanged
866
+ * - other fields get `value = values[key] ?? field.default ?? null`
867
+ *
868
+ * Unknown keys in `values` (keys not declared in the schema) are silently
869
+ * ignored — they don't contribute to the output. Missing keys fall back to
870
+ * the schema default or `null`. This mirrors the old backend behaviour where
871
+ * `FormBuilder` rendered `values[key] ?? field.default`.
872
+ */
873
+ export declare function hydrateSchema(schema: ConfigUISchema, values: Record<string, unknown>): ConfigUISchemaWithValues;
152
874
  //# sourceMappingURL=config-ui.d.ts.map