@kosdev-code/kos-dispense-sdk 2.0.2

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 (319) hide show
  1. package/dispense-registration-manager-DxIbOft8.js +1759 -0
  2. package/dispense-registration-manager-DxIbOft8.js.map +1 -0
  3. package/dispense-registration-manager-aM9RAFHn.cjs +2 -0
  4. package/dispense-registration-manager-aM9RAFHn.cjs.map +1 -0
  5. package/extension-utils-hWIrDMX4.cjs +2 -0
  6. package/extension-utils-hWIrDMX4.cjs.map +1 -0
  7. package/extension-utils-qcU_4sXo.js +370 -0
  8. package/extension-utils-qcU_4sXo.js.map +1 -0
  9. package/index.cjs +2 -0
  10. package/index.cjs.map +1 -0
  11. package/index.d.ts +4 -0
  12. package/index.d.ts.map +1 -0
  13. package/index.js +103 -0
  14. package/index.js.map +1 -0
  15. package/models/constants/constants.d.ts +229 -0
  16. package/models/constants/constants.d.ts.map +1 -0
  17. package/models/constants/index.d.ts +2 -0
  18. package/models/constants/index.d.ts.map +1 -0
  19. package/models/index.d.ts +6 -0
  20. package/models/index.d.ts.map +1 -0
  21. package/models/models/assembly/assembly-model.d.ts +40 -0
  22. package/models/models/assembly/assembly-model.d.ts.map +1 -0
  23. package/models/models/assembly/assembly-registration.d.ts +81 -0
  24. package/models/models/assembly/assembly-registration.d.ts.map +1 -0
  25. package/models/models/assembly/board-utils.d.ts +6 -0
  26. package/models/models/assembly/board-utils.d.ts.map +1 -0
  27. package/models/models/assembly/holder-utils.d.ts +5 -0
  28. package/models/models/assembly/holder-utils.d.ts.map +1 -0
  29. package/models/models/assembly/index.d.ts +4 -0
  30. package/models/models/assembly/index.d.ts.map +1 -0
  31. package/models/models/assembly/nozzle-utils.d.ts +6 -0
  32. package/models/models/assembly/nozzle-utils.d.ts.map +1 -0
  33. package/models/models/assembly/pump-utils.d.ts +7 -0
  34. package/models/models/assembly/pump-utils.d.ts.map +1 -0
  35. package/models/models/assembly/services/assembly-services.d.ts +8 -0
  36. package/models/models/assembly/services/assembly-services.d.ts.map +1 -0
  37. package/models/models/assembly/services/index.d.ts +2 -0
  38. package/models/models/assembly/services/index.d.ts.map +1 -0
  39. package/models/models/assembly/types/index.d.ts +64 -0
  40. package/models/models/availability/availability-model.d.ts +89 -0
  41. package/models/models/availability/availability-model.d.ts.map +1 -0
  42. package/models/models/availability/index.d.ts +3 -0
  43. package/models/models/availability/index.d.ts.map +1 -0
  44. package/models/models/availability/types/index.d.ts +71 -0
  45. package/models/models/board/board-container-model.d.ts +23 -0
  46. package/models/models/board/board-container-model.d.ts.map +1 -0
  47. package/models/models/board/board-container-registration.d.ts +87 -0
  48. package/models/models/board/board-container-registration.d.ts.map +1 -0
  49. package/models/models/board/board-model.d.ts +18 -0
  50. package/models/models/board/board-model.d.ts.map +1 -0
  51. package/models/models/board/board-registration.d.ts +84 -0
  52. package/models/models/board/board-registration.d.ts.map +1 -0
  53. package/models/models/board/index.d.ts +5 -0
  54. package/models/models/board/index.d.ts.map +1 -0
  55. package/models/models/board/types/index.d.ts +36 -0
  56. package/models/models/board/types/services.d.ts +12 -0
  57. package/models/models/board/types/services.d.ts.map +1 -0
  58. package/models/models/board/utils/board-trouble-data-mapper.d.ts +7 -0
  59. package/models/models/board/utils/board-trouble-data-mapper.d.ts.map +1 -0
  60. package/models/models/board/utils/board-trouble-resolver.d.ts +7 -0
  61. package/models/models/board/utils/board-trouble-resolver.d.ts.map +1 -0
  62. package/models/models/device-assembly/device-assembly-model.d.ts +17 -0
  63. package/models/models/device-assembly/device-assembly-model.d.ts.map +1 -0
  64. package/models/models/device-assembly/device-assembly-registration.d.ts +89 -0
  65. package/models/models/device-assembly/device-assembly-registration.d.ts.map +1 -0
  66. package/models/models/device-assembly/index.d.ts +4 -0
  67. package/models/models/device-assembly/index.d.ts.map +1 -0
  68. package/models/models/device-assembly/types/index.d.ts +1 -0
  69. package/models/models/holder/holder-model.d.ts +93 -0
  70. package/models/models/holder/holder-model.d.ts.map +1 -0
  71. package/models/models/holder/index.d.ts +5 -0
  72. package/models/models/holder/index.d.ts.map +1 -0
  73. package/models/models/holder/services/assignment-services.d.ts +25 -0
  74. package/models/models/holder/services/assignment-services.d.ts.map +1 -0
  75. package/models/models/holder/services/holder-services.d.ts +28 -0
  76. package/models/models/holder/services/holder-services.d.ts.map +1 -0
  77. package/models/models/holder/services/index.d.ts +3 -0
  78. package/models/models/holder/services/index.d.ts.map +1 -0
  79. package/models/models/holder/types/index.d.ts +163 -0
  80. package/models/models/holder/utils/holder-utils.d.ts +9 -0
  81. package/models/models/holder/utils/holder-utils.d.ts.map +1 -0
  82. package/models/models/holder-container/holder-container-model.d.ts +80 -0
  83. package/models/models/holder-container/holder-container-model.d.ts.map +1 -0
  84. package/models/models/holder-container/index.d.ts +3 -0
  85. package/models/models/holder-container/index.d.ts.map +1 -0
  86. package/models/models/holder-container/types/index.d.ts +69 -0
  87. package/models/models/index.d.ts +13 -0
  88. package/models/models/index.d.ts.map +1 -0
  89. package/models/models/ingredient/index.d.ts +4 -0
  90. package/models/models/ingredient/index.d.ts.map +1 -0
  91. package/models/models/ingredient/ingredient-model.d.ts +86 -0
  92. package/models/models/ingredient/ingredient-model.d.ts.map +1 -0
  93. package/models/models/ingredient/services/index.d.ts +2 -0
  94. package/models/models/ingredient/services/index.d.ts.map +1 -0
  95. package/models/models/ingredient/services/ingredient-services.d.ts +30 -0
  96. package/models/models/ingredient/services/ingredient-services.d.ts.map +1 -0
  97. package/models/models/ingredient/types/index.d.ts +67 -0
  98. package/models/models/ingredient-container/index.d.ts +3 -0
  99. package/models/models/ingredient-container/index.d.ts.map +1 -0
  100. package/models/models/ingredient-container/ingredient-container-model.d.ts +80 -0
  101. package/models/models/ingredient-container/ingredient-container-model.d.ts.map +1 -0
  102. package/models/models/ingredient-container/types/index.d.ts +67 -0
  103. package/models/models/nozzle/index.d.ts +5 -0
  104. package/models/models/nozzle/index.d.ts.map +1 -0
  105. package/models/models/nozzle/nozzle-model.d.ts +257 -0
  106. package/models/models/nozzle/nozzle-model.d.ts.map +1 -0
  107. package/models/models/nozzle/services/index.d.ts +2 -0
  108. package/models/models/nozzle/services/index.d.ts.map +1 -0
  109. package/models/models/nozzle/services/nozzle-services.d.ts +181 -0
  110. package/models/models/nozzle/services/nozzle-services.d.ts.map +1 -0
  111. package/models/models/nozzle/types/index.d.ts +85 -0
  112. package/models/models/pump/index.d.ts +4 -0
  113. package/models/models/pump/index.d.ts.map +1 -0
  114. package/models/models/pump/pump-model.d.ts +91 -0
  115. package/models/models/pump/pump-model.d.ts.map +1 -0
  116. package/models/models/pump/services/index.d.ts +2 -0
  117. package/models/models/pump/services/index.d.ts.map +1 -0
  118. package/models/models/pump/services/pump-services.d.ts +27 -0
  119. package/models/models/pump/services/pump-services.d.ts.map +1 -0
  120. package/models/models/pump/types/index.d.ts +55 -0
  121. package/models/models/pump/utils/pump-trouble-resolver.d.ts +8 -0
  122. package/models/models/pump/utils/pump-trouble-resolver.d.ts.map +1 -0
  123. package/models/models/pump-container/index.d.ts +3 -0
  124. package/models/models/pump-container/index.d.ts.map +1 -0
  125. package/models/models/pump-container/pump-container-model.d.ts +85 -0
  126. package/models/models/pump-container/pump-container-model.d.ts.map +1 -0
  127. package/models/models/pump-container/types/index.d.ts +31 -0
  128. package/models/models/types/assembly.d.ts +83 -0
  129. package/models/models/types/assembly.d.ts.map +1 -0
  130. package/models/models/types/index.d.ts +4 -0
  131. package/models/models/types/index.d.ts.map +1 -0
  132. package/models/models/types/intent.d.ts +19 -0
  133. package/models/models/types/intent.d.ts.map +1 -0
  134. package/models/models/types/pouring.d.ts +9 -0
  135. package/models/models/types/pouring.d.ts.map +1 -0
  136. package/models/utils/dispense-registration-manager.d.ts +28 -0
  137. package/models/utils/dispense-registration-manager.d.ts.map +1 -0
  138. package/models/utils/extension-utils.d.ts +265 -0
  139. package/models/utils/extension-utils.d.ts.map +1 -0
  140. package/models/utils/openapi.d.ts +9276 -0
  141. package/models/utils/registration.d.ts +4 -0
  142. package/models/utils/registration.d.ts.map +1 -0
  143. package/models/utils/service.d.ts +64 -0
  144. package/models/utils/service.d.ts.map +1 -0
  145. package/models.cjs +2 -0
  146. package/models.cjs.map +1 -0
  147. package/models.d.ts +1 -0
  148. package/models.js +38 -0
  149. package/models.js.map +1 -0
  150. package/package.json +36 -0
  151. package/pump-provider-COTqsOH-.js +1013 -0
  152. package/pump-provider-COTqsOH-.js.map +1 -0
  153. package/pump-provider-D2HzZ2Bj.cjs +2 -0
  154. package/pump-provider-D2HzZ2Bj.cjs.map +1 -0
  155. package/ui/contexts/assembly/assembly-provider.d.ts +12 -0
  156. package/ui/contexts/assembly/assembly-provider.d.ts.map +1 -0
  157. package/ui/contexts/assembly/index.d.ts +2 -0
  158. package/ui/contexts/assembly/index.d.ts.map +1 -0
  159. package/ui/contexts/availability/availability-provider.d.ts +13 -0
  160. package/ui/contexts/availability/availability-provider.d.ts.map +1 -0
  161. package/ui/contexts/availability/index.d.ts +2 -0
  162. package/ui/contexts/availability/index.d.ts.map +1 -0
  163. package/ui/contexts/board/board-provider.d.ts +13 -0
  164. package/ui/contexts/board/board-provider.d.ts.map +1 -0
  165. package/ui/contexts/board/index.d.ts +2 -0
  166. package/ui/contexts/board/index.d.ts.map +1 -0
  167. package/ui/contexts/board-container/board-container-provider.d.ts +12 -0
  168. package/ui/contexts/board-container/board-container-provider.d.ts.map +1 -0
  169. package/ui/contexts/board-container/index.d.ts +2 -0
  170. package/ui/contexts/board-container/index.d.ts.map +1 -0
  171. package/ui/contexts/cui-kit/cui-kit.d.ts +22 -0
  172. package/ui/contexts/cui-kit/cui-kit.d.ts.map +1 -0
  173. package/ui/contexts/cui-kit/index.d.ts +2 -0
  174. package/ui/contexts/cui-kit/index.d.ts.map +1 -0
  175. package/ui/contexts/device-assembly/device-assembly-provider.d.ts +12 -0
  176. package/ui/contexts/device-assembly/device-assembly-provider.d.ts.map +1 -0
  177. package/ui/contexts/device-assembly/index.d.ts +2 -0
  178. package/ui/contexts/device-assembly/index.d.ts.map +1 -0
  179. package/ui/contexts/holder/holder-provider.d.ts +13 -0
  180. package/ui/contexts/holder/holder-provider.d.ts.map +1 -0
  181. package/ui/contexts/holder/index.d.ts +2 -0
  182. package/ui/contexts/holder/index.d.ts.map +1 -0
  183. package/ui/contexts/holder-container/holder-container-provider.d.ts +13 -0
  184. package/ui/contexts/holder-container/holder-container-provider.d.ts.map +1 -0
  185. package/ui/contexts/holder-container/index.d.ts +2 -0
  186. package/ui/contexts/holder-container/index.d.ts.map +1 -0
  187. package/ui/contexts/index.d.ts +13 -0
  188. package/ui/contexts/index.d.ts.map +1 -0
  189. package/ui/contexts/ingredient/index.d.ts +2 -0
  190. package/ui/contexts/ingredient/index.d.ts.map +1 -0
  191. package/ui/contexts/ingredient/ingredient-provider.d.ts +13 -0
  192. package/ui/contexts/ingredient/ingredient-provider.d.ts.map +1 -0
  193. package/ui/contexts/ingredient-container/index.d.ts +2 -0
  194. package/ui/contexts/ingredient-container/index.d.ts.map +1 -0
  195. package/ui/contexts/ingredient-container/ingredient-container-provider.d.ts +13 -0
  196. package/ui/contexts/ingredient-container/ingredient-container-provider.d.ts.map +1 -0
  197. package/ui/contexts/nozzle/index.d.ts +2 -0
  198. package/ui/contexts/nozzle/index.d.ts.map +1 -0
  199. package/ui/contexts/nozzle/nozzle-provider.d.ts +13 -0
  200. package/ui/contexts/nozzle/nozzle-provider.d.ts.map +1 -0
  201. package/ui/contexts/pump/index.d.ts +2 -0
  202. package/ui/contexts/pump/index.d.ts.map +1 -0
  203. package/ui/contexts/pump/pump-provider.d.ts +13 -0
  204. package/ui/contexts/pump/pump-provider.d.ts.map +1 -0
  205. package/ui/hooks/assembly/index.d.ts +3 -0
  206. package/ui/hooks/assembly/index.d.ts.map +1 -0
  207. package/ui/hooks/assembly/use-assembly.d.ts +14 -0
  208. package/ui/hooks/assembly/use-assembly.d.ts.map +1 -0
  209. package/ui/hooks/assembly/with-assembly.d.ts +8 -0
  210. package/ui/hooks/assembly/with-assembly.d.ts.map +1 -0
  211. package/ui/hooks/availability/index.d.ts +3 -0
  212. package/ui/hooks/availability/index.d.ts.map +1 -0
  213. package/ui/hooks/availability/use-availability.d.ts +14 -0
  214. package/ui/hooks/availability/use-availability.d.ts.map +1 -0
  215. package/ui/hooks/availability/with-availability.d.ts +8 -0
  216. package/ui/hooks/availability/with-availability.d.ts.map +1 -0
  217. package/ui/hooks/board/index.d.ts +3 -0
  218. package/ui/hooks/board/index.d.ts.map +1 -0
  219. package/ui/hooks/board/use-board.d.ts +14 -0
  220. package/ui/hooks/board/use-board.d.ts.map +1 -0
  221. package/ui/hooks/board/with-board.d.ts +8 -0
  222. package/ui/hooks/board/with-board.d.ts.map +1 -0
  223. package/ui/hooks/board-container/index.d.ts +3 -0
  224. package/ui/hooks/board-container/index.d.ts.map +1 -0
  225. package/ui/hooks/board-container/use-board-container.d.ts +14 -0
  226. package/ui/hooks/board-container/use-board-container.d.ts.map +1 -0
  227. package/ui/hooks/board-container/with-board-container.d.ts +8 -0
  228. package/ui/hooks/board-container/with-board-container.d.ts.map +1 -0
  229. package/ui/hooks/cui-kit/index.d.ts +8 -0
  230. package/ui/hooks/cui-kit/index.d.ts.map +1 -0
  231. package/ui/hooks/cui-kit/use-ambient-attract-timers.d.ts +18 -0
  232. package/ui/hooks/cui-kit/use-ambient-attract-timers.d.ts.map +1 -0
  233. package/ui/hooks/cui-kit/use-beverages.d.ts +17 -0
  234. package/ui/hooks/cui-kit/use-beverages.d.ts.map +1 -0
  235. package/ui/hooks/cui-kit/use-brands.d.ts +17 -0
  236. package/ui/hooks/cui-kit/use-brands.d.ts.map +1 -0
  237. package/ui/hooks/cui-kit/use-cui-kit.d.ts +127 -0
  238. package/ui/hooks/cui-kit/use-cui-kit.d.ts.map +1 -0
  239. package/ui/hooks/cui-kit/use-default-cui-kit-lifecycle.d.ts +88 -0
  240. package/ui/hooks/cui-kit/use-default-cui-kit-lifecycle.d.ts.map +1 -0
  241. package/ui/hooks/cui-kit/use-dispense-lifecycle.d.ts +19 -0
  242. package/ui/hooks/cui-kit/use-dispense-lifecycle.d.ts.map +1 -0
  243. package/ui/hooks/cui-kit/use-dispense-timers.d.ts +17 -0
  244. package/ui/hooks/cui-kit/use-dispense-timers.d.ts.map +1 -0
  245. package/ui/hooks/cui-kit/use-flavors.d.ts +17 -0
  246. package/ui/hooks/cui-kit/use-flavors.d.ts.map +1 -0
  247. package/ui/hooks/device-assembly/index.d.ts +3 -0
  248. package/ui/hooks/device-assembly/index.d.ts.map +1 -0
  249. package/ui/hooks/device-assembly/use-device-assembly.d.ts +14 -0
  250. package/ui/hooks/device-assembly/use-device-assembly.d.ts.map +1 -0
  251. package/ui/hooks/device-assembly/with-device-assembly.d.ts +9 -0
  252. package/ui/hooks/device-assembly/with-device-assembly.d.ts.map +1 -0
  253. package/ui/hooks/holder/index.d.ts +3 -0
  254. package/ui/hooks/holder/index.d.ts.map +1 -0
  255. package/ui/hooks/holder/use-holder.d.ts +14 -0
  256. package/ui/hooks/holder/use-holder.d.ts.map +1 -0
  257. package/ui/hooks/holder/with-holder.d.ts +8 -0
  258. package/ui/hooks/holder/with-holder.d.ts.map +1 -0
  259. package/ui/hooks/holder-container/index.d.ts +3 -0
  260. package/ui/hooks/holder-container/index.d.ts.map +1 -0
  261. package/ui/hooks/holder-container/use-holder-container.d.ts +14 -0
  262. package/ui/hooks/holder-container/use-holder-container.d.ts.map +1 -0
  263. package/ui/hooks/holder-container/with-holder-container.d.ts +8 -0
  264. package/ui/hooks/holder-container/with-holder-container.d.ts.map +1 -0
  265. package/ui/hooks/index.d.ts +14 -0
  266. package/ui/hooks/index.d.ts.map +1 -0
  267. package/ui/hooks/ingredient/index.d.ts +4 -0
  268. package/ui/hooks/ingredient/index.d.ts.map +1 -0
  269. package/ui/hooks/ingredient/use-ingredient-pour.d.ts +49 -0
  270. package/ui/hooks/ingredient/use-ingredient-pour.d.ts.map +1 -0
  271. package/ui/hooks/ingredient/use-ingredient.d.ts +14 -0
  272. package/ui/hooks/ingredient/use-ingredient.d.ts.map +1 -0
  273. package/ui/hooks/ingredient/with-ingredient.d.ts +8 -0
  274. package/ui/hooks/ingredient/with-ingredient.d.ts.map +1 -0
  275. package/ui/hooks/ingredient-container/index.d.ts +3 -0
  276. package/ui/hooks/ingredient-container/index.d.ts.map +1 -0
  277. package/ui/hooks/ingredient-container/use-ingredient-container.d.ts +14 -0
  278. package/ui/hooks/ingredient-container/use-ingredient-container.d.ts.map +1 -0
  279. package/ui/hooks/ingredient-container/with-ingredient-container.d.ts +8 -0
  280. package/ui/hooks/ingredient-container/with-ingredient-container.d.ts.map +1 -0
  281. package/ui/hooks/nozzle/index.d.ts +3 -0
  282. package/ui/hooks/nozzle/index.d.ts.map +1 -0
  283. package/ui/hooks/nozzle/use-dispense-kit.d.ts +22 -0
  284. package/ui/hooks/nozzle/use-dispense-kit.d.ts.map +1 -0
  285. package/ui/hooks/nozzle/use-nozzle.d.ts +14 -0
  286. package/ui/hooks/nozzle/use-nozzle.d.ts.map +1 -0
  287. package/ui/hooks/nozzle/with-nozzle.d.ts +8 -0
  288. package/ui/hooks/nozzle/with-nozzle.d.ts.map +1 -0
  289. package/ui/hooks/nozzle-pour/index.d.ts +2 -0
  290. package/ui/hooks/nozzle-pour/index.d.ts.map +1 -0
  291. package/ui/hooks/nozzle-pour/use-nozzle-pour.d.ts +48 -0
  292. package/ui/hooks/nozzle-pour/use-nozzle-pour.d.ts.map +1 -0
  293. package/ui/hooks/pump/index.d.ts +3 -0
  294. package/ui/hooks/pump/index.d.ts.map +1 -0
  295. package/ui/hooks/pump/use-pump.d.ts +14 -0
  296. package/ui/hooks/pump/use-pump.d.ts.map +1 -0
  297. package/ui/hooks/pump/with-pump.d.ts +8 -0
  298. package/ui/hooks/pump/with-pump.d.ts.map +1 -0
  299. package/ui/hooks/utils/pour-strategy/hold-to-pour-intent-strategy.d.ts +5 -0
  300. package/ui/hooks/utils/pour-strategy/hold-to-pour-intent-strategy.d.ts.map +1 -0
  301. package/ui/hooks/utils/pour-strategy/hold-to-pour-strategy.d.ts +4 -0
  302. package/ui/hooks/utils/pour-strategy/hold-to-pour-strategy.d.ts.map +1 -0
  303. package/ui/hooks/utils/pour-strategy/index.d.ts +7 -0
  304. package/ui/hooks/utils/pour-strategy/index.d.ts.map +1 -0
  305. package/ui/hooks/utils/pour-strategy/pour-strategy.d.ts +8 -0
  306. package/ui/hooks/utils/pour-strategy/pour-strategy.d.ts.map +1 -0
  307. package/ui/hooks/utils/pour-strategy/tap-or-hold-to-pour-intent-strategy.d.ts +13 -0
  308. package/ui/hooks/utils/pour-strategy/tap-or-hold-to-pour-intent-strategy.d.ts.map +1 -0
  309. package/ui/hooks/utils/pour-strategy/tap-to-pour-intent-strategy.d.ts +5 -0
  310. package/ui/hooks/utils/pour-strategy/tap-to-pour-intent-strategy.d.ts.map +1 -0
  311. package/ui/hooks/utils/pour-strategy/tap-to-pour-strategy.d.ts +4 -0
  312. package/ui/hooks/utils/pour-strategy/tap-to-pour-strategy.d.ts.map +1 -0
  313. package/ui/index.d.ts +3 -0
  314. package/ui/index.d.ts.map +1 -0
  315. package/ui.cjs +2 -0
  316. package/ui.cjs.map +1 -0
  317. package/ui.d.ts +1 -0
  318. package/ui.js +70 -0
  319. package/ui.js.map +1 -0
@@ -0,0 +1,71 @@
1
+ import { IKosDataModel, KosParentAware, NoteAware } from '@kosdev-code/kos-ui-sdk';
2
+
3
+ /**
4
+ * Options for creating an AvailabilityModel.
5
+ */
6
+ export interface AvailabilityOptions<AdditionalData extends object = any>
7
+ extends KosParentAware,
8
+ NoteAware {
9
+ /**is the node available as calculated by the Pour Engine */
10
+ available: boolean;
11
+ /**
12
+ * Return the alternate id for the node. The alternate id can be used
13
+ * to store correlation id's to link nodes to other data in the event
14
+ * that node id's can't be used due to potentially id collisions.
15
+ */
16
+ altId: string;
17
+
18
+ /**
19
+ * The raw id for the node. The raw id will generally be the beverage id
20
+ * in the scope of its group.
21
+ */
22
+ rawId: string;
23
+ groupId: string;
24
+ /** is the node visible as calculated by the Pour Engine. */
25
+ visible: boolean;
26
+ /** the type of the node */
27
+ type: string;
28
+ taggedIds?: string[];
29
+ note?: string;
30
+ data: AdditionalData;
31
+ }
32
+ /**
33
+ *
34
+ *
35
+ * Represents the nodes of the Beverage Availability graph for a nozzle.
36
+ *
37
+ * @typeParam AdditionalData - Any additional data that is added to a node at the application layer.
38
+ *
39
+ * @example The base GraphNode from the backend will have an id, type, available and visible properties. However,
40
+ * a given implementation might extend the Beverage Graph node to include additional data, such as the beverage name or
41
+ * an image url. This additional data would be added to the node and would be represented by the AdditionalData type parameter.
42
+ * ```typescript
43
+ * const model: AvailabilityModel<{icon: string}> = ...;
44
+ * ```
45
+ * would allow for visibility of all the base properties as well as the additional data (icon) that might be on the message payload from
46
+ * the backend.
47
+ *
48
+ * @category Model
49
+ */
50
+ export interface AvailabilityModel<AdditionalData extends object = any>
51
+ extends Omit<AvailabilityOptions, "data" | keyof KosParentAware>,
52
+ IKosDataModel,
53
+ NoteAware {
54
+ /** unique identifier of the Availability model */
55
+ id: string;
56
+ data: AdditionalData;
57
+ taggedIds: string[];
58
+ parentId?: string;
59
+ /**
60
+ * Convenience method to update the model with new availability options.
61
+ * @param options - the availability options to update the model with.
62
+ */
63
+ updateModel(options: AvailabilityOptions): void;
64
+
65
+ /**
66
+ * Updates node availability state.
67
+ *
68
+ * @param available - the new availability value to set on the model.
69
+ */
70
+ updateAvailability(available: boolean): void;
71
+ }
@@ -0,0 +1,23 @@
1
+ import { BoardLinkEvent } from './types/services';
2
+ import { BoardContainerOptions, BoardModel } from './types';
3
+ import { IKosDataModel, KosCreationContext } from '@kosdev-code/kos-ui-sdk';
4
+
5
+ export declare const MODEL_TYPE = "board-container-model";
6
+ export declare const TOPIC_BOARD_LINKED = "/kos/hardware/board/linked";
7
+ export declare const TOPIC_BOARD_UNLINKED = "/kos/hardware/board/unlinked";
8
+ export declare class BoardContainerModel implements IKosDataModel {
9
+ id: string;
10
+ private logger;
11
+ private models;
12
+ constructor(modelId: string, options: BoardContainerOptions, context: KosCreationContext);
13
+ get boardList(): BoardModel<{}>[];
14
+ updateModel(): void;
15
+ addModel(model: BoardModel): void;
16
+ removeModel(id: string): void;
17
+ updateBoard(boardLinkEvent: BoardLinkEvent): void;
18
+ handleBoardLinkEvent(boardLinkEvent: BoardLinkEvent): void;
19
+ handleBoardUnlinkEvent(boardLinkEvent: BoardLinkEvent): void;
20
+ }
21
+ export interface BoardContainerModel {
22
+ }
23
+ //# sourceMappingURL=board-container-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"board-container-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-dispense-sdk/src/models/models/board/board-container-model.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EAGb,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AASjC,OAAO,KAAK,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,eAAO,MAAM,UAAU,0BAA0B,CAAC;AAClD,eAAO,MAAM,kBAAkB,+BAA+B,CAAC;AAC/D,eAAO,MAAM,oBAAoB,iCAAiC,CAAC;AAEnE,qBACa,mBAAoB,YAAW,aAAa;IACvD,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,MAAM,CAAmB;IACvB,OAAO,CAAC,MAAM,CAAiC;gBAEvD,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,qBAAqB,EAC9B,OAAO,EAAE,kBAAkB;IAa7B,IAAI,SAAS,qBAEZ;IAED,WAAW,IAAI,IAAI;IAInB,QAAQ,CAAC,KAAK,EAAE,UAAU;IAI1B,WAAW,CAAC,EAAE,EAAE,MAAM;IAItB,WAAW,CAAC,cAAc,EAAE,cAAc;IAiB1C,oBAAoB,CAAC,cAAc,EAAE,cAAc;IAenD,sBAAsB,CAAC,cAAc,EAAE,cAAc;CAWtD;AAED,MAAM,WAAW,mBAAmB;CAAG"}
@@ -0,0 +1,87 @@
1
+ import { BoardContainerOptions } from './types';
2
+ import { BoardContainerModel } from './board-container-model';
3
+ import { SingletonKosModelRegistrationBean } from '@kosdev-code/kos-ui-sdk';
4
+
5
+ /**
6
+ * # BoardContainer
7
+ *
8
+ * The registration bean includes convenience methods for creating and working with BoardContainerModel instances.
9
+ *
10
+ * ## type
11
+ * The type property is a string that identifies the model type.
12
+ * 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
13
+ * used when declaring dependencies on models.
14
+ *
15
+ * @example
16
+ * ```typescript
17
+ *
18
+ * @kosDependency({modelType: BoardContainer.type, id: "boardContainerId"})
19
+ * private boardContainerModel: BoardContainerModel;
20
+ * ```
21
+ *
22
+ *
23
+ * ## factory
24
+ *
25
+ * The factory method creates a factory function that can be used to create new BoardContainerModel instances.
26
+ *
27
+
28
+ * As this is a singleton model, the factory function accepts the model options as its argument.
29
+ *
30
+ * If a model with the same model type already exists, the factory function will return the existing model. The options will be ignored
31
+ * in this case and the existing model will be returned in its current state.
32
+ *
33
+ * @example
34
+ * ```typescript
35
+ * const model = BoardContainer.factory({
36
+ * // Add option data
37
+ * });
38
+ * ```
39
+
40
+
41
+ *
42
+ * ## predicate
43
+ *
44
+ * [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 BoardContainerModel.
45
+ *
46
+ * @example
47
+ * ```typescript
48
+ *
49
+ * const model: IKosDataModel = ...; // some model
50
+ *
51
+ * if (BoardContainer.predicate(model)) {
52
+ * // if the function evaluates to true, the model is narrowed down to BoardContainerModel
53
+ * // and the compiler will know that the model has the BoardContainerModel interface
54
+ * model.updateAvailability(false);
55
+ * }
56
+ * ```
57
+ *
58
+ * ## registration
59
+ *
60
+ * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
61
+ * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
62
+ *
63
+ *
64
+ * @example
65
+ *
66
+ * In an application registration file you can declare the model registration as follows:
67
+ *
68
+ * **registration.ts**
69
+ * ```typescript
70
+ * import { BoardContainer } from "@kosdev-code/kos-dispense-sdk";
71
+ * ...
72
+ * import { ExtensionManager, IKosRegistry } from "@kosdev-code/kos-ui-sdk";
73
+ * export const kosModels: IKosRegistry["models"] = {
74
+ * ...BoardContainer.registration,
75
+ * };
76
+ * ```
77
+ *
78
+ * ## registration.singleton
79
+
80
+ * The boardContainer model is a singleton model. This means that each time the factory function is called , the same instance will be returned.
81
+ * If the model does not yet exist, it will be created passing in the provided options to initialize it.
82
+ *
83
+ * Singleton models don't require an ID as they will use the model type as their ID to guarantee uniqueness throughout the system.
84
+
85
+ * */
86
+ export declare const BoardContainer: Readonly<SingletonKosModelRegistrationBean<BoardContainerModel, BoardContainerOptions>>;
87
+ //# sourceMappingURL=board-container-registration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"board-container-registration.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-dispense-sdk/src/models/models/board/board-container-registration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,yBAAyB,CAAC;AAEjF,OAAO,EAAE,mBAAmB,EAAc,MAAM,yBAAyB,CAAC;AAE1E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgFK;AACL,eAAO,MAAM,cAAc,EAAE,QAAQ,CACnC,iCAAiC,CAAC,mBAAmB,EAAE,qBAAqB,CAAC,CAc9E,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { BoardModel, BoardOptions } from './types';
2
+ import { IKosDataModel, KosCreationContext } from '@kosdev-code/kos-ui-sdk';
3
+
4
+ export declare const MODEL_TYPE = "board-model";
5
+ export declare class BoardModelImpl<AdditionalData extends object = {}> implements IKosDataModel, BoardModel<AdditionalData> {
6
+ id: string;
7
+ type: string;
8
+ name: string;
9
+ path: string;
10
+ linked: boolean;
11
+ instanceId?: string;
12
+ private logger;
13
+ constructor(modelId: string, options: BoardOptions, context: KosCreationContext);
14
+ updateModel(options: BoardOptions): void;
15
+ init(): Promise<void>;
16
+ load(): Promise<void>;
17
+ }
18
+ //# sourceMappingURL=board-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"board-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-dispense-sdk/src/models/models/board/board-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EAEb,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAOjC,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAIxD,eAAO,MAAM,UAAU,gBAAgB,CAAC;AAwBxC,qBACa,cAAc,CAAC,cAAc,SAAS,MAAM,GAAG,EAAE,CAC5D,YAAW,aAAa,EAAE,UAAU,CAAC,cAAc,CAAC;IAEpD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAG,MAAM,CAAC;IACd,IAAI,EAAG,MAAM,CAAC;IACd,IAAI,EAAG,MAAM,CAAC;IACd,MAAM,EAAG,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,MAAM,CAAmB;gBAE/B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,kBAAkB;IAQ7B,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI;IAMlC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAG5B"}
@@ -0,0 +1,84 @@
1
+ import { BoardModel, BoardOptions } from './types';
2
+ import { KosModelRegistrationBean } from '@kosdev-code/kos-ui-sdk';
3
+
4
+ /**
5
+ * # Board
6
+ *
7
+ * The registration bean includes convenience methods for creating and working with BoardModel 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: Board.type, id: "boardId"})
18
+ * private boardModel: BoardModel;
19
+ * ```
20
+ *
21
+ *
22
+ * ## factory
23
+ *
24
+ * The factory method creates a factory function that can be used to create new BoardModel 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.
31
+ *
32
+ * @example
33
+ * ```typescript
34
+ * const model = Board.factory("boardId")({
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 BoardModel.
44
+ *
45
+ * @example
46
+ * ```typescript
47
+ *
48
+ * const model: IKosDataModel = ...; // some model
49
+ *
50
+ * if (Board.predicate(model)) {
51
+ * // if the function evaluates to true, the model is narrowed down to BoardModel
52
+ * // and the compiler will know that the model has the BoardModel 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 { Board } from "@kosdev-code/kos-dispense-sdk";
70
+ * ...
71
+ * import { ExtensionManager, IKosRegistry } from "@kosdev-code/kos-ui-sdk";
72
+ * export const kosModels: IKosRegistry["models"] = {
73
+ * ...Board.registration,
74
+ * };
75
+ * ```
76
+ *
77
+ * ## registration.singleton
78
+
79
+ * The board 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.
80
+ * If the factory function is called with an ID that already exists, the existing model will be returned.
81
+
82
+ * */
83
+ export declare const Board: Readonly<KosModelRegistrationBean<BoardModel, BoardOptions>>;
84
+ //# sourceMappingURL=board-registration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"board-registration.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-dispense-sdk/src/models/models/board/board-registration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAGxE,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8EK;AACL,eAAO,MAAM,KAAK,EAAE,QAAQ,CAC1B,wBAAwB,CAAC,UAAU,EAAE,YAAY,CAAC,CAWnD,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { BoardContainerModel, TOPIC_BOARD_LINKED, TOPIC_BOARD_UNLINKED, } from './board-container-model';
2
+ export { BoardContainer } from './board-container-registration';
3
+ export { Board } from './board-registration';
4
+ export type * from './types';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-dispense-sdk/src/models/models/board/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE7C,mBAAmB,SAAS,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { IKosDataModel } from '@kosdev-code/kos-ui-sdk';
2
+
3
+
4
+ // --------------- Board ---------------
5
+
6
+ export interface LinkType {
7
+ linkType: string;
8
+ serialNum: string;
9
+ revision?: string;
10
+ firmwareVersions?: string[];
11
+ [k: string]: string;
12
+ }
13
+ export interface BoardOptions<AdditionalData extends object = any> {
14
+ type: string;
15
+ name: string;
16
+ path: string;
17
+ linked: boolean;
18
+ link?: LinkType;
19
+ instanceId?: string;
20
+ [key: keyof AdditionalData]: AdditionalData[key];
21
+ }
22
+
23
+ // --------------- BoardContainer ---------------
24
+ export interface BoardContainerOptions {}
25
+
26
+ export interface BoardModel<AdditionalData extends object = {}>
27
+ extends AdditionalData,
28
+ IKosDataModel {
29
+ type: string;
30
+ name: string;
31
+ path: string;
32
+ linked: boolean;
33
+ link?: Readonly<LinkType>;
34
+ instanceId?: string;
35
+ updateModel(options: BoardOptions): void;
36
+ }
@@ -0,0 +1,12 @@
1
+ export interface BoardLinkEvent {
2
+ link: {
3
+ linkType: string;
4
+ serialNum: string;
5
+ };
6
+ instanceId: string;
7
+ type: string;
8
+ linked: boolean;
9
+ name: string;
10
+ path: string;
11
+ }
12
+ //# sourceMappingURL=services.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-dispense-sdk/src/models/models/board/types/services.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE;QACJ,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd"}
@@ -0,0 +1,7 @@
1
+ import { BoardTroubleData } from './board-trouble-resolver';
2
+ import { TroubleModel } from '@kosdev-code/kos-ui-sdk';
3
+
4
+ export declare const boardTroubleDataMapper: (trouble: TroubleModel<BoardTroubleData>) => Promise<{
5
+ boardName: string;
6
+ }>;
7
+ //# sourceMappingURL=board-trouble-data-mapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"board-trouble-data-mapper.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-dispense-sdk/src/models/models/board/utils/board-trouble-data-mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAG5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,eAAO,MAAM,sBAAsB,YACxB,aAAa,gBAAgB,CAAC;;EAOxC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { TroubleModel } from '@kosdev-code/kos-ui-sdk';
2
+
3
+ export interface BoardTroubleData {
4
+ boardPath: string;
5
+ }
6
+ export declare const boardTroubleResolver: (trouble: TroubleModel<BoardTroubleData>) => Promise<string[]>;
7
+ //# sourceMappingURL=board-trouble-resolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"board-trouble-resolver.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-dispense-sdk/src/models/models/board/utils/board-trouble-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAQzE,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,oBAAoB,YACtB,aAAa,gBAAgB,CAAC,sBA0BxC,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { DeviceAssemblyOptions } from './types';
2
+ import { NozzleModel } from '../nozzle';
3
+ import { IKosDataModel, IKosIdentifiable, KosCreationContext, PublicModelInterface } from '@kosdev-code/kos-ui-sdk';
4
+
5
+ export declare const MODEL_TYPE = "device-assembly-model";
6
+ export type DeviceAssemblyModel = PublicModelInterface<DeviceAssemblyModelImpl>;
7
+ export declare class DeviceAssemblyModelImpl implements IKosDataModel, IKosIdentifiable {
8
+ id: string;
9
+ private deviceNozzles;
10
+ private logger;
11
+ constructor(modelId: string, _options: DeviceAssemblyOptions, context: KosCreationContext);
12
+ init(): Promise<void>;
13
+ getNozzle(path: string): NozzleModel | undefined;
14
+ get nozzlePaths(): string[];
15
+ load(): Promise<void>;
16
+ }
17
+ //# sourceMappingURL=device-assembly-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-assembly-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-dispense-sdk/src/models/models/device-assembly/device-assembly-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAGhB,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD,eAAO,MAAM,UAAU,0BAA0B,CAAC;AAElD,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,CAAC,uBAAuB,CAAC,CAAC;AAEhF,qBACa,uBACX,YAAW,aAAa,EAAE,gBAAgB;IAE1C,EAAE,EAAE,MAAM,CAAC;IACD,OAAO,CAAC,aAAa,CAAkC;IACjE,OAAO,CAAC,MAAM,CAAmB;gBAE/B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,qBAAqB,EAC/B,OAAO,EAAE,kBAAkB;IASvB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAIhD,IAAI,WAAW,IAAI,MAAM,EAAE,CAE1B;IAEK,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAwB5B"}
@@ -0,0 +1,89 @@
1
+ import { DeviceAssemblyOptions } from './types';
2
+ import { DeviceAssemblyModel } from './device-assembly-model';
3
+ import { SingletonKosModelRegistrationFactory } from '@kosdev-code/kos-ui-sdk';
4
+
5
+ /**
6
+ * # DeviceAssembly
7
+ *
8
+ * The registration bean includes convenience methods for creating and working with DeviceAssemblyModel instances.
9
+ *
10
+ * ## type
11
+ * The type property is a string that identifies the model type.
12
+ * 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
13
+ * used when declaring dependencies on models.
14
+ *
15
+ * @example
16
+ * ```typescript
17
+ *
18
+ * @kosDependency({modelType: DeviceAssembly.type, id: "deviceAssemblyId"})
19
+ * private deviceAssemblyModel: DeviceAssemblyModel;
20
+ * ```
21
+ *
22
+ *
23
+ * ## factory
24
+ *
25
+ * The factory method creates a factory function that can be used to create new DeviceAssemblyModel instances.
26
+ *
27
+
28
+ * As this is a singleton model, the factory function accepts the model options as its argument.
29
+ *
30
+ * If a model with the same model type already exists, the factory function will return the existing model. The options will be ignored
31
+ * in this case and the existing model will be returned in its current state.
32
+ *
33
+ * @example
34
+ * ```typescript
35
+ * const model = DeviceAssembly.factory({
36
+ * // Add option data
37
+ * });
38
+ * ```
39
+
40
+
41
+ *
42
+ * ## predicate
43
+ *
44
+ * [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 DeviceAssemblyModel.
45
+ *
46
+ * @example
47
+ * ```typescript
48
+ *
49
+ * const model: IKosDataModel = ...; // some model
50
+ *
51
+ * if (DeviceAssembly.predicate(model)) {
52
+ * // if the function evaluates to true, the model is narrowed down to DeviceAssemblyModel
53
+ * // and the compiler will know that the model has the DeviceAssemblyModel interface
54
+ * model.updateAvailability(false);
55
+ * }
56
+ * ```
57
+ *
58
+ * ## registration
59
+ *
60
+ * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
61
+ * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
62
+ *
63
+ *
64
+ * @example
65
+ *
66
+ * In an application registration file you can declare the model registration as follows:
67
+ *
68
+ * **registration.ts**
69
+ * ```typescript
70
+ * import { DeviceAssembly } from "@kos-ui/project-models";
71
+ * import { KosModelRegistry } from "@kosdev-code/kos-dispense-sdk";
72
+ *
73
+ * import { initKosProvider } from "@kosdev-code/kos-ui-sdk";
74
+ *
75
+ * KosModelRegistry.dispense
76
+ * .models()
77
+ * .model(DeviceAssembly);
78
+ * ```
79
+ *
80
+ * ## registration.singleton
81
+
82
+ * The deviceAssembly model is a singleton model. This means that each time the factory function is called , the same instance will be returned.
83
+ * If the model does not yet exist, it will be created passing in the provided options to initialize it.
84
+ *
85
+ * Singleton models don't require an ID as they will use the model type as their ID to guarantee uniqueness throughout the system.
86
+
87
+ * */
88
+ export declare const DeviceAssembly: SingletonKosModelRegistrationFactory<DeviceAssemblyModel, DeviceAssemblyOptions>;
89
+ //# sourceMappingURL=device-assembly-registration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-assembly-registration.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-dispense-sdk/src/models/models/device-assembly/device-assembly-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkFK;AACL,eAAO,MAAM,cAAc,kFAMzB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { DeviceAssembly } from './device-assembly-registration';
2
+ export type * from './types';
3
+ export type { DeviceAssemblyModel } from './device-assembly-model';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-dispense-sdk/src/models/models/device-assembly/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,mBAAmB,SAAS,CAAC;AAC7B,YAAY,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1 @@
1
+ export interface DeviceAssemblyOptions {}
@@ -0,0 +1,93 @@
1
+ import { HolderModel, HolderOptions } from './types';
2
+ import { KosModelRegistrationBean } from '@kosdev-code/kos-ui-sdk';
3
+
4
+ export interface HolderTroubleData {
5
+ holderPaths: string[];
6
+ holderNames: string[];
7
+ }
8
+ export interface ContainerTroubleData {
9
+ ingredients: string[];
10
+ unknonwnIngredientId?: string;
11
+ }
12
+ /**
13
+ * # Holder
14
+ *
15
+ * The registration bean includes convenience methods for creating and working with HolderModel instances.
16
+ *
17
+ * ## type
18
+ * The type property is a string that identifies the model type.
19
+ * 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
20
+ * used when declaring dependencies on models.
21
+ *
22
+ * @example
23
+ * ```typescript
24
+ *
25
+ * @kosDependency({modelType: Holder.type, id: "holderId"})
26
+ * private holderModel: HolderModel;
27
+ * ```
28
+ *
29
+ *
30
+ * ## factory
31
+ *
32
+ * The factory method creates a factory function that can be used to create new HolderModel instances.
33
+ *
34
+ * The factory function is a curried function that takes the model id as the first argument and the options as the second argument.
35
+ *
36
+ * If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored
37
+ * in this case and the existing model will be returned in its current state.
38
+ *
39
+ * @example
40
+ *
41
+ * ```typescript
42
+ * const model = Holder.factory("S1")({
43
+ * path: "core.dispenser.holder.s1",
44
+ * name: "S1",
45
+ * ingredientId: "1234532",
46
+ * assemblyName: "",
47
+ * type: "syrup",
48
+ * });
49
+ * ```
50
+ *
51
+ * ## predicate
52
+ *
53
+ * [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 HolderModel.
54
+ *
55
+ * @example
56
+ * ```typescript
57
+ *
58
+ * const model: IKosDataModel = ...; // some model
59
+ *
60
+ * if (Holder.predicate(model)) {
61
+ * // if the function evaluates to true, the model is narrowed down to HolderModel
62
+ * // and the compiler will know that the model has the HolderModel interface
63
+ * model.updateAvailability(false);
64
+ * }
65
+ * ```
66
+ *
67
+ * ## registration
68
+ *
69
+ * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
70
+ * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
71
+ *
72
+ *
73
+ * @example
74
+ *
75
+ * In an application registration file you can declare the model registration as follows:
76
+ *
77
+ * **registration.ts**
78
+ * ```typescript
79
+ * import { Holder } from "@kosdev-code/kos-dispense-sdk";
80
+ * ...
81
+ * import { IKosRegistry } from "@kosdev-code/kos-ui-sdk";
82
+ * export const kosModels: IKosRegistry["models"] = {
83
+ * ...Holder.registration,
84
+ * };
85
+ * ```
86
+ *
87
+ * ## registration.singleton
88
+ *
89
+ * The holder 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.
90
+ * If the factory function is called with an ID that already exists, the existing model will be returned.
91
+ * */
92
+ export declare const Holder: Readonly<KosModelRegistrationBean<HolderModel, HolderOptions>>;
93
+ //# sourceMappingURL=holder-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"holder-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-dispense-sdk/src/models/models/holder/holder-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,wBAAwB,EAGzB,MAAM,yBAAyB,CAAC;AAkCjC,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAM1D,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAyZD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+EK;AACL,eAAO,MAAM,MAAM,EAAE,QAAQ,CAC3B,wBAAwB,CAAC,WAAW,EAAE,aAAa,CAAC,CAWrD,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { Holder, type HolderTroubleData } from './holder-model';
2
+ export * as HolderServices from './services';
3
+ export type * from './types';
4
+ export * from './utils/holder-utils';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-dispense-sdk/src/models/models/holder/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,KAAK,cAAc,MAAM,YAAY,CAAC;AAC7C,mBAAmB,SAAS,CAAC;AAC7B,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,25 @@
1
+ export interface Assignment {
2
+ ingredientId: string;
3
+ holderPath: string;
4
+ containerId?: string;
5
+ fuelGauge?: number;
6
+ }
7
+ export interface AssignmentFactoryJson {
8
+ stickerId: string;
9
+ stickerCode: string;
10
+ }
11
+ /**
12
+ * @category Service
13
+ * Retrieves the initial dispenser data.
14
+ */
15
+ export declare const getAssignments: () => Promise<import('@kosdev-code/kos-ui-sdk').KosServiceResponse<Assignment[]> | undefined>;
16
+ export type AssignmentErrorType = "errIdLen" | "errCodeLen" | "errIdFormat" | "errCodeFormat" | "errVerify" | "errBadJson" | "unknownError";
17
+ type AssignmentResponse = [
18
+ AssignmentErrorType | undefined,
19
+ Assignment | undefined
20
+ ];
21
+ export declare const sendRfidOverride: (holderPath: string, overrides: any) => Promise<AssignmentResponse>;
22
+ export declare const addAssignment: (assignment: Assignment) => Promise<import('@kosdev-code/kos-ui-sdk').KosServiceResponse<any> | undefined>;
23
+ export declare const deleteAssignment: (id: string) => Promise<import('@kosdev-code/kos-ui-sdk').KosServiceResponse<unknown> | undefined>;
24
+ export {};
25
+ //# sourceMappingURL=assignment-services.d.ts.map