@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
|
@@ -1,86 +1,18 @@
|
|
|
1
1
|
import { KosModelRegistrationFactory } from '../../../core';
|
|
2
2
|
import { NetworkInterfaceModel } from './network-interface-model';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Registration for {@link NetworkInterfaceModel}.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* ## type
|
|
9
|
-
* The type property is a string that identifies the model type.
|
|
10
|
-
* 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
|
|
11
|
-
* used when declaring dependencies on models.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```typescript
|
|
15
|
-
*
|
|
16
|
-
* @kosDependency({modelType: NetworkInterface.type, id: "networkInterfaceId"})
|
|
17
|
-
* private networkInterfaceModel: NetworkInterfaceModel;
|
|
18
|
-
* ```
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* ## factory
|
|
22
|
-
*
|
|
23
|
-
* The factory method creates a factory function that can be used to create new NetworkInterfaceModel instances.
|
|
24
|
-
*
|
|
25
|
-
|
|
26
|
-
* The factory function is a curried function that takes the model id as the first argument and the options as the second argument.
|
|
27
|
-
*
|
|
28
|
-
* If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored
|
|
29
|
-
* in this case and the existing model will be returned in its current state.
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```typescript
|
|
33
|
-
* const model = NetworkInterface.factory("networkInterfaceId")({
|
|
34
|
-
* // Add option data
|
|
35
|
-
* });
|
|
36
|
-
* ```
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
*
|
|
40
|
-
* ## predicate
|
|
41
|
-
*
|
|
42
|
-
* [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 NetworkInterfaceModel.
|
|
6
|
+
* `type` identifies the model in the registry and in `@kosDependency` declarations.
|
|
7
|
+
* `register()` adds the model to the registry. `instance(id)` builds the model, or returns the existing one when the id is already in use.
|
|
43
8
|
*
|
|
44
9
|
* @example
|
|
45
10
|
* ```typescript
|
|
46
|
-
*
|
|
47
|
-
* const model: IKosDataModel = ...; // some model
|
|
48
|
-
*
|
|
49
|
-
* if (NetworkInterface.predicate(model)) {
|
|
50
|
-
* // if the function evaluates to true, the model is narrowed down to NetworkInterfaceModel
|
|
51
|
-
* // and the compiler will know that the model has the NetworkInterfaceModel interface
|
|
52
|
-
* model.updateAvailability(false);
|
|
53
|
-
* }
|
|
54
|
-
* ```
|
|
55
|
-
*
|
|
56
|
-
* ## registration
|
|
57
|
-
*
|
|
58
|
-
* The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
|
|
59
|
-
* can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* @example
|
|
63
|
-
*
|
|
64
|
-
* In an application registration file you can declare the model registration as follows:
|
|
65
|
-
*
|
|
66
|
-
* **registration.ts**
|
|
67
|
-
* ```typescript
|
|
68
|
-
* import { NetworkInterface } from "@kos-ui/project-models";
|
|
69
|
-
* import { KosModelRegistry } from "@kosdev-code/kos-dispense-sdk";
|
|
70
|
-
*
|
|
71
|
-
* import { initKosProvider } from "@kosdev-code/kos-ui-sdk";
|
|
72
|
-
*
|
|
73
|
-
* KosModelRegistry.dispense
|
|
74
|
-
* .models()
|
|
75
|
-
* .model(NetworkInterface);
|
|
11
|
+
* const model = NetworkInterface.instance("networkInterfaceId").options(options).build();
|
|
76
12
|
* ```
|
|
77
13
|
*
|
|
78
|
-
* ## registration.singleton
|
|
79
|
-
|
|
80
|
-
* The networkInterface model is NOT a singleton model. This means that each time the factory function is called with a unique ID, a new model instance will be created.
|
|
81
|
-
* If the factory function is called with an ID that already exists, the existing model will be returned.
|
|
82
14
|
* @group KOS Model
|
|
83
15
|
* @category Network Interfaces
|
|
84
|
-
|
|
16
|
+
*/
|
|
85
17
|
export declare const NetworkInterface: KosModelRegistrationFactory<NetworkInterfaceModel, import('./services').NetworkInterfaceData>;
|
|
86
18
|
//# sourceMappingURL=network-interface-registration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network-interface-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/network-interface/network-interface-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAOvE
|
|
1
|
+
{"version":3,"file":"network-interface-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/network-interface/network-interface-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAOvE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB,+FAM3B,CAAC"}
|
|
@@ -1,21 +1,7 @@
|
|
|
1
1
|
import { NetworkInterfaceData } from '../services';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* This interface defines the complete network interface configuration including hardware details,
|
|
6
|
-
* connection state, and protocol-specific information for WiFi and Ethernet interfaces.
|
|
7
|
-
* Use these options when creating NetworkInterface models to represent physical or virtual
|
|
8
|
-
* network interfaces on KOS devices.
|
|
9
|
-
*
|
|
10
|
-
* @example Basic Usage
|
|
11
|
-
* ```typescript
|
|
12
|
-
* const options: NetworkInterfaceOptions = {
|
|
13
|
-
* name: 'eth0',
|
|
14
|
-
* type: 'ethernet',
|
|
15
|
-
* configured: true,
|
|
16
|
-
* category: 'EXTERNAL'
|
|
17
|
-
* };
|
|
18
|
-
* ```
|
|
3
|
+
* Options for a {@link NetworkInterfaceModel}: the interface data reported by
|
|
4
|
+
* the network service.
|
|
19
5
|
*
|
|
20
6
|
* @kosService core.network
|
|
21
7
|
* @group KOS Model
|
|
@@ -5,49 +5,21 @@ import { PublicModelInterface } from '../../../core/types';
|
|
|
5
5
|
import { OTAArtifactResponse, UpdaterItem, UpdaterOptions, UpdaterStatus } from './types';
|
|
6
6
|
export declare const MODEL_TYPE = "ota-model";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Over-the-air update state of the device. `updates` lists each artifact with
|
|
9
|
+
* its own status and download progress; the model loads them on load and keeps
|
|
10
|
+
* them current from the `/kos/ota/artifacts/all` and
|
|
11
|
+
* `/kos/ota/artifacts/changed` topics.
|
|
9
12
|
*
|
|
10
|
-
* The
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* ## Key Features
|
|
16
|
-
* - **Real-Time Update Tracking** - Live monitoring of download progress and installation status
|
|
17
|
-
* - **Artifact Management** - Complete visibility into available and installed software artifacts
|
|
18
|
-
* - **Trouble Integration** - Integration with KOS trouble system for error tracking and resolution
|
|
19
|
-
* - **Status Monitoring** - Comprehensive status tracking (downloading, pending, ready, error, idle)
|
|
20
|
-
* - **Installation Control** - Safe installation and reboot management for pending updates
|
|
21
|
-
* - **Progress Reporting** - Detailed download progress with size and percentage completion
|
|
22
|
-
*
|
|
23
|
-
* ## Topic-Based Reactivity
|
|
24
|
-
* The model listens to these KOS topics for real-time synchronization:
|
|
25
|
-
* - **`/kos/ota/artifacts/all`** - Complete artifact list updates from OTA service
|
|
26
|
-
* - **`/kos/ota/artifacts/changed`** - Incremental artifact status changes during downloads
|
|
27
|
-
*
|
|
28
|
-
* ## Update States
|
|
29
|
-
* - **idle** - No updates in progress, system ready
|
|
30
|
-
* - **downloading** - Updates actively downloading from remote sources
|
|
31
|
-
* - **pending** - Updates downloaded and staged, ready for installation
|
|
32
|
-
* - **ready** - Updates installed and ready for use
|
|
33
|
-
* - **error** - Update process encountered errors, intervention needed
|
|
34
|
-
*
|
|
35
|
-
* ## Common Use Cases
|
|
36
|
-
* - **Update Status Dashboard** - Display current update status and progress to users
|
|
37
|
-
* - **System Maintenance** - Manage scheduled updates and installations
|
|
38
|
-
* - **Error Handling** - Monitor and resolve update-related issues
|
|
39
|
-
* - **Progress Monitoring** - Track download progress for large artifacts
|
|
40
|
-
* - **Installation Management** - Control when updates are applied to minimize downtime
|
|
13
|
+
* The overall `status` comes from the OTA troubles: `error` while updates are
|
|
14
|
+
* paused by errors, `downloading` during a download, `pending` when updates are
|
|
15
|
+
* staged, otherwise `idle`. `installAndReboot` resolves the pending-update
|
|
16
|
+
* trouble, which installs the staged updates and reboots.
|
|
41
17
|
*
|
|
42
18
|
* @interface
|
|
43
|
-
* @example
|
|
19
|
+
* @example
|
|
44
20
|
* ```typescript
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* // Access current update status and manage installations
|
|
48
|
-
* console.log(otaModel.status); // 'idle' | 'downloading' | 'pending' | 'ready' | 'error'
|
|
49
|
-
* if (otaModel.status === 'pending') {
|
|
50
|
-
* otaModel.installAndReboot();
|
|
21
|
+
* if (ota.status === "pending") {
|
|
22
|
+
* ota.installAndReboot();
|
|
51
23
|
* }
|
|
52
24
|
* ```
|
|
53
25
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ota-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/ota/ota-model.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EACV,aAAa,EAEb,kBAAkB,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAIhE,OAAO,KAAK,EACV,mBAAmB,EAEnB,WAAW,EACX,cAAc,EACd,aAAa,EACd,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,UAAU,cAAc,CAAC;AAEtC
|
|
1
|
+
{"version":3,"file":"ota-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/ota/ota-model.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EACV,aAAa,EAEb,kBAAkB,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAIhE,OAAO,KAAK,EACV,mBAAmB,EAEnB,WAAW,EACX,cAAc,EACd,aAAa,EACd,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,UAAU,cAAc,CAAC;AAEtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,MAAM,QAAQ,GAAG,oBAAoB,CAAC,YAAY,CAAC,CAAC;AA8D1D;;;GAGG;AACH,qBACa,YAAa,YAAW,aAAa,EAAE,gBAAgB;IAClE,+CAA+C;IAC/C,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,MAAM,CAAmB;IAEjC,qEAAqE;IACrE,OAAO,CAAC,IAAI,CAA0D;IAEtE,qEAAqE;IAErE,OAAO,CAAC,gBAAgB,CAAyB;IAEjD,uEAAuE;IACvE,IAAI,yBAAyB,mCAQ5B;IAED,mFAAmF;IACnF,IAAI,oBAAoB,mCAOvB;IAED,uEAAuE;IACvE,IAAI,wBAAwB,mCAO3B;IAED,6EAA6E;IAC7E,IAAI,OAAO,mCAEV;IAED,uEAAuE;IACvE,IAAI,MAAM,IAAI,aAAa,CAU1B;gBAGC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,cAAc,EACvB,OAAO,EAAE,kBAAkB;IAU7B;;;OAGG;IACH,gBAAgB;IAchB;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAwBrB,kBAAkB,CAAC,SAAS,EAAE,mBAAmB,EAAE;IAoBzD,sBAAsB,CAAC,SAAS,EAAE,mBAAmB,EAAE;CAaxD"}
|
|
@@ -2,87 +2,15 @@ import { SingletonKosModelRegistrationFactory } from '../../../core/core/registr
|
|
|
2
2
|
import { OtaModel } from './ota-model';
|
|
3
3
|
import { UpdaterOptions } from './types';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* The registration bean includes convenience methods for creating and working with OtaModel 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: Ota.type, id: "oTAId"})
|
|
18
|
-
* private oTAModel: OtaModel;
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* ## factory
|
|
23
|
-
*
|
|
24
|
-
* The factory method creates a factory function that can be used to create new OtaModel 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 = Ota.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 OtaModel.
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```typescript
|
|
47
|
-
*
|
|
48
|
-
* const model: IKosDataModel = ...; // some model
|
|
49
|
-
*
|
|
50
|
-
* if (Ota.predicate(model)) {
|
|
51
|
-
* // if the function evaluates to true, the model is narrowed down to OtaModel
|
|
52
|
-
* // and the compiler will know that the model has the OtaModel 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 OtaModel}, a singleton model.
|
|
61
6
|
*
|
|
7
|
+
* `type` identifies the model in the registry and in `@kosDependency` declarations.
|
|
8
|
+
* `register()` adds the model to the registry. `instance()` builds or returns the single instance; later calls ignore the options.
|
|
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(Ota);
|
|
12
|
+
* const model = Ota.instance().options(options).build();
|
|
77
13
|
* ```
|
|
78
|
-
|
|
79
|
-
* ## registration.singleton
|
|
80
|
-
|
|
81
|
-
* The oTA 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 Ota: SingletonKosModelRegistrationFactory<OtaModel, UpdaterOptions>;
|
|
88
16
|
//# sourceMappingURL=ota-registration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ota-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/ota/ota-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,iCAAiC,CAAC;AACvF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C
|
|
1
|
+
{"version":3,"file":"ota-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/ota/ota-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,iCAAiC,CAAC;AACvF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,GAAG,gEAMd,CAAC"}
|
|
@@ -82,147 +82,8 @@ export interface UpdaterItem {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
* This interface defines the initial configuration for the OTA model, including
|
|
88
|
-
* any pre-existing artifact data that should be loaded during model initialization.
|
|
89
|
-
* In most cases, the OTA model will automatically load artifacts from the OTA service,
|
|
90
|
-
* but this option allows for pre-loading or testing scenarios.
|
|
91
|
-
*
|
|
92
|
-
* @example Basic OTA Model Creation
|
|
93
|
-
* ```typescript
|
|
94
|
-
* // Most common usage - let model load artifacts automatically
|
|
95
|
-
* const otaModel = Ota.instance('system-updates').build();
|
|
96
|
-
*
|
|
97
|
-
* // The model will automatically:
|
|
98
|
-
* // - Connect to OTA service
|
|
99
|
-
* // - Load current artifacts
|
|
100
|
-
* // - Subscribe to real-time updates
|
|
101
|
-
* ```
|
|
102
|
-
*
|
|
103
|
-
* @example Pre-loaded Artifacts (Advanced)
|
|
104
|
-
* ```typescript
|
|
105
|
-
* // Advanced usage with pre-loaded artifact data
|
|
106
|
-
* const mockArtifacts: OTAArtifactResponse[] = [
|
|
107
|
-
* {
|
|
108
|
-
* artifactInfo: {
|
|
109
|
-
* identifier: 'system-update-v1.2.0',
|
|
110
|
-
* name: 'System Update',
|
|
111
|
-
* version: '1.2.0',
|
|
112
|
-
* size: 52428800, // 50MB
|
|
113
|
-
* hash: 'sha256:abc123...',
|
|
114
|
-
* miniHash: 'abc123'
|
|
115
|
-
* },
|
|
116
|
-
* status: 'STAGED',
|
|
117
|
-
* done: true,
|
|
118
|
-
* requests: {
|
|
119
|
-
* 'primary': {
|
|
120
|
-
* currentSize: 52428800,
|
|
121
|
-
* downloaderActive: false,
|
|
122
|
-
* downloaderName: 'system-updater',
|
|
123
|
-
* errorCount: 0,
|
|
124
|
-
* fileNotFoundCount: 0,
|
|
125
|
-
* kabId: 'system-update-v1.2.0',
|
|
126
|
-
* lastUpdateTime: Date.now()
|
|
127
|
-
* }
|
|
128
|
-
* }
|
|
129
|
-
* }
|
|
130
|
-
* ];
|
|
131
|
-
*
|
|
132
|
-
* const options: UpdaterOptions = {
|
|
133
|
-
* otaArtifactResponse: mockArtifacts
|
|
134
|
-
* };
|
|
135
|
-
*
|
|
136
|
-
* const otaModel = Ota.instance('preloaded-updater')
|
|
137
|
-
* .options(options)
|
|
138
|
-
* .build();
|
|
139
|
-
* ```
|
|
140
|
-
*
|
|
141
|
-
* @example Testing Scenarios
|
|
142
|
-
* ```typescript
|
|
143
|
-
* // Create OTA model with test data for different scenarios
|
|
144
|
-
* const createTestOtaModel = (scenario: 'downloading' | 'pending' | 'error') => {
|
|
145
|
-
* const testArtifacts: OTAArtifactResponse[] = [];
|
|
146
|
-
*
|
|
147
|
-
* switch (scenario) {
|
|
148
|
-
* case 'downloading':
|
|
149
|
-
* testArtifacts.push({
|
|
150
|
-
* artifactInfo: {
|
|
151
|
-
* identifier: 'app-update-v2.1.0',
|
|
152
|
-
* name: 'Application Update',
|
|
153
|
-
* version: '2.1.0',
|
|
154
|
-
* size: 104857600, // 100MB
|
|
155
|
-
* hash: 'sha256:def456...',
|
|
156
|
-
* miniHash: 'def456'
|
|
157
|
-
* },
|
|
158
|
-
* status: 'MISSING',
|
|
159
|
-
* done: false,
|
|
160
|
-
* requests: {
|
|
161
|
-
* 'primary': {
|
|
162
|
-
* currentSize: 31457280, // 30MB downloaded
|
|
163
|
-
* downloaderActive: true,
|
|
164
|
-
* downloaderName: 'app-updater',
|
|
165
|
-
* errorCount: 0,
|
|
166
|
-
* fileNotFoundCount: 0,
|
|
167
|
-
* kabId: 'app-update-v2.1.0',
|
|
168
|
-
* lastUpdateTime: Date.now()
|
|
169
|
-
* }
|
|
170
|
-
* }
|
|
171
|
-
* });
|
|
172
|
-
* break;
|
|
173
|
-
*
|
|
174
|
-
* case 'pending':
|
|
175
|
-
* testArtifacts.push({
|
|
176
|
-
* artifactInfo: {
|
|
177
|
-
* identifier: 'security-patch-v1.0.1',
|
|
178
|
-
* name: 'Security Patch',
|
|
179
|
-
* version: '1.0.1',
|
|
180
|
-
* size: 10485760, // 10MB
|
|
181
|
-
* hash: 'sha256:ghi789...',
|
|
182
|
-
* miniHash: 'ghi789'
|
|
183
|
-
* },
|
|
184
|
-
* status: 'STAGED',
|
|
185
|
-
* done: true,
|
|
186
|
-
* requests: {
|
|
187
|
-
* 'primary': {
|
|
188
|
-
* currentSize: 10485760,
|
|
189
|
-
* downloaderActive: false,
|
|
190
|
-
* downloaderName: 'security-updater',
|
|
191
|
-
* errorCount: 0,
|
|
192
|
-
* fileNotFoundCount: 0,
|
|
193
|
-
* kabId: 'security-patch-v1.0.1',
|
|
194
|
-
* lastUpdateTime: Date.now()
|
|
195
|
-
* }
|
|
196
|
-
* }
|
|
197
|
-
* });
|
|
198
|
-
* break;
|
|
199
|
-
*
|
|
200
|
-
* case 'error':
|
|
201
|
-
* testArtifacts.push({
|
|
202
|
-
* status: 'INVALID',
|
|
203
|
-
* done: false,
|
|
204
|
-
* error: 'Checksum verification failed',
|
|
205
|
-
* requests: {
|
|
206
|
-
* 'primary': {
|
|
207
|
-
* currentSize: 0,
|
|
208
|
-
* downloaderActive: false,
|
|
209
|
-
* downloaderName: 'failed-updater',
|
|
210
|
-
* errorCount: 3,
|
|
211
|
-
* fileNotFoundCount: 0,
|
|
212
|
-
* kabId: 'failed-update-v1.0.0',
|
|
213
|
-
* lastUpdateTime: Date.now(),
|
|
214
|
-
* lastErrorReason: 'Checksum verification failed'
|
|
215
|
-
* }
|
|
216
|
-
* }
|
|
217
|
-
* });
|
|
218
|
-
* break;
|
|
219
|
-
* }
|
|
220
|
-
*
|
|
221
|
-
* return Ota.instance(`test-${scenario}`)
|
|
222
|
-
* .options({ otaArtifactResponse: testArtifacts })
|
|
223
|
-
* .build();
|
|
224
|
-
* };
|
|
225
|
-
* ```
|
|
85
|
+
* Options for an {@link OtaModel}. The model loads its artifacts from the OTA
|
|
86
|
+
* service and does not read `otaArtifactResponse`.
|
|
226
87
|
*
|
|
227
88
|
* @kosService core.ota
|
|
228
89
|
* @category Model Configuration
|
|
@@ -1,29 +1,12 @@
|
|
|
1
1
|
import { IKosDataModel } from '../../../../core';
|
|
2
2
|
import { BaseRegionResponse, RegionsResponse, Unit } from '../services';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* One side of a unit conversion: a specific unit, or a measure and unit system
|
|
5
|
+
* from which the system's default unit for that measure is chosen.
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
* measurement system with automatic unit selection. The conversion system
|
|
8
|
-
* intelligently selects appropriate default units when only system/measure is provided.
|
|
9
|
-
*
|
|
10
|
-
* @example Specific Unit Conversion
|
|
11
|
-
* ```typescript
|
|
12
|
-
* const fahrenheitSource: UnitSource = { unit: 'fahrenheit' };
|
|
13
|
-
* const celsiusSource: UnitSource = { unit: 'celsius' };
|
|
14
|
-
*
|
|
15
|
-
* const result = regionModel.convert(72, fahrenheitSource, celsiusSource);
|
|
16
|
-
* console.log(result); // '22.22'
|
|
17
|
-
* ```
|
|
18
|
-
*
|
|
19
|
-
* @example System-Based Conversion (Auto Unit Selection)
|
|
7
|
+
* @example
|
|
20
8
|
* ```typescript
|
|
21
|
-
*
|
|
22
|
-
* const metricLength: UnitSource = { measure: 'length', system: 'metric' };
|
|
23
|
-
*
|
|
24
|
-
* // Automatically uses miles → kilometers
|
|
25
|
-
* const result = regionModel.convert(5, imperialLength, metricLength);
|
|
26
|
-
* console.log(result); // '8.047'
|
|
9
|
+
* regionInfo.convert(5, { measure: "length", system: "imperial" }, { measure: "length", system: "metric" });
|
|
27
10
|
* ```
|
|
28
11
|
*
|
|
29
12
|
* @kosService core.region-info
|
|
@@ -40,7 +23,7 @@ export interface UnitSource {
|
|
|
40
23
|
unit?: string;
|
|
41
24
|
}
|
|
42
25
|
/**
|
|
43
|
-
* Key type for measure maps
|
|
26
|
+
* Key type for measure maps: a unit system or `default`.
|
|
44
27
|
*
|
|
45
28
|
* @kosService core.region-info
|
|
46
29
|
*/
|
|
@@ -58,7 +41,7 @@ export type SystemMeasureMap = Record<MeasureMapKeys, Unit>;
|
|
|
58
41
|
*/
|
|
59
42
|
export type MeasureMap = Record<string, SystemMeasureMap>;
|
|
60
43
|
/**
|
|
61
|
-
* Record
|
|
44
|
+
* Record of string defaults.
|
|
62
45
|
*
|
|
63
46
|
* @kosService core.region-info
|
|
64
47
|
*/
|
|
@@ -70,19 +53,7 @@ export type SystemDefaultMap = Record<string, string>;
|
|
|
70
53
|
*/
|
|
71
54
|
export type DefaultMeasureMap = Record<string, SystemDefaultMap>;
|
|
72
55
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* Currently an empty interface but reserved for future regional configuration
|
|
76
|
-
* options such as default locale preferences, custom unit mappings, or
|
|
77
|
-
* regional API endpoints.
|
|
78
|
-
*
|
|
79
|
-
* @example
|
|
80
|
-
* ```typescript
|
|
81
|
-
* const options: RegionInfoOptions = {
|
|
82
|
-
* // Future options will be defined here
|
|
83
|
-
* };
|
|
84
|
-
* const regionModel = RegionInfo.instance().options(options).build();
|
|
85
|
-
* ```
|
|
56
|
+
* Options for a {@link RegionInfoModel}.
|
|
86
57
|
*
|
|
87
58
|
* @kosService core.region-info
|
|
88
59
|
* @group KOS Model
|
|
@@ -104,18 +75,7 @@ interface FormatOptions extends BaseOptions {
|
|
|
104
75
|
format: string;
|
|
105
76
|
}
|
|
106
77
|
/**
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
* Defines available time formats including 12-hour (AM/PM) and 24-hour formats
|
|
110
|
-
* with their display patterns and behavior.
|
|
111
|
-
*
|
|
112
|
-
* @example
|
|
113
|
-
* ```typescript
|
|
114
|
-
* const timeFormats: TimeFormatOptions[] = [
|
|
115
|
-
* { id: '12h', format: 'hh:mm:ss a', ampm: true }, // 3:45:30 PM
|
|
116
|
-
* { id: '24h', format: 'HH:mm:ss', ampm: false } // 15:45:30
|
|
117
|
-
* ];
|
|
118
|
-
* ```
|
|
78
|
+
* A selectable time format, such as `{ id: "24h", format: "HH:mm:ss", ampm: false }`.
|
|
119
79
|
*
|
|
120
80
|
* @kosService core.region-info
|
|
121
81
|
* @group KOS Model
|
|
@@ -127,19 +87,7 @@ export interface TimeFormatOptions extends FormatOptions {
|
|
|
127
87
|
ampm: boolean;
|
|
128
88
|
}
|
|
129
89
|
/**
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
* Defines available date formats including different component ordering
|
|
133
|
-
* (Day/Month/Year vs Month/Day/Year) and display patterns.
|
|
134
|
-
*
|
|
135
|
-
* @example
|
|
136
|
-
* ```typescript
|
|
137
|
-
* const dateFormats: DateFormatOptions[] = [
|
|
138
|
-
* { id: 'us', format: 'MM/DD/YYYY', order: 'MDY' }, // 03/15/2024
|
|
139
|
-
* { id: 'eu', format: 'DD/MM/YYYY', order: 'DMY' }, // 15/03/2024
|
|
140
|
-
* { id: 'iso', format: 'YYYY-MM-DD', order: 'YMD' } // 2024-03-15
|
|
141
|
-
* ];
|
|
142
|
-
* ```
|
|
90
|
+
* A selectable date format and the order of its components, such as `MDY`.
|
|
143
91
|
*
|
|
144
92
|
* @kosService core.region-info
|
|
145
93
|
* @group KOS Model
|
|
@@ -151,19 +99,7 @@ export interface DateFormatOptions extends FormatOptions {
|
|
|
151
99
|
order: string;
|
|
152
100
|
}
|
|
153
101
|
/**
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
* Defines available unit systems (metric, imperial, etc.) with their
|
|
157
|
-
* display names and identification.
|
|
158
|
-
*
|
|
159
|
-
* @example
|
|
160
|
-
* ```typescript
|
|
161
|
-
* const unitSystems: UnitSystemOptions[] = [
|
|
162
|
-
* { id: 'metric', name: 'Metric System' },
|
|
163
|
-
* { id: 'imperial', name: 'Imperial System' },
|
|
164
|
-
* { id: 'us', name: 'US Customary System' }
|
|
165
|
-
* ];
|
|
166
|
-
* ```
|
|
102
|
+
* A selectable unit system, such as metric or imperial.
|
|
167
103
|
*
|
|
168
104
|
* @kosService core.region-info
|
|
169
105
|
* @group KOS Model
|
|
@@ -175,37 +111,21 @@ export interface UnitSystemOptions extends BaseOptions {
|
|
|
175
111
|
name: string;
|
|
176
112
|
}
|
|
177
113
|
/**
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
* internationally-aware applications that adapt to local preferences and measurement standards.
|
|
114
|
+
* Regional settings for the device: country, time zone, time and date formats
|
|
115
|
+
* and unit system. It also converts values between units and supplies the
|
|
116
|
+
* default unit and precision for each measure, which `@kosConfigProperty`
|
|
117
|
+
* uses to display config values.
|
|
183
118
|
*
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
* - **Unit System Management** - Complete metric/imperial conversion with precision control
|
|
187
|
-
* - **Time Zone Support** - Full time zone management with regional associations
|
|
188
|
-
* - **Dynamic Configuration** - Live updates through KOS configuration system
|
|
189
|
-
* - **Type Safety** - Generic support for additional regional data
|
|
190
|
-
* - **Singleton Pattern** - Single instance manages all regional settings
|
|
191
|
-
*
|
|
192
|
-
* ## Unit Conversion System
|
|
193
|
-
* The model provides intelligent unit conversion between different measurement systems:
|
|
194
|
-
* - **Automatic scaling** - Handles complex conversions with proper scaling factors
|
|
195
|
-
* - **Precision control** - Configurable decimal places per unit type
|
|
196
|
-
* - **Family validation** - Prevents invalid conversions (e.g., length to weight)
|
|
197
|
-
* - **Default unit resolution** - Automatic selection of appropriate units per system
|
|
119
|
+
* Each destination address gets its own instance; the default instance uses the
|
|
120
|
+
* model type as its id.
|
|
198
121
|
*
|
|
199
122
|
* @template AdditionalData - Extends BaseRegionResponse for custom regional data requirements
|
|
200
123
|
*
|
|
201
124
|
* @interface
|
|
202
|
-
* @example
|
|
125
|
+
* @example
|
|
203
126
|
* ```typescript
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
* // Unit conversion and regional settings
|
|
207
|
-
* const celsius = regionModel.convert(72, { unit: 'fahrenheit' }, { unit: 'celsius' });
|
|
208
|
-
* console.log(regionModel.selectedCountry); // 'us'
|
|
127
|
+
* @kosDependency({ modelType: RegionInfo.type, id: RegionInfo.type })
|
|
128
|
+
* private regionInfo!: RegionInfoModel;
|
|
209
129
|
* ```
|
|
210
130
|
*
|
|
211
131
|
* @kosService core.region-info
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/kos-ui-sdk/src/models/models/region-info/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAExE
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/kos-ui-sdk/src/models/models/region-info/types/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -20,20 +20,8 @@ export type DeviceSoftwareInfoResponse = BaseResponseType<"/api/kos/manifest/inf
|
|
|
20
20
|
*/
|
|
21
21
|
export declare const getSoftwareInfos: (signal?: AbortSignal) => Promise<DeviceSoftwareInfoResponse>;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* ```typescript
|
|
26
|
-
* // In your model
|
|
27
|
-
* const data = await getSoftwareInfosWithCancel();
|
|
28
|
-
*
|
|
29
|
-
* // Cancel if needed
|
|
30
|
-
* getSoftwareInfosWithCancel.cancel();
|
|
31
|
-
*
|
|
32
|
-
* // Check if active
|
|
33
|
-
* if (getSoftwareInfosWithCancel.isActive()) {
|
|
34
|
-
* console.log('Request in progress');
|
|
35
|
-
* }
|
|
36
|
-
* ```
|
|
23
|
+
* {@link getSoftwareInfos} wrapped with {@link createCancellableService}: a new
|
|
24
|
+
* call aborts the previous one, and `cancel()` aborts the active call.
|
|
37
25
|
*/
|
|
38
26
|
export declare const getSoftwareInfosWithCancel: import('../../../utils').CancellableFunction<() => Promise<{
|
|
39
27
|
nodes?: import('../../../utils/types').components["schemas"]["a7a680dc-5c50-468d-8063-704a7bf4e167"];
|