@camstack/types 0.1.13 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon/base-addon.d.ts +262 -0
- package/dist/addon/base-addon.d.ts.map +1 -0
- package/dist/capabilities/accessories.cap.d.ts +42 -0
- package/dist/capabilities/accessories.cap.d.ts.map +1 -0
- package/dist/capabilities/addon-pages-source.cap.d.ts +41 -0
- package/dist/capabilities/addon-pages-source.cap.d.ts.map +1 -0
- package/dist/capabilities/addon-pages.cap.d.ts +36 -0
- package/dist/capabilities/addon-pages.cap.d.ts.map +1 -0
- package/dist/capabilities/addon-routes.cap.d.ts +22 -0
- package/dist/capabilities/addon-routes.cap.d.ts.map +1 -0
- package/dist/capabilities/addon-settings.cap.d.ts +170 -0
- package/dist/capabilities/addon-settings.cap.d.ts.map +1 -0
- package/dist/capabilities/addon-widgets-source.cap.d.ts +103 -0
- package/dist/capabilities/addon-widgets-source.cap.d.ts.map +1 -0
- package/dist/capabilities/addon-widgets.cap.d.ts +98 -0
- package/dist/capabilities/addon-widgets.cap.d.ts.map +1 -0
- package/dist/capabilities/addons.cap.d.ts +280 -0
- package/dist/capabilities/addons.cap.d.ts.map +1 -0
- package/dist/capabilities/admin-ui.cap.d.ts +14 -0
- package/dist/capabilities/admin-ui.cap.d.ts.map +1 -0
- package/dist/capabilities/advanced-notifier.cap.d.ts +60 -0
- package/dist/capabilities/advanced-notifier.cap.d.ts.map +1 -0
- package/dist/capabilities/alerts.cap.d.ts +164 -0
- package/dist/capabilities/alerts.cap.d.ts.map +1 -0
- package/dist/capabilities/audio-analysis.cap.d.ts +46 -0
- package/dist/capabilities/audio-analysis.cap.d.ts.map +1 -0
- package/dist/capabilities/audio-analyzer.cap.d.ts +148 -0
- package/dist/capabilities/audio-analyzer.cap.d.ts.map +1 -0
- package/dist/capabilities/audio-codec.cap.d.ts +202 -0
- package/dist/capabilities/audio-codec.cap.d.ts.map +1 -0
- package/dist/capabilities/audio-metrics.cap.d.ts +174 -0
- package/dist/capabilities/audio-metrics.cap.d.ts.map +1 -0
- package/dist/capabilities/auth-provider.cap.d.ts +49 -0
- package/dist/capabilities/auth-provider.cap.d.ts.map +1 -0
- package/dist/capabilities/backup.cap.d.ts +48 -0
- package/dist/capabilities/backup.cap.d.ts.map +1 -0
- package/dist/capabilities/battery.cap.d.ts +85 -0
- package/dist/capabilities/battery.cap.d.ts.map +1 -0
- package/dist/capabilities/brightness.cap.d.ts +64 -0
- package/dist/capabilities/brightness.cap.d.ts.map +1 -0
- package/dist/capabilities/camera-credentials.cap.d.ts +102 -0
- package/dist/capabilities/camera-credentials.cap.d.ts.map +1 -0
- package/dist/capabilities/camera-streams.cap.d.ts +214 -0
- package/dist/capabilities/camera-streams.cap.d.ts.map +1 -0
- package/dist/capabilities/capability-definition.d.ts +474 -0
- package/dist/capabilities/capability-definition.d.ts.map +1 -0
- package/dist/capabilities/custom-actions.d.ts +47 -0
- package/dist/capabilities/custom-actions.d.ts.map +1 -0
- package/dist/capabilities/decoder.cap.d.ts +173 -0
- package/dist/capabilities/decoder.cap.d.ts.map +1 -0
- package/dist/capabilities/detection-pipeline.cap.d.ts +34 -0
- package/dist/capabilities/detection-pipeline.cap.d.ts.map +1 -0
- package/dist/capabilities/device-discovery.cap.d.ts +247 -0
- package/dist/capabilities/device-discovery.cap.d.ts.map +1 -0
- package/dist/capabilities/device-manager.cap.d.ts +709 -0
- package/dist/capabilities/device-manager.cap.d.ts.map +1 -0
- package/dist/capabilities/device-ops.cap.d.ts +87 -0
- package/dist/capabilities/device-ops.cap.d.ts.map +1 -0
- package/dist/capabilities/device-provider.cap.d.ts +151 -0
- package/dist/capabilities/device-provider.cap.d.ts.map +1 -0
- package/dist/capabilities/device-state.cap.d.ts +97 -0
- package/dist/capabilities/device-state.cap.d.ts.map +1 -0
- package/dist/capabilities/device-status.cap.d.ts +54 -0
- package/dist/capabilities/device-status.cap.d.ts.map +1 -0
- package/dist/capabilities/doorbell.cap.d.ts +62 -0
- package/dist/capabilities/doorbell.cap.d.ts.map +1 -0
- package/dist/capabilities/embedding-encoder.cap.d.ts +41 -0
- package/dist/capabilities/embedding-encoder.cap.d.ts.map +1 -0
- package/dist/capabilities/events.cap.d.ts +48 -0
- package/dist/capabilities/events.cap.d.ts.map +1 -0
- package/dist/capabilities/feature-probe.cap.d.ts +79 -0
- package/dist/capabilities/feature-probe.cap.d.ts.map +1 -0
- package/dist/capabilities/index.d.ts +177 -0
- package/dist/capabilities/index.d.ts.map +1 -0
- package/dist/capabilities/integrations.cap.d.ts +182 -0
- package/dist/capabilities/integrations.cap.d.ts.map +1 -0
- package/dist/capabilities/intercom.cap.d.ts +108 -0
- package/dist/capabilities/intercom.cap.d.ts.map +1 -0
- package/dist/capabilities/log-destination.cap.d.ts +70 -0
- package/dist/capabilities/log-destination.cap.d.ts.map +1 -0
- package/dist/capabilities/metrics-provider.cap.d.ts +522 -0
- package/dist/capabilities/metrics-provider.cap.d.ts.map +1 -0
- package/dist/capabilities/motion-detection.cap.d.ts +107 -0
- package/dist/capabilities/motion-detection.cap.d.ts.map +1 -0
- package/dist/capabilities/motion-trigger.cap.d.ts +78 -0
- package/dist/capabilities/motion-trigger.cap.d.ts.map +1 -0
- package/dist/capabilities/motion.cap.d.ts +122 -0
- package/dist/capabilities/motion.cap.d.ts.map +1 -0
- package/dist/capabilities/native-object-detection.cap.d.ts +127 -0
- package/dist/capabilities/native-object-detection.cap.d.ts.map +1 -0
- package/dist/capabilities/network-access.cap.d.ts +67 -0
- package/dist/capabilities/network-access.cap.d.ts.map +1 -0
- package/dist/capabilities/network-quality.cap.d.ts +95 -0
- package/dist/capabilities/network-quality.cap.d.ts.map +1 -0
- package/dist/capabilities/nodes.cap.d.ts +200 -0
- package/dist/capabilities/nodes.cap.d.ts.map +1 -0
- package/dist/capabilities/notification-output.cap.d.ts +44 -0
- package/dist/capabilities/notification-output.cap.d.ts.map +1 -0
- package/dist/capabilities/osd.cap.d.ts +236 -0
- package/dist/capabilities/osd.cap.d.ts.map +1 -0
- package/dist/capabilities/pipeline-analytics.cap.d.ts +501 -0
- package/dist/capabilities/pipeline-analytics.cap.d.ts.map +1 -0
- package/dist/capabilities/pipeline-executor.cap.d.ts +922 -0
- package/dist/capabilities/pipeline-executor.cap.d.ts.map +1 -0
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +793 -0
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts.map +1 -0
- package/dist/capabilities/pipeline-runner.cap.d.ts +393 -0
- package/dist/capabilities/pipeline-runner.cap.d.ts.map +1 -0
- package/dist/capabilities/platform-probe.cap.d.ts +168 -0
- package/dist/capabilities/platform-probe.cap.d.ts.map +1 -0
- package/dist/capabilities/ptz-autotrack.cap.d.ts +188 -0
- package/dist/capabilities/ptz-autotrack.cap.d.ts.map +1 -0
- package/dist/capabilities/ptz.cap.d.ts +80 -0
- package/dist/capabilities/ptz.cap.d.ts.map +1 -0
- package/dist/capabilities/reboot.cap.d.ts +32 -0
- package/dist/capabilities/reboot.cap.d.ts.map +1 -0
- package/dist/capabilities/recording-engine.cap.d.ts +477 -0
- package/dist/capabilities/recording-engine.cap.d.ts.map +1 -0
- package/dist/capabilities/recording.cap.d.ts +43 -0
- package/dist/capabilities/recording.cap.d.ts.map +1 -0
- package/dist/capabilities/restreamer.cap.d.ts +51 -0
- package/dist/capabilities/restreamer.cap.d.ts.map +1 -0
- package/dist/capabilities/schemas/detection-shared.d.ts +63 -0
- package/dist/capabilities/schemas/detection-shared.d.ts.map +1 -0
- package/dist/capabilities/schemas/orchestrator-metrics.d.ts +44 -0
- package/dist/capabilities/schemas/orchestrator-metrics.d.ts.map +1 -0
- package/dist/capabilities/schemas/streaming-shared.d.ts +177 -0
- package/dist/capabilities/schemas/streaming-shared.d.ts.map +1 -0
- package/dist/capabilities/schemas/zone-rule.d.ts +74 -0
- package/dist/capabilities/schemas/zone-rule.d.ts.map +1 -0
- package/dist/capabilities/settings-store.cap.d.ts +198 -0
- package/dist/capabilities/settings-store.cap.d.ts.map +1 -0
- package/dist/capabilities/snapshot-provider.cap.d.ts +40 -0
- package/dist/capabilities/snapshot-provider.cap.d.ts.map +1 -0
- package/dist/capabilities/snapshot.cap.d.ts +78 -0
- package/dist/capabilities/snapshot.cap.d.ts.map +1 -0
- package/dist/capabilities/storage.cap.d.ts +104 -0
- package/dist/capabilities/storage.cap.d.ts.map +1 -0
- package/dist/capabilities/stream-broker.cap.d.ts +416 -0
- package/dist/capabilities/stream-broker.cap.d.ts.map +1 -0
- package/dist/capabilities/streaming-engine.cap.d.ts +58 -0
- package/dist/capabilities/streaming-engine.cap.d.ts.map +1 -0
- package/dist/capabilities/switch.cap.d.ts +66 -0
- package/dist/capabilities/switch.cap.d.ts.map +1 -0
- package/dist/capabilities/system.cap.d.ts +86 -0
- package/dist/capabilities/system.cap.d.ts.map +1 -0
- package/dist/capabilities/toast.cap.d.ts +56 -0
- package/dist/capabilities/toast.cap.d.ts.map +1 -0
- package/dist/capabilities/turn-provider.cap.d.ts +43 -0
- package/dist/capabilities/turn-provider.cap.d.ts.map +1 -0
- package/dist/capabilities/user-management.cap.d.ts +378 -0
- package/dist/capabilities/user-management.cap.d.ts.map +1 -0
- package/dist/capabilities/webrtc-session.cap.d.ts +181 -0
- package/dist/capabilities/webrtc-session.cap.d.ts.map +1 -0
- package/dist/capabilities/webrtc.cap.d.ts +72 -0
- package/dist/capabilities/webrtc.cap.d.ts.map +1 -0
- package/dist/capabilities/zone-analytics.cap.d.ts +213 -0
- package/dist/capabilities/zone-analytics.cap.d.ts.map +1 -0
- package/dist/capabilities/zone-rules.cap.d.ts +129 -0
- package/dist/capabilities/zone-rules.cap.d.ts.map +1 -0
- package/dist/capabilities/zones.cap.d.ts +151 -0
- package/dist/capabilities/zones.cap.d.ts.map +1 -0
- package/dist/catalogs/audio-classmap.d.ts +16 -0
- package/dist/catalogs/audio-classmap.d.ts.map +1 -0
- package/dist/catalogs/coco-classmap.d.ts.map +1 -1
- package/dist/constants.d.ts +50 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/deps/binary-downloader.d.ts +41 -0
- package/dist/deps/binary-downloader.d.ts.map +1 -0
- package/dist/deps/ffmpeg-downloader.d.ts +13 -0
- package/dist/deps/ffmpeg-downloader.d.ts.map +1 -0
- package/dist/deps/index.d.ts +4 -0
- package/dist/deps/index.d.ts.map +1 -0
- package/dist/deps/python-downloader.d.ts +34 -0
- package/dist/deps/python-downloader.d.ts.map +1 -0
- package/dist/device/accessory.d.ts +62 -0
- package/dist/device/accessory.d.ts.map +1 -0
- package/dist/device/base-device-provider.d.ts +170 -0
- package/dist/device/base-device-provider.d.ts.map +1 -0
- package/dist/device/base-device.d.ts +287 -0
- package/dist/device/base-device.d.ts.map +1 -0
- package/dist/device/camera-device.d.ts +49 -0
- package/dist/device/camera-device.d.ts.map +1 -0
- package/dist/device/device-binding.d.ts +23 -0
- package/dist/device/device-binding.d.ts.map +1 -0
- package/dist/device/device-config.d.ts +65 -0
- package/dist/device/device-config.d.ts.map +1 -0
- package/dist/device/device-context.d.ts +256 -0
- package/dist/device/device-context.d.ts.map +1 -0
- package/dist/device/device-management.d.ts +118 -0
- package/dist/device/device-management.d.ts.map +1 -0
- package/dist/device/device-profile.d.ts +161 -0
- package/dist/device/device-profile.d.ts.map +1 -0
- package/dist/device/device-runtime-state.d.ts +124 -0
- package/dist/device/device-runtime-state.d.ts.map +1 -0
- package/dist/device/device-state-handle.d.ts +161 -0
- package/dist/device/device-state-handle.d.ts.map +1 -0
- package/dist/device/device-type.d.ts +68 -0
- package/dist/device/device-type.d.ts.map +1 -0
- package/dist/device/device.d.ts +87 -0
- package/dist/device/device.d.ts.map +1 -0
- package/dist/device/features.d.ts +29 -0
- package/dist/device/features.d.ts.map +1 -0
- package/dist/device/index.d.ts +20 -0
- package/dist/device/index.d.ts.map +1 -0
- package/dist/device/runtime-state-helpers.d.ts +69 -0
- package/dist/device/runtime-state-helpers.d.ts.map +1 -0
- package/dist/device/system-mirror.d.ts +318 -0
- package/dist/device/system-mirror.d.ts.map +1 -0
- package/dist/device/zod-to-config-ui.d.ts +23 -0
- package/dist/device/zod-to-config-ui.d.ts.map +1 -0
- package/dist/enums/event-category.d.ts +327 -0
- package/dist/enums/event-category.d.ts.map +1 -0
- package/dist/enums/event-source-type.d.ts +8 -0
- package/dist/enums/event-source-type.d.ts.map +1 -0
- package/dist/enums/index.d.ts +3 -0
- package/dist/enums/index.d.ts.map +1 -0
- package/dist/generated/addon-api.d.ts +13401 -3202
- package/dist/generated/addon-api.d.ts.map +1 -1
- package/dist/generated/cap-status-types.d.ts +51 -0
- package/dist/generated/cap-status-types.d.ts.map +1 -0
- package/dist/generated/capability-router-map.d.ts +257 -0
- package/dist/generated/capability-router-map.d.ts.map +1 -0
- package/dist/generated/device-local-state.d.ts +82 -0
- package/dist/generated/device-local-state.d.ts.map +1 -0
- package/dist/generated/device-proxy.d.ts +146 -0
- package/dist/generated/device-proxy.d.ts.map +1 -0
- package/dist/generated/system-proxy.d.ts +80 -0
- package/dist/generated/system-proxy.d.ts.map +1 -0
- package/dist/helpers/bind-addon-actions.d.ts +19 -0
- package/dist/helpers/bind-addon-actions.d.ts.map +1 -0
- package/dist/index.d.ts +86 -22
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12328 -436
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11952 -427
- package/dist/index.mjs.map +1 -1
- package/dist/interfaces/addon.d.ts +678 -132
- package/dist/interfaces/addon.d.ts.map +1 -1
- package/dist/interfaces/advanced-notifier.d.ts +3 -2
- package/dist/interfaces/advanced-notifier.d.ts.map +1 -1
- package/dist/interfaces/agent-protocol.d.ts +17 -173
- package/dist/interfaces/agent-protocol.d.ts.map +1 -1
- package/dist/interfaces/agent.d.ts +61 -0
- package/dist/interfaces/agent.d.ts.map +1 -1
- package/dist/interfaces/alerts.d.ts +14 -0
- package/dist/interfaces/alerts.d.ts.map +1 -0
- package/dist/interfaces/analysis-persistence.d.ts +37 -19
- package/dist/interfaces/analysis-persistence.d.ts.map +1 -1
- package/dist/interfaces/analysis.d.ts +33 -4
- package/dist/interfaces/analysis.d.ts.map +1 -1
- package/dist/interfaces/api-responses.d.ts +117 -0
- package/dist/interfaces/api-responses.d.ts.map +1 -0
- package/dist/interfaces/api-shared.d.ts +5 -79
- package/dist/interfaces/api-shared.d.ts.map +1 -1
- package/dist/interfaces/audio-analyzer.d.ts +49 -0
- package/dist/interfaces/audio-analyzer.d.ts.map +1 -0
- package/dist/interfaces/audio-codec.d.ts +123 -0
- package/dist/interfaces/audio-codec.d.ts.map +1 -0
- package/dist/interfaces/audio-inference-engine.d.ts +19 -0
- package/dist/interfaces/audio-inference-engine.d.ts.map +1 -0
- package/dist/interfaces/auth-provider.d.ts.map +1 -1
- package/dist/interfaces/auth.d.ts +4 -25
- package/dist/interfaces/auth.d.ts.map +1 -1
- package/dist/interfaces/camera-pipeline.d.ts +7 -20
- package/dist/interfaces/camera-pipeline.d.ts.map +1 -1
- package/dist/interfaces/capability.d.ts +159 -23
- package/dist/interfaces/capability.d.ts.map +1 -1
- package/dist/interfaces/config-ui.d.ts +609 -24
- package/dist/interfaces/config-ui.d.ts.map +1 -1
- package/dist/interfaces/context.d.ts +9 -4
- package/dist/interfaces/context.d.ts.map +1 -1
- package/dist/interfaces/decoder.d.ts +38 -3
- package/dist/interfaces/decoder.d.ts.map +1 -1
- package/dist/interfaces/detection-addon.d.ts +6 -6
- package/dist/interfaces/detection-addon.d.ts.map +1 -1
- package/dist/interfaces/device-capabilities/camera.d.ts +95 -18
- package/dist/interfaces/device-capabilities/camera.d.ts.map +1 -1
- package/dist/interfaces/device-capabilities/index.d.ts +0 -13
- package/dist/interfaces/device-capabilities/index.d.ts.map +1 -1
- package/dist/interfaces/device-provider.d.ts +18 -16
- package/dist/interfaces/device-provider.d.ts.map +1 -1
- package/dist/interfaces/device.d.ts +4 -21
- package/dist/interfaces/device.d.ts.map +1 -1
- package/dist/interfaces/embedding-encoder.d.ts +19 -0
- package/dist/interfaces/embedding-encoder.d.ts.map +1 -0
- package/dist/interfaces/engine-slots.d.ts +10 -0
- package/dist/interfaces/engine-slots.d.ts.map +1 -0
- package/dist/interfaces/event-bus.d.ts +710 -26
- package/dist/interfaces/event-bus.d.ts.map +1 -1
- package/dist/interfaces/inference-capabilities.d.ts +0 -17
- package/dist/interfaces/inference-capabilities.d.ts.map +1 -1
- package/dist/interfaces/inference-engine.d.ts +30 -10
- package/dist/interfaces/inference-engine.d.ts.map +1 -1
- package/dist/interfaces/integration-registry.d.ts +20 -20
- package/dist/interfaces/integration-registry.d.ts.map +1 -1
- package/dist/interfaces/kernel-abstractions.d.ts +83 -0
- package/dist/interfaces/kernel-abstractions.d.ts.map +1 -0
- package/dist/interfaces/logging.d.ts +89 -8
- package/dist/interfaces/logging.d.ts.map +1 -1
- package/dist/interfaces/metrics-provider.d.ts +17 -0
- package/dist/interfaces/metrics-provider.d.ts.map +1 -0
- package/dist/interfaces/network-quality.d.ts +4 -4
- package/dist/interfaces/network.d.ts +0 -16
- package/dist/interfaces/network.d.ts.map +1 -1
- package/dist/interfaces/notification.d.ts +1 -1
- package/dist/interfaces/pipeline-executor-capability.d.ts +200 -0
- package/dist/interfaces/pipeline-executor-capability.d.ts.map +1 -0
- package/dist/interfaces/pipeline-orchestrator-capability.d.ts +165 -0
- package/dist/interfaces/pipeline-orchestrator-capability.d.ts.map +1 -0
- package/dist/interfaces/pipeline-runner-capability.d.ts +147 -0
- package/dist/interfaces/pipeline-runner-capability.d.ts.map +1 -0
- package/dist/interfaces/pipeline-runner.d.ts +18 -2
- package/dist/interfaces/pipeline-runner.d.ts.map +1 -1
- package/dist/interfaces/platform.d.ts +1 -1
- package/dist/interfaces/platform.d.ts.map +1 -1
- package/dist/interfaces/queryable.d.ts +26 -0
- package/dist/interfaces/queryable.d.ts.map +1 -0
- package/dist/interfaces/raw-tensor-engine.d.ts +16 -0
- package/dist/interfaces/raw-tensor-engine.d.ts.map +1 -0
- package/dist/interfaces/readiness.d.ts +101 -0
- package/dist/interfaces/readiness.d.ts.map +1 -0
- package/dist/interfaces/repl.d.ts +1 -1
- package/dist/interfaces/restreamer.d.ts +3 -3
- package/dist/interfaces/scoped-token.d.ts +1 -21
- package/dist/interfaces/scoped-token.d.ts.map +1 -1
- package/dist/interfaces/server-analysis.d.ts +30 -87
- package/dist/interfaces/server-analysis.d.ts.map +1 -1
- package/dist/interfaces/storage.d.ts +123 -45
- package/dist/interfaces/storage.d.ts.map +1 -1
- package/dist/interfaces/stream-broker.d.ts +285 -17
- package/dist/interfaces/stream-broker.d.ts.map +1 -1
- package/dist/interfaces/webrtc-provider.d.ts +24 -0
- package/dist/interfaces/webrtc-provider.d.ts.map +1 -1
- package/dist/node.d.ts +6 -0
- package/dist/node.d.ts.map +1 -0
- package/dist/node.js +7583 -0
- package/dist/node.js.map +1 -0
- package/dist/node.mjs +7534 -0
- package/dist/node.mjs.map +1 -0
- package/dist/readiness/index.d.ts +3 -0
- package/dist/readiness/index.d.ts.map +1 -0
- package/dist/readiness/readiness-registry.d.ts +183 -0
- package/dist/readiness/readiness-registry.d.ts.map +1 -0
- package/dist/schemas/auth-records.d.ts +81 -0
- package/dist/schemas/auth-records.d.ts.map +1 -0
- package/dist/storage/filesystem-storage-provider.d.ts +37 -0
- package/dist/storage/filesystem-storage-provider.d.ts.map +1 -0
- package/dist/types/agent-pipeline-settings.d.ts +94 -0
- package/dist/types/agent-pipeline-settings.d.ts.map +1 -0
- package/dist/types/camera-pipeline.d.ts +58 -0
- package/dist/types/camera-pipeline.d.ts.map +1 -0
- package/dist/types/detection.d.ts +195 -38
- package/dist/types/detection.d.ts.map +1 -1
- package/dist/types/device-type.d.ts +4 -0
- package/dist/types/device-type.d.ts.map +1 -1
- package/dist/types/engine-output.d.ts +24 -0
- package/dist/types/engine-output.d.ts.map +1 -0
- package/dist/types/io.d.ts +57 -3
- package/dist/types/io.d.ts.map +1 -1
- package/dist/types/models.d.ts +3 -1
- package/dist/types/models.d.ts.map +1 -1
- package/dist/types/pipeline-schema.d.ts +15 -72
- package/dist/types/pipeline-schema.d.ts.map +1 -1
- package/dist/types/pipeline-step.d.ts +201 -0
- package/dist/types/pipeline-step.d.ts.map +1 -0
- package/dist/types/pipeline.d.ts +24 -1
- package/dist/types/pipeline.d.ts.map +1 -1
- package/dist/utils/element-config-store.d.ts +29 -0
- package/dist/utils/element-config-store.d.ts.map +1 -0
- package/dist/utils/err-msg.d.ts +7 -0
- package/dist/utils/err-msg.d.ts.map +1 -0
- package/dist/utils/json-safe.d.ts +33 -0
- package/dist/utils/json-safe.d.ts.map +1 -0
- package/dist/utils/mask-url.d.ts +10 -0
- package/dist/utils/mask-url.d.ts.map +1 -0
- package/dist/utils/ring-buffer.d.ts +16 -0
- package/dist/utils/ring-buffer.d.ts.map +1 -0
- package/dist/utils/run-inference-step.d.ts +26 -0
- package/dist/utils/run-inference-step.d.ts.map +1 -0
- package/dist/utils/runtime-mapping.d.ts +88 -0
- package/dist/utils/runtime-mapping.d.ts.map +1 -0
- package/dist/utils/zone-rule-eval.d.ts +47 -0
- package/dist/utils/zone-rule-eval.d.ts.map +1 -0
- package/package.json +11 -2
- package/dist/__tests__/addon-capability-provider.test.d.ts +0 -2
- package/dist/__tests__/addon-capability-provider.test.d.ts.map +0 -1
- package/dist/__tests__/addon-declaration.test.d.ts +0 -2
- package/dist/__tests__/addon-declaration.test.d.ts.map +0 -1
- package/dist/__tests__/capability.test.d.ts +0 -2
- package/dist/__tests__/capability.test.d.ts.map +0 -1
- package/dist/interfaces/addon-i18n.d.ts +0 -41
- package/dist/interfaces/addon-i18n.d.ts.map +0 -1
- package/dist/interfaces/classifier.d.ts +0 -8
- package/dist/interfaces/classifier.d.ts.map +0 -1
- package/dist/interfaces/cropper.d.ts +0 -8
- package/dist/interfaces/cropper.d.ts.map +0 -1
- package/dist/interfaces/detector.d.ts +0 -8
- package/dist/interfaces/detector.d.ts.map +0 -1
- package/dist/interfaces/device-capabilities/accessory.d.ts +0 -14
- package/dist/interfaces/device-capabilities/accessory.d.ts.map +0 -1
- package/dist/interfaces/device-capabilities/audio-detector.d.ts +0 -12
- package/dist/interfaces/device-capabilities/audio-detector.d.ts.map +0 -1
- package/dist/interfaces/device-capabilities/doorbell.d.ts +0 -10
- package/dist/interfaces/device-capabilities/doorbell.d.ts.map +0 -1
- package/dist/interfaces/device-capabilities/events.d.ts +0 -47
- package/dist/interfaces/device-capabilities/events.d.ts.map +0 -1
- package/dist/interfaces/device-capabilities/motion-sensor.d.ts +0 -7
- package/dist/interfaces/device-capabilities/motion-sensor.d.ts.map +0 -1
- package/dist/interfaces/device-capabilities/native-detection.d.ts +0 -14
- package/dist/interfaces/device-capabilities/native-detection.d.ts.map +0 -1
- package/dist/interfaces/device-capabilities/object-detector.d.ts +0 -59
- package/dist/interfaces/device-capabilities/object-detector.d.ts.map +0 -1
- package/dist/interfaces/device-capabilities/pan-tilt-zoom.d.ts +0 -29
- package/dist/interfaces/device-capabilities/pan-tilt-zoom.d.ts.map +0 -1
- package/dist/interfaces/device-capabilities/recording.d.ts +0 -18
- package/dist/interfaces/device-capabilities/recording.d.ts.map +0 -1
- package/dist/interfaces/device-capabilities/siren.d.ts +0 -8
- package/dist/interfaces/device-capabilities/siren.d.ts.map +0 -1
- package/dist/interfaces/device-capabilities/status-light.d.ts +0 -7
- package/dist/interfaces/device-capabilities/status-light.d.ts.map +0 -1
- package/dist/interfaces/device-capabilities/switch.d.ts +0 -8
- package/dist/interfaces/device-capabilities/switch.d.ts.map +0 -1
- package/dist/interfaces/device-capabilities/two-way-audio.d.ts +0 -8
- package/dist/interfaces/device-capabilities/two-way-audio.d.ts.map +0 -1
- package/dist/interfaces/device-capability.d.ts +0 -14
- package/dist/interfaces/device-capability.d.ts.map +0 -1
- package/dist/interfaces/model-catalog.d.ts +0 -25
- package/dist/interfaces/model-catalog.d.ts.map +0 -1
- package/dist/interfaces/refiner.d.ts +0 -8
- package/dist/interfaces/refiner.d.ts.map +0 -1
- package/dist/interfaces/repositories.d.ts +0 -20
- package/dist/interfaces/repositories.d.ts.map +0 -1
- package/dist/interfaces/scene-intelligence.d.ts +0 -21
- package/dist/interfaces/scene-intelligence.d.ts.map +0 -1
- package/dist/interfaces/storage-backend.d.ts +0 -27
- package/dist/interfaces/storage-backend.d.ts.map +0 -1
- package/dist/interfaces/worker-protocol.d.ts +0 -110
- package/dist/interfaces/worker-protocol.d.ts.map +0 -1
- package/dist/schemas/system-settings-schemas.d.ts +0 -27
- package/dist/schemas/system-settings-schemas.d.ts.map +0 -1
- package/dist/types/benchmark.d.ts +0 -112
- package/dist/types/benchmark.d.ts.map +0 -1
- package/dist/types/zones.d.ts +0 -48
- 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
|
|
6
|
-
*
|
|
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.
|
|
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.
|
|
7
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
|
-
|
|
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
|
-
|
|
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 | ConfigModelSelectorField | ConfigStorageLocationField | ConfigProbeField | ConfigButtonField | ConfigPipelineEditorField | ConfigNodeSelectField | ConfigNodeMultiSelectField | ConfigZoneEditorField | ConfigLiveStatsField | ConfigLiveStreamViewerField | ConfigPipelineStatsField | ConfigStreamNetworkStatsField | ConfigDoorbellRecentField | ConfigDeviceInfoField | ConfigWidgetField;
|
|
21
84
|
export interface ConfigFieldBase {
|
|
22
|
-
key: string;
|
|
23
|
-
label: string;
|
|
24
|
-
description?: string;
|
|
25
|
-
required?: boolean;
|
|
26
|
-
disabled?: boolean;
|
|
27
|
-
placeholder?: string;
|
|
28
|
-
|
|
29
|
-
|
|
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';
|
|
@@ -108,6 +361,45 @@ export interface ConfigInfoField {
|
|
|
108
361
|
content: string;
|
|
109
362
|
variant?: 'info' | 'warning' | 'success' | 'danger';
|
|
110
363
|
}
|
|
364
|
+
/**
|
|
365
|
+
* Read-only structured table for diagnostic data. Renders as a row-per-
|
|
366
|
+
* entry list with column headers. Use when a section needs to surface
|
|
367
|
+
* multiple parallel records (live sessions, socket-pool entries, recent
|
|
368
|
+
* doorbell presses, …) — replaces the older "joined-string in an info
|
|
369
|
+
* field" pattern that lost structure on long entries.
|
|
370
|
+
*
|
|
371
|
+
* Columns describe how to render each cell. Each entry in `value` is a
|
|
372
|
+
* record keyed by the column `key`. Missing keys render as em-dash.
|
|
373
|
+
*
|
|
374
|
+
* NOT editable — the FormBuilder ignores the field for save patches.
|
|
375
|
+
*/
|
|
376
|
+
export interface ConfigObjectArrayField {
|
|
377
|
+
type: 'object-array';
|
|
378
|
+
key: string;
|
|
379
|
+
label: string;
|
|
380
|
+
description?: string;
|
|
381
|
+
/**
|
|
382
|
+
* Column definitions in render order. The `kind` hint controls cell
|
|
383
|
+
* formatting:
|
|
384
|
+
* - `text` (default): plain string; null/undefined → em-dash
|
|
385
|
+
* - `monospace`: monospace font (good for IPs, sessionIds)
|
|
386
|
+
* - `status`: small colored dot + label, value should be one of
|
|
387
|
+
* 'ok' | 'warn' | 'danger' | 'idle' | 'unknown'
|
|
388
|
+
* - `duration`: number of ms, formatted as "1m 23s"
|
|
389
|
+
* - `timestamp`: number (ms epoch), formatted as locale time
|
|
390
|
+
*/
|
|
391
|
+
columns: ReadonlyArray<{
|
|
392
|
+
readonly key: string;
|
|
393
|
+
readonly label: string;
|
|
394
|
+
readonly kind?: 'text' | 'monospace' | 'status' | 'duration' | 'timestamp';
|
|
395
|
+
/** Optional fixed width hint (CSS values: '120px', '20%', etc). */
|
|
396
|
+
readonly width?: string;
|
|
397
|
+
}>;
|
|
398
|
+
/** Rows. Empty array renders `emptyMessage`. */
|
|
399
|
+
value: ReadonlyArray<Record<string, unknown>>;
|
|
400
|
+
/** Shown when `value` is empty. Default: "No entries". */
|
|
401
|
+
emptyMessage?: string;
|
|
402
|
+
}
|
|
111
403
|
export interface ConfigOption {
|
|
112
404
|
value: string;
|
|
113
405
|
label: string;
|
|
@@ -136,6 +428,29 @@ export interface ConfigModelSelectorField extends ConfigFieldBase {
|
|
|
136
428
|
requiredMetadata?: readonly (keyof CustomModelMetadata)[];
|
|
137
429
|
outputFormatHint?: ModelOutputFormat;
|
|
138
430
|
}
|
|
431
|
+
/** Result of probing a single field value (returned by IDeviceProvider.testField) */
|
|
432
|
+
export interface FieldProbeResult {
|
|
433
|
+
status: 'ok' | 'error';
|
|
434
|
+
/** Labels to display as chips (e.g. "1920×1080", "H.265", "25fps") */
|
|
435
|
+
labels?: readonly string[];
|
|
436
|
+
/** Error message when status is 'error' */
|
|
437
|
+
error?: string;
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* A probeable input field. Renders as a text input with a test button.
|
|
441
|
+
* The provider implements the actual probing logic via IDeviceProvider.testField.
|
|
442
|
+
*
|
|
443
|
+
* UX states:
|
|
444
|
+
* - idle: muted icon, no labels
|
|
445
|
+
* - probing: spinner icon
|
|
446
|
+
* - ok: green check icon + provider-returned labels as chips
|
|
447
|
+
* - error: red icon + error message
|
|
448
|
+
*/
|
|
449
|
+
export interface ConfigProbeField extends ConfigFieldBase {
|
|
450
|
+
type: 'probe';
|
|
451
|
+
/** Input type hint for the text input (default: 'url') */
|
|
452
|
+
inputType?: 'url' | 'text';
|
|
453
|
+
}
|
|
139
454
|
import type { StorageLocationType } from './storage.js';
|
|
140
455
|
export interface ConfigStorageLocationField extends ConfigFieldBase {
|
|
141
456
|
type: 'storage-location';
|
|
@@ -144,9 +459,279 @@ export interface ConfigStorageLocationField extends ConfigFieldBase {
|
|
|
144
459
|
/** Show available space indicator next to each provider option */
|
|
145
460
|
showAvailableSpace?: boolean;
|
|
146
461
|
}
|
|
147
|
-
export interface
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
462
|
+
export interface ConfigButtonField extends ConfigFieldBase {
|
|
463
|
+
type: 'button';
|
|
464
|
+
/** Button label text */
|
|
465
|
+
buttonLabel: string;
|
|
466
|
+
/** Visual variant */
|
|
467
|
+
variant?: 'default' | 'danger' | 'primary';
|
|
468
|
+
/** tRPC action identifier — the form handler calls this action when pressed */
|
|
469
|
+
action: string;
|
|
470
|
+
/** Confirmation prompt before executing (optional) */
|
|
471
|
+
confirmMessage?: string;
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* Describes an async resolver that the form renderer should call to
|
|
475
|
+
* fetch deferred-load data a field depends on (e.g. the addon catalog
|
|
476
|
+
* for a pipeline-editor, a dynamic options list for a select, …).
|
|
477
|
+
*
|
|
478
|
+
* The renderer dispatches through `client.trpc[capName][methodName]
|
|
479
|
+
* .query(input)` — the field declares WHICH cap + method + input to
|
|
480
|
+
* call, and the renderer stays oblivious to the endpoint naming.
|
|
481
|
+
* Results are cached client-side keyed by `(capName, methodName,
|
|
482
|
+
* input)` so two fields pointing at the same resolver deduplicate
|
|
483
|
+
* automatically.
|
|
484
|
+
*
|
|
485
|
+
* Not an endpoint to arbitrary HTTP — the tRPC proxy gates it to the
|
|
486
|
+
* server's declared cap surface + each cap's auth rules, same as
|
|
487
|
+
* every other `.query()` call the UI makes.
|
|
488
|
+
*/
|
|
489
|
+
export interface AsyncResolverRef {
|
|
490
|
+
/** tRPC cap namespace (e.g. `pipelineExecutor`, `pipelineOrchestrator`). */
|
|
491
|
+
readonly capName: string;
|
|
492
|
+
/** Method on that cap — must be a `.query()` (no mutations via resolvers). */
|
|
493
|
+
readonly methodName: string;
|
|
494
|
+
/** Input payload passed verbatim; serialised into the React Query key. */
|
|
495
|
+
readonly input?: Readonly<Record<string, unknown>>;
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* Camera pipeline editor field (stateless-pipeline Phase 6, option B).
|
|
499
|
+
*
|
|
500
|
+
* The FormBuilder renders this as the rich `PipelineBuilder` composite
|
|
501
|
+
* (step tree + engine picker + template picker) instead of a flat
|
|
502
|
+
* input. `value` is always a fully-resolved `CameraPipelineConfig` —
|
|
503
|
+
* when the camera has no persisted pipeline, the contributor
|
|
504
|
+
* (orchestrator) fills it with the cluster default server-side so
|
|
505
|
+
* the renderer stays dumb about nullability.
|
|
506
|
+
*
|
|
507
|
+
* `nodeId` names the runner node whose addon catalog powers the
|
|
508
|
+
* editor. It's exposed explicitly (rather than buried inside the
|
|
509
|
+
* resolver) for diagnostics, UI labels, and cache keying. The
|
|
510
|
+
* catalog itself isn't embedded — `catalogResolver` tells the
|
|
511
|
+
* renderer how to lazy-load it via the shared resolver hook, which
|
|
512
|
+
* React Query caches once per `(capName, methodName, input)`. That
|
|
513
|
+
* way 50 cameras assigned to the same node don't each trigger 50
|
|
514
|
+
* catalog fetches.
|
|
515
|
+
*
|
|
516
|
+
* Templates are NOT described by a resolver — they're a hub-wide
|
|
517
|
+
* library fetched in one place by the editor directly.
|
|
518
|
+
*/
|
|
519
|
+
export interface ConfigPipelineEditorField extends ConfigFieldBase {
|
|
520
|
+
type: 'pipeline-editor';
|
|
521
|
+
/** Runner node whose catalog powers the editor. */
|
|
522
|
+
readonly nodeId: string;
|
|
523
|
+
/** The camera this field edits — used by the renderer to fetch per-camera settings. */
|
|
524
|
+
readonly deviceId: number;
|
|
525
|
+
/** How to fetch the addon catalog for this node. */
|
|
526
|
+
readonly catalogResolver: AsyncResolverRef;
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* Polygon zone CRUD editor field. Renders a canvas with a backdrop
|
|
530
|
+
* (stream snapshot or live preview) where the operator draws polygon
|
|
531
|
+
* zones, plus the list of existing zones (user + onboard) with
|
|
532
|
+
* editing affordances.
|
|
533
|
+
*
|
|
534
|
+
* Stateless from the form's point of view: bound directly to
|
|
535
|
+
* `api.zones.*` mutations, NOT to the form's `value`. The renderer
|
|
536
|
+
* subscribes to `dev.state.zones.onChanged` for live updates so two
|
|
537
|
+
* operators editing the same camera see each other's changes
|
|
538
|
+
* immediately. `value` is therefore not consumed by the renderer
|
|
539
|
+
* (kept on the discriminated union only so the form layout engine
|
|
540
|
+
* stays homogeneous).
|
|
541
|
+
*
|
|
542
|
+
* Every zone is operator-drawn and fully editable — firmware-reported
|
|
543
|
+
* onboard zones are deliberately out of scope for the first iteration.
|
|
544
|
+
*/
|
|
545
|
+
export interface ConfigZoneEditorField extends ConfigFieldBase {
|
|
546
|
+
type: 'zone-editor';
|
|
547
|
+
/**
|
|
548
|
+
* Optional backdrop hint. `'snapshot'` (default) fetches a still
|
|
549
|
+
* via the snapshot cap; `'stream'` overlays the live WebRTC view.
|
|
550
|
+
*
|
|
551
|
+
* The renderer reads the `deviceId` from the device-details page
|
|
552
|
+
* context — the field doesn't carry it inline so the schema stays
|
|
553
|
+
* device-agnostic and addons can ship a static contribution.
|
|
554
|
+
*/
|
|
555
|
+
readonly backdrop?: 'snapshot' | 'stream';
|
|
556
|
+
}
|
|
557
|
+
/**
|
|
558
|
+
* Live statistics field — bound to the "Live Stats" top-tab declared
|
|
559
|
+
* by the analytics addon. Renders occupancy snapshots, audio metrics
|
|
560
|
+
* (current + history), and rolling-window charts. The form's `value`
|
|
561
|
+
* is unused; the renderer reads `deviceId` from the device-details
|
|
562
|
+
* page context and pulls live data through DeviceProxy.
|
|
563
|
+
*/
|
|
564
|
+
export interface ConfigLiveStatsField extends ConfigFieldBase {
|
|
565
|
+
type: 'live-stats';
|
|
151
566
|
}
|
|
567
|
+
/**
|
|
568
|
+
* Live-stream player block — snapshot poster + play/stop + quality
|
|
569
|
+
* selector + detection overlay. Contributed by `addon-stream-broker`.
|
|
570
|
+
*/
|
|
571
|
+
export interface ConfigLiveStreamViewerField extends ConfigFieldBase {
|
|
572
|
+
type: 'live-stream-viewer';
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* Pipeline-quick-stats block — Phase / Detection FPS / Inference time /
|
|
576
|
+
* Active Tracks. Contributed by `addon-pipeline-orchestrator`. The
|
|
577
|
+
* adapter pulls live values from `pipelineRunner.getCameraMetrics` +
|
|
578
|
+
* `pipelineAnalytics.getActiveTracks` via the device proxy.
|
|
579
|
+
*/
|
|
580
|
+
export interface ConfigPipelineStatsField extends ConfigFieldBase {
|
|
581
|
+
type: 'pipeline-stats';
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* Stream network-quality block — per-stream bitrate / packet loss
|
|
585
|
+
* table sourced from the network-quality cap.
|
|
586
|
+
*/
|
|
587
|
+
export interface ConfigStreamNetworkStatsField extends ConfigFieldBase {
|
|
588
|
+
type: 'stream-network-stats';
|
|
589
|
+
}
|
|
590
|
+
/**
|
|
591
|
+
* Doorbell recent-press history block. Contributed by
|
|
592
|
+
* `addon-provider-reolink` only when the device advertises the
|
|
593
|
+
* `DoorbellButton` feature; absent on every other camera.
|
|
594
|
+
*/
|
|
595
|
+
export interface ConfigDoorbellRecentField extends ConfigFieldBase {
|
|
596
|
+
type: 'doorbell-recent';
|
|
597
|
+
/** Max history rows to render (default: 10). */
|
|
598
|
+
readonly historyLimit?: number;
|
|
599
|
+
}
|
|
600
|
+
/**
|
|
601
|
+
* Device-info block — id / stableId / name / type / provider / capability
|
|
602
|
+
* badges. Contributed by `device-manager`'s base section, redirected to
|
|
603
|
+
* the overview tab via `placement.tab = 'overview'`.
|
|
604
|
+
*/
|
|
605
|
+
export interface ConfigDeviceInfoField extends ConfigFieldBase {
|
|
606
|
+
type: 'device-info';
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* Generic widget field — addon-contributed widget mounted by the
|
|
610
|
+
* shared `<WidgetSlot>` runtime via the `WidgetRegistry`.
|
|
611
|
+
*
|
|
612
|
+
* The form-builder reads `widgetId` as the public widget identifier
|
|
613
|
+
* (`<addonId>/<stableId>`) and forwards `widgetConfig` as `props.config`
|
|
614
|
+
* to the widget. Different from the legacy bespoke field types
|
|
615
|
+
* (`'live-stats'`, `'zone-editor'`, `'pipeline-stats'`, …) which are now
|
|
616
|
+
* DEPRECATED — those required per-type renderer registration in
|
|
617
|
+
* admin-ui; widget fields go through the generic registry without a
|
|
618
|
+
* code change in admin-ui.
|
|
619
|
+
*
|
|
620
|
+
* `key` is the form-field's unique identifier (kept distinct from the
|
|
621
|
+
* widget identifier so the same widget can be mounted twice in the
|
|
622
|
+
* same form). `widgetId` is the public id resolved against the
|
|
623
|
+
* WidgetRegistry.
|
|
624
|
+
*
|
|
625
|
+
* Field carries no stored value — the widget owns its own state via
|
|
626
|
+
* DeviceProxy / runtime-state hooks. Placed in
|
|
627
|
+
* `ConfigFieldWithValue` only so the discriminated-union round-trip
|
|
628
|
+
* through `hydrateSchema` stays homogeneous (`value: null`).
|
|
629
|
+
*/
|
|
630
|
+
export interface ConfigWidgetField extends ConfigFieldBase {
|
|
631
|
+
readonly type: 'widget';
|
|
632
|
+
/** `<addonId>/<stableId>` — resolved via the WidgetRegistry. */
|
|
633
|
+
readonly widgetId: string;
|
|
634
|
+
/** Per-instance config payload forwarded to the widget as `props.config`. */
|
|
635
|
+
readonly widgetConfig?: Readonly<Record<string, unknown>>;
|
|
636
|
+
}
|
|
637
|
+
/** A `ConfigField` with its current value attached inline. */
|
|
638
|
+
export type ConfigFieldWithValue = (ConfigTextField & {
|
|
639
|
+
readonly value: unknown;
|
|
640
|
+
}) | (ConfigNumberField & {
|
|
641
|
+
readonly value: unknown;
|
|
642
|
+
}) | (ConfigBooleanField & {
|
|
643
|
+
readonly value: unknown;
|
|
644
|
+
}) | (ConfigSelectField & {
|
|
645
|
+
readonly value: unknown;
|
|
646
|
+
}) | (ConfigMultiSelectField & {
|
|
647
|
+
readonly value: unknown;
|
|
648
|
+
}) | (ConfigColorField & {
|
|
649
|
+
readonly value: unknown;
|
|
650
|
+
}) | (ConfigPasswordField & {
|
|
651
|
+
readonly value: unknown;
|
|
652
|
+
}) | (ConfigTextAreaField & {
|
|
653
|
+
readonly value: unknown;
|
|
654
|
+
}) | (ConfigSliderField & {
|
|
655
|
+
readonly value: unknown;
|
|
656
|
+
}) | (ConfigTagsField & {
|
|
657
|
+
readonly value: unknown;
|
|
658
|
+
}) | (ConfigGroupFieldWithValue) | (ConfigSubTabsFieldWithValue) | ConfigSeparatorField | ConfigInfoField | ConfigObjectArrayField | (ConfigModelSelectorField & {
|
|
659
|
+
readonly value: unknown;
|
|
660
|
+
}) | (ConfigStorageLocationField & {
|
|
661
|
+
readonly value: unknown;
|
|
662
|
+
}) | (ConfigProbeField & {
|
|
663
|
+
readonly value: unknown;
|
|
664
|
+
}) | (ConfigButtonField) | (ConfigPipelineEditorField & {
|
|
665
|
+
readonly value: unknown;
|
|
666
|
+
}) | (ConfigNodeSelectField & {
|
|
667
|
+
readonly value: unknown;
|
|
668
|
+
}) | (ConfigNodeMultiSelectField & {
|
|
669
|
+
readonly value: unknown;
|
|
670
|
+
}) | (ConfigZoneEditorField & {
|
|
671
|
+
readonly value: unknown;
|
|
672
|
+
}) | (ConfigLiveStatsField & {
|
|
673
|
+
readonly value: unknown;
|
|
674
|
+
}) | (ConfigLiveStreamViewerField & {
|
|
675
|
+
readonly value: unknown;
|
|
676
|
+
}) | (ConfigPipelineStatsField & {
|
|
677
|
+
readonly value: unknown;
|
|
678
|
+
}) | (ConfigStreamNetworkStatsField & {
|
|
679
|
+
readonly value: unknown;
|
|
680
|
+
}) | (ConfigDoorbellRecentField & {
|
|
681
|
+
readonly value: unknown;
|
|
682
|
+
}) | (ConfigDeviceInfoField & {
|
|
683
|
+
readonly value: unknown;
|
|
684
|
+
}) | ConfigWidgetField;
|
|
685
|
+
/** Recursive version of `ConfigGroupField` with hydrated child fields. */
|
|
686
|
+
export interface ConfigGroupFieldWithValue extends ConfigFieldBase {
|
|
687
|
+
readonly type: 'group';
|
|
688
|
+
readonly fields: readonly ConfigFieldWithValue[];
|
|
689
|
+
readonly style?: 'card' | 'inline' | 'accordion';
|
|
690
|
+
readonly defaultCollapsed?: boolean;
|
|
691
|
+
readonly value?: undefined;
|
|
692
|
+
}
|
|
693
|
+
/** Hydrated sibling of `ConfigSubTabDefinition` — fields inside each
|
|
694
|
+
* sub-tab carry their resolved values. */
|
|
695
|
+
export interface ConfigSubTabDefinitionWithValue {
|
|
696
|
+
readonly id: string;
|
|
697
|
+
readonly label: string;
|
|
698
|
+
readonly icon?: string;
|
|
699
|
+
readonly badge?: string;
|
|
700
|
+
readonly fields: readonly ConfigFieldWithValue[];
|
|
701
|
+
}
|
|
702
|
+
/** Recursive version of `ConfigSubTabsField` with hydrated child fields. */
|
|
703
|
+
export interface ConfigSubTabsFieldWithValue extends ConfigFieldBase {
|
|
704
|
+
readonly type: 'sub-tabs';
|
|
705
|
+
readonly tabs: readonly ConfigSubTabDefinitionWithValue[];
|
|
706
|
+
readonly value?: undefined;
|
|
707
|
+
}
|
|
708
|
+
export interface ConfigSectionWithValues extends Omit<ConfigSection, 'fields'> {
|
|
709
|
+
/**
|
|
710
|
+
* Array kept mutable (not `readonly`) to stay assignable to the Zod-inferred
|
|
711
|
+
* wire shape produced by `DEVICE_SETTINGS_CONTRIBUTION_METHODS.getDeviceSettingsContribution.output`.
|
|
712
|
+
* Consumers treat it as immutable by convention — mutation is never
|
|
713
|
+
* expected and would be a bug.
|
|
714
|
+
*/
|
|
715
|
+
fields: ConfigFieldWithValue[];
|
|
716
|
+
}
|
|
717
|
+
export interface ConfigUISchemaWithValues {
|
|
718
|
+
/** See `ConfigSectionWithValues.fields` — kept mutable for Zod wire compat. */
|
|
719
|
+
tabs?: ConfigTabDeclaration[];
|
|
720
|
+
sections: ConfigSectionWithValues[];
|
|
721
|
+
}
|
|
722
|
+
/**
|
|
723
|
+
* Merge a `ConfigUISchema` with a raw `values` record into a
|
|
724
|
+
* `ConfigUISchemaWithValues`. Used by every `get*Settings` backend endpoint
|
|
725
|
+
* before returning to the admin UI. Groups are walked recursively.
|
|
726
|
+
*
|
|
727
|
+
* For each leaf field:
|
|
728
|
+
* - structural fields (`separator`, `info`, `button`) pass through unchanged
|
|
729
|
+
* - other fields get `value = values[key] ?? field.default ?? null`
|
|
730
|
+
*
|
|
731
|
+
* Unknown keys in `values` (keys not declared in the schema) are silently
|
|
732
|
+
* ignored — they don't contribute to the output. Missing keys fall back to
|
|
733
|
+
* the schema default or `null`. This mirrors the old backend behaviour where
|
|
734
|
+
* `FormBuilder` rendered `values[key] ?? field.default`.
|
|
735
|
+
*/
|
|
736
|
+
export declare function hydrateSchema(schema: ConfigUISchema, values: Record<string, unknown>): ConfigUISchemaWithValues;
|
|
152
737
|
//# sourceMappingURL=config-ui.d.ts.map
|