@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,80 @@
1
+ import { IngredientContainerModel, IngredientContainerOptions } from './types';
2
+ import { SingletonKosModelRegistrationBean } from '@kosdev-code/kos-ui-sdk';
3
+
4
+ /**
5
+ * # IngredientContainer
6
+ *
7
+ * The registration bean includes convenience methods for creating and working with IngredientContainerModel 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: IngredientContainer.type})
18
+ * private holderContainerModel: IngredientContainerModel;
19
+ * ```
20
+ *
21
+ *
22
+ * ## factory
23
+ *
24
+ * The factory function that can be used to create new IngredientContainerModel instances.
25
+ *
26
+ * As this is a singleton model, the factory function accepts the model options as its argument.
27
+ *
28
+ * If a model with the same model type 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
+ *
32
+ * @example
33
+ *
34
+ * ```typescript
35
+ * const model = IngredientContainer.factory({ });
36
+ * ```
37
+ *
38
+ * ## predicate
39
+ *
40
+ * [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 IngredientContainerModel.
41
+ *
42
+ * @example
43
+ * ```typescript
44
+ *
45
+ * const model: IKosDataModel = ...; // some model
46
+ *
47
+ * if (IngredientContainer.predicate(model)) {
48
+ * // if the function evaluates to true, the model is narrowed down to IngredientContainerModel
49
+ * // and the compiler will know that the model has the IngredientContainerModel interface
50
+ * model.updateAvailability(false);
51
+ * }
52
+ * ```
53
+ *
54
+ * ## registration
55
+ *
56
+ * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
57
+ * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
58
+ *
59
+ *
60
+ * @example
61
+ *
62
+ * In an application registration file you can declare the model registration as follows:
63
+ *
64
+ * **registration.ts**
65
+ * ```typescript
66
+ * import { IngredientContainer } from "@kosdev-code/kos-dispense-sdk";
67
+ * ...
68
+ * import { IKosRegistry } from "@kosdev-code/kos-ui-sdk";
69
+ * export const kosModels: IKosRegistry["models"] = {
70
+ * ...IngredientContainer.registration,
71
+ * };
72
+ * ```
73
+ *
74
+ * ## registration.singleton
75
+ * The IngredientContainer model is a singleton. This means that each time the factory function is called , the same instance will be returned.
76
+ * If the model does not yet exist, it will be created passing in the provided options to initialize it.
77
+ *
78
+ * * */
79
+ export declare const IngredientContainer: SingletonKosModelRegistrationBean<IngredientContainerModel, IngredientContainerOptions>;
80
+ //# sourceMappingURL=ingredient-container-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ingredient-container-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-dispense-sdk/src/models/models/ingredient-container/ingredient-container-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,iCAAiC,EAClC,MAAM,yBAAyB,CAAC;AAajC,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,SAAS,CAAC;AAoFjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0EO;AACP,eAAO,MAAM,mBAAmB,EAAE,iCAAiC,CACjE,wBAAwB,EACxB,0BAA0B,CAc3B,CAAC"}
@@ -0,0 +1,67 @@
1
+ import { IngredientModel } from '../../ingredient/types';
2
+ import { IKosDataModel, IKosModelContainer } from '@kosdev-code/kos-ui-sdk';
3
+
4
+
5
+ export interface IngredientContainerOptions {}
6
+
7
+ /**
8
+ * The IngredientContainer represents the collection of {@link IngredientModel} entities that are considered as part of the kOS Beverage Graph.
9
+ *
10
+ * Its primary purpose is expose the set of ingredients that can be used to compose a pourable beverage. The presence or absence
11
+ * of an ingredient in the container will determine if the ingredient is available for use in the beverage graph.
12
+ *
13
+ * The ingredient container will index all of the underlying ingredients by the `type` property of the ingredient. This allows for
14
+ * the grouping and filtering of ingredients based on the `type` property. For example, to get the ingredients that are used for flavor shots,
15
+ * you would call {@link IngredientContainer.getIngredientsByType} with the `type` of the flavor shot.
16
+ *
17
+ * The Ingredient is a {@link IKosDataModel} and is registered with the model registry using the {@link IngredientContainer} type.
18
+ *
19
+ *
20
+ * @see {@link IngredientServices.getIngredients} - The ingredient service will retrieve the set of ingredients.
21
+ *
22
+ * ## Lifecycle
23
+ *
24
+ * ### Load
25
+ *
26
+ * During the `load` phase of the model lifecycle, the set of {@link IngredientModel} models will be retrieved and processed. The nodes will be indexed based on
27
+ * the defined `type` for the node. The `type` is defined as part of the backend Ingredient model.
28
+ *
29
+ * #### Extension Points
30
+ *
31
+ * The `load` lifecycle hook will call into the {@link ExtensionType.IngredientLoader} extension point in order to establish the context
32
+ * that will be used to populate the ingredients nodes. Use of this extension point is optional.
33
+ *
34
+ * The `load` lifecycle hook will call into the {@link ExtensionType.IngredientMapper} for each ingredient node that is retrieved from the backend.
35
+ * The extension point will be called with the Ingredient context data and the {@link IngredientServices.IngredientResponse} for the ingredient node and will
36
+ * map the results into the {@link IngredientModel} as part of the `data` property.
37
+ *
38
+ * The `load` lifecycle hook will call into the {@link ExtensionType.IngredientTypeMapper} for each ingredient node that is retrieved from the backend.
39
+ * The extension point will be called with the Ingredient context data and the {@link IngredientServices.IngredientResponse} for the ingredient node. The results will
40
+ * be mapped into the {@link IngredientModel} as the `type` property.
41
+ *
42
+ *
43
+ * @see {@link IngredientContainer}
44
+ *
45
+ * @category Model
46
+ */
47
+ export interface IngredientContainerModel<AdditionalData extends object = {}>
48
+ extends IngredientContainerOptions,
49
+ IKosDataModel,
50
+ AdditionalData {
51
+ id: string;
52
+ /**
53
+ * The set of ingredients that are available for use in the beverage graph.
54
+ * @readonly
55
+ * */
56
+ ingredients: IKosModelContainer<IngredientModel>;
57
+
58
+ /**
59
+ * Utility method to retrieve the ingredients that are associated with the specified type.
60
+ * @param type The type of the ingredient to retrieve.
61
+ * @returns The set of ingredients that are associated with the specified type.
62
+ * */
63
+ getIngredientsByType(type: string): IngredientModel<AdditionalData>[];
64
+
65
+ /** @internal */
66
+ updateModel(options: IngredientContainerOptions): void;
67
+ }
@@ -0,0 +1,5 @@
1
+ export { Nozzle, type NozzleModel } from './nozzle-model';
2
+ export type { NozzleOptions, SelectedPourable } from './types';
3
+ /** @category kOS Services */
4
+ export * as NozzleServices from './services';
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/nozzle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC1D,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE/D,6BAA6B;AAC7B,OAAO,KAAK,cAAc,MAAM,YAAY,CAAC"}
@@ -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>[];
34
+ /**
35
+ * The availability nodes that have been grouped into the "brands" group.
36
+ *
37
+ */
38
+ get brands(): AvailabilityModel<any>[];
39
+ get visibleBrands(): AvailabilityModel<any>[];
40
+ get visibleBeverages(): AvailabilityModel<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> | undefined;
65
+ additional: AvailabilityModel<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> | 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>[];
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>[];
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":"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"}
@@ -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,181 @@
1
+ /**
2
+ * An individual availability node for a nozzle.
3
+ * */
4
+ export interface BeverageResponse {
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
+ }
27
+ /**
28
+ * The response from the availability endpoint.
29
+ * */
30
+ export interface AvailabilityResponse {
31
+ /**
32
+ * Indicates if the availability requires a full calculation of the availability nodes or just a
33
+ * delta calculation.
34
+ * */
35
+ rebuild: boolean;
36
+ /**
37
+ * The availability groups for the nozzle.
38
+ * */
39
+ groups: {
40
+ /**
41
+ * the built-in beverages group
42
+ * */
43
+ beverages: BeverageResponse[];
44
+ /**
45
+ * the built-in flavors group
46
+ * */
47
+ flavors: BeverageResponse[];
48
+ /**
49
+ * the built-in brands group
50
+ * */
51
+ brands: BeverageResponse[];
52
+ /**
53
+ * Additional named groups that are defined by the dispenser.
54
+ * */
55
+ [k: string]: BeverageResponse[];
56
+ };
57
+ }
58
+ /**
59
+ *
60
+ * Initiates a pour for the specified nozzle.
61
+ *
62
+ * Uses the kOS endpoint [POST] `${URL}/api/ext/dispense/nozzle/${nozzleId}/pipeline/beverage/pour`
63
+ *
64
+ * @param nozzleId - the nozzle id to pour from.
65
+ * @param tracker - the tracker to use for the pour. It will be returned in the future to allow consumers
66
+ * to track the pour.
67
+ * @category Service
68
+ *
69
+ * @example
70
+ * ```typescript
71
+ * import { NozzleServices } from "@kosdev-code/kos-dispense-sdk";
72
+ * ...
73
+ *
74
+ * await NozzleServices.pourPourable("nozzle-1", "my-tracker");
75
+ * ```
76
+ * @see {@link FutureManager.initiateFuture}
77
+ * @returns - a Future that encapsulates the pour including its status and progress.
78
+ **/
79
+ export declare const pourPourable: (nozzleId: string, tracker: string) => Promise<import('@kosdev-code/kos-ui-sdk').KosServiceResponse<any> | undefined>;
80
+ /**
81
+ *
82
+ * Initiates a fixed named pour for the specified nozzle.
83
+ *
84
+ * Typically used for cases where a named cup size is to be poured where the volume of the pour is
85
+ * dictated by the name.
86
+ *
87
+ *
88
+ * Uses the kOS endpoint [POST] `${URL}/api/ext/dispense/nozzle/${nozzleId}/pipeline/beverage/fixed/${name}`
89
+ *
90
+ * @param name - name of the fixed pour volume.
91
+ * @param nozzleId - the nozzle id to pour from.
92
+ * @param tracker - the tracker to use for the pour. It will be returned in the future to allow consumers
93
+ * to track the pour.
94
+ * @category Service
95
+ *
96
+ * @example
97
+ * ```typescript
98
+ * import { NozzleServices } from "@kosdev-code/kos-dispense-sdk";
99
+ * ...
100
+ *
101
+ * await NozzleServices.pourPourable("nozzle-1", "my-tracker");
102
+ * ```
103
+ * @see {@link FutureManager.initiateFuture}
104
+ * @returns - a Future that encapsulates the pour including its status and progress.
105
+ **/
106
+ export declare const pourNamedPourable: (name: string, nozzleId: string, tracker: string) => Promise<import('@kosdev-code/kos-ui-sdk').KosServiceResponse<any> | undefined>;
107
+ /**
108
+ * Retrieves the availability nodes for a specified nozzle.
109
+ *
110
+ * Uses the kOS endpoint [GET] `${URL}/api/ext/dispense/nozzle/${nozzleId}/pipeline/beverage/availability`
111
+ *
112
+ * @param nozzleId - the nozzle id to retrieve availability for.
113
+ * @returns - the availability nodes for the specified nozzle.
114
+ * @category Service
115
+ *
116
+ * @example
117
+ * ```typescript
118
+ * import { NozzleServices } from "@kosdev-code/kos-dispense-sdk";
119
+ * ...
120
+ *
121
+ * const availability = await NozzleServices.getAvailability("nozzle-1");
122
+ * if (availability?.status !== 200) {
123
+ * throw new Error("Failed to load nozzle availability");
124
+ * }
125
+ * ```
126
+ */
127
+ export declare const getAvailability: (urlPrefix: string) => Promise<import('@kosdev-code/kos-ui-sdk').KosServiceResponse<AvailabilityResponse> | undefined>;
128
+ /**
129
+ * Invokes the endpoint to select a pourable for the specified nozzle.
130
+ *
131
+ * Uses the kOS endpoint [POST] `${URL}/api/ext/dispense/nozzle/${nozzleId}/pipeline/beverage/select`
132
+ *
133
+ *
134
+ * @param nozzleId - the nozzle id to select a pourable for.
135
+ * @param payload - the payload to send to the endpoint. The shape of the payload is determined by the
136
+ * {@link ExtensionType.SelectedPourableMapper} extension.
137
+ * @category Service
138
+ * @see {@link ExtensionType.SelectedPourableMapper}
139
+ * @returns - an emtpy response.
140
+ *
141
+ * @example
142
+ * ```typescript
143
+ * import { NozzleServices } from "@kosdev-code/kos-dispense-sdk";
144
+ * ...
145
+ * try {
146
+ * const response = await NozzleServices.selectPourable("nozzle-1", {
147
+ * beverage: "beverage-1",
148
+ * additional: ["flavor-1"],
149
+ * });
150
+ * if (response?.status !== 200) {
151
+ * throw new Error("Failed to select pourable");
152
+ * }
153
+ * } catch (e) {
154
+ * console.error(e);
155
+ * }
156
+ * ```
157
+ * */
158
+ export declare const selectPourable: (nozzleId: string, payload: object) => Promise<import('@kosdev-code/kos-ui-sdk').KosServiceResponse<any> | undefined>;
159
+ /**
160
+ * Invokes the endpoint to clear the selected pourable for the specified nozzle.
161
+ * Uses the kOS endpoint [DELETE] `${URL}/api/ext/dispense/nozzle/${nozzleId}/pipeline/beverage/select`
162
+ *
163
+ * @param nozzleId - the nozzle id to clear the selected pourable for.
164
+ * @category Service
165
+ * @returns - an emtpy response.
166
+ * @example
167
+ * ```typescript
168
+ * import { NozzleServices } from "@kosdev-code/kos-dispense-sdk";
169
+ * ...
170
+ * try {
171
+ * const response = await NozzleServices.clearPourable("nozzle-1");
172
+ * if (response?.status !== 200) {
173
+ * throw new Error("Failed to clear pourable");
174
+ * }
175
+ * } catch (e) {
176
+ * console.error(e);
177
+ * }
178
+ * ```
179
+ * */
180
+ export declare const clearPourable: (nozzleId: string) => Promise<import('@kosdev-code/kos-ui-sdk').KosServiceResponse<unknown> | undefined>;
181
+ //# 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;IAC/B;;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;CACf;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"}