@kosdev-code/kos-ui-sdk 3.0.26 → 3.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (339) hide show
  1. package/.kos.json +2 -1
  2. package/common/events/async-event-bus.d.ts +8 -11
  3. package/common/events/async-event-bus.d.ts.map +1 -1
  4. package/common/events/eventBus.d.ts +1 -18
  5. package/common/events/eventBus.d.ts.map +1 -1
  6. package/core/core/companion-instantiator.d.ts +5 -0
  7. package/core/core/companion-instantiator.d.ts.map +1 -1
  8. package/core/core/decorators/index.d.ts +1 -0
  9. package/core/core/decorators/index.d.ts.map +1 -1
  10. package/core/core/decorators/kos-child.d.ts +2 -3
  11. package/core/core/decorators/kos-child.d.ts.map +1 -1
  12. package/core/core/decorators/kos-companion.d.ts +25 -87
  13. package/core/core/decorators/kos-companion.d.ts.map +1 -1
  14. package/core/core/decorators/kos-container-aware-reconcile.test-d.d.ts +2 -0
  15. package/core/core/decorators/kos-container-aware-reconcile.test-d.d.ts.map +1 -0
  16. package/core/core/decorators/kos-container-aware.d.ts +191 -420
  17. package/core/core/decorators/kos-container-aware.d.ts.map +1 -1
  18. package/core/core/decorators/kos-execute-service-request.d.ts +7 -11
  19. package/core/core/decorators/kos-execute-service-request.d.ts.map +1 -1
  20. package/core/core/decorators/kos-execution-context.d.ts +14 -31
  21. package/core/core/decorators/kos-execution-context.d.ts.map +1 -1
  22. package/core/core/decorators/kos-future-aware.d.ts +21 -74
  23. package/core/core/decorators/kos-future-aware.d.ts.map +1 -1
  24. package/core/core/decorators/kos-http-decorators.d.ts +18 -62
  25. package/core/core/decorators/kos-http-decorators.d.ts.map +1 -1
  26. package/core/core/decorators/kos-logger-aware.d.ts +10 -60
  27. package/core/core/decorators/kos-logger-aware.d.ts.map +1 -1
  28. package/core/core/decorators/kos-mixin.d.ts +67 -0
  29. package/core/core/decorators/kos-mixin.d.ts.map +1 -0
  30. package/core/core/decorators/kos-model-effect.d.ts +10 -9
  31. package/core/core/decorators/kos-model-effect.d.ts.map +1 -1
  32. package/core/core/decorators/kos-multiple-future-aware.d.ts +21 -94
  33. package/core/core/decorators/kos-multiple-future-aware.d.ts.map +1 -1
  34. package/core/core/decorators/kos-reload-aware.d.ts +14 -16
  35. package/core/core/decorators/kos-reload-aware.d.ts.map +1 -1
  36. package/core/core/decorators/kos-service-request.d.ts +80 -238
  37. package/core/core/decorators/kos-service-request.d.ts.map +1 -1
  38. package/core/core/decorators/kos-state-machine.d.ts +35 -275
  39. package/core/core/decorators/kos-state-machine.d.ts.map +1 -1
  40. package/core/core/decorators/kos-topic-handler-flow-control.d.ts +11 -3
  41. package/core/core/decorators/kos-topic-handler-flow-control.d.ts.map +1 -1
  42. package/core/core/decorators/kos-trouble-aware.d.ts +9 -43
  43. package/core/core/decorators/kos-trouble-aware.d.ts.map +1 -1
  44. package/core/core/decorators/kos-view-model.d.ts +20 -100
  45. package/core/core/decorators/kos-view-model.d.ts.map +1 -1
  46. package/core/core/decorators/kosModel.d.ts.map +1 -1
  47. package/core/core/decorators/kosTopicHandler.d.ts +28 -89
  48. package/core/core/decorators/kosTopicHandler.d.ts.map +1 -1
  49. package/core/core/decorators/propKeys.d.ts +1 -0
  50. package/core/core/decorators/propKeys.d.ts.map +1 -1
  51. package/core/core/indexing/index.d.ts +2 -4
  52. package/core/core/indexing/index.d.ts.map +1 -1
  53. package/core/core/indexing/kos-container-index-aware.d.ts +17 -48
  54. package/core/core/indexing/kos-container-index-aware.d.ts.map +1 -1
  55. package/core/core/indexing/kos-index-aware.d.ts +11 -37
  56. package/core/core/indexing/kos-index-aware.d.ts.map +1 -1
  57. package/core/core/kos-container-index.d.ts +11 -0
  58. package/core/core/kos-container-index.d.ts.map +1 -1
  59. package/core/core/kos-container-model.d.ts +11 -32
  60. package/core/core/kos-container-model.d.ts.map +1 -1
  61. package/core/core/kos-data-container.d.ts +6 -6
  62. package/core/core/kos-data-container.d.ts.map +1 -1
  63. package/core/core/kosCore.d.ts +7 -4
  64. package/core/core/kosCore.d.ts.map +1 -1
  65. package/core/core/kosModel.d.ts +16 -8
  66. package/core/core/kosModel.d.ts.map +1 -1
  67. package/core/core/kosModelManager.d.ts +2 -3
  68. package/core/core/kosModelManager.d.ts.map +1 -1
  69. package/core/core/lifecycle/constants.d.ts +6 -2
  70. package/core/core/lifecycle/constants.d.ts.map +1 -1
  71. package/core/core/lifecycle/kosCoreLifecycle.d.ts +11 -1
  72. package/core/core/lifecycle/kosCoreLifecycle.d.ts.map +1 -1
  73. package/core/core/lifecycle/kosModelLifecycle.d.ts +6 -0
  74. package/core/core/lifecycle/kosModelLifecycle.d.ts.map +1 -1
  75. package/core/core/lifecycle/model-machine.d.ts +6 -0
  76. package/core/core/lifecycle/model-machine.d.ts.map +1 -1
  77. package/core/core/model/kos-fsm-manager.d.ts +6 -0
  78. package/core/core/model/kos-fsm-manager.d.ts.map +1 -1
  79. package/core/core/model/kos-offline-queue.d.ts +1 -1
  80. package/core/core/model/kos-subscription-manager.d.ts.map +1 -1
  81. package/core/core/model/service-response-store.d.ts +2 -15
  82. package/core/core/model/service-response-store.d.ts.map +1 -1
  83. package/core/core/reconnect/reconnect-fixture.d.ts +17 -0
  84. package/core/core/reconnect/reconnect-fixture.d.ts.map +1 -0
  85. package/core/core/registration/model-registration.d.ts.map +1 -1
  86. package/core/core/services/app-startup-service.d.ts +5 -13
  87. package/core/core/services/app-startup-service.d.ts.map +1 -1
  88. package/core/core/services/intent-service.d.ts +3 -12
  89. package/core/core/services/intent-service.d.ts.map +1 -1
  90. package/core/core/transport/mock/mock-frames.d.ts +3 -3
  91. package/core/core/transport/transport.d.ts +1 -1
  92. package/core/core/transport/transport.d.ts.map +1 -1
  93. package/core/core/transport/webSocketTransport.d.ts +10 -0
  94. package/core/core/transport/webSocketTransport.d.ts.map +1 -1
  95. package/core/types/model.d.ts +4 -8
  96. package/core/types/model.d.ts.map +1 -1
  97. package/core/types/service-response-store.d.ts +3 -11
  98. package/core/types/service-response-store.d.ts.map +1 -1
  99. package/core/types/utils/kos-fetch.d.ts +25 -37
  100. package/core/types/utils/kos-fetch.d.ts.map +1 -1
  101. package/core/util/abortable-when.d.ts +5 -6
  102. package/core/util/abortable-when.d.ts.map +1 -1
  103. package/core/util/ancestor-path-visitor.d.ts +14 -20
  104. package/core/util/ancestor-path-visitor.d.ts.map +1 -1
  105. package/core/util/container-utils.d.ts +26 -159
  106. package/core/util/container-utils.d.ts.map +1 -1
  107. package/core/util/date-utils.d.ts +9 -58
  108. package/core/util/date-utils.d.ts.map +1 -1
  109. package/core/util/debounce.d.ts +1 -8
  110. package/core/util/debounce.d.ts.map +1 -1
  111. package/core/util/kos-fetch.d.ts +1 -1
  112. package/core/util/kos-fetch.d.ts.map +1 -1
  113. package/core/util/kos-model-utils.d.ts +10 -11
  114. package/core/util/kos-model-utils.d.ts.map +1 -1
  115. package/core/util/model-attribute-utils.d.ts +5 -22
  116. package/core/util/model-attribute-utils.d.ts.map +1 -1
  117. package/core/util/model-type-guards.d.ts.map +1 -1
  118. package/core/util/promise-utils.d.ts +1 -26
  119. package/core/util/promise-utils.d.ts.map +1 -1
  120. package/core/util/service-factory.d.ts +5 -23
  121. package/core/util/service-factory.d.ts.map +1 -1
  122. package/core/util/service-request-error.d.ts +3 -5
  123. package/core/util/service-request-error.d.ts.map +1 -1
  124. package/core/util/service-response.d.ts +12 -67
  125. package/core/util/service-response.d.ts.map +1 -1
  126. package/core/util/transport-not-ready-error.d.ts +11 -13
  127. package/core/util/transport-not-ready-error.d.ts.map +1 -1
  128. package/core/util/when-ready.d.ts +1 -8
  129. package/core/util/when-ready.d.ts.map +1 -1
  130. package/index.cjs +692 -11760
  131. package/index.cjs.map +1 -1
  132. package/index.js +774 -11846
  133. package/index.js.map +1 -1
  134. package/models/decorators/future-service.d.ts +7 -7
  135. package/models/models/browser-router/browser-router-model.d.ts +10 -39
  136. package/models/models/browser-router/browser-router-model.d.ts.map +1 -1
  137. package/models/models/browser-router/browser-router-registration.d.ts +5 -77
  138. package/models/models/browser-router/browser-router-registration.d.ts.map +1 -1
  139. package/models/models/browser-router/types/index.d.ts +2 -16
  140. package/models/models/canvas-dispatcher/canvas-dispatcher-registration.d.ts +5 -77
  141. package/models/models/canvas-dispatcher/canvas-dispatcher-registration.d.ts.map +1 -1
  142. package/models/models/canvas-renderer/canvas-renderer-registration.d.ts +5 -75
  143. package/models/models/canvas-renderer/canvas-renderer-registration.d.ts.map +1 -1
  144. package/models/models/config-bean/config-bean-model-builder.d.ts +4 -11
  145. package/models/models/config-bean/config-bean-model-builder.d.ts.map +1 -1
  146. package/models/models/config-bean/config-bean-model.d.ts +23 -66
  147. package/models/models/config-bean/config-bean-model.d.ts.map +1 -1
  148. package/models/models/config-bean-prop/config-bean-prop-model.d.ts +15 -62
  149. package/models/models/config-bean-prop/config-bean-prop-model.d.ts.map +1 -1
  150. package/models/models/config-bean-prop/types/index.d.ts +34 -215
  151. package/models/models/device/device-model.d.ts +20 -199
  152. package/models/models/device/device-model.d.ts.map +1 -1
  153. package/models/models/device/device-registration.d.ts +7 -87
  154. package/models/models/device/device-registration.d.ts.map +1 -1
  155. package/models/models/device/types/index.d.ts +5 -34
  156. package/models/models/future/future-aware.d.ts +7 -71
  157. package/models/models/future/future-aware.d.ts.map +1 -1
  158. package/models/models/future/future-model-builder.d.ts +2 -2
  159. package/models/models/future/future-model.d.ts +3 -23
  160. package/models/models/future/future-model.d.ts.map +1 -1
  161. package/models/models/future/future-types.d.ts +28 -145
  162. package/models/models/future/future-types.d.ts.map +1 -1
  163. package/models/models/gpio-chip/gpio-chip-builders.d.ts +14 -0
  164. package/models/models/gpio-chip/gpio-chip-builders.d.ts.map +1 -0
  165. package/models/models/gpio-chip/gpio-chip-container-model.d.ts +2 -1
  166. package/models/models/gpio-chip/gpio-chip-container-model.d.ts.map +1 -1
  167. package/models/models/key-value/key-value-model.d.ts +12 -72
  168. package/models/models/key-value/key-value-model.d.ts.map +1 -1
  169. package/models/models/key-value/key-value-registration.d.ts +5 -77
  170. package/models/models/key-value/key-value-registration.d.ts.map +1 -1
  171. package/models/models/key-value/services/key-value-services.d.ts +13 -72
  172. package/models/models/key-value/services/key-value-services.d.ts.map +1 -1
  173. package/models/models/key-value/types/index.d.ts +3 -46
  174. package/models/models/kos-expression-evaluator/expression-parse-cache.d.ts +29 -0
  175. package/models/models/kos-expression-evaluator/expression-parse-cache.d.ts.map +1 -0
  176. package/models/models/kos-expression-evaluator/index.d.ts +1 -0
  177. package/models/models/kos-expression-evaluator/index.d.ts.map +1 -1
  178. package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts +73 -105
  179. package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts.map +1 -1
  180. package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts +2 -12
  181. package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts.map +1 -1
  182. package/models/models/kos-log-manager/kos-log-manager-model.d.ts +7 -46
  183. package/models/models/kos-log-manager/kos-log-manager-model.d.ts.map +1 -1
  184. package/models/models/kos-log-manager/kos-log-manager-registration.d.ts +5 -80
  185. package/models/models/kos-log-manager/kos-log-manager-registration.d.ts.map +1 -1
  186. package/models/models/kos-log-manager/types/index.d.ts +13 -156
  187. package/models/models/kos-time/kos-time-model.d.ts +8 -39
  188. package/models/models/kos-time/kos-time-model.d.ts.map +1 -1
  189. package/models/models/kos-time/kos-time-registration.d.ts +6 -73
  190. package/models/models/kos-time/kos-time-registration.d.ts.map +1 -1
  191. package/models/models/kos-time/types/index.d.ts +3 -58
  192. package/models/models/log-block/log-block-container-model.d.ts +2 -118
  193. package/models/models/log-block/log-block-container-model.d.ts.map +1 -1
  194. package/models/models/log-block/log-block-container-registration.d.ts +5 -75
  195. package/models/models/log-block/log-block-container-registration.d.ts.map +1 -1
  196. package/models/models/log-block/log-block-model.d.ts +5 -168
  197. package/models/models/log-block/log-block-model.d.ts.map +1 -1
  198. package/models/models/log-block/log-block-registration.d.ts +5 -75
  199. package/models/models/log-block/log-block-registration.d.ts.map +1 -1
  200. package/models/models/log-block/types/index.d.ts +14 -81
  201. package/models/models/log-stream/log-stream-container-model.d.ts +8 -35
  202. package/models/models/log-stream/log-stream-container-model.d.ts.map +1 -1
  203. package/models/models/log-stream/log-stream-container-registration.d.ts +5 -75
  204. package/models/models/log-stream/log-stream-container-registration.d.ts.map +1 -1
  205. package/models/models/log-stream/log-stream-model.d.ts +8 -29
  206. package/models/models/log-stream/log-stream-model.d.ts.map +1 -1
  207. package/models/models/log-stream/log-stream-registration.d.ts +5 -75
  208. package/models/models/log-stream/log-stream-registration.d.ts.map +1 -1
  209. package/models/models/log-stream/types/index.d.ts +5 -60
  210. package/models/models/network-interface/network-interface-container-model.d.ts +6 -35
  211. package/models/models/network-interface/network-interface-container-model.d.ts.map +1 -1
  212. package/models/models/network-interface/network-interface-container-registration.d.ts +5 -73
  213. package/models/models/network-interface/network-interface-container-registration.d.ts.map +1 -1
  214. package/models/models/network-interface/network-interface-model.d.ts +5 -43
  215. package/models/models/network-interface/network-interface-model.d.ts.map +1 -1
  216. package/models/models/network-interface/network-interface-registration.d.ts +5 -73
  217. package/models/models/network-interface/network-interface-registration.d.ts.map +1 -1
  218. package/models/models/network-interface/types/index.d.ts +2 -16
  219. package/models/models/ota/ota-model.d.ts +11 -39
  220. package/models/models/ota/ota-model.d.ts.map +1 -1
  221. package/models/models/ota/ota-registration.d.ts +5 -77
  222. package/models/models/ota/ota-registration.d.ts.map +1 -1
  223. package/models/models/ota/types/index.d.ts +2 -141
  224. package/models/models/region-info/types/index.d.ts +19 -99
  225. package/models/models/region-info/types/index.d.ts.map +1 -1
  226. package/models/models/software-info/services/software-info-services.d.ts +2 -14
  227. package/models/models/software-info/services/software-info-services.d.ts.map +1 -1
  228. package/models/models/software-info/software-info-model.d.ts +3 -39
  229. package/models/models/software-info/software-info-model.d.ts.map +1 -1
  230. package/models/models/software-info/software-info-registration.d.ts +6 -73
  231. package/models/models/software-info/software-info-registration.d.ts.map +1 -1
  232. package/models/models/software-info/types/index.d.ts +6 -20
  233. package/models/models/state-bean/state-bean-model.d.ts +10 -41
  234. package/models/models/state-bean/state-bean-model.d.ts.map +1 -1
  235. package/models/models/state-bean/state-bean-registration.d.ts +6 -73
  236. package/models/models/state-bean/state-bean-registration.d.ts.map +1 -1
  237. package/models/models/state-bean/types/index.d.ts +4 -84
  238. package/models/models/state-prop/state-prop-model.d.ts +6 -40
  239. package/models/models/state-prop/state-prop-model.d.ts.map +1 -1
  240. package/models/models/state-prop/state-prop-registration.d.ts +6 -73
  241. package/models/models/state-prop/state-prop-registration.d.ts.map +1 -1
  242. package/models/models/state-prop/types/index.d.ts +5 -37
  243. package/models/models/storage-device/storage-device-container-model.d.ts +7 -273
  244. package/models/models/storage-device/storage-device-container-model.d.ts.map +1 -1
  245. package/models/models/storage-device/storage-device-container-registration.d.ts +5 -75
  246. package/models/models/storage-device/storage-device-container-registration.d.ts.map +1 -1
  247. package/models/models/storage-device/storage-device-model.d.ts +3 -49
  248. package/models/models/storage-device/storage-device-model.d.ts.map +1 -1
  249. package/models/models/storage-device/storage-device-registration.d.ts +5 -75
  250. package/models/models/storage-device/storage-device-registration.d.ts.map +1 -1
  251. package/models/models/storage-device/types/index.d.ts +13 -82
  252. package/models/models/studio-properties/studio-properties-model.d.ts +13 -36
  253. package/models/models/studio-properties/studio-properties-model.d.ts.map +1 -1
  254. package/models/models/studio-properties/studio-properties-registration.d.ts +5 -75
  255. package/models/models/studio-properties/studio-properties-registration.d.ts.map +1 -1
  256. package/models/models/studio-properties/types/index.d.ts +2 -24
  257. package/models/models/translation/descriptor-merge.d.ts +13 -17
  258. package/models/models/translation/descriptor-merge.d.ts.map +1 -1
  259. package/models/models/translation/services/translation-services.d.ts +19 -77
  260. package/models/models/translation/services/translation-services.d.ts.map +1 -1
  261. package/models/models/translation/test-harness.d.ts +6 -8
  262. package/models/models/translation/test-harness.d.ts.map +1 -1
  263. package/models/models/translation/translation-container-model.d.ts +7 -59
  264. package/models/models/translation/translation-container-model.d.ts.map +1 -1
  265. package/models/models/translation/translation-container-registration.d.ts +6 -73
  266. package/models/models/translation/translation-container-registration.d.ts.map +1 -1
  267. package/models/models/translation/translation-model.d.ts +17 -50
  268. package/models/models/translation/translation-model.d.ts.map +1 -1
  269. package/models/models/translation/translation-registration.d.ts +6 -73
  270. package/models/models/translation/translation-registration.d.ts.map +1 -1
  271. package/models/models/translation/types/index.d.ts +51 -276
  272. package/models/models/trouble/trouble-registration.d.ts +6 -73
  273. package/models/models/trouble/trouble-registration.d.ts.map +1 -1
  274. package/models/models/trouble/types/index.d.ts +17 -188
  275. package/models/models/trouble/utils/is-trouble-aware.d.ts +4 -85
  276. package/models/models/trouble/utils/is-trouble-aware.d.ts.map +1 -1
  277. package/models/models/trouble-container/trouble-builders.d.ts +11 -0
  278. package/models/models/trouble-container/trouble-builders.d.ts.map +1 -0
  279. package/models/models/trouble-container/trouble-container-model.d.ts +2 -1
  280. package/models/models/trouble-container/trouble-container-model.d.ts.map +1 -1
  281. package/models/models/usb-update/usb-update-container-registration.d.ts +5 -75
  282. package/models/models/usb-update/usb-update-container-registration.d.ts.map +1 -1
  283. package/models/models/usb-update/usb-update-registration.d.ts +5 -75
  284. package/models/models/usb-update/usb-update-registration.d.ts.map +1 -1
  285. package/models/types/cancellable-promise.d.ts +6 -9
  286. package/models/types/cancellable-promise.d.ts.map +1 -1
  287. package/models/utils/await-future-call.d.ts +9 -21
  288. package/models/utils/await-future-call.d.ts.map +1 -1
  289. package/models/utils/cancellable-future-call.d.ts +8 -19
  290. package/models/utils/cancellable-future-call.d.ts.map +1 -1
  291. package/models/utils/cancellable-service.d.ts +14 -23
  292. package/models/utils/cancellable-service.d.ts.map +1 -1
  293. package/models/utils/conversion-utils.d.ts +8 -48
  294. package/models/utils/conversion-utils.d.ts.map +1 -1
  295. package/models/utils/persistence-store.d.ts +1 -1
  296. package/models/utils/service.d.ts +14 -48
  297. package/models/utils/service.d.ts.map +1 -1
  298. package/models/utils/services/kos/daily/service.d.ts +4 -4
  299. package/models/utils/services/vfs/daily/service.d.ts +4 -4
  300. package/models/utils/timer-manager.d.ts.map +1 -1
  301. package/package.json +2 -2
  302. package/{index-D52vEGXT.cjs → software-info-registration-Le3V0a6v.cjs} +11906 -416
  303. package/software-info-registration-Le3V0a6v.cjs.map +1 -0
  304. package/{index-Csq0zQtb.js → software-info-registration-kSGacOka.js} +12116 -625
  305. package/software-info-registration-kSGacOka.js.map +1 -0
  306. package/testing/index.d.ts +32 -34
  307. package/testing/index.d.ts.map +1 -1
  308. package/testing.cjs +2 -1
  309. package/testing.cjs.map +1 -1
  310. package/testing.js +2 -1
  311. package/testing.js.map +1 -1
  312. package/ui/components/connection-dev-button/connection-dev-button-styles.d.ts +9 -0
  313. package/ui/components/connection-dev-button/connection-dev-button-styles.d.ts.map +1 -0
  314. package/ui/components/connection-dev-button/index.d.ts +36 -0
  315. package/ui/components/connection-dev-button/index.d.ts.map +1 -0
  316. package/ui/components/connection-dev-button/use-connection-dev-state.d.ts +29 -0
  317. package/ui/components/connection-dev-button/use-connection-dev-state.d.ts.map +1 -0
  318. package/ui/components/index.d.ts +1 -0
  319. package/ui/components/index.d.ts.map +1 -1
  320. package/ui/features/canvas/hooks/use-image-renderer.d.ts +5 -4
  321. package/ui/features/canvas/hooks/use-image-renderer.d.ts.map +1 -1
  322. package/ui/hooks/use-function-warmup.d.ts +4 -14
  323. package/ui/hooks/use-function-warmup.d.ts.map +1 -1
  324. package/ui/hooks/use-kos-date-formats.d.ts +15 -29
  325. package/ui/hooks/use-kos-date-formats.d.ts.map +1 -1
  326. package/ui/hooks/use-kos-region-timezones.d.ts +4 -55
  327. package/ui/hooks/use-kos-region-timezones.d.ts.map +1 -1
  328. package/ui/hooks/use-kos-regions.d.ts +11 -23
  329. package/ui/hooks/use-kos-regions.d.ts.map +1 -1
  330. package/ui/hooks/use-kos-time-formats.d.ts +16 -31
  331. package/ui/hooks/use-kos-time-formats.d.ts.map +1 -1
  332. package/ui/hooks/use-kos-unit-systems.d.ts +13 -27
  333. package/ui/hooks/use-kos-unit-systems.d.ts.map +1 -1
  334. package/ui/hooks/view-model/use-view-model.d.ts +6 -31
  335. package/ui/hooks/view-model/use-view-model.d.ts.map +1 -1
  336. package/ui/policies/reload-on-disconnect-policy.d.ts +5 -6
  337. package/ui/policies/reload-on-disconnect-policy.d.ts.map +1 -1
  338. package/index-Csq0zQtb.js.map +0 -1
  339. package/index-D52vEGXT.cjs.map +0 -1
@@ -5,89 +5,21 @@ export declare const TOPIC_CRITICAL_DATA_CHANGED = "/kos/criticalData/changed";
5
5
  export declare const TOPIC_CRITICAL_DATA_AVAILABLE = "/kos/criticalData/available";
6
6
  export declare const TOPIC_CRITICAL_DATA_UNAVAILABLE = "/kos/criticalData/unavailable";
7
7
  /**
8
- * KOS Device Model - Device Identity and Node Configuration Management
8
+ * Device identity: serial number, name and node id.
9
9
  *
10
- * The Device model provides centralized management of device identity, node configuration,
11
- * and hardware identification within KOS systems. It handles device serial numbers,
12
- * names, and node topology information essential for system coordination and administration.
10
+ * The model loads the device details and serial number on load, and reloads the
11
+ * serial number when the `/kos/criticalData/changed` or
12
+ * `/kos/criticalData/available` topics fire. Values read `"unassigned"` until
13
+ * they have been loaded.
13
14
  *
14
- * ## Key Features
15
- *
16
- * ### Device Identity Management
17
- * - **Serial Number Tracking**: Hardware-based device identification
18
- * - **Name Management**: Human-readable device naming for administration
19
- * - **Node Configuration**: Multi-node deployment topology handling
20
- *
21
- * ### Real-time Synchronization
22
- * - **Critical Data Events**: Automatic updates on system data changes
23
- * - **WebSocket Integration**: Live device state synchronization
24
- * - **Lazy Loading**: Efficient data retrieval when needed
25
- *
26
- * ### Node Topology Support
27
- * - **Node Type/Name Parsing**: Automatic node identifier decomposition
28
- * - **Multi-node Deployments**: Support for complex system architectures
29
- * - **Role-based Configuration**: Node-specific parameter management
30
- *
31
- * ## Common Integration Patterns
32
- *
33
- * ### System Administration Dashboards
34
- * ```typescript
35
- * const device = Device.factory({
36
- * serialNumber: 'KOS-DEV-001',
37
- * name: 'Production Dispenser Alpha',
38
- * nodeId: 'primary-main'
39
- * });
40
- *
41
- * // Access device identity
42
- * console.log(`Device: ${device.name}`);
43
- * console.log(`Serial: ${device.serialNumber}`);
44
- * console.log(`Node: ${device.nodeType}-${device.nodeName}`);
45
- * ```
46
- *
47
- * ### Multi-node System Coordination
48
- * ```typescript
49
- * const primaryDevice = Device.factory({
50
- * nodeId: 'primary-controller'
51
- * });
52
- *
53
- * const secondaryDevice = Device.factory({
54
- * nodeId: 'secondary-backup'
55
- * });
56
- *
57
- * // Coordinate based on node roles
58
- * if (primaryDevice.nodeType === 'primary') {
59
- * // Handle primary node logic
60
- * }
61
- * ```
15
+ * This is an alias for the implementation {@link DeviceModelImpl}.
62
16
  *
63
- * ### Device Registration and Setup
17
+ * @example
64
18
  * ```typescript
65
- * const newDevice = Device.factory({
66
- * serialNumber: await getHardwareSerial(),
67
- * name: userProvidedName,
68
- * nodeId: deploymentConfiguration.nodeId
69
- * });
70
- *
71
- * // Device automatically loads additional data
72
- * // from critical data events
19
+ * @kosDependency({ modelType: Device.type, id: Device.type })
20
+ * private device!: DeviceModel;
73
21
  * ```
74
22
  *
75
- * ## Real-time Updates
76
- *
77
- * The Device model automatically responds to critical data changes:
78
- * - Monitors `/kos/criticalData/changed` and `/kos/criticalData/available` topics
79
- * - Updates serial number and configuration when system data becomes available
80
- * - Maintains consistency across device restarts and configuration changes
81
- *
82
- * ## Singleton Behavior
83
- *
84
- * Device models use singleton pattern - each device type has one instance:
85
- * - Subsequent factory calls return the existing instance
86
- * - Options are ignored after first creation
87
- * - Ensures system-wide device identity consistency
88
- *
89
- * This is an alias for the implementation {@link DeviceModelImpl}.
90
- *
91
23
  * @interface
92
24
  * @group KOS Model
93
25
  * @category Device Data
@@ -98,145 +30,34 @@ export declare class DeviceModelImpl implements IKosDataModel, IKosIdentifiable
98
30
  id: string;
99
31
  private logger;
100
32
  private _serialNumber;
101
- /**
102
- * Hardware-based device serial number for unique identification.
103
- *
104
- * Returns the device's hardware serial number or "unassigned" if not yet loaded.
105
- * Serial numbers are typically retrieved from the device's hardware identification
106
- * system during critical data events.
107
- *
108
- * @example
109
- * ```typescript
110
- * const device = Device.factory({});
111
- *
112
- * // Check if serial number is available
113
- * if (device.serialNumber !== "unassigned") {
114
- * console.log(`Device Serial: ${device.serialNumber}`);
115
- * }
116
- * ```
117
- */
33
+ /** Hardware serial number, or `"unassigned"` until it has been loaded. */
118
34
  get serialNumber(): string | "unassigned";
119
35
  private _name;
120
- /**
121
- * Human-readable device name for administrative identification.
122
- *
123
- * Returns the configured device name or "unassigned" if not yet set.
124
- * Device names are typically configured during device setup and used
125
- * in administrative interfaces for device identification and management.
126
- *
127
- * @example
128
- * ```typescript
129
- * const device = Device.factory({
130
- * name: 'Main Production Dispenser'
131
- * });
132
- *
133
- * console.log(`Device Name: ${device.name}`);
134
- * // Output: "Device Name: Main Production Dispenser"
135
- * ```
136
- */
36
+ /** Human-readable device name, or `"unassigned"` until it has been loaded. */
137
37
  get name(): string | "unassigned";
138
38
  private _nodeId;
139
39
  /**
140
- * Full node identifier within the KOS deployment.
141
- *
142
- * Returns the complete node ID or "unassigned" if not yet configured.
143
- * Node IDs follow the pattern "type-instance" (e.g., "primary-main", "secondary-backup")
144
- * and identify the specific node role and instance within multi-node deployments.
145
- *
146
- * @example
147
- * ```typescript
148
- * const device = Device.factory({
149
- * nodeId: 'primary-controller'
150
- * });
40
+ * Node identifier within the deployment, in `type-name` form (for example
41
+ * `primary-main`), or `"unassigned"` until it has been loaded.
151
42
  *
152
- * console.log(`Node ID: ${device.nodeId}`);
153
- * // Output: "Node ID: primary-controller"
154
- * ```
155
- *
156
- * @see {@link nodeType} for extracting the node type portion
157
- * @see {@link nodeName} for extracting the node name portion
43
+ * @see {@link nodeType} for the type portion
44
+ * @see {@link nodeName} for the name portion
158
45
  */
159
46
  get nodeId(): string | "unassigned";
160
47
  /**
161
- * Node type extracted from the node identifier.
162
- *
163
- * Returns the first part of the node ID (before the hyphen).
164
- * For node ID "primary-controller", this returns "primary".
165
- * Used for role-based logic and node coordination.
166
- *
167
- * @example
168
- * ```typescript
169
- * const device = Device.factory({
170
- * nodeId: 'primary-controller'
171
- * });
172
- *
173
- * console.log(`Node Type: ${device.nodeType}`);
174
- * // Output: "Node Type: primary"
175
- *
176
- * // Role-based coordination
177
- * if (device.nodeType === 'primary') {
178
- * // Handle primary node responsibilities
179
- * }
180
- * ```
48
+ * The part of {@link nodeId} before the hyphen (`"primary"` for `primary-main`).
181
49
  */
182
50
  get nodeType(): string;
183
51
  /**
184
- * Node name extracted from the node identifier.
185
- *
186
- * Returns the second part of the node ID (after the hyphen).
187
- * For node ID "primary-controller", this returns "controller".
188
- * Used for instance-specific identification within node types.
189
- *
190
- * @example
191
- * ```typescript
192
- * const device = Device.factory({
193
- * nodeId: 'secondary-backup'
194
- * });
195
- *
196
- * console.log(`Node Name: ${device.nodeName}`);
197
- * // Output: "Node Name: backup"
198
- *
199
- * // Instance-specific logic
200
- * if (device.nodeName === 'backup') {
201
- * // Handle backup node configuration
202
- * }
203
- * ```
52
+ * The part of {@link nodeId} after the hyphen (`"main"` for `primary-main`).
204
53
  */
205
54
  get nodeName(): string;
206
55
  constructor(modelId: string, _options: DeviceOptions, context: KosCreationContext);
207
56
  /**
208
- * Update the device model with new configuration options.
209
- *
210
- * Allows dynamic updating of device identity and node configuration.
211
- * Any undefined values will be set to "unassigned". This method is typically
212
- * called internally during device data loading or external configuration changes.
213
- *
214
- * @param options - Device configuration options to apply
215
- *
216
- * @example
217
- * ```typescript
218
- * const device = Device.factory({});
219
- *
220
- * // Update with new device information
221
- * device.updateModel({
222
- * serialNumber: 'KOS-DEVICE-12345',
223
- * name: 'Updated Dispenser Name',
224
- * nodeId: 'primary-main'
225
- * });
226
- *
227
- * console.log(device.serialNumber); // "KOS-DEVICE-12345"
228
- * console.log(device.name); // "Updated Dispenser Name"
229
- * console.log(device.nodeId); // "primary-main"
230
- * ```
57
+ * Replace the device identity. Fields left undefined become `"unassigned"`, so
58
+ * pass every field you want to keep.
231
59
  *
232
- * @example Partial Updates
233
- * ```typescript
234
- * // Only update specific fields
235
- * device.updateModel({
236
- * name: 'New Device Name'
237
- * // serialNumber and nodeId remain unchanged
238
- * });
239
- * ```
60
+ * @param options - Device identity to apply
240
61
  */
241
62
  updateModel(options: DeviceOptions): void;
242
63
  private loadDeviceData;
@@ -1 +1 @@
1
- {"version":3,"file":"device-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/device/device-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAEhB,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,eAAe,CAAC;AAGvB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,eAAO,MAAM,UAAU,iBAAiB,CAAC;AACzC,eAAO,MAAM,2BAA2B,8BAA8B,CAAC;AACvE,eAAO,MAAM,6BAA6B,gCAAgC,CAAC;AAC3E,eAAO,MAAM,+BAA+B,kCAAkC,CAAC;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwFG;AACH,MAAM,MAAM,WAAW,GAAG,oBAAoB,CAAC,eAAe,CAAC,CAAC;AAEhE,qBACa,eAAgB,YAAW,aAAa,EAAE,gBAAgB;IACrE,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,aAAa,CAAwB;IAE7C;;;;;;;;;;;;;;;;OAgBG;IACH,IAAI,YAAY,IAAI,MAAM,GAAG,YAAY,CAExC;IAED,OAAO,CAAC,KAAK,CAAwB;IAErC;;;;;;;;;;;;;;;;OAgBG;IACH,IAAI,IAAI,IAAI,MAAM,GAAG,YAAY,CAEhC;IAED,OAAO,CAAC,OAAO,CAAwB;IAEvC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,MAAM,IAAI,MAAM,GAAG,YAAY,CAElC;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,IAAI,QAAQ,IAAI,MAAM,CAGrB;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,IAAI,QAAQ,IAAI,MAAM,CAGrB;gBAGC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,aAAa,EACvB,OAAO,EAAE,kBAAkB;IAS7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;YAM3B,cAAc;YAYd,gBAAgB;IAU9B;;OAEG;IAKG,yBAAyB;IAO/B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAK5B"}
1
+ {"version":3,"file":"device-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/device/device-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAEhB,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,eAAe,CAAC;AAGvB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,eAAO,MAAM,UAAU,iBAAiB,CAAC;AACzC,eAAO,MAAM,2BAA2B,8BAA8B,CAAC;AACvE,eAAO,MAAM,6BAA6B,gCAAgC,CAAC;AAC3E,eAAO,MAAM,+BAA+B,kCAAkC,CAAC;AAE/E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,WAAW,GAAG,oBAAoB,CAAC,eAAe,CAAC,CAAC;AAEhE,qBACa,eAAgB,YAAW,aAAa,EAAE,gBAAgB;IACrE,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,aAAa,CAAwB;IAE7C,0EAA0E;IAC1E,IAAI,YAAY,IAAI,MAAM,GAAG,YAAY,CAExC;IAED,OAAO,CAAC,KAAK,CAAwB;IAErC,8EAA8E;IAC9E,IAAI,IAAI,IAAI,MAAM,GAAG,YAAY,CAEhC;IAED,OAAO,CAAC,OAAO,CAAwB;IAEvC;;;;;;OAMG;IACH,IAAI,MAAM,IAAI,MAAM,GAAG,YAAY,CAElC;IAED;;OAEG;IACH,IAAI,QAAQ,IAAI,MAAM,CAGrB;IAED;;OAEG;IACH,IAAI,QAAQ,IAAI,MAAM,CAGrB;gBAGC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,aAAa,EACvB,OAAO,EAAE,kBAAkB;IAS7B;;;;;OAKG;IACH,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;YAM3B,cAAc;YAYd,gBAAgB;IAU9B;;OAEG;IAKG,yBAAyB;IAO/B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAK5B"}
@@ -2,98 +2,18 @@ import { SingletonKosModelRegistrationFactory } from '../../../core';
2
2
  import { DeviceModel } from './device-model';
3
3
  import { DeviceOptions } from './types';
4
4
  /**
5
- * # Device Model Registration Factory
5
+ * Registration for {@link DeviceModel}, a singleton model holding the device's
6
+ * identity, serial number and node configuration.
6
7
  *
7
- * **KOS Device Identity and Node Configuration Management**
8
+ * `type` identifies the model in the registry and in `@kosDependency` declarations.
9
+ * `register()` adds the model to the registry. `instance()` builds or returns the single instance; later calls ignore the options.
8
10
  *
9
- * The Device registration factory provides convenient methods for creating and working with DeviceModel instances.
10
- * Device models handle device identity, hardware serial numbers, and node configuration within KOS deployments.
11
- *
12
- * ## Core Registration Properties
13
- *
14
- * ### type
15
- *
16
- * Model type identifier used for dependency injection and type narrowing.
17
- * Essential for declaring model dependencies in other components.
18
- *
19
- * @example Model Dependency Declaration
11
+ * @example
20
12
  * ```typescript
21
- * @kosDependency({modelType: Device.type, id: "deviceId"})
22
- * private deviceModel: DeviceModel;
23
- * ```
24
- *
25
- * ### factory
26
- *
27
- * Creates DeviceModel instances with singleton behavior. Multiple calls return the same instance,
28
- * ensuring system-wide device identity consistency.
29
- *
30
- * **Singleton Behavior**: Subsequent factory calls return existing instance; options ignored after first creation.
31
- *
32
- * @example Device Creation and Identity Access
33
- * ```typescript
34
- * const device = Device.factory({
35
- * serialNumber: 'KOS-DEVICE-001',
36
- * name: 'Production Dispenser Alpha',
37
- * nodeId: 'primary-controller'
38
- * });
39
- *
40
- * // Access device identity
41
- * console.log(`Device: ${device.name} (${device.serialNumber})`);
42
- * console.log(`Node: ${device.nodeType}-${device.nodeName}`);
43
- * ```
44
- *
45
- * @example Multi-node System Coordination
46
- * ```typescript
47
- * const primaryDevice = Device.factory({ nodeId: 'primary-main' });
48
- * const backupDevice = Device.factory({ nodeId: 'secondary-backup' });
49
- *
50
- * // Coordinate based on node roles
51
- * if (primaryDevice.nodeType === 'primary') {
52
- * // Handle primary node responsibilities
53
- * }
13
+ * @kosDependency({ modelType: Device.type, id: Device.type })
14
+ * private device!: DeviceModel;
54
15
  * ```
55
16
  *
56
- * ### predicate
57
- *
58
- * [TypeScript type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates)
59
- * for identifying and narrowing models to DeviceModel instances.
60
- *
61
- * @example Type Narrowing for Device Operations
62
- * ```typescript
63
- * const model: IKosDataModel = getModel(); // some model
64
- *
65
- * if (Device.predicate(model)) {
66
- * // Compiler now knows model is DeviceModel
67
- * console.log(`Device Serial: ${model.serialNumber}`);
68
- * model.updateModel({ name: 'Updated Name' });
69
- * }
70
- * ```
71
- *
72
- * ### registration
73
- *
74
- * Registration object for model registry integration. Provides all required information
75
- * for registering the DeviceModelImpl implementation with the model registry.
76
- *
77
- * @example Model Registry Configuration
78
- * ```typescript
79
- * // registration.ts
80
- * import { Device } from "@kos-ui/project-models";
81
- * import { KosModelRegistry } from "@kosdev-code/kos-dispense-sdk";
82
- *
83
- * KosModelRegistry.dispense
84
- * .models()
85
- * .model(Device);
86
- * ```
87
- *
88
- * ## Singleton Architecture
89
- *
90
- * **Device models use singleton pattern** ensuring system-wide consistency:
91
- * - Each device type has exactly one instance
92
- * - Subsequent factory calls return existing instance
93
- * - Options are ignored after initial creation
94
- * - Uses model type as unique identifier
95
- * - Guarantees device identity consistency across system
96
- *
97
17
  * @group KOS Model
98
18
  * @category Device Data
99
19
  */
@@ -1 +1 @@
1
- {"version":3,"file":"device-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/device/device-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+FG;AACH,eAAO,MAAM,MAAM,kEAMjB,CAAC"}
1
+ {"version":3,"file":"device-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/device/device-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,MAAM,kEAMjB,CAAC"}
@@ -1,47 +1,18 @@
1
1
  /**
2
- * Configuration options for Device model instances.
3
- *
4
- * Defines device identity and node-specific parameters for KOS device modeling.
5
- * Device models represent the physical device identity and node configuration
6
- * within a KOS system deployment.
7
- *
8
- * @example Basic Device Configuration
9
- * ```typescript
10
- * const deviceOptions: DeviceOptions = {
11
- * serialNumber: 'KOS-DEVICE-12345',
12
- * name: 'Main Beverage Dispenser',
13
- * nodeId: 'primary-node-01'
14
- * };
15
- *
16
- * const device = Device.factory(deviceOptions);
17
- * ```
2
+ * Identity fields of a {@link DeviceModel}. The model loads these from the
3
+ * device and applies them with `updateModel`.
18
4
  *
19
5
  * @kosService core.device
20
6
  * @group KOS Model
21
7
  * @category Service Integration
22
8
  */
23
9
  export interface DeviceOptions {
24
- /**
25
- * Unique device serial number from hardware.
26
- *
27
- * Retrieved from the device's hardware identification system.
28
- * Used for warranty tracking, support, and device-specific configuration.
29
- */
10
+ /** Hardware serial number. */
30
11
  serialNumber?: string;
31
12
 
32
- /**
33
- * Human-readable device name for identification.
34
- *
35
- * Typically configured during device setup and used in administrative
36
- * interfaces for device identification and management.
37
- */
13
+ /** Human-readable device name. */
38
14
  name?: string;
39
15
 
40
- /**
41
- * Node identifier within the KOS deployment.
42
- *
43
- * Identifies the specific node role and instance within a multi-node
44
- * KOS deployment. Format typically follows 'type-instance' pattern.
45
- */
16
+ /** Node identifier within the deployment, in `type-name` form. */
46
17
  nodeId?: string;
47
18
  }
@@ -1,40 +1,10 @@
1
1
  import { FutureAwareContainer, FutureContainer, IFutureModel, MultiFutureAware } from './future-types';
2
2
  /**
3
- * Future handler for managing multiple concurrent long-running operations.
3
+ * Future handler that tracks several concurrent Futures by alias.
4
+ * `@kosMultipleFutureAware` installs it as the model's `futureHandler`.
4
5
  *
5
- * Provides comprehensive lifecycle management for models that coordinate multiple
6
- * device operations simultaneously. Each Future is tracked with its own alias
7
- * and receives automatic progress updates and cleanup when operations complete.
8
- *
9
- * @example Managing Multiple Operations
10
- * ```typescript
11
- * @kosModel("device-maintenance-model")
12
- * export class DeviceMaintenanceModel implements FutureContainer {
13
- * futureHandler: MultipleFutureHandler;
14
- *
15
- * constructor(modelId: string, options: any, context: KosCreationContext) {
16
- * this.id = modelId;
17
- * this.futureHandler = new MultipleFutureHandler(this);
18
- * }
19
- *
20
- * async startCalibration(deviceId: string): Promise<CalibrationResult> {
21
- * const future = await this.createFuture('/device/calibrate', { deviceId });
22
- * this.futureHandler.addFuture(future, `calibration-${deviceId}`);
23
- * return future;
24
- * }
25
- *
26
- * async startCleaning(deviceId: string): Promise<CleaningResult> {
27
- * const future = await this.createFuture('/device/clean', { deviceId });
28
- * this.futureHandler.addFuture(future, `cleaning-${deviceId}`);
29
- * return future;
30
- * }
31
- *
32
- * onFutureUpdate(future: IFutureModel): void {
33
- * // Handle progress updates from any managed Future
34
- * console.log(`${future.id}: ${future.progress}% complete`);
35
- * }
36
- * }
37
- * ```
6
+ * Calls without an alias act on the most recently added Future; `future`
7
+ * returns the one stored under the default context.
38
8
  *
39
9
  * @group KOS Model
40
10
  * @category Asynchronous Operations
@@ -54,43 +24,9 @@ export declare class MultipleFutureHandler<T extends {} = Record<string, unknown
54
24
  get futureMap(): Map<string, IFutureModel<T>>;
55
25
  }
56
26
  /**
57
- * Future handler for managing single long-running operations with simplified API.
58
- *
59
- * Provides streamlined lifecycle management for models that typically handle
60
- * one operation at a time. Automatically tracks progress and provides reactive
61
- * status information for UI integration.
62
- *
63
- * @example Single Operation Management
64
- * ```typescript
65
- * @kosModel("brewing-system-model")
66
- * export class BrewingSystemModel implements FutureContainer {
67
- * futureHandler: FutureHandler;
68
- *
69
- * constructor(modelId: string, options: any, context: KosCreationContext) {
70
- * this.id = modelId;
71
- * this.futureHandler = new FutureHandler(this);
72
- * }
73
- *
74
- * async startBrewingCycle(recipe: Recipe): Promise<BrewingResult> {
75
- * const future = await this.createFuture('/brewing/start', { recipe });
76
- * this.futureHandler.addFuture(future);
77
- * return future;
78
- * }
79
- *
80
- * get isOperationActive(): boolean {
81
- * return this.futureHandler.status !== 'NOT_RESOLVED';
82
- * }
83
- *
84
- * get operationProgress(): number {
85
- * return this.futureHandler.progress;
86
- * }
87
- *
88
- * onFutureUpdate(future: IFutureModel): void {
89
- * // Handle progress updates from the active Future
90
- * console.log(`Brewing: ${future.progress}% complete`);
91
- * }
92
- * }
93
- * ```
27
+ * Future handler that tracks one Future at a time; adding a Future replaces
28
+ * the previous one. `@kosFutureAware` installs it as the model's
29
+ * `futureHandler`. `status` reads `NOT_RESOLVED` while no Future is held.
94
30
  *
95
31
  * @group KOS Model
96
32
  * @category Asynchronous Operations
@@ -1 +1 @@
1
- {"version":3,"file":"future-aware.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/future/future-aware.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,YAAY,EACZ,KAAK,gBAAgB,EACtB,MAAM,gBAAgB,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,qBAAa,qBAAqB,CAAC,CAAC,SAAS,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CACvE,YAAW,oBAAoB,CAAC,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAEvD,OAAO,CAAC,OAAO,CAA+B;IAC9C,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,SAAS,CAAiC;IAClD,OAAO,CAAC,SAAS,CAAC,CAAqB;gBAC3B,SAAS,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,EAAE,MAAM;IAQnE,IAAI,UAAU,sBAEb;IAED,IAAI,MAAM,gCAET;IACD,SAAS,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM;IAajD,YAAY,CAAC,KAAK,CAAC,EAAE,MAAM;IAM3B,SAAS,CAAC,KAAK,CAAC,EAAE,MAAM;IAKxB,IAAI,SAAS,iCAEZ;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,qBAAa,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CACnE,YAAW,oBAAoB,CAAC,CAAC,CAAC;IAElC,OAAO,CAAC,QAAQ,CAAC,CAAa;IAE9B,OAAO,CAAC,OAAO,CAAC,CAAkB;IAClC,OAAO,CAAC,SAAS,CAAC,CAAqB;gBAC3B,SAAS,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC;IAK1C,YAAY;IAMZ,IAAI,MAAM,gCAET;IACD,SAAS,IAAI,YAAY,CAAC,CAAC,CAAC,GAAG,SAAS;IAIxC,SAAS,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC;IAWjC,cAAc,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAEjE,IAAI,UAAU,sBAEb;IACD,IAAI,aAAa,WAEhB;IAED,IAAI,MAAM,WAET;IAED,IAAI,QAAQ,WAEX;IAEK,MAAM;CAUb"}
1
+ {"version":3,"file":"future-aware.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/future/future-aware.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,YAAY,EACZ,KAAK,gBAAgB,EACtB,MAAM,gBAAgB,CAAC;AAExB;;;;;;;;;GASG;AACH,qBAAa,qBAAqB,CAAC,CAAC,SAAS,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CACvE,YAAW,oBAAoB,CAAC,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAEvD,OAAO,CAAC,OAAO,CAA+B;IAC9C,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,SAAS,CAAiC;IAClD,OAAO,CAAC,SAAS,CAAC,CAAqB;gBAC3B,SAAS,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,EAAE,MAAM;IAQnE,IAAI,UAAU,sBAEb;IAED,IAAI,MAAM,gCAET;IACD,SAAS,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM;IAajD,YAAY,CAAC,KAAK,CAAC,EAAE,MAAM;IAM3B,SAAS,CAAC,KAAK,CAAC,EAAE,MAAM;IAKxB,IAAI,SAAS,iCAEZ;CACF;AAED;;;;;;;GAOG;AACH,qBAAa,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CACnE,YAAW,oBAAoB,CAAC,CAAC,CAAC;IAElC,OAAO,CAAC,QAAQ,CAAC,CAAa;IAE9B,OAAO,CAAC,OAAO,CAAC,CAAkB;IAClC,OAAO,CAAC,SAAS,CAAC,CAAqB;gBAC3B,SAAS,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC;IAK1C,YAAY;IAMZ,IAAI,MAAM,gCAET;IACD,SAAS,IAAI,YAAY,CAAC,CAAC,CAAC,GAAG,SAAS;IAIxC,SAAS,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC;IAWjC,cAAc,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAEjE,IAAI,UAAU,sBAEb;IACD,IAAI,aAAa,WAEhB;IAED,IAAI,MAAM,WAET;IAED,IAAI,QAAQ,WAEX;IAEK,MAAM;CAUb"}
@@ -21,8 +21,8 @@ export declare const mapDtoToFutureOptions: (dto: FutureResponse) => IFutureMode
21
21
  * Maps a `FutureResponse` DTO to an `IFutureModel` object.
22
22
  *
23
23
  * @remarks
24
- * This function will run as a mobx action ensuring that all observers are notified
25
- * if any changes are made.
24
+ * Runs as a single action, so readers of the model see one consistent update.
25
+ * A model that has already ended is left unchanged.
26
26
  *
27
27
  * @params dto - the Data Transfer Object received from the backend
28
28
  * @params model - the IModel to be update
@@ -51,32 +51,12 @@ declare class FutureModel implements IFutureModel {
51
51
  */
52
52
  cancelFuture(): Promise<void>;
53
53
  /**
54
- * Gets the current status of the future operation.
55
- *
56
- * @returns Status string: "NOT_ACTIVE", "IN_PROGRESS", "Success", or "Fail"
57
- *
58
- * @example Monitor Status
59
- * ```typescript
60
- * if (future.status === "IN_PROGRESS") {
61
- * console.log(`Operation running: ${future.progress}% complete`);
62
- * } else if (future.status === "Success") {
63
- * console.log("Operation completed successfully!");
64
- * }
65
- * ```
54
+ * Status of the operation: the `endState` once it has ended, otherwise
55
+ * `IN_PROGRESS` while progress is reported, or `NOT_ACTIVE`.
66
56
  */
67
57
  get status(): FutureEndState | "IN_PROGRESS" | "NOT_ACTIVE";
68
58
  /**
69
- * Gets human-readable time remaining for the operation.
70
- *
71
- * @returns Formatted time string (e.g., "5 minutes", "30 seconds") or empty string if unknown
72
- *
73
- * @example Display Time Remaining
74
- * ```typescript
75
- * const timeLeft = future.timeRemaining;
76
- * if (timeLeft) {
77
- * console.log(`${timeLeft} remaining`);
78
- * }
79
- * ```
59
+ * Remaining time as text, such as `"5 minutes"`, or an empty string when unknown.
80
60
  */
81
61
  get timeRemaining(): string;
82
62
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"future-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/future/future-model.ts"],"names":[],"mappings":"AACA,OAAO,EAOL,KAAK,kBAAkB,EACxB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,cAAc,EAGd,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAOxE,UAAU,WAAY,SAAQ,YAAY;CAAG;AAI7C;;;;;;;GAOG;AACH,cACM,WAAY,YAAW,YAAY;IACvC,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,aAAa,CAGuB;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;;;;OAQG;gBAED,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,kBAAkB;IAwB7B;;;;;;;OAOG;IACG,IAAI;IAIV;;OAEG;IACH,MAAM;IAMN;;;;;;;;;;OAUG;IACG,YAAY;IAgBlB;;;;;;;;;;;;;OAaG;IACH,IAAI,MAAM,kDAMT;IAED;;;;;;;;;;;;OAYG;IACH,IAAI,aAAa,WAoChB;IAID;;;;;;;;OAQG;IAIH,mBAAmB,CAAC,MAAM,EAAE,cAAc;CAM3C;AAED,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"future-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/future/future-model.ts"],"names":[],"mappings":"AACA,OAAO,EAOL,KAAK,kBAAkB,EACxB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,cAAc,EAGd,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAOxE,UAAU,WAAY,SAAQ,YAAY;CAAG;AAI7C;;;;;;;GAOG;AACH,cACM,WAAY,YAAW,YAAY;IACvC,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,aAAa,CAGuB;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;;;;OAQG;gBAED,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,kBAAkB;IAwB7B;;;;;;;OAOG;IACG,IAAI;IAIV;;OAEG;IACH,MAAM;IAMN;;;;;;;;;;OAUG;IACG,YAAY;IAgBlB;;;OAGG;IACH,IAAI,MAAM,kDAMT;IAED;;OAEG;IACH,IAAI,aAAa,WAoChB;IAID;;;;;;;;OAQG;IAIH,mBAAmB,CAAC,MAAM,EAAE,cAAc;CAM3C;AAED,eAAe,WAAW,CAAC"}