@kosdev-code/kos-dispense-sdk 0.1.0-dev.5053

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 (346) hide show
  1. package/dispense-registration-manager-BZ5L3AWX.cjs +2 -0
  2. package/dispense-registration-manager-BZ5L3AWX.cjs.map +1 -0
  3. package/dispense-registration-manager-CB_nSTZw.js +1912 -0
  4. package/dispense-registration-manager-CB_nSTZw.js.map +1 -0
  5. package/extension-utils-CkYqorcG.js +381 -0
  6. package/extension-utils-CkYqorcG.js.map +1 -0
  7. package/extension-utils-DUel3wIz.cjs +2 -0
  8. package/extension-utils-DUel3wIz.cjs.map +1 -0
  9. package/extensions/control-pour-extension.d.ts +70 -0
  10. package/extensions/control-pour-extension.d.ts.map +1 -0
  11. package/extensions/index.d.ts +2 -0
  12. package/extensions/index.d.ts.map +1 -0
  13. package/index.cjs +2 -0
  14. package/index.cjs.map +1 -0
  15. package/index.d.ts +6 -0
  16. package/index.d.ts.map +1 -0
  17. package/index.js +133 -0
  18. package/index.js.map +1 -0
  19. package/models/constants/constants.d.ts +230 -0
  20. package/models/constants/constants.d.ts.map +1 -0
  21. package/models/constants/index.d.ts +2 -0
  22. package/models/constants/index.d.ts.map +1 -0
  23. package/models/index.d.ts +6 -0
  24. package/models/index.d.ts.map +1 -0
  25. package/models/models/assembly/assembly-model.d.ts +41 -0
  26. package/models/models/assembly/assembly-model.d.ts.map +1 -0
  27. package/models/models/assembly/assembly-registration.d.ts +81 -0
  28. package/models/models/assembly/assembly-registration.d.ts.map +1 -0
  29. package/models/models/assembly/board-utils.d.ts +6 -0
  30. package/models/models/assembly/board-utils.d.ts.map +1 -0
  31. package/models/models/assembly/holder-utils.d.ts +5 -0
  32. package/models/models/assembly/holder-utils.d.ts.map +1 -0
  33. package/models/models/assembly/index.d.ts +5 -0
  34. package/models/models/assembly/index.d.ts.map +1 -0
  35. package/models/models/assembly/nozzle-utils.d.ts +6 -0
  36. package/models/models/assembly/nozzle-utils.d.ts.map +1 -0
  37. package/models/models/assembly/pump-utils.d.ts +7 -0
  38. package/models/models/assembly/pump-utils.d.ts.map +1 -0
  39. package/models/models/assembly/services/assembly-services.d.ts +8 -0
  40. package/models/models/assembly/services/assembly-services.d.ts.map +1 -0
  41. package/models/models/assembly/services/index.d.ts +2 -0
  42. package/models/models/assembly/services/index.d.ts.map +1 -0
  43. package/models/models/assembly/types/index.d.ts +64 -0
  44. package/models/models/availability/availability-model.d.ts +89 -0
  45. package/models/models/availability/availability-model.d.ts.map +1 -0
  46. package/models/models/availability/index.d.ts +3 -0
  47. package/models/models/availability/index.d.ts.map +1 -0
  48. package/models/models/availability/types/index.d.ts +79 -0
  49. package/models/models/board/board-container-model.d.ts +23 -0
  50. package/models/models/board/board-container-model.d.ts.map +1 -0
  51. package/models/models/board/board-container-registration.d.ts +87 -0
  52. package/models/models/board/board-container-registration.d.ts.map +1 -0
  53. package/models/models/board/board-model.d.ts +18 -0
  54. package/models/models/board/board-model.d.ts.map +1 -0
  55. package/models/models/board/board-registration.d.ts +84 -0
  56. package/models/models/board/board-registration.d.ts.map +1 -0
  57. package/models/models/board/index.d.ts +5 -0
  58. package/models/models/board/index.d.ts.map +1 -0
  59. package/models/models/board/types/index.d.ts +36 -0
  60. package/models/models/board/types/services.d.ts +12 -0
  61. package/models/models/board/types/services.d.ts.map +1 -0
  62. package/models/models/board/utils/board-trouble-data-mapper.d.ts +7 -0
  63. package/models/models/board/utils/board-trouble-data-mapper.d.ts.map +1 -0
  64. package/models/models/board/utils/board-trouble-resolver.d.ts +7 -0
  65. package/models/models/board/utils/board-trouble-resolver.d.ts.map +1 -0
  66. package/models/models/device-assembly/device-assembly-model.d.ts +17 -0
  67. package/models/models/device-assembly/device-assembly-model.d.ts.map +1 -0
  68. package/models/models/device-assembly/device-assembly-registration.d.ts +89 -0
  69. package/models/models/device-assembly/device-assembly-registration.d.ts.map +1 -0
  70. package/models/models/device-assembly/index.d.ts +4 -0
  71. package/models/models/device-assembly/index.d.ts.map +1 -0
  72. package/models/models/device-assembly/types/index.d.ts +1 -0
  73. package/models/models/generic-pour/generic-pour-model.d.ts +53 -0
  74. package/models/models/generic-pour/generic-pour-model.d.ts.map +1 -0
  75. package/models/models/generic-pour/generic-pour-registration.d.ts +87 -0
  76. package/models/models/generic-pour/generic-pour-registration.d.ts.map +1 -0
  77. package/models/models/generic-pour/index.d.ts +5 -0
  78. package/models/models/generic-pour/index.d.ts.map +1 -0
  79. package/models/models/generic-pour/services/generic-pour-services.d.ts +16 -0
  80. package/models/models/generic-pour/services/generic-pour-services.d.ts.map +1 -0
  81. package/models/models/generic-pour/services/index.d.ts +2 -0
  82. package/models/models/generic-pour/services/index.d.ts.map +1 -0
  83. package/models/models/generic-pour/types/index.d.ts +5 -0
  84. package/models/models/holder/holder-model.d.ts +93 -0
  85. package/models/models/holder/holder-model.d.ts.map +1 -0
  86. package/models/models/holder/index.d.ts +5 -0
  87. package/models/models/holder/index.d.ts.map +1 -0
  88. package/models/models/holder/services/assignment-services.d.ts +25 -0
  89. package/models/models/holder/services/assignment-services.d.ts.map +1 -0
  90. package/models/models/holder/services/holder-services.d.ts +28 -0
  91. package/models/models/holder/services/holder-services.d.ts.map +1 -0
  92. package/models/models/holder/services/index.d.ts +3 -0
  93. package/models/models/holder/services/index.d.ts.map +1 -0
  94. package/models/models/holder/types/index.d.ts +170 -0
  95. package/models/models/holder/utils/holder-utils.d.ts +9 -0
  96. package/models/models/holder/utils/holder-utils.d.ts.map +1 -0
  97. package/models/models/holder-container/holder-container-model.d.ts +80 -0
  98. package/models/models/holder-container/holder-container-model.d.ts.map +1 -0
  99. package/models/models/holder-container/index.d.ts +3 -0
  100. package/models/models/holder-container/index.d.ts.map +1 -0
  101. package/models/models/holder-container/types/index.d.ts +69 -0
  102. package/models/models/index.d.ts +14 -0
  103. package/models/models/index.d.ts.map +1 -0
  104. package/models/models/ingredient/index.d.ts +4 -0
  105. package/models/models/ingredient/index.d.ts.map +1 -0
  106. package/models/models/ingredient/ingredient-model.d.ts +86 -0
  107. package/models/models/ingredient/ingredient-model.d.ts.map +1 -0
  108. package/models/models/ingredient/services/index.d.ts +2 -0
  109. package/models/models/ingredient/services/index.d.ts.map +1 -0
  110. package/models/models/ingredient/services/ingredient-services.d.ts +30 -0
  111. package/models/models/ingredient/services/ingredient-services.d.ts.map +1 -0
  112. package/models/models/ingredient/types/index.d.ts +67 -0
  113. package/models/models/ingredient-container/index.d.ts +3 -0
  114. package/models/models/ingredient-container/index.d.ts.map +1 -0
  115. package/models/models/ingredient-container/ingredient-container-model.d.ts +80 -0
  116. package/models/models/ingredient-container/ingredient-container-model.d.ts.map +1 -0
  117. package/models/models/ingredient-container/types/index.d.ts +67 -0
  118. package/models/models/nozzle/index.d.ts +5 -0
  119. package/models/models/nozzle/index.d.ts.map +1 -0
  120. package/models/models/nozzle/nozzle-model.d.ts +257 -0
  121. package/models/models/nozzle/nozzle-model.d.ts.map +1 -0
  122. package/models/models/nozzle/services/index.d.ts +2 -0
  123. package/models/models/nozzle/services/index.d.ts.map +1 -0
  124. package/models/models/nozzle/services/nozzle-services.d.ts +182 -0
  125. package/models/models/nozzle/services/nozzle-services.d.ts.map +1 -0
  126. package/models/models/nozzle/types/index.d.ts +85 -0
  127. package/models/models/pump/index.d.ts +4 -0
  128. package/models/models/pump/index.d.ts.map +1 -0
  129. package/models/models/pump/pump-model.d.ts +91 -0
  130. package/models/models/pump/pump-model.d.ts.map +1 -0
  131. package/models/models/pump/services/index.d.ts +2 -0
  132. package/models/models/pump/services/index.d.ts.map +1 -0
  133. package/models/models/pump/services/pump-services.d.ts +27 -0
  134. package/models/models/pump/services/pump-services.d.ts.map +1 -0
  135. package/models/models/pump/types/index.d.ts +56 -0
  136. package/models/models/pump/utils/pump-trouble-resolver.d.ts +8 -0
  137. package/models/models/pump/utils/pump-trouble-resolver.d.ts.map +1 -0
  138. package/models/models/pump-container/index.d.ts +3 -0
  139. package/models/models/pump-container/index.d.ts.map +1 -0
  140. package/models/models/pump-container/pump-container-model.d.ts +85 -0
  141. package/models/models/pump-container/pump-container-model.d.ts.map +1 -0
  142. package/models/models/pump-container/types/index.d.ts +31 -0
  143. package/models/models/types/assembly.d.ts +83 -0
  144. package/models/models/types/assembly.d.ts.map +1 -0
  145. package/models/models/types/index.d.ts +4 -0
  146. package/models/models/types/index.d.ts.map +1 -0
  147. package/models/models/types/intent.d.ts +19 -0
  148. package/models/models/types/intent.d.ts.map +1 -0
  149. package/models/models/types/pouring.d.ts +9 -0
  150. package/models/models/types/pouring.d.ts.map +1 -0
  151. package/models/utils/dispense-registration-manager.d.ts +28 -0
  152. package/models/utils/dispense-registration-manager.d.ts.map +1 -0
  153. package/models/utils/extension-utils.d.ts +266 -0
  154. package/models/utils/extension-utils.d.ts.map +1 -0
  155. package/models/utils/openapi.d.ts +9276 -0
  156. package/models/utils/registration.d.ts +4 -0
  157. package/models/utils/registration.d.ts.map +1 -0
  158. package/models/utils/service.d.ts +80 -0
  159. package/models/utils/service.d.ts.map +1 -0
  160. package/models.cjs +2 -0
  161. package/models.cjs.map +1 -0
  162. package/models.d.ts +1 -0
  163. package/models.js +42 -0
  164. package/models.js.map +1 -0
  165. package/package.json +39 -0
  166. package/pump-provider-86479YU2.cjs +2 -0
  167. package/pump-provider-86479YU2.cjs.map +1 -0
  168. package/pump-provider-DSyiDoPF.js +1304 -0
  169. package/pump-provider-DSyiDoPF.js.map +1 -0
  170. package/ui/contexts/assembly/assembly-provider.d.ts +12 -0
  171. package/ui/contexts/assembly/assembly-provider.d.ts.map +1 -0
  172. package/ui/contexts/assembly/index.d.ts +2 -0
  173. package/ui/contexts/assembly/index.d.ts.map +1 -0
  174. package/ui/contexts/availability/availability-provider.d.ts +13 -0
  175. package/ui/contexts/availability/availability-provider.d.ts.map +1 -0
  176. package/ui/contexts/availability/index.d.ts +2 -0
  177. package/ui/contexts/availability/index.d.ts.map +1 -0
  178. package/ui/contexts/board/board-provider.d.ts +13 -0
  179. package/ui/contexts/board/board-provider.d.ts.map +1 -0
  180. package/ui/contexts/board/index.d.ts +2 -0
  181. package/ui/contexts/board/index.d.ts.map +1 -0
  182. package/ui/contexts/board-container/board-container-provider.d.ts +12 -0
  183. package/ui/contexts/board-container/board-container-provider.d.ts.map +1 -0
  184. package/ui/contexts/board-container/index.d.ts +2 -0
  185. package/ui/contexts/board-container/index.d.ts.map +1 -0
  186. package/ui/contexts/cui-kit/cui-kit.d.ts +29 -0
  187. package/ui/contexts/cui-kit/cui-kit.d.ts.map +1 -0
  188. package/ui/contexts/cui-kit/index.d.ts +2 -0
  189. package/ui/contexts/cui-kit/index.d.ts.map +1 -0
  190. package/ui/contexts/device-assembly/device-assembly-provider.d.ts +12 -0
  191. package/ui/contexts/device-assembly/device-assembly-provider.d.ts.map +1 -0
  192. package/ui/contexts/device-assembly/index.d.ts +2 -0
  193. package/ui/contexts/device-assembly/index.d.ts.map +1 -0
  194. package/ui/contexts/holder/holder-provider.d.ts +13 -0
  195. package/ui/contexts/holder/holder-provider.d.ts.map +1 -0
  196. package/ui/contexts/holder/index.d.ts +2 -0
  197. package/ui/contexts/holder/index.d.ts.map +1 -0
  198. package/ui/contexts/holder-container/holder-container-provider.d.ts +13 -0
  199. package/ui/contexts/holder-container/holder-container-provider.d.ts.map +1 -0
  200. package/ui/contexts/holder-container/index.d.ts +2 -0
  201. package/ui/contexts/holder-container/index.d.ts.map +1 -0
  202. package/ui/contexts/index.d.ts +13 -0
  203. package/ui/contexts/index.d.ts.map +1 -0
  204. package/ui/contexts/ingredient/index.d.ts +2 -0
  205. package/ui/contexts/ingredient/index.d.ts.map +1 -0
  206. package/ui/contexts/ingredient/ingredient-provider.d.ts +13 -0
  207. package/ui/contexts/ingredient/ingredient-provider.d.ts.map +1 -0
  208. package/ui/contexts/ingredient-container/index.d.ts +2 -0
  209. package/ui/contexts/ingredient-container/index.d.ts.map +1 -0
  210. package/ui/contexts/ingredient-container/ingredient-container-provider.d.ts +13 -0
  211. package/ui/contexts/ingredient-container/ingredient-container-provider.d.ts.map +1 -0
  212. package/ui/contexts/nozzle/index.d.ts +2 -0
  213. package/ui/contexts/nozzle/index.d.ts.map +1 -0
  214. package/ui/contexts/nozzle/nozzle-provider.d.ts +13 -0
  215. package/ui/contexts/nozzle/nozzle-provider.d.ts.map +1 -0
  216. package/ui/contexts/pump/index.d.ts +2 -0
  217. package/ui/contexts/pump/index.d.ts.map +1 -0
  218. package/ui/contexts/pump/pump-provider.d.ts +13 -0
  219. package/ui/contexts/pump/pump-provider.d.ts.map +1 -0
  220. package/ui/hooks/assembly/index.d.ts +3 -0
  221. package/ui/hooks/assembly/index.d.ts.map +1 -0
  222. package/ui/hooks/assembly/use-assembly.d.ts +14 -0
  223. package/ui/hooks/assembly/use-assembly.d.ts.map +1 -0
  224. package/ui/hooks/assembly/with-assembly.d.ts +8 -0
  225. package/ui/hooks/assembly/with-assembly.d.ts.map +1 -0
  226. package/ui/hooks/availability/index.d.ts +3 -0
  227. package/ui/hooks/availability/index.d.ts.map +1 -0
  228. package/ui/hooks/availability/use-availability.d.ts +14 -0
  229. package/ui/hooks/availability/use-availability.d.ts.map +1 -0
  230. package/ui/hooks/availability/with-availability.d.ts +8 -0
  231. package/ui/hooks/availability/with-availability.d.ts.map +1 -0
  232. package/ui/hooks/board/index.d.ts +3 -0
  233. package/ui/hooks/board/index.d.ts.map +1 -0
  234. package/ui/hooks/board/use-board.d.ts +14 -0
  235. package/ui/hooks/board/use-board.d.ts.map +1 -0
  236. package/ui/hooks/board/with-board.d.ts +8 -0
  237. package/ui/hooks/board/with-board.d.ts.map +1 -0
  238. package/ui/hooks/board-container/index.d.ts +3 -0
  239. package/ui/hooks/board-container/index.d.ts.map +1 -0
  240. package/ui/hooks/board-container/use-board-container.d.ts +14 -0
  241. package/ui/hooks/board-container/use-board-container.d.ts.map +1 -0
  242. package/ui/hooks/board-container/with-board-container.d.ts +8 -0
  243. package/ui/hooks/board-container/with-board-container.d.ts.map +1 -0
  244. package/ui/hooks/cui-kit/index.d.ts +8 -0
  245. package/ui/hooks/cui-kit/index.d.ts.map +1 -0
  246. package/ui/hooks/cui-kit/use-ambient-attract-timers.d.ts +18 -0
  247. package/ui/hooks/cui-kit/use-ambient-attract-timers.d.ts.map +1 -0
  248. package/ui/hooks/cui-kit/use-beverages.d.ts +17 -0
  249. package/ui/hooks/cui-kit/use-beverages.d.ts.map +1 -0
  250. package/ui/hooks/cui-kit/use-brands.d.ts +17 -0
  251. package/ui/hooks/cui-kit/use-brands.d.ts.map +1 -0
  252. package/ui/hooks/cui-kit/use-cui-kit.d.ts +192 -0
  253. package/ui/hooks/cui-kit/use-cui-kit.d.ts.map +1 -0
  254. package/ui/hooks/cui-kit/use-default-cui-kit-lifecycle.d.ts +162 -0
  255. package/ui/hooks/cui-kit/use-default-cui-kit-lifecycle.d.ts.map +1 -0
  256. package/ui/hooks/cui-kit/use-dispense-lifecycle.d.ts +23 -0
  257. package/ui/hooks/cui-kit/use-dispense-lifecycle.d.ts.map +1 -0
  258. package/ui/hooks/cui-kit/use-dispense-timers.d.ts +17 -0
  259. package/ui/hooks/cui-kit/use-dispense-timers.d.ts.map +1 -0
  260. package/ui/hooks/cui-kit/use-flavors.d.ts +17 -0
  261. package/ui/hooks/cui-kit/use-flavors.d.ts.map +1 -0
  262. package/ui/hooks/device-assembly/index.d.ts +3 -0
  263. package/ui/hooks/device-assembly/index.d.ts.map +1 -0
  264. package/ui/hooks/device-assembly/use-device-assembly.d.ts +14 -0
  265. package/ui/hooks/device-assembly/use-device-assembly.d.ts.map +1 -0
  266. package/ui/hooks/device-assembly/with-device-assembly.d.ts +9 -0
  267. package/ui/hooks/device-assembly/with-device-assembly.d.ts.map +1 -0
  268. package/ui/hooks/generic-pour/index.d.ts +3 -0
  269. package/ui/hooks/generic-pour/index.d.ts.map +1 -0
  270. package/ui/hooks/generic-pour/use-generic-pour.d.ts +15 -0
  271. package/ui/hooks/generic-pour/use-generic-pour.d.ts.map +1 -0
  272. package/ui/hooks/generic-pour/with-generic-pour.d.ts +14 -0
  273. package/ui/hooks/generic-pour/with-generic-pour.d.ts.map +1 -0
  274. package/ui/hooks/holder/index.d.ts +3 -0
  275. package/ui/hooks/holder/index.d.ts.map +1 -0
  276. package/ui/hooks/holder/use-holder.d.ts +14 -0
  277. package/ui/hooks/holder/use-holder.d.ts.map +1 -0
  278. package/ui/hooks/holder/with-holder.d.ts +8 -0
  279. package/ui/hooks/holder/with-holder.d.ts.map +1 -0
  280. package/ui/hooks/holder-container/index.d.ts +3 -0
  281. package/ui/hooks/holder-container/index.d.ts.map +1 -0
  282. package/ui/hooks/holder-container/use-holder-container.d.ts +14 -0
  283. package/ui/hooks/holder-container/use-holder-container.d.ts.map +1 -0
  284. package/ui/hooks/holder-container/with-holder-container.d.ts +8 -0
  285. package/ui/hooks/holder-container/with-holder-container.d.ts.map +1 -0
  286. package/ui/hooks/index.d.ts +16 -0
  287. package/ui/hooks/index.d.ts.map +1 -0
  288. package/ui/hooks/ingredient/index.d.ts +4 -0
  289. package/ui/hooks/ingredient/index.d.ts.map +1 -0
  290. package/ui/hooks/ingredient/use-ingredient-pour.d.ts +49 -0
  291. package/ui/hooks/ingredient/use-ingredient-pour.d.ts.map +1 -0
  292. package/ui/hooks/ingredient/use-ingredient.d.ts +14 -0
  293. package/ui/hooks/ingredient/use-ingredient.d.ts.map +1 -0
  294. package/ui/hooks/ingredient/with-ingredient.d.ts +8 -0
  295. package/ui/hooks/ingredient/with-ingredient.d.ts.map +1 -0
  296. package/ui/hooks/ingredient-container/index.d.ts +3 -0
  297. package/ui/hooks/ingredient-container/index.d.ts.map +1 -0
  298. package/ui/hooks/ingredient-container/use-ingredient-container.d.ts +14 -0
  299. package/ui/hooks/ingredient-container/use-ingredient-container.d.ts.map +1 -0
  300. package/ui/hooks/ingredient-container/with-ingredient-container.d.ts +8 -0
  301. package/ui/hooks/ingredient-container/with-ingredient-container.d.ts.map +1 -0
  302. package/ui/hooks/nozzle/index.d.ts +3 -0
  303. package/ui/hooks/nozzle/index.d.ts.map +1 -0
  304. package/ui/hooks/nozzle/use-dispense-kit.d.ts +22 -0
  305. package/ui/hooks/nozzle/use-dispense-kit.d.ts.map +1 -0
  306. package/ui/hooks/nozzle/use-nozzle.d.ts +14 -0
  307. package/ui/hooks/nozzle/use-nozzle.d.ts.map +1 -0
  308. package/ui/hooks/nozzle/with-nozzle.d.ts +8 -0
  309. package/ui/hooks/nozzle/with-nozzle.d.ts.map +1 -0
  310. package/ui/hooks/nozzle-pour/index.d.ts +2 -0
  311. package/ui/hooks/nozzle-pour/index.d.ts.map +1 -0
  312. package/ui/hooks/nozzle-pour/use-nozzle-pour.d.ts +57 -0
  313. package/ui/hooks/nozzle-pour/use-nozzle-pour.d.ts.map +1 -0
  314. package/ui/hooks/pour/index.d.ts +2 -0
  315. package/ui/hooks/pour/index.d.ts.map +1 -0
  316. package/ui/hooks/pour/use-pour.d.ts +55 -0
  317. package/ui/hooks/pour/use-pour.d.ts.map +1 -0
  318. package/ui/hooks/pump/index.d.ts +3 -0
  319. package/ui/hooks/pump/index.d.ts.map +1 -0
  320. package/ui/hooks/pump/use-pump.d.ts +14 -0
  321. package/ui/hooks/pump/use-pump.d.ts.map +1 -0
  322. package/ui/hooks/pump/with-pump.d.ts +8 -0
  323. package/ui/hooks/pump/with-pump.d.ts.map +1 -0
  324. package/ui/hooks/utils/pour-strategy/hold-to-pour-intent-strategy.d.ts +5 -0
  325. package/ui/hooks/utils/pour-strategy/hold-to-pour-intent-strategy.d.ts.map +1 -0
  326. package/ui/hooks/utils/pour-strategy/hold-to-pour-strategy.d.ts +4 -0
  327. package/ui/hooks/utils/pour-strategy/hold-to-pour-strategy.d.ts.map +1 -0
  328. package/ui/hooks/utils/pour-strategy/index.d.ts +7 -0
  329. package/ui/hooks/utils/pour-strategy/index.d.ts.map +1 -0
  330. package/ui/hooks/utils/pour-strategy/pour-strategy.d.ts +16 -0
  331. package/ui/hooks/utils/pour-strategy/pour-strategy.d.ts.map +1 -0
  332. package/ui/hooks/utils/pour-strategy/tap-or-hold-to-pour-intent-strategy.d.ts +13 -0
  333. package/ui/hooks/utils/pour-strategy/tap-or-hold-to-pour-intent-strategy.d.ts.map +1 -0
  334. package/ui/hooks/utils/pour-strategy/tap-to-pour-intent-strategy.d.ts +5 -0
  335. package/ui/hooks/utils/pour-strategy/tap-to-pour-intent-strategy.d.ts.map +1 -0
  336. package/ui/hooks/utils/pour-strategy/tap-to-pour-strategy.d.ts +4 -0
  337. package/ui/hooks/utils/pour-strategy/tap-to-pour-strategy.d.ts.map +1 -0
  338. package/ui/index.d.ts +4 -0
  339. package/ui/index.d.ts.map +1 -0
  340. package/ui/utils/pour-context.d.ts +8 -0
  341. package/ui/utils/pour-context.d.ts.map +1 -0
  342. package/ui.cjs +2 -0
  343. package/ui.cjs.map +1 -0
  344. package/ui.d.ts +1 -0
  345. package/ui.js +75 -0
  346. package/ui.js.map +1 -0
@@ -0,0 +1,257 @@
1
+ import { NozzleOptions, SelectedPourable } from './types';
2
+ import { AvailabilityResponse } from './services';
3
+ import { PourState } from '../types/pouring';
4
+ import { AvailabilityModel } from '../availability';
5
+ import { FutureAwareContainer, FutureContainer, IFutureModel, IKosDataModel, IKosModelLogger, KosContext, KosContextLogger, KosCreationContext, KosModelRegistrationBean, PublicModelInterface } from '@kosdev-code/kos-ui-sdk';
6
+
7
+ export declare const TOPIC_NOZZLE_POUR_STARTED = "/kos/nozzle/pour/started";
8
+ export declare const TOPIC_NOZZLE_POUR_PROGRESS = "/kos/nozzle/pour/progress";
9
+ export declare const TOPIC_NOZZLE_POUR_CANCEL = "/kos/nozzle/pour/cancel";
10
+ /**
11
+ *
12
+ */
13
+ declare class NozzleModelImpl implements IKosModelLogger, IKosDataModel, FutureContainer {
14
+ /** the unique identifier for this nozzle.*/
15
+ id: string;
16
+ path: string;
17
+ logger: KosContextLogger;
18
+ name: string;
19
+ private _selectedBeverage?;
20
+ private _selectedBrand?;
21
+ private _additionalItems?;
22
+ private _availabilityItems;
23
+ futureHandler: FutureAwareContainer;
24
+ currentState: PourState;
25
+ beverageTopicPrefix: string;
26
+ topicPrefix: string;
27
+ urlPrefix: string;
28
+ /**
29
+ * The availability nodes that can be dispensed from this nozzle.
30
+ * This is a subset of the availability for the entire dispenser
31
+ * and is determined by the nodes associated with a nozzle.
32
+ */
33
+ get beverages(): AvailabilityModel<any, Record<string, any>>[];
34
+ /**
35
+ * The availability nodes that have been grouped into the "brands" group.
36
+ *
37
+ */
38
+ get brands(): AvailabilityModel<any, Record<string, any>>[];
39
+ get visibleBrands(): AvailabilityModel<any, Record<string, any>>[];
40
+ get visibleBeverages(): AvailabilityModel<any, Record<string, any>>[];
41
+ /**
42
+ * A derived value that indicates if the nozzle is currently pouring a beverage.
43
+ * @readonly
44
+ */
45
+ get isPouring(): boolean;
46
+ /**
47
+ * A derived value that indicates if the nozzle is currently available to pour a beverage.
48
+ *
49
+ * This will generally be determined by whether there is a currently selected pourable AND
50
+ * the nozzle is not currently pouring.
51
+ *
52
+ * The value is observable and will change when the selected pourable changes or the nozzle
53
+ * starts or stops pouring.
54
+ * @readonly
55
+ * */
56
+ get canPour(): boolean;
57
+ /**
58
+ * The selected pourable for this nozzle. Its shape is determined by the results of the
59
+ * {@link ExtensionType.SelectedPourableMapper} extension.
60
+ * @readonly
61
+ *
62
+ * */
63
+ get selectedPourable(): {
64
+ beverage: AvailabilityModel<any, Record<string, any>> | undefined;
65
+ additional: AvailabilityModel<any, Record<string, any>>[] | undefined;
66
+ };
67
+ get future(): IFutureModel<Record<string, unknown>> | undefined;
68
+ get pourProgress(): number;
69
+ constructor(modelId: string, options: NozzleOptions, context: KosCreationContext);
70
+ updateModel(): void;
71
+ setSelectedBrand(brand?: AvailabilityModel): void;
72
+ get selectedBrand(): AvailabilityModel<any, Record<string, any>> | undefined;
73
+ /**
74
+ * Set the values used to determine the selected pourable for this nozzle.
75
+ *
76
+ * @param pourable The pourable to set.
77
+ * @param pourable.beverage The beverage selected.
78
+ * @param pourable.additional The additional items such as flavors or other items that could be incorporated
79
+ * into the pourable.
80
+ * */
81
+ setSelectedPourable({ beverage, additional, context, }: SelectedPourable): Promise<void>;
82
+ /**
83
+ * Utility method that will return the availability nodes that belong to the specified
84
+ * group as defined in the dispenser beverage graph. For example, a dispenser
85
+ * implementation may group availability nodes by Brand, Beverage, or Flavors
86
+ *
87
+ * @param groupId The group to filter by.
88
+ * @returns The availability nodes that are available to be dispensed from this nozzle
89
+ * and are in the specified group.
90
+ * */
91
+ getGroupAvailabilityItems<D extends object = any>(groupId: string): AvailabilityModel<D, Record<string, any>>[];
92
+ /**
93
+ * Utility method that will return the availability nodes that are tagged with the specified parent id.
94
+ *
95
+ * This is useful when brandsets use the taggedIds property to associate nodes with a parent node. For example,
96
+ * when organizing a brandset into brands and beverages, the brand nodes will be tagged with the beverage nodes.
97
+ *
98
+ * @param parentId - The parent id to filter by.
99
+ * @returns the availability nodes that are tagged with the specified parent id.
100
+ */
101
+ getAvailabilityByParent<D extends object = any>(parentId: string): AvailabilityModel<D, Record<string, any>>[];
102
+ private updateIfCurrent;
103
+ onFutureUpdate(future: IFutureModel<any>): void;
104
+ /**
105
+ * An action that will initiate a pour for this nozzle.
106
+ *
107
+ * The invocation of this action will result in a Future being returned that will
108
+ * provide the status of the pour and return any errors that may occur.
109
+ *
110
+ * @see {@link kosFuture}
111
+ * */
112
+ pour(tracker?: string): Promise<void>;
113
+ /**
114
+ * An action that will initiate a fixed volume pour for this nozzle using the
115
+ * specified pourable volume name.
116
+ *
117
+ * The invocation of this action will result in a Future being returned that will
118
+ * provide the status of the pour and return any errors that may occur.
119
+ *
120
+ * @see {@link kosFuture}
121
+ * */
122
+ fixedPour(name: string, tracker?: string): Promise<void>;
123
+ /**
124
+ * An action that will cancel a pour for this nozzle.
125
+ * */
126
+ cancelPour(): Promise<void>;
127
+ private updateGroupMembers;
128
+ /** @internal */
129
+ load(context?: KosContext): Promise<void>;
130
+ updateAvailability(update: AvailabilityResponse): Promise<void>;
131
+ }
132
+ /**
133
+ *
134
+ * The NozzleModel provides the availability of pourables that are
135
+ * associated with the nozzle.
136
+ *
137
+ * Its primary purpose is to provide a mechanism for selecting from available pourables and initiating a pour.
138
+ *
139
+ * It is possible for a dispenser to have multiple asymmetrical nozzles. For example, a dispenser may have
140
+ * a nozzle that is used for dispensing a syrups and flavors and another that is just dispensing water.
141
+ *
142
+ * The NozzleModel is a {@link IKosDataModel} and is registered with the model registry using the {@link Nozzle} type.
143
+ *
144
+ *
145
+ * @see {@link NozzleServices.getAvailability} - The availability service will retrieve the availability for the nozzle.
146
+ *
147
+ * ## Lifecycle
148
+ *
149
+ * ### Load
150
+ *
151
+ * During the `load` phase of the model lifecycle, the set of Availability nodes will be retrieved for the nozzle. The nodes will be indexed based on
152
+ * the defined `groupId` for the node. The `groupId` is defined in the dispenser beverage graph and is used to group availability nodes.
153
+ *
154
+ * #### Extension Points
155
+ *
156
+ * The `load` lifecycle hook will first call into the {@link ExtensionType.AvailabilityLoader} extension point in order to establish the context
157
+ * that will be used to populate the availability nodes.
158
+ *
159
+ * The `load` lifecycle hook will then call into the {@link ExtensionType.AvailabilityMapper} for each Availability node that is retrieved.
160
+ * The extension point will be called the the Availability context data and the {@link NozzleServices.BeverageResponse} for the availability node.
161
+ *
162
+ *
163
+ *
164
+ * @see {@link Nozzle}
165
+ *
166
+ *
167
+ *
168
+ *
169
+ * @category Model
170
+ * @interface
171
+ *
172
+
173
+ */
174
+ export type NozzleModel = PublicModelInterface<NozzleModelImpl>;
175
+ /**
176
+ *
177
+ *
178
+ * # Nozzle
179
+ *
180
+ * The registration bean includes convenience methods for creating and working with NozzleModel instances.
181
+ *
182
+ * ## type
183
+ * The type property is a string that identifies the model type.
184
+ * 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
185
+ * used when declaring dependencies on models.
186
+ *
187
+ * @example
188
+ * ```typescript
189
+ *
190
+ * @kosDependency({modelType: Nozzle.type, id: "nozzleId"})
191
+ * private nozzleModel: NozzleModel;
192
+ * ```
193
+ *
194
+ *
195
+ * ## factory
196
+ *
197
+ * The factory method creates a factory function that can be used to create new NozzleModel instances.
198
+ *
199
+ * The factory function is a curried function that takes the model id as the first argument and the options as the second argument.
200
+ *
201
+ * If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored
202
+ * in this case and the existing model will be returned in its current state.
203
+ *
204
+ * @example
205
+ *
206
+ * ```typescript
207
+ * const model = Nozzle.factory("S1")({
208
+ * path: "core.assemby.nozzle.nozzle1",
209
+ * });
210
+ * ```
211
+ *
212
+ * ## predicate
213
+ *
214
+ * [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 NozzleModel.
215
+ *
216
+ * @example
217
+ * ```typescript
218
+ *
219
+ * const model: IKosDataModel = ...; // some model
220
+ *
221
+ * if (Nozzle.predicate(model)) {
222
+ * // if the function evaluates to true, the model is narrowed down to NozzleModel
223
+ * // and the compiler will know that the model has the NozzleModel interface
224
+ * model.pour();
225
+ * }
226
+ * ```
227
+ *
228
+ * ## registration
229
+ *
230
+ * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
231
+ * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
232
+ *
233
+ *
234
+ * @example
235
+ *
236
+ * In an application registration file you can declare the model registration as follows:
237
+ *
238
+ * **registration.ts**
239
+ * ```typescript
240
+ * import { Nozzle } from "@kosdev-code/kos-dispense-sdk";
241
+ * ...
242
+ * import { IKosRegistry } from "@kosdev-code/kos-ui-sdk";
243
+ * export const kosModels: IKosRegistry["models"] = {
244
+ * ...Nozzle.registration,
245
+ * };
246
+ * ```
247
+ *
248
+ * ## registration.singleton
249
+ *
250
+ * The nozzle 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.
251
+ * If the factory function is called with an ID that already exists, the existing model will be returned.
252
+ *
253
+ * @category KOS Model Registration
254
+ * */
255
+ export declare const Nozzle: Readonly<KosModelRegistrationBean<NozzleModel, NozzleOptions>>;
256
+ export {};
257
+ //# sourceMappingURL=nozzle-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nozzle-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-dispense-sdk/src/models/models/nozzle/nozzle-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAiBL,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,aAAa,EAElB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EAC1B,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAEL,KAAK,iBAAiB,EAEvB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAML,KAAK,oBAAoB,EAC1B,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EACV,aAAa,EAKb,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAajB,eAAO,MAAM,yBAAyB,6BAA6B,CAAC;AACpE,eAAO,MAAM,0BAA0B,8BAA8B,CAAC;AACtE,eAAO,MAAM,wBAAwB,4BAA4B,CAAC;AAClE;;GAEG;AACH,cACM,eACJ,YAAW,eAAe,EAAE,aAAa,EAAE,eAAe;IAE1D,4CAA4C;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,gBAAgB,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,iBAAiB,CAAC,CAAoB;IAC9C,OAAO,CAAC,cAAc,CAAC,CAAoB;IAC3C,OAAO,CAAC,gBAAgB,CAAC,CAAsB;IACrC,OAAO,CAAC,kBAAkB,CAAwC;IAC5E,aAAa,EAAE,oBAAoB,CAAC;IACpC,YAAY,EAAE,SAAS,CAAkB;IAEzC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,IAAI,SAAS,kDAEZ;IAED;;;OAGG;IACH,IAAI,MAAM,kDAET;IAED,IAAI,aAAa,kDAEhB;IAED,IAAI,gBAAgB,kDAEnB;IAED;;;OAGG;IACH,IAAI,SAAS,YAUZ;IAED;;;;;;;;;SASK;IACL,IAAI,OAAO,YAMV;IAED;;;;;SAKK;IACL,IAAI,gBAAgB;;;MAKnB;IAED,IAAI,MAAM,sDAET;IAED,IAAI,YAAY,WAEf;gBAGC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,kBAAkB;IAuB7B,WAAW,IAAI,IAAI;IAMnB,gBAAgB,CAAC,KAAK,CAAC,EAAE,iBAAiB;IAK1C,IAAI,aAAa,4DAEhB;IACD;;;;;;;SAOK;IACC,mBAAmB,CAAC,EACxB,QAAQ,EACR,UAAU,EACV,OAAO,GACR,EAAE,gBAAgB;IA4CnB;;;;;;;;SAQK;IACL,yBAAyB,CAAC,CAAC,SAAS,MAAM,GAAG,GAAG,EAAE,OAAO,EAAE,MAAM;IAOjE;;;;;;;;OAQG;IACH,uBAAuB,CAAC,CAAC,SAAS,MAAM,GAAG,GAAG,EAAE,QAAQ,EAAE,MAAM;IAOhE,OAAO,CAAC,eAAe;IAQvB,cAAc,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,CAAC;IA2BxC;;;;;;;SAOK;IAEQ,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM;IAuClC;;;;;;;;SAQK;IAEQ,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM;IA2CrD;;SAEK;IACQ,UAAU;IAwBvB,OAAO,CAAC,kBAAkB;IAe1B,gBAAgB;IACV,IAAI,CAAC,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IA6CzC,kBAAkB,CAAC,MAAM,EAAE,oBAAoB;CAkFtD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,MAAM,WAAW,GAAG,oBAAoB,CAAC,eAAe,CAAC,CAAC;AAEhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+EK;AACL,eAAO,MAAM,MAAM,EAAE,QAAQ,CAC3B,wBAAwB,CAAC,WAAW,EAAE,aAAa,CAAC,CAWrD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './nozzle-services';
2
+ //# 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/nozzle/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,182 @@
1
+ /**
2
+ * An individual availability node for a nozzle.
3
+ * */
4
+ export interface BeverageResponse<Properties extends Record<string, any> = Record<string, any>> {
5
+ /**
6
+ * Is the node available for based on the beverage graph.
7
+ * */
8
+ available: boolean;
9
+ /**
10
+ * an alternate id for the node. Typically used in cases where there are multiple nozzles where
11
+ * the same beverage could be available. This id will represent the common id for the beverage without
12
+ * the nozzle specific id.
13
+ * */
14
+ altId: string;
15
+ /**
16
+ * Is the item visible. This is typically used to hide items that are not available.
17
+ * */
18
+ visible: boolean;
19
+ /**
20
+ * The id of the availability node.
21
+ * */
22
+ id: string;
23
+ type: string;
24
+ taggedIds?: string[];
25
+ note?: string;
26
+ properties?: Properties;
27
+ }
28
+ /**
29
+ * The response from the availability endpoint.
30
+ * */
31
+ export interface AvailabilityResponse {
32
+ /**
33
+ * Indicates if the availability requires a full calculation of the availability nodes or just a
34
+ * delta calculation.
35
+ * */
36
+ rebuild: boolean;
37
+ /**
38
+ * The availability groups for the nozzle.
39
+ * */
40
+ groups: {
41
+ /**
42
+ * the built-in beverages group
43
+ * */
44
+ beverages: BeverageResponse[];
45
+ /**
46
+ * the built-in flavors group
47
+ * */
48
+ flavors: BeverageResponse[];
49
+ /**
50
+ * the built-in brands group
51
+ * */
52
+ brands: BeverageResponse[];
53
+ /**
54
+ * Additional named groups that are defined by the dispenser.
55
+ * */
56
+ [k: string]: BeverageResponse[];
57
+ };
58
+ }
59
+ /**
60
+ *
61
+ * Initiates a pour for the specified nozzle.
62
+ *
63
+ * Uses the KOS endpoint [POST] `${URL}/api/ext/dispense/nozzle/${nozzleId}/pipeline/beverage/pour`
64
+ *
65
+ * @param nozzleId - the nozzle id to pour from.
66
+ * @param tracker - the tracker to use for the pour. It will be returned in the future to allow consumers
67
+ * to track the pour.
68
+ * @category Service
69
+ *
70
+ * @example
71
+ * ```typescript
72
+ * import { NozzleServices } from "@kosdev-code/kos-dispense-sdk";
73
+ * ...
74
+ *
75
+ * await NozzleServices.pourPourable("nozzle-1", "my-tracker");
76
+ * ```
77
+ * @see {@link FutureManager.initiateFuture}
78
+ * @returns - a Future that encapsulates the pour including its status and progress.
79
+ **/
80
+ export declare const pourPourable: (nozzleId: string, tracker: string) => Promise<import('@kosdev-code/kos-ui-sdk').KosServiceResponse<any> | undefined>;
81
+ /**
82
+ *
83
+ * Initiates a fixed named pour for the specified nozzle.
84
+ *
85
+ * Typically used for cases where a named cup size is to be poured where the volume of the pour is
86
+ * dictated by the name.
87
+ *
88
+ *
89
+ * Uses the KOS endpoint [POST] `${URL}/api/ext/dispense/nozzle/${nozzleId}/pipeline/beverage/fixed/${name}`
90
+ *
91
+ * @param name - name of the fixed pour volume.
92
+ * @param nozzleId - the nozzle id to pour from.
93
+ * @param tracker - the tracker to use for the pour. It will be returned in the future to allow consumers
94
+ * to track the pour.
95
+ * @category Service
96
+ *
97
+ * @example
98
+ * ```typescript
99
+ * import { NozzleServices } from "@kosdev-code/kos-dispense-sdk";
100
+ * ...
101
+ *
102
+ * await NozzleServices.pourPourable("nozzle-1", "my-tracker");
103
+ * ```
104
+ * @see {@link FutureManager.initiateFuture}
105
+ * @returns - a Future that encapsulates the pour including its status and progress.
106
+ **/
107
+ export declare const pourNamedPourable: (name: string, nozzleId: string, tracker: string) => Promise<import('@kosdev-code/kos-ui-sdk').KosServiceResponse<any> | undefined>;
108
+ /**
109
+ * Retrieves the availability nodes for a specified nozzle.
110
+ *
111
+ * Uses the KOS endpoint [GET] `${URL}/api/ext/dispense/nozzle/${nozzleId}/pipeline/beverage/availability`
112
+ *
113
+ * @param nozzleId - the nozzle id to retrieve availability for.
114
+ * @returns - the availability nodes for the specified nozzle.
115
+ * @category Service
116
+ *
117
+ * @example
118
+ * ```typescript
119
+ * import { NozzleServices } from "@kosdev-code/kos-dispense-sdk";
120
+ * ...
121
+ *
122
+ * const availability = await NozzleServices.getAvailability("nozzle-1");
123
+ * if (availability?.status !== 200) {
124
+ * throw new Error("Failed to load nozzle availability");
125
+ * }
126
+ * ```
127
+ */
128
+ export declare const getAvailability: (urlPrefix: string) => Promise<import('@kosdev-code/kos-ui-sdk').KosServiceResponse<AvailabilityResponse> | undefined>;
129
+ /**
130
+ * Invokes the endpoint to select a pourable for the specified nozzle.
131
+ *
132
+ * Uses the KOS endpoint [POST] `${URL}/api/ext/dispense/nozzle/${nozzleId}/pipeline/beverage/select`
133
+ *
134
+ *
135
+ * @param nozzleId - the nozzle id to select a pourable for.
136
+ * @param payload - the payload to send to the endpoint. The shape of the payload is determined by the
137
+ * {@link ExtensionType.SelectedPourableMapper} extension.
138
+ * @category Service
139
+ * @see {@link ExtensionType.SelectedPourableMapper}
140
+ * @returns - an emtpy response.
141
+ *
142
+ * @example
143
+ * ```typescript
144
+ * import { NozzleServices } from "@kosdev-code/kos-dispense-sdk";
145
+ * ...
146
+ * try {
147
+ * const response = await NozzleServices.selectPourable("nozzle-1", {
148
+ * beverage: "beverage-1",
149
+ * additional: ["flavor-1"],
150
+ * });
151
+ * if (response?.status !== 200) {
152
+ * throw new Error("Failed to select pourable");
153
+ * }
154
+ * } catch (e) {
155
+ * console.error(e);
156
+ * }
157
+ * ```
158
+ * */
159
+ export declare const selectPourable: (nozzleId: string, payload: object) => Promise<import('@kosdev-code/kos-ui-sdk').KosServiceResponse<any> | undefined>;
160
+ /**
161
+ * Invokes the endpoint to clear the selected pourable for the specified nozzle.
162
+ * Uses the KOS endpoint [DELETE] `${URL}/api/ext/dispense/nozzle/${nozzleId}/pipeline/beverage/select`
163
+ *
164
+ * @param nozzleId - the nozzle id to clear the selected pourable for.
165
+ * @category Service
166
+ * @returns - an emtpy response.
167
+ * @example
168
+ * ```typescript
169
+ * import { NozzleServices } from "@kosdev-code/kos-dispense-sdk";
170
+ * ...
171
+ * try {
172
+ * const response = await NozzleServices.clearPourable("nozzle-1");
173
+ * if (response?.status !== 200) {
174
+ * throw new Error("Failed to clear pourable");
175
+ * }
176
+ * } catch (e) {
177
+ * console.error(e);
178
+ * }
179
+ * ```
180
+ * */
181
+ export declare const clearPourable: (nozzleId: string) => Promise<import('@kosdev-code/kos-ui-sdk').KosServiceResponse<unknown> | undefined>;
182
+ //# sourceMappingURL=nozzle-services.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nozzle-services.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-dispense-sdk/src/models/models/nozzle/services/nozzle-services.ts"],"names":[],"mappings":"AAUA;;KAEK;AACL,MAAM,WAAW,gBAAgB,CAC/B,UAAU,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAE5D;;SAEK;IACL,SAAS,EAAE,OAAO,CAAC;IACnB;;;;SAIK;IACL,KAAK,EAAE,MAAM,CAAC;IACd;;SAEK;IACL,OAAO,EAAE,OAAO,CAAC;IAEjB;;SAEK;IACL,EAAE,EAAE,MAAM,CAAC;IAEX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED;;KAEK;AACL,MAAM,WAAW,oBAAoB;IACnC;;;SAGK;IACL,OAAO,EAAE,OAAO,CAAC;IAEjB;;SAEK;IACL,MAAM,EAAE;QACN;;aAEK;QACL,SAAS,EAAE,gBAAgB,EAAE,CAAC;QAC9B;;aAEK;QACL,OAAO,EAAE,gBAAgB,EAAE,CAAC;QAE5B;;aAEK;QACL,MAAM,EAAE,gBAAgB,EAAE,CAAC;QAE3B;;aAEK;QACL,CAAC,CAAC,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAC;KACjC,CAAC;CACH;AAED;;;;;;;;;;;;;;;;;;;;IAoBI;AACJ,eAAO,MAAM,YAAY,aAAoB,MAAM,WAAW,MAAM,mFAWnE,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;IAyBI;AACJ,eAAO,MAAM,iBAAiB,SACtB,MAAM,YACF,MAAM,WACP,MAAM,mFAYhB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,eAAe,cAAqB,MAAM,oGAKtD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6BK;AACL,eAAO,MAAM,cAAc,aAAoB,MAAM,WAAW,MAAM,mFAMrE,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;KAoBK;AACL,eAAO,MAAM,aAAa,aAAoB,MAAM,uFAOnD,CAAC"}
@@ -0,0 +1,85 @@
1
+ import { AvailabilityModel } from '../../availability';
2
+
3
+
4
+ /**
5
+ * Options for a nozzle.
6
+ */
7
+ export interface NozzleOptions {
8
+ /**
9
+ * The nozzle path.
10
+ */
11
+ path: string;
12
+ name: string;
13
+ name: string;
14
+ urlPrefix: string;
15
+ topicPrefix: string;
16
+ beverageTopicPrefix: string;
17
+ }
18
+
19
+ /**
20
+ * The selected pourable for a nozzle. This interface provides an abstraction that
21
+ * determines the combination of beverages and additional items that are selected
22
+ * for pouring.
23
+ *
24
+ * For example, a legacy plus dispenser may have a beverage and additional items such as flavor shots
25
+ * that a user can select.
26
+ *
27
+ * In micro-dosing dispensers, the selected pourable may be a single beverage that is represents a recipe defined in
28
+ * the brandset.
29
+ *
30
+ * The structure of the selected pourable is determined by the {@link ExtensionType.SelectedPourableMapper} extension point
31
+ * and allows for the payload to be customized for the dispenser implementation.
32
+ * */
33
+ export interface SelectedPourable {
34
+ beverage?: AvailabilityModel;
35
+ additional?: AvailabilityModel[];
36
+ context?: any;
37
+ }
38
+
39
+ /**
40
+ * The PourAware interface can be implemented on any companion models for the nozzle model to provide
41
+ * immediate access to pour lifecycle events such as start, progress, and cancel.
42
+ */
43
+ export interface PourAware<
44
+ T extends Record<string, any> = Record<string, any>
45
+ > {
46
+ /**
47
+ * Called when a pour is successfully started.
48
+ */
49
+ onPourStart?: () => void;
50
+
51
+ /**
52
+ * Called when a pour is cancelled.
53
+ */
54
+ onPourCancel?: () => void;
55
+
56
+ /**
57
+ * Called when a pour is in progress. This will give access to the future associated with the pour and
58
+ * can be used to update the UI with the progress of the pour based on progress future or clientData.
59
+ *
60
+ * @param future - The future model for the pour.
61
+ */
62
+ onPourProgress: (future: IFutureModel<T>) => void;
63
+ }
64
+
65
+ interface BasePourEvent {
66
+ nozzleId: string;
67
+ }
68
+
69
+ interface PourStartEvent extends BasePourEvent {
70
+ type: "fixed" | "free";
71
+ }
72
+
73
+ type PourCancelEvent = BasePourEvent;
74
+
75
+ interface PourProgressEvent<T extends Record<string, any> = Record<string, any>>
76
+ extends BasePourEvent {
77
+ remainingTimeMs: number;
78
+ endState?: FutureEndState;
79
+ reason?: string;
80
+ clientData?: T;
81
+ futureId: string;
82
+ status: string;
83
+ timeRemaining: string;
84
+ progress: number;
85
+ }
@@ -0,0 +1,4 @@
1
+ export { Pump } from './pump-model';
2
+ export type * from './types';
3
+ export * as PumpServices from './services';
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/pump/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,mBAAmB,SAAS,CAAC;AAC7B,OAAO,KAAK,YAAY,MAAM,YAAY,CAAC"}
@@ -0,0 +1,91 @@
1
+ import { PumpModel, PumpOptions } from './types';
2
+ import { KosModelRegistrationBean } from '@kosdev-code/kos-ui-sdk';
3
+
4
+ /**
5
+ * # Pump
6
+ *
7
+ * The registration bean includes convenience methods for creating and working with PumpModel 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: Pump.type, id: "pumpId"})
18
+ * private pumpModel: PumpModel;
19
+ * ```
20
+ *
21
+ *
22
+ * ## factory
23
+ *
24
+ * The factory method creates a factory function that can be used to create new PumpModel instances.
25
+ *
26
+ * The factory function is a curried function that takes the model id as the first argument and the options as the second argument.
27
+ *
28
+ * If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored
29
+ * in this case and the existing model will be returned in its current state.
30
+ *
31
+ * @example
32
+ *
33
+ * ```typescript
34
+ * const model = Pump.factory("S1")({
35
+ * name: "S1",
36
+ * path: "core.assembly.pump.S1",
37
+ * beveragePour: true,
38
+ * type: "syrup",
39
+ * ingredientId: "1234532",
40
+ * holderPath: "core.dispenser.holder.s1",
41
+ * boardPath: "core.dispenser.board.s1",
42
+ * nozzlePath: "core.dispenser.nozzle.s1",
43
+ * inserted: true,
44
+ * category: "flavor",
45
+ * prevIngredientId: "1234567",
46
+ * });
47
+ * ```
48
+ *
49
+ * ## predicate
50
+ *
51
+ * [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 PumpModel.
52
+ *
53
+ * @example
54
+ * ```typescript
55
+ *
56
+ * const model: IKosDataModel = ...; // some model
57
+ *
58
+ * if (Pump.predicate(model)) {
59
+ * // if the function evaluates to true, the model is narrowed down to PumpModel
60
+ * // and the compiler will know that the model has the PumpModel interface
61
+ * model.updateAvailability(false);
62
+ * }
63
+ * ```
64
+ *
65
+ * ## registration
66
+ *
67
+ * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
68
+ * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
69
+ *
70
+ *
71
+ * @example
72
+ *
73
+ * In an application registration file you can declare the model registration as follows:
74
+ *
75
+ * **registration.ts**
76
+ * ```typescript
77
+ * import { Pump } from "@kosdev-code/kos-dispense-sdk";
78
+ * ...
79
+ * import { IKosRegistry } from "@kosdev-code/kos-ui-sdk";
80
+ * export const kosModels: IKosRegistry["models"] = {
81
+ * ...Pump.registration,
82
+ * };
83
+ * ```
84
+ *
85
+ * ## registration.singleton
86
+ *
87
+ * The pump 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.
88
+ * If the factory function is called with an ID that already exists, the existing model will be returned.
89
+ * */
90
+ export declare const Pump: Readonly<KosModelRegistrationBean<PumpModel, PumpOptions>>;
91
+ //# sourceMappingURL=pump-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pump-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-dispense-sdk/src/models/models/pump/pump-model.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAIV,wBAAwB,EAEzB,MAAM,yBAAyB,CAAC;AAYjC,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAoLtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqFK;AACL,eAAO,MAAM,IAAI,EAAE,QAAQ,CAAC,wBAAwB,CAAC,SAAS,EAAE,WAAW,CAAC,CAWzE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './pump-services';
2
+ //# 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/pump/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { FutureResponse, KosServiceResponse } from '@kosdev-code/kos-ui-sdk';
2
+
3
+ export interface PumpResponse {
4
+ inserted: boolean;
5
+ beveragePour: boolean;
6
+ ingredientPour: boolean;
7
+ type: string;
8
+ ingredientId: string;
9
+ holderPath: string;
10
+ boardPath: string;
11
+ nozzlePath: string;
12
+ name: string;
13
+ path: string;
14
+ category: string;
15
+ }
16
+ interface IntentRequest {
17
+ intent: string;
18
+ pumpId: string;
19
+ tracker: string;
20
+ }
21
+ interface IntentVolumeResponse {
22
+ volume: number;
23
+ }
24
+ export declare const sendIntent: ({ intent, pumpId, tracker, }: IntentRequest) => Promise<KosServiceResponse<FutureResponse> | undefined>;
25
+ export declare const getIntentVolume: (pumpId: string, intent: string) => Promise<IntentVolumeResponse>;
26
+ export {};
27
+ //# sourceMappingURL=pump-services.d.ts.map