@kosdev-code/kos-ui-sdk 2.0.45 → 2.0.46
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/common/events/eventBus.d.ts +0 -30
- package/common/events/eventBus.d.ts.map +1 -1
- package/common/events/eventBus.functional.d.ts +0 -48
- package/common/events/eventBus.functional.d.ts.map +1 -1
- package/common/events/eventBus.state.d.ts +0 -33
- package/common/events/eventBus.state.d.ts.map +1 -1
- package/core/core/decorators/index.d.ts +0 -11
- package/core/core/decorators/index.d.ts.map +1 -1
- package/core/core/decorators/kos-child.d.ts +0 -2
- package/core/core/decorators/kos-child.d.ts.map +1 -1
- package/core/core/decorators/kos-companion.d.ts +8 -158
- package/core/core/decorators/kos-companion.d.ts.map +1 -1
- package/core/core/decorators/kos-context.d.ts +0 -6
- package/core/core/decorators/kos-context.d.ts.map +1 -1
- package/core/core/decorators/kos-http-decorators.d.ts +0 -15
- package/core/core/decorators/kos-http-decorators.d.ts.map +1 -1
- package/core/core/decorators/kos-log.d.ts +0 -4
- package/core/core/decorators/kos-log.d.ts.map +1 -1
- package/core/core/decorators/kos-model-effect.d.ts +0 -9
- package/core/core/decorators/kos-model-effect.d.ts.map +1 -1
- package/core/core/decorators/kos-parent.d.ts +0 -4
- package/core/core/decorators/kos-parent.d.ts.map +1 -1
- package/core/core/decorators/kos-reference.d.ts +0 -9
- package/core/core/decorators/kos-reference.d.ts.map +1 -1
- package/core/core/decorators/kos-topic-handler-flow-control.d.ts +1 -17
- package/core/core/decorators/kos-topic-handler-flow-control.d.ts.map +1 -1
- package/core/core/decorators/kosDependency.d.ts +1 -4
- package/core/core/decorators/kosDependency.d.ts.map +1 -1
- package/core/core/decorators/kosModel.d.ts +2 -17
- package/core/core/decorators/kosModel.d.ts.map +1 -1
- package/core/core/decorators/kosSubscribe.d.ts +0 -9
- package/core/core/decorators/kosSubscribe.d.ts.map +1 -1
- package/core/core/decorators/kosTopicHandler.d.ts +5 -87
- package/core/core/decorators/kosTopicHandler.d.ts.map +1 -1
- package/core/core/decorators/propKeys.d.ts +0 -14
- package/core/core/decorators/propKeys.d.ts.map +1 -1
- package/core/core/decorators/resolve-parameters.d.ts.map +1 -1
- package/core/core/extension/extension-manager.d.ts +4 -64
- package/core/core/extension/extension-manager.d.ts.map +1 -1
- package/core/core/extension/initialize-extension.d.ts +0 -24
- package/core/core/extension/initialize-extension.d.ts.map +1 -1
- package/core/core/extension/plugin-extension-manager.d.ts +0 -11
- package/core/core/extension/plugin-extension-manager.d.ts.map +1 -1
- package/core/core/kos-container-model.d.ts +0 -188
- package/core/core/kos-container-model.d.ts.map +1 -1
- package/core/core/kos-data-container.d.ts +1 -93
- package/core/core/kos-data-container.d.ts.map +1 -1
- package/core/core/kos-registration.d.ts.map +1 -1
- package/core/core/kos-singleton-registration.d.ts.map +1 -1
- package/core/core/kosCore.d.ts.map +1 -1
- package/core/core/kosModel.d.ts +2 -55
- package/core/core/kosModel.d.ts.map +1 -1
- package/core/core/kosModelManager.d.ts +1 -11
- package/core/core/kosModelManager.d.ts.map +1 -1
- package/core/core/log/log.d.ts.map +1 -1
- package/core/core/model/apply-kos-dev-tool-support.d.ts.map +1 -1
- package/core/core/model/kos-fsm-manager.d.ts +4 -1
- package/core/core/model/kos-fsm-manager.d.ts.map +1 -1
- package/core/core/model/kos-model-component-factory.d.ts +0 -4
- package/core/core/model/kos-model-component-factory.d.ts.map +1 -1
- package/core/core/model/kos-offline-queue.d.ts +1 -78
- package/core/core/model/kos-offline-queue.d.ts.map +1 -1
- package/core/core/model/kos-online-lifecycle-manager.d.ts.map +1 -1
- package/core/core/model/kos-subscription-manager.d.ts +0 -20
- package/core/core/model/kos-subscription-manager.d.ts.map +1 -1
- package/core/core/model/model-introspection-utils.d.ts +0 -1
- package/core/core/model/model-introspection-utils.d.ts.map +1 -1
- package/core/core/model-instantiator.d.ts +0 -19
- package/core/core/model-instantiator.d.ts.map +1 -1
- package/core/core/registration/index.d.ts +0 -1
- package/core/core/registration/index.d.ts.map +1 -1
- package/core/core/services/browser-router.d.ts.map +1 -1
- package/core/core/transport/webSocketTransport.d.ts +1 -2
- package/core/core/transport/webSocketTransport.d.ts.map +1 -1
- package/core/core/types/registration.d.ts +0 -7
- package/core/core/types/registration.d.ts.map +1 -1
- package/core/index.d.ts +1 -2
- package/core/index.d.ts.map +1 -1
- package/core/types/index.d.ts +0 -1
- package/core/types/index.d.ts.map +1 -1
- package/core/types/kos-dependency.d.ts +1 -48
- package/core/types/kos-dependency.d.ts.map +1 -1
- package/core/types/utils/kos-fetch.d.ts +0 -121
- package/core/types/utils/kos-fetch.d.ts.map +1 -1
- package/core/util/api-request-id.d.ts +0 -4
- package/core/util/api-request-id.d.ts.map +1 -1
- package/core/util/apply-mixins.d.ts +0 -4
- package/core/util/apply-mixins.d.ts.map +1 -1
- package/core/util/array-utils.d.ts +0 -4
- package/core/util/array-utils.d.ts.map +1 -1
- package/core/util/container-utils.d.ts +11 -264
- package/core/util/container-utils.d.ts.map +1 -1
- package/core/util/date-utils.d.ts +0 -29
- package/core/util/date-utils.d.ts.map +1 -1
- package/core/util/debounce.d.ts +0 -3
- package/core/util/debounce.d.ts.map +1 -1
- package/core/util/feature-flags.d.ts +0 -19
- package/core/util/feature-flags.d.ts.map +1 -1
- package/core/util/get-query-params.d.ts +0 -4
- package/core/util/get-query-params.d.ts.map +1 -1
- package/core/util/hsl-to-hex.d.ts +0 -16
- package/core/util/hsl-to-hex.d.ts.map +1 -1
- package/core/util/index.d.ts +0 -3
- package/core/util/index.d.ts.map +1 -1
- package/core/util/kos-config-init.d.ts +0 -37
- package/core/util/kos-config-init.d.ts.map +1 -1
- package/core/util/kos-data-mapper-utils.d.ts +0 -9
- package/core/util/kos-data-mapper-utils.d.ts.map +1 -1
- package/core/util/kos-fetch.d.ts +0 -12
- package/core/util/kos-fetch.d.ts.map +1 -1
- package/core/util/kos-message-utils.d.ts +0 -88
- package/core/util/kos-message-utils.d.ts.map +1 -1
- package/core/util/kos-model-utils.d.ts +0 -46
- package/core/util/kos-model-utils.d.ts.map +1 -1
- package/core/util/kos-model-visitor.d.ts +0 -2
- package/core/util/kos-model-visitor.d.ts.map +1 -1
- package/core/util/kos-service-request.d.ts +3 -43
- package/core/util/kos-service-request.d.ts.map +1 -1
- package/core/util/log-utils.d.ts +0 -12
- package/core/util/log-utils.d.ts.map +1 -1
- package/core/util/middleware.d.ts +0 -15
- package/core/util/middleware.d.ts.map +1 -1
- package/core/util/model-attribute-utils.d.ts +0 -7
- package/core/util/model-attribute-utils.d.ts.map +1 -1
- package/core/util/model-factory.d.ts +0 -4
- package/core/util/model-factory.d.ts.map +1 -1
- package/core/util/model-registration-utils.d.ts +0 -8
- package/core/util/model-registration-utils.d.ts.map +1 -1
- package/core/util/model-utils.d.ts +29 -40
- package/core/util/model-utils.d.ts.map +1 -1
- package/core/util/observable-proxy-map.d.ts +0 -11
- package/core/util/observable-proxy-map.d.ts.map +1 -1
- package/core/util/paired-client-heartbeat.d.ts +0 -2
- package/core/util/paired-client-heartbeat.d.ts.map +1 -1
- package/core/util/pipe.d.ts +0 -4
- package/core/util/pipe.d.ts.map +1 -1
- package/core/util/retry-with-exponential-backoff.d.ts +0 -3
- package/core/util/retry-with-exponential-backoff.d.ts.map +1 -1
- package/core/util/service-factory.d.ts +0 -10
- package/core/util/service-factory.d.ts.map +1 -1
- package/core/util/session-utils.d.ts +0 -8
- package/core/util/session-utils.d.ts.map +1 -1
- package/core/util/wait-for-request.d.ts +0 -16
- package/core/util/wait-for-request.d.ts.map +1 -1
- package/core/util/when-ready.d.ts +0 -3
- package/core/util/when-ready.d.ts.map +1 -1
- package/index.cjs +123 -26909
- package/index.cjs.map +1 -1
- package/index.d.cts +3 -6
- package/index.d.ts +3 -6
- package/index.d.ts.map +1 -1
- package/index.js +13460 -25275
- package/index.js.map +1 -1
- package/models/constants/index.d.ts +1 -3
- package/models/constants/index.d.ts.map +1 -1
- package/models/decorators/future-service.d.ts +2 -27
- package/models/decorators/future-service.d.ts.map +1 -1
- package/models/models/browser-router/browser-router-model.d.ts +1 -80
- package/models/models/browser-router/browser-router-model.d.ts.map +1 -1
- package/models/models/browser-router/types/index.d.ts +1 -26
- package/models/models/canvas-dispatcher/types/index.d.ts +0 -5
- package/models/models/canvas-renderer/types/index.d.ts +0 -5
- package/models/models/config-bean/config-bean-model-builder.d.ts +2 -4
- package/models/models/config-bean/config-bean-model-builder.d.ts.map +1 -1
- package/models/models/config-bean/config-bean-model.d.ts +13 -117
- package/models/models/config-bean/config-bean-model.d.ts.map +1 -1
- package/models/models/config-bean/config-bean-types.d.ts +3 -6
- package/models/models/config-bean/config-bean-types.d.ts.map +1 -1
- package/models/models/config-bean-prop/config-bean-prop-model.d.ts +1 -112
- 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 +19 -301
- package/models/models/device/device-model.d.ts +9 -219
- package/models/models/device/device-model.d.ts.map +1 -1
- package/models/models/device/device-registration.d.ts +48 -61
- package/models/models/device/device-registration.d.ts.map +1 -1
- package/models/models/device/types/index.d.ts +0 -42
- package/models/models/future/future-aware.d.ts +0 -82
- package/models/models/future/future-aware.d.ts.map +1 -1
- package/models/models/future/future-model.d.ts +5 -34
- package/models/models/future/future-model.d.ts.map +1 -1
- package/models/models/future/future-types.d.ts +9 -202
- package/models/models/future/future-types.d.ts.map +1 -1
- package/models/models/future-container/future-container-model.d.ts +2 -2
- package/models/models/index.d.ts +0 -1
- package/models/models/index.d.ts.map +1 -1
- package/models/models/key-value/index.d.ts +0 -4
- package/models/models/key-value/index.d.ts.map +1 -1
- package/models/models/key-value/key-value-model.d.ts +0 -111
- package/models/models/key-value/key-value-model.d.ts.map +1 -1
- package/models/models/key-value/services/key-value-services.d.ts +2 -124
- package/models/models/key-value/services/key-value-services.d.ts.map +1 -1
- package/models/models/key-value/types/index.d.ts +0 -57
- package/models/models/kos-log-manager/kos-log-manager-model.d.ts +14 -61
- package/models/models/kos-log-manager/kos-log-manager-model.d.ts.map +1 -1
- package/models/models/kos-log-manager/types/index.d.ts +0 -191
- package/models/models/kos-time/kos-time-model.d.ts +0 -64
- package/models/models/kos-time/kos-time-model.d.ts.map +1 -1
- package/models/models/kos-time/types/index.d.ts +0 -83
- package/models/models/log-block/log-block-container-model.d.ts +0 -132
- package/models/models/log-block/log-block-container-model.d.ts.map +1 -1
- package/models/models/log-block/log-block-model.d.ts +0 -185
- package/models/models/log-block/log-block-model.d.ts.map +1 -1
- package/models/models/log-block/types/index.d.ts +0 -133
- package/models/models/log-stream/index.d.ts +2 -6
- package/models/models/log-stream/index.d.ts.map +1 -1
- package/models/models/log-stream/log-stream-container-model.d.ts +0 -62
- package/models/models/log-stream/log-stream-container-model.d.ts.map +1 -1
- package/models/models/log-stream/log-stream-model.d.ts +0 -55
- package/models/models/log-stream/log-stream-model.d.ts.map +1 -1
- package/models/models/log-stream/services/log-stream-services.d.ts +1 -2
- package/models/models/log-stream/services/log-stream-services.d.ts.map +1 -1
- package/models/models/log-stream/types/index.d.ts +0 -79
- package/models/models/network-interface/index.d.ts +2 -6
- package/models/models/network-interface/index.d.ts.map +1 -1
- package/models/models/network-interface/network-interface-container-model.d.ts +0 -62
- 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 +1 -2
- package/models/models/network-interface/network-interface-container-registration.d.ts.map +1 -1
- package/models/models/network-interface/network-interface-model.d.ts +0 -77
- package/models/models/network-interface/network-interface-model.d.ts.map +1 -1
- package/models/models/network-interface/network-interface-registration.d.ts +1 -2
- package/models/models/network-interface/network-interface-registration.d.ts.map +1 -1
- package/models/models/network-interface/services/network-interface-services.d.ts +0 -54
- package/models/models/network-interface/services/network-interface-services.d.ts.map +1 -1
- package/models/models/network-interface/types/index.d.ts +0 -22
- package/models/models/ota/ota-model.d.ts +0 -79
- package/models/models/ota/ota-model.d.ts.map +1 -1
- package/models/models/ota/types/index.d.ts +0 -177
- package/models/models/region-info/region-info-model.d.ts +3 -8
- package/models/models/region-info/region-info-model.d.ts.map +1 -1
- package/models/models/region-info/services/region-info-services.d.ts +2 -2
- package/models/models/region-info/services/region-info-services.d.ts.map +1 -1
- package/models/models/region-info/types/index.d.ts +13 -191
- package/models/models/region-info/types/index.d.ts.map +1 -1
- package/models/models/region-info/utils/unit-system-utils.d.ts.map +1 -1
- package/models/models/software-info/services/software-info-services.d.ts.map +1 -1
- package/models/models/software-info/software-info-model.d.ts +2 -74
- package/models/models/software-info/software-info-model.d.ts.map +1 -1
- package/models/models/software-info/types/index.d.ts +17 -52
- package/models/models/state-bean/state-bean-model.d.ts +9 -86
- package/models/models/state-bean/state-bean-model.d.ts.map +1 -1
- package/models/models/state-bean/types/index.d.ts +6 -117
- package/models/models/state-prop/state-prop-model.d.ts +1 -78
- package/models/models/state-prop/state-prop-model.d.ts.map +1 -1
- package/models/models/state-prop/types/index.d.ts +7 -57
- package/models/models/storage-device/services/storage-device-services.d.ts +0 -1
- package/models/models/storage-device/services/storage-device-services.d.ts.map +1 -1
- package/models/models/storage-device/storage-device-container-model.d.ts +2 -289
- package/models/models/storage-device/storage-device-container-model.d.ts.map +1 -1
- package/models/models/storage-device/storage-device-model.d.ts +2 -84
- package/models/models/storage-device/storage-device-model.d.ts.map +1 -1
- package/models/models/storage-device/types/index.d.ts +0 -114
- package/models/models/studio-properties/studio-properties-model.d.ts +0 -75
- package/models/models/studio-properties/studio-properties-model.d.ts.map +1 -1
- package/models/models/studio-properties/types/index.d.ts +0 -29
- package/models/models/translation/services/translation-services.d.ts +2 -128
- package/models/models/translation/services/translation-services.d.ts.map +1 -1
- package/models/models/translation/translation-container-model.d.ts +10 -100
- package/models/models/translation/translation-container-model.d.ts.map +1 -1
- package/models/models/translation/translation-container-registration.d.ts +1 -2
- package/models/models/translation/translation-container-registration.d.ts.map +1 -1
- package/models/models/translation/translation-context.d.ts +16 -1
- package/models/models/translation/translation-context.d.ts.map +1 -1
- package/models/models/translation/translation-model.d.ts +1 -113
- package/models/models/translation/translation-model.d.ts.map +1 -1
- package/models/models/translation/types/index.d.ts +0 -343
- package/models/models/trouble/index.d.ts +1 -2
- package/models/models/trouble/index.d.ts.map +1 -1
- package/models/models/trouble/services/trouble-services.d.ts +4 -6
- package/models/models/trouble/services/trouble-services.d.ts.map +1 -1
- package/models/models/trouble/trouble-model.d.ts +1 -4
- package/models/models/trouble/trouble-model.d.ts.map +1 -1
- package/models/models/trouble/types/index.d.ts +93 -34
- package/models/models/trouble/utils/is-trouble-aware.d.ts +2 -2
- package/models/models/trouble/utils/is-trouble-aware.d.ts.map +1 -1
- package/models/models/trouble-container/index.d.ts +3 -4
- package/models/models/trouble-container/index.d.ts.map +1 -1
- package/models/models/trouble-container/trouble-container-model.d.ts +6 -10
- package/models/models/trouble-container/trouble-container-model.d.ts.map +1 -1
- package/models/models/trouble-container/trouble-container-registration.d.ts +5 -0
- package/models/models/trouble-container/trouble-container-registration.d.ts.map +1 -0
- package/models/models/trouble-container/types/index.d.ts +15 -6
- package/models/models/usb-update/types/index.d.ts +0 -10
- package/models/services/config-bean/index.d.ts +2 -2
- package/models/services/config-bean/index.d.ts.map +1 -1
- package/models/utils/client.d.ts +12 -16
- package/models/utils/client.d.ts.map +1 -1
- package/models/utils/core-registration-manager.d.ts +1 -1
- package/models/utils/core-registration-manager.d.ts.map +1 -1
- package/models/utils/extension-manager.d.ts +13 -54
- package/models/utils/extension-manager.d.ts.map +1 -1
- package/models/utils/index.d.ts +2 -3
- package/models/utils/index.d.ts.map +1 -1
- package/models/utils/kosmodel-compatible-future-mixin.d.ts +142 -0
- package/models/utils/kosmodel-compatible-future-mixin.d.ts.map +1 -0
- package/models/utils/kosmodel-interface-companion-mixin.d.ts +83 -0
- package/models/utils/kosmodel-interface-companion-mixin.d.ts.map +1 -0
- package/models/utils/service.d.ts +13 -91
- package/models/utils/service.d.ts.map +1 -1
- package/package.json +2 -16
- package/ui/contexts/kos-core-context.d.ts.map +1 -1
- package/ui/contexts/state-bean/state-bean-provider.d.ts.map +1 -1
- package/ui/hooks/device/use-device.d.ts +0 -6
- package/ui/hooks/device/use-device.d.ts.map +1 -1
- package/ui/hooks/index.d.ts +0 -1
- package/ui/hooks/index.d.ts.map +1 -1
- package/ui/hooks/kos-time/use-kos-time.d.ts +0 -6
- package/ui/hooks/kos-time/use-kos-time.d.ts.map +1 -1
- package/ui/hooks/network-interface-container/use-network-interface-container.d.ts +0 -6
- package/ui/hooks/network-interface-container/use-network-interface-container.d.ts.map +1 -1
- package/ui/hooks/ota/use-ota.d.ts +0 -6
- package/ui/hooks/ota/use-ota.d.ts.map +1 -1
- package/ui/hooks/software-info/use-software-info.d.ts +0 -6
- package/ui/hooks/software-info/use-software-info.d.ts.map +1 -1
- package/ui/hooks/state-bean/use-state-bean.d.ts +2 -2
- package/ui/hooks/state-bean/use-state-bean.d.ts.map +1 -1
- package/ui/hooks/state-bean/with-state-bean.d.ts.map +1 -1
- package/ui/hooks/storage-device-container/use-storage-device-container.d.ts +0 -6
- package/ui/hooks/storage-device-container/use-storage-device-container.d.ts.map +1 -1
- package/ui/hooks/translation-container/trans.d.ts +0 -6
- package/ui/hooks/translation-container/trans.d.ts.map +1 -1
- package/ui/hooks/translation-container/use-translation-container.d.ts +33 -10
- package/ui/hooks/translation-container/use-translation-container.d.ts.map +1 -1
- package/ui/hooks/translation-container/use-translation.d.ts +0 -7
- package/ui/hooks/translation-container/use-translation.d.ts.map +1 -1
- package/ui/hooks/translation-container/with-translation-container.d.ts +0 -6
- package/ui/hooks/translation-container/with-translation-container.d.ts.map +1 -1
- package/ui/hooks/usb-update-container/use-usb-update-container.d.ts +0 -6
- package/ui/hooks/usb-update-container/use-usb-update-container.d.ts.map +1 -1
- package/ui/hooks/use-config-bean.d.ts +0 -6
- package/ui/hooks/use-config-bean.d.ts.map +1 -1
- package/ui/hooks/use-config-property.d.ts +0 -6
- package/ui/hooks/use-config-property.d.ts.map +1 -1
- package/ui/hooks/use-kos-model.d.ts +0 -7
- package/ui/hooks/use-kos-model.d.ts.map +1 -1
- package/ui/hooks/use-kos-regions.d.ts.map +1 -1
- package/core/constants/model-constants.d.ts +0 -9
- package/core/constants/model-constants.d.ts.map +0 -1
- package/core/core/companion-instantiator.d.ts +0 -71
- package/core/core/companion-instantiator.d.ts.map +0 -1
- package/core/core/decorators/fsm-injection-utils.d.ts +0 -16
- package/core/core/decorators/fsm-injection-utils.d.ts.map +0 -1
- package/core/core/decorators/kos-container-aware.d.ts +0 -619
- package/core/core/decorators/kos-container-aware.d.ts.map +0 -1
- package/core/core/decorators/kos-execution-context.d.ts +0 -63
- package/core/core/decorators/kos-execution-context.d.ts.map +0 -1
- package/core/core/decorators/kos-future-aware.d.ts +0 -162
- package/core/core/decorators/kos-future-aware.d.ts.map +0 -1
- package/core/core/decorators/kos-logger-aware.d.ts +0 -105
- package/core/core/decorators/kos-logger-aware.d.ts.map +0 -1
- package/core/core/decorators/kos-multiple-future-aware.d.ts +0 -217
- package/core/core/decorators/kos-multiple-future-aware.d.ts.map +0 -1
- package/core/core/decorators/kos-service-request-helpers.d.ts +0 -60
- package/core/core/decorators/kos-service-request-helpers.d.ts.map +0 -1
- package/core/core/decorators/kos-service-request.d.ts +0 -498
- package/core/core/decorators/kos-service-request.d.ts.map +0 -1
- package/core/core/decorators/kos-state-machine.d.ts +0 -534
- package/core/core/decorators/kos-state-machine.d.ts.map +0 -1
- package/core/core/decorators/kos-trouble-aware.d.ts +0 -77
- package/core/core/decorators/kos-trouble-aware.d.ts.map +0 -1
- package/core/core/decorators/kos-view-model.d.ts +0 -176
- package/core/core/decorators/kos-view-model.d.ts.map +0 -1
- package/core/core/model/kos-service-request-manager.d.ts +0 -102
- package/core/core/model/kos-service-request-manager.d.ts.map +0 -1
- package/core/core/model/service-response-store.d.ts +0 -164
- package/core/core/model/service-response-store.d.ts.map +0 -1
- package/core/types/service-response-store.d.ts +0 -162
- package/core/types/service-response-store.d.ts.map +0 -1
- package/core/util/ancestor-path-visitor.d.ts +0 -60
- package/core/util/ancestor-path-visitor.d.ts.map +0 -1
- package/core/util/error-logger.d.ts +0 -16
- package/core/util/error-logger.d.ts.map +0 -1
- package/core/util/model-error-utils.d.ts +0 -61
- package/core/util/model-error-utils.d.ts.map +0 -1
- package/core/util/model-transition-utils.d.ts +0 -41
- package/core/util/model-transition-utils.d.ts.map +0 -1
- package/core/util/model-type-guards.d.ts +0 -26
- package/core/util/model-type-guards.d.ts.map +0 -1
- package/core/util/promise-utils.d.ts +0 -58
- package/core/util/promise-utils.d.ts.map +0 -1
- package/core/util/service-request-error.d.ts +0 -60
- package/core/util/service-request-error.d.ts.map +0 -1
- package/core/util/service-response.d.ts +0 -125
- package/core/util/service-response.d.ts.map +0 -1
- package/kos-models.json +0 -426
- package/models/models/config-bean/types/index.d.ts +0 -34
- package/models/models/gpio-chip/gpio-chip-container-model.d.ts +0 -25
- package/models/models/gpio-chip/gpio-chip-container-model.d.ts.map +0 -1
- package/models/models/gpio-chip/gpio-chip-model.d.ts +0 -30
- package/models/models/gpio-chip/gpio-chip-model.d.ts.map +0 -1
- package/models/models/gpio-chip/index.d.ts +0 -7
- package/models/models/gpio-chip/index.d.ts.map +0 -1
- package/models/models/gpio-chip/services/gpio-chip-services.d.ts +0 -86
- package/models/models/gpio-chip/services/gpio-chip-services.d.ts.map +0 -1
- package/models/models/gpio-chip/services/index.d.ts +0 -2
- package/models/models/gpio-chip/services/index.d.ts.map +0 -1
- package/models/models/gpio-chip/types/index.d.ts +0 -24
- package/models/models/gpio-pin/gpio-pin-container-model.d.ts +0 -23
- package/models/models/gpio-pin/gpio-pin-container-model.d.ts.map +0 -1
- package/models/models/gpio-pin/gpio-pin-model.d.ts +0 -26
- package/models/models/gpio-pin/gpio-pin-model.d.ts.map +0 -1
- package/models/models/gpio-pin/index.d.ts +0 -6
- package/models/models/gpio-pin/index.d.ts.map +0 -1
- package/models/models/gpio-pin/types/index.d.ts +0 -23
- package/models/models/kos-expression-evaluator/index.d.ts +0 -4
- package/models/models/kos-expression-evaluator/index.d.ts.map +0 -1
- package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts +0 -209
- package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts.map +0 -1
- package/models/models/kos-expression-evaluator/services/index.d.ts +0 -6
- package/models/models/kos-expression-evaluator/services/index.d.ts.map +0 -1
- package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts +0 -15
- package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts.map +0 -1
- package/models/models/kos-expression-evaluator/types/index.d.ts +0 -6
- package/models/utils/get-kos-connection-id.d.ts +0 -2
- package/models/utils/get-kos-connection-id.d.ts.map +0 -1
- package/models/utils/openapi-index.d.ts +0 -3
- package/models/utils/openapi-index.d.ts.map +0 -1
- package/models/utils/service-accessor.d.ts +0 -86
- package/models/utils/service-accessor.d.ts.map +0 -1
- package/models/utils/services/kos/1.6.5/openapi.d.ts +0 -3809
- package/models/utils/services/kos/1.6.5/service.d.ts +0 -124
- package/models/utils/services/kos/1.6.5/service.d.ts.map +0 -1
- package/models/utils/services/kos/1.8.1/openapi.d.ts +0 -4344
- package/models/utils/services/kos/1.8.1/service.d.ts +0 -124
- package/models/utils/services/kos/1.8.1/service.d.ts.map +0 -1
- package/models/utils/services/kos/1.9.x/openapi.d.ts +0 -4597
- package/models/utils/services/kos/1.9.x/service.d.ts +0 -124
- package/models/utils/services/kos/1.9.x/service.d.ts.map +0 -1
- package/models/utils/services/kos/daily/openapi.d.ts +0 -4349
- package/models/utils/services/kos/daily/service.d.ts +0 -124
- package/models/utils/services/kos/daily/service.d.ts.map +0 -1
- package/models/utils/services/vfs/1.6.5/openapi.d.ts +0 -51
- package/models/utils/services/vfs/1.6.5/service.d.ts +0 -124
- package/models/utils/services/vfs/1.6.5/service.d.ts.map +0 -1
- package/models/utils/services/vfs/1.8.1/openapi.d.ts +0 -51
- package/models/utils/services/vfs/1.8.1/service.d.ts +0 -124
- package/models/utils/services/vfs/1.8.1/service.d.ts.map +0 -1
- package/models/utils/services/vfs/1.9.x/openapi.d.ts +0 -51
- package/models/utils/services/vfs/1.9.x/service.d.ts +0 -124
- package/models/utils/services/vfs/1.9.x/service.d.ts.map +0 -1
- package/models/utils/services/vfs/daily/openapi.d.ts +0 -51
- package/models/utils/services/vfs/daily/service.d.ts +0 -124
- package/models/utils/services/vfs/daily/service.d.ts.map +0 -1
- package/models/utils/services-index.d.ts +0 -9
- package/models/utils/services-index.d.ts.map +0 -1
- package/ui/hooks/view-model/index.d.ts +0 -2
- package/ui/hooks/view-model/index.d.ts.map +0 -1
- package/ui/hooks/view-model/use-view-model.d.ts +0 -80
- package/ui/hooks/view-model/use-view-model.d.ts.map +0 -1
|
@@ -5,147 +5,13 @@ import { KosContext, KosParentAware } from '../../../../core';
|
|
|
5
5
|
|
|
6
6
|
// --------------- Translation ---------------
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
* Configuration options for Translation model instances.
|
|
10
|
-
*
|
|
11
|
-
* This interface defines the complete configuration structure for individual translation
|
|
12
|
-
* namespace models, including locale settings, resolution strategies, and custom loading
|
|
13
|
-
* mechanisms. Translation models handle the actual key resolution and interpolation for
|
|
14
|
-
* specific functional areas within KOS applications.
|
|
15
|
-
*
|
|
16
|
-
* @example Basic Translation Configuration
|
|
17
|
-
* ```typescript
|
|
18
|
-
* // Device status translations with English fallback
|
|
19
|
-
* const statusOptions: TranslationOptions = {
|
|
20
|
-
* namespace: 'device-status',
|
|
21
|
-
* currentLocale: 'es',
|
|
22
|
-
* defaultLocale: 'en',
|
|
23
|
-
* descriptor: {
|
|
24
|
-
* 'es': {
|
|
25
|
-
* fallbacks: ['en']
|
|
26
|
-
* },
|
|
27
|
-
* 'en': {
|
|
28
|
-
* fallbacks: []
|
|
29
|
-
* }
|
|
30
|
-
* },
|
|
31
|
-
* kosParentId: 'translation-container'
|
|
32
|
-
* };
|
|
33
|
-
*
|
|
34
|
-
* const statusTranslation = Translation.instance('status-translations')
|
|
35
|
-
* .options(statusOptions)
|
|
36
|
-
* .build();
|
|
37
|
-
* ```
|
|
38
|
-
*
|
|
39
|
-
* @example Custom Bundle Resolution
|
|
40
|
-
* ```typescript
|
|
41
|
-
* // API-based translation loading
|
|
42
|
-
* const apiBundleResolver = async (
|
|
43
|
-
* namespace: string,
|
|
44
|
-
* locale: string,
|
|
45
|
-
* context?: KosContext
|
|
46
|
-
* ): Promise<TranslationResponse> => {
|
|
47
|
-
* const response = await fetch(`/api/translations/${namespace}/${locale}`);
|
|
48
|
-
* return await response.json();
|
|
49
|
-
* };
|
|
50
|
-
*
|
|
51
|
-
* const apiOptions: TranslationOptions = {
|
|
52
|
-
* namespace: 'alerts',
|
|
53
|
-
* currentLocale: 'fr',
|
|
54
|
-
* defaultLocale: 'en',
|
|
55
|
-
* descriptor: {
|
|
56
|
-
* 'fr': { fallbacks: ['en'] },
|
|
57
|
-
* 'en': { fallbacks: [] }
|
|
58
|
-
* },
|
|
59
|
-
* bundleResolver: apiBundleResolver,
|
|
60
|
-
* kosParentId: 'translation-container'
|
|
61
|
-
* };
|
|
62
|
-
* ```
|
|
63
|
-
*
|
|
64
|
-
* @example Multi-Regional Configuration
|
|
65
|
-
* ```typescript
|
|
66
|
-
* // Complex fallback chains for regional variations
|
|
67
|
-
* const regionalOptions: TranslationOptions = {
|
|
68
|
-
* namespace: 'regional-ui',
|
|
69
|
-
* currentLocale: 'pt-BR',
|
|
70
|
-
* defaultLocale: 'en',
|
|
71
|
-
* descriptor: {
|
|
72
|
-
* 'pt-BR': { fallbacks: ['pt', 'es', 'en'] },
|
|
73
|
-
* 'pt-PT': { fallbacks: ['pt', 'es', 'en'] },
|
|
74
|
-
* 'pt': { fallbacks: ['es', 'en'] },
|
|
75
|
-
* 'es': { fallbacks: ['en'] },
|
|
76
|
-
* 'en': { fallbacks: [] }
|
|
77
|
-
* },
|
|
78
|
-
* kosParentId: 'translation-container'
|
|
79
|
-
* };
|
|
80
|
-
* ```
|
|
81
|
-
*
|
|
82
|
-
* @kosService core.translation
|
|
83
|
-
* @group KOS Model
|
|
84
|
-
* @category i18n
|
|
85
|
-
*/
|
|
86
8
|
export interface TranslationOptions extends KosParentAware {
|
|
87
|
-
/**
|
|
88
|
-
* Translation namespace identifier, typically corresponding to a feature area.
|
|
89
|
-
* Used to organize translations by functional domain and prevent key conflicts.
|
|
90
|
-
*
|
|
91
|
-
* @example "device-status"
|
|
92
|
-
* @example "user-settings"
|
|
93
|
-
* @example "maintenance-scheduler"
|
|
94
|
-
*/
|
|
95
9
|
namespace: string;
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Current active locale for this translation model.
|
|
99
|
-
* Determines which language variant to load and display.
|
|
100
|
-
*
|
|
101
|
-
* @example "en" - English
|
|
102
|
-
* @example "es" - Spanish
|
|
103
|
-
* @example "pt-BR" - Brazilian Portuguese
|
|
104
|
-
*/
|
|
105
10
|
currentLocale: string;
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Default fallback locale when translations are missing in the current locale.
|
|
109
|
-
* Typically set to the primary application language.
|
|
110
|
-
*
|
|
111
|
-
* @default "en"
|
|
112
|
-
*/
|
|
113
11
|
defaultLocale: string;
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Optional base URL for translation file loading.
|
|
117
|
-
* Used with default file-based resolution strategy.
|
|
118
|
-
*
|
|
119
|
-
* @example "/assets/locales"
|
|
120
|
-
* @example "https://cdn.example.com/translations"
|
|
121
|
-
*/
|
|
122
12
|
rootUrl?: string;
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Locale descriptors defining fallback chains and configuration for each locale.
|
|
126
|
-
* Maps locale codes to their fallback hierarchy and metadata.
|
|
127
|
-
*/
|
|
128
13
|
descriptor: Record<string, LocaleDescriptor>;
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Optional custom path resolver for translation file loading.
|
|
132
|
-
* Overrides default path construction logic.
|
|
133
|
-
*
|
|
134
|
-
* @param namespace - Target translation namespace
|
|
135
|
-
* @param locale - Target locale code
|
|
136
|
-
* @returns Full path to translation resource
|
|
137
|
-
*/
|
|
138
14
|
resolver?: (namespace: string, locale: string) => string;
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Optional custom bundle resolver for advanced translation loading strategies.
|
|
142
|
-
* Enables loading from APIs, device storage, or custom sources.
|
|
143
|
-
*
|
|
144
|
-
* @param namespace - Target translation namespace
|
|
145
|
-
* @param locale - Target locale code
|
|
146
|
-
* @param context - KOS context for accessing shared data
|
|
147
|
-
* @returns Promise resolving to translation data
|
|
148
|
-
*/
|
|
149
15
|
bundleResolver?: (
|
|
150
16
|
namespace: string,
|
|
151
17
|
locale: string,
|
|
@@ -154,160 +20,12 @@ export interface TranslationOptions extends KosParentAware {
|
|
|
154
20
|
}
|
|
155
21
|
|
|
156
22
|
// --------------- TranslationContainer ---------------
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Configuration options for TranslationContainer model instances.
|
|
160
|
-
*
|
|
161
|
-
* This interface defines the configuration structure for translation container models,
|
|
162
|
-
* which manage multiple translation namespaces and coordinate global locale switching.
|
|
163
|
-
* Containers serve as the central orchestration point for internationalization in KOS
|
|
164
|
-
* applications.
|
|
165
|
-
*
|
|
166
|
-
* @example Basic Container Configuration
|
|
167
|
-
* ```typescript
|
|
168
|
-
* // Multi-namespace application translations
|
|
169
|
-
* const containerOptions: TranslationContainerOptions = {
|
|
170
|
-
* lang: 'es',
|
|
171
|
-
* defaultNamespace: 'common',
|
|
172
|
-
* descriptor: {
|
|
173
|
-
* namespaces: {
|
|
174
|
-
* 'common': {
|
|
175
|
-
* basePath: '/assets/locales',
|
|
176
|
-
* locales: {
|
|
177
|
-
* 'en': { file: 'en/common.json', defaultLocale: 'en' },
|
|
178
|
-
* 'es': { file: 'es/common.json', defaultLocale: 'en' },
|
|
179
|
-
* 'fr': { file: 'fr/common.json', defaultLocale: 'en' }
|
|
180
|
-
* }
|
|
181
|
-
* },
|
|
182
|
-
* 'dashboard': {
|
|
183
|
-
* basePath: '/assets/locales',
|
|
184
|
-
* locales: {
|
|
185
|
-
* 'en': { file: 'en/dashboard.json', defaultLocale: 'en' },
|
|
186
|
-
* 'es': { file: 'es/dashboard.json', defaultLocale: 'en' },
|
|
187
|
-
* 'fr': { file: 'fr/dashboard.json', defaultLocale: 'en' }
|
|
188
|
-
* }
|
|
189
|
-
* }
|
|
190
|
-
* }
|
|
191
|
-
* }
|
|
192
|
-
* };
|
|
193
|
-
*
|
|
194
|
-
* const appTranslations = TranslationContainer.instance('app-i18n')
|
|
195
|
-
* .options(containerOptions)
|
|
196
|
-
* .build();
|
|
197
|
-
* ```
|
|
198
|
-
*
|
|
199
|
-
* @example CDN-Based Translation Loading
|
|
200
|
-
* ```typescript
|
|
201
|
-
* // Custom resolver for CDN-hosted translations
|
|
202
|
-
* const cdnResolver = function(
|
|
203
|
-
* namespace: string,
|
|
204
|
-
* locale: string
|
|
205
|
-
* ): string {
|
|
206
|
-
* return `https://cdn.example.com/translations/${namespace}/${locale}.json`;
|
|
207
|
-
* };
|
|
208
|
-
*
|
|
209
|
-
* const cdnOptions: TranslationContainerOptions = {
|
|
210
|
-
* lang: 'ja',
|
|
211
|
-
* resolver: cdnResolver,
|
|
212
|
-
* descriptor: {
|
|
213
|
-
* namespaces: {
|
|
214
|
-
* 'device-control': {
|
|
215
|
-
* basePath: '', // Ignored with custom resolver
|
|
216
|
-
* locales: {
|
|
217
|
-
* 'ja': { file: '', defaultLocale: 'en' },
|
|
218
|
-
* 'en': { file: '', defaultLocale: 'en' }
|
|
219
|
-
* }
|
|
220
|
-
* }
|
|
221
|
-
* }
|
|
222
|
-
* }
|
|
223
|
-
* };
|
|
224
|
-
* ```
|
|
225
|
-
*
|
|
226
|
-
* @example Development Environment Setup
|
|
227
|
-
* ```typescript
|
|
228
|
-
* // Hot-reload friendly configuration for development
|
|
229
|
-
* const devOptions: TranslationContainerOptions = {
|
|
230
|
-
* lang: 'en',
|
|
231
|
-
* rootUrl: '/dev-translations',
|
|
232
|
-
* descriptor: {
|
|
233
|
-
* namespaces: {
|
|
234
|
-
* 'ui': {
|
|
235
|
-
* basePath: '/ui-translations',
|
|
236
|
-
* locales: {
|
|
237
|
-
* 'en': { file: 'en/ui.json', defaultLocale: 'en' },
|
|
238
|
-
* 'es': { file: 'es/ui.json', defaultLocale: 'en' }
|
|
239
|
-
* }
|
|
240
|
-
* },
|
|
241
|
-
* 'forms': {
|
|
242
|
-
* basePath: '/form-translations',
|
|
243
|
-
* locales: {
|
|
244
|
-
* 'en': { file: 'en/forms.json', defaultLocale: 'en' },
|
|
245
|
-
* 'es': { file: 'es/forms.json', defaultLocale: 'en' }
|
|
246
|
-
* }
|
|
247
|
-
* }
|
|
248
|
-
* }
|
|
249
|
-
* }
|
|
250
|
-
* };
|
|
251
|
-
* ```
|
|
252
|
-
*
|
|
253
|
-
* @kosService core.translation
|
|
254
|
-
* @group KOS Model
|
|
255
|
-
* @category i18n
|
|
256
|
-
*/
|
|
257
23
|
export interface TranslationContainerOptions {
|
|
258
|
-
/**
|
|
259
|
-
* Current application-wide locale setting.
|
|
260
|
-
* Applied to all child translation models when they are created or updated.
|
|
261
|
-
*
|
|
262
|
-
* @example "en" - English
|
|
263
|
-
* @example "es" - Spanish
|
|
264
|
-
* @example "pt-BR" - Brazilian Portuguese
|
|
265
|
-
*/
|
|
266
24
|
lang: string;
|
|
267
|
-
|
|
268
|
-
/**
|
|
269
|
-
* Comprehensive locale and namespace descriptor defining the complete
|
|
270
|
-
* translation structure for the application.
|
|
271
|
-
*/
|
|
272
25
|
descriptor: Localization;
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* Optional default namespace for application-wide common translations.
|
|
276
|
-
* When specified, provides easy access to shared UI elements and messages.
|
|
277
|
-
*
|
|
278
|
-
* @example "common"
|
|
279
|
-
* @example "shared"
|
|
280
|
-
* @example "ui-elements"
|
|
281
|
-
*/
|
|
282
26
|
defaultNamespace?: string;
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* Optional base URL for all translation file loading.
|
|
286
|
-
* Applied as prefix to all translation resource paths.
|
|
287
|
-
*
|
|
288
|
-
* @example "/assets/locales"
|
|
289
|
-
* @example "https://cdn.example.com/app-translations"
|
|
290
|
-
* @example "/tenant-specific/translations"
|
|
291
|
-
*/
|
|
292
27
|
rootUrl?: string;
|
|
293
|
-
|
|
294
|
-
/**
|
|
295
|
-
* Optional URL for loading translation descriptor dynamically.
|
|
296
|
-
* Enables runtime configuration of translation structure.
|
|
297
|
-
*
|
|
298
|
-
* @example "/api/translations/descriptor"
|
|
299
|
-
* @example "https://config.example.com/translation-manifest.json"
|
|
300
|
-
*/
|
|
301
28
|
descriptorUrl?: string;
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* Optional custom resolver for translation file path construction.
|
|
305
|
-
* Overrides default path resolution logic for all namespaces.
|
|
306
|
-
*
|
|
307
|
-
* @param namespace - Target translation namespace
|
|
308
|
-
* @param locale - Target locale code
|
|
309
|
-
* @returns Full path to translation resource
|
|
310
|
-
*/
|
|
311
29
|
resolver?: (
|
|
312
30
|
this: TranslationContainerModel,
|
|
313
31
|
namespace: string,
|
|
@@ -315,67 +33,6 @@ export interface TranslationContainerOptions {
|
|
|
315
33
|
) => string;
|
|
316
34
|
}
|
|
317
35
|
|
|
318
|
-
/**
|
|
319
|
-
* Type definitions for variable interpolation in translation keys.
|
|
320
|
-
*
|
|
321
|
-
* Translation models support sophisticated variable substitution patterns
|
|
322
|
-
* for dynamic content in internationalized applications.
|
|
323
|
-
*
|
|
324
|
-
* @kosService core.translation
|
|
325
|
-
* @group KOS Model
|
|
326
|
-
* @category Internationalization
|
|
327
|
-
*/
|
|
328
|
-
export type ResolveTranslationOptions<T = string> =
|
|
329
|
-
| {
|
|
330
|
-
/**
|
|
331
|
-
* Context variables for template-based interpolation using {{variable}} syntax.
|
|
332
|
-
*
|
|
333
|
-
* @example
|
|
334
|
-
* ```typescript
|
|
335
|
-
* t('welcome.message', {
|
|
336
|
-
* context: { username: 'John', unreadCount: 5 }
|
|
337
|
-
* })
|
|
338
|
-
* // "Welcome {{username}}, you have {{unreadCount}} messages"
|
|
339
|
-
* // Result: "Welcome John, you have 5 messages"
|
|
340
|
-
* ```
|
|
341
|
-
*/
|
|
342
|
-
context?: Record<string, any>;
|
|
343
|
-
|
|
344
|
-
/**
|
|
345
|
-
* Data variables for macro-based interpolation using __variable__ syntax.
|
|
346
|
-
*
|
|
347
|
-
* @example
|
|
348
|
-
* ```typescript
|
|
349
|
-
* t('system.info', {
|
|
350
|
-
* data: { version: '2.1.0', platform: 'Linux' }
|
|
351
|
-
* })
|
|
352
|
-
* // "System __version__ running on __platform__"
|
|
353
|
-
* // Result: "System 2.1.0 running on Linux"
|
|
354
|
-
* ```
|
|
355
|
-
*/
|
|
356
|
-
data?: Record<string, any>;
|
|
357
|
-
|
|
358
|
-
/**
|
|
359
|
-
* Contextual modifier for conditional key resolution.
|
|
360
|
-
* Enables different translations based on application state.
|
|
361
|
-
*
|
|
362
|
-
* @example
|
|
363
|
-
* ```typescript
|
|
364
|
-
* // Translation file: { "title": "Create", "title_edit": "Update" }
|
|
365
|
-
* t('title', { context: 'edit' })
|
|
366
|
-
* // Resolves to "title_edit" key, returns "Update"
|
|
367
|
-
* ```
|
|
368
|
-
*/
|
|
369
|
-
context?: string;
|
|
370
|
-
|
|
371
|
-
/**
|
|
372
|
-
* Fallback value when translation key is not found.
|
|
373
|
-
* Ensures graceful degradation for missing translations.
|
|
374
|
-
*/
|
|
375
|
-
defaultValue?: T;
|
|
376
|
-
}
|
|
377
|
-
| string;
|
|
378
|
-
|
|
379
36
|
declare global {
|
|
380
37
|
interface AbstractModelFactory {
|
|
381
38
|
createTranslation: (id: string, options: TranslationOptions) => Translation;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as TroubleServices from "./services";
|
|
2
2
|
export { Trouble } from './trouble-registration';
|
|
3
|
-
export type {
|
|
4
|
-
export type { TroubleResponse } from './services';
|
|
3
|
+
export type { DeferAware, ResolveAware, TroubleAware, TroubleModel, TroubleOptions, } from './types';
|
|
5
4
|
export * from './utils/is-trouble-aware';
|
|
6
5
|
export { EXTENSION_TROUBLE_DATA_MAPPER } from './utils/trouble-data-extension';
|
|
7
6
|
export { EXTENSION_TROUBLE_MAPPER } from './utils/trouble-extension';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/trouble/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,YAAY,CAAC;AAE9C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,YAAY,EACV,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/trouble/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,YAAY,CAAC;AAE9C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,YAAY,EACV,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,cAAc,GACf,MAAM,SAAS,CAAC;AACjB,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FutureResponse } from '../../../services/future';
|
|
2
2
|
import { KosServiceResponse } from '../../../../core';
|
|
3
3
|
|
|
4
|
-
export interface TroubleResponse
|
|
4
|
+
export interface TroubleResponse {
|
|
5
5
|
reason: string;
|
|
6
6
|
createTime: string;
|
|
7
7
|
resolvable: boolean;
|
|
@@ -11,15 +11,13 @@ export interface TroubleResponse<ClientAttributes = any> {
|
|
|
11
11
|
type: string;
|
|
12
12
|
tags: string[];
|
|
13
13
|
info: any;
|
|
14
|
-
attrs: ClientAttributes;
|
|
15
14
|
}
|
|
16
|
-
export declare const getKosConnectionId: () => string | undefined;
|
|
17
15
|
/**
|
|
18
16
|
* @category Service
|
|
19
17
|
* @internal
|
|
20
18
|
* Retrieves the initial Trouble data.
|
|
21
19
|
*/
|
|
22
|
-
export declare const getTroubles: (
|
|
23
|
-
export declare const resolveTrouble: (troubleId: string,
|
|
24
|
-
export declare const bulkResolveTroubles: (troubleIds: string[],
|
|
20
|
+
export declare const getTroubles: () => Promise<KosServiceResponse<TroubleResponse[]> | undefined>;
|
|
21
|
+
export declare const resolveTrouble: (troubleId: string, tracker?: string) => Promise<FutureResponse>;
|
|
22
|
+
export declare const bulkResolveTroubles: (troubleIds: string[], tracker?: string) => Promise<FutureResponse>;
|
|
25
23
|
//# sourceMappingURL=trouble-services.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trouble-services.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/trouble/services/trouble-services.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"trouble-services.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/trouble/services/trouble-services.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,kBAAkB,EAGnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAkB,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAO1E,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,GAAG,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,GAAG,CAAC;CACX;AACD;;;;GAIG;AACH,eAAO,MAAM,WAAW,kEAGvB,CAAC;AAEF,eAAO,MAAM,cAAc,cAAqB,MAAM,YAAY,MAAM,4BAqBvE,CAAC;AAEF,eAAO,MAAM,mBAAmB,eAClB,MAAM,EAAE,YACV,MAAM,4BAuBjB,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DeferAware, TroubleModel, TroubleOptions } from './types';
|
|
2
|
-
import { TroubleResponse } from './services';
|
|
3
2
|
import { FutureAwareContainer } from '../future/future-types';
|
|
4
3
|
import { IKosModelLogger, KosContextLogger, KosCreationContext } from '../../../core';
|
|
5
4
|
|
|
@@ -19,12 +18,10 @@ export declare class TroubleModelImpl<AdditionalData extends object = any> imple
|
|
|
19
18
|
tags: string[];
|
|
20
19
|
data: AdditionalData;
|
|
21
20
|
rank: number;
|
|
22
|
-
servicePath: string;
|
|
23
21
|
group?: string;
|
|
24
22
|
createTime?: string;
|
|
25
|
-
rawJson?: TroubleResponse<any>;
|
|
26
23
|
private _mapped;
|
|
27
|
-
constructor(modelId: string, { resolvable, tags, info, id, clientData, rank, ifaces, type, group, createTime, role, color,
|
|
24
|
+
constructor(modelId: string, { resolvable, tags, info, id, clientData, rank, ifaces, type, group, createTime, role, color, ...rest }: TroubleOptions, context: KosCreationContext);
|
|
28
25
|
getTitleWithContext(context: string): string;
|
|
29
26
|
getSubtitleWithContext(context: string): string;
|
|
30
27
|
get rawId(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trouble-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/trouble/trouble-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACxB,MAAM,eAAe,CAAC;AAGvB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"trouble-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/trouble/trouble-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACxB,MAAM,eAAe,CAAC;AAGvB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAInE,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAExE,eAAO,MAAM,UAAU,kBAAkB,CAAC;AAM1C,qBACa,gBAAgB,CAAC,cAAc,SAAS,MAAM,GAAG,GAAG,CAC/D,YAAW,YAAY,CAAC,cAAc,CAAC,EAAE,eAAe;IAExD,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,gBAAgB,CAAC;IACzB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,WAAW,CAAU;IAE7B,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,oBAAoB,CAAC;IACpC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,cAAc,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,OAAO,CAAwB;gBAErC,OAAO,EAAE,MAAM,EACf,EACE,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,EAAE,EACF,UAAU,EACV,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,UAAU,EACV,IAAI,EACJ,KAAK,EACL,GAAG,IAAI,EACR,EAAE,cAAc,EACjB,OAAO,EAAE,kBAAkB;IAyB7B,mBAAmB,CAAC,OAAO,EAAE,MAAM;IAWnC,sBAAsB,CAAC,OAAO,EAAE,MAAM;IAWtC,IAAI,KAAK,WAER;IACD,IAAI,KAAK,WAER;IAED,IAAI,QAAQ,WAEX;IAED,IAAI,SAAS,WAEZ;IAED,IAAI,UAAU,YAEb;IAED,IAAI,MAAM,uFAET;IAEK,iBAAiB;IAIvB,IAAI,iBAAiB,qEAMpB;IACD,IAAI,QAAQ,YAKX;IACD,IAAI,WAAW,IAAI,OAAO,CAMzB;IAED,UAAU;IAGV,KAAK;IAIL,WAAW;IAML,OAAO,CAAC,OAAO,CAAC,EAAE,MAAM;CAc/B"}
|
|
@@ -28,9 +28,8 @@ import { IKosDataModel } from '../../../core';
|
|
|
28
28
|
* };
|
|
29
29
|
* ```
|
|
30
30
|
*
|
|
31
|
-
* @
|
|
32
|
-
* @
|
|
33
|
-
* @category Types
|
|
31
|
+
* @category Trouble Management
|
|
32
|
+
* @subcategory Types
|
|
34
33
|
*/
|
|
35
34
|
export interface TroubleOptions<AdditionalData extends object = any> {
|
|
36
35
|
/** Whether this trouble can be resolved through user action */
|
|
@@ -59,10 +58,6 @@ export interface TroubleOptions<AdditionalData extends object = any> {
|
|
|
59
58
|
info: unknown;
|
|
60
59
|
/** Optional grouping identifier for related troubles */
|
|
61
60
|
group?: string;
|
|
62
|
-
/** Service path for the trouble instance */
|
|
63
|
-
servicePath?: string;
|
|
64
|
-
/** Raw JSON data for the trouble instance */
|
|
65
|
-
rawJson?: TroubleResponse<any>;
|
|
66
61
|
/** Index signature for additional domain-specific data */
|
|
67
62
|
[key: keyof AdditionalData]: AdditionalData[key];
|
|
68
63
|
}
|
|
@@ -85,24 +80,96 @@ export interface TroubleOptions<AdditionalData extends object = any> {
|
|
|
85
80
|
*
|
|
86
81
|
* @template AdditionalData - Type parameter for domain-specific trouble data
|
|
87
82
|
*
|
|
88
|
-
* @
|
|
89
|
-
* @example Basic Usage
|
|
83
|
+
* @example
|
|
90
84
|
* ```typescript
|
|
85
|
+
* // Check trouble severity
|
|
91
86
|
* function handleTrouble(trouble: TroubleModel) {
|
|
92
87
|
* if (trouble.rank >= 8) {
|
|
93
88
|
* console.error(`Critical trouble: ${trouble.reason}`);
|
|
89
|
+
* notifyOperator(trouble);
|
|
90
|
+
* } else if (trouble.rank >= 5) {
|
|
91
|
+
* console.warn(`Warning: ${trouble.reason}`);
|
|
92
|
+
* }
|
|
93
|
+
*
|
|
94
|
+
* // Check if user can resolve
|
|
95
|
+
* if (trouble.resolvable && hasRole(trouble.role)) {
|
|
96
|
+
* showResolveButton(trouble);
|
|
97
|
+
* }
|
|
98
|
+
* }
|
|
99
|
+
* ```
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```typescript
|
|
103
|
+
* // Resolve a trouble with proper future handling
|
|
104
|
+
* async function resolveTrouble(trouble: TroubleModel) {
|
|
105
|
+
* if (!trouble.resolvable) {
|
|
106
|
+
* throw new Error('Trouble is not resolvable');
|
|
94
107
|
* }
|
|
95
108
|
*
|
|
96
|
-
*
|
|
109
|
+
* try {
|
|
110
|
+
* // Resolution returns a FutureResponse with future tracking
|
|
97
111
|
* const futureResponse = await trouble.resolve();
|
|
112
|
+
* if (futureResponse) {
|
|
113
|
+
* console.log(`Resolution started, future ID: ${futureResponse.id}`);
|
|
114
|
+
*
|
|
115
|
+
* // The trouble's future property will be updated with the resolution future
|
|
116
|
+
* // You can track progress through the future model
|
|
117
|
+
* if (trouble.future) {
|
|
118
|
+
* const endState = await trouble.future.waitForCompletion();
|
|
119
|
+
* if (endState === 'COMPLETED') {
|
|
120
|
+
* console.log('Trouble resolved successfully');
|
|
121
|
+
* } else if (endState === 'FAILED') {
|
|
122
|
+
* console.error('Resolution failed');
|
|
123
|
+
* }
|
|
124
|
+
* }
|
|
125
|
+
* }
|
|
126
|
+
* } catch (error) {
|
|
127
|
+
* console.error('Failed to initiate resolution:', error);
|
|
128
|
+
* }
|
|
129
|
+
* }
|
|
130
|
+
* ```
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* ```typescript
|
|
134
|
+
* // Using cancellable promise utilities with trouble resolution
|
|
135
|
+
* import { createCancellablePromise } from '@kosdev-code/kos-ui-sdk';
|
|
136
|
+
*
|
|
137
|
+
* async function resolveTroubleWithCancel(trouble: TroubleModel) {
|
|
138
|
+
* const futureResponse = await trouble.resolve();
|
|
139
|
+
*
|
|
140
|
+
* if (futureResponse && trouble.future) {
|
|
141
|
+
* // Create a cancellable promise for the resolution
|
|
142
|
+
* const cancellableResolve = createCancellablePromise(
|
|
143
|
+
* trouble.future.waitForCompletion(),
|
|
144
|
+
* undefined,
|
|
145
|
+
* () => trouble.future?.cancelFuture(),
|
|
146
|
+
* trouble.future
|
|
147
|
+
* );
|
|
148
|
+
*
|
|
149
|
+
* // Subscribe to progress updates
|
|
150
|
+
* const unsubscribe = cancellableResolve.onProgressUpdate((progress, status) => {
|
|
151
|
+
* console.log(`Resolution progress: ${(progress * 100).toFixed(0)}% - ${status}`);
|
|
152
|
+
* });
|
|
153
|
+
*
|
|
154
|
+
* try {
|
|
155
|
+
* const endState = await cancellableResolve;
|
|
156
|
+
* console.log(`Resolution completed with state: ${endState}`);
|
|
157
|
+
* } catch (error) {
|
|
158
|
+
* if (cancellableResolve.isCancelled()) {
|
|
159
|
+
* console.log('Resolution was cancelled');
|
|
160
|
+
* } else {
|
|
161
|
+
* console.error('Resolution failed:', error);
|
|
162
|
+
* }
|
|
163
|
+
* } finally {
|
|
164
|
+
* unsubscribe();
|
|
165
|
+
* }
|
|
98
166
|
* }
|
|
99
167
|
* }
|
|
100
168
|
* ```
|
|
101
169
|
*
|
|
102
|
-
*
|
|
103
|
-
* @
|
|
104
|
-
* @
|
|
105
|
-
* @category Trouble Management
|
|
170
|
+
*
|
|
171
|
+
* @category KOS Model
|
|
172
|
+
* @subcategory Trouble Management
|
|
106
173
|
*
|
|
107
174
|
* @see {@link TroubleAware} - Interface for models that can have troubles
|
|
108
175
|
* @see {@link DeferAware} - Deferral capabilities
|
|
@@ -134,8 +201,6 @@ export interface TroubleModel<AdditionalData extends object = any>
|
|
|
134
201
|
info: unknown;
|
|
135
202
|
/** Original trouble ID before any transformations */
|
|
136
203
|
rawId: string;
|
|
137
|
-
/** Full response data object */
|
|
138
|
-
rawJson?: TroubleResponse<any>;
|
|
139
204
|
/** Resolves the trouble, returning a promise with the resolution response */
|
|
140
205
|
resolve: () => Promise<FutureResponse | undefined>;
|
|
141
206
|
/** Domain-specific additional data attached to the trouble */
|
|
@@ -155,9 +220,8 @@ export interface TroubleModel<AdditionalData extends object = any>
|
|
|
155
220
|
/**
|
|
156
221
|
* Domain-specific trouble data for handle-related issues.
|
|
157
222
|
*
|
|
158
|
-
* @
|
|
159
|
-
* @
|
|
160
|
-
* @category Domain Data
|
|
223
|
+
* @category Trouble Management
|
|
224
|
+
* @subcategory Domain Data
|
|
161
225
|
*/
|
|
162
226
|
export interface HandleTroubleData {
|
|
163
227
|
/** Path to the affected handle component */
|
|
@@ -167,9 +231,8 @@ export interface HandleTroubleData {
|
|
|
167
231
|
/**
|
|
168
232
|
* Domain-specific trouble data for nozzle-related issues.
|
|
169
233
|
*
|
|
170
|
-
* @
|
|
171
|
-
* @
|
|
172
|
-
* @category Domain Data
|
|
234
|
+
* @category Trouble Management
|
|
235
|
+
* @subcategory Domain Data
|
|
173
236
|
*/
|
|
174
237
|
export interface NozzleTroubleData {
|
|
175
238
|
/** Path to the affected nozzle component */
|
|
@@ -179,9 +242,8 @@ export interface NozzleTroubleData {
|
|
|
179
242
|
/**
|
|
180
243
|
* Domain-specific trouble data for container-related issues.
|
|
181
244
|
*
|
|
182
|
-
* @
|
|
183
|
-
* @
|
|
184
|
-
* @category Domain Data
|
|
245
|
+
* @category Trouble Management
|
|
246
|
+
* @subcategory Domain Data
|
|
185
247
|
*/
|
|
186
248
|
export interface ContainerTroubleData {
|
|
187
249
|
/** Identifier of the affected container */
|
|
@@ -208,9 +270,8 @@ export interface ContainerTroubleData {
|
|
|
208
270
|
* }
|
|
209
271
|
* ```
|
|
210
272
|
*
|
|
211
|
-
* @
|
|
212
|
-
* @
|
|
213
|
-
* @category Capabilities
|
|
273
|
+
* @category Trouble Management
|
|
274
|
+
* @subcategory Capabilities
|
|
214
275
|
*/
|
|
215
276
|
export interface ResolveAware {
|
|
216
277
|
/**
|
|
@@ -253,9 +314,8 @@ export interface ResolveAware {
|
|
|
253
314
|
* }
|
|
254
315
|
* ```
|
|
255
316
|
*
|
|
256
|
-
* @
|
|
257
|
-
* @
|
|
258
|
-
* @category Capabilities
|
|
317
|
+
* @category Trouble Management
|
|
318
|
+
* @subcategory Capabilities
|
|
259
319
|
*/
|
|
260
320
|
export interface DeferAware {
|
|
261
321
|
/** Whether this item should be deferred based on current conditions */
|
|
@@ -350,9 +410,8 @@ export interface DeferAware {
|
|
|
350
410
|
* }
|
|
351
411
|
* ```
|
|
352
412
|
*
|
|
353
|
-
* @
|
|
354
|
-
* @
|
|
355
|
-
* @category Interfaces
|
|
413
|
+
* @category Trouble Management
|
|
414
|
+
* @subcategory Interfaces
|
|
356
415
|
*
|
|
357
416
|
* @see {@link TroubleModel} - The trouble model interface
|
|
358
417
|
* @see {@link isTroubleAware} - Type guard for checking TroubleAware
|
|
@@ -9,7 +9,7 @@ import { TroubleAware } from '../types';
|
|
|
9
9
|
* object, which are required by the TroubleAware interface.
|
|
10
10
|
*
|
|
11
11
|
* @category Utilities
|
|
12
|
-
* @
|
|
12
|
+
* @subcategory Trouble Management
|
|
13
13
|
*
|
|
14
14
|
* @param obj - The object to check for trouble awareness. Can be any type.
|
|
15
15
|
*
|
|
@@ -94,5 +94,5 @@ import { TroubleAware } from '../types';
|
|
|
94
94
|
* @see {@link TroubleAware} - The interface this function checks for
|
|
95
95
|
* @see {@link useTroubleDecoration} - Hook that uses this guard internally
|
|
96
96
|
*/
|
|
97
|
-
export declare function isTroubleAware(obj
|
|
97
|
+
export declare function isTroubleAware(obj: any): obj is TroubleAware;
|
|
98
98
|
//# sourceMappingURL=is-trouble-aware.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-trouble-aware.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/trouble/utils/is-trouble-aware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6FG;AACH,wBAAgB,cAAc,CAAC,GAAG,
|
|
1
|
+
{"version":3,"file":"is-trouble-aware.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/trouble/utils/is-trouble-aware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6FG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,YAAY,CAO5D"}
|