@kosdev-code/kos-ui-sdk 2.0.45 → 2.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (449) hide show
  1. package/common/events/eventBus.d.ts +0 -30
  2. package/common/events/eventBus.d.ts.map +1 -1
  3. package/common/events/eventBus.functional.d.ts +0 -48
  4. package/common/events/eventBus.functional.d.ts.map +1 -1
  5. package/common/events/eventBus.state.d.ts +0 -33
  6. package/common/events/eventBus.state.d.ts.map +1 -1
  7. package/core/core/decorators/index.d.ts +0 -11
  8. package/core/core/decorators/index.d.ts.map +1 -1
  9. package/core/core/decorators/kos-child.d.ts +0 -2
  10. package/core/core/decorators/kos-child.d.ts.map +1 -1
  11. package/core/core/decorators/kos-companion.d.ts +8 -158
  12. package/core/core/decorators/kos-companion.d.ts.map +1 -1
  13. package/core/core/decorators/kos-context.d.ts +0 -6
  14. package/core/core/decorators/kos-context.d.ts.map +1 -1
  15. package/core/core/decorators/kos-http-decorators.d.ts +0 -15
  16. package/core/core/decorators/kos-http-decorators.d.ts.map +1 -1
  17. package/core/core/decorators/kos-log.d.ts +0 -4
  18. package/core/core/decorators/kos-log.d.ts.map +1 -1
  19. package/core/core/decorators/kos-model-effect.d.ts +0 -9
  20. package/core/core/decorators/kos-model-effect.d.ts.map +1 -1
  21. package/core/core/decorators/kos-parent.d.ts +0 -4
  22. package/core/core/decorators/kos-parent.d.ts.map +1 -1
  23. package/core/core/decorators/kos-reference.d.ts +0 -9
  24. package/core/core/decorators/kos-reference.d.ts.map +1 -1
  25. package/core/core/decorators/kos-topic-handler-flow-control.d.ts +1 -17
  26. package/core/core/decorators/kos-topic-handler-flow-control.d.ts.map +1 -1
  27. package/core/core/decorators/kosDependency.d.ts +1 -4
  28. package/core/core/decorators/kosDependency.d.ts.map +1 -1
  29. package/core/core/decorators/kosModel.d.ts +2 -17
  30. package/core/core/decorators/kosModel.d.ts.map +1 -1
  31. package/core/core/decorators/kosSubscribe.d.ts +0 -9
  32. package/core/core/decorators/kosSubscribe.d.ts.map +1 -1
  33. package/core/core/decorators/kosTopicHandler.d.ts +5 -87
  34. package/core/core/decorators/kosTopicHandler.d.ts.map +1 -1
  35. package/core/core/decorators/propKeys.d.ts +0 -14
  36. package/core/core/decorators/propKeys.d.ts.map +1 -1
  37. package/core/core/decorators/resolve-parameters.d.ts.map +1 -1
  38. package/core/core/extension/extension-manager.d.ts +4 -64
  39. package/core/core/extension/extension-manager.d.ts.map +1 -1
  40. package/core/core/extension/initialize-extension.d.ts +0 -24
  41. package/core/core/extension/initialize-extension.d.ts.map +1 -1
  42. package/core/core/extension/plugin-extension-manager.d.ts +0 -11
  43. package/core/core/extension/plugin-extension-manager.d.ts.map +1 -1
  44. package/core/core/kos-container-model.d.ts +0 -188
  45. package/core/core/kos-container-model.d.ts.map +1 -1
  46. package/core/core/kos-data-container.d.ts +1 -93
  47. package/core/core/kos-data-container.d.ts.map +1 -1
  48. package/core/core/kos-registration.d.ts.map +1 -1
  49. package/core/core/kos-singleton-registration.d.ts.map +1 -1
  50. package/core/core/kosCore.d.ts.map +1 -1
  51. package/core/core/kosModel.d.ts +2 -55
  52. package/core/core/kosModel.d.ts.map +1 -1
  53. package/core/core/kosModelManager.d.ts +1 -11
  54. package/core/core/kosModelManager.d.ts.map +1 -1
  55. package/core/core/log/log.d.ts.map +1 -1
  56. package/core/core/model/apply-kos-dev-tool-support.d.ts.map +1 -1
  57. package/core/core/model/kos-fsm-manager.d.ts +4 -1
  58. package/core/core/model/kos-fsm-manager.d.ts.map +1 -1
  59. package/core/core/model/kos-model-component-factory.d.ts +0 -4
  60. package/core/core/model/kos-model-component-factory.d.ts.map +1 -1
  61. package/core/core/model/kos-offline-queue.d.ts +1 -78
  62. package/core/core/model/kos-offline-queue.d.ts.map +1 -1
  63. package/core/core/model/kos-online-lifecycle-manager.d.ts.map +1 -1
  64. package/core/core/model/kos-subscription-manager.d.ts +0 -20
  65. package/core/core/model/kos-subscription-manager.d.ts.map +1 -1
  66. package/core/core/model/model-introspection-utils.d.ts +0 -1
  67. package/core/core/model/model-introspection-utils.d.ts.map +1 -1
  68. package/core/core/model-instantiator.d.ts +0 -19
  69. package/core/core/model-instantiator.d.ts.map +1 -1
  70. package/core/core/registration/index.d.ts +0 -1
  71. package/core/core/registration/index.d.ts.map +1 -1
  72. package/core/core/services/browser-router.d.ts.map +1 -1
  73. package/core/core/transport/webSocketTransport.d.ts +1 -2
  74. package/core/core/transport/webSocketTransport.d.ts.map +1 -1
  75. package/core/core/types/registration.d.ts +0 -7
  76. package/core/core/types/registration.d.ts.map +1 -1
  77. package/core/index.d.ts +1 -2
  78. package/core/index.d.ts.map +1 -1
  79. package/core/types/index.d.ts +0 -1
  80. package/core/types/index.d.ts.map +1 -1
  81. package/core/types/kos-dependency.d.ts +1 -48
  82. package/core/types/kos-dependency.d.ts.map +1 -1
  83. package/core/types/utils/kos-fetch.d.ts +0 -121
  84. package/core/types/utils/kos-fetch.d.ts.map +1 -1
  85. package/core/util/api-request-id.d.ts +0 -4
  86. package/core/util/api-request-id.d.ts.map +1 -1
  87. package/core/util/apply-mixins.d.ts +0 -4
  88. package/core/util/apply-mixins.d.ts.map +1 -1
  89. package/core/util/array-utils.d.ts +0 -4
  90. package/core/util/array-utils.d.ts.map +1 -1
  91. package/core/util/container-utils.d.ts +11 -264
  92. package/core/util/container-utils.d.ts.map +1 -1
  93. package/core/util/date-utils.d.ts +0 -29
  94. package/core/util/date-utils.d.ts.map +1 -1
  95. package/core/util/debounce.d.ts +0 -3
  96. package/core/util/debounce.d.ts.map +1 -1
  97. package/core/util/feature-flags.d.ts +0 -19
  98. package/core/util/feature-flags.d.ts.map +1 -1
  99. package/core/util/get-query-params.d.ts +0 -4
  100. package/core/util/get-query-params.d.ts.map +1 -1
  101. package/core/util/hsl-to-hex.d.ts +0 -16
  102. package/core/util/hsl-to-hex.d.ts.map +1 -1
  103. package/core/util/index.d.ts +0 -3
  104. package/core/util/index.d.ts.map +1 -1
  105. package/core/util/kos-config-init.d.ts +0 -37
  106. package/core/util/kos-config-init.d.ts.map +1 -1
  107. package/core/util/kos-data-mapper-utils.d.ts +0 -9
  108. package/core/util/kos-data-mapper-utils.d.ts.map +1 -1
  109. package/core/util/kos-fetch.d.ts +0 -12
  110. package/core/util/kos-fetch.d.ts.map +1 -1
  111. package/core/util/kos-message-utils.d.ts +0 -88
  112. package/core/util/kos-message-utils.d.ts.map +1 -1
  113. package/core/util/kos-model-utils.d.ts +0 -46
  114. package/core/util/kos-model-utils.d.ts.map +1 -1
  115. package/core/util/kos-model-visitor.d.ts +0 -2
  116. package/core/util/kos-model-visitor.d.ts.map +1 -1
  117. package/core/util/kos-service-request.d.ts +3 -43
  118. package/core/util/kos-service-request.d.ts.map +1 -1
  119. package/core/util/log-utils.d.ts +0 -12
  120. package/core/util/log-utils.d.ts.map +1 -1
  121. package/core/util/middleware.d.ts +0 -15
  122. package/core/util/middleware.d.ts.map +1 -1
  123. package/core/util/model-attribute-utils.d.ts +0 -7
  124. package/core/util/model-attribute-utils.d.ts.map +1 -1
  125. package/core/util/model-factory.d.ts +0 -4
  126. package/core/util/model-factory.d.ts.map +1 -1
  127. package/core/util/model-registration-utils.d.ts +0 -8
  128. package/core/util/model-registration-utils.d.ts.map +1 -1
  129. package/core/util/model-utils.d.ts +29 -40
  130. package/core/util/model-utils.d.ts.map +1 -1
  131. package/core/util/observable-proxy-map.d.ts +0 -11
  132. package/core/util/observable-proxy-map.d.ts.map +1 -1
  133. package/core/util/paired-client-heartbeat.d.ts +0 -2
  134. package/core/util/paired-client-heartbeat.d.ts.map +1 -1
  135. package/core/util/pipe.d.ts +0 -4
  136. package/core/util/pipe.d.ts.map +1 -1
  137. package/core/util/retry-with-exponential-backoff.d.ts +0 -3
  138. package/core/util/retry-with-exponential-backoff.d.ts.map +1 -1
  139. package/core/util/service-factory.d.ts +0 -10
  140. package/core/util/service-factory.d.ts.map +1 -1
  141. package/core/util/session-utils.d.ts +0 -8
  142. package/core/util/session-utils.d.ts.map +1 -1
  143. package/core/util/wait-for-request.d.ts +0 -16
  144. package/core/util/wait-for-request.d.ts.map +1 -1
  145. package/core/util/when-ready.d.ts +0 -3
  146. package/core/util/when-ready.d.ts.map +1 -1
  147. package/index.cjs +123 -26909
  148. package/index.cjs.map +1 -1
  149. package/index.d.cts +3 -6
  150. package/index.d.ts +3 -6
  151. package/index.d.ts.map +1 -1
  152. package/index.js +13460 -25275
  153. package/index.js.map +1 -1
  154. package/models/constants/index.d.ts +1 -3
  155. package/models/constants/index.d.ts.map +1 -1
  156. package/models/decorators/future-service.d.ts +2 -27
  157. package/models/decorators/future-service.d.ts.map +1 -1
  158. package/models/models/browser-router/browser-router-model.d.ts +1 -80
  159. package/models/models/browser-router/browser-router-model.d.ts.map +1 -1
  160. package/models/models/browser-router/types/index.d.ts +1 -26
  161. package/models/models/canvas-dispatcher/types/index.d.ts +0 -5
  162. package/models/models/canvas-renderer/types/index.d.ts +0 -5
  163. package/models/models/config-bean/config-bean-model-builder.d.ts +2 -4
  164. package/models/models/config-bean/config-bean-model-builder.d.ts.map +1 -1
  165. package/models/models/config-bean/config-bean-model.d.ts +13 -117
  166. package/models/models/config-bean/config-bean-model.d.ts.map +1 -1
  167. package/models/models/config-bean/config-bean-types.d.ts +3 -6
  168. package/models/models/config-bean/config-bean-types.d.ts.map +1 -1
  169. package/models/models/config-bean-prop/config-bean-prop-model.d.ts +1 -112
  170. package/models/models/config-bean-prop/config-bean-prop-model.d.ts.map +1 -1
  171. package/models/models/config-bean-prop/types/index.d.ts +19 -301
  172. package/models/models/device/device-model.d.ts +9 -219
  173. package/models/models/device/device-model.d.ts.map +1 -1
  174. package/models/models/device/device-registration.d.ts +48 -61
  175. package/models/models/device/device-registration.d.ts.map +1 -1
  176. package/models/models/device/types/index.d.ts +0 -42
  177. package/models/models/future/future-aware.d.ts +0 -82
  178. package/models/models/future/future-aware.d.ts.map +1 -1
  179. package/models/models/future/future-model.d.ts +5 -34
  180. package/models/models/future/future-model.d.ts.map +1 -1
  181. package/models/models/future/future-types.d.ts +9 -202
  182. package/models/models/future/future-types.d.ts.map +1 -1
  183. package/models/models/future-container/future-container-model.d.ts +2 -2
  184. package/models/models/index.d.ts +0 -1
  185. package/models/models/index.d.ts.map +1 -1
  186. package/models/models/key-value/index.d.ts +0 -4
  187. package/models/models/key-value/index.d.ts.map +1 -1
  188. package/models/models/key-value/key-value-model.d.ts +0 -111
  189. package/models/models/key-value/key-value-model.d.ts.map +1 -1
  190. package/models/models/key-value/services/key-value-services.d.ts +2 -124
  191. package/models/models/key-value/services/key-value-services.d.ts.map +1 -1
  192. package/models/models/key-value/types/index.d.ts +0 -57
  193. package/models/models/kos-log-manager/kos-log-manager-model.d.ts +14 -61
  194. package/models/models/kos-log-manager/kos-log-manager-model.d.ts.map +1 -1
  195. package/models/models/kos-log-manager/types/index.d.ts +0 -191
  196. package/models/models/kos-time/kos-time-model.d.ts +0 -64
  197. package/models/models/kos-time/kos-time-model.d.ts.map +1 -1
  198. package/models/models/kos-time/types/index.d.ts +0 -83
  199. package/models/models/log-block/log-block-container-model.d.ts +0 -132
  200. package/models/models/log-block/log-block-container-model.d.ts.map +1 -1
  201. package/models/models/log-block/log-block-model.d.ts +0 -185
  202. package/models/models/log-block/log-block-model.d.ts.map +1 -1
  203. package/models/models/log-block/types/index.d.ts +0 -133
  204. package/models/models/log-stream/index.d.ts +2 -6
  205. package/models/models/log-stream/index.d.ts.map +1 -1
  206. package/models/models/log-stream/log-stream-container-model.d.ts +0 -62
  207. package/models/models/log-stream/log-stream-container-model.d.ts.map +1 -1
  208. package/models/models/log-stream/log-stream-model.d.ts +0 -55
  209. package/models/models/log-stream/log-stream-model.d.ts.map +1 -1
  210. package/models/models/log-stream/services/log-stream-services.d.ts +1 -2
  211. package/models/models/log-stream/services/log-stream-services.d.ts.map +1 -1
  212. package/models/models/log-stream/types/index.d.ts +0 -79
  213. package/models/models/network-interface/index.d.ts +2 -6
  214. package/models/models/network-interface/index.d.ts.map +1 -1
  215. package/models/models/network-interface/network-interface-container-model.d.ts +0 -62
  216. package/models/models/network-interface/network-interface-container-model.d.ts.map +1 -1
  217. package/models/models/network-interface/network-interface-container-registration.d.ts +1 -2
  218. package/models/models/network-interface/network-interface-container-registration.d.ts.map +1 -1
  219. package/models/models/network-interface/network-interface-model.d.ts +0 -77
  220. package/models/models/network-interface/network-interface-model.d.ts.map +1 -1
  221. package/models/models/network-interface/network-interface-registration.d.ts +1 -2
  222. package/models/models/network-interface/network-interface-registration.d.ts.map +1 -1
  223. package/models/models/network-interface/services/network-interface-services.d.ts +0 -54
  224. package/models/models/network-interface/services/network-interface-services.d.ts.map +1 -1
  225. package/models/models/network-interface/types/index.d.ts +0 -22
  226. package/models/models/ota/ota-model.d.ts +0 -79
  227. package/models/models/ota/ota-model.d.ts.map +1 -1
  228. package/models/models/ota/types/index.d.ts +0 -177
  229. package/models/models/region-info/region-info-model.d.ts +3 -8
  230. package/models/models/region-info/region-info-model.d.ts.map +1 -1
  231. package/models/models/region-info/services/region-info-services.d.ts +2 -2
  232. package/models/models/region-info/services/region-info-services.d.ts.map +1 -1
  233. package/models/models/region-info/types/index.d.ts +13 -191
  234. package/models/models/region-info/types/index.d.ts.map +1 -1
  235. package/models/models/region-info/utils/unit-system-utils.d.ts.map +1 -1
  236. package/models/models/software-info/services/software-info-services.d.ts.map +1 -1
  237. package/models/models/software-info/software-info-model.d.ts +2 -74
  238. package/models/models/software-info/software-info-model.d.ts.map +1 -1
  239. package/models/models/software-info/types/index.d.ts +17 -52
  240. package/models/models/state-bean/state-bean-model.d.ts +9 -86
  241. package/models/models/state-bean/state-bean-model.d.ts.map +1 -1
  242. package/models/models/state-bean/types/index.d.ts +6 -117
  243. package/models/models/state-prop/state-prop-model.d.ts +1 -78
  244. package/models/models/state-prop/state-prop-model.d.ts.map +1 -1
  245. package/models/models/state-prop/types/index.d.ts +7 -57
  246. package/models/models/storage-device/services/storage-device-services.d.ts +0 -1
  247. package/models/models/storage-device/services/storage-device-services.d.ts.map +1 -1
  248. package/models/models/storage-device/storage-device-container-model.d.ts +2 -289
  249. package/models/models/storage-device/storage-device-container-model.d.ts.map +1 -1
  250. package/models/models/storage-device/storage-device-model.d.ts +2 -84
  251. package/models/models/storage-device/storage-device-model.d.ts.map +1 -1
  252. package/models/models/storage-device/types/index.d.ts +0 -114
  253. package/models/models/studio-properties/studio-properties-model.d.ts +0 -75
  254. package/models/models/studio-properties/studio-properties-model.d.ts.map +1 -1
  255. package/models/models/studio-properties/types/index.d.ts +0 -29
  256. package/models/models/translation/services/translation-services.d.ts +2 -128
  257. package/models/models/translation/services/translation-services.d.ts.map +1 -1
  258. package/models/models/translation/translation-container-model.d.ts +10 -100
  259. package/models/models/translation/translation-container-model.d.ts.map +1 -1
  260. package/models/models/translation/translation-container-registration.d.ts +1 -2
  261. package/models/models/translation/translation-container-registration.d.ts.map +1 -1
  262. package/models/models/translation/translation-context.d.ts +16 -1
  263. package/models/models/translation/translation-context.d.ts.map +1 -1
  264. package/models/models/translation/translation-model.d.ts +1 -113
  265. package/models/models/translation/translation-model.d.ts.map +1 -1
  266. package/models/models/translation/types/index.d.ts +0 -343
  267. package/models/models/trouble/index.d.ts +1 -2
  268. package/models/models/trouble/index.d.ts.map +1 -1
  269. package/models/models/trouble/services/trouble-services.d.ts +4 -6
  270. package/models/models/trouble/services/trouble-services.d.ts.map +1 -1
  271. package/models/models/trouble/trouble-model.d.ts +1 -4
  272. package/models/models/trouble/trouble-model.d.ts.map +1 -1
  273. package/models/models/trouble/types/index.d.ts +93 -34
  274. package/models/models/trouble/utils/is-trouble-aware.d.ts +2 -2
  275. package/models/models/trouble/utils/is-trouble-aware.d.ts.map +1 -1
  276. package/models/models/trouble-container/index.d.ts +3 -4
  277. package/models/models/trouble-container/index.d.ts.map +1 -1
  278. package/models/models/trouble-container/trouble-container-model.d.ts +6 -10
  279. package/models/models/trouble-container/trouble-container-model.d.ts.map +1 -1
  280. package/models/models/trouble-container/trouble-container-registration.d.ts +5 -0
  281. package/models/models/trouble-container/trouble-container-registration.d.ts.map +1 -0
  282. package/models/models/trouble-container/types/index.d.ts +15 -6
  283. package/models/models/usb-update/types/index.d.ts +0 -10
  284. package/models/services/config-bean/index.d.ts +2 -2
  285. package/models/services/config-bean/index.d.ts.map +1 -1
  286. package/models/utils/client.d.ts +12 -16
  287. package/models/utils/client.d.ts.map +1 -1
  288. package/models/utils/core-registration-manager.d.ts +1 -1
  289. package/models/utils/core-registration-manager.d.ts.map +1 -1
  290. package/models/utils/extension-manager.d.ts +13 -54
  291. package/models/utils/extension-manager.d.ts.map +1 -1
  292. package/models/utils/index.d.ts +2 -3
  293. package/models/utils/index.d.ts.map +1 -1
  294. package/models/utils/kosmodel-compatible-future-mixin.d.ts +142 -0
  295. package/models/utils/kosmodel-compatible-future-mixin.d.ts.map +1 -0
  296. package/models/utils/kosmodel-interface-companion-mixin.d.ts +83 -0
  297. package/models/utils/kosmodel-interface-companion-mixin.d.ts.map +1 -0
  298. package/models/utils/service.d.ts +13 -91
  299. package/models/utils/service.d.ts.map +1 -1
  300. package/package.json +2 -16
  301. package/ui/contexts/kos-core-context.d.ts.map +1 -1
  302. package/ui/contexts/state-bean/state-bean-provider.d.ts.map +1 -1
  303. package/ui/hooks/device/use-device.d.ts +0 -6
  304. package/ui/hooks/device/use-device.d.ts.map +1 -1
  305. package/ui/hooks/index.d.ts +0 -1
  306. package/ui/hooks/index.d.ts.map +1 -1
  307. package/ui/hooks/kos-time/use-kos-time.d.ts +0 -6
  308. package/ui/hooks/kos-time/use-kos-time.d.ts.map +1 -1
  309. package/ui/hooks/network-interface-container/use-network-interface-container.d.ts +0 -6
  310. package/ui/hooks/network-interface-container/use-network-interface-container.d.ts.map +1 -1
  311. package/ui/hooks/ota/use-ota.d.ts +0 -6
  312. package/ui/hooks/ota/use-ota.d.ts.map +1 -1
  313. package/ui/hooks/software-info/use-software-info.d.ts +0 -6
  314. package/ui/hooks/software-info/use-software-info.d.ts.map +1 -1
  315. package/ui/hooks/state-bean/use-state-bean.d.ts +2 -2
  316. package/ui/hooks/state-bean/use-state-bean.d.ts.map +1 -1
  317. package/ui/hooks/state-bean/with-state-bean.d.ts.map +1 -1
  318. package/ui/hooks/storage-device-container/use-storage-device-container.d.ts +0 -6
  319. package/ui/hooks/storage-device-container/use-storage-device-container.d.ts.map +1 -1
  320. package/ui/hooks/translation-container/trans.d.ts +0 -6
  321. package/ui/hooks/translation-container/trans.d.ts.map +1 -1
  322. package/ui/hooks/translation-container/use-translation-container.d.ts +33 -10
  323. package/ui/hooks/translation-container/use-translation-container.d.ts.map +1 -1
  324. package/ui/hooks/translation-container/use-translation.d.ts +0 -7
  325. package/ui/hooks/translation-container/use-translation.d.ts.map +1 -1
  326. package/ui/hooks/translation-container/with-translation-container.d.ts +0 -6
  327. package/ui/hooks/translation-container/with-translation-container.d.ts.map +1 -1
  328. package/ui/hooks/usb-update-container/use-usb-update-container.d.ts +0 -6
  329. package/ui/hooks/usb-update-container/use-usb-update-container.d.ts.map +1 -1
  330. package/ui/hooks/use-config-bean.d.ts +0 -6
  331. package/ui/hooks/use-config-bean.d.ts.map +1 -1
  332. package/ui/hooks/use-config-property.d.ts +0 -6
  333. package/ui/hooks/use-config-property.d.ts.map +1 -1
  334. package/ui/hooks/use-kos-model.d.ts +0 -7
  335. package/ui/hooks/use-kos-model.d.ts.map +1 -1
  336. package/ui/hooks/use-kos-regions.d.ts.map +1 -1
  337. package/core/constants/model-constants.d.ts +0 -9
  338. package/core/constants/model-constants.d.ts.map +0 -1
  339. package/core/core/companion-instantiator.d.ts +0 -71
  340. package/core/core/companion-instantiator.d.ts.map +0 -1
  341. package/core/core/decorators/fsm-injection-utils.d.ts +0 -16
  342. package/core/core/decorators/fsm-injection-utils.d.ts.map +0 -1
  343. package/core/core/decorators/kos-container-aware.d.ts +0 -619
  344. package/core/core/decorators/kos-container-aware.d.ts.map +0 -1
  345. package/core/core/decorators/kos-execution-context.d.ts +0 -63
  346. package/core/core/decorators/kos-execution-context.d.ts.map +0 -1
  347. package/core/core/decorators/kos-future-aware.d.ts +0 -162
  348. package/core/core/decorators/kos-future-aware.d.ts.map +0 -1
  349. package/core/core/decorators/kos-logger-aware.d.ts +0 -105
  350. package/core/core/decorators/kos-logger-aware.d.ts.map +0 -1
  351. package/core/core/decorators/kos-multiple-future-aware.d.ts +0 -217
  352. package/core/core/decorators/kos-multiple-future-aware.d.ts.map +0 -1
  353. package/core/core/decorators/kos-service-request-helpers.d.ts +0 -60
  354. package/core/core/decorators/kos-service-request-helpers.d.ts.map +0 -1
  355. package/core/core/decorators/kos-service-request.d.ts +0 -498
  356. package/core/core/decorators/kos-service-request.d.ts.map +0 -1
  357. package/core/core/decorators/kos-state-machine.d.ts +0 -534
  358. package/core/core/decorators/kos-state-machine.d.ts.map +0 -1
  359. package/core/core/decorators/kos-trouble-aware.d.ts +0 -77
  360. package/core/core/decorators/kos-trouble-aware.d.ts.map +0 -1
  361. package/core/core/decorators/kos-view-model.d.ts +0 -176
  362. package/core/core/decorators/kos-view-model.d.ts.map +0 -1
  363. package/core/core/model/kos-service-request-manager.d.ts +0 -102
  364. package/core/core/model/kos-service-request-manager.d.ts.map +0 -1
  365. package/core/core/model/service-response-store.d.ts +0 -164
  366. package/core/core/model/service-response-store.d.ts.map +0 -1
  367. package/core/types/service-response-store.d.ts +0 -162
  368. package/core/types/service-response-store.d.ts.map +0 -1
  369. package/core/util/ancestor-path-visitor.d.ts +0 -60
  370. package/core/util/ancestor-path-visitor.d.ts.map +0 -1
  371. package/core/util/error-logger.d.ts +0 -16
  372. package/core/util/error-logger.d.ts.map +0 -1
  373. package/core/util/model-error-utils.d.ts +0 -61
  374. package/core/util/model-error-utils.d.ts.map +0 -1
  375. package/core/util/model-transition-utils.d.ts +0 -41
  376. package/core/util/model-transition-utils.d.ts.map +0 -1
  377. package/core/util/model-type-guards.d.ts +0 -26
  378. package/core/util/model-type-guards.d.ts.map +0 -1
  379. package/core/util/promise-utils.d.ts +0 -58
  380. package/core/util/promise-utils.d.ts.map +0 -1
  381. package/core/util/service-request-error.d.ts +0 -60
  382. package/core/util/service-request-error.d.ts.map +0 -1
  383. package/core/util/service-response.d.ts +0 -125
  384. package/core/util/service-response.d.ts.map +0 -1
  385. package/kos-models.json +0 -426
  386. package/models/models/config-bean/types/index.d.ts +0 -34
  387. package/models/models/gpio-chip/gpio-chip-container-model.d.ts +0 -25
  388. package/models/models/gpio-chip/gpio-chip-container-model.d.ts.map +0 -1
  389. package/models/models/gpio-chip/gpio-chip-model.d.ts +0 -30
  390. package/models/models/gpio-chip/gpio-chip-model.d.ts.map +0 -1
  391. package/models/models/gpio-chip/index.d.ts +0 -7
  392. package/models/models/gpio-chip/index.d.ts.map +0 -1
  393. package/models/models/gpio-chip/services/gpio-chip-services.d.ts +0 -86
  394. package/models/models/gpio-chip/services/gpio-chip-services.d.ts.map +0 -1
  395. package/models/models/gpio-chip/services/index.d.ts +0 -2
  396. package/models/models/gpio-chip/services/index.d.ts.map +0 -1
  397. package/models/models/gpio-chip/types/index.d.ts +0 -24
  398. package/models/models/gpio-pin/gpio-pin-container-model.d.ts +0 -23
  399. package/models/models/gpio-pin/gpio-pin-container-model.d.ts.map +0 -1
  400. package/models/models/gpio-pin/gpio-pin-model.d.ts +0 -26
  401. package/models/models/gpio-pin/gpio-pin-model.d.ts.map +0 -1
  402. package/models/models/gpio-pin/index.d.ts +0 -6
  403. package/models/models/gpio-pin/index.d.ts.map +0 -1
  404. package/models/models/gpio-pin/types/index.d.ts +0 -23
  405. package/models/models/kos-expression-evaluator/index.d.ts +0 -4
  406. package/models/models/kos-expression-evaluator/index.d.ts.map +0 -1
  407. package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts +0 -209
  408. package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts.map +0 -1
  409. package/models/models/kos-expression-evaluator/services/index.d.ts +0 -6
  410. package/models/models/kos-expression-evaluator/services/index.d.ts.map +0 -1
  411. package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts +0 -15
  412. package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts.map +0 -1
  413. package/models/models/kos-expression-evaluator/types/index.d.ts +0 -6
  414. package/models/utils/get-kos-connection-id.d.ts +0 -2
  415. package/models/utils/get-kos-connection-id.d.ts.map +0 -1
  416. package/models/utils/openapi-index.d.ts +0 -3
  417. package/models/utils/openapi-index.d.ts.map +0 -1
  418. package/models/utils/service-accessor.d.ts +0 -86
  419. package/models/utils/service-accessor.d.ts.map +0 -1
  420. package/models/utils/services/kos/1.6.5/openapi.d.ts +0 -3809
  421. package/models/utils/services/kos/1.6.5/service.d.ts +0 -124
  422. package/models/utils/services/kos/1.6.5/service.d.ts.map +0 -1
  423. package/models/utils/services/kos/1.8.1/openapi.d.ts +0 -4344
  424. package/models/utils/services/kos/1.8.1/service.d.ts +0 -124
  425. package/models/utils/services/kos/1.8.1/service.d.ts.map +0 -1
  426. package/models/utils/services/kos/1.9.x/openapi.d.ts +0 -4597
  427. package/models/utils/services/kos/1.9.x/service.d.ts +0 -124
  428. package/models/utils/services/kos/1.9.x/service.d.ts.map +0 -1
  429. package/models/utils/services/kos/daily/openapi.d.ts +0 -4349
  430. package/models/utils/services/kos/daily/service.d.ts +0 -124
  431. package/models/utils/services/kos/daily/service.d.ts.map +0 -1
  432. package/models/utils/services/vfs/1.6.5/openapi.d.ts +0 -51
  433. package/models/utils/services/vfs/1.6.5/service.d.ts +0 -124
  434. package/models/utils/services/vfs/1.6.5/service.d.ts.map +0 -1
  435. package/models/utils/services/vfs/1.8.1/openapi.d.ts +0 -51
  436. package/models/utils/services/vfs/1.8.1/service.d.ts +0 -124
  437. package/models/utils/services/vfs/1.8.1/service.d.ts.map +0 -1
  438. package/models/utils/services/vfs/1.9.x/openapi.d.ts +0 -51
  439. package/models/utils/services/vfs/1.9.x/service.d.ts +0 -124
  440. package/models/utils/services/vfs/1.9.x/service.d.ts.map +0 -1
  441. package/models/utils/services/vfs/daily/openapi.d.ts +0 -51
  442. package/models/utils/services/vfs/daily/service.d.ts +0 -124
  443. package/models/utils/services/vfs/daily/service.d.ts.map +0 -1
  444. package/models/utils/services-index.d.ts +0 -9
  445. package/models/utils/services-index.d.ts.map +0 -1
  446. package/ui/hooks/view-model/index.d.ts +0 -2
  447. package/ui/hooks/view-model/index.d.ts.map +0 -1
  448. package/ui/hooks/view-model/use-view-model.d.ts +0 -80
  449. package/ui/hooks/view-model/use-view-model.d.ts.map +0 -1
@@ -1,619 +0,0 @@
1
- import { IKosDataModel } from '../kosModel';
2
- import { IKosModelContainer } from '../kos-container-model';
3
-
4
- type MaybePromise<T> = T | Promise<T>;
5
- /**
6
- * Configuration options for the @kosContainerAware decorator.
7
- *
8
- * @template T The type of models contained in the container (must extend IKosDataModel)
9
- *
10
- * @kosService core.container-aware
11
- * @kosApiLevel 13
12
- */
13
- export interface KosContainerAwareOptions<T extends IKosDataModel = IKosDataModel> {
14
- /**
15
- * Container property name on the model instance.
16
- *
17
- * @default "container"
18
- * @example
19
- * ```typescript
20
- * @kosContainerAware({ containerProperty: "devices" })
21
- * class DeviceContainer {
22
- * // Access via: this.devices.addModel(...)
23
- * }
24
- * ```
25
- */
26
- containerProperty?: string;
27
- /**
28
- * Whether to include convenience methods (getModel, addModel, removeModel, addAll, removeAll,
29
- * removeAndDestroy, removeAndDestroyAll).
30
- *
31
- * @default true
32
- * @example
33
- * ```typescript
34
- * @kosContainerAware({ includeMethods: false })
35
- * class Container {
36
- * // Only this.container property available, no convenience methods
37
- * }
38
- * ```
39
- */
40
- includeMethods?: boolean;
41
- /**
42
- * Whether to include reactive getters (models, data).
43
- *
44
- * @default true
45
- * @example
46
- * ```typescript
47
- * @kosContainerAware({ includeGetters: false })
48
- * class Container {
49
- * // No this.models or this.data getters, use this.container.data directly
50
- * }
51
- * ```
52
- */
53
- includeGetters?: boolean;
54
- /**
55
- * Container-specific configuration options passed to KosModelContainer constructor.
56
- *
57
- * @example
58
- * ```typescript
59
- * @kosContainerAware({
60
- * containerOptions: {
61
- * sortKey: "name",
62
- * indexMap: {
63
- * byType: "deviceType",
64
- * active: (device) => device.isOnline
65
- * },
66
- * parentId: "custom-parent", // Overrides automatic inference
67
- * extensionId: "device-manager",
68
- * maxCapacity: 1000, // Safety net for unbounded growth
69
- * evictionStrategy: "fifo"
70
- * }
71
- * })
72
- * ```
73
- */
74
- containerOptions?: {
75
- /** Default property to sort models by */
76
- sortKey?: keyof T;
77
- /**
78
- * Index mapping for efficient queries. Keys are index names, values are either:
79
- * - Property names (string keys) for simple property-based indexing
80
- * - Functions that return index keys for complex logic
81
- *
82
- * @example
83
- * ```typescript
84
- * indexMap: {
85
- * byStatus: "connectionStatus", // Property-based
86
- * byType: (device) => device.type.toLowerCase(), // Function-based
87
- * needsUpdate: (device) => device.version < "2.0" // Boolean logic
88
- * }
89
- * ```
90
- */
91
- indexMap?: Record<string, keyof T | ((model: T) => MaybePromise<string | string[] | undefined>)>;
92
- /**
93
- * Parent model ID for the container. If not provided, automatically uses
94
- * the modelId parameter from the model's constructor.
95
- *
96
- * @default Inferred from constructor modelId parameter
97
- */
98
- parentId?: string;
99
- /** Extension identifier for the container */
100
- extensionId?: string;
101
- /**
102
- * SAFETY NET: Maximum number of models this container can hold.
103
- * When exceeded, models are automatically evicted and destroyed based on evictionStrategy.
104
- *
105
- * **Primary use case**: Prevent memory overflow when cleanup handlers are missing or
106
- * data becomes inconsistent. Set higher than normal usage to catch edge cases.
107
- *
108
- * @example
109
- * ```typescript
110
- * containerOptions: {
111
- * maxCapacity: 10000, // Safety net: expect ~100-1000 normally
112
- * evictionStrategy: 'fifo'
113
- * }
114
- * ```
115
- */
116
- maxCapacity?: number;
117
- /**
118
- * Strategy for selecting which models to evict when maxCapacity is exceeded.
119
- *
120
- * - **fifo** (default): Remove oldest models first - best for event streams, logs
121
- * - **lru**: Remove least recently accessed models - best for caches
122
- * - **custom**: Use customEvictionFilter to determine eviction candidates
123
- *
124
- * @default 'fifo'
125
- */
126
- evictionStrategy?: "fifo" | "lru" | "custom";
127
- /**
128
- * Number of models to evict when maxCapacity is exceeded.
129
- * @default Math.max(10, Math.ceil(maxCapacity * 0.1))
130
- */
131
- evictionBatchSize?: number;
132
- /**
133
- * Custom filter function for 'custom' eviction strategy.
134
- * Should return models that are candidates for eviction.
135
- *
136
- * @example
137
- * ```typescript
138
- * customEvictionFilter: (models) => {
139
- * return models.filter(m =>
140
- * m.status === 'resolved' &&
141
- * Date.now() - m.resolvedAt > 3600000
142
- * );
143
- * }
144
- * ```
145
- */
146
- customEvictionFilter?: (models: T[]) => T[];
147
- };
148
- /**
149
- * Custom name for the reactive models array getter.
150
- *
151
- * @default "models"
152
- * @example
153
- * ```typescript
154
- * @kosContainerAware({ modelsProperty: "items" })
155
- * class Container {
156
- * get items() { return this.container.data; } // Instead of 'models'
157
- * }
158
- * ```
159
- */
160
- modelsProperty?: string;
161
- /**
162
- * Legacy compatibility mode. Uses '_models' as the container property name
163
- * instead of 'container' for backward compatibility with existing code.
164
- *
165
- * @default false
166
- * @deprecated Use containerProperty instead for new code
167
- */
168
- legacy?: boolean;
169
- }
170
- /**
171
- * Interface for models using @kosContainerAware decorator.
172
- *
173
- * **IMPORTANT**: Use TypeScript interface merging to add container management properties to your model class.
174
- * This provides full type safety and IntelliSense support for all injected container functionality.
175
- *
176
- * ## Interface Merging Pattern
177
- *
178
- * ```typescript
179
- * // 1. Declare interface merging BEFORE the class
180
- * interface MyContainerModelImpl extends KosContainerAware<ItemModel> {}
181
- *
182
- * // 2. Apply decorator and implement the class
183
- * @kosModel("my-container-model")
184
- * @kosContainerAware<ItemModel>()
185
- * export class MyContainerModelImpl implements IKosDataModel {
186
- * // All container properties are now available with full type safety
187
- * }
188
- * ```
189
- *
190
- * ## Custom Container Property Name
191
- *
192
- * When using a custom `containerProperty` name, use `KosContainerAwareWithProp`:
193
- *
194
- * ```typescript
195
- * // For custom container property name
196
- * interface DeviceManagerImpl extends KosContainerAwareWithProp<DeviceModel, "devices"> {}
197
- *
198
- * @kosContainerAware<DeviceModel>({ containerProperty: "devices" })
199
- * class DeviceManagerImpl implements IKosDataModel {
200
- * // Access via: this.devices instead of this.container
201
- * }
202
- * ```
203
- *
204
- * ## Injected Properties and Methods
205
- *
206
- * The decorator automatically injects the following members (configurable via options):
207
- *
208
- * - **`container`**: Core KosModelContainer instance for direct access (or custom name via `containerProperty`)
209
- * - **`getModel(id)`**: Retrieve a model by ID from the container
210
- * - **`addModel(model)`**: Add a model to the container
211
- * - **`removeModel(id)`**: Remove a model from the container by ID (does not destroy)
212
- * - **`addAll(models)`**: Add multiple models to the container at once
213
- * - **`removeAll(ids)`**: Remove multiple models from the container by IDs (does not destroy)
214
- * - **`removeAndDestroy(id)`**: Remove a model from the container and destroy it
215
- * - **`removeAndDestroyAll(ids)`**: Remove multiple models from the container and destroy them
216
- * - **`models`**: Readonly KosModelContainer instance (compatible with IKosModelHolder)
217
- * - **`data`**: Reactive array of all model instances (compatible with IKosModelHolder)
218
- *
219
- * All injected getters are reactive and will automatically update UI components when container contents change.
220
- *
221
- * @template T The type of models contained in the container (must extend IKosDataModel)
222
- *
223
- * @example
224
- * ```typescript
225
- * // Basic usage with minimal configuration
226
- * interface DeviceContainerModelImpl extends KosContainerAware<DeviceModel> {}
227
- *
228
- * @kosModel("device-container-model")
229
- * @kosContainerAware<DeviceModel>()
230
- * class DeviceContainerModelImpl implements IKosDataModel {
231
- * constructor(modelId: string, options: ContainerOptions, context: KosCreationContext) {
232
- * this.id = modelId;
233
- * // Container automatically injected with parentId: modelId
234
- * }
235
- *
236
- * // Use injected methods
237
- * addDevice(device: DeviceModel): void {
238
- * this.addModel(device); // Method injected by decorator
239
- * }
240
- *
241
- * // Use injected reactive getters
242
- * get deviceCount(): number {
243
- * return this.data.length; // Reactive array getter injected by decorator
244
- * }
245
- * }
246
- * ```
247
- *
248
- * @example
249
- * ```typescript
250
- * // Advanced usage with indexing and custom configuration
251
- * interface UserContainerModelImpl extends KosContainerAware<UserModel> {}
252
- *
253
- * @kosModel("user-container-model")
254
- * @kosContainerAware<UserModel>({
255
- * containerOptions: {
256
- * indexMap: {
257
- * byRole: "role",
258
- * byDepartment: "department",
259
- * active: (user) => user.status === "active"
260
- * },
261
- * sortKey: "lastName"
262
- * }
263
- * })
264
- * class UserContainerModelImpl implements IKosDataModel {
265
- * // Access indexed data via injected container
266
- * getActiveUsers(): UserModel[] {
267
- * return this.container.getIndexByKey("active", true);
268
- * }
269
- *
270
- * getUsersByRole(role: string): UserModel[] {
271
- * return this.container.getIndexByKey("byRole", role);
272
- * }
273
- * }
274
- * ```
275
- *
276
- * @see {@link kosContainerAware} - The decorator function
277
- * @see {@link KosContainerAwareOptions} - Configuration options
278
- *
279
- * @kosService core.container-aware
280
- * @kosApiLevel 13
281
- */
282
- export interface KosContainerAware<T extends IKosDataModel = IKosDataModel> {
283
- /**
284
- * Core container that manages the collection of models.
285
- * Provides methods to add, remove, and query model instances.
286
- * Automatically injected by @kosContainerAware decorator.
287
- */
288
- container: IKosModelContainer<T>;
289
- /**
290
- * Retrieves a model from the container by its ID.
291
- * @param id - The unique identifier of the model to retrieve
292
- * @returns The model instance if found, undefined otherwise
293
- */
294
- getModel(id: string): T | undefined;
295
- /**
296
- * Adds a model to the container.
297
- * @param model - The model instance to add
298
- */
299
- addModel(model: T): void;
300
- /**
301
- * Removes a model from the container by its ID.
302
- * @param id - The unique identifier of the model to remove
303
- */
304
- removeModel(id: string): void;
305
- /**
306
- * Adds multiple models to the container at once.
307
- * @param models - Array of model instances to add
308
- * @kosApiLevel 19
309
- */
310
- addAll(models: T[]): void;
311
- /**
312
- * Removes multiple models from the container by their IDs.
313
- * @param ids - Array of unique identifiers of the models to remove
314
- * @kosApiLevel 19
315
- */
316
- removeAll(ids: string[]): void;
317
- /**
318
- * Removes a model from the container and destroys it.
319
- * Convenience method that combines removeModel() and destroyKosModel().
320
- * @param id - The unique identifier of the model to remove and destroy
321
- * @kosApiLevel 19
322
- */
323
- removeAndDestroy(id: string): Promise<void>;
324
- /**
325
- * Removes multiple models from the container and destroys them.
326
- * Convenience method that combines removeAll() and destroyKosModel().
327
- * @param ids - Array of unique identifiers of the models to remove and destroy
328
- * @kosApiLevel 19
329
- */
330
- removeAndDestroyAll(ids: string[]): Promise<void>;
331
- /**
332
- * The container instance managing the models.
333
- * Readonly property that provides access to the KosModelContainer.
334
- * Compatible with IKosModelHolder interface.
335
- * Updates automatically when models are added or removed.
336
- */
337
- readonly models: IKosModelContainer<T>;
338
- /**
339
- * Reactive array of all model instances in the container.
340
- * This is the actual array of models, compatible with IKosModelHolder interface.
341
- * Updates automatically when models are added or removed.
342
- */
343
- data: T[];
344
- }
345
- /**
346
- * Base interface providing common container-aware methods and properties.
347
- * Used internally by both KosContainerAware and KosContainerAwareWithProp.
348
- *
349
- * @template T The type of models contained in the container
350
- *
351
- * @kosService core.container-aware
352
- * @kosApiLevel 13
353
- */
354
- export interface KosContainerAwareBase<T extends IKosDataModel = IKosDataModel> {
355
- /**
356
- * Retrieves a model from the container by its ID.
357
- * @param id - The unique identifier of the model to retrieve
358
- * @returns The model instance if found, undefined otherwise
359
- */
360
- getModel(id: string): T | undefined;
361
- /**
362
- * Adds a model to the container.
363
- * @param model - The model instance to add
364
- */
365
- addModel(model: T): void;
366
- /**
367
- * Removes a model from the container by its ID.
368
- * @param id - The unique identifier of the model to remove
369
- */
370
- removeModel(id: string): void;
371
- /**
372
- * Adds multiple models to the container at once.
373
- * @param models - Array of model instances to add
374
- * @kosApiLevel 19
375
- */
376
- addAll(models: T[]): void;
377
- /**
378
- * Removes multiple models from the container by their IDs.
379
- * @param ids - Array of unique identifiers of the models to remove
380
- * @kosApiLevel 19
381
- */
382
- removeAll(ids: string[]): void;
383
- /**
384
- * Removes a model from the container and destroys it.
385
- * Convenience method that combines removeModel() and destroyKosModel().
386
- * @param id - The unique identifier of the model to remove and destroy
387
- * @kosApiLevel 19
388
- */
389
- removeAndDestroy(id: string): Promise<void>;
390
- /**
391
- * Removes multiple models from the container and destroys them.
392
- * Convenience method that combines removeAll() and destroyKosModel().
393
- * @param ids - Array of unique identifiers of the models to remove and destroy
394
- * @kosApiLevel 19
395
- */
396
- removeAndDestroyAll(ids: string[]): Promise<void>;
397
- /**
398
- * The container instance managing the models.
399
- * Readonly property that provides access to the KosModelContainer.
400
- * Compatible with IKosModelHolder interface.
401
- * Updates automatically when models are added or removed.
402
- */
403
- readonly models: IKosModelContainer<T>;
404
- /**
405
- * Reactive array of all model instances in the container.
406
- * This is the actual array of models, compatible with IKosModelHolder interface.
407
- * Updates automatically when models are added or removed.
408
- */
409
- data: T[];
410
- }
411
- /**
412
- * Interface for models using @kosContainerAware decorator with a custom container property name.
413
- *
414
- * Use this interface when you specify a custom `containerProperty` in the decorator options
415
- * to get proper type safety for the custom property name.
416
- *
417
- * @template T The type of models contained in the container
418
- * @template P The custom property name for the container (string literal type)
419
- *
420
- * @example
421
- * ```typescript
422
- * // Specify the custom property name "devices" in both the interface and decorator
423
- * interface DeviceManagerImpl extends KosContainerAwareWithProp<DeviceModel, "devices"> {}
424
- *
425
- * @kosModel("device-manager")
426
- * @kosContainerAware<DeviceModel>({ containerProperty: "devices" })
427
- * class DeviceManagerImpl implements IKosDataModel {
428
- * constructor(modelId: string, options: ContainerOptions, context: KosCreationContext) {
429
- * this.id = modelId;
430
- * }
431
- *
432
- * addDevice(device: DeviceModel): void {
433
- * // Access container via custom property name
434
- * this.devices.addModel(device);
435
- * }
436
- *
437
- * getDeviceCount(): number {
438
- * // The 'data' property is still available
439
- * return this.data.length;
440
- * }
441
- * }
442
- * ```
443
- *
444
- * @example
445
- * ```typescript
446
- * // Custom property for user management
447
- * interface UserManagerImpl extends KosContainerAwareWithProp<UserModel, "users"> {}
448
- *
449
- * @kosContainerAware<UserModel>({
450
- * containerProperty: "users",
451
- * containerOptions: {
452
- * indexMap: {
453
- * byRole: "role"
454
- * }
455
- * }
456
- * })
457
- * class UserManagerImpl implements IKosDataModel {
458
- * getUsersByRole(role: string): UserModel[] {
459
- * // Access via this.users instead of this.container
460
- * return this.users.getIndexByKey("byRole", role);
461
- * }
462
- * }
463
- * ```
464
- *
465
- * @kosService core.container-aware
466
- */
467
- export type KosContainerAwareWithProp<T extends IKosDataModel = IKosDataModel, P extends string = "container"> = KosContainerAwareBase<T> & {
468
- [K in P]: IKosModelContainer<T>;
469
- };
470
- /**
471
- * Class decorator that automatically adds container management capabilities to a KOS model.
472
- *
473
- * This decorator eliminates the need for manual container setup by:
474
- * - **Adding a container property** (default: `container`) for managing model collections
475
- * - **Adding convenience methods** (`getModel`, `addModel`, `removeModel`, `addAll`, `removeAll`, `removeAndDestroy`, `removeAndDestroyAll`) if `includeMethods` is true (default)
476
- * - **Adding reactive getters** (`models`, `data`) if `includeGetters` is true (default)
477
- * - **Automatically inferring parentId** from the model's constructor `modelId` parameter
478
- * - **Registering container as @kosChild** for proper lifecycle management and cleanup
479
- * - **Supporting custom indexing** via `containerOptions.indexMap` for efficient queries
480
- *
481
- * ## Automatic Hierarchy Integration
482
- *
483
- * The decorator automatically registers the container as a `@kosChild`, ensuring:
484
- * - Proper lifecycle management (init, load, destroy)
485
- * - Automatic cleanup when parent model is destroyed
486
- * - Participation in the KOS reactive system
487
- * - Memory management and observer disposal
488
- *
489
- * ## TypeScript Usage
490
- *
491
- * **IMPORTANT**: Use TypeScript interface merging to get proper type information:
492
- *
493
- * ```typescript
494
- * interface MyContainerModelImpl extends KosContainerAware<MyItemModel> {}
495
- *
496
- * @kosContainerAware<MyItemModel>()
497
- * class MyContainerModelImpl implements IKosDataModel {
498
- * // All container properties are now available with full type safety
499
- * }
500
- * ```
501
- *
502
- * ## Model Lifecycle: removeModel vs removeAndDestroy
503
- *
504
- * The decorator provides both removal and destruction methods with different purposes:
505
- *
506
- * **removeModel(id) / removeAll(ids)** - Removes from container WITHOUT destroying:
507
- * - Use when moving models between containers
508
- * - Use when temporarily hiding models that may be re-added
509
- * - Use when model lifecycle is managed elsewhere
510
- * - Container handles cleanup of observers and metadata
511
- * - Model remains in memory and can be used elsewhere
512
- *
513
- * **removeAndDestroy(id) / removeAndDestroyAll(ids)** - Removes AND destroys:
514
- * - Use when permanently removing models from the system
515
- * - Use when models should be fully cleaned up and disposed
516
- * - Calls destroyKosModel() automatically after removal
517
- * - Ensures proper cleanup of all model resources
518
- * - Model is removed from framework and memory
519
- *
520
- * ```typescript
521
- * // Example: Explicit lifecycle control
522
- * @kosTopicHandler({ topic: "/device/sensor/removed" })
523
- * handleSensorRemoved(id: string) {
524
- * // Permanently remove - sensor is gone from system
525
- * await this.removeAndDestroy(id);
526
- * }
527
- *
528
- * // Example: Reorganization without destruction
529
- * moveSensorToArchive(id: string) {
530
- * const sensor = this.getModel(id);
531
- * if (sensor) {
532
- * this.removeModel(id); // Remove from active container
533
- * this.archive.addModel(sensor); // Add to archive container
534
- * }
535
- * }
536
- * ```
537
- *
538
- * ## Configuration Options
539
- *
540
- * ```typescript
541
- * @kosContainerAware<UserModel>({
542
- * containerProperty: "users", // Custom property name (default: "container")
543
- * includeMethods: true, // Include convenience methods (default: true)
544
- * includeGetters: true, // Include reactive getters (default: true)
545
- * modelsProperty: "userList", // Custom models getter name (default: "models")
546
- * legacy: false, // Use "_models" property name (default: false)
547
- * containerOptions: {
548
- * parentId: "custom-parent", // Override automatic parentId inference
549
- * sortKey: "name", // Default sorting key
550
- * extensionId: "my-extension", // Extension identifier
551
- * indexMap: { // Automatic indexing for efficient queries
552
- * byRole: "role", // Property-based index
553
- * byStatus: (user) => user.active ? "active" : "inactive", // Function-based index
554
- * admins: (user) => user.role === "admin" // Boolean index
555
- * }
556
- * }
557
- * })
558
- * ```
559
- *
560
- * @param options Configuration options for the decorator
561
- * @returns A class decorator that modifies the target class prototype
562
- *
563
- * @see {@link KosContainerAware} - Interface for TypeScript merging
564
- * @see {@link KosContainerAwareOptions} - Configuration options interface
565
- *
566
- * @example
567
- * ```typescript
568
- * // Minimal configuration - parentId automatically inferred
569
- * interface ItemContainerModelImpl extends KosContainerAware<ItemModel> {}
570
- *
571
- * @kosContainerAware<ItemModel>()
572
- * class ItemContainerModelImpl implements IKosDataModel {
573
- * id: string;
574
- *
575
- * constructor(modelId: string, options: ContainerOptions, context: KosCreationContext) {
576
- * this.id = modelId;
577
- * // Container automatically created with parentId: modelId
578
- * }
579
- * }
580
- *
581
- * // With index configuration
582
- * interface UserContainerModelImpl extends KosContainerAware<UserModel> {}
583
- *
584
- * @kosContainerAware<UserModel>({
585
- * containerOptions: {
586
- * indexMap: {
587
- * byRole: "role",
588
- * byStatus: (user) => user.status
589
- * }
590
- * }
591
- * })
592
- * class UserContainerModelImpl implements IKosDataModel {
593
- * constructor(modelId: string, options: ContainerOptions, context: KosCreationContext) {
594
- * this.id = modelId;
595
- * }
596
- * }
597
- *
598
- * // Legacy mode for backward compatibility
599
- * interface LegacyContainerModelImpl extends KosContainerAware<LegacyModel> {}
600
- *
601
- * @kosContainerAware<LegacyModel>({
602
- * legacy: true, // Uses '_models' as property name
603
- * containerOptions: {
604
- * sortKey: "name"
605
- * }
606
- * })
607
- * class LegacyContainerModelImpl implements IKosDataModel {
608
- * // Container available as this._models for backward compatibility
609
- * }
610
- * ```
611
- *
612
- * @category KOS Model Decorator
613
- * @since 2.1.0
614
- * @kosService core.container-aware
615
- * @kosApiLevel 13
616
- */
617
- export declare function kosContainerAware<T extends IKosDataModel = IKosDataModel>(options?: KosContainerAwareOptions<T>): ClassDecorator;
618
- export {};
619
- //# sourceMappingURL=kos-container-aware.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"kos-container-aware.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/kos-container-aware.ts"],"names":[],"mappings":"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"}
@@ -1,63 +0,0 @@
1
- import { HttpMethod, ServiceRequestExecutor } from './kos-service-request';
2
-
3
- /**
4
- * Symbol used to uniquely identify KosExecutionContext objects.
5
- * Decorators use this to reliably detect if the last parameter is an execution context.
6
- * @internal
7
- */
8
- export declare const KOS_EXECUTION_CONTEXT: unique symbol;
9
- /**
10
- * Execution context passed to decorated methods for accessing decorator-injected functionality.
11
- *
12
- * This context provides a type-safe way for decorators to inject runtime functionality
13
- * into methods without polluting the class interface or relying on magic parameters.
14
- *
15
- * Currently used by @kosServiceRequest to inject the $request executor.
16
- * Designed to be extensible for future decorators that need to inject runtime functionality.
17
- *
18
- * @example Using with @kosServiceRequest
19
- * ```typescript
20
- * @kosServiceRequest({
21
- * path: PATH_VM_INSTALL,
22
- * method: 'post'
23
- * })
24
- * async createRelease(
25
- * path: string,
26
- * keysetId?: string,
27
- * ctx: KosExecutionContext<paths, typeof PATH_VM_INSTALL, 'post'>
28
- * ): Promise<void> {
29
- * const [error, response] = await ctx.$request({
30
- * queryParams: { keySetId: keysetId },
31
- * body: { path }
32
- * });
33
- * if (error) throw new Error(error);
34
- * return response?.data;
35
- * }
36
- * ```
37
- *
38
- * @kosService core.service-request
39
- * @kosApiLevel 15
40
- */
41
- export interface KosExecutionContext<Paths extends Record<string, any> = Record<string, any>, Path extends keyof Paths = string, Method extends HttpMethod = "get"> {
42
- /**
43
- * Symbol marker to identify this as a KosExecutionContext
44
- * @internal
45
- */
46
- [KOS_EXECUTION_CONTEXT]: true;
47
- /**
48
- * Service request executor (injected by @kosServiceRequest)
49
- * Executes the service request defined in the decorator configuration.
50
- */
51
- $request?: ServiceRequestExecutor<Paths, Path, Method>;
52
- /**
53
- * Future tracker ID string (injected by @kosFuture when trackerPolicy is 'context')
54
- * This is the tracker ID that can be used with future management utilities.
55
- */
56
- $tracker?: string;
57
- }
58
- /**
59
- * Type guard to check if an object is a KosExecutionContext
60
- * @internal
61
- */
62
- export declare function isKosExecutionContext(obj: any): obj is KosExecutionContext;
63
- //# sourceMappingURL=kos-execution-context.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"kos-execution-context.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/kos-execution-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEhF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,eAAgC,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,WAAW,mBAAmB,CAClC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACvD,IAAI,SAAS,MAAM,KAAK,GAAG,MAAM,EACjC,MAAM,SAAS,UAAU,GAAG,KAAK;IAEjC;;;OAGG;IACH,CAAC,qBAAqB,CAAC,EAAE,IAAI,CAAC;IAE9B;;;OAGG;IACH,QAAQ,CAAC,EAAE,sBAAsB,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAEvD;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,mBAAmB,CAE1E"}