@kosdev-code/kos-ui-sdk 0.1.0-next.944 → 0.1.0-next.958
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 +2 -1
- package/common/events/async-event-bus.d.ts +2 -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/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-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 +21 -94
- package/core/core/decorators/kos-multiple-future-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-reload-aware.d.ts +14 -16
- package/core/core/decorators/kos-reload-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-service-request.d.ts +80 -238
- package/core/core/decorators/kos-service-request.d.ts.map +1 -1
- package/core/core/decorators/kos-state-machine.d.ts +35 -275
- package/core/core/decorators/kos-state-machine.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/kosModel.d.ts.map +1 -1
- package/core/core/decorators/kosTopicHandler.d.ts +28 -89
- package/core/core/decorators/kosTopicHandler.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-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 +7 -4
- package/core/core/kosCore.d.ts.map +1 -1
- package/core/core/kosModel.d.ts +16 -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-offline-queue.d.ts +1 -1
- package/core/core/model/service-response-store.d.ts +2 -15
- 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/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/model.d.ts +4 -8
- package/core/types/model.d.ts.map +1 -1
- package/core/types/service-response-store.d.ts +3 -11
- 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/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 +144 -109
- package/index.cjs.map +1 -1
- package/index.js +173 -138
- 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/kos-expression-evaluator-model.d.ts +32 -99
- 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 +4 -4
- package/models/utils/services/vfs/daily/service.d.ts +4 -4
- package/models/utils/timer-manager.d.ts.map +1 -1
- package/package.json +3 -3
- package/{software-info-registration-CKlTQPet.js → software-info-registration-C8kf-pBB.js} +551 -530
- package/software-info-registration-C8kf-pBB.js.map +1 -0
- package/{software-info-registration-GUbTY4KD.cjs → software-info-registration-Y1iADHWT.cjs} +522 -501
- package/software-info-registration-Y1iADHWT.cjs.map +1 -0
- package/testing/index.d.ts +28 -33
- package/testing/index.d.ts.map +1 -1
- package/testing.cjs +1 -1
- package/testing.cjs.map +1 -1
- package/testing.js +1 -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/software-info-registration-CKlTQPet.js.map +0 -1
- package/software-info-registration-GUbTY4KD.cjs.map +0 -1
|
@@ -4,16 +4,16 @@ export interface FutureProps {
|
|
|
4
4
|
alias?: string;
|
|
5
5
|
namespace?: string;
|
|
6
6
|
/**
|
|
7
|
-
* Enable
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* @default
|
|
7
|
+
* Enable AbortController integration. When true, the decorator passes an
|
|
8
|
+
* AbortSignal as the last argument and links cancellation both ways: cancelling
|
|
9
|
+
* the Future aborts the request, and aborting the request cancels the Future.
|
|
10
|
+
* @default false
|
|
11
11
|
*/
|
|
12
12
|
abortController?: boolean;
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
* - 'id':
|
|
16
|
-
* - 'context':
|
|
14
|
+
* How the tracker id is passed to the method:
|
|
15
|
+
* - 'id': appended as the last argument (the default)
|
|
16
|
+
* - 'context': set as `$tracker` on the execution context argument
|
|
17
17
|
* @default 'id'
|
|
18
18
|
*/
|
|
19
19
|
trackerPolicy?: "id" | "context";
|
|
@@ -2,47 +2,18 @@ import { IKosDataModel, IKosIdentifiable, KosCreationContext, KosMethodTypes, Ko
|
|
|
2
2
|
import { BrowserRouterOptions } from './types';
|
|
3
3
|
export declare const MODEL_TYPE = "browser-router-model";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* HTTP-based integrations with automatic OpenAPI specification generation.
|
|
11
|
-
*
|
|
12
|
-
* ## Key Features
|
|
13
|
-
* - **Topic-Based HTTP Handling** - Processes HTTP requests via `kos.http.request` topic
|
|
14
|
-
* - **Middleware Support** - Chain multiple middleware functions for request processing
|
|
15
|
-
* - **Route Management** - Dynamic registration, removal, and inspection of routes
|
|
16
|
-
* - **OpenAPI Generation** - Automatic API documentation at `/openapi.json`
|
|
17
|
-
* - **Request/Response Abstraction** - Familiar Express.js-style request/response objects
|
|
18
|
-
* - **Method Support** - Full HTTP method support (GET, POST, PUT, DELETE, PATCH)
|
|
19
|
-
*
|
|
20
|
-
* ## Topic-Based Reactivity
|
|
21
|
-
* The model listens to these KOS topics for HTTP request handling:
|
|
22
|
-
* - **`kos.http.request`** - Incoming HTTP requests from clients or other services
|
|
23
|
-
* - **`kos.http.response`** - Outgoing HTTP responses with status codes and data
|
|
24
|
-
*
|
|
25
|
-
* ## Common Use Cases
|
|
26
|
-
* - **REST API Endpoints** - Expose device data and control APIs
|
|
27
|
-
* - **Webhook Handlers** - Process incoming webhooks from external services
|
|
28
|
-
* - **Inter-Service Communication** - Handle requests between KOS services
|
|
29
|
-
* - **Device Integration** - Bridge HTTP protocols with KOS messaging
|
|
30
|
-
* - **API Gateway** - Route and transform requests to downstream services
|
|
5
|
+
* Serves HTTP-style requests addressed to this browser client. Requests arrive
|
|
6
|
+
* on the `kos.http.request` topic, run through the routes and middleware
|
|
7
|
+
* registered with `use`, and their responses go back on `kos.http.response`.
|
|
8
|
+
* A request for `/openapi.json` returns an OpenAPI description of the
|
|
9
|
+
* registered routes.
|
|
31
10
|
*
|
|
32
11
|
* @interface
|
|
33
|
-
* @example
|
|
12
|
+
* @example
|
|
34
13
|
* ```typescript
|
|
35
|
-
* const router =
|
|
36
|
-
*
|
|
37
|
-
* .
|
|
38
|
-
*
|
|
39
|
-
* // Register HTTP endpoints with middleware support
|
|
40
|
-
* router.use('GET', '/api/status', async (req, res) => {
|
|
41
|
-
* res.send({ status: 'online' });
|
|
42
|
-
* });
|
|
43
|
-
*
|
|
44
|
-
* router.use('POST', '/api/commands', validateAuth, async (req, res) => {
|
|
45
|
-
* res.status(200).send({ success: true });
|
|
14
|
+
* const router = BrowserRouter.instance().options({}).build();
|
|
15
|
+
* router.use("GET", "/api/status", async (req, res) => {
|
|
16
|
+
* res.send({ status: "online" });
|
|
46
17
|
* });
|
|
47
18
|
* ```
|
|
48
19
|
*
|
|
@@ -77,7 +48,7 @@ export declare class BrowserRouterModelImpl implements IKosDataModel, IKosIdenti
|
|
|
77
48
|
private handleRequest;
|
|
78
49
|
/**
|
|
79
50
|
* Registers a route with optional middleware chain.
|
|
80
|
-
* @param method HTTP method (GET, POST, PUT, DELETE
|
|
51
|
+
* @param method HTTP method (GET, POST, PUT, DELETE)
|
|
81
52
|
* @param path Route path pattern with parameter support
|
|
82
53
|
* @param middlewares Middleware functions and final handler
|
|
83
54
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-router-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/browser-router/browser-router-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,gBAAgB,EAErB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,aAAa,EAKlB,KAAK,oBAAoB,EAE1B,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,eAAO,MAAM,UAAU,yBAAyB,CAAC;AAKjD
|
|
1
|
+
{"version":3,"file":"browser-router-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/browser-router/browser-router-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,gBAAgB,EAErB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,aAAa,EAKlB,KAAK,oBAAoB,EAE1B,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,eAAO,MAAM,UAAU,yBAAyB,CAAC;AAKjD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,oBAAoB,CAAC,sBAAsB,CAAC,EAC5C,MAAM,GAAG,MAAM,CAChB,CAAC;AAEF;;;GAGG;AACH,qBACa,sBAAuB,YAAW,aAAa,EAAE,gBAAgB;IAC5E,sDAAsD;IACtD,OAAO,CAAC,GAAG,CAAS;IACpB,6DAA6D;IAC7D,OAAO,CAAC,MAAM,CAAmB;IACjC,+DAA+D;IAC/D,OAAO,CAAC,MAAM,CAAmB;gBAE/B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,oBAAoB,EAC9B,OAAO,EAAE,kBAAkB;IAO7B,gCAAgC;IAChC,IAAI,EAAE,IAAI,MAAM,CAEf;IAED;;;;;OAKG;YAIW,aAAa;IA2C3B;;;;;OAKG;IACH,GAAG,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,EAC/B,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,KAAK,EACX,GAAG,WAAW,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE,GACrC,IAAI;IAIP;;;;;OAKG;IACH,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IAIpD;;;;OAIG;IACH,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAItC;;;OAGG;IACH,SAAS,IAAI,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAKpD;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAG5B"}
|
|
@@ -2,87 +2,15 @@ import { SingletonKosModelRegistrationFactory } from '../../../core';
|
|
|
2
2
|
import { KosBrowserRouter } from './browser-router-model';
|
|
3
3
|
import { BrowserRouterOptions } from './types';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* The registration bean includes convenience methods for creating and working with BrowserRouterModel 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: BrowserRouter.type, id: "browserRouterId"})
|
|
18
|
-
* private browserRouterModel: BrowserRouterModel;
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* ## factory
|
|
23
|
-
*
|
|
24
|
-
* The factory method creates a factory function that can be used to create new BrowserRouterModel 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 = BrowserRouter.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 BrowserRouterModel.
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```typescript
|
|
47
|
-
*
|
|
48
|
-
* const model: IKosDataModel = ...; // some model
|
|
49
|
-
*
|
|
50
|
-
* if (BrowserRouter.predicate(model)) {
|
|
51
|
-
* // if the function evaluates to true, the model is narrowed down to BrowserRouterModel
|
|
52
|
-
* // and the compiler will know that the model has the BrowserRouterModel 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 KosBrowserRouter}, 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(BrowserRouter);
|
|
12
|
+
* const model = BrowserRouter.instance().options(options).build();
|
|
77
13
|
* ```
|
|
78
|
-
|
|
79
|
-
* ## registration.singleton
|
|
80
|
-
|
|
81
|
-
* The browserRouter 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 BrowserRouter: SingletonKosModelRegistrationFactory<KosBrowserRouter, BrowserRouterOptions>;
|
|
88
16
|
//# sourceMappingURL=browser-router-registration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-router-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/browser-router/browser-router-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD
|
|
1
|
+
{"version":3,"file":"browser-router-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/browser-router/browser-router-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,8EAMxB,CAAC"}
|
|
@@ -1,20 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* The BrowserRouter operates without specific configuration options, providing
|
|
5
|
-
* a zero-configuration HTTP routing solution. All routing behavior is controlled
|
|
6
|
-
* through route registration and middleware during model initialization.
|
|
7
|
-
*
|
|
8
|
-
* @example Basic Usage
|
|
9
|
-
* ```typescript
|
|
10
|
-
* const router = KosBrowserRouter.instance('api-router')
|
|
11
|
-
* .options({})
|
|
12
|
-
* .build();
|
|
13
|
-
*
|
|
14
|
-
* router.use('GET', '/api/status', async (req, res) => {
|
|
15
|
-
* res.send({ status: 'healthy' });
|
|
16
|
-
* });
|
|
17
|
-
* ```
|
|
2
|
+
* Options for a {@link KosBrowserRouter}. The router takes none; routes are
|
|
3
|
+
* registered with `use`.
|
|
18
4
|
*
|
|
19
5
|
* @kosService core.browser-router
|
|
20
6
|
* @group KOS Model
|
|
@@ -2,87 +2,15 @@ import { SingletonKosModelRegistrationFactory } from '../../../core';
|
|
|
2
2
|
import { CanvasDispatcherModel } from './canvas-dispatcher-model';
|
|
3
3
|
import { CanvasDispatcherOptions } from './types';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* The registration bean includes convenience methods for creating and working with CanvasDispatcherModel 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: CanvasDispatcher.type, id: "canvasDispatcherId"})
|
|
18
|
-
* private canvasDispatcherModel: CanvasDispatcherModel;
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* ## factory
|
|
23
|
-
*
|
|
24
|
-
* The factory method creates a factory function that can be used to create new CanvasDispatcherModel 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 = CanvasDispatcher.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 CanvasDispatcherModel.
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```typescript
|
|
47
|
-
*
|
|
48
|
-
* const model: IKosDataModel = ...; // some model
|
|
49
|
-
*
|
|
50
|
-
* if (CanvasDispatcher.predicate(model)) {
|
|
51
|
-
* // if the function evaluates to true, the model is narrowed down to CanvasDispatcherModel
|
|
52
|
-
* // and the compiler will know that the model has the CanvasDispatcherModel 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 CanvasDispatcherModel}, 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(CanvasDispatcher);
|
|
12
|
+
* const model = CanvasDispatcher.instance().options(options).build();
|
|
77
13
|
* ```
|
|
78
|
-
|
|
79
|
-
* ## registration.singleton
|
|
80
|
-
|
|
81
|
-
* The canvasDispatcher 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 CanvasDispatcher: SingletonKosModelRegistrationFactory<CanvasDispatcherModel, CanvasDispatcherOptions>;
|
|
88
16
|
//# sourceMappingURL=canvas-dispatcher-registration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvas-dispatcher-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/canvas-dispatcher/canvas-dispatcher-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAKvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvD
|
|
1
|
+
{"version":3,"file":"canvas-dispatcher-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/canvas-dispatcher/canvas-dispatcher-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAKvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,sFAM3B,CAAC"}
|
|
@@ -2,85 +2,15 @@ import { KosModelRegistrationFactory } from '../../../core/core/registration';
|
|
|
2
2
|
import { CanvasRendererModel } from './canvas-renderer-model';
|
|
3
3
|
import { CanvasRendererOptions } from './types';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Registration for {@link CanvasRendererModel}.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
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: CanvasRenderer.type, id: "canvasRendererId"})
|
|
18
|
-
* private canvasRendererModel: CanvasRendererModel;
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* ## factory
|
|
23
|
-
*
|
|
24
|
-
* The factory method creates a factory function that can be used to create new CanvasRendererModel instances.
|
|
25
|
-
*
|
|
26
|
-
|
|
27
|
-
* The factory function is a curried function that takes the model id as the first argument and the options as the second argument.
|
|
28
|
-
*
|
|
29
|
-
* If a model with the specified id 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.
|
|
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.
|
|
31
9
|
*
|
|
32
10
|
* @example
|
|
33
11
|
* ```typescript
|
|
34
|
-
* const model = CanvasRenderer.
|
|
35
|
-
* // Add option data
|
|
36
|
-
* });
|
|
12
|
+
* const model = CanvasRenderer.instance("canvasRendererId").options(options).build();
|
|
37
13
|
* ```
|
|
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 CanvasRendererModel.
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```typescript
|
|
47
|
-
*
|
|
48
|
-
* const model: IKosDataModel = ...; // some model
|
|
49
|
-
*
|
|
50
|
-
* if (CanvasRenderer.predicate(model)) {
|
|
51
|
-
* // if the function evaluates to true, the model is narrowed down to CanvasRendererModel
|
|
52
|
-
* // and the compiler will know that the model has the CanvasRendererModel 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.
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
*
|
|
65
|
-
* In an application registration file you can declare the model registration as follows:
|
|
66
|
-
*
|
|
67
|
-
* **registration.ts**
|
|
68
|
-
* ```typescript
|
|
69
|
-
* import { CanvasRenderer } from "@kos-ui/project-models";
|
|
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(CanvasRenderer);
|
|
77
|
-
* ```
|
|
78
|
-
*
|
|
79
|
-
* ## registration.singleton
|
|
80
|
-
|
|
81
|
-
* The canvasRenderer 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.
|
|
82
|
-
* If the factory function is called with an ID that already exists, the existing model will be returned.
|
|
83
|
-
|
|
84
|
-
* */
|
|
14
|
+
*/
|
|
85
15
|
export declare const CanvasRenderer: KosModelRegistrationFactory<CanvasRendererModel, CanvasRendererOptions>;
|
|
86
16
|
//# sourceMappingURL=canvas-renderer-registration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvas-renderer-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/canvas-renderer/canvas-renderer-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD
|
|
1
|
+
{"version":3,"file":"canvas-renderer-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/canvas-renderer/canvas-renderer-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,yEAMzB,CAAC"}
|
|
@@ -7,8 +7,7 @@ export declare function evaluateScopes(scopes?: ConfigScope[]): {};
|
|
|
7
7
|
* Maps a `ConfigBeanResponse` DTO to an `IConfigBeanModel` object.
|
|
8
8
|
*
|
|
9
9
|
* @remarks
|
|
10
|
-
*
|
|
11
|
-
* if any changes are made.
|
|
10
|
+
* Runs as a single action, so readers of the model see one consistent update.
|
|
12
11
|
*
|
|
13
12
|
* @params dto - the Data Transfer Object received from the backend
|
|
14
13
|
* @params model - the IModel to be update
|
|
@@ -36,15 +35,9 @@ export declare const mapUpdateDtoToConfigBeanModel: (dto: ConfigBeanUpdateRespon
|
|
|
36
35
|
*/
|
|
37
36
|
export declare const mapConfigBeanModelToDto: (model: IConfigBeanModel) => ConfigBeanRequest;
|
|
38
37
|
/**
|
|
39
|
-
* Curried
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* @remarks
|
|
43
|
-
* This serves as a conveinience allowing for models to consumers to use a shorthand method when
|
|
44
|
-
* multiple models need to be created.
|
|
45
|
-
* The first level of function will accept a KOS Model Factory and return a function that can accept a single
|
|
46
|
-
* model ID parameeter. This will return a factory function that can accept a model options parameter and
|
|
47
|
-
* instantiate a new instance of a model or retreive a an existing model.
|
|
38
|
+
* Curried factory for `IConfigBeanModel` instances: takes a KOS model factory,
|
|
39
|
+
* then a model id, then the options, and returns a new model or the existing
|
|
40
|
+
* one with that id.
|
|
48
41
|
*
|
|
49
42
|
* @param factory - the model factory to be used
|
|
50
43
|
* @returns - an instance of the `IConfigBeanModel` that was either created
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-bean-model-builder.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/config-bean/config-bean-model-builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EAExB,KAAK,WAAW,EACjB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAEnE,wBAAgB,cAAc,CAAC,MAAM,GAAE,WAAW,EAAO,MAQxD;AAsBD
|
|
1
|
+
{"version":3,"file":"config-bean-model-builder.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/config-bean/config-bean-model-builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EAExB,KAAK,WAAW,EACjB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAEnE,wBAAgB,cAAc,CAAC,MAAM,GAAE,WAAW,EAAO,MAQxD;AAsBD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB,GAClC,KAAK,kBAAkB,EACvB,OAAO,gBAAgB,SAWxB,CAAC;AAEF,eAAO,MAAM,6BAA6B,GACxC,KAAK,wBAAwB,EAC7B,OAAO,gBAAgB,SA4CxB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,uBAAuB,GAAI,OAAO,gBAAgB,sBAI9D,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,oBAAoB,GAC9B,SAAS,YAAY,CAAC,gBAAgB,EAAE,uBAAuB,CAAC,MAChE,SAAS,MAAM,MACf,mBAAmB,uBAAuB,qBAG1C,CAAC"}
|
|
@@ -3,47 +3,18 @@ import { ConfigBeanKeys, IConfigBeanModelOptions } from './config-bean-types';
|
|
|
3
3
|
import { ConfigBeanUpdateResponse } from '../../services/config-bean';
|
|
4
4
|
import { ConfigPropertyTypes } from '../types';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* A device config bean: the attributes stored at one config path, such as
|
|
7
|
+
* `system:app` or `kos:service:CANPumpMgr`, with their schema. The model loads
|
|
8
|
+
* the bean and its schema on load, stays current through the
|
|
9
|
+
* `/kos/config/{path}` topic, and writes changes back with `updateProperty`.
|
|
7
10
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* updates. Essential for building configuration interfaces and managing device operational parameters.
|
|
11
|
+
* Declare one on a model with `@kosConfigBean`, or a single attribute with
|
|
12
|
+
* `@kosConfigProperty`.
|
|
11
13
|
*
|
|
12
|
-
*
|
|
13
|
-
* - **Hierarchical Configuration** - Access nested configuration structures using path notation
|
|
14
|
-
* - **Real-Time Synchronization** - Automatic updates via `/kos/config/{path}` WebSocket topic
|
|
15
|
-
* - **Schema-Based Validation** - Built-in validation using device configuration schemas
|
|
16
|
-
* - **Transactional Updates** - Atomic configuration changes with rollback support
|
|
17
|
-
* - **Type-Safe Access** - Strongly typed property access with TypeScript support
|
|
18
|
-
* - **Reactive Properties** - Automatic UI updates when configuration changes
|
|
19
|
-
*
|
|
20
|
-
* ## Configuration Path Patterns
|
|
21
|
-
* ConfigBean supports hierarchical paths that mirror device system organization:
|
|
22
|
-
* - **System Level**: `system:app` - Machine identity, operational modes
|
|
23
|
-
* - **Service Level**: `kos:service:CANPumpMgr` - KOS service configurations
|
|
24
|
-
* - **Hardware Level**: `assembly:core:board:macro:pump:water` - Component settings
|
|
25
|
-
* - **Application Level**: `app:scheduling:dayWiseLockConfigMap` - Application-specific settings
|
|
26
|
-
*
|
|
27
|
-
* ## Common Use Cases
|
|
28
|
-
* - **Configuration Interfaces** - Build reactive configuration management screens
|
|
29
|
-
* - **Operational Parameter Control** - Real-time adjustment of device behavior
|
|
30
|
-
* - **Schema-Driven Forms** - Generate configuration UIs from device schemas
|
|
31
|
-
* - **System Administration** - Centralized device configuration management
|
|
32
|
-
* - **Bulk Configuration Updates** - Transactional updates across multiple properties
|
|
33
|
-
*
|
|
34
|
-
* @example Basic Configuration Management
|
|
14
|
+
* @example
|
|
35
15
|
* ```typescript
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* .build();
|
|
39
|
-
*
|
|
40
|
-
* // Access current configuration values
|
|
41
|
-
* const machineId = systemConfig.values.machineId;
|
|
42
|
-
* const debugMode = systemConfig.values.debugMode;
|
|
43
|
-
*
|
|
44
|
-
* // Update configuration properties
|
|
45
|
-
* await systemConfig.updateProperty('debugMode', true);
|
|
46
|
-
* await systemConfig.updateProperty('machineId', 'MACHINE-001');
|
|
16
|
+
* @kosConfigBean({ path: "system:app" })
|
|
17
|
+
* appConfig!: IConfigBeanModel;
|
|
47
18
|
* ```
|
|
48
19
|
*
|
|
49
20
|
* @interface
|
|
@@ -98,16 +69,9 @@ declare class ConfigBeanModelImpl<T extends {} = any> implements IKosDataModel {
|
|
|
98
69
|
*/
|
|
99
70
|
constructor(modelId: string, options: IConfigBeanModelOptions);
|
|
100
71
|
/**
|
|
101
|
-
*
|
|
72
|
+
* Current values of all the bean's attributes.
|
|
102
73
|
*
|
|
103
74
|
* @returns Object containing all configuration properties with their current values
|
|
104
|
-
*
|
|
105
|
-
* @example Access Configuration Values
|
|
106
|
-
* ```typescript
|
|
107
|
-
* const currentValues = systemConfig.values;
|
|
108
|
-
* console.log('Machine ID:', currentValues.machineId);
|
|
109
|
-
* console.log('Debug Mode:', currentValues.debugMode);
|
|
110
|
-
* ```
|
|
111
75
|
*/
|
|
112
76
|
get values(): Record<keyof T, unknown>[keyof T][];
|
|
113
77
|
/**
|
|
@@ -118,11 +82,18 @@ declare class ConfigBeanModelImpl<T extends {} = any> implements IKosDataModel {
|
|
|
118
82
|
* @internal
|
|
119
83
|
*
|
|
120
84
|
* @remarks
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
* In future additional information about the workspace could be loaded
|
|
85
|
+
* Fetches the bean's values and schema.
|
|
124
86
|
*/
|
|
125
87
|
load(): Promise<void>;
|
|
88
|
+
/**
|
|
89
|
+
* @internal
|
|
90
|
+
*
|
|
91
|
+
* @remarks
|
|
92
|
+
* Fetches the bean again and updates its values and schema in place, so a
|
|
93
|
+
* KOS Core reload after a reconnect leaves the same instance current.
|
|
94
|
+
*/
|
|
95
|
+
reload(): Promise<void>;
|
|
96
|
+
private fetchBean;
|
|
126
97
|
/**
|
|
127
98
|
* Gets all available schema property keys.
|
|
128
99
|
*
|
|
@@ -130,34 +101,20 @@ declare class ConfigBeanModelImpl<T extends {} = any> implements IKosDataModel {
|
|
|
130
101
|
*/
|
|
131
102
|
get schemaKeys(): string[];
|
|
132
103
|
/**
|
|
133
|
-
*
|
|
104
|
+
* Schema definition of an attribute. Schema keys may be regular expressions,
|
|
105
|
+
* so a key with no exact entry is matched against them.
|
|
134
106
|
*
|
|
135
107
|
* @param key - Property key to get schema for
|
|
136
108
|
* @returns Schema definition if found, undefined otherwise
|
|
137
|
-
*
|
|
138
|
-
* @example Get Property Schema
|
|
139
|
-
* ```typescript
|
|
140
|
-
* const schema = systemConfig.getSchemaForProperty('debugMode');
|
|
141
|
-
* if (schema) {
|
|
142
|
-
* console.log('Type:', schema.type);
|
|
143
|
-
* console.log('Description:', schema.description);
|
|
144
|
-
* }
|
|
145
|
-
* ```
|
|
146
109
|
*/
|
|
147
110
|
getSchemaForProperty(key: string): import('../../services/config-bean').SchemaNodeDef | undefined;
|
|
148
111
|
/**
|
|
149
|
-
*
|
|
112
|
+
* Sets one attribute and writes the bean to the backend.
|
|
150
113
|
*
|
|
151
114
|
* @category Action
|
|
152
115
|
*
|
|
153
116
|
* @param key - The configuration property key to update
|
|
154
117
|
* @param value - The new value to set for the property
|
|
155
|
-
*
|
|
156
|
-
* @example Update Configuration Property
|
|
157
|
-
* ```typescript
|
|
158
|
-
* await systemConfig.updateProperty('debugMode', true);
|
|
159
|
-
* await systemConfig.updateProperty('machineId', 'MACHINE-001');
|
|
160
|
-
* ```
|
|
161
118
|
*/
|
|
162
119
|
updateProperty(key: ConfigBeanKeys<T>, value: ConfigPropertyTypes): Promise<void>;
|
|
163
120
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-bean-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/config-bean/config-bean-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,OAAO,EACP,oBAAoB,EACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EAKL,2BAA2B,EAG5B,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EACV,cAAc,EACd,uBAAuB,EACxB,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EAGL,KAAK,wBAAwB,EAE9B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAO/C
|
|
1
|
+
{"version":3,"file":"config-bean-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/config-bean/config-bean-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,OAAO,EACP,oBAAoB,EACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EAKL,2BAA2B,EAG5B,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EACV,cAAc,EACd,uBAAuB,EACxB,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EAGL,KAAK,wBAAwB,EAE9B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAO/C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,EAAE,GAAG,GAAG,IAAI,oBAAoB,CACrE,mBAAmB,CAAC,CAAC,CAAC,CACvB,CAAC;AAYF,eAAO,MAAM,sBAAsB,sBAAsB,CAAC;AAM1D;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,kBAAkB,CAAC,EAAE,MAAM,GAC1B,MAAM,CAIR;AAiBD;;;GAGG;AACH,cACM,mBAAmB,CAAC,CAAC,SAAS,EAAE,GAAG,GAAG,CAAE,YAAW,aAAa;IACpE,yDAAyD;IACzD,OAAO,CAAC,iBAAiB,CAAiC;IAE1D,0DAA0D;IAC1D,OAAO,CAAC,cAAc,CAA8B;IAEpD,oEAAoE;IACpE,OAAO,CAAC,OAAO,CAAC,CAAiB;IACjC,8DAA8D;IAC9D,EAAE,EAAE,MAAM,CAAC;IACX,qFAAqF;IACrF,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAE/D,oFAAoF;IACpF,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAEnE,oEAAoE;IACpE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,0EAA0E;IAC1E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;;;;OAQG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB;IAsB7D;;;;OAIG;IACH,IAAI,MAAM,wCAET;IAED;;OAEG;IACG,KAAK;IAIX;;;;;OAKG;IACG,IAAI;IAKV;;;;;;OAMG;IACG,MAAM;YAKE,SAAS;IAmBvB;;;;OAIG;IACH,IAAI,UAAU,aAEb;IAED;;;;;;OAMG;IACH,oBAAoB,CAAC,GAAG,EAAE,MAAM;IAahC;;;;;;;OAOG;IACG,cAAc,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,mBAAmB;IAIvE;;;;;;;;;;OAUG;IACG,gBAAgB;IAYtB;;;;;;;OAOG;IAOH,uBAAuB,CAAC,UAAU,EAAE,wBAAwB;CAG7D;AAED,eAAO,MAAM,UAAU,6EAMrB,CAAC"}
|