@kosdev-code/kos-ui-sdk 0.1.0-next.944 → 0.1.0-next.958

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (320) hide show
  1. package/.kos.json +2 -1
  2. package/common/events/async-event-bus.d.ts +2 -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/decorators/kos-child.d.ts +2 -3
  7. package/core/core/decorators/kos-child.d.ts.map +1 -1
  8. package/core/core/decorators/kos-companion.d.ts +25 -87
  9. package/core/core/decorators/kos-companion.d.ts.map +1 -1
  10. package/core/core/decorators/kos-container-aware-reconcile.test-d.d.ts +2 -0
  11. package/core/core/decorators/kos-container-aware-reconcile.test-d.d.ts.map +1 -0
  12. package/core/core/decorators/kos-container-aware.d.ts +191 -420
  13. package/core/core/decorators/kos-container-aware.d.ts.map +1 -1
  14. package/core/core/decorators/kos-execute-service-request.d.ts +7 -11
  15. package/core/core/decorators/kos-execute-service-request.d.ts.map +1 -1
  16. package/core/core/decorators/kos-execution-context.d.ts +14 -31
  17. package/core/core/decorators/kos-execution-context.d.ts.map +1 -1
  18. package/core/core/decorators/kos-future-aware.d.ts +21 -74
  19. package/core/core/decorators/kos-future-aware.d.ts.map +1 -1
  20. package/core/core/decorators/kos-http-decorators.d.ts +18 -62
  21. package/core/core/decorators/kos-http-decorators.d.ts.map +1 -1
  22. package/core/core/decorators/kos-logger-aware.d.ts +10 -60
  23. package/core/core/decorators/kos-logger-aware.d.ts.map +1 -1
  24. package/core/core/decorators/kos-model-effect.d.ts +10 -9
  25. package/core/core/decorators/kos-model-effect.d.ts.map +1 -1
  26. package/core/core/decorators/kos-multiple-future-aware.d.ts +21 -94
  27. package/core/core/decorators/kos-multiple-future-aware.d.ts.map +1 -1
  28. package/core/core/decorators/kos-reload-aware.d.ts +14 -16
  29. package/core/core/decorators/kos-reload-aware.d.ts.map +1 -1
  30. package/core/core/decorators/kos-service-request.d.ts +80 -238
  31. package/core/core/decorators/kos-service-request.d.ts.map +1 -1
  32. package/core/core/decorators/kos-state-machine.d.ts +35 -275
  33. package/core/core/decorators/kos-state-machine.d.ts.map +1 -1
  34. package/core/core/decorators/kos-trouble-aware.d.ts +9 -43
  35. package/core/core/decorators/kos-trouble-aware.d.ts.map +1 -1
  36. package/core/core/decorators/kos-view-model.d.ts +20 -100
  37. package/core/core/decorators/kos-view-model.d.ts.map +1 -1
  38. package/core/core/decorators/kosModel.d.ts.map +1 -1
  39. package/core/core/decorators/kosTopicHandler.d.ts +28 -89
  40. package/core/core/decorators/kosTopicHandler.d.ts.map +1 -1
  41. package/core/core/indexing/index.d.ts +2 -4
  42. package/core/core/indexing/index.d.ts.map +1 -1
  43. package/core/core/indexing/kos-container-index-aware.d.ts +17 -48
  44. package/core/core/indexing/kos-container-index-aware.d.ts.map +1 -1
  45. package/core/core/indexing/kos-index-aware.d.ts +11 -37
  46. package/core/core/indexing/kos-index-aware.d.ts.map +1 -1
  47. package/core/core/kos-container-model.d.ts +11 -32
  48. package/core/core/kos-container-model.d.ts.map +1 -1
  49. package/core/core/kos-data-container.d.ts +6 -6
  50. package/core/core/kos-data-container.d.ts.map +1 -1
  51. package/core/core/kosCore.d.ts +7 -4
  52. package/core/core/kosCore.d.ts.map +1 -1
  53. package/core/core/kosModel.d.ts +16 -8
  54. package/core/core/kosModel.d.ts.map +1 -1
  55. package/core/core/kosModelManager.d.ts +2 -3
  56. package/core/core/kosModelManager.d.ts.map +1 -1
  57. package/core/core/lifecycle/constants.d.ts +6 -2
  58. package/core/core/lifecycle/constants.d.ts.map +1 -1
  59. package/core/core/lifecycle/kosCoreLifecycle.d.ts +11 -1
  60. package/core/core/lifecycle/kosCoreLifecycle.d.ts.map +1 -1
  61. package/core/core/lifecycle/kosModelLifecycle.d.ts +6 -0
  62. package/core/core/lifecycle/kosModelLifecycle.d.ts.map +1 -1
  63. package/core/core/lifecycle/model-machine.d.ts +6 -0
  64. package/core/core/lifecycle/model-machine.d.ts.map +1 -1
  65. package/core/core/model/kos-fsm-manager.d.ts +6 -0
  66. package/core/core/model/kos-fsm-manager.d.ts.map +1 -1
  67. package/core/core/model/kos-offline-queue.d.ts +1 -1
  68. package/core/core/model/service-response-store.d.ts +2 -15
  69. package/core/core/model/service-response-store.d.ts.map +1 -1
  70. package/core/core/reconnect/reconnect-fixture.d.ts +17 -0
  71. package/core/core/reconnect/reconnect-fixture.d.ts.map +1 -0
  72. package/core/core/services/app-startup-service.d.ts +5 -13
  73. package/core/core/services/app-startup-service.d.ts.map +1 -1
  74. package/core/core/services/intent-service.d.ts +3 -12
  75. package/core/core/services/intent-service.d.ts.map +1 -1
  76. package/core/core/transport/mock/mock-frames.d.ts +3 -3
  77. package/core/core/transport/transport.d.ts +1 -1
  78. package/core/core/transport/transport.d.ts.map +1 -1
  79. package/core/core/transport/webSocketTransport.d.ts +10 -0
  80. package/core/core/transport/webSocketTransport.d.ts.map +1 -1
  81. package/core/types/model.d.ts +4 -8
  82. package/core/types/model.d.ts.map +1 -1
  83. package/core/types/service-response-store.d.ts +3 -11
  84. package/core/types/service-response-store.d.ts.map +1 -1
  85. package/core/types/utils/kos-fetch.d.ts +25 -37
  86. package/core/types/utils/kos-fetch.d.ts.map +1 -1
  87. package/core/util/abortable-when.d.ts +5 -6
  88. package/core/util/abortable-when.d.ts.map +1 -1
  89. package/core/util/ancestor-path-visitor.d.ts +14 -20
  90. package/core/util/ancestor-path-visitor.d.ts.map +1 -1
  91. package/core/util/container-utils.d.ts +26 -159
  92. package/core/util/container-utils.d.ts.map +1 -1
  93. package/core/util/date-utils.d.ts +9 -58
  94. package/core/util/date-utils.d.ts.map +1 -1
  95. package/core/util/debounce.d.ts +1 -8
  96. package/core/util/debounce.d.ts.map +1 -1
  97. package/core/util/kos-fetch.d.ts +1 -1
  98. package/core/util/kos-fetch.d.ts.map +1 -1
  99. package/core/util/kos-model-utils.d.ts +10 -11
  100. package/core/util/kos-model-utils.d.ts.map +1 -1
  101. package/core/util/model-attribute-utils.d.ts +5 -22
  102. package/core/util/model-attribute-utils.d.ts.map +1 -1
  103. package/core/util/promise-utils.d.ts +1 -26
  104. package/core/util/promise-utils.d.ts.map +1 -1
  105. package/core/util/service-factory.d.ts +5 -23
  106. package/core/util/service-factory.d.ts.map +1 -1
  107. package/core/util/service-request-error.d.ts +3 -5
  108. package/core/util/service-request-error.d.ts.map +1 -1
  109. package/core/util/service-response.d.ts +12 -67
  110. package/core/util/service-response.d.ts.map +1 -1
  111. package/core/util/transport-not-ready-error.d.ts +11 -13
  112. package/core/util/transport-not-ready-error.d.ts.map +1 -1
  113. package/core/util/when-ready.d.ts +1 -8
  114. package/core/util/when-ready.d.ts.map +1 -1
  115. package/index.cjs +144 -109
  116. package/index.cjs.map +1 -1
  117. package/index.js +173 -138
  118. package/index.js.map +1 -1
  119. package/models/decorators/future-service.d.ts +7 -7
  120. package/models/models/browser-router/browser-router-model.d.ts +10 -39
  121. package/models/models/browser-router/browser-router-model.d.ts.map +1 -1
  122. package/models/models/browser-router/browser-router-registration.d.ts +5 -77
  123. package/models/models/browser-router/browser-router-registration.d.ts.map +1 -1
  124. package/models/models/browser-router/types/index.d.ts +2 -16
  125. package/models/models/canvas-dispatcher/canvas-dispatcher-registration.d.ts +5 -77
  126. package/models/models/canvas-dispatcher/canvas-dispatcher-registration.d.ts.map +1 -1
  127. package/models/models/canvas-renderer/canvas-renderer-registration.d.ts +5 -75
  128. package/models/models/canvas-renderer/canvas-renderer-registration.d.ts.map +1 -1
  129. package/models/models/config-bean/config-bean-model-builder.d.ts +4 -11
  130. package/models/models/config-bean/config-bean-model-builder.d.ts.map +1 -1
  131. package/models/models/config-bean/config-bean-model.d.ts +23 -66
  132. package/models/models/config-bean/config-bean-model.d.ts.map +1 -1
  133. package/models/models/config-bean-prop/config-bean-prop-model.d.ts +15 -62
  134. package/models/models/config-bean-prop/config-bean-prop-model.d.ts.map +1 -1
  135. package/models/models/config-bean-prop/types/index.d.ts +34 -215
  136. package/models/models/device/device-model.d.ts +20 -199
  137. package/models/models/device/device-model.d.ts.map +1 -1
  138. package/models/models/device/device-registration.d.ts +7 -87
  139. package/models/models/device/device-registration.d.ts.map +1 -1
  140. package/models/models/device/types/index.d.ts +5 -34
  141. package/models/models/future/future-aware.d.ts +7 -71
  142. package/models/models/future/future-aware.d.ts.map +1 -1
  143. package/models/models/future/future-model-builder.d.ts +2 -2
  144. package/models/models/future/future-model.d.ts +3 -23
  145. package/models/models/future/future-model.d.ts.map +1 -1
  146. package/models/models/future/future-types.d.ts +28 -145
  147. package/models/models/future/future-types.d.ts.map +1 -1
  148. package/models/models/gpio-chip/gpio-chip-builders.d.ts +14 -0
  149. package/models/models/gpio-chip/gpio-chip-builders.d.ts.map +1 -0
  150. package/models/models/gpio-chip/gpio-chip-container-model.d.ts +2 -1
  151. package/models/models/gpio-chip/gpio-chip-container-model.d.ts.map +1 -1
  152. package/models/models/key-value/key-value-model.d.ts +12 -72
  153. package/models/models/key-value/key-value-model.d.ts.map +1 -1
  154. package/models/models/key-value/key-value-registration.d.ts +5 -77
  155. package/models/models/key-value/key-value-registration.d.ts.map +1 -1
  156. package/models/models/key-value/services/key-value-services.d.ts +13 -72
  157. package/models/models/key-value/services/key-value-services.d.ts.map +1 -1
  158. package/models/models/key-value/types/index.d.ts +3 -46
  159. package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts +32 -99
  160. package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts.map +1 -1
  161. package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts +2 -12
  162. package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts.map +1 -1
  163. package/models/models/kos-log-manager/kos-log-manager-model.d.ts +7 -46
  164. package/models/models/kos-log-manager/kos-log-manager-model.d.ts.map +1 -1
  165. package/models/models/kos-log-manager/kos-log-manager-registration.d.ts +5 -80
  166. package/models/models/kos-log-manager/kos-log-manager-registration.d.ts.map +1 -1
  167. package/models/models/kos-log-manager/types/index.d.ts +13 -156
  168. package/models/models/kos-time/kos-time-model.d.ts +8 -39
  169. package/models/models/kos-time/kos-time-model.d.ts.map +1 -1
  170. package/models/models/kos-time/kos-time-registration.d.ts +6 -73
  171. package/models/models/kos-time/kos-time-registration.d.ts.map +1 -1
  172. package/models/models/kos-time/types/index.d.ts +3 -58
  173. package/models/models/log-block/log-block-container-model.d.ts +2 -118
  174. package/models/models/log-block/log-block-container-model.d.ts.map +1 -1
  175. package/models/models/log-block/log-block-container-registration.d.ts +5 -75
  176. package/models/models/log-block/log-block-container-registration.d.ts.map +1 -1
  177. package/models/models/log-block/log-block-model.d.ts +5 -168
  178. package/models/models/log-block/log-block-model.d.ts.map +1 -1
  179. package/models/models/log-block/log-block-registration.d.ts +5 -75
  180. package/models/models/log-block/log-block-registration.d.ts.map +1 -1
  181. package/models/models/log-block/types/index.d.ts +14 -81
  182. package/models/models/log-stream/log-stream-container-model.d.ts +8 -35
  183. package/models/models/log-stream/log-stream-container-model.d.ts.map +1 -1
  184. package/models/models/log-stream/log-stream-container-registration.d.ts +5 -75
  185. package/models/models/log-stream/log-stream-container-registration.d.ts.map +1 -1
  186. package/models/models/log-stream/log-stream-model.d.ts +8 -29
  187. package/models/models/log-stream/log-stream-model.d.ts.map +1 -1
  188. package/models/models/log-stream/log-stream-registration.d.ts +5 -75
  189. package/models/models/log-stream/log-stream-registration.d.ts.map +1 -1
  190. package/models/models/log-stream/types/index.d.ts +5 -60
  191. package/models/models/network-interface/network-interface-container-model.d.ts +6 -35
  192. package/models/models/network-interface/network-interface-container-model.d.ts.map +1 -1
  193. package/models/models/network-interface/network-interface-container-registration.d.ts +5 -73
  194. package/models/models/network-interface/network-interface-container-registration.d.ts.map +1 -1
  195. package/models/models/network-interface/network-interface-model.d.ts +5 -43
  196. package/models/models/network-interface/network-interface-model.d.ts.map +1 -1
  197. package/models/models/network-interface/network-interface-registration.d.ts +5 -73
  198. package/models/models/network-interface/network-interface-registration.d.ts.map +1 -1
  199. package/models/models/network-interface/types/index.d.ts +2 -16
  200. package/models/models/ota/ota-model.d.ts +11 -39
  201. package/models/models/ota/ota-model.d.ts.map +1 -1
  202. package/models/models/ota/ota-registration.d.ts +5 -77
  203. package/models/models/ota/ota-registration.d.ts.map +1 -1
  204. package/models/models/ota/types/index.d.ts +2 -141
  205. package/models/models/region-info/types/index.d.ts +19 -99
  206. package/models/models/region-info/types/index.d.ts.map +1 -1
  207. package/models/models/software-info/services/software-info-services.d.ts +2 -14
  208. package/models/models/software-info/services/software-info-services.d.ts.map +1 -1
  209. package/models/models/software-info/software-info-model.d.ts +3 -39
  210. package/models/models/software-info/software-info-model.d.ts.map +1 -1
  211. package/models/models/software-info/software-info-registration.d.ts +6 -73
  212. package/models/models/software-info/software-info-registration.d.ts.map +1 -1
  213. package/models/models/software-info/types/index.d.ts +6 -20
  214. package/models/models/state-bean/state-bean-model.d.ts +10 -41
  215. package/models/models/state-bean/state-bean-model.d.ts.map +1 -1
  216. package/models/models/state-bean/state-bean-registration.d.ts +6 -73
  217. package/models/models/state-bean/state-bean-registration.d.ts.map +1 -1
  218. package/models/models/state-bean/types/index.d.ts +4 -84
  219. package/models/models/state-prop/state-prop-model.d.ts +6 -40
  220. package/models/models/state-prop/state-prop-model.d.ts.map +1 -1
  221. package/models/models/state-prop/state-prop-registration.d.ts +6 -73
  222. package/models/models/state-prop/state-prop-registration.d.ts.map +1 -1
  223. package/models/models/state-prop/types/index.d.ts +5 -37
  224. package/models/models/storage-device/storage-device-container-model.d.ts +7 -273
  225. package/models/models/storage-device/storage-device-container-model.d.ts.map +1 -1
  226. package/models/models/storage-device/storage-device-container-registration.d.ts +5 -75
  227. package/models/models/storage-device/storage-device-container-registration.d.ts.map +1 -1
  228. package/models/models/storage-device/storage-device-model.d.ts +3 -49
  229. package/models/models/storage-device/storage-device-model.d.ts.map +1 -1
  230. package/models/models/storage-device/storage-device-registration.d.ts +5 -75
  231. package/models/models/storage-device/storage-device-registration.d.ts.map +1 -1
  232. package/models/models/storage-device/types/index.d.ts +13 -82
  233. package/models/models/studio-properties/studio-properties-model.d.ts +13 -36
  234. package/models/models/studio-properties/studio-properties-model.d.ts.map +1 -1
  235. package/models/models/studio-properties/studio-properties-registration.d.ts +5 -75
  236. package/models/models/studio-properties/studio-properties-registration.d.ts.map +1 -1
  237. package/models/models/studio-properties/types/index.d.ts +2 -24
  238. package/models/models/translation/descriptor-merge.d.ts +13 -17
  239. package/models/models/translation/descriptor-merge.d.ts.map +1 -1
  240. package/models/models/translation/services/translation-services.d.ts +19 -77
  241. package/models/models/translation/services/translation-services.d.ts.map +1 -1
  242. package/models/models/translation/test-harness.d.ts +6 -8
  243. package/models/models/translation/test-harness.d.ts.map +1 -1
  244. package/models/models/translation/translation-container-model.d.ts +7 -59
  245. package/models/models/translation/translation-container-model.d.ts.map +1 -1
  246. package/models/models/translation/translation-container-registration.d.ts +6 -73
  247. package/models/models/translation/translation-container-registration.d.ts.map +1 -1
  248. package/models/models/translation/translation-model.d.ts +17 -50
  249. package/models/models/translation/translation-model.d.ts.map +1 -1
  250. package/models/models/translation/translation-registration.d.ts +6 -73
  251. package/models/models/translation/translation-registration.d.ts.map +1 -1
  252. package/models/models/translation/types/index.d.ts +51 -276
  253. package/models/models/trouble/trouble-registration.d.ts +6 -73
  254. package/models/models/trouble/trouble-registration.d.ts.map +1 -1
  255. package/models/models/trouble/types/index.d.ts +17 -188
  256. package/models/models/trouble/utils/is-trouble-aware.d.ts +4 -85
  257. package/models/models/trouble/utils/is-trouble-aware.d.ts.map +1 -1
  258. package/models/models/trouble-container/trouble-builders.d.ts +11 -0
  259. package/models/models/trouble-container/trouble-builders.d.ts.map +1 -0
  260. package/models/models/trouble-container/trouble-container-model.d.ts +2 -1
  261. package/models/models/trouble-container/trouble-container-model.d.ts.map +1 -1
  262. package/models/models/usb-update/usb-update-container-registration.d.ts +5 -75
  263. package/models/models/usb-update/usb-update-container-registration.d.ts.map +1 -1
  264. package/models/models/usb-update/usb-update-registration.d.ts +5 -75
  265. package/models/models/usb-update/usb-update-registration.d.ts.map +1 -1
  266. package/models/types/cancellable-promise.d.ts +6 -9
  267. package/models/types/cancellable-promise.d.ts.map +1 -1
  268. package/models/utils/await-future-call.d.ts +9 -21
  269. package/models/utils/await-future-call.d.ts.map +1 -1
  270. package/models/utils/cancellable-future-call.d.ts +8 -19
  271. package/models/utils/cancellable-future-call.d.ts.map +1 -1
  272. package/models/utils/cancellable-service.d.ts +14 -23
  273. package/models/utils/cancellable-service.d.ts.map +1 -1
  274. package/models/utils/conversion-utils.d.ts +8 -48
  275. package/models/utils/conversion-utils.d.ts.map +1 -1
  276. package/models/utils/persistence-store.d.ts +1 -1
  277. package/models/utils/service.d.ts +14 -48
  278. package/models/utils/service.d.ts.map +1 -1
  279. package/models/utils/services/kos/daily/service.d.ts +4 -4
  280. package/models/utils/services/vfs/daily/service.d.ts +4 -4
  281. package/models/utils/timer-manager.d.ts.map +1 -1
  282. package/package.json +3 -3
  283. package/{software-info-registration-CKlTQPet.js → software-info-registration-C8kf-pBB.js} +551 -530
  284. package/software-info-registration-C8kf-pBB.js.map +1 -0
  285. package/{software-info-registration-GUbTY4KD.cjs → software-info-registration-Y1iADHWT.cjs} +522 -501
  286. package/software-info-registration-Y1iADHWT.cjs.map +1 -0
  287. package/testing/index.d.ts +28 -33
  288. package/testing/index.d.ts.map +1 -1
  289. package/testing.cjs +1 -1
  290. package/testing.cjs.map +1 -1
  291. package/testing.js +1 -1
  292. package/testing.js.map +1 -1
  293. package/ui/components/connection-dev-button/connection-dev-button-styles.d.ts +9 -0
  294. package/ui/components/connection-dev-button/connection-dev-button-styles.d.ts.map +1 -0
  295. package/ui/components/connection-dev-button/index.d.ts +36 -0
  296. package/ui/components/connection-dev-button/index.d.ts.map +1 -0
  297. package/ui/components/connection-dev-button/use-connection-dev-state.d.ts +29 -0
  298. package/ui/components/connection-dev-button/use-connection-dev-state.d.ts.map +1 -0
  299. package/ui/components/index.d.ts +1 -0
  300. package/ui/components/index.d.ts.map +1 -1
  301. package/ui/features/canvas/hooks/use-image-renderer.d.ts +5 -4
  302. package/ui/features/canvas/hooks/use-image-renderer.d.ts.map +1 -1
  303. package/ui/hooks/use-function-warmup.d.ts +4 -14
  304. package/ui/hooks/use-function-warmup.d.ts.map +1 -1
  305. package/ui/hooks/use-kos-date-formats.d.ts +15 -29
  306. package/ui/hooks/use-kos-date-formats.d.ts.map +1 -1
  307. package/ui/hooks/use-kos-region-timezones.d.ts +4 -55
  308. package/ui/hooks/use-kos-region-timezones.d.ts.map +1 -1
  309. package/ui/hooks/use-kos-regions.d.ts +11 -23
  310. package/ui/hooks/use-kos-regions.d.ts.map +1 -1
  311. package/ui/hooks/use-kos-time-formats.d.ts +16 -31
  312. package/ui/hooks/use-kos-time-formats.d.ts.map +1 -1
  313. package/ui/hooks/use-kos-unit-systems.d.ts +13 -27
  314. package/ui/hooks/use-kos-unit-systems.d.ts.map +1 -1
  315. package/ui/hooks/view-model/use-view-model.d.ts +6 -31
  316. package/ui/hooks/view-model/use-view-model.d.ts.map +1 -1
  317. package/ui/policies/reload-on-disconnect-policy.d.ts +5 -6
  318. package/ui/policies/reload-on-disconnect-policy.d.ts.map +1 -1
  319. package/software-info-registration-CKlTQPet.js.map +0 -1
  320. package/software-info-registration-GUbTY4KD.cjs.map +0 -1
@@ -4,16 +4,16 @@ export interface FutureProps {
4
4
  alias?: string;
5
5
  namespace?: string;
6
6
  /**
7
- * Enable automatic AbortController integration
8
- * When true, the decorator will inject an AbortSignal as the last parameter
9
- * and set up bi-directional cancellation between Future and HTTP requests
10
- * @default true
7
+ * Enable AbortController integration. When true, the decorator passes an
8
+ * AbortSignal as the last argument and links cancellation both ways: cancelling
9
+ * the Future aborts the request, and aborting the request cancels the Future.
10
+ * @default false
11
11
  */
12
12
  abortController?: boolean;
13
13
  /**
14
- * Tracker injection policy
15
- * - 'id': Inject tracker ID as last string parameter (default, preserves existing behavior)
16
- * - 'context': Inject tracker ID into execution context object as $tracker property
14
+ * How the tracker id is passed to the method:
15
+ * - 'id': appended as the last argument (the default)
16
+ * - 'context': set as `$tracker` on the execution context argument
17
17
  * @default 'id'
18
18
  */
19
19
  trackerPolicy?: "id" | "context";
@@ -2,47 +2,18 @@ import { IKosDataModel, IKosIdentifiable, KosCreationContext, KosMethodTypes, Ko
2
2
  import { BrowserRouterOptions } from './types';
3
3
  export declare const MODEL_TYPE = "browser-router-model";
4
4
  /**
5
- * BrowserRouter - HTTP routing and middleware management for KOS web services.
6
- *
7
- * The BrowserRouter model provides a comprehensive HTTP routing system that handles incoming
8
- * requests via WebSocket topics and routes them through registered middleware and handlers.
9
- * It enables KOS applications to expose REST APIs, handle device communication, and manage
10
- * HTTP-based integrations with automatic OpenAPI specification generation.
11
- *
12
- * ## Key Features
13
- * - **Topic-Based HTTP Handling** - Processes HTTP requests via `kos.http.request` topic
14
- * - **Middleware Support** - Chain multiple middleware functions for request processing
15
- * - **Route Management** - Dynamic registration, removal, and inspection of routes
16
- * - **OpenAPI Generation** - Automatic API documentation at `/openapi.json`
17
- * - **Request/Response Abstraction** - Familiar Express.js-style request/response objects
18
- * - **Method Support** - Full HTTP method support (GET, POST, PUT, DELETE, PATCH)
19
- *
20
- * ## Topic-Based Reactivity
21
- * The model listens to these KOS topics for HTTP request handling:
22
- * - **`kos.http.request`** - Incoming HTTP requests from clients or other services
23
- * - **`kos.http.response`** - Outgoing HTTP responses with status codes and data
24
- *
25
- * ## Common Use Cases
26
- * - **REST API Endpoints** - Expose device data and control APIs
27
- * - **Webhook Handlers** - Process incoming webhooks from external services
28
- * - **Inter-Service Communication** - Handle requests between KOS services
29
- * - **Device Integration** - Bridge HTTP protocols with KOS messaging
30
- * - **API Gateway** - Route and transform requests to downstream services
5
+ * Serves HTTP-style requests addressed to this browser client. Requests arrive
6
+ * on the `kos.http.request` topic, run through the routes and middleware
7
+ * registered with `use`, and their responses go back on `kos.http.response`.
8
+ * A request for `/openapi.json` returns an OpenAPI description of the
9
+ * registered routes.
31
10
  *
32
11
  * @interface
33
- * @example Basic Usage
12
+ * @example
34
13
  * ```typescript
35
- * const router = KosBrowserRouter.instance('main-router')
36
- * .options({})
37
- * .build();
38
- *
39
- * // Register HTTP endpoints with middleware support
40
- * router.use('GET', '/api/status', async (req, res) => {
41
- * res.send({ status: 'online' });
42
- * });
43
- *
44
- * router.use('POST', '/api/commands', validateAuth, async (req, res) => {
45
- * res.status(200).send({ success: true });
14
+ * const router = BrowserRouter.instance().options({}).build();
15
+ * router.use("GET", "/api/status", async (req, res) => {
16
+ * res.send({ status: "online" });
46
17
  * });
47
18
  * ```
48
19
  *
@@ -77,7 +48,7 @@ export declare class BrowserRouterModelImpl implements IKosDataModel, IKosIdenti
77
48
  private handleRequest;
78
49
  /**
79
50
  * Registers a route with optional middleware chain.
80
- * @param method HTTP method (GET, POST, PUT, DELETE, PATCH)
51
+ * @param method HTTP method (GET, POST, PUT, DELETE)
81
52
  * @param path Route path pattern with parameter support
82
53
  * @param middlewares Middleware functions and final handler
83
54
  */
@@ -1 +1 @@
1
- {"version":3,"file":"browser-router-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/browser-router/browser-router-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,gBAAgB,EAErB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,aAAa,EAKlB,KAAK,oBAAoB,EAE1B,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,eAAO,MAAM,UAAU,yBAAyB,CAAC;AAKjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,oBAAoB,CAAC,sBAAsB,CAAC,EAC5C,MAAM,GAAG,MAAM,CAChB,CAAC;AAEF;;;GAGG;AACH,qBACa,sBAAuB,YAAW,aAAa,EAAE,gBAAgB;IAC5E,sDAAsD;IACtD,OAAO,CAAC,GAAG,CAAS;IACpB,6DAA6D;IAC7D,OAAO,CAAC,MAAM,CAAmB;IACjC,+DAA+D;IAC/D,OAAO,CAAC,MAAM,CAAmB;gBAE/B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,oBAAoB,EAC9B,OAAO,EAAE,kBAAkB;IAO7B,gCAAgC;IAChC,IAAI,EAAE,IAAI,MAAM,CAEf;IAED;;;;;OAKG;YAIW,aAAa;IA2C3B;;;;;OAKG;IACH,GAAG,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,EAC/B,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,KAAK,EACX,GAAG,WAAW,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE,GACrC,IAAI;IAIP;;;;;OAKG;IACH,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IAIpD;;;;OAIG;IACH,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAItC;;;OAGG;IACH,SAAS,IAAI,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAKpD;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAG5B"}
1
+ {"version":3,"file":"browser-router-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/browser-router/browser-router-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,gBAAgB,EAErB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,aAAa,EAKlB,KAAK,oBAAoB,EAE1B,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,eAAO,MAAM,UAAU,yBAAyB,CAAC;AAKjD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,oBAAoB,CAAC,sBAAsB,CAAC,EAC5C,MAAM,GAAG,MAAM,CAChB,CAAC;AAEF;;;GAGG;AACH,qBACa,sBAAuB,YAAW,aAAa,EAAE,gBAAgB;IAC5E,sDAAsD;IACtD,OAAO,CAAC,GAAG,CAAS;IACpB,6DAA6D;IAC7D,OAAO,CAAC,MAAM,CAAmB;IACjC,+DAA+D;IAC/D,OAAO,CAAC,MAAM,CAAmB;gBAE/B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,oBAAoB,EAC9B,OAAO,EAAE,kBAAkB;IAO7B,gCAAgC;IAChC,IAAI,EAAE,IAAI,MAAM,CAEf;IAED;;;;;OAKG;YAIW,aAAa;IA2C3B;;;;;OAKG;IACH,GAAG,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,EAC/B,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,KAAK,EACX,GAAG,WAAW,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE,GACrC,IAAI;IAIP;;;;;OAKG;IACH,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IAIpD;;;;OAIG;IACH,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAItC;;;OAGG;IACH,SAAS,IAAI,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAKpD;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAG5B"}
@@ -2,87 +2,15 @@ import { SingletonKosModelRegistrationFactory } from '../../../core';
2
2
  import { KosBrowserRouter } from './browser-router-model';
3
3
  import { BrowserRouterOptions } from './types';
4
4
  /**
5
- * # BrowserRouter
6
- *
7
- * The registration bean includes convenience methods for creating and working with BrowserRouterModel instances.
8
- *
9
- * ## type
10
- * The type property is a string that identifies the model type.
11
- * The type is used to identify the model type in the model registry and to narrow down the model type in type predicates. It's most frequently
12
- * used when declaring dependencies on models.
13
- *
14
- * @example
15
- * ```typescript
16
- *
17
- * @kosDependency({modelType: BrowserRouter.type, id: "browserRouterId"})
18
- * private browserRouterModel: BrowserRouterModel;
19
- * ```
20
- *
21
- *
22
- * ## factory
23
- *
24
- * The factory method creates a factory function that can be used to create new BrowserRouterModel instances.
25
- *
26
-
27
- * As this is a singleton model, the factory function accepts the model options as its argument.
28
- *
29
- * If a model with the same model type already exists, the factory function will return the existing model. The options will be ignored
30
- * in this case and the existing model will be returned in its current state.
31
- *
32
- * @example
33
- * ```typescript
34
- * const model = BrowserRouter.factory({
35
- * // Add option data
36
- * });
37
- * ```
38
-
39
-
40
- *
41
- * ## predicate
42
- *
43
- * [Typescript type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) function that will identify and narrow down a model to a BrowserRouterModel.
44
- *
45
- * @example
46
- * ```typescript
47
- *
48
- * const model: IKosDataModel = ...; // some model
49
- *
50
- * if (BrowserRouter.predicate(model)) {
51
- * // if the function evaluates to true, the model is narrowed down to BrowserRouterModel
52
- * // and the compiler will know that the model has the BrowserRouterModel interface
53
- * model.updateAvailability(false);
54
- * }
55
- * ```
56
- *
57
- * ## registration
58
- *
59
- * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
60
- * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
5
+ * Registration for {@link KosBrowserRouter}, a singleton model.
61
6
  *
7
+ * `type` identifies the model in the registry and in `@kosDependency` declarations.
8
+ * `register()` adds the model to the registry. `instance()` builds or returns the single instance; later calls ignore the options.
62
9
  *
63
10
  * @example
64
- *
65
- * In an application registration file you can declare the model registration as follows:
66
- *
67
- * **registration.ts**
68
11
  * ```typescript
69
- * import { BrowserRouter } from "@kos-ui/project-models";
70
- * import { KosModelRegistry } from "@kosdev-code/kos-dispense-sdk";
71
- *
72
- * import { initKosProvider } from "@kosdev-code/kos-ui-sdk";
73
- *
74
- * KosModelRegistry.dispense
75
- * .models()
76
- * .model(BrowserRouter);
12
+ * const model = BrowserRouter.instance().options(options).build();
77
13
  * ```
78
- *
79
- * ## registration.singleton
80
-
81
- * The browserRouter model is a singleton model. This means that each time the factory function is called , the same instance will be returned.
82
- * If the model does not yet exist, it will be created passing in the provided options to initialize it.
83
- *
84
- * Singleton models don't require an ID as they will use the model type as their ID to guarantee uniqueness throughout the system.
85
-
86
- * */
14
+ */
87
15
  export declare const BrowserRouter: SingletonKosModelRegistrationFactory<KosBrowserRouter, BrowserRouterOptions>;
88
16
  //# sourceMappingURL=browser-router-registration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"browser-router-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/browser-router/browser-router-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkFK;AACL,eAAO,MAAM,aAAa,8EAMxB,CAAC"}
1
+ {"version":3,"file":"browser-router-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/browser-router/browser-router-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,8EAMxB,CAAC"}
@@ -1,20 +1,6 @@
1
1
  /**
2
- * Configuration options for BrowserRouter model instances.
3
- *
4
- * The BrowserRouter operates without specific configuration options, providing
5
- * a zero-configuration HTTP routing solution. All routing behavior is controlled
6
- * through route registration and middleware during model initialization.
7
- *
8
- * @example Basic Usage
9
- * ```typescript
10
- * const router = KosBrowserRouter.instance('api-router')
11
- * .options({})
12
- * .build();
13
- *
14
- * router.use('GET', '/api/status', async (req, res) => {
15
- * res.send({ status: 'healthy' });
16
- * });
17
- * ```
2
+ * Options for a {@link KosBrowserRouter}. The router takes none; routes are
3
+ * registered with `use`.
18
4
  *
19
5
  * @kosService core.browser-router
20
6
  * @group KOS Model
@@ -2,87 +2,15 @@ import { SingletonKosModelRegistrationFactory } from '../../../core';
2
2
  import { CanvasDispatcherModel } from './canvas-dispatcher-model';
3
3
  import { CanvasDispatcherOptions } from './types';
4
4
  /**
5
- * # CanvasDispatcher
6
- *
7
- * The registration bean includes convenience methods for creating and working with CanvasDispatcherModel instances.
8
- *
9
- * ## type
10
- * The type property is a string that identifies the model type.
11
- * The type is used to identify the model type in the model registry and to narrow down the model type in type predicates. It's most frequently
12
- * used when declaring dependencies on models.
13
- *
14
- * @example
15
- * ```typescript
16
- *
17
- * @kosDependency({modelType: CanvasDispatcher.type, id: "canvasDispatcherId"})
18
- * private canvasDispatcherModel: CanvasDispatcherModel;
19
- * ```
20
- *
21
- *
22
- * ## factory
23
- *
24
- * The factory method creates a factory function that can be used to create new CanvasDispatcherModel instances.
25
- *
26
-
27
- * As this is a singleton model, the factory function accepts the model options as its argument.
28
- *
29
- * If a model with the same model type already exists, the factory function will return the existing model. The options will be ignored
30
- * in this case and the existing model will be returned in its current state.
31
- *
32
- * @example
33
- * ```typescript
34
- * const model = CanvasDispatcher.factory({
35
- * // Add option data
36
- * });
37
- * ```
38
-
39
-
40
- *
41
- * ## predicate
42
- *
43
- * [Typescript type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) function that will identify and narrow down a model to a CanvasDispatcherModel.
44
- *
45
- * @example
46
- * ```typescript
47
- *
48
- * const model: IKosDataModel = ...; // some model
49
- *
50
- * if (CanvasDispatcher.predicate(model)) {
51
- * // if the function evaluates to true, the model is narrowed down to CanvasDispatcherModel
52
- * // and the compiler will know that the model has the CanvasDispatcherModel interface
53
- * model.updateAvailability(false);
54
- * }
55
- * ```
56
- *
57
- * ## registration
58
- *
59
- * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
60
- * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
5
+ * Registration for {@link CanvasDispatcherModel}, a singleton model.
61
6
  *
7
+ * `type` identifies the model in the registry and in `@kosDependency` declarations.
8
+ * `register()` adds the model to the registry. `instance()` builds or returns the single instance; later calls ignore the options.
62
9
  *
63
10
  * @example
64
- *
65
- * In an application registration file you can declare the model registration as follows:
66
- *
67
- * **registration.ts**
68
11
  * ```typescript
69
- * import { CanvasDispatcher } from "@kos-ui/project-models";
70
- * import { KosModelRegistry } from "@kosdev-code/kos-dispense-sdk";
71
- *
72
- * import { initKosProvider } from "@kosdev-code/kos-ui-sdk";
73
- *
74
- * KosModelRegistry.dispense
75
- * .models()
76
- * .model(CanvasDispatcher);
12
+ * const model = CanvasDispatcher.instance().options(options).build();
77
13
  * ```
78
- *
79
- * ## registration.singleton
80
-
81
- * The canvasDispatcher model is a singleton model. This means that each time the factory function is called , the same instance will be returned.
82
- * If the model does not yet exist, it will be created passing in the provided options to initialize it.
83
- *
84
- * Singleton models don't require an ID as they will use the model type as their ID to guarantee uniqueness throughout the system.
85
-
86
- * */
14
+ */
87
15
  export declare const CanvasDispatcher: SingletonKosModelRegistrationFactory<CanvasDispatcherModel, CanvasDispatcherOptions>;
88
16
  //# sourceMappingURL=canvas-dispatcher-registration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"canvas-dispatcher-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/canvas-dispatcher/canvas-dispatcher-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAKvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkFK;AACL,eAAO,MAAM,gBAAgB,sFAM3B,CAAC"}
1
+ {"version":3,"file":"canvas-dispatcher-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/canvas-dispatcher/canvas-dispatcher-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAKvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,sFAM3B,CAAC"}
@@ -2,85 +2,15 @@ import { KosModelRegistrationFactory } from '../../../core/core/registration';
2
2
  import { CanvasRendererModel } from './canvas-renderer-model';
3
3
  import { CanvasRendererOptions } from './types';
4
4
  /**
5
- * # CanvasRenderer
5
+ * Registration for {@link CanvasRendererModel}.
6
6
  *
7
- * The registration bean includes convenience methods for creating and working with CanvasRendererModel instances.
8
- *
9
- * ## type
10
- * The type property is a string that identifies the model type.
11
- * The type is used to identify the model type in the model registry and to narrow down the model type in type predicates. It's most frequently
12
- * used when declaring dependencies on models.
13
- *
14
- * @example
15
- * ```typescript
16
- *
17
- * @kosDependency({modelType: CanvasRenderer.type, id: "canvasRendererId"})
18
- * private canvasRendererModel: CanvasRendererModel;
19
- * ```
20
- *
21
- *
22
- * ## factory
23
- *
24
- * The factory method creates a factory function that can be used to create new CanvasRendererModel instances.
25
- *
26
-
27
- * The factory function is a curried function that takes the model id as the first argument and the options as the second argument.
28
- *
29
- * If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored
30
- * in this case and the existing model will be returned in its current state.
7
+ * `type` identifies the model in the registry and in `@kosDependency` declarations.
8
+ * `register()` adds the model to the registry. `instance(id)` builds the model, or returns the existing one when the id is already in use.
31
9
  *
32
10
  * @example
33
11
  * ```typescript
34
- * const model = CanvasRenderer.factory("canvasRendererId")({
35
- * // Add option data
36
- * });
12
+ * const model = CanvasRenderer.instance("canvasRendererId").options(options).build();
37
13
  * ```
38
-
39
-
40
- *
41
- * ## predicate
42
- *
43
- * [Typescript type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) function that will identify and narrow down a model to a CanvasRendererModel.
44
- *
45
- * @example
46
- * ```typescript
47
- *
48
- * const model: IKosDataModel = ...; // some model
49
- *
50
- * if (CanvasRenderer.predicate(model)) {
51
- * // if the function evaluates to true, the model is narrowed down to CanvasRendererModel
52
- * // and the compiler will know that the model has the CanvasRendererModel interface
53
- * model.updateAvailability(false);
54
- * }
55
- * ```
56
- *
57
- * ## registration
58
- *
59
- * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
60
- * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
61
- *
62
- *
63
- * @example
64
- *
65
- * In an application registration file you can declare the model registration as follows:
66
- *
67
- * **registration.ts**
68
- * ```typescript
69
- * import { CanvasRenderer } from "@kos-ui/project-models";
70
- * import { KosModelRegistry } from "@kosdev-code/kos-dispense-sdk";
71
- *
72
- * import { initKosProvider } from "@kosdev-code/kos-ui-sdk";
73
- *
74
- * KosModelRegistry.dispense
75
- * .models()
76
- * .model(CanvasRenderer);
77
- * ```
78
- *
79
- * ## registration.singleton
80
-
81
- * The canvasRenderer model is NOT a singleton model. This means that each time the factory function is called with a unique ID, a new model instance will be created.
82
- * If the factory function is called with an ID that already exists, the existing model will be returned.
83
-
84
- * */
14
+ */
85
15
  export declare const CanvasRenderer: KosModelRegistrationFactory<CanvasRendererModel, CanvasRendererOptions>;
86
16
  //# sourceMappingURL=canvas-renderer-registration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"canvas-renderer-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/canvas-renderer/canvas-renderer-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgFK;AACL,eAAO,MAAM,cAAc,yEAMzB,CAAC"}
1
+ {"version":3,"file":"canvas-renderer-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/canvas-renderer/canvas-renderer-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,yEAMzB,CAAC"}
@@ -7,8 +7,7 @@ export declare function evaluateScopes(scopes?: ConfigScope[]): {};
7
7
  * Maps a `ConfigBeanResponse` DTO to an `IConfigBeanModel` object.
8
8
  *
9
9
  * @remarks
10
- * This function will run as a mobx action ensuring that all observers are notified
11
- * if any changes are made.
10
+ * Runs as a single action, so readers of the model see one consistent update.
12
11
  *
13
12
  * @params dto - the Data Transfer Object received from the backend
14
13
  * @params model - the IModel to be update
@@ -36,15 +35,9 @@ export declare const mapUpdateDtoToConfigBeanModel: (dto: ConfigBeanUpdateRespon
36
35
  */
37
36
  export declare const mapConfigBeanModelToDto: (model: IConfigBeanModel) => ConfigBeanRequest;
38
37
  /**
39
- * Curried function that will produce a function that can be used to retreive or create
40
- * new instances of a `IConfigBeanModel` given an ID and options.
41
- *
42
- * @remarks
43
- * This serves as a conveinience allowing for models to consumers to use a shorthand method when
44
- * multiple models need to be created.
45
- * The first level of function will accept a KOS Model Factory and return a function that can accept a single
46
- * model ID parameeter. This will return a factory function that can accept a model options parameter and
47
- * instantiate a new instance of a model or retreive a an existing model.
38
+ * Curried factory for `IConfigBeanModel` instances: takes a KOS model factory,
39
+ * then a model id, then the options, and returns a new model or the existing
40
+ * one with that id.
48
41
  *
49
42
  * @param factory - the model factory to be used
50
43
  * @returns - an instance of the `IConfigBeanModel` that was either created
@@ -1 +1 @@
1
- {"version":3,"file":"config-bean-model-builder.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/config-bean/config-bean-model-builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EAExB,KAAK,WAAW,EACjB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAEnE,wBAAgB,cAAc,CAAC,MAAM,GAAE,WAAW,EAAO,MAQxD;AAsBD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,uBAAuB,GAClC,KAAK,kBAAkB,EACvB,OAAO,gBAAgB,SAWxB,CAAC;AAEF,eAAO,MAAM,6BAA6B,GACxC,KAAK,wBAAwB,EAC7B,OAAO,gBAAgB,SA4CxB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,uBAAuB,GAAI,OAAO,gBAAgB,sBAI9D,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,oBAAoB,GAC9B,SAAS,YAAY,CAAC,gBAAgB,EAAE,uBAAuB,CAAC,MAChE,SAAS,MAAM,MACf,mBAAmB,uBAAuB,qBAG1C,CAAC"}
1
+ {"version":3,"file":"config-bean-model-builder.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/config-bean/config-bean-model-builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EAExB,KAAK,WAAW,EACjB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAEnE,wBAAgB,cAAc,CAAC,MAAM,GAAE,WAAW,EAAO,MAQxD;AAsBD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB,GAClC,KAAK,kBAAkB,EACvB,OAAO,gBAAgB,SAWxB,CAAC;AAEF,eAAO,MAAM,6BAA6B,GACxC,KAAK,wBAAwB,EAC7B,OAAO,gBAAgB,SA4CxB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,uBAAuB,GAAI,OAAO,gBAAgB,sBAI9D,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,oBAAoB,GAC9B,SAAS,YAAY,CAAC,gBAAgB,EAAE,uBAAuB,CAAC,MAChE,SAAS,MAAM,MACf,mBAAmB,uBAAuB,qBAG1C,CAAC"}
@@ -3,47 +3,18 @@ import { ConfigBeanKeys, IConfigBeanModelOptions } from './config-bean-types';
3
3
  import { ConfigBeanUpdateResponse } from '../../services/config-bean';
4
4
  import { ConfigPropertyTypes } from '../types';
5
5
  /**
6
- * ConfigBean - Reactive hierarchical configuration management for KOS devices.
6
+ * A device config bean: the attributes stored at one config path, such as
7
+ * `system:app` or `kos:service:CANPumpMgr`, with their schema. The model loads
8
+ * the bean and its schema on load, stays current through the
9
+ * `/kos/config/{path}` topic, and writes changes back with `updateProperty`.
7
10
  *
8
- * The ConfigBean model provides reactive access to hierarchical configuration data from KOS devices
9
- * with real-time synchronization via WebSocket topics, schema-based validation, and transactional
10
- * updates. Essential for building configuration interfaces and managing device operational parameters.
11
+ * Declare one on a model with `@kosConfigBean`, or a single attribute with
12
+ * `@kosConfigProperty`.
11
13
  *
12
- * ## Key Features
13
- * - **Hierarchical Configuration** - Access nested configuration structures using path notation
14
- * - **Real-Time Synchronization** - Automatic updates via `/kos/config/{path}` WebSocket topic
15
- * - **Schema-Based Validation** - Built-in validation using device configuration schemas
16
- * - **Transactional Updates** - Atomic configuration changes with rollback support
17
- * - **Type-Safe Access** - Strongly typed property access with TypeScript support
18
- * - **Reactive Properties** - Automatic UI updates when configuration changes
19
- *
20
- * ## Configuration Path Patterns
21
- * ConfigBean supports hierarchical paths that mirror device system organization:
22
- * - **System Level**: `system:app` - Machine identity, operational modes
23
- * - **Service Level**: `kos:service:CANPumpMgr` - KOS service configurations
24
- * - **Hardware Level**: `assembly:core:board:macro:pump:water` - Component settings
25
- * - **Application Level**: `app:scheduling:dayWiseLockConfigMap` - Application-specific settings
26
- *
27
- * ## Common Use Cases
28
- * - **Configuration Interfaces** - Build reactive configuration management screens
29
- * - **Operational Parameter Control** - Real-time adjustment of device behavior
30
- * - **Schema-Driven Forms** - Generate configuration UIs from device schemas
31
- * - **System Administration** - Centralized device configuration management
32
- * - **Bulk Configuration Updates** - Transactional updates across multiple properties
33
- *
34
- * @example Basic Configuration Management
14
+ * @example
35
15
  * ```typescript
36
- * const systemConfig = ConfigBean.instance('system-config')
37
- * .options({ path: 'system:app' })
38
- * .build();
39
- *
40
- * // Access current configuration values
41
- * const machineId = systemConfig.values.machineId;
42
- * const debugMode = systemConfig.values.debugMode;
43
- *
44
- * // Update configuration properties
45
- * await systemConfig.updateProperty('debugMode', true);
46
- * await systemConfig.updateProperty('machineId', 'MACHINE-001');
16
+ * @kosConfigBean({ path: "system:app" })
17
+ * appConfig!: IConfigBeanModel;
47
18
  * ```
48
19
  *
49
20
  * @interface
@@ -98,16 +69,9 @@ declare class ConfigBeanModelImpl<T extends {} = any> implements IKosDataModel {
98
69
  */
99
70
  constructor(modelId: string, options: IConfigBeanModelOptions);
100
71
  /**
101
- * Gets current configuration property values.
72
+ * Current values of all the bean's attributes.
102
73
  *
103
74
  * @returns Object containing all configuration properties with their current values
104
- *
105
- * @example Access Configuration Values
106
- * ```typescript
107
- * const currentValues = systemConfig.values;
108
- * console.log('Machine ID:', currentValues.machineId);
109
- * console.log('Debug Mode:', currentValues.debugMode);
110
- * ```
111
75
  */
112
76
  get values(): Record<keyof T, unknown>[keyof T][];
113
77
  /**
@@ -118,11 +82,18 @@ declare class ConfigBeanModelImpl<T extends {} = any> implements IKosDataModel {
118
82
  * @internal
119
83
  *
120
84
  * @remarks
121
- * No action is taken as part of the load lifecycle method.
122
- *
123
- * In future additional information about the workspace could be loaded
85
+ * Fetches the bean's values and schema.
124
86
  */
125
87
  load(): Promise<void>;
88
+ /**
89
+ * @internal
90
+ *
91
+ * @remarks
92
+ * Fetches the bean again and updates its values and schema in place, so a
93
+ * KOS Core reload after a reconnect leaves the same instance current.
94
+ */
95
+ reload(): Promise<void>;
96
+ private fetchBean;
126
97
  /**
127
98
  * Gets all available schema property keys.
128
99
  *
@@ -130,34 +101,20 @@ declare class ConfigBeanModelImpl<T extends {} = any> implements IKosDataModel {
130
101
  */
131
102
  get schemaKeys(): string[];
132
103
  /**
133
- * Retrieves schema definition for a specific property.
104
+ * Schema definition of an attribute. Schema keys may be regular expressions,
105
+ * so a key with no exact entry is matched against them.
134
106
  *
135
107
  * @param key - Property key to get schema for
136
108
  * @returns Schema definition if found, undefined otherwise
137
- *
138
- * @example Get Property Schema
139
- * ```typescript
140
- * const schema = systemConfig.getSchemaForProperty('debugMode');
141
- * if (schema) {
142
- * console.log('Type:', schema.type);
143
- * console.log('Description:', schema.description);
144
- * }
145
- * ```
146
109
  */
147
110
  getSchemaForProperty(key: string): import('../../services/config-bean').SchemaNodeDef | undefined;
148
111
  /**
149
- * Updates a specific configuration property value.
112
+ * Sets one attribute and writes the bean to the backend.
150
113
  *
151
114
  * @category Action
152
115
  *
153
116
  * @param key - The configuration property key to update
154
117
  * @param value - The new value to set for the property
155
- *
156
- * @example Update Configuration Property
157
- * ```typescript
158
- * await systemConfig.updateProperty('debugMode', true);
159
- * await systemConfig.updateProperty('machineId', 'MACHINE-001');
160
- * ```
161
118
  */
162
119
  updateProperty(key: ConfigBeanKeys<T>, value: ConfigPropertyTypes): Promise<void>;
163
120
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"config-bean-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/config-bean/config-bean-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,OAAO,EACP,oBAAoB,EACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EAKL,2BAA2B,EAG5B,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EACV,cAAc,EACd,uBAAuB,EACxB,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EAGL,KAAK,wBAAwB,EAE9B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAO/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,EAAE,GAAG,GAAG,IAAI,oBAAoB,CACrE,mBAAmB,CAAC,CAAC,CAAC,CACvB,CAAC;AAYF,eAAO,MAAM,sBAAsB,sBAAsB,CAAC;AAM1D;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,kBAAkB,CAAC,EAAE,MAAM,GAC1B,MAAM,CAIR;AAiBD;;;GAGG;AACH,cACM,mBAAmB,CAAC,CAAC,SAAS,EAAE,GAAG,GAAG,CAAE,YAAW,aAAa;IACpE,yDAAyD;IACzD,OAAO,CAAC,iBAAiB,CAAiC;IAE1D,0DAA0D;IAC1D,OAAO,CAAC,cAAc,CAA8B;IAEpD,oEAAoE;IACpE,OAAO,CAAC,OAAO,CAAC,CAAiB;IACjC,8DAA8D;IAC9D,EAAE,EAAE,MAAM,CAAC;IACX,qFAAqF;IACrF,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAE/D,oFAAoF;IACpF,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAEnE,oEAAoE;IACpE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,0EAA0E;IAC1E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;;;;OAQG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB;IAsB7D;;;;;;;;;;;OAWG;IACH,IAAI,MAAM,wCAET;IAED;;OAEG;IACG,KAAK;IAIX;;;;;;;OAOG;IACG,IAAI;IAoBV;;;;OAIG;IACH,IAAI,UAAU,aAEb;IAED;;;;;;;;;;;;;;OAcG;IACH,oBAAoB,CAAC,GAAG,EAAE,MAAM;IAahC;;;;;;;;;;;;;OAaG;IACG,cAAc,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,mBAAmB;IAIvE;;;;;;;;;;OAUG;IACG,gBAAgB;IAYtB;;;;;;;OAOG;IAOH,uBAAuB,CAAC,UAAU,EAAE,wBAAwB;CAG7D;AAED,eAAO,MAAM,UAAU,6EAMrB,CAAC"}
1
+ {"version":3,"file":"config-bean-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/config-bean/config-bean-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,OAAO,EACP,oBAAoB,EACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EAKL,2BAA2B,EAG5B,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EACV,cAAc,EACd,uBAAuB,EACxB,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EAGL,KAAK,wBAAwB,EAE9B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAO/C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,EAAE,GAAG,GAAG,IAAI,oBAAoB,CACrE,mBAAmB,CAAC,CAAC,CAAC,CACvB,CAAC;AAYF,eAAO,MAAM,sBAAsB,sBAAsB,CAAC;AAM1D;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,kBAAkB,CAAC,EAAE,MAAM,GAC1B,MAAM,CAIR;AAiBD;;;GAGG;AACH,cACM,mBAAmB,CAAC,CAAC,SAAS,EAAE,GAAG,GAAG,CAAE,YAAW,aAAa;IACpE,yDAAyD;IACzD,OAAO,CAAC,iBAAiB,CAAiC;IAE1D,0DAA0D;IAC1D,OAAO,CAAC,cAAc,CAA8B;IAEpD,oEAAoE;IACpE,OAAO,CAAC,OAAO,CAAC,CAAiB;IACjC,8DAA8D;IAC9D,EAAE,EAAE,MAAM,CAAC;IACX,qFAAqF;IACrF,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAE/D,oFAAoF;IACpF,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAEnE,oEAAoE;IACpE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,0EAA0E;IAC1E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;;;;OAQG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB;IAsB7D;;;;OAIG;IACH,IAAI,MAAM,wCAET;IAED;;OAEG;IACG,KAAK;IAIX;;;;;OAKG;IACG,IAAI;IAKV;;;;;;OAMG;IACG,MAAM;YAKE,SAAS;IAmBvB;;;;OAIG;IACH,IAAI,UAAU,aAEb;IAED;;;;;;OAMG;IACH,oBAAoB,CAAC,GAAG,EAAE,MAAM;IAahC;;;;;;;OAOG;IACG,cAAc,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,mBAAmB;IAIvE;;;;;;;;;;OAUG;IACG,gBAAgB;IAYtB;;;;;;;OAOG;IAOH,uBAAuB,CAAC,UAAU,EAAE,wBAAwB;CAG7D;AAED,eAAO,MAAM,UAAU,6EAMrB,CAAC"}