@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
|
@@ -2,85 +2,15 @@ import { SingletonKosModelRegistrationFactory } from '../../../core';
|
|
|
2
2
|
import { LogStreamContainerModel } from './log-stream-container-model';
|
|
3
3
|
import { LogStreamContainerOptions } from './types';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Registration for {@link LogStreamContainerModel}, a singleton model.
|
|
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: LogStreamContainer.type, id: "logStreamContainerId"})
|
|
18
|
-
* private logStreamContainerModel: LogStreamContainerModel;
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* ## factory
|
|
23
|
-
*
|
|
24
|
-
* The factory method creates a factory function that can be used to create new LogStreamContainerModel 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 = LogStreamContainer.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 LogStreamContainerModel.
|
|
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.
|
|
44
9
|
*
|
|
45
10
|
* @example
|
|
46
11
|
* ```typescript
|
|
47
|
-
*
|
|
48
|
-
* const model: IKosDataModel = ...; // some model
|
|
49
|
-
*
|
|
50
|
-
* if (LogStreamContainer.predicate(model)) {
|
|
51
|
-
* // if the function evaluates to true, the model is narrowed down to LogStreamContainerModel
|
|
52
|
-
* // and the compiler will know that the model has the LogStreamContainerModel interface
|
|
53
|
-
* model.updateAvailability(false);
|
|
54
|
-
* }
|
|
12
|
+
* const model = LogStreamContainer.instance().options(options).build();
|
|
55
13
|
* ```
|
|
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 { LogStreamContainer } from "@kosdev-code/kos-ui-sdk";
|
|
70
|
-
* ...
|
|
71
|
-
* import { ExtensionManager, IKosRegistry } from "@kosdev-code/kos-ui-sdk";
|
|
72
|
-
* export const kosModels: IKosRegistry["models"] = {
|
|
73
|
-
* ...LogStreamContainer.registration,
|
|
74
|
-
* };
|
|
75
|
-
* ```
|
|
76
|
-
*
|
|
77
|
-
* ## registration.singleton
|
|
78
|
-
|
|
79
|
-
* The logStreamContainer model is a singleton model. This means that each time the factory function is called , the same instance will be returned.
|
|
80
|
-
* If the model does not yet exist, it will be created passing in the provided options to initialize it.
|
|
81
|
-
*
|
|
82
|
-
* Singleton models don't require an ID as they will use the model type as their ID to guarantee uniqueness throughout the system.
|
|
83
|
-
|
|
84
|
-
* */
|
|
14
|
+
*/
|
|
85
15
|
export declare const LogStreamContainer: SingletonKosModelRegistrationFactory<LogStreamContainerModel, LogStreamContainerOptions>;
|
|
86
16
|
//# sourceMappingURL=log-stream-container-registration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-stream-container-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/log-stream/log-stream-container-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AAErE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAM5E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAEzD
|
|
1
|
+
{"version":3,"file":"log-stream-container-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/log-stream/log-stream-container-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AAErE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAM5E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAEzD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,0FAM7B,CAAC"}
|
|
@@ -5,39 +5,18 @@ import { LogBlockType } from '../log-block';
|
|
|
5
5
|
import { LogStreamOptions } from './types';
|
|
6
6
|
export declare const MODEL_TYPE = "log-stream-model";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* ## Key Features
|
|
15
|
-
* - **Real-time Log Streaming** - Live log updates as they are generated on the device
|
|
16
|
-
* - **Block-based Management** - Efficient memory usage through log block organization
|
|
17
|
-
* - **Async Iterator Support** - Stream logs using modern async/await patterns
|
|
18
|
-
* - **Subscription Control** - Subscribe/unsubscribe to specific log streams
|
|
19
|
-
* - **Line Number Tracking** - Maintains accurate line numbering across blocks
|
|
20
|
-
* - **Multi-stream Support** - Handle multiple log streams simultaneously through container model
|
|
21
|
-
*
|
|
22
|
-
* ## Common Use Cases
|
|
23
|
-
* - **Development Debugging** - Monitor application logs during development
|
|
24
|
-
* - **Production Monitoring** - Track system health and errors in deployed applications
|
|
25
|
-
* - **Troubleshooting** - Analyze log patterns to diagnose issues
|
|
26
|
-
* - **Log Analysis** - Process log streams for metrics and insights
|
|
27
|
-
* - **Real-time Dashboards** - Display live log feeds in monitoring interfaces
|
|
28
|
-
* - **Automated Log Processing** - Stream logs to external analysis tools
|
|
8
|
+
* A device log stream, held as a sequence of {@link LogBlockModel} blocks. On
|
|
9
|
+
* load the model fetches the stream's existing blocks and the lines of the last
|
|
10
|
+
* two. `subscribe` starts topic delivery of new lines, and `start` returns an
|
|
11
|
+
* async iterator that yields the loaded lines and then each new line as it
|
|
12
|
+
* arrives, until `stop` is called.
|
|
29
13
|
*
|
|
30
14
|
* @interface
|
|
31
|
-
* @example
|
|
15
|
+
* @example
|
|
32
16
|
* ```typescript
|
|
33
|
-
* const logStream = LogStream.instance('application-logs')
|
|
34
|
-
* .options({ name: 'application-logs', nodeId: 'primary' })
|
|
35
|
-
* .build();
|
|
36
|
-
*
|
|
37
17
|
* await logStream.subscribe();
|
|
38
|
-
* const
|
|
39
|
-
*
|
|
40
|
-
* console.log(`[LOG] ${logLine}`);
|
|
18
|
+
* for await (const line of logStream.start()) {
|
|
19
|
+
* console.log(line);
|
|
41
20
|
* }
|
|
42
21
|
* ```
|
|
43
22
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-stream-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/log-stream/log-stream-model.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EAEX,kBAAkB,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAKL,KAAK,YAAY,EAClB,MAAM,cAAc,CAAC;AAOtB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,UAAU,qBAAqB,CAAC;AAE7C
|
|
1
|
+
{"version":3,"file":"log-stream-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/log-stream/log-stream-model.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EAEX,kBAAkB,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAKL,KAAK,YAAY,EAClB,MAAM,cAAc,CAAC;AAOtB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,UAAU,qBAAqB,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,MAAM,cAAc,GAAG,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;AACtE;;;GAGG;AACH,qBACa,kBAAmB,YAAW,aAAa,EAAE,gBAAgB;IACxE,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,MAAM,CAAmB;IACjC,MAAM,EAAE,MAAM,CAAC;IAEf,OAAO,CAAC,OAAO,CAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;gBAEnB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,kBAAkB;IAa7B,IAAI,YAAY,WAGf;IACD,IAAI,YAAY,qDAIf;IAED,IAAI,SAAS,2CAEZ;IACD,IAAI,MAAM,2CAET;IAED,IAAI,cAAc,WAEjB;IAED,MAAM,CAAC,OAAO,EAAE,WAAW,CAAC,aAAa,CAAC;IAI1C,WAAW,CAAC,SAAS,EAAE,YAAY;IAgCnC,QAAQ,CAAC,SAAS,EAAE,YAAY;IAwBhC,WAAW,CAAC,QAAQ,EAAE,MAAM;IAGtB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAI1B,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAK5B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAiB5B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAyB3B,OAAO,CAAC,iBAAiB,CAAC,CAAqC;IAC/D,OAAO,CAAC,UAAU,CAAS;IAE3B,KAAK;IAML,IAAI;IAKG,UAAU,IAAI,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC;CAgExD"}
|
|
@@ -2,85 +2,15 @@ import { KosModelRegistrationFactory } from '../../../core/core/registration';
|
|
|
2
2
|
import { LogStreamOptions } from './types';
|
|
3
3
|
import { LogStreamModel } from './log-stream-model';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Registration for {@link LogStreamModel}.
|
|
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: LogStream.type, id: "logStreamId"})
|
|
18
|
-
* private logStreamModel: LogStreamModel;
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* ## factory
|
|
23
|
-
*
|
|
24
|
-
* The factory method creates a factory function that can be used to create new LogStreamModel 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 = LogStream.
|
|
35
|
-
* // Add option data
|
|
36
|
-
* });
|
|
12
|
+
* const model = LogStream.instance("logStreamId").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 LogStreamModel.
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```typescript
|
|
47
|
-
*
|
|
48
|
-
* const model: IKosDataModel = ...; // some model
|
|
49
|
-
*
|
|
50
|
-
* if (LogStream.predicate(model)) {
|
|
51
|
-
* // if the function evaluates to true, the model is narrowed down to LogStreamModel
|
|
52
|
-
* // and the compiler will know that the model has the LogStreamModel 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 { LogStream } 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(LogStream);
|
|
77
|
-
* ```
|
|
78
|
-
*
|
|
79
|
-
* ## registration.singleton
|
|
80
|
-
|
|
81
|
-
* The logStream 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 LogStream: KosModelRegistrationFactory<LogStreamModel, LogStreamOptions>;
|
|
86
16
|
//# sourceMappingURL=log-stream-registration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-stream-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/log-stream/log-stream-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD
|
|
1
|
+
{"version":3,"file":"log-stream-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/log-stream/log-stream-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,+DAMpB,CAAC"}
|
|
@@ -1,59 +1,19 @@
|
|
|
1
1
|
// --------------- LogStream ---------------
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* These options specify the log stream identity and source location for connecting
|
|
7
|
-
* to specific log streams on KOS devices.
|
|
8
|
-
*
|
|
9
|
-
* @example Basic Log Stream Configuration
|
|
10
|
-
* ```typescript
|
|
11
|
-
* const options: LogStreamOptions = {
|
|
12
|
-
* name: 'application-logs',
|
|
13
|
-
* nodeId: 'primary'
|
|
14
|
-
* };
|
|
15
|
-
*
|
|
16
|
-
* const logStream = LogStream.instance('app-logger')
|
|
17
|
-
* .options(options)
|
|
18
|
-
* .build();
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
* @example Multiple Stream Types
|
|
22
|
-
* ```typescript
|
|
23
|
-
* // System logs from primary node
|
|
24
|
-
* const systemLogs = LogStream.instance('system')
|
|
25
|
-
* .options({ name: 'system-logs', nodeId: 'primary' })
|
|
26
|
-
* .build();
|
|
27
|
-
*
|
|
28
|
-
* // Error logs from secondary node
|
|
29
|
-
* const errorLogs = LogStream.instance('errors')
|
|
30
|
-
* .options({ name: 'error-logs', nodeId: 'secondary' })
|
|
31
|
-
* .build();
|
|
32
|
-
*
|
|
33
|
-
* // Debug logs from development node
|
|
34
|
-
* const debugLogs = LogStream.instance('debug')
|
|
35
|
-
* .options({ name: 'debug-logs', nodeId: 'dev-node' })
|
|
36
|
-
* .build();
|
|
37
|
-
* ```
|
|
4
|
+
* Options for a {@link LogStreamModel}: which stream to follow and the node it
|
|
5
|
+
* comes from.
|
|
38
6
|
*
|
|
39
7
|
* @kosService core.logging
|
|
40
8
|
* @group KOS Model
|
|
41
9
|
* @category Device Logging
|
|
42
10
|
*/
|
|
43
11
|
export interface LogStreamOptions {
|
|
44
|
-
/**
|
|
45
|
-
* Name of the log stream to connect to.
|
|
46
|
-
*
|
|
47
|
-
* This should match the log stream name available on the target device.
|
|
48
|
-
* Common stream names include 'application-logs', 'system-logs', 'error-logs'.
|
|
49
|
-
*/
|
|
12
|
+
/** Name of the log stream on the device. */
|
|
50
13
|
name: string;
|
|
51
14
|
|
|
52
15
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* Specifies which KOS device node contains the target log stream.
|
|
56
|
-
* Typically 'primary' for main device logs, but can be any valid node ID.
|
|
16
|
+
* Id of the node the stream comes from.
|
|
57
17
|
*
|
|
58
18
|
* @default 'primary'
|
|
59
19
|
*/
|
|
@@ -63,22 +23,7 @@ export interface LogStreamOptions {
|
|
|
63
23
|
// --------------- LogStreamContainer ---------------
|
|
64
24
|
|
|
65
25
|
/**
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* Currently an empty interface but reserved for future container-level
|
|
69
|
-
* configuration options such as stream filtering, automatic discovery settings,
|
|
70
|
-
* or performance tuning parameters.
|
|
71
|
-
*
|
|
72
|
-
* @example Basic Container Configuration
|
|
73
|
-
* ```typescript
|
|
74
|
-
* const options: LogStreamContainerOptions = {
|
|
75
|
-
* // Future options will be added here
|
|
76
|
-
* };
|
|
77
|
-
*
|
|
78
|
-
* const container = LogStreamContainer.instance('log-manager')
|
|
79
|
-
* .options(options)
|
|
80
|
-
* .build();
|
|
81
|
-
* ```
|
|
26
|
+
* Options for a {@link LogStreamContainerModel}. The container takes none.
|
|
82
27
|
*
|
|
83
28
|
* @kosService core.logging
|
|
84
29
|
* @category Model Configuration
|
|
@@ -3,43 +3,14 @@ import { NetworkInterfaceModel } from './network-interface-model';
|
|
|
3
3
|
import { NetworkInterfaceContainerOptions } from './types';
|
|
4
4
|
export declare const MODEL_TYPE = "network-interface-container-model";
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* The device's network interfaces, one {@link NetworkInterfaceModel} per
|
|
7
|
+
* interface keyed by name and indexed by category (`byCategory`). The container
|
|
8
|
+
* loads them on load; `refreshInterfaces` fetches them again and updates the
|
|
9
|
+
* models in place.
|
|
7
10
|
*
|
|
8
|
-
*
|
|
9
|
-
* available on a KOS device, including automatic discovery, categorization, and real-time updates.
|
|
10
|
-
* This container model is essential for applications that need to manage multiple network interfaces,
|
|
11
|
-
* build network configuration screens, or monitor overall network connectivity status.
|
|
12
|
-
*
|
|
13
|
-
* ## Key Features
|
|
14
|
-
* - **Automatic Interface Discovery** - Loads and manages all available network interfaces from the device
|
|
15
|
-
* - **Category-Based Indexing** - Organizes interfaces by category (INTERNAL, INTEGRATION, EXTERNAL, NONE)
|
|
16
|
-
* - **Real-Time Refresh** - Updates interface data with current network state
|
|
17
|
-
* - **Unified Interface Management** - Single point of access for all network interface operations
|
|
18
|
-
* - **Dynamic Interface Tracking** - Handles interface addition/removal as network state changes
|
|
19
|
-
* - **Service Integration** - Automatically fetches interface data from KOS network services
|
|
20
|
-
*
|
|
21
|
-
* ## Interface Categories
|
|
22
|
-
* The container automatically organizes interfaces into categories:
|
|
23
|
-
* - **EXTERNAL** - User-facing interfaces (WiFi adapters, Ethernet ports)
|
|
24
|
-
* - **INTERNAL** - System interfaces (loopback, virtual interfaces)
|
|
25
|
-
* - **INTEGRATION** - Integration-specific network interfaces
|
|
26
|
-
* - **NONE** - Uncategorized interfaces
|
|
27
|
-
*
|
|
28
|
-
* ## Common Use Cases
|
|
29
|
-
* - **Network Configuration UI** - Build comprehensive network settings interfaces
|
|
30
|
-
* - **System Monitoring** - Track overall network connectivity and interface health
|
|
31
|
-
* - **Interface Selection** - Allow users to choose from available network interfaces
|
|
32
|
-
* - **Network Diagnostics** - Provide detailed system-wide network interface information
|
|
33
|
-
* - **Automated Network Management** - Programmatically manage multiple interfaces
|
|
34
|
-
*
|
|
35
|
-
* @example Basic Usage
|
|
11
|
+
* @example
|
|
36
12
|
* ```typescript
|
|
37
|
-
* const
|
|
38
|
-
* .build();
|
|
39
|
-
*
|
|
40
|
-
* // Access all network interfaces and get specific interface
|
|
41
|
-
* const allInterfaces = networkContainer.models;
|
|
42
|
-
* const ethInterface = networkContainer.getModel('eth0');
|
|
13
|
+
* const external = networkInterfaces.models.getIndexByKey("byCategory", "EXTERNAL");
|
|
43
14
|
* ```
|
|
44
15
|
*
|
|
45
16
|
* @group KOS Model
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network-interface-container-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/network-interface/network-interface-container-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EAEf,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAGvE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,SAAS,CAAC;AAEhE,eAAO,MAAM,UAAU,sCAAsC,CAAC;AAE9D
|
|
1
|
+
{"version":3,"file":"network-interface-container-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/network-interface/network-interface-container-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EAEf,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAGvE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,SAAS,CAAC;AAEhE,eAAO,MAAM,UAAU,sCAAsC,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,8BAA8B,GACxC,oBAAoB,CAAC,kCAAkC,CAAC,CAAC;AAE3D;;;GAGG;AACH,qBACa,kCACX,YACE,gBAAgB,EAChB,eAAe,CAAC,qBAAqB,CAAC,EACtC,aAAa;IAEf,yDAAyD;IACzD,EAAE,EAAE,MAAM,CAAC;IACX,oEAAoE;IACpE,OAAO,CAAC,MAAM,CAAmB;IACjC,qFAAqF;IAC3E,OAAO,CAAC,OAAO,CAA4C;gBAEnE,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,gCAAgC,EACzC,OAAO,EAAE,kBAAkB;IAe7B,QAAQ,CAAC,EAAE,EAAE,MAAM;IAGnB,IAAI,MAAM,8CAET;IACD,IAAI,IAAI,4BAEP;IAED,QAAQ,CAAC,KAAK,EAAE,qBAAqB;IAIrC,WAAW,CAAC,EAAE,EAAE,MAAM;IAKtB;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAMrB,iBAAiB;IAoBvB;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAO5B"}
|
|
@@ -1,86 +1,18 @@
|
|
|
1
1
|
import { SingletonKosModelRegistrationFactory } from '../../../core';
|
|
2
2
|
import { NetworkInterfaceContainerModel } from './network-interface-container-model';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Registration for {@link NetworkInterfaceContainerModel}, a singleton model.
|
|
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.
|
|
6
|
+
* `type` identifies the model in the registry and in `@kosDependency` declarations.
|
|
7
|
+
* `register()` adds the model to the registry. `instance()` builds or returns the single instance; later calls ignore the options.
|
|
12
8
|
*
|
|
13
9
|
* @example
|
|
14
10
|
* ```typescript
|
|
15
|
-
*
|
|
16
|
-
* @kosDependency({modelType: NetworkInterfaceContainer.type, id: "networkInterfaceContainerId"})
|
|
17
|
-
* private networkInterfaceContainerModel: NetworkInterfaceContainerModel;
|
|
11
|
+
* const model = NetworkInterfaceContainer.instance().options(options).build();
|
|
18
12
|
* ```
|
|
19
13
|
*
|
|
20
|
-
*
|
|
21
|
-
* ## factory
|
|
22
|
-
*
|
|
23
|
-
* The factory method creates a factory function that can be used to create new NetworkInterfaceContainerModel instances.
|
|
24
|
-
*
|
|
25
|
-
|
|
26
|
-
* As this is a singleton model, the factory function accepts the model options as its argument.
|
|
27
|
-
*
|
|
28
|
-
* If a model with the same model type 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 = NetworkInterfaceContainer.factory({
|
|
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 NetworkInterfaceContainerModel.
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* ```typescript
|
|
46
|
-
*
|
|
47
|
-
* const model: IKosDataModel = ...; // some model
|
|
48
|
-
*
|
|
49
|
-
* if (NetworkInterfaceContainer.predicate(model)) {
|
|
50
|
-
* // if the function evaluates to true, the model is narrowed down to NetworkInterfaceContainerModel
|
|
51
|
-
* // and the compiler will know that the model has the NetworkInterfaceContainerModel 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 { NetworkInterfaceContainer } from "@kosdev-code/kos-dispense-sdk";
|
|
69
|
-
* ...
|
|
70
|
-
* import { ExtensionManager, IKosRegistry } from "@kosdev-code/kos-ui-sdk";
|
|
71
|
-
* export const kosModels: IKosRegistry["models"] = {
|
|
72
|
-
* ...NetworkInterfaceContainer.registration,
|
|
73
|
-
* };
|
|
74
|
-
* ```
|
|
75
|
-
*
|
|
76
|
-
* ## registration.singleton
|
|
77
|
-
|
|
78
|
-
* The networkInterfaceContainer model is a singleton model. This means that each time the factory function is called , the same instance will be returned.
|
|
79
|
-
* If the model does not yet exist, it will be created passing in the provided options to initialize it.
|
|
80
|
-
*
|
|
81
|
-
* Singleton models don't require an ID as they will use the model type as their ID to guarantee uniqueness throughout the system.
|
|
82
14
|
* @group KOS Model
|
|
83
15
|
* @category Network Interfaces
|
|
84
|
-
|
|
16
|
+
*/
|
|
85
17
|
export declare const NetworkInterfaceContainer: SingletonKosModelRegistrationFactory<NetworkInterfaceContainerModel, object>;
|
|
86
18
|
//# sourceMappingURL=network-interface-container-registration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network-interface-container-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/network-interface/network-interface-container-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAQ1F
|
|
1
|
+
{"version":3,"file":"network-interface-container-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/network-interface/network-interface-container-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAQ1F;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,yBAAyB,8EAOlC,CAAC"}
|
|
@@ -3,51 +3,13 @@ import { EthernetData, Ip44Settings, NetworkInterfaceCategory, NetworkInterfaceD
|
|
|
3
3
|
import { NetworkInterfaceOptions } from './types';
|
|
4
4
|
export declare const MODEL_TYPE = "network-interface-model";
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* manage network interfaces on KOS devices.
|
|
12
|
-
*
|
|
13
|
-
* ## Key Features
|
|
14
|
-
* - **Network Interface Discovery** - Automatically discovers and tracks available network interfaces
|
|
15
|
-
* - **WiFi Management** - Access WiFi connection details, signal strength, and access point information
|
|
16
|
-
* - **Ethernet Monitoring** - Track Ethernet connection status, speed, and duplex settings
|
|
17
|
-
* - **IP Configuration** - Monitor and manage IPv4 settings including addresses, gateways, and DNS
|
|
18
|
-
* - **Connection State Tracking** - Real-time monitoring of network device states and connectivity
|
|
19
|
-
* - **Hardware Information** - Access to MAC addresses, MTU settings, and device capabilities
|
|
20
|
-
*
|
|
21
|
-
* ## Network Interface Categories
|
|
22
|
-
* The model categorizes interfaces for easier management:
|
|
23
|
-
* - **INTERNAL** - Internal system interfaces (loopback, etc.)
|
|
24
|
-
* - **INTEGRATION** - Integration-specific interfaces
|
|
25
|
-
* - **EXTERNAL** - User-facing network interfaces (WiFi, Ethernet)
|
|
26
|
-
* - **NONE** - Uncategorized interfaces
|
|
27
|
-
*
|
|
28
|
-
* ## Common Use Cases
|
|
29
|
-
* - **Network Status Display** - Show current connection status and network details in UI
|
|
30
|
-
* - **Connection Management** - Allow users to view and configure network settings
|
|
31
|
-
* - **Network Diagnostics** - Provide detailed network interface information for troubleshooting
|
|
32
|
-
* - **System Integration** - Monitor network connectivity for automated systems
|
|
33
|
-
* - **Configuration Interfaces** - Build network configuration screens with current state
|
|
6
|
+
* One network interface of the device: name, type, MAC address, MTU,
|
|
7
|
+
* NetworkManager state, IPv4 settings and the WiFi or Ethernet details. The
|
|
8
|
+
* `category` (`EXTERNAL`, `INTERNAL`, `INTEGRATION` or `NONE`) separates
|
|
9
|
+
* user-facing interfaces from system ones. Instances are created and updated
|
|
10
|
+
* by {@link NetworkInterfaceContainerModel}, keyed by interface name.
|
|
34
11
|
*
|
|
35
12
|
* @interface
|
|
36
|
-
* @example Basic Usage
|
|
37
|
-
* ```typescript
|
|
38
|
-
* const networkInterface = NetworkInterface.instance('eth0')
|
|
39
|
-
* .options({
|
|
40
|
-
* name: 'eth0',
|
|
41
|
-
* type: 'ethernet',
|
|
42
|
-
* configured: true,
|
|
43
|
-
* category: 'EXTERNAL'
|
|
44
|
-
* })
|
|
45
|
-
* .build();
|
|
46
|
-
*
|
|
47
|
-
* console.log(networkInterface.name); // 'eth0'
|
|
48
|
-
* console.log(networkInterface.configured); // true
|
|
49
|
-
* ```
|
|
50
|
-
*
|
|
51
13
|
* @group KOS Model
|
|
52
14
|
* @category Network Interfaces
|
|
53
15
|
* @useDeclaredType
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network-interface-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/network-interface/network-interface-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAEhB,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,wBAAwB,EACxB,oBAAoB,EACpB,QAAQ,EACT,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvD,eAAO,MAAM,UAAU,4BAA4B,CAAC;AAEpD
|
|
1
|
+
{"version":3,"file":"network-interface-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/network-interface/network-interface-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAEhB,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,wBAAwB,EACxB,oBAAoB,EACpB,QAAQ,EACT,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvD,eAAO,MAAM,UAAU,4BAA4B,CAAC;AAEpD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,qBAAqB,GAC/B,oBAAoB,CAAC,yBAAyB,CAAC,CAAC;AAElD;;;GAGG;AACH,qBACa,yBACX,YAAW,aAAa,EAAE,gBAAgB,EAAE,oBAAoB;IAEhE,+CAA+C;IAC/C,EAAE,EAAE,MAAM,CAAC;IAEX,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IAEb,uEAAuE;IACvE,IAAI,EAAE,MAAM,CAAC;IAEb,oEAAoE;IACpE,aAAa,EAAE,MAAM,CAAC;IAEtB,oDAAoD;IACpD,SAAS,EAAE,MAAM,CAAC;IAElB,uDAAuD;IACvD,GAAG,EAAE,MAAM,CAAC;IAEZ,+DAA+D;IAC/D,UAAU,EAAE,OAAO,CAAC;IAEpB,kFAAkF;IAClF,IAAI,CAAC,EAAE,QAAQ,CAAC;IAEhB,oFAAoF;IACpF,QAAQ,CAAC,EAAE,YAAY,CAAC;IAExB,8EAA8E;IAC9E,WAAW,CAAC,EAAE,YAAY,CAAC;IAE3B,2DAA2D;IAC3D,QAAQ,EAAE,wBAAwB,CAAC;IAEnC,OAAO,CAAC,MAAM,CAAmB;gBAG/B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,uBAAuB,EAChC,OAAO,EAAE,kBAAkB;IAiB7B,WAAW,CAAC,OAAO,EAAE,uBAAuB,GAAG,IAAI;IAenD;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAG5B"}
|