@kosdev-code/kos-ui-sdk 3.0.25 → 3.0.27
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/.kos.json +3 -2
- package/common/events/async-event-bus.d.ts +8 -11
- package/common/events/async-event-bus.d.ts.map +1 -1
- package/common/events/eventBus.d.ts +1 -18
- package/common/events/eventBus.d.ts.map +1 -1
- package/core/core/companion-instantiator.d.ts +5 -0
- package/core/core/companion-instantiator.d.ts.map +1 -1
- package/core/core/decorators/index.d.ts +1 -0
- package/core/core/decorators/index.d.ts.map +1 -1
- package/core/core/decorators/kos-child.d.ts +2 -3
- package/core/core/decorators/kos-child.d.ts.map +1 -1
- package/core/core/decorators/kos-companion.d.ts +25 -87
- package/core/core/decorators/kos-companion.d.ts.map +1 -1
- package/core/core/decorators/kos-container-aware-reconcile.test-d.d.ts +2 -0
- package/core/core/decorators/kos-container-aware-reconcile.test-d.d.ts.map +1 -0
- package/core/core/decorators/kos-container-aware.d.ts +191 -420
- package/core/core/decorators/kos-container-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-execute-service-request.d.ts +7 -11
- package/core/core/decorators/kos-execute-service-request.d.ts.map +1 -1
- package/core/core/decorators/kos-execution-context.d.ts +14 -31
- package/core/core/decorators/kos-execution-context.d.ts.map +1 -1
- package/core/core/decorators/kos-future-aware.d.ts +21 -74
- package/core/core/decorators/kos-future-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-http-decorators.d.ts +18 -62
- package/core/core/decorators/kos-http-decorators.d.ts.map +1 -1
- package/core/core/decorators/kos-logger-aware.d.ts +10 -60
- package/core/core/decorators/kos-logger-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-mixin.d.ts +67 -0
- package/core/core/decorators/kos-mixin.d.ts.map +1 -0
- package/core/core/decorators/kos-model-effect.d.ts +10 -9
- package/core/core/decorators/kos-model-effect.d.ts.map +1 -1
- package/core/core/decorators/kos-multiple-future-aware.d.ts +22 -131
- package/core/core/decorators/kos-multiple-future-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-reload-aware.d.ts +14 -14
- package/core/core/decorators/kos-reload-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-service-request-helpers.d.ts +3 -1
- package/core/core/decorators/kos-service-request-helpers.d.ts.map +1 -1
- package/core/core/decorators/kos-service-request.d.ts +85 -265
- package/core/core/decorators/kos-service-request.d.ts.map +1 -1
- package/core/core/decorators/kos-state-machine.d.ts +44 -273
- package/core/core/decorators/kos-state-machine.d.ts.map +1 -1
- package/core/core/decorators/kos-topic-handler-flow-control.d.ts +37 -29
- package/core/core/decorators/kos-topic-handler-flow-control.d.ts.map +1 -1
- package/core/core/decorators/kos-trouble-aware.d.ts +9 -43
- package/core/core/decorators/kos-trouble-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-view-model.d.ts +20 -100
- package/core/core/decorators/kos-view-model.d.ts.map +1 -1
- package/core/core/decorators/kosDependency.d.ts +4 -2
- package/core/core/decorators/kosDependency.d.ts.map +1 -1
- package/core/core/decorators/kosModel.d.ts.map +1 -1
- package/core/core/decorators/kosTopicHandler.d.ts +28 -98
- package/core/core/decorators/kosTopicHandler.d.ts.map +1 -1
- package/core/core/decorators/propKeys.d.ts +1 -0
- package/core/core/decorators/propKeys.d.ts.map +1 -1
- package/core/core/extension/extension-manager.d.ts.map +1 -1
- package/core/core/indexing/index.d.ts +2 -4
- package/core/core/indexing/index.d.ts.map +1 -1
- package/core/core/indexing/kos-container-index-aware.d.ts +17 -48
- package/core/core/indexing/kos-container-index-aware.d.ts.map +1 -1
- package/core/core/indexing/kos-index-aware.d.ts +11 -37
- package/core/core/indexing/kos-index-aware.d.ts.map +1 -1
- package/core/core/kos-container-index.d.ts +11 -0
- package/core/core/kos-container-index.d.ts.map +1 -1
- package/core/core/kos-container-model.d.ts +11 -32
- package/core/core/kos-container-model.d.ts.map +1 -1
- package/core/core/kos-data-container.d.ts +6 -6
- package/core/core/kos-data-container.d.ts.map +1 -1
- package/core/core/kosCore.d.ts +22 -4
- package/core/core/kosCore.d.ts.map +1 -1
- package/core/core/kosModel.d.ts +21 -8
- package/core/core/kosModel.d.ts.map +1 -1
- package/core/core/kosModelManager.d.ts +2 -3
- package/core/core/kosModelManager.d.ts.map +1 -1
- package/core/core/lifecycle/constants.d.ts +6 -2
- package/core/core/lifecycle/constants.d.ts.map +1 -1
- package/core/core/lifecycle/kosCoreLifecycle.d.ts +11 -1
- package/core/core/lifecycle/kosCoreLifecycle.d.ts.map +1 -1
- package/core/core/lifecycle/kosModelLifecycle.d.ts +6 -0
- package/core/core/lifecycle/kosModelLifecycle.d.ts.map +1 -1
- package/core/core/lifecycle/model-machine.d.ts +6 -0
- package/core/core/lifecycle/model-machine.d.ts.map +1 -1
- package/core/core/model/kos-fsm-manager.d.ts +6 -0
- package/core/core/model/kos-fsm-manager.d.ts.map +1 -1
- package/core/core/model/kos-model-component-factory.d.ts +1 -1
- package/core/core/model/kos-model-component-factory.d.ts.map +1 -1
- package/core/core/model/kos-offline-queue.d.ts +1 -1
- package/core/core/model/kos-service-request-manager.d.ts +7 -2
- package/core/core/model/kos-service-request-manager.d.ts.map +1 -1
- package/core/core/model/kos-subscription-manager.d.ts +2 -2
- package/core/core/model/kos-subscription-manager.d.ts.map +1 -1
- package/core/core/model/service-response-store.d.ts +4 -16
- package/core/core/model/service-response-store.d.ts.map +1 -1
- package/core/core/reconnect/reconnect-fixture.d.ts +17 -0
- package/core/core/reconnect/reconnect-fixture.d.ts.map +1 -0
- package/core/core/registration/model-registration.d.ts.map +1 -1
- package/core/core/services/app-startup-service.d.ts +5 -13
- package/core/core/services/app-startup-service.d.ts.map +1 -1
- package/core/core/services/intent-service.d.ts +3 -12
- package/core/core/services/intent-service.d.ts.map +1 -1
- package/core/core/transport/mock/mock-frames.d.ts +3 -3
- package/core/core/transport/transport.d.ts +1 -1
- package/core/core/transport/transport.d.ts.map +1 -1
- package/core/core/transport/webSocketTransport.d.ts +10 -0
- package/core/core/transport/webSocketTransport.d.ts.map +1 -1
- package/core/types/kos-dependency.d.ts +13 -4
- package/core/types/kos-dependency.d.ts.map +1 -1
- package/core/types/model.d.ts +4 -8
- package/core/types/model.d.ts.map +1 -1
- package/core/types/service-response-store.d.ts +3 -15
- package/core/types/service-response-store.d.ts.map +1 -1
- package/core/types/utils/kos-fetch.d.ts +25 -37
- package/core/types/utils/kos-fetch.d.ts.map +1 -1
- package/core/util/abortable-when.d.ts +5 -6
- package/core/util/abortable-when.d.ts.map +1 -1
- package/core/util/ancestor-path-visitor.d.ts +14 -20
- package/core/util/ancestor-path-visitor.d.ts.map +1 -1
- package/core/util/container-utils.d.ts +26 -159
- package/core/util/container-utils.d.ts.map +1 -1
- package/core/util/date-utils.d.ts +9 -58
- package/core/util/date-utils.d.ts.map +1 -1
- package/core/util/debounce.d.ts +1 -8
- package/core/util/debounce.d.ts.map +1 -1
- package/core/util/kos-fetch.d.ts +1 -1
- package/core/util/kos-fetch.d.ts.map +1 -1
- package/core/util/kos-model-utils.d.ts +10 -11
- package/core/util/kos-model-utils.d.ts.map +1 -1
- package/core/util/model-attribute-utils.d.ts +5 -22
- package/core/util/model-attribute-utils.d.ts.map +1 -1
- package/core/util/model-type-guards.d.ts.map +1 -1
- package/core/util/model-utils.d.ts.map +1 -1
- package/core/util/promise-utils.d.ts +1 -26
- package/core/util/promise-utils.d.ts.map +1 -1
- package/core/util/service-factory.d.ts +5 -23
- package/core/util/service-factory.d.ts.map +1 -1
- package/core/util/service-request-error.d.ts +3 -5
- package/core/util/service-request-error.d.ts.map +1 -1
- package/core/util/service-response.d.ts +12 -67
- package/core/util/service-response.d.ts.map +1 -1
- package/core/util/transport-not-ready-error.d.ts +11 -13
- package/core/util/transport-not-ready-error.d.ts.map +1 -1
- package/core/util/when-ready.d.ts +1 -8
- package/core/util/when-ready.d.ts.map +1 -1
- package/index.cjs +983 -11777
- package/index.cjs.map +1 -1
- package/index.js +1056 -11854
- package/index.js.map +1 -1
- package/models/decorators/future-service.d.ts +7 -7
- package/models/models/browser-router/browser-router-model.d.ts +10 -39
- package/models/models/browser-router/browser-router-model.d.ts.map +1 -1
- package/models/models/browser-router/browser-router-registration.d.ts +5 -77
- package/models/models/browser-router/browser-router-registration.d.ts.map +1 -1
- package/models/models/browser-router/types/index.d.ts +2 -16
- package/models/models/canvas-dispatcher/canvas-dispatcher-registration.d.ts +5 -77
- package/models/models/canvas-dispatcher/canvas-dispatcher-registration.d.ts.map +1 -1
- package/models/models/canvas-renderer/canvas-renderer-registration.d.ts +5 -75
- package/models/models/canvas-renderer/canvas-renderer-registration.d.ts.map +1 -1
- package/models/models/config-bean/config-bean-model-builder.d.ts +4 -11
- package/models/models/config-bean/config-bean-model-builder.d.ts.map +1 -1
- package/models/models/config-bean/config-bean-model.d.ts +23 -66
- package/models/models/config-bean/config-bean-model.d.ts.map +1 -1
- package/models/models/config-bean-prop/config-bean-prop-model.d.ts +15 -62
- package/models/models/config-bean-prop/config-bean-prop-model.d.ts.map +1 -1
- package/models/models/config-bean-prop/types/index.d.ts +34 -215
- package/models/models/device/device-model.d.ts +20 -199
- package/models/models/device/device-model.d.ts.map +1 -1
- package/models/models/device/device-registration.d.ts +7 -87
- package/models/models/device/device-registration.d.ts.map +1 -1
- package/models/models/device/types/index.d.ts +5 -34
- package/models/models/future/future-aware.d.ts +7 -71
- package/models/models/future/future-aware.d.ts.map +1 -1
- package/models/models/future/future-model-builder.d.ts +2 -2
- package/models/models/future/future-model.d.ts +3 -23
- package/models/models/future/future-model.d.ts.map +1 -1
- package/models/models/future/future-types.d.ts +28 -145
- package/models/models/future/future-types.d.ts.map +1 -1
- package/models/models/gpio-chip/gpio-chip-builders.d.ts +14 -0
- package/models/models/gpio-chip/gpio-chip-builders.d.ts.map +1 -0
- package/models/models/gpio-chip/gpio-chip-container-model.d.ts +2 -1
- package/models/models/gpio-chip/gpio-chip-container-model.d.ts.map +1 -1
- package/models/models/key-value/key-value-model.d.ts +12 -72
- package/models/models/key-value/key-value-model.d.ts.map +1 -1
- package/models/models/key-value/key-value-registration.d.ts +5 -77
- package/models/models/key-value/key-value-registration.d.ts.map +1 -1
- package/models/models/key-value/services/key-value-services.d.ts +13 -72
- package/models/models/key-value/services/key-value-services.d.ts.map +1 -1
- package/models/models/key-value/types/index.d.ts +3 -46
- package/models/models/kos-expression-evaluator/expression-parse-cache.d.ts +29 -0
- package/models/models/kos-expression-evaluator/expression-parse-cache.d.ts.map +1 -0
- package/models/models/kos-expression-evaluator/index.d.ts +1 -0
- package/models/models/kos-expression-evaluator/index.d.ts.map +1 -1
- package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts +73 -105
- package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts.map +1 -1
- package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts +2 -12
- package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts.map +1 -1
- package/models/models/kos-log-manager/kos-log-manager-model.d.ts +7 -46
- package/models/models/kos-log-manager/kos-log-manager-model.d.ts.map +1 -1
- package/models/models/kos-log-manager/kos-log-manager-registration.d.ts +5 -80
- package/models/models/kos-log-manager/kos-log-manager-registration.d.ts.map +1 -1
- package/models/models/kos-log-manager/types/index.d.ts +13 -156
- package/models/models/kos-time/kos-time-model.d.ts +8 -39
- package/models/models/kos-time/kos-time-model.d.ts.map +1 -1
- package/models/models/kos-time/kos-time-registration.d.ts +6 -73
- package/models/models/kos-time/kos-time-registration.d.ts.map +1 -1
- package/models/models/kos-time/types/index.d.ts +3 -58
- package/models/models/log-block/log-block-container-model.d.ts +2 -118
- package/models/models/log-block/log-block-container-model.d.ts.map +1 -1
- package/models/models/log-block/log-block-container-registration.d.ts +5 -75
- package/models/models/log-block/log-block-container-registration.d.ts.map +1 -1
- package/models/models/log-block/log-block-model.d.ts +5 -168
- package/models/models/log-block/log-block-model.d.ts.map +1 -1
- package/models/models/log-block/log-block-registration.d.ts +5 -75
- package/models/models/log-block/log-block-registration.d.ts.map +1 -1
- package/models/models/log-block/types/index.d.ts +14 -81
- package/models/models/log-stream/log-stream-container-model.d.ts +8 -35
- package/models/models/log-stream/log-stream-container-model.d.ts.map +1 -1
- package/models/models/log-stream/log-stream-container-registration.d.ts +5 -75
- package/models/models/log-stream/log-stream-container-registration.d.ts.map +1 -1
- package/models/models/log-stream/log-stream-model.d.ts +8 -29
- package/models/models/log-stream/log-stream-model.d.ts.map +1 -1
- package/models/models/log-stream/log-stream-registration.d.ts +5 -75
- package/models/models/log-stream/log-stream-registration.d.ts.map +1 -1
- package/models/models/log-stream/types/index.d.ts +5 -60
- package/models/models/network-interface/network-interface-container-model.d.ts +6 -35
- package/models/models/network-interface/network-interface-container-model.d.ts.map +1 -1
- package/models/models/network-interface/network-interface-container-registration.d.ts +5 -73
- package/models/models/network-interface/network-interface-container-registration.d.ts.map +1 -1
- package/models/models/network-interface/network-interface-model.d.ts +5 -43
- package/models/models/network-interface/network-interface-model.d.ts.map +1 -1
- package/models/models/network-interface/network-interface-registration.d.ts +5 -73
- package/models/models/network-interface/network-interface-registration.d.ts.map +1 -1
- package/models/models/network-interface/types/index.d.ts +2 -16
- package/models/models/ota/ota-model.d.ts +11 -39
- package/models/models/ota/ota-model.d.ts.map +1 -1
- package/models/models/ota/ota-registration.d.ts +5 -77
- package/models/models/ota/ota-registration.d.ts.map +1 -1
- package/models/models/ota/types/index.d.ts +2 -141
- package/models/models/region-info/types/index.d.ts +19 -99
- package/models/models/region-info/types/index.d.ts.map +1 -1
- package/models/models/software-info/services/software-info-services.d.ts +2 -14
- package/models/models/software-info/services/software-info-services.d.ts.map +1 -1
- package/models/models/software-info/software-info-model.d.ts +3 -39
- package/models/models/software-info/software-info-model.d.ts.map +1 -1
- package/models/models/software-info/software-info-registration.d.ts +6 -73
- package/models/models/software-info/software-info-registration.d.ts.map +1 -1
- package/models/models/software-info/types/index.d.ts +6 -20
- package/models/models/state-bean/state-bean-model.d.ts +10 -41
- package/models/models/state-bean/state-bean-model.d.ts.map +1 -1
- package/models/models/state-bean/state-bean-registration.d.ts +6 -73
- package/models/models/state-bean/state-bean-registration.d.ts.map +1 -1
- package/models/models/state-bean/types/index.d.ts +4 -84
- package/models/models/state-prop/state-prop-model.d.ts +6 -40
- package/models/models/state-prop/state-prop-model.d.ts.map +1 -1
- package/models/models/state-prop/state-prop-registration.d.ts +6 -73
- package/models/models/state-prop/state-prop-registration.d.ts.map +1 -1
- package/models/models/state-prop/types/index.d.ts +5 -37
- package/models/models/storage-device/storage-device-container-model.d.ts +7 -273
- package/models/models/storage-device/storage-device-container-model.d.ts.map +1 -1
- package/models/models/storage-device/storage-device-container-registration.d.ts +5 -75
- package/models/models/storage-device/storage-device-container-registration.d.ts.map +1 -1
- package/models/models/storage-device/storage-device-model.d.ts +3 -49
- package/models/models/storage-device/storage-device-model.d.ts.map +1 -1
- package/models/models/storage-device/storage-device-registration.d.ts +5 -75
- package/models/models/storage-device/storage-device-registration.d.ts.map +1 -1
- package/models/models/storage-device/types/index.d.ts +13 -82
- package/models/models/studio-properties/studio-properties-model.d.ts +13 -36
- package/models/models/studio-properties/studio-properties-model.d.ts.map +1 -1
- package/models/models/studio-properties/studio-properties-registration.d.ts +5 -75
- package/models/models/studio-properties/studio-properties-registration.d.ts.map +1 -1
- package/models/models/studio-properties/types/index.d.ts +2 -24
- package/models/models/translation/descriptor-merge.d.ts +13 -17
- package/models/models/translation/descriptor-merge.d.ts.map +1 -1
- package/models/models/translation/services/translation-services.d.ts +19 -77
- package/models/models/translation/services/translation-services.d.ts.map +1 -1
- package/models/models/translation/test-harness.d.ts +6 -8
- package/models/models/translation/test-harness.d.ts.map +1 -1
- package/models/models/translation/translation-container-model.d.ts +7 -59
- package/models/models/translation/translation-container-model.d.ts.map +1 -1
- package/models/models/translation/translation-container-registration.d.ts +6 -73
- package/models/models/translation/translation-container-registration.d.ts.map +1 -1
- package/models/models/translation/translation-model.d.ts +17 -50
- package/models/models/translation/translation-model.d.ts.map +1 -1
- package/models/models/translation/translation-registration.d.ts +6 -73
- package/models/models/translation/translation-registration.d.ts.map +1 -1
- package/models/models/translation/types/index.d.ts +51 -276
- package/models/models/trouble/trouble-registration.d.ts +6 -73
- package/models/models/trouble/trouble-registration.d.ts.map +1 -1
- package/models/models/trouble/types/index.d.ts +17 -188
- package/models/models/trouble/utils/is-trouble-aware.d.ts +4 -85
- package/models/models/trouble/utils/is-trouble-aware.d.ts.map +1 -1
- package/models/models/trouble-container/trouble-builders.d.ts +11 -0
- package/models/models/trouble-container/trouble-builders.d.ts.map +1 -0
- package/models/models/trouble-container/trouble-container-model.d.ts +2 -1
- package/models/models/trouble-container/trouble-container-model.d.ts.map +1 -1
- package/models/models/usb-update/usb-update-container-registration.d.ts +5 -75
- package/models/models/usb-update/usb-update-container-registration.d.ts.map +1 -1
- package/models/models/usb-update/usb-update-registration.d.ts +5 -75
- package/models/models/usb-update/usb-update-registration.d.ts.map +1 -1
- package/models/types/cancellable-promise.d.ts +6 -9
- package/models/types/cancellable-promise.d.ts.map +1 -1
- package/models/utils/await-future-call.d.ts +9 -21
- package/models/utils/await-future-call.d.ts.map +1 -1
- package/models/utils/cancellable-future-call.d.ts +8 -19
- package/models/utils/cancellable-future-call.d.ts.map +1 -1
- package/models/utils/cancellable-service.d.ts +14 -23
- package/models/utils/cancellable-service.d.ts.map +1 -1
- package/models/utils/conversion-utils.d.ts +8 -48
- package/models/utils/conversion-utils.d.ts.map +1 -1
- package/models/utils/persistence-store.d.ts +1 -1
- package/models/utils/service.d.ts +14 -48
- package/models/utils/service.d.ts.map +1 -1
- package/models/utils/services/kos/daily/service.d.ts +5 -5
- package/models/utils/services/kos/daily/service.d.ts.map +1 -1
- package/models/utils/services/vfs/daily/service.d.ts +5 -5
- package/models/utils/services/vfs/daily/service.d.ts.map +1 -1
- package/models/utils/timer-manager.d.ts.map +1 -1
- package/package.json +2 -2
- package/{index-CRb8ucfF.cjs → software-info-registration-Le3V0a6v.cjs} +12187 -986
- package/software-info-registration-Le3V0a6v.cjs.map +1 -0
- package/software-info-registration-kSGacOka.js +24809 -0
- package/software-info-registration-kSGacOka.js.map +1 -0
- package/testing/index.d.ts +32 -34
- package/testing/index.d.ts.map +1 -1
- package/testing.cjs +2 -1
- package/testing.cjs.map +1 -1
- package/testing.js +2 -1
- package/testing.js.map +1 -1
- package/ui/components/connection-dev-button/connection-dev-button-styles.d.ts +9 -0
- package/ui/components/connection-dev-button/connection-dev-button-styles.d.ts.map +1 -0
- package/ui/components/connection-dev-button/index.d.ts +36 -0
- package/ui/components/connection-dev-button/index.d.ts.map +1 -0
- package/ui/components/connection-dev-button/use-connection-dev-state.d.ts +29 -0
- package/ui/components/connection-dev-button/use-connection-dev-state.d.ts.map +1 -0
- package/ui/components/index.d.ts +1 -0
- package/ui/components/index.d.ts.map +1 -1
- package/ui/features/canvas/hooks/use-image-renderer.d.ts +5 -4
- package/ui/features/canvas/hooks/use-image-renderer.d.ts.map +1 -1
- package/ui/hooks/use-function-warmup.d.ts +4 -14
- package/ui/hooks/use-function-warmup.d.ts.map +1 -1
- package/ui/hooks/use-kos-date-formats.d.ts +15 -29
- package/ui/hooks/use-kos-date-formats.d.ts.map +1 -1
- package/ui/hooks/use-kos-region-timezones.d.ts +4 -55
- package/ui/hooks/use-kos-region-timezones.d.ts.map +1 -1
- package/ui/hooks/use-kos-regions.d.ts +11 -23
- package/ui/hooks/use-kos-regions.d.ts.map +1 -1
- package/ui/hooks/use-kos-time-formats.d.ts +16 -31
- package/ui/hooks/use-kos-time-formats.d.ts.map +1 -1
- package/ui/hooks/use-kos-unit-systems.d.ts +13 -27
- package/ui/hooks/use-kos-unit-systems.d.ts.map +1 -1
- package/ui/hooks/view-model/use-view-model.d.ts +6 -31
- package/ui/hooks/view-model/use-view-model.d.ts.map +1 -1
- package/ui/policies/reload-on-disconnect-policy.d.ts +5 -6
- package/ui/policies/reload-on-disconnect-policy.d.ts.map +1 -1
- package/index-CRb8ucfF.cjs.map +0 -1
- package/index-YzHb2lnB.js +0 -13607
- package/index-YzHb2lnB.js.map +0 -1
|
@@ -12,25 +12,19 @@ export interface FutureDelegate<T extends {} = Record<string, unknown>> {
|
|
|
12
12
|
future?: IFutureModel<T>;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* A model that tracks Futures through a `futureHandler`. `@kosFutureAware` and
|
|
16
|
+
* `@kosMultipleFutureAware` add the handler, and `@kosFuture` methods register
|
|
17
|
+
* each Future they start with it. The handler calls `onFutureUpdate`, when
|
|
18
|
+
* defined, as a Future progresses or ends.
|
|
16
19
|
*
|
|
17
|
-
*
|
|
18
|
-
* multiple concurrent long-running operations with centralized lifecycle management.
|
|
19
|
-
*
|
|
20
|
-
* @example Basic Future Container
|
|
20
|
+
* @example
|
|
21
21
|
* ```typescript
|
|
22
|
-
* @kosModel(
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* this.
|
|
28
|
-
* this.futureHandler = new FutureHandler(this);
|
|
29
|
-
* }
|
|
30
|
-
*
|
|
31
|
-
* onFutureUpdate(future: IFutureModel, alias?: string): void {
|
|
32
|
-
* // Handle progress updates from any managed Future
|
|
33
|
-
* console.log(`Operation ${alias || future.id}: ${future.progress}%`);
|
|
22
|
+
* @kosModel(MODEL_TYPE)
|
|
23
|
+
* @kosFutureAware()
|
|
24
|
+
* class PumpModelImpl {
|
|
25
|
+
* @kosFuture()
|
|
26
|
+
* async calibrate(tracker?: string) {
|
|
27
|
+
* return calibratePump(this.path, tracker);
|
|
34
28
|
* }
|
|
35
29
|
* }
|
|
36
30
|
* ```
|
|
@@ -45,7 +39,7 @@ export interface FutureContainer<T extends {} = Record<string, unknown>> {
|
|
|
45
39
|
onFutureUpdate?: (future: IFutureModel<T>, alias?: string) => void;
|
|
46
40
|
}
|
|
47
41
|
/**
|
|
48
|
-
*
|
|
42
|
+
* A Future handler that keeps several Futures, keyed by alias.
|
|
49
43
|
*
|
|
50
44
|
* @kosService core.future-aware
|
|
51
45
|
* @group KOS Model
|
|
@@ -56,26 +50,8 @@ export interface MultiFutureAware<T extends {} = Record<string, unknown>> {
|
|
|
56
50
|
futureMap: Map<string, IFutureModel<T>>;
|
|
57
51
|
}
|
|
58
52
|
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* Handles multiple concurrent Futures with operations for adding, removing,
|
|
62
|
-
* and querying Future instances. Essential for complex models that coordinate
|
|
63
|
-
* multiple device operations simultaneously.
|
|
64
|
-
*
|
|
65
|
-
* @example Future Container Operations
|
|
66
|
-
* ```typescript
|
|
67
|
-
* // Add new Future with optional alias
|
|
68
|
-
* container.addFuture(calibrationFuture, 'pump-calibration');
|
|
69
|
-
*
|
|
70
|
-
* // Query specific Future
|
|
71
|
-
* const future = container.getFuture('pump-calibration');
|
|
72
|
-
*
|
|
73
|
-
* // Remove completed Future
|
|
74
|
-
* container.removeFuture('pump-calibration');
|
|
75
|
-
*
|
|
76
|
-
* // Get all active Futures
|
|
77
|
-
* const activeFutures = container.allFutures;
|
|
78
|
-
* ```
|
|
53
|
+
* Tracks the Futures of a {@link FutureContainer}. `alias` names a Future when
|
|
54
|
+
* the handler keeps several; a single-Future handler ignores it.
|
|
79
55
|
*
|
|
80
56
|
* @kosService core.future-aware
|
|
81
57
|
* @group KOS Model
|
|
@@ -90,27 +66,7 @@ export interface FutureAwareContainer<T extends {} = Record<string, unknown>> ex
|
|
|
90
66
|
onFutureUpdate?: (future: IFutureModel<T>, alias?: string) => void;
|
|
91
67
|
}
|
|
92
68
|
/**
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
* Provides essential Future status information without full container complexity.
|
|
96
|
-
* Ideal for models that typically handle single operations or need simple
|
|
97
|
-
* Future integration.
|
|
98
|
-
*
|
|
99
|
-
* @example Basic Future Awareness
|
|
100
|
-
* ```typescript
|
|
101
|
-
* function OperationStatus({ model }: { model: FutureAware }) {
|
|
102
|
-
* return (
|
|
103
|
-
* <div>
|
|
104
|
-
* <p>Status: {model.status}</p>
|
|
105
|
-
* <progress value={model.progress} max={100} />
|
|
106
|
-
* <p>Time remaining: {model.timeRemaining}</p>
|
|
107
|
-
* {model.status === 'IN_PROGRESS' && (
|
|
108
|
-
* <button onClick={() => model.cancel()}>Cancel</button>
|
|
109
|
-
* )}
|
|
110
|
-
* </div>
|
|
111
|
-
* );
|
|
112
|
-
* }
|
|
113
|
-
* ```
|
|
69
|
+
* Status of a model's current Future, flattened onto the model for display.
|
|
114
70
|
*
|
|
115
71
|
* @kosService core.future-aware
|
|
116
72
|
* @group KOS Model
|
|
@@ -125,30 +81,12 @@ export interface FutureAware {
|
|
|
125
81
|
cancel: () => Promise<void>;
|
|
126
82
|
}
|
|
127
83
|
/**
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
* Defines the initial state and parameters for Future operations including
|
|
131
|
-
* progress tracking, client data attachment, and namespace configuration.
|
|
84
|
+
* Initial state of a Future model, normally mapped from the backend's future
|
|
85
|
+
* response.
|
|
132
86
|
*
|
|
133
87
|
* @remarks
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
* in the constructor. The value <strong>might</strong> be overridden by
|
|
137
|
-
* subsequent lifecycle methods or updates.
|
|
138
|
-
*
|
|
139
|
-
* @example Basic Future Options
|
|
140
|
-
* ```typescript
|
|
141
|
-
* const futureOptions: IFutureModelOptions = {
|
|
142
|
-
* id: 'calibration-123',
|
|
143
|
-
* namespace: 'kos',
|
|
144
|
-
* progress: 0,
|
|
145
|
-
* clientData: { deviceId: 'pump-S4', targetRate: 1.2 }
|
|
146
|
-
* };
|
|
147
|
-
*
|
|
148
|
-
* const future = FutureFactory.instance('my-future')
|
|
149
|
-
* .options(futureOptions)
|
|
150
|
-
* .build();
|
|
151
|
-
* ```
|
|
88
|
+
* The constructor copies these properties onto the model; later topic updates
|
|
89
|
+
* can overwrite them.
|
|
152
90
|
*
|
|
153
91
|
* @kosService core.future-aware
|
|
154
92
|
* @group KOS Model
|
|
@@ -177,72 +115,17 @@ export interface IFutureModelOptions<T extends {} = Record<string, unknown>> {
|
|
|
177
115
|
note?: string;
|
|
178
116
|
}
|
|
179
117
|
/**
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
* with real-time progress updates, cancellation support, and automatic lifecycle management.
|
|
184
|
-
* Essential for building responsive user interfaces that handle time-consuming operations.
|
|
185
|
-
*
|
|
186
|
-
* ## Key Features
|
|
187
|
-
* - **Real-Time Progress Tracking** - Live updates via WebSocket topics with percentage completion
|
|
188
|
-
* - **Cancellation Support** - Ability to cancel in-progress operations safely
|
|
189
|
-
* - **Automatic Cleanup** - Models self-destruct when operations complete or fail
|
|
190
|
-
* - **Status Management** - Clear status reporting (NOT_ACTIVE, IN_PROGRESS, Success, Fail)
|
|
191
|
-
* - **Time Estimation** - Remaining time calculations with localized formatting
|
|
192
|
-
* - **Client Data Attachment** - Associate custom data with future operations
|
|
193
|
-
* - **Namespace Support** - Separate futures for different services (kos, studio, etc.)
|
|
194
|
-
*
|
|
195
|
-
* ## Operation Lifecycle
|
|
196
|
-
* Futures progress through distinct states with automatic status management:
|
|
197
|
-
* - **NOT_ACTIVE** - Operation not yet started or queued
|
|
198
|
-
* - **IN_PROGRESS** - Operation actively executing with progress updates
|
|
199
|
-
* - **Success** - Operation completed successfully (triggers automatic cleanup)
|
|
200
|
-
* - **Fail** - Operation failed with error details (triggers automatic cleanup)
|
|
201
|
-
*
|
|
202
|
-
* ## Common Use Cases
|
|
203
|
-
* - **Device Operations** - Track pump calibration, system diagnostics, configuration updates
|
|
204
|
-
* - **File Transfers** - Monitor upload/download progress with cancellation support
|
|
205
|
-
* - **System Updates** - Track firmware updates, package installations, system maintenance
|
|
206
|
-
* - **Data Processing** - Monitor analysis operations, report generation, bulk operations
|
|
207
|
-
* - **VM Management** - Track VM creation, deployment, and lifecycle operations
|
|
118
|
+
* A long-running backend operation. The model updates from `kos.future/{id}`
|
|
119
|
+
* topic events and destroys itself when the operation ends in success or
|
|
120
|
+
* failure.
|
|
208
121
|
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
* id: 'pump-cal-123',
|
|
214
|
-
* namespace: 'kos',
|
|
215
|
-
* clientData: { pumpId: 'S4', targetRate: 0.9 }
|
|
216
|
-
* })
|
|
217
|
-
* .build();
|
|
218
|
-
*
|
|
219
|
-
* // Monitor progress
|
|
220
|
-
* console.log(`Status: ${calibrationFuture.status}`);
|
|
221
|
-
* console.log(`Progress: ${calibrationFuture.progress}%`);
|
|
222
|
-
* console.log(`Time remaining: ${calibrationFuture.timeRemaining}`);
|
|
223
|
-
*
|
|
224
|
-
* // Cancel if needed
|
|
225
|
-
* await calibrationFuture.cancelFuture();
|
|
226
|
-
* ```
|
|
122
|
+
* `status` is the `endState` once the operation ends (`SUCCESS`, `FAIL`, `ABORT`
|
|
123
|
+
* or `CANCEL`), otherwise `IN_PROGRESS` while progress is reported and
|
|
124
|
+
* `NOT_ACTIVE` before. `timeRemaining` formats `remainingTimeMs` as text such as
|
|
125
|
+
* `"5 minutes"`. `cancelFuture` asks the backend to cancel the operation.
|
|
227
126
|
*
|
|
228
|
-
*
|
|
229
|
-
*
|
|
230
|
-
* function CalibrationProgress({ futureId }: { futureId: string }) {
|
|
231
|
-
* const future = useFuture(futureId);
|
|
232
|
-
*
|
|
233
|
-
* return (
|
|
234
|
-
* <div>
|
|
235
|
-
* <progress value={future.progress} max={100} />
|
|
236
|
-
* <p>{future.timeRemaining} remaining</p>
|
|
237
|
-
* {future.status === 'IN_PROGRESS' && (
|
|
238
|
-
* <button onClick={() => future.cancelFuture()}>
|
|
239
|
-
* Cancel Operation
|
|
240
|
-
* </button>
|
|
241
|
-
* )}
|
|
242
|
-
* </div>
|
|
243
|
-
* );
|
|
244
|
-
* }
|
|
245
|
-
* ```
|
|
127
|
+
* Futures are usually started by a `@kosFuture` method and read through the
|
|
128
|
+
* model's `futureHandler`.
|
|
246
129
|
*
|
|
247
130
|
* @interface
|
|
248
131
|
* @kosService core.future-aware
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"future-types.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/future/future-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACpE,MAAM,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;CAC1B;AAED
|
|
1
|
+
{"version":3,"file":"future-types.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/future/future-types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GpioChipModel } from './gpio-chip-model';
|
|
2
|
+
import { GpioChipContainerResponse } from './services';
|
|
3
|
+
import { GpioChipOptions } from './types';
|
|
4
|
+
export type GpioChipResponse = GpioChipContainerResponse[number];
|
|
5
|
+
export interface GpioChipDto extends GpioChipOptions {
|
|
6
|
+
id: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function mapGpioChipToOptions(dto: GpioChipDto): GpioChipOptions;
|
|
9
|
+
export declare function createGpioChipModel(dto: GpioChipDto): GpioChipModel;
|
|
10
|
+
export declare function updateGpioChipModel(dto: GpioChipDto, model: GpioChipModel): void;
|
|
11
|
+
export declare function filterGpioChipDto(chip: GpioChipResponse): boolean;
|
|
12
|
+
export declare function mapGpioChipId(chip: GpioChipResponse): GpioChipDto;
|
|
13
|
+
export declare function afterGpioChipCreated(model: GpioChipModel, dto: GpioChipDto): void;
|
|
14
|
+
//# sourceMappingURL=gpio-chip-builders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gpio-chip-builders.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/gpio-chip/gpio-chip-builders.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,MAAM,gBAAgB,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAC;AAEjE,MAAM,WAAW,WAAY,SAAQ,eAAe;IAClD,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,WAAW,GAAG,eAAe,CAEtE;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,WAAW,GAAG,aAAa,CAEnE;AAED,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,WAAW,EAChB,KAAK,EAAE,aAAa,GACnB,IAAI,CAEN;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAEjE;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,gBAAgB,GAAG,WAAW,CASjE;AAED,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,aAAa,EACpB,GAAG,EAAE,WAAW,GACf,IAAI,CAWN"}
|
|
@@ -6,9 +6,10 @@ import { PublicModelInterface } from '../../../core/types';
|
|
|
6
6
|
import { GpioChipModel } from './gpio-chip-model';
|
|
7
7
|
import { GpioChipContainerResponse } from './services';
|
|
8
8
|
import { GpioChipContainerOptions } from './types';
|
|
9
|
+
import { GpioChipResponse } from './gpio-chip-builders';
|
|
9
10
|
export declare const MODEL_TYPE = "gpio-chip-container-model";
|
|
10
11
|
export type GpioChipContainerModel = PublicModelInterface<GpioChipContainerModelImpl>;
|
|
11
|
-
export interface GpioChipContainerModelImpl extends KosLoggerAware, KosContainerAware<GpioChipModel> {
|
|
12
|
+
export interface GpioChipContainerModelImpl extends KosLoggerAware, KosContainerAware<GpioChipModel, GpioChipResponse> {
|
|
12
13
|
}
|
|
13
14
|
export declare class GpioChipContainerModelImpl implements IKosIdentifiable, IKosDataModel {
|
|
14
15
|
static Registration: SingletonKosModelRegistrationFactory<GpioChipContainerModel, GpioChipContainerOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gpio-chip-container-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/gpio-chip/gpio-chip-container-model.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"gpio-chip-container-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/gpio-chip/gpio-chip-container-model.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAIL,KAAK,yBAAyB,EAC/B,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,EAML,KAAK,gBAAgB,EACtB,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,UAAU,8BAA8B,CAAC;AAEtD,MAAM,MAAM,sBAAsB,GAChC,oBAAoB,CAAC,0BAA0B,CAAC,CAAC;AAGnD,MAAM,WAAW,0BACf,SAAQ,cAAc,EACpB,iBAAiB,CAAC,aAAa,EAAE,gBAAgB,CAAC;CAAG;AAEzD,qBAca,0BACX,YAAW,gBAAgB,EAAE,aAAa;IAG1C,MAAM,CAAC,YAAY,EAAE,oCAAoC,CACvD,sBAAsB,EACtB,wBAAwB,CACzB,CAAC;IAEF,EAAE,EAAE,MAAM,CAAC;IACX,kBAAkB,EAAE,MAAM,CAAC;gBAEf,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,wBAAwB;IAK9D,WAAW,CAAC,QAAQ,EAAE,wBAAwB,GAAG,IAAI;IAoB/C,kBAAkB,CACtB,MAAM,EAAE,KAAK,EACb,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,GAClD,OAAO,CAAC,IAAI,CAAC;IAsDV,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAG5B;AACD,eAAO,MAAM,iBAAiB,wFAA0C,CAAC"}
|
|
@@ -3,60 +3,18 @@ import { KeyValueUpdate } from './services';
|
|
|
3
3
|
import { KeyValueOptions } from './types';
|
|
4
4
|
export declare const MODEL_TYPE = "key-value-model";
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* state, feature flags, or any data that needs to persist between sessions and sync across instances.
|
|
11
|
-
*
|
|
12
|
-
* ## Key Features
|
|
13
|
-
* - **Persistent Storage** - Data survives application restarts and browser refreshes
|
|
14
|
-
* - **Real-time Synchronization** - Changes propagate instantly to all connected clients
|
|
15
|
-
* - **Namespace Isolation** - Multiple stores can coexist without key collisions
|
|
16
|
-
* - **Type-Safe Values** - Supports string, number, boolean, and undefined types
|
|
17
|
-
* - **Reactive Updates** - Automatic UI updates when values change (locally or remotely)
|
|
18
|
-
* - **Topic-Based Sync** - Uses KOS event system for distributed state management
|
|
19
|
-
*
|
|
20
|
-
* ## Topic-Based Reactivity
|
|
21
|
-
* The model listens to two KOS topics for real-time synchronization:
|
|
22
|
-
* - **`/keyVal/set`** - Fired when any key-value pair is updated or added
|
|
23
|
-
* - **`/keyVal/remove`** - Fired when a key is deleted from the store
|
|
24
|
-
*
|
|
25
|
-
* These topics ensure that all instances of the model with the same namespace stay
|
|
26
|
-
* synchronized across browser tabs, windows, and even different client applications.
|
|
27
|
-
* The model automatically filters events by namespace to ensure isolation.
|
|
6
|
+
* A namespace of the device's persistent key-value store. The model loads the
|
|
7
|
+
* namespace on load, writes changes through `updateState`, and applies the
|
|
8
|
+
* `/keyVal/set` and `/keyVal/remove` topics for its namespace, so every client
|
|
9
|
+
* using the namespace sees the same `data`.
|
|
28
10
|
*
|
|
29
11
|
* @interface
|
|
30
12
|
*
|
|
31
|
-
* @example
|
|
13
|
+
* @example
|
|
32
14
|
* ```typescript
|
|
33
|
-
* const
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* // Store values
|
|
38
|
-
* await preferences.updateState('theme', 'dark');
|
|
39
|
-
* await preferences.updateState('fontSize', 14);
|
|
40
|
-
*
|
|
41
|
-
* // Access reactive data
|
|
42
|
-
* console.log(preferences.data.theme); // 'dark'
|
|
43
|
-
* console.log(preferences.data.fontSize); // 14
|
|
44
|
-
* ```
|
|
45
|
-
*
|
|
46
|
-
* @example React Integration
|
|
47
|
-
* ```typescript
|
|
48
|
-
* const UserSettings: React.FC = kosComponent(() => {
|
|
49
|
-
* const settings = useModel(KeyValue, 'app-settings');
|
|
50
|
-
*
|
|
51
|
-
* return (
|
|
52
|
-
* <div>
|
|
53
|
-
* <p>Theme: {settings.data.theme || 'light'}</p>
|
|
54
|
-
* <button onClick={() => settings.updateState('theme', 'dark')}>
|
|
55
|
-
* Set Dark Theme
|
|
56
|
-
* </button>
|
|
57
|
-
* </div>
|
|
58
|
-
* );
|
|
59
|
-
* });
|
|
15
|
+
* const prefs = KeyValue.instance("user-prefs").options({ namespace: "preferences" }).build();
|
|
16
|
+
* await prefs.updateState("theme", "dark");
|
|
17
|
+
* prefs.data.theme; // "dark"
|
|
60
18
|
* ```
|
|
61
19
|
*
|
|
62
20
|
* @group KOS Model
|
|
@@ -82,23 +40,11 @@ export declare class KeyValueModelImpl implements IKosDataModel, IKosIdentifiabl
|
|
|
82
40
|
*/
|
|
83
41
|
init(): Promise<void>;
|
|
84
42
|
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
* Changes are automatically persisted and synchronized across all instances
|
|
88
|
-
* with the same namespace via KOS topics.
|
|
43
|
+
* Stores a value under `key`, or deletes the key when `value` is undefined.
|
|
89
44
|
*
|
|
90
45
|
* @param key - The key to update or delete
|
|
91
|
-
* @param value - The value to set
|
|
46
|
+
* @param value - The value to set, or undefined to delete the key
|
|
92
47
|
* @returns Promise that resolves when the operation completes
|
|
93
|
-
*
|
|
94
|
-
* @example
|
|
95
|
-
* ```typescript
|
|
96
|
-
* // Set a value
|
|
97
|
-
* await keyValue.updateState('theme', 'dark');
|
|
98
|
-
*
|
|
99
|
-
* // Delete a key
|
|
100
|
-
* await keyValue.updateState('theme', undefined);
|
|
101
|
-
* ```
|
|
102
48
|
*/
|
|
103
49
|
updateState(key: string, value: string | number | boolean | undefined): Promise<void>;
|
|
104
50
|
/**
|
|
@@ -108,19 +54,13 @@ export declare class KeyValueModelImpl implements IKosDataModel, IKosIdentifiabl
|
|
|
108
54
|
*/
|
|
109
55
|
load(): Promise<void>;
|
|
110
56
|
/**
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
* Automatically called when any KeyValue model instance updates a value,
|
|
114
|
-
* ensuring all instances with the same namespace stay synchronized.
|
|
57
|
+
* Applies a `/keyVal/set` event for this namespace.
|
|
115
58
|
*
|
|
116
59
|
* @param update - The key-value update event containing namespace, key, and new value
|
|
117
60
|
*/
|
|
118
61
|
handleStateUpdate(update: KeyValueUpdate): void;
|
|
119
62
|
/**
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
* Automatically called when any KeyValue model instance deletes a key,
|
|
123
|
-
* ensuring all instances with the same namespace stay synchronized.
|
|
63
|
+
* Applies a `/keyVal/remove` event for this namespace.
|
|
124
64
|
*
|
|
125
65
|
* @param update - The key-value update event containing namespace and deleted key
|
|
126
66
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"key-value-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/key-value/key-value-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAEhB,kBAAkB,EAClB,OAAO,EACP,oBAAoB,EACrB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,eAAO,MAAM,UAAU,oBAAoB,CAAC;AAE5C
|
|
1
|
+
{"version":3,"file":"key-value-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/key-value/key-value-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAEhB,kBAAkB,EAClB,OAAO,EACP,oBAAoB,EACrB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,eAAO,MAAM,UAAU,oBAAoB,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,MAAM,aAAa,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAEpE;;;GAGG;AACH,qBACa,iBAAkB,YAAW,aAAa,EAAE,gBAAgB;IACvE,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,SAAS,CAAS;IAC1B,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC;gBAEnE,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,eAAe,EACxB,OAAO,EAAE,kBAAkB;IAQ7B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;;;;;OAMG;IACG,WAAW,CACf,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAC3C,OAAO,CAAC,IAAI,CAAC;IAUhB;;;;OAIG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAM3B;;;;OAIG;IAEH,iBAAiB,CAAC,MAAM,EAAE,cAAc;IAOxC;;;;OAIG;IAEH,iBAAiB,CAAC,MAAM,EAAE,cAAc;CAMzC"}
|
|
@@ -2,87 +2,15 @@ import { KosModelRegistrationFactory } from '../../../core';
|
|
|
2
2
|
import { KeyValueModel } from './key-value-model';
|
|
3
3
|
import { KeyValueOptions } from './types';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* The registration bean includes convenience methods for creating and working with KeyValueModel instances.
|
|
8
|
-
*
|
|
9
|
-
* ## type
|
|
10
|
-
* The type property is a string that identifies the model type.
|
|
11
|
-
* The type is used to identify the model type in the model registry and to narrow down the model type in type predicates. It's most frequently
|
|
12
|
-
* used when declaring dependencies on models.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```typescript
|
|
16
|
-
*
|
|
17
|
-
* @kosDependency({modelType: KeyValue.type, id: "studioStateId"})
|
|
18
|
-
* private studioStateModel: KeyValueModel;
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* ## factory
|
|
23
|
-
*
|
|
24
|
-
* The factory method creates a factory function that can be used to create new KeyValueModel instances.
|
|
25
|
-
*
|
|
26
|
-
|
|
27
|
-
* As this is a singleton model, the factory function accepts the model options as its argument.
|
|
28
|
-
*
|
|
29
|
-
* If a model with the same model type already exists, the factory function will return the existing model. The options will be ignored
|
|
30
|
-
* in this case and the existing model will be returned in its current state.
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* ```typescript
|
|
34
|
-
* const model = KeyValue.factory({
|
|
35
|
-
* // Add option data
|
|
36
|
-
* });
|
|
37
|
-
* ```
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
*
|
|
41
|
-
* ## predicate
|
|
42
|
-
*
|
|
43
|
-
* [Typescript type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) function that will identify and narrow down a model to a KeyValueModel.
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```typescript
|
|
47
|
-
*
|
|
48
|
-
* const model: IKosDataModel = ...; // some model
|
|
49
|
-
*
|
|
50
|
-
* if (KeyValue.predicate(model)) {
|
|
51
|
-
* // if the function evaluates to true, the model is narrowed down to KeyValueModel
|
|
52
|
-
* // and the compiler will know that the model has the KeyValueModel interface
|
|
53
|
-
* model.updateAvailability(false);
|
|
54
|
-
* }
|
|
55
|
-
* ```
|
|
56
|
-
*
|
|
57
|
-
* ## registration
|
|
58
|
-
*
|
|
59
|
-
* The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
|
|
60
|
-
* can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
|
|
5
|
+
* Registration for {@link KeyValueModel}.
|
|
61
6
|
*
|
|
7
|
+
* `type` identifies the model in the registry and in `@kosDependency` declarations.
|
|
8
|
+
* `register()` adds the model to the registry. `instance(id)` builds the model, or returns the existing one when the id is already in use.
|
|
62
9
|
*
|
|
63
10
|
* @example
|
|
64
|
-
*
|
|
65
|
-
* In an application registration file you can declare the model registration as follows:
|
|
66
|
-
*
|
|
67
|
-
* **registration.ts**
|
|
68
11
|
* ```typescript
|
|
69
|
-
*
|
|
70
|
-
* import { KosModelRegistry } from "@kosdev-code/kos-dispense-sdk";
|
|
71
|
-
*
|
|
72
|
-
* import { initKosProvider } from "@kosdev-code/kos-ui-sdk";
|
|
73
|
-
*
|
|
74
|
-
* KosModelRegistry.dispense
|
|
75
|
-
* .models()
|
|
76
|
-
* .model(KeyValue);
|
|
12
|
+
* const model = KeyValue.instance("keyValueId").options(options).build();
|
|
77
13
|
* ```
|
|
78
|
-
|
|
79
|
-
* ## registration.singleton
|
|
80
|
-
|
|
81
|
-
* The studioState model is a singleton model. This means that each time the factory function is called , the same instance will be returned.
|
|
82
|
-
* If the model does not yet exist, it will be created passing in the provided options to initialize it.
|
|
83
|
-
*
|
|
84
|
-
* Singleton models don't require an ID as they will use the model type as their ID to guarantee uniqueness throughout the system.
|
|
85
|
-
|
|
86
|
-
* */
|
|
14
|
+
*/
|
|
87
15
|
export declare const KeyValue: KosModelRegistrationFactory<KeyValueModel, KeyValueOptions>;
|
|
88
16
|
//# sourceMappingURL=key-value-registration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"key-value-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/key-value/key-value-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C
|
|
1
|
+
{"version":3,"file":"key-value-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/key-value/key-value-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,6DAMnB,CAAC"}
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview
|
|
3
|
-
*
|
|
4
|
-
* This module provides service functions for managing key-value pairs in KOS device storage.
|
|
5
|
-
* Supports namespaced storage, CRUD operations, and typed value handling for configuration
|
|
6
|
-
* data, user preferences, and application state persistence.
|
|
2
|
+
* @fileoverview Service functions for the device's namespaced key-value store.
|
|
7
3
|
*
|
|
8
4
|
* @module KeyValueServices
|
|
9
5
|
*/
|
|
10
6
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* Represents the structure of data returned from key-value service endpoints,
|
|
14
|
-
* supporting primitive types commonly used for configuration and state data.
|
|
7
|
+
* Key-value pairs of one namespace.
|
|
15
8
|
*
|
|
16
9
|
* @group KOS Model
|
|
17
10
|
* @category Key-Value Store
|
|
@@ -21,11 +14,7 @@ interface KeyValueResponse {
|
|
|
21
14
|
[key: string]: string | number | boolean;
|
|
22
15
|
}
|
|
23
16
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* Defines the structure for updating individual key-value pairs within
|
|
27
|
-
* specific namespaces, supporting targeted updates without affecting
|
|
28
|
-
* other stored data.
|
|
17
|
+
* A single key-value write within a namespace.
|
|
29
18
|
*
|
|
30
19
|
* @group KOS Model
|
|
31
20
|
* @category Key-Value Store
|
|
@@ -39,98 +28,50 @@ export interface KeyValueUpdate {
|
|
|
39
28
|
value: string;
|
|
40
29
|
}
|
|
41
30
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* Permanently deletes a key and its associated value from the specified namespace.
|
|
45
|
-
* This operation cannot be undone, so use with caution for critical data.
|
|
31
|
+
* Deletes one key from a namespace.
|
|
46
32
|
*
|
|
47
33
|
* @param namespace - Namespace containing the key to delete
|
|
48
34
|
* @param key - Specific key to remove from storage
|
|
49
35
|
*
|
|
50
|
-
* @throws {Error} When deletion request fails
|
|
51
|
-
*
|
|
52
|
-
* @example Delete User Preference
|
|
53
|
-
* ```typescript
|
|
54
|
-
* await deleteKeyValue('user-preferences', 'theme-mode');
|
|
55
|
-
* console.log('Theme preference cleared');
|
|
56
|
-
* ```
|
|
36
|
+
* @throws {Error} When the deletion request fails
|
|
57
37
|
*
|
|
58
38
|
* @group KOS Model
|
|
59
39
|
* @category Key-Value Store
|
|
60
40
|
*/
|
|
61
41
|
export declare const deleteKeyValue: (namespace: string, key: string) => Promise<void>;
|
|
62
42
|
/**
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* Stores a value under the specified key within the given namespace. If the key
|
|
66
|
-
* already exists, its value will be overwritten. Supports primitive types with
|
|
67
|
-
* automatic string conversion for API compatibility.
|
|
43
|
+
* Stores a value under a key in a namespace, replacing any existing value. The
|
|
44
|
+
* value is sent as a string.
|
|
68
45
|
*
|
|
69
46
|
* @param namespace - Namespace for organizing related key-value pairs
|
|
70
47
|
* @param key - Unique identifier within the namespace
|
|
71
|
-
* @param value - Value to store
|
|
48
|
+
* @param value - Value to store
|
|
72
49
|
* @returns Promise resolving to the stored value
|
|
73
50
|
*
|
|
74
|
-
* @throws {Error} When
|
|
75
|
-
*
|
|
76
|
-
* @example Store Configuration Setting
|
|
77
|
-
* ```typescript
|
|
78
|
-
* await updateKeyValue('device-config', 'maxRetries', 5);
|
|
79
|
-
* await updateKeyValue('user-prefs', 'darkMode', true);
|
|
80
|
-
* await updateKeyValue('app-state', 'lastLogin', '2024-01-15');
|
|
81
|
-
* ```
|
|
51
|
+
* @throws {Error} When the response status is not 200
|
|
82
52
|
*
|
|
83
53
|
* @group KOS Model
|
|
84
54
|
* @category Key-Value Store
|
|
85
55
|
*/
|
|
86
56
|
export declare const updateKeyValue: (namespace: string, key: string, value: string | number | boolean) => Promise<any>;
|
|
87
57
|
/**
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
* Fetches all stored data within the given namespace as a complete object.
|
|
91
|
-
* Useful for loading configuration sets, user preferences, or application
|
|
92
|
-
* state data in bulk operations.
|
|
58
|
+
* Fetches every key-value pair in a namespace.
|
|
93
59
|
*
|
|
94
60
|
* @param namespace - Namespace to retrieve data from (defaults to "studio")
|
|
95
61
|
* @returns Promise resolving to object containing all key-value pairs in namespace
|
|
96
62
|
*
|
|
97
|
-
* @throws {Error} When
|
|
98
|
-
*
|
|
99
|
-
* @example Load Application Configuration
|
|
100
|
-
* ```typescript
|
|
101
|
-
* const appConfig = await getKeyValue('app-config');
|
|
102
|
-
* console.log('Max retries:', appConfig.maxRetries);
|
|
103
|
-
* console.log('Debug mode:', appConfig.debugMode);
|
|
104
|
-
*
|
|
105
|
-
* const userPrefs = await getKeyValue('user-preferences');
|
|
106
|
-
* const theme = userPrefs.themeMode || 'light';
|
|
107
|
-
* ```
|
|
63
|
+
* @throws {Error} When the response status is not 200
|
|
108
64
|
*
|
|
109
65
|
* @group KOS Model
|
|
110
66
|
* @category Key-Value Store
|
|
111
67
|
*/
|
|
112
68
|
export declare const getKeyValue: (namespace?: string) => Promise<KeyValueResponse>;
|
|
113
69
|
/**
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
* Permanently deletes all data within the specified namespace. This is a
|
|
117
|
-
* destructive operation that cannot be undone. Use with extreme caution
|
|
118
|
-
* for critical data or production systems.
|
|
70
|
+
* Deletes a namespace and every key in it.
|
|
119
71
|
*
|
|
120
72
|
* @param namespace - Namespace to completely remove from storage
|
|
121
73
|
*
|
|
122
|
-
* @throws {Error} When deletion request fails
|
|
123
|
-
*
|
|
124
|
-
* @example Clear All User Preferences
|
|
125
|
-
* ```typescript
|
|
126
|
-
* // Warning: This removes ALL user preferences permanently
|
|
127
|
-
* await deleteKeyValueNamespace('user-preferences');
|
|
128
|
-
* console.log('All user preferences cleared');
|
|
129
|
-
*
|
|
130
|
-
* // Better: Clear specific preferences individually
|
|
131
|
-
* await deleteKeyValue('user-preferences', 'theme-mode');
|
|
132
|
-
* await deleteKeyValue('user-preferences', 'language');
|
|
133
|
-
* ```
|
|
74
|
+
* @throws {Error} When the deletion request fails
|
|
134
75
|
*
|
|
135
76
|
* @group KOS Model
|
|
136
77
|
* @category Key-Value Store
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"key-value-services.d.ts","sourceRoot":"","sources":["../../../../../../../packages/kos-ui-sdk/src/models/models/key-value/services/key-value-services.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"key-value-services.d.ts","sourceRoot":"","sources":["../../../../../../../packages/kos-ui-sdk/src/models/models/key-value/services/key-value-services.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAkBH;;;;;GAKG;AACH,UAAU,gBAAgB;IACxB,4CAA4C;IAC5C,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CAC1C;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,iDAAiD;IACjD,SAAS,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,GAAU,WAAW,MAAM,EAAE,KAAK,MAAM,kBAKlE,CAAC;AACF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,GACzB,WAAW,MAAM,EACjB,KAAK,MAAM,EACX,OAAO,MAAM,GAAG,MAAM,GAAG,OAAO,iBAcjC,CAAC;AACF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,GAAU,kBAAoB,8BAarD,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,GAAU,WAAW,MAAM,kBAK9D,CAAC"}
|