@lookiero/checkout 0.3.26 → 0.4.0-beta.0

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 (433) hide show
  1. package/dist/domain/checkout/command/startCheckout.d.ts +13 -0
  2. package/dist/domain/checkout/command/startCheckout.js +4 -0
  3. package/dist/domain/checkout/model/checkout.d.ts +18 -0
  4. package/dist/domain/checkout/model/checkout.js +20 -0
  5. package/dist/domain/checkout/model/checkoutStarted.d.ts +13 -0
  6. package/dist/domain/checkout/model/checkoutStarted.js +4 -0
  7. package/dist/domain/checkout/model/checkouts.d.ts +7 -0
  8. package/dist/domain/checkout/model/checkouts.js +1 -0
  9. package/dist/domain/checkoutBooking/command/bookCheckoutBookingForCheckoutItem.d.ts +15 -0
  10. package/dist/domain/checkoutBooking/command/bookCheckoutBookingForCheckoutItem.js +7 -0
  11. package/dist/domain/checkoutBooking/command/bookSizeReplaceableProductVariantsForCheckoutItem.d.ts +15 -0
  12. package/dist/domain/checkoutBooking/command/bookSizeReplaceableProductVariantsForCheckoutItem.js +7 -0
  13. package/dist/domain/checkoutBooking/model/checkoutBooking.d.ts +9 -0
  14. package/dist/domain/checkoutBooking/model/checkoutBooking.js +9 -0
  15. package/dist/domain/checkoutBooking/model/checkoutBookingBooked.d.ts +14 -0
  16. package/dist/domain/checkoutBooking/model/checkoutBookingBooked.js +7 -0
  17. package/dist/domain/checkoutBooking/model/checkoutBookings.d.ts +7 -0
  18. package/dist/domain/checkoutBooking/model/checkoutBookings.js +1 -0
  19. package/dist/domain/checkoutItem/command/keepCheckoutItem.d.ts +13 -0
  20. package/dist/domain/checkoutItem/command/keepCheckoutItem.js +4 -0
  21. package/dist/domain/checkoutItem/command/replaceCheckoutItem.d.ts +14 -0
  22. package/dist/domain/checkoutItem/command/replaceCheckoutItem.js +7 -0
  23. package/dist/domain/checkoutItem/command/returnCheckoutItem.d.ts +15 -0
  24. package/dist/domain/checkoutItem/command/returnCheckoutItem.js +7 -0
  25. package/dist/domain/checkoutItem/model/checkoutItem.d.ts +24 -0
  26. package/dist/domain/checkoutItem/model/checkoutItem.js +40 -0
  27. package/dist/domain/checkoutItem/model/checkoutItemKept.d.ts +13 -0
  28. package/dist/domain/checkoutItem/model/checkoutItemKept.js +4 -0
  29. package/dist/domain/checkoutItem/model/checkoutItemReplaced.d.ts +13 -0
  30. package/dist/domain/checkoutItem/model/checkoutItemReplaced.js +4 -0
  31. package/dist/domain/checkoutItem/model/checkoutItemReturned.d.ts +13 -0
  32. package/dist/domain/checkoutItem/model/checkoutItemReturned.js +4 -0
  33. package/dist/domain/checkoutItem/model/checkoutItems.d.ts +7 -0
  34. package/dist/domain/checkoutItem/model/checkoutItems.js +1 -0
  35. package/dist/domain/checkoutItem/model/currency.d.ts +5 -0
  36. package/dist/domain/checkoutItem/model/currency.js +6 -0
  37. package/dist/domain/checkoutItem/model/feedbacks.d.ts +3 -0
  38. package/dist/domain/checkoutItem/model/feedbacks.js +1 -0
  39. package/dist/domain/checkoutItem/model/price.d.ts +10 -0
  40. package/dist/domain/checkoutItem/model/price.js +1 -0
  41. package/dist/domain/uiSetting/command/updateUiSetting.d.ts +15 -0
  42. package/dist/domain/uiSetting/command/updateUiSetting.js +10 -0
  43. package/dist/domain/uiSetting/model/uiSetting.d.ts +9 -0
  44. package/dist/domain/uiSetting/model/uiSetting.js +11 -0
  45. package/dist/domain/uiSetting/model/uiSettingUpdated.d.ts +14 -0
  46. package/dist/domain/uiSetting/model/uiSettingUpdated.js +7 -0
  47. package/dist/domain/uiSetting/model/uiSettings.d.ts +7 -0
  48. package/dist/domain/uiSetting/model/uiSettings.js +1 -0
  49. package/dist/index.d.ts +24 -0
  50. package/dist/index.js +19 -0
  51. package/dist/infrastructure/delivery/baseBootstrap.d.ts +56 -0
  52. package/dist/infrastructure/delivery/baseBootstrap.js +55 -0
  53. package/dist/infrastructure/delivery/bootstrap.d.ts +10 -0
  54. package/dist/infrastructure/delivery/bootstrap.js +44 -0
  55. package/dist/infrastructure/delivery/http/fetchHttpClient.d.ts +14 -0
  56. package/dist/infrastructure/delivery/http/fetchHttpClient.js +20 -0
  57. package/dist/infrastructure/delivery/http/httpClient.d.ts +16 -0
  58. package/dist/infrastructure/delivery/http/httpClient.js +1 -0
  59. package/dist/infrastructure/delivery/mock/checkoutBookingDataSource.d.ts +14 -0
  60. package/dist/infrastructure/delivery/mock/checkoutBookingDataSource.js +12 -0
  61. package/dist/infrastructure/delivery/mock/checkoutDataSource.d.ts +17 -0
  62. package/dist/infrastructure/delivery/mock/checkoutDataSource.js +18 -0
  63. package/dist/infrastructure/delivery/mock/dataSourceCheckoutBookings.d.ts +14 -0
  64. package/dist/infrastructure/delivery/mock/dataSourceCheckoutBookings.js +21 -0
  65. package/dist/infrastructure/delivery/mock/dataSourceCheckoutItems.d.ts +14 -0
  66. package/dist/infrastructure/delivery/mock/dataSourceCheckoutItems.js +25 -0
  67. package/dist/infrastructure/delivery/mock/dataSourceCheckouts.d.ts +11 -0
  68. package/dist/infrastructure/delivery/mock/dataSourceCheckouts.js +27 -0
  69. package/dist/infrastructure/domain/checkout/model/httpCheckouts.d.ts +16 -0
  70. package/dist/infrastructure/domain/checkout/model/httpCheckouts.js +19 -0
  71. package/dist/infrastructure/domain/checkout/model/httpCheckoutsStart.d.ts +5 -0
  72. package/dist/infrastructure/domain/checkout/model/httpCheckoutsStart.js +13 -0
  73. package/dist/infrastructure/domain/checkout/react/useStartCheckout.d.ts +13 -0
  74. package/dist/infrastructure/domain/checkout/react/useStartCheckout.js +10 -0
  75. package/dist/infrastructure/domain/checkoutBooking/model/httpCheckoutBookings.d.ts +16 -0
  76. package/dist/infrastructure/domain/checkoutBooking/model/httpCheckoutBookings.js +15 -0
  77. package/dist/infrastructure/domain/checkoutBooking/model/httpCheckoutBookingsBook.d.ts +5 -0
  78. package/dist/infrastructure/domain/checkoutBooking/model/httpCheckoutBookingsBook.js +18 -0
  79. package/dist/infrastructure/domain/checkoutBooking/react/useBookCheckouBookingForCheckoutItem.d.ts +15 -0
  80. package/dist/infrastructure/domain/checkoutBooking/react/useBookCheckouBookingForCheckoutItem.js +15 -0
  81. package/dist/infrastructure/domain/checkoutBooking/react/useBookSizeReplaceableProductVariantsForCheckoutItem.d.ts +15 -0
  82. package/dist/infrastructure/domain/checkoutBooking/react/useBookSizeReplaceableProductVariantsForCheckoutItem.js +14 -0
  83. package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItems.d.ts +16 -0
  84. package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItems.js +26 -0
  85. package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItemsKeep.d.ts +5 -0
  86. package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItemsKeep.js +13 -0
  87. package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItemsReplace.d.ts +5 -0
  88. package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItemsReplace.js +13 -0
  89. package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItemsReturn.d.ts +5 -0
  90. package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItemsReturn.js +13 -0
  91. package/dist/infrastructure/domain/checkoutItem/react/useKeepCheckoutItem.d.ts +13 -0
  92. package/dist/infrastructure/domain/checkoutItem/react/useKeepCheckoutItem.js +12 -0
  93. package/dist/infrastructure/domain/checkoutItem/react/useReplaceCheckoutItem.d.ts +16 -0
  94. package/dist/infrastructure/domain/checkoutItem/react/useReplaceCheckoutItem.js +13 -0
  95. package/dist/infrastructure/domain/checkoutItem/react/useReturnCheckoutItem.d.ts +17 -0
  96. package/dist/infrastructure/domain/checkoutItem/react/useReturnCheckoutItem.js +13 -0
  97. package/dist/infrastructure/domain/uiSetting/model/storageUiSettings.d.ts +17 -0
  98. package/dist/infrastructure/domain/uiSetting/model/storageUiSettings.js +20 -0
  99. package/dist/infrastructure/domain/uiSetting/react/useIncrementIntroShownCount.d.ts +10 -0
  100. package/dist/infrastructure/domain/uiSetting/react/useIncrementIntroShownCount.js +11 -0
  101. package/dist/infrastructure/domain/uiSetting/react/useUpdateUiSetting.d.ts +14 -0
  102. package/dist/infrastructure/domain/uiSetting/react/useUpdateUiSetting.js +15 -0
  103. package/dist/infrastructure/persistence/asyncStorageStorage.d.ts +5 -0
  104. package/dist/infrastructure/persistence/asyncStorageStorage.js +7 -0
  105. package/dist/infrastructure/persistence/storage.d.ts +7 -0
  106. package/dist/infrastructure/persistence/storage.js +1 -0
  107. package/dist/infrastructure/persistence/uiSettingData.d.ts +6 -0
  108. package/dist/infrastructure/persistence/uiSettingData.js +1 -0
  109. package/dist/infrastructure/projection/bookedSizeChangeProductsVariants/httpBookedSizeChangeProductsVariantsForCheckoutItemView.d.ts +12 -0
  110. package/dist/infrastructure/projection/bookedSizeChangeProductsVariants/httpBookedSizeChangeProductsVariantsForCheckoutItemView.js +9 -0
  111. package/dist/infrastructure/projection/bookedSizeChangeProductsVariants/react/useViewBookedSizeChangeProductsVariantsForCheckoutItem.d.ts +10 -0
  112. package/dist/infrastructure/projection/bookedSizeChangeProductsVariants/react/useViewBookedSizeChangeProductsVariantsForCheckoutItem.js +9 -0
  113. package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/bookedSizeReplaceableProductVariants.mock.d.ts +3 -0
  114. package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/bookedSizeReplaceableProductVariants.mock.js +17 -0
  115. package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/httpBookedSizeReplaceableProductVariantsForCheckoutItemView.d.ts +34 -0
  116. package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/httpBookedSizeReplaceableProductVariantsForCheckoutItemView.js +26 -0
  117. package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/react/useViewBookedSizeReplaceableProductVariantsForCheckoutItem.d.ts +10 -0
  118. package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/react/useViewBookedSizeReplaceableProductVariantsForCheckoutItem.js +9 -0
  119. package/dist/infrastructure/projection/checkout/checkout.d.ts +18 -0
  120. package/dist/infrastructure/projection/checkout/checkout.js +5 -0
  121. package/dist/infrastructure/projection/checkout/httpCheckoutByIdView.d.ts +12 -0
  122. package/dist/infrastructure/projection/checkout/httpCheckoutByIdView.js +10 -0
  123. package/dist/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.d.ts +12 -0
  124. package/dist/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.js +10 -0
  125. package/dist/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.d.ts +12 -0
  126. package/dist/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.js +8 -0
  127. package/dist/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.d.ts +12 -0
  128. package/dist/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.js +8 -0
  129. package/dist/infrastructure/projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId.d.ts +10 -0
  130. package/dist/infrastructure/projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId.js +14 -0
  131. package/dist/infrastructure/projection/checkout/react/useViewFiveItemsDiscountByCustomerId.d.ts +10 -0
  132. package/dist/infrastructure/projection/checkout/react/useViewFiveItemsDiscountByCustomerId.js +9 -0
  133. package/dist/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.d.ts +10 -0
  134. package/dist/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.js +9 -0
  135. package/dist/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.d.ts +12 -0
  136. package/dist/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.js +9 -0
  137. package/dist/infrastructure/projection/checkoutItem/checkoutItem.d.ts +45 -0
  138. package/dist/infrastructure/projection/checkoutItem/checkoutItem.js +40 -0
  139. package/dist/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.d.ts +12 -0
  140. package/dist/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.js +9 -0
  141. package/dist/infrastructure/projection/feedback/feedback.mock.d.ts +3 -0
  142. package/dist/infrastructure/projection/feedback/feedback.mock.js +6 -0
  143. package/dist/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.d.ts +12 -0
  144. package/dist/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.js +9 -0
  145. package/dist/infrastructure/projection/returnQuestion/react/useListReturnQuestionsByCheckoutItemId.d.ts +10 -0
  146. package/dist/infrastructure/projection/returnQuestion/react/useListReturnQuestionsByCheckoutItemId.js +9 -0
  147. package/dist/infrastructure/projection/returnQuestion/returnQuestion.d.ts +14 -0
  148. package/dist/infrastructure/projection/returnQuestion/returnQuestion.js +9 -0
  149. package/dist/infrastructure/projection/uiSetting/react/useShouldIntroBeShown.d.ts +6 -0
  150. package/dist/infrastructure/projection/uiSetting/react/useShouldIntroBeShown.js +7 -0
  151. package/dist/infrastructure/projection/uiSetting/react/useViewIntroShownCount.d.ts +6 -0
  152. package/dist/infrastructure/projection/uiSetting/react/useViewIntroShownCount.js +9 -0
  153. package/dist/infrastructure/projection/uiSetting/react/useViewUiSettingByKey.d.ts +10 -0
  154. package/dist/infrastructure/projection/uiSetting/react/useViewUiSettingByKey.js +12 -0
  155. package/dist/infrastructure/projection/uiSetting/storageUiSettingByKeyView.d.ts +13 -0
  156. package/dist/infrastructure/projection/uiSetting/storageUiSettingByKeyView.js +15 -0
  157. package/dist/infrastructure/ui/Root.d.ts +20 -0
  158. package/dist/infrastructure/ui/Root.js +11 -0
  159. package/dist/infrastructure/ui/components/atoms/price/Price.d.ts +12 -0
  160. package/dist/infrastructure/ui/components/atoms/price/Price.js +28 -0
  161. package/dist/infrastructure/ui/components/atoms/price/Price.style.d.ts +13 -0
  162. package/dist/infrastructure/ui/components/atoms/price/Price.style.js +16 -0
  163. package/dist/infrastructure/ui/components/layouts/body/Body.d.ts +9 -0
  164. package/dist/infrastructure/ui/components/layouts/body/Body.js +7 -0
  165. package/dist/infrastructure/ui/components/layouts/body/Body.style.d.ts +7 -0
  166. package/dist/infrastructure/ui/components/layouts/body/Body.style.js +8 -0
  167. package/dist/infrastructure/ui/components/layouts/tabs/Tabs.d.ts +26 -0
  168. package/dist/infrastructure/ui/components/layouts/tabs/Tabs.js +47 -0
  169. package/dist/infrastructure/ui/components/layouts/tabs/Tabs.style.d.ts +32 -0
  170. package/dist/infrastructure/ui/components/layouts/tabs/Tabs.style.js +35 -0
  171. package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.d.ts +9 -0
  172. package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.js +8 -0
  173. package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.d.ts +8 -0
  174. package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.js +4 -0
  175. package/dist/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionFeedback.d.ts +29 -0
  176. package/dist/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionFeedback.js +27 -0
  177. package/dist/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionItem.d.ts +18 -0
  178. package/dist/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionItem.js +12 -0
  179. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.d.ts +10 -0
  180. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.js +1 -0
  181. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionFeedbackItem/HostDefaultReturnQuestionFeedbackItem.d.ts +3 -0
  182. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionFeedbackItem/HostDefaultReturnQuestionFeedbackItem.js +3 -0
  183. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.d.ts +3 -0
  184. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.js +12 -0
  185. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.style.d.ts +8 -0
  186. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.style.js +11 -0
  187. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.d.ts +3 -0
  188. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +34 -0
  189. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.d.ts +11 -0
  190. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.js +14 -0
  191. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.d.ts +3 -0
  192. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.js +27 -0
  193. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.style.d.ts +12 -0
  194. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.style.js +15 -0
  195. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.d.ts +3 -0
  196. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.js +15 -0
  197. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.style.d.ts +12 -0
  198. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.style.js +15 -0
  199. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.d.ts +3 -0
  200. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.js +26 -0
  201. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.style.d.ts +10 -0
  202. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.style.js +13 -0
  203. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.d.ts +3 -0
  204. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.js +13 -0
  205. package/dist/infrastructure/ui/components/organisms/returnQuestions/util/returnQuestionFeedback.d.ts +22 -0
  206. package/dist/infrastructure/ui/components/organisms/returnQuestions/util/returnQuestionFeedback.js +58 -0
  207. package/dist/infrastructure/ui/components/templates/SafeAreaScrollView.d.ts +8 -0
  208. package/dist/infrastructure/ui/components/templates/SafeAreaScrollView.js +14 -0
  209. package/dist/infrastructure/ui/hooks/useMediaImage.d.ts +7 -0
  210. package/dist/infrastructure/ui/hooks/useMediaImage.js +12 -0
  211. package/dist/infrastructure/ui/i18n/i18n.d.ts +39 -0
  212. package/dist/infrastructure/ui/i18n/i18n.js +40 -0
  213. package/dist/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.d.ts +9 -0
  214. package/dist/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.js +21 -0
  215. package/dist/infrastructure/ui/routing/CheckoutMiddleware.d.ts +9 -0
  216. package/dist/infrastructure/ui/routing/CheckoutMiddleware.js +47 -0
  217. package/dist/infrastructure/ui/routing/Routing.d.ts +12 -0
  218. package/dist/infrastructure/ui/routing/Routing.js +45 -0
  219. package/dist/infrastructure/ui/routing/router/Router.d.ts +1 -0
  220. package/dist/infrastructure/ui/routing/router/Router.js +1 -0
  221. package/dist/infrastructure/ui/routing/router/Router.native.d.ts +1 -0
  222. package/dist/infrastructure/ui/routing/router/Router.native.js +1 -0
  223. package/dist/infrastructure/ui/routing/routes.d.ts +6 -0
  224. package/dist/infrastructure/ui/routing/routes.js +7 -0
  225. package/dist/infrastructure/ui/settings/UISettings.d.ts +4 -0
  226. package/dist/infrastructure/ui/settings/UISettings.js +5 -0
  227. package/dist/infrastructure/ui/shared/components/atoms/error/Error.d.ts +10 -0
  228. package/dist/infrastructure/ui/shared/components/atoms/error/Error.js +5 -0
  229. package/dist/infrastructure/ui/shared/components/atoms/error/Error.style.d.ts +6 -0
  230. package/dist/infrastructure/ui/shared/components/atoms/error/Error.style.js +9 -0
  231. package/dist/infrastructure/ui/shared/components/atoms/field/Field.d.ts +14 -0
  232. package/dist/infrastructure/ui/shared/components/atoms/field/Field.js +29 -0
  233. package/dist/infrastructure/ui/shared/components/atoms/field/Field.style.d.ts +14 -0
  234. package/dist/infrastructure/ui/shared/components/atoms/field/Field.style.js +17 -0
  235. package/dist/infrastructure/ui/shared/components/atoms/icon/Icon.d.ts +12 -0
  236. package/dist/infrastructure/ui/shared/components/atoms/icon/Icon.js +7 -0
  237. package/dist/infrastructure/ui/shared/components/atoms/icon/Icon.style.d.ts +13 -0
  238. package/dist/infrastructure/ui/shared/components/atoms/icon/Icon.style.js +16 -0
  239. package/dist/infrastructure/ui/shared/components/atoms/input/Input.d.ts +11 -0
  240. package/dist/infrastructure/ui/shared/components/atoms/input/Input.js +37 -0
  241. package/dist/infrastructure/ui/shared/components/atoms/input/Input.style.d.ts +19 -0
  242. package/dist/infrastructure/ui/shared/components/atoms/input/Input.style.js +26 -0
  243. package/dist/infrastructure/ui/shared/components/atoms/spinner/Spinner.d.ts +3 -0
  244. package/dist/infrastructure/ui/shared/components/atoms/spinner/Spinner.js +8 -0
  245. package/dist/infrastructure/ui/shared/components/atoms/spinner/Spinner.style.d.ts +9 -0
  246. package/dist/infrastructure/ui/shared/components/atoms/spinner/Spinner.style.js +10 -0
  247. package/dist/infrastructure/ui/shared/components/layouts/column/Column.d.ts +10 -0
  248. package/dist/infrastructure/ui/shared/components/layouts/column/Column.js +10 -0
  249. package/dist/infrastructure/ui/shared/components/layouts/column/Column.style.d.ts +12 -0
  250. package/dist/infrastructure/ui/shared/components/layouts/column/Column.style.js +23 -0
  251. package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.d.ts +20 -0
  252. package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.js +79 -0
  253. package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.style.d.ts +58 -0
  254. package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.style.js +70 -0
  255. package/dist/infrastructure/ui/shared/components/layouts/row/Row.d.ts +6 -0
  256. package/dist/infrastructure/ui/shared/components/layouts/row/Row.js +10 -0
  257. package/dist/infrastructure/ui/shared/components/layouts/row/Row.style.d.ts +13 -0
  258. package/dist/infrastructure/ui/shared/components/layouts/row/Row.style.js +17 -0
  259. package/dist/infrastructure/ui/shared/components/layouts/slider/Pagination.d.ts +14 -0
  260. package/dist/infrastructure/ui/shared/components/layouts/slider/Pagination.js +11 -0
  261. package/dist/infrastructure/ui/shared/components/layouts/slider/Pagination.style.d.ts +23 -0
  262. package/dist/infrastructure/ui/shared/components/layouts/slider/Pagination.style.js +27 -0
  263. package/dist/infrastructure/ui/shared/components/layouts/slider/Slider.d.ts +20 -0
  264. package/dist/infrastructure/ui/shared/components/layouts/slider/Slider.js +132 -0
  265. package/dist/infrastructure/ui/shared/components/layouts/slider/Slider.style.d.ts +11 -0
  266. package/dist/infrastructure/ui/shared/components/layouts/slider/Slider.style.js +12 -0
  267. package/dist/infrastructure/ui/shared/components/layouts/sticky/Sticky.d.ts +14 -0
  268. package/dist/infrastructure/ui/shared/components/layouts/sticky/Sticky.js +12 -0
  269. package/dist/infrastructure/ui/shared/components/layouts/sticky/Sticky.style.d.ts +46 -0
  270. package/dist/infrastructure/ui/shared/components/layouts/sticky/Sticky.style.js +33 -0
  271. package/dist/infrastructure/ui/shared/components/molecules/buttonIcon/ButtonIcon.d.ts +16 -0
  272. package/dist/infrastructure/ui/shared/components/molecules/buttonIcon/ButtonIcon.js +7 -0
  273. package/dist/infrastructure/ui/shared/components/molecules/buttonIcon/ButtonIcon.style.d.ts +7 -0
  274. package/dist/infrastructure/ui/shared/components/molecules/buttonIcon/ButtonIcon.style.js +10 -0
  275. package/dist/infrastructure/ui/shared/components/molecules/inputField/InputField.d.ts +25 -0
  276. package/dist/infrastructure/ui/shared/components/molecules/inputField/InputField.js +26 -0
  277. package/dist/infrastructure/ui/shared/components/molecules/inputField/InputField.style.d.ts +17 -0
  278. package/dist/infrastructure/ui/shared/components/molecules/inputField/InputField.style.js +20 -0
  279. package/dist/infrastructure/ui/shared/components/molecules/selectField/SelectField.d.ts +26 -0
  280. package/dist/infrastructure/ui/shared/components/molecules/selectField/SelectField.js +26 -0
  281. package/dist/infrastructure/ui/shared/components/molecules/selectField/SelectField.style.d.ts +15 -0
  282. package/dist/infrastructure/ui/shared/components/molecules/selectField/SelectField.style.js +18 -0
  283. package/dist/infrastructure/ui/shared/hooks/useScreenSize.d.ts +4 -0
  284. package/dist/infrastructure/ui/shared/hooks/useScreenSize.js +9 -0
  285. package/dist/infrastructure/ui/theme/theme.d.ts +10 -0
  286. package/dist/infrastructure/ui/theme/theme.js +5 -0
  287. package/dist/infrastructure/ui/views/App.d.ts +6 -0
  288. package/dist/infrastructure/ui/views/App.js +6 -0
  289. package/dist/infrastructure/ui/views/intro/Intro.d.ts +6 -0
  290. package/dist/infrastructure/ui/views/intro/Intro.js +51 -0
  291. package/dist/infrastructure/ui/views/intro/Intro.style.d.ts +52 -0
  292. package/dist/infrastructure/ui/views/intro/Intro.style.js +55 -0
  293. package/dist/infrastructure/ui/views/item/Item.d.ts +7 -0
  294. package/dist/infrastructure/ui/views/item/Item.js +97 -0
  295. package/dist/infrastructure/ui/views/item/Item.style.d.ts +15 -0
  296. package/dist/infrastructure/ui/views/item/Item.style.js +18 -0
  297. package/dist/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.d.ts +10 -0
  298. package/dist/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.js +21 -0
  299. package/dist/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.style.d.ts +17 -0
  300. package/dist/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.style.js +20 -0
  301. package/dist/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.d.ts +8 -0
  302. package/dist/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js +34 -0
  303. package/dist/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.d.ts +19 -0
  304. package/dist/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.js +22 -0
  305. package/dist/infrastructure/ui/views/item/components/itemActions/ItemActions.d.ts +18 -0
  306. package/dist/infrastructure/ui/views/item/components/itemActions/ItemActions.js +33 -0
  307. package/dist/infrastructure/ui/views/item/components/itemActions/ItemActions.style.d.ts +21 -0
  308. package/dist/infrastructure/ui/views/item/components/itemActions/ItemActions.style.js +24 -0
  309. package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.d.ts +13 -0
  310. package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.js +30 -0
  311. package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.style.d.ts +23 -0
  312. package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.style.js +27 -0
  313. package/dist/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.d.ts +12 -0
  314. package/dist/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.js +26 -0
  315. package/dist/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.d.ts +19 -0
  316. package/dist/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.js +22 -0
  317. package/dist/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.d.ts +7 -0
  318. package/dist/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.js +22 -0
  319. package/dist/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.style.d.ts +25 -0
  320. package/dist/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.style.js +29 -0
  321. package/dist/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.d.ts +10 -0
  322. package/dist/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.js +32 -0
  323. package/dist/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.style.d.ts +12 -0
  324. package/dist/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.style.js +15 -0
  325. package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +15 -0
  326. package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +46 -0
  327. package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +11 -0
  328. package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.js +14 -0
  329. package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.d.ts +7 -0
  330. package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.js +25 -0
  331. package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.style.d.ts +16 -0
  332. package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.style.js +19 -0
  333. package/dist/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.d.ts +7 -0
  334. package/dist/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.js +25 -0
  335. package/dist/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.style.d.ts +16 -0
  336. package/dist/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.style.js +19 -0
  337. package/dist/infrastructure/ui/views/summary/Summary.d.ts +6 -0
  338. package/dist/infrastructure/ui/views/summary/Summary.js +18 -0
  339. package/dist/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.d.ts +7 -0
  340. package/dist/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.js +20 -0
  341. package/dist/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.style.d.ts +9 -0
  342. package/dist/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.style.js +12 -0
  343. package/dist/package.json +1 -1
  344. package/dist/projection/bookedSizeChangeProductsVariants/bookedSizeChangeProductsVariants.d.ts +13 -0
  345. package/dist/projection/bookedSizeChangeProductsVariants/bookedSizeChangeProductsVariants.js +1 -0
  346. package/dist/projection/bookedSizeChangeProductsVariants/viewBookedSizeChangeProductVariantsForCheckoutItem.d.ts +25 -0
  347. package/dist/projection/bookedSizeChangeProductsVariants/viewBookedSizeChangeProductVariantsForCheckoutItem.js +8 -0
  348. package/dist/projection/bookedSizeReplaceableProductVariants/viewBookedSizeReplaceableProductVariantsForCheckoutItem.d.ts +33 -0
  349. package/dist/projection/bookedSizeReplaceableProductVariants/viewBookedSizeReplaceableProductVariantsForCheckoutItem.js +8 -0
  350. package/dist/projection/checkout/checkout.d.ts +12 -0
  351. package/dist/projection/checkout/checkout.js +1 -0
  352. package/dist/projection/checkout/viewCheckoutById.d.ts +25 -0
  353. package/dist/projection/checkout/viewCheckoutById.js +8 -0
  354. package/dist/projection/checkout/viewFirstAvailableCheckoutByCustomerId.d.ts +25 -0
  355. package/dist/projection/checkout/viewFirstAvailableCheckoutByCustomerId.js +8 -0
  356. package/dist/projection/checkout/viewFiveItemsDiscountByCustomerId.d.ts +24 -0
  357. package/dist/projection/checkout/viewFiveItemsDiscountByCustomerId.js +8 -0
  358. package/dist/projection/checkout/viewIsCheckoutAccessibleByCustomerId.d.ts +17 -0
  359. package/dist/projection/checkout/viewIsCheckoutAccessibleByCustomerId.js +13 -0
  360. package/dist/projection/checkout/viewIsCheckoutEnabledByCustomerId.d.ts +24 -0
  361. package/dist/projection/checkout/viewIsCheckoutEnabledByCustomerId.js +8 -0
  362. package/dist/projection/checkoutBooking/checkoutBooking.d.ts +6 -0
  363. package/dist/projection/checkoutBooking/checkoutBooking.js +1 -0
  364. package/dist/projection/checkoutBooking/viewCheckoutBookingById.d.ts +25 -0
  365. package/dist/projection/checkoutBooking/viewCheckoutBookingById.js +8 -0
  366. package/dist/projection/checkoutItem/checkoutItem.d.ts +53 -0
  367. package/dist/projection/checkoutItem/checkoutItem.js +17 -0
  368. package/dist/projection/checkoutItem/viewCheckoutItemById.d.ts +25 -0
  369. package/dist/projection/checkoutItem/viewCheckoutItemById.js +8 -0
  370. package/dist/projection/feedback/feedback.d.ts +3 -0
  371. package/dist/projection/feedback/feedback.js +1 -0
  372. package/dist/projection/returnQuestion/listReturnQuestionsByCheckoutItemId.d.ts +25 -0
  373. package/dist/projection/returnQuestion/listReturnQuestionsByCheckoutItemId.js +8 -0
  374. package/dist/projection/returnQuestion/returnQuestion.d.ts +17 -0
  375. package/dist/projection/returnQuestion/returnQuestion.js +11 -0
  376. package/dist/projection/shared/size.d.ts +10 -0
  377. package/dist/projection/shared/size.js +1 -0
  378. package/dist/projection/uiSetting/viewUiSettingByKey.d.ts +29 -0
  379. package/dist/projection/uiSetting/viewUiSettingByKey.js +8 -0
  380. package/dist/src/ExpoRoot.js +10 -2
  381. package/dist/src/domain/checkout/model/checkout.d.ts +2 -3
  382. package/dist/src/domain/checkout/model/checkout.js +0 -1
  383. package/dist/src/domain/checkoutBooking/model/checkoutBooking.d.ts +1 -5
  384. package/dist/src/domain/checkoutBooking/model/checkoutBooking.js +1 -17
  385. package/dist/src/domain/checkoutItem/command/replaceCheckoutItem.d.ts +1 -1
  386. package/dist/src/domain/checkoutItem/model/checkoutItem.d.ts +1 -1
  387. package/dist/src/domain/checkoutItem/model/checkoutItem.js +2 -2
  388. package/dist/src/infrastructure/delivery/baseBootstrap.d.ts +0 -2
  389. package/dist/src/infrastructure/delivery/baseBootstrap.js +2 -8
  390. package/dist/src/infrastructure/delivery/bootstrap.js +0 -2
  391. package/dist/src/infrastructure/delivery/mock/dataSourceCheckoutBookings.js +1 -5
  392. package/dist/src/infrastructure/delivery/mock/dataSourceCheckoutItems.js +0 -2
  393. package/dist/src/infrastructure/delivery/mock/dataSourceCheckouts.js +2 -2
  394. package/dist/src/infrastructure/domain/checkout/model/httpCheckouts.js +1 -1
  395. package/dist/src/infrastructure/domain/checkoutBooking/model/httpCheckoutBookings.js +2 -9
  396. package/dist/src/infrastructure/domain/checkoutBooking/react/useBookCheckouBookingForCheckoutItem.d.ts +13 -0
  397. package/dist/src/infrastructure/domain/checkoutBooking/react/{useBookCheckoutBookingForCheckoutItem.js → useBookCheckouBookingForCheckoutItem.js} +2 -2
  398. package/dist/src/infrastructure/domain/checkoutItem/model/httpCheckoutItems.js +1 -1
  399. package/dist/src/infrastructure/domain/checkoutItem/model/httpCheckoutItemsReplace.js +2 -2
  400. package/dist/src/infrastructure/domain/checkoutItem/react/useReplaceCheckoutItem.d.ts +1 -1
  401. package/dist/src/infrastructure/domain/checkoutItem/react/useReplaceCheckoutItem.js +2 -2
  402. package/dist/src/infrastructure/projection/bookedSizeChangeProductsVariants/httpBookedSizeChangeProductsVariantsForCheckoutItemView.js +1 -1
  403. package/dist/src/infrastructure/projection/checkout/checkout.d.ts +1 -1
  404. package/dist/src/infrastructure/projection/pricing/react/useViewPricingByCheckoutId.js +1 -9
  405. package/dist/src/infrastructure/ui/Root.d.ts +2 -0
  406. package/dist/src/infrastructure/ui/Root.js +2 -2
  407. package/dist/src/infrastructure/ui/routing/CheckoutMiddleware.js +9 -7
  408. package/dist/src/infrastructure/ui/routing/Routing.d.ts +2 -0
  409. package/dist/src/infrastructure/ui/routing/Routing.js +2 -2
  410. package/dist/src/infrastructure/ui/views/App.d.ts +2 -0
  411. package/dist/src/infrastructure/ui/views/App.js +2 -2
  412. package/dist/src/infrastructure/ui/views/header/Header.d.ts +7 -0
  413. package/dist/src/infrastructure/ui/views/header/Header.js +8 -6
  414. package/dist/src/infrastructure/ui/views/item/Item.js +25 -49
  415. package/dist/src/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.js +4 -7
  416. package/dist/src/infrastructure/ui/views/summary/components/pricing/Pricing.js +2 -2
  417. package/dist/src/projection/bookedSizeChangeProductsVariants/bookedSizeChangeProductsVariants.d.ts +1 -0
  418. package/dist/src/projection/checkout/checkout.d.ts +1 -1
  419. package/dist/src/projection/checkoutBooking/checkoutBooking.d.ts +0 -2
  420. package/dist/src/projection/checkoutItem/checkoutItem.d.ts +1 -1
  421. package/dist/src/projection/pricing/pricing.d.ts +3 -3
  422. package/package.json +1 -1
  423. package/dist/src/domain/checkoutBooking/command/blockCheckoutBooking.d.ts +0 -13
  424. package/dist/src/domain/checkoutBooking/command/blockCheckoutBooking.js +0 -4
  425. package/dist/src/domain/checkoutBooking/model/checkoutBookingBlocked.d.ts +0 -13
  426. package/dist/src/domain/checkoutBooking/model/checkoutBookingBlocked.js +0 -4
  427. package/dist/src/domain/checkoutBooking/model/checkoutBookingExpired.d.ts +0 -13
  428. package/dist/src/domain/checkoutBooking/model/checkoutBookingExpired.js +0 -4
  429. package/dist/src/infrastructure/domain/checkoutBooking/model/httpCheckoutBookingsBlock.d.ts +0 -5
  430. package/dist/src/infrastructure/domain/checkoutBooking/model/httpCheckoutBookingsBlock.js +0 -15
  431. package/dist/src/infrastructure/domain/checkoutBooking/react/useBlockCheckoutBooking.d.ts +0 -13
  432. package/dist/src/infrastructure/domain/checkoutBooking/react/useBlockCheckoutBooking.js +0 -12
  433. package/dist/src/infrastructure/domain/checkoutBooking/react/useBookCheckoutBookingForCheckoutItem.d.ts +0 -13
@@ -0,0 +1,25 @@
1
+ import { CancelableQueryViewArgs, Query, QueryHandlerFunction, QueryHandlerFunctionArgs } from "@lookiero/messaging";
2
+ import { CheckoutBookingProjection } from "./checkoutBooking";
3
+ declare const VIEW_CHECKOUT_BOOKING_BY_ID = "view_checkout_booking_by_id";
4
+ interface ViewCheckoutBookingByIdPayload {
5
+ readonly checkoutBookingId: string;
6
+ }
7
+ interface ViewCheckoutBookingById extends Query<typeof VIEW_CHECKOUT_BOOKING_BY_ID>, ViewCheckoutBookingByIdPayload {
8
+ }
9
+ interface ViewCheckoutBookingByIdFunction {
10
+ (payload: ViewCheckoutBookingByIdPayload): ViewCheckoutBookingById;
11
+ }
12
+ declare const viewCheckoutBookingById: ViewCheckoutBookingByIdFunction;
13
+ declare type ViewCheckoutBookingByIdResult = CheckoutBookingProjection | null;
14
+ interface CheckoutBookingByIdViewArgs extends CancelableQueryViewArgs {
15
+ readonly checkoutBookingId: string;
16
+ }
17
+ interface CheckoutBookingByIdView {
18
+ (args: CheckoutBookingByIdViewArgs): Promise<ViewCheckoutBookingByIdResult>;
19
+ }
20
+ interface ViewCheckoutBookingByIdHandlerFunctionArgs extends QueryHandlerFunctionArgs {
21
+ readonly view: CheckoutBookingByIdView;
22
+ }
23
+ declare const viewCheckoutBookingByIdHandler: QueryHandlerFunction<ViewCheckoutBookingById, ViewCheckoutBookingByIdResult, ViewCheckoutBookingByIdHandlerFunctionArgs>;
24
+ export type { ViewCheckoutBookingById, CheckoutBookingByIdView, ViewCheckoutBookingByIdResult };
25
+ export { VIEW_CHECKOUT_BOOKING_BY_ID, viewCheckoutBookingById, viewCheckoutBookingByIdHandler };
@@ -0,0 +1,8 @@
1
+ import { query, } from "@lookiero/messaging";
2
+ const VIEW_CHECKOUT_BOOKING_BY_ID = "view_checkout_booking_by_id";
3
+ const viewCheckoutBookingById = (payload) => ({
4
+ ...query({ name: VIEW_CHECKOUT_BOOKING_BY_ID }),
5
+ ...payload,
6
+ });
7
+ const viewCheckoutBookingByIdHandler = ({ view, signal }) => async ({ checkoutBookingId }) => view({ checkoutBookingId, signal });
8
+ export { VIEW_CHECKOUT_BOOKING_BY_ID, viewCheckoutBookingById, viewCheckoutBookingByIdHandler };
@@ -0,0 +1,53 @@
1
+ import { CheckoutItemStatus } from "../../domain/checkoutItem/model/checkoutItem";
2
+ import { Currency } from "../../domain/checkoutItem/model/currency";
3
+ import { FeedbackProjection } from "../feedback/feedback";
4
+ import { SizeProjection } from "../shared/size";
5
+ declare enum MediaPerspective {
6
+ BACK = "BACK",
7
+ BOTTOM_UP = "BOTTOM_UP",
8
+ COLLAGE = "COLLAGE",
9
+ DETAIL = "DETAIL",
10
+ FLAT_BACK = "FLAT_BACK",
11
+ FRONT = "FRONT",
12
+ FRONT_FAR = "FRONT_FAR",
13
+ LABEL = "LABEL",
14
+ MAIN = "MAIN",
15
+ MAIN_TRANSPARENT = "MAIN_TRANSPARENT",
16
+ OTHER = "OTHER",
17
+ SIDE = "SIDE"
18
+ }
19
+ interface MediaProjection {
20
+ readonly id: string;
21
+ readonly url: string;
22
+ readonly perspective: MediaPerspective;
23
+ }
24
+ interface PriceProjection {
25
+ readonly amount: number;
26
+ readonly currency: Currency;
27
+ readonly discountedPrice?: {
28
+ readonly amount: number;
29
+ readonly percentage: number;
30
+ };
31
+ }
32
+ interface ColorProjection {
33
+ readonly id: string;
34
+ readonly label: string;
35
+ }
36
+ interface CheckoutItemProductVariantProjection {
37
+ readonly id: string;
38
+ readonly media: MediaProjection[];
39
+ readonly brand: string;
40
+ readonly name: string;
41
+ readonly size: SizeProjection;
42
+ readonly color: ColorProjection;
43
+ }
44
+ interface CheckoutItemProjection {
45
+ readonly id: string;
46
+ readonly status: CheckoutItemStatus;
47
+ readonly price: PriceProjection;
48
+ readonly replacedFor?: string;
49
+ readonly productVariant: CheckoutItemProductVariantProjection;
50
+ readonly feedback: FeedbackProjection;
51
+ }
52
+ export type { CheckoutItemProjection, CheckoutItemProductVariantProjection, ColorProjection, MediaProjection, PriceProjection, };
53
+ export { Currency, MediaPerspective };
@@ -0,0 +1,17 @@
1
+ import { Currency } from "../../domain/checkoutItem/model/currency";
2
+ var MediaPerspective;
3
+ (function (MediaPerspective) {
4
+ MediaPerspective["BACK"] = "BACK";
5
+ MediaPerspective["BOTTOM_UP"] = "BOTTOM_UP";
6
+ MediaPerspective["COLLAGE"] = "COLLAGE";
7
+ MediaPerspective["DETAIL"] = "DETAIL";
8
+ MediaPerspective["FLAT_BACK"] = "FLAT_BACK";
9
+ MediaPerspective["FRONT"] = "FRONT";
10
+ MediaPerspective["FRONT_FAR"] = "FRONT_FAR";
11
+ MediaPerspective["LABEL"] = "LABEL";
12
+ MediaPerspective["MAIN"] = "MAIN";
13
+ MediaPerspective["MAIN_TRANSPARENT"] = "MAIN_TRANSPARENT";
14
+ MediaPerspective["OTHER"] = "OTHER";
15
+ MediaPerspective["SIDE"] = "SIDE";
16
+ })(MediaPerspective || (MediaPerspective = {}));
17
+ export { Currency, MediaPerspective };
@@ -0,0 +1,25 @@
1
+ import { CancelableQueryViewArgs, Query, QueryHandlerFunction, QueryHandlerFunctionArgs } from "@lookiero/messaging";
2
+ import { CheckoutItemProjection } from "./checkoutItem";
3
+ declare const VIEW_CHECKOUT_ITEM_BY_ID = "view_checkout_item_by_id";
4
+ interface ViewCheckoutItemByIdPayload {
5
+ readonly checkoutItemId: string;
6
+ }
7
+ interface ViewCheckoutItemById extends Query<typeof VIEW_CHECKOUT_ITEM_BY_ID>, ViewCheckoutItemByIdPayload {
8
+ }
9
+ interface ViewCheckoutItemByIdFunction {
10
+ (payload: ViewCheckoutItemByIdPayload): ViewCheckoutItemById;
11
+ }
12
+ declare const viewCheckoutItemById: ViewCheckoutItemByIdFunction;
13
+ declare type ViewCheckoutItemByIdResult = CheckoutItemProjection | null;
14
+ interface CheckoutItemByIdViewArgs extends CancelableQueryViewArgs {
15
+ readonly checkoutItemId: string;
16
+ }
17
+ interface CheckoutItemByIdView {
18
+ (args: CheckoutItemByIdViewArgs): Promise<ViewCheckoutItemByIdResult>;
19
+ }
20
+ interface ViewCheckoutItemByIdHandlerFunctionArgs extends QueryHandlerFunctionArgs {
21
+ readonly view: CheckoutItemByIdView;
22
+ }
23
+ declare const viewCheckoutItemByIdHandler: QueryHandlerFunction<ViewCheckoutItemById, ViewCheckoutItemByIdResult, ViewCheckoutItemByIdHandlerFunctionArgs>;
24
+ export type { ViewCheckoutItemById, CheckoutItemByIdView, ViewCheckoutItemByIdResult };
25
+ export { VIEW_CHECKOUT_ITEM_BY_ID, viewCheckoutItemById, viewCheckoutItemByIdHandler };
@@ -0,0 +1,8 @@
1
+ import { query, } from "@lookiero/messaging";
2
+ const VIEW_CHECKOUT_ITEM_BY_ID = "view_checkout_item_by_id";
3
+ const viewCheckoutItemById = (payload) => ({
4
+ ...query({ name: VIEW_CHECKOUT_ITEM_BY_ID }),
5
+ ...payload,
6
+ });
7
+ const viewCheckoutItemByIdHandler = ({ view, signal }) => async ({ checkoutItemId }) => view({ checkoutItemId, signal });
8
+ export { VIEW_CHECKOUT_ITEM_BY_ID, viewCheckoutItemById, viewCheckoutItemByIdHandler };
@@ -0,0 +1,3 @@
1
+ declare type ReturnQuestionId = string;
2
+ declare type FeedbackProjection = Record<ReturnQuestionId, ReturnQuestionId | string>;
3
+ export type { FeedbackProjection };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,25 @@
1
+ import { CancelableQueryViewArgs, Query, QueryHandlerFunction, QueryHandlerFunctionArgs } from "@lookiero/messaging";
2
+ import { ReturnQuestionProjection } from "./returnQuestion";
3
+ declare const LIST_RETURN_QUESTIONS_BY_CHECKOUT_ITEM_ID = "list_return_questions_by_checkout_item_id";
4
+ interface ListReturnQuestionsByCheckoutItemIdPayload {
5
+ readonly checkoutItemId: string;
6
+ }
7
+ interface ListReturnQuestionsByCheckoutItemId extends Query<typeof LIST_RETURN_QUESTIONS_BY_CHECKOUT_ITEM_ID>, ListReturnQuestionsByCheckoutItemIdPayload {
8
+ }
9
+ interface ListReturnQuestionsByCheckoutItemIdFunction {
10
+ (payload: ListReturnQuestionsByCheckoutItemIdPayload): ListReturnQuestionsByCheckoutItemId;
11
+ }
12
+ declare const listReturnQuestionsByCheckoutItemId: ListReturnQuestionsByCheckoutItemIdFunction;
13
+ declare type ListReturnQuestionsByCheckoutItemIdResult = ReturnQuestionProjection[] | null;
14
+ interface ReturnQuestionsByCheckoutItemIdViewArgs extends CancelableQueryViewArgs {
15
+ readonly checkoutItemId: string;
16
+ }
17
+ interface ReturnQuestionsByCheckoutItemIdView {
18
+ (args: ReturnQuestionsByCheckoutItemIdViewArgs): Promise<ListReturnQuestionsByCheckoutItemIdResult>;
19
+ }
20
+ interface ListReturnQuestionsByCheckoutItemIdHandlerFunctionArgs extends QueryHandlerFunctionArgs {
21
+ readonly view: ReturnQuestionsByCheckoutItemIdView;
22
+ }
23
+ declare const listReturnQuestionsByCheckoutItemIdHandler: QueryHandlerFunction<ListReturnQuestionsByCheckoutItemId, ListReturnQuestionsByCheckoutItemIdResult, ListReturnQuestionsByCheckoutItemIdHandlerFunctionArgs>;
24
+ export type { ListReturnQuestionsByCheckoutItemId, ReturnQuestionsByCheckoutItemIdView, ListReturnQuestionsByCheckoutItemIdResult, };
25
+ export { LIST_RETURN_QUESTIONS_BY_CHECKOUT_ITEM_ID, listReturnQuestionsByCheckoutItemId, listReturnQuestionsByCheckoutItemIdHandler, };
@@ -0,0 +1,8 @@
1
+ import { query, } from "@lookiero/messaging";
2
+ const LIST_RETURN_QUESTIONS_BY_CHECKOUT_ITEM_ID = "list_return_questions_by_checkout_item_id";
3
+ const listReturnQuestionsByCheckoutItemId = (payload) => ({
4
+ ...query({ name: LIST_RETURN_QUESTIONS_BY_CHECKOUT_ITEM_ID }),
5
+ ...payload,
6
+ });
7
+ const listReturnQuestionsByCheckoutItemIdHandler = ({ view, signal }) => async ({ checkoutItemId }) => view({ checkoutItemId, signal });
8
+ export { LIST_RETURN_QUESTIONS_BY_CHECKOUT_ITEM_ID, listReturnQuestionsByCheckoutItemId, listReturnQuestionsByCheckoutItemIdHandler, };
@@ -0,0 +1,17 @@
1
+ declare enum ReturnQuestionType {
2
+ HOST_DEFAULT = "HOST_DEFAULT",
3
+ HOST_TEXTAREA = "HOST_TEXTAREA",
4
+ HOST_SELECT = "HOST_SELECT",
5
+ HOST_STACK = "HOST_STACK",
6
+ TEXTAREA = "TEXTAREA",
7
+ OPTION = "OPTION"
8
+ }
9
+ interface ReturnQuestionProjection {
10
+ readonly id: string;
11
+ readonly name: string;
12
+ readonly placeholder: string;
13
+ readonly type: ReturnQuestionType;
14
+ readonly children?: ReturnQuestionProjection[];
15
+ }
16
+ export { ReturnQuestionType };
17
+ export type { ReturnQuestionProjection };
@@ -0,0 +1,11 @@
1
+ var ReturnQuestionType;
2
+ (function (ReturnQuestionType) {
3
+ ReturnQuestionType["HOST_DEFAULT"] = "HOST_DEFAULT";
4
+ ReturnQuestionType["HOST_TEXTAREA"] = "HOST_TEXTAREA";
5
+ ReturnQuestionType["HOST_SELECT"] = "HOST_SELECT";
6
+ ReturnQuestionType["HOST_STACK"] = "HOST_STACK";
7
+ ReturnQuestionType["TEXTAREA"] = "TEXTAREA";
8
+ ReturnQuestionType["OPTION"] = "OPTION";
9
+ // ICON = "ICON",
10
+ })(ReturnQuestionType || (ReturnQuestionType = {}));
11
+ export { ReturnQuestionType };
@@ -0,0 +1,10 @@
1
+ interface SizeProjection {
2
+ readonly id: string;
3
+ readonly lookiero: string;
4
+ readonly uk: string;
5
+ readonly it: string;
6
+ readonly europe: string;
7
+ readonly unique: boolean;
8
+ readonly visualOrder?: number;
9
+ }
10
+ export type { SizeProjection };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,29 @@
1
+ import { Query, QueryHandlerFunction, QueryHandlerFunctionArgs } from "@lookiero/messaging";
2
+ interface UiSettingProjection {
3
+ readonly id: string;
4
+ readonly key: string;
5
+ readonly value: unknown;
6
+ }
7
+ declare const VIEW_UI_SETTING_BY_KEY = "view_ui_setting_by_key";
8
+ interface ViewUiSettingByKeyPayload {
9
+ readonly key: string;
10
+ }
11
+ interface ViewUiSettingByKey extends Query<typeof VIEW_UI_SETTING_BY_KEY>, ViewUiSettingByKeyPayload {
12
+ }
13
+ interface ViewUiSettingByKeyFunction {
14
+ (payload: ViewUiSettingByKeyPayload): ViewUiSettingByKey;
15
+ }
16
+ declare const viewUiSettingByKey: ViewUiSettingByKeyFunction;
17
+ declare type ViewUiSettingByKeyResult = UiSettingProjection | null;
18
+ interface UiSettingByKeyViewArgs {
19
+ readonly key: string;
20
+ }
21
+ interface UiSettingByKeyView {
22
+ (args: UiSettingByKeyViewArgs): Promise<ViewUiSettingByKeyResult>;
23
+ }
24
+ interface ViewUiSettingByKeyHandlerFunctionArgs extends QueryHandlerFunctionArgs {
25
+ readonly view: UiSettingByKeyView;
26
+ }
27
+ declare const viewUiSettingByKeyHandler: QueryHandlerFunction<ViewUiSettingByKey, ViewUiSettingByKeyResult, ViewUiSettingByKeyHandlerFunctionArgs>;
28
+ export type { UiSettingProjection, UiSettingByKeyView };
29
+ export { VIEW_UI_SETTING_BY_KEY, viewUiSettingByKey, viewUiSettingByKeyHandler };
@@ -0,0 +1,8 @@
1
+ import { query } from "@lookiero/messaging";
2
+ const VIEW_UI_SETTING_BY_KEY = "view_ui_setting_by_key";
3
+ const viewUiSettingByKey = (payload) => ({
4
+ ...query({ name: VIEW_UI_SETTING_BY_KEY }),
5
+ ...payload,
6
+ });
7
+ const viewUiSettingByKeyHandler = ({ view }) => async ({ key }) => view({ key });
8
+ export { VIEW_UI_SETTING_BY_KEY, viewUiSettingByKey, viewUiSettingByKeyHandler };
@@ -1,12 +1,14 @@
1
+ import { Panel } from "@lookiero/aurora-next/build/components/molecules/Panel/Panel";
1
2
  import { Aurora } from "@lookiero/aurora-next/build/components/primitives/Aurora/Aurora";
2
3
  import { Text } from "@lookiero/aurora-next/build/components/primitives/Text/Text";
4
+ import { ALIGN } from "@lookiero/aurora-next/build/hooks/useStyler/styler.definition";
3
5
  import { fetchFetchTranslation } from "@lookiero/i18n";
4
6
  import { i18n } from "@lookiero/i18n-react";
5
7
  import { setPaymentsBridge } from "@lookiero/payments-front";
6
8
  import { useFonts } from "expo-font";
7
9
  import "expo/build/Expo.fx";
8
10
  import React, { useCallback, useState } from "react";
9
- import { Platform, StatusBar } from "react-native";
11
+ import { Platform, StatusBar, View } from "react-native";
10
12
  import "react-native-get-random-values";
11
13
  import { version } from "../package.json";
12
14
  // import { bootstrap as checkoutMockBootstrap } from "./infrastructure/delivery/bootstrap.mock";
@@ -14,6 +16,7 @@ import { bootstrap as checkoutBootstrap } from "./infrastructure/delivery/bootst
14
16
  import { root } from "./infrastructure/ui/Root";
15
17
  import { Router } from "./infrastructure/ui/routing/router/Router";
16
18
  import { notificationsRoot } from "./shared/notifications";
19
+ import { ButtonIcon } from "./shared/ui/components/molecules/buttonIcon/ButtonIcon";
17
20
  const apiUrl = Platform.OS !== "web" ? "https://web2.ps.dev.aws.lookiero.es/checkout/api" : __DEV__ ? "/local-to-dev" : "/api";
18
21
  const authToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjIwOTUxNjAsImV4cCI6MTY3MjI5OTg4MSwiZGlzcGxheU5hbWUiOiJBbGV4YW5kZXIiLCJjb3VudHJ5X2NvZGUiOiJFUyIsImFjY2Vzc1ZpYSI6ImVtYWlsIiwic3Vic2NyaXB0aW9uU3RhcnRpbmdEYXRlIjoiMjAyMC0wOS0wMSIsImltcGVyc29uYXRlZCI6ZmFsc2UsInV1aWQiOiJjZjdjNjQxZi0wZTVjLTQ4NTAtYWUwNy0yNzY3NDdlZGZkMGIiLCJpYXQiOjE2Njk3MDc4ODF9.-nGGMNmMlsq-PsupefyjxH0Z3td7ybM9TpnUV_VIYSg";
19
22
  const translationsUrl = Platform.OS !== "web" ? "https://web2.ps.dev.aws.lookiero.es/checkout/i18n" : __DEV__ ? "/local-to-i18n" : "/i18n";
@@ -22,6 +25,11 @@ const translations = (locale) => `${translationsUrl}/${locale}?key=${translation
22
25
  const useRedirect = () => ({
23
26
  returnUrl: "https://web2.dev.aws.lookiero.es/user/",
24
27
  });
28
+ // eslint-disable-next-line react/prop-types
29
+ const DummyMenu = ({ visible, onClose }) => (React.createElement(Panel, { align: ALIGN.RIGHT, isVisible: visible, onClose: onClose },
30
+ React.createElement(View, { style: { flexDirection: "row", justifyContent: "space-between" } },
31
+ React.createElement(Text, null, "Menu component"),
32
+ React.createElement(ButtonIcon, { name: "close", onPress: onClose }))));
25
33
  setPaymentsBridge({
26
34
  getToken: () => Promise.resolve(authToken),
27
35
  stripeKey: "pk_test_6dwdUfkUm7AaUH3oSje9H0kk",
@@ -91,7 +99,7 @@ const ExpoRoot = () => {
91
99
  React.createElement(Aurora, { useStack: false },
92
100
  isAccessible === false && React.createElement(Text, { heading: true }, "Checkout is not accessible!"),
93
101
  React.createElement(Router, null,
94
- React.createElement(Root, { basePath: "", customerId: "cf7c641f-0e5c-4850-ae07-276747edfd0b", locale: "es", useRedirect: useRedirect, onNotAccessible: onNotAccessible }))),
102
+ React.createElement(Root, { basePath: "", customerId: "cf7c641f-0e5c-4850-ae07-276747edfd0b", locale: "es", menu: DummyMenu, useRedirect: useRedirect, onNotAccessible: onNotAccessible }))),
95
103
  React.createElement(StatusBar, null))) : null;
96
104
  };
97
105
  export { ExpoRoot };
@@ -6,14 +6,13 @@ declare enum CheckoutStatus {
6
6
  NOTIFIED = "NOTIFIED",
7
7
  STARTED = "STARTED",
8
8
  COMPLETED = "COMPLETED",
9
- PAID = "PAID",
10
- EXPIRED = "EXPIRED"
9
+ PAID = "PAID"
11
10
  }
12
11
  interface Checkout extends AggregateRoot {
13
12
  readonly status: CheckoutStatus;
14
13
  readonly customerId: string;
15
14
  readonly boxId: string;
16
- readonly checkoutBookingId: string;
15
+ readonly bookingId: string;
17
16
  readonly expiresOn: Date;
18
17
  }
19
18
  declare const startCheckoutHandler: CommandHandlerFunction<StartCheckout, Checkout>;
@@ -8,7 +8,6 @@ var CheckoutStatus;
8
8
  CheckoutStatus["STARTED"] = "STARTED";
9
9
  CheckoutStatus["COMPLETED"] = "COMPLETED";
10
10
  CheckoutStatus["PAID"] = "PAID";
11
- CheckoutStatus["EXPIRED"] = "EXPIRED";
12
11
  })(CheckoutStatus || (CheckoutStatus = {}));
13
12
  const startCheckoutHandler = () => async ({ aggregateRoot, command }) => {
14
13
  const { aggregateId } = command;
@@ -1,12 +1,8 @@
1
1
  import { AggregateRoot, CommandHandlerFunction } from "@lookiero/messaging";
2
- import { CheckoutStatus } from "../../checkout/model/checkout";
3
- import { BlockCheckoutBooking } from "../command/blockCheckoutBooking";
4
2
  import { BookCheckoutBookingForCheckoutItem } from "../command/bookCheckoutBookingForCheckoutItem";
5
3
  interface CheckoutBooking extends AggregateRoot {
6
4
  readonly checkoutItemIds: string[];
7
- readonly checkoutStatus: CheckoutStatus;
8
5
  }
9
6
  declare const bookCheckoutBookingForCheckoutItemHandler: CommandHandlerFunction<BookCheckoutBookingForCheckoutItem, CheckoutBooking>;
10
- declare const blockCheckoutBookingHandler: CommandHandlerFunction<BlockCheckoutBooking, CheckoutBooking>;
11
7
  export type { CheckoutBooking };
12
- export { bookCheckoutBookingForCheckoutItemHandler, blockCheckoutBookingHandler };
8
+ export { bookCheckoutBookingForCheckoutItemHandler };
@@ -1,7 +1,4 @@
1
- import { CheckoutStatus } from "../../checkout/model/checkout";
2
- import { checkoutBookingBlocked } from "./checkoutBookingBlocked";
3
1
  import { checkoutBookingBooked } from "./checkoutBookingBooked";
4
- import { checkoutBookingExpired } from "./checkoutBookingExpired";
5
2
  const bookCheckoutBookingForCheckoutItemHandler = () => async ({ aggregateRoot, command }) => {
6
3
  const { aggregateId, checkoutItemId } = command;
7
4
  return {
@@ -9,17 +6,4 @@ const bookCheckoutBookingForCheckoutItemHandler = () => async ({ aggregateRoot,
9
6
  domainEvents: [checkoutBookingBooked({ aggregateId, checkoutItemId })],
10
7
  };
11
8
  };
12
- const blockCheckoutBookingHandler = () => async ({ aggregateRoot, command }) => {
13
- const { aggregateId } = command;
14
- if (aggregateRoot.checkoutStatus === CheckoutStatus.EXPIRED) {
15
- return {
16
- ...aggregateRoot,
17
- domainEvents: [checkoutBookingExpired({ aggregateId })],
18
- };
19
- }
20
- return {
21
- ...aggregateRoot,
22
- domainEvents: [checkoutBookingBlocked({ aggregateId })],
23
- };
24
- };
25
- export { bookCheckoutBookingForCheckoutItemHandler, blockCheckoutBookingHandler };
9
+ export { bookCheckoutBookingForCheckoutItemHandler };
@@ -2,7 +2,7 @@ import { Command } from "@lookiero/messaging";
2
2
  declare const REPLACE_CHECKOUT_ITEM = "replace_checkout_item";
3
3
  interface ReplaceCheckoutItemPayload {
4
4
  readonly aggregateId: string;
5
- readonly replacedForId: string;
5
+ readonly replacedFor: string;
6
6
  }
7
7
  interface ReplaceCheckoutItem extends Command<typeof REPLACE_CHECKOUT_ITEM>, ReplaceCheckoutItemPayload {
8
8
  }
@@ -15,7 +15,7 @@ interface CheckoutItem extends AggregateRoot {
15
15
  readonly status: CheckoutItemStatus;
16
16
  readonly price: Price;
17
17
  readonly feedbacks: Feedbacks;
18
- readonly replacedForId?: string;
18
+ readonly replacedFor?: string;
19
19
  }
20
20
  declare const keepCheckoutItemHandler: CommandHandlerFunction<KeepCheckoutItem, CheckoutItem>;
21
21
  declare const returnCheckoutItemHandler: CommandHandlerFunction<ReturnCheckoutItem, CheckoutItem>;
@@ -29,10 +29,10 @@ const returnCheckoutItemHandler = () => async ({ aggregateRoot, command }) => {
29
29
  };
30
30
  };
31
31
  const replaceCheckoutItemHandler = () => async ({ aggregateRoot, command }) => {
32
- const { aggregateId, replacedForId } = command;
32
+ const { aggregateId, replacedFor } = command;
33
33
  return {
34
34
  ...aggregateRoot,
35
- replacedForId,
35
+ replacedFor,
36
36
  status: CheckoutItemStatus.REPLACED,
37
37
  domainEvents: [checkoutItemReplaced({ aggregateId })],
38
38
  };
@@ -15,7 +15,6 @@ import { CheckoutByIdView } from "../../projection/checkout/viewCheckoutById";
15
15
  import { FirstAvailableCheckoutByCustomerIdView } from "../../projection/checkout/viewFirstAvailableCheckoutByCustomerId";
16
16
  import { FiveItemsDiscountByCustomerIdView } from "../../projection/checkout/viewFiveItemsDiscountByCustomerId";
17
17
  import { IsCheckoutEnabledByCustomerIdView } from "../../projection/checkout/viewIsCheckoutEnabledByCustomerId";
18
- import { CheckoutBookingByIdView } from "../../projection/checkoutBooking/viewCheckoutBookingById";
19
18
  import { CheckoutItemByIdView } from "../../projection/checkoutItem/viewCheckoutItemById";
20
19
  import { CheckoutQuestionsByCheckoutIdView } from "../../projection/checkoutQuestion/listCheckoutQuestionsByCheckoutId";
21
20
  import { PaymentFlowPayloadByCheckoutIdView } from "../../projection/payment/viewPaymentFlowPayloadByCheckoutId";
@@ -32,7 +31,6 @@ interface BaseBootstrapFunctionArgs<UiSettingGetFunctionArgs extends RepositoryG
32
31
  readonly fiveItemsDiscountByCustomerIdView: FiveItemsDiscountByCustomerIdView;
33
32
  readonly uiSettingByKeyView: UiSettingByKeyView;
34
33
  readonly checkoutItemByIdView: CheckoutItemByIdView;
35
- readonly checkoutBookingByIdView: CheckoutBookingByIdView;
36
34
  readonly returnQuestionsByCheckoutItemIdView: ReturnQuestionsByCheckoutItemIdView;
37
35
  readonly bookedSizeChangeProductsVariantsForCheckoutItemView: BookedSizeChangeProductsVariantsForCheckoutItemView;
38
36
  readonly pricingByCheckoutIdView: PricingByCheckoutIdView;
@@ -2,9 +2,8 @@ import { bootstrap as messagingBootstrap } from "@lookiero/messaging-react";
2
2
  import { MARK_CHECKOUT_AS_PAID } from "../../domain/checkout/command/markCheckoutAsPaid";
3
3
  import { START_CHECKOUT } from "../../domain/checkout/command/startCheckout";
4
4
  import { markCheckoutAsPaidHandler, startCheckoutHandler } from "../../domain/checkout/model/checkout";
5
- import { BLOCK_CHECKOUT_BOOKING } from "../../domain/checkoutBooking/command/blockCheckoutBooking";
6
5
  import { BOOK_CHECKOUT_BOOKING_FOR_CHECKOUT_ITEM } from "../../domain/checkoutBooking/command/bookCheckoutBookingForCheckoutItem";
7
- import { blockCheckoutBookingHandler, bookCheckoutBookingForCheckoutItemHandler, } from "../../domain/checkoutBooking/model/checkoutBooking";
6
+ import { bookCheckoutBookingForCheckoutItemHandler, } from "../../domain/checkoutBooking/model/checkoutBooking";
8
7
  import { GIVE_CHECKOUT_FEEDBACK } from "../../domain/checkoutFeedback/command/giveCheckoutFeedback";
9
8
  import { giveCheckoutFeedbackHandler } from "../../domain/checkoutFeedback/model/checkoutFeedback";
10
9
  import { KEEP_CHECKOUT_ITEM } from "../../domain/checkoutItem/command/keepCheckoutItem";
@@ -19,7 +18,6 @@ import { viewFirstAvailableCheckoutByCustomerIdHandler, VIEW_FIRST_AVAILABLE_CHE
19
18
  import { viewFiveItemsDiscountByCustomerIdHandler, VIEW_FIVE_ITEMS_DISCOUNT_BY_CUSTOMER_ID, } from "../../projection/checkout/viewFiveItemsDiscountByCustomerId";
20
19
  import { viewIsCheckoutAccessibleByCustomerIdHandler, VIEW_IS_CHECKOUT_ACCESSIBLE_BY_CUSTOMER_ID, } from "../../projection/checkout/viewIsCheckoutAccessibleByCustomerId";
21
20
  import { viewIsCheckoutEnabledByCustomerIdHandler, VIEW_IS_CHECKOUT_ENABLED_BY_CUSTOMER_ID, } from "../../projection/checkout/viewIsCheckoutEnabledByCustomerId";
22
- import { viewCheckoutBookingByIdHandler, VIEW_CHECKOUT_BOOKING_BY_ID, } from "../../projection/checkoutBooking/viewCheckoutBookingById";
23
21
  import { viewCheckoutItemByIdHandler, VIEW_CHECKOUT_ITEM_BY_ID, } from "../../projection/checkoutItem/viewCheckoutItemById";
24
22
  import { listCheckoutQuestionsByCheckoutIdHandler, LIST_CHECKOUT_QUESTIONS_BY_CHECKOUT_ID, } from "../../projection/checkoutQuestion/listCheckoutQuestionsByCheckoutId";
25
23
  import { viewPaymentFlowPayloadByCheckoutIdHandler, VIEW_PAYMENT_FLOW_PAYLOAD_BY_CHECKOUT_ID, } from "../../projection/payment/viewPaymentFlowPayloadByCheckoutId";
@@ -27,7 +25,7 @@ import { viewPricingByCheckoutIdHandler, VIEW_PRICING_BY_CHECKOUT_ID, } from "..
27
25
  import { listReturnQuestionsByCheckoutItemIdHandler, LIST_RETURN_QUESTIONS_BY_CHECKOUT_ITEM_ID, } from "../../projection/returnQuestion/listReturnQuestionsByCheckoutItemId";
28
26
  import { viewUiSettingByKeyHandler, VIEW_UI_SETTING_BY_KEY, } from "../../projection/uiSetting/viewUiSettingByKey";
29
27
  const MESSAGING_CONTEXT_ID = "Checkout";
30
- const baseBootstrap = ({ checkoutByIdView, firstAvailableCheckoutByCustomerIdView, isCheckoutEnabledByCustomerIdView, fiveItemsDiscountByCustomerIdView, uiSettingByKeyView, checkoutItemByIdView, returnQuestionsByCheckoutItemIdView, bookedSizeChangeProductsVariantsForCheckoutItemView, checkoutBookingByIdView, pricingByCheckoutIdView, paymentFlowPayloadByCheckoutIdView, checkoutQuestionsByCheckoutIdView, getUiSetting, saveUiSetting, uiSettingsDependencies, getCheckout, saveCheckout, checkoutsDependencies, getCheckoutItem, saveCheckoutItem, checkoutItemsDependencies, getCheckoutBooking, saveCheckoutBooking, checkoutBookingsDependencies, getCheckoutFeedback, saveCheckoutFeedback, checkoutFeedbacksDependencies, }) => messagingBootstrap({ id: MESSAGING_CONTEXT_ID })
28
+ const baseBootstrap = ({ checkoutByIdView, firstAvailableCheckoutByCustomerIdView, isCheckoutEnabledByCustomerIdView, fiveItemsDiscountByCustomerIdView, uiSettingByKeyView, checkoutItemByIdView, returnQuestionsByCheckoutItemIdView, bookedSizeChangeProductsVariantsForCheckoutItemView, pricingByCheckoutIdView, paymentFlowPayloadByCheckoutIdView, checkoutQuestionsByCheckoutIdView, getUiSetting, saveUiSetting, uiSettingsDependencies, getCheckout, saveCheckout, checkoutsDependencies, getCheckoutItem, saveCheckoutItem, checkoutItemsDependencies, getCheckoutBooking, saveCheckoutBooking, checkoutBookingsDependencies, getCheckoutFeedback, saveCheckoutFeedback, checkoutFeedbacksDependencies, }) => messagingBootstrap({ id: MESSAGING_CONTEXT_ID })
31
29
  .query(VIEW_FIVE_ITEMS_DISCOUNT_BY_CUSTOMER_ID, viewFiveItemsDiscountByCustomerIdHandler, {
32
30
  view: fiveItemsDiscountByCustomerIdView,
33
31
  })
@@ -60,15 +58,11 @@ const baseBootstrap = ({ checkoutByIdView, firstAvailableCheckoutByCustomerIdVie
60
58
  })
61
59
  .query(LIST_CHECKOUT_QUESTIONS_BY_CHECKOUT_ID, listCheckoutQuestionsByCheckoutIdHandler, {
62
60
  view: checkoutQuestionsByCheckoutIdView,
63
- })
64
- .query(VIEW_CHECKOUT_BOOKING_BY_ID, viewCheckoutBookingByIdHandler, {
65
- view: checkoutBookingByIdView,
66
61
  })
67
62
  .query(VIEW_BOOKED_SIZE_CHANGE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM, viewBookedSizeChangeProductsVariantsForCheckoutItemHandler, {
68
63
  view: bookedSizeChangeProductsVariantsForCheckoutItemView,
69
64
  })
70
65
  .command(BOOK_CHECKOUT_BOOKING_FOR_CHECKOUT_ITEM, bookCheckoutBookingForCheckoutItemHandler)(getCheckoutBooking, saveCheckoutBooking, ...checkoutBookingsDependencies)
71
- .command(BLOCK_CHECKOUT_BOOKING, blockCheckoutBookingHandler)(getCheckoutBooking, saveCheckoutBooking, ...checkoutBookingsDependencies)
72
66
  .command(GIVE_CHECKOUT_FEEDBACK, giveCheckoutFeedbackHandler)(getCheckoutFeedback, saveCheckoutFeedback, ...checkoutFeedbacksDependencies)
73
67
  .query(VIEW_UI_SETTING_BY_KEY, viewUiSettingByKeyHandler, {
74
68
  view: uiSettingByKeyView,
@@ -9,7 +9,6 @@ import { httpCheckoutByIdView } from "../projection/checkout/httpCheckoutByIdVie
9
9
  import { httpFirstAvailableCheckoutByCustomerIdView } from "../projection/checkout/httpFirstAvailableCheckoutByCustomerIdView";
10
10
  import { httpFiveItemsDiscountByCustomerIdView } from "../projection/checkout/httpFiveItemsDiscountByCustomerIdView";
11
11
  import { httpIsCheckoutEnabledByCustomerIdView } from "../projection/checkout/httpIsCheckoutEnabledByCustomerIdView";
12
- import { httpCheckoutBookingByIdView } from "../projection/checkoutBooking/httpCheckoutBookingByIdView";
13
12
  import { httpCheckoutItemByIdView } from "../projection/checkoutItem/httpCheckoutItemByIdView";
14
13
  import { httpCheckoutQuestionsByCheckoutIdView } from "../projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView";
15
14
  import { httpPaymentFlowPayloadByCheckoutIdView } from "../projection/payment/httpPaymentFlowPayloadByCheckoutIdView";
@@ -29,7 +28,6 @@ const bootstrap = ({ apiUrl, authToken }) => {
29
28
  uiSettingByKeyView: storageUiSettingByKeyView({ read }),
30
29
  checkoutItemByIdView: httpCheckoutItemByIdView({ httpPost }),
31
30
  returnQuestionsByCheckoutItemIdView: httpReturnQuestionsByCheckoutItemIdView({ httpPost }),
32
- checkoutBookingByIdView: httpCheckoutBookingByIdView({ httpPost }),
33
31
  bookedSizeChangeProductsVariantsForCheckoutItemView: httpBookedSizeChangeProductsVariantsForCheckoutItemView({
34
32
  httpPost,
35
33
  }),
@@ -1,20 +1,16 @@
1
1
  import invariant from "tiny-invariant";
2
- import { v4 as uuid } from "uuid";
3
- import { CheckoutStatus } from "../../../domain/checkout/model/checkout";
4
2
  import { viewBookedSizeChangeProductsVariantsForCheckoutItem, } from "../../../projection/bookedSizeChangeProductsVariants/viewBookedSizeChangeProductVariantsForCheckoutItem";
5
3
  const toCheckoutBookingDomain = (checkoutBooking) => {
6
4
  invariant(checkoutBooking, "No checkoutBooking found!");
7
5
  return {
8
- aggregateId: uuid(),
6
+ aggregateId: checkoutBooking.bookingId,
9
7
  checkoutItemIds: checkoutBooking.productVariants.map((productVariant) => productVariant.id),
10
- checkoutStatus: CheckoutStatus.AVAILABLE,
11
8
  domainEvents: [],
12
9
  };
13
10
  };
14
11
  const toCheckoutBookingProjection = (checkoutBooking) => ({
15
12
  id: checkoutBooking.aggregateId,
16
13
  checkoutItemIds: checkoutBooking.checkoutItemIds,
17
- checkoutStatus: checkoutBooking.checkoutStatus,
18
14
  });
19
15
  const getCheckoutBooking = ({ queryBus }) => async (aggregateId) => toCheckoutBookingDomain(await queryBus(viewBookedSizeChangeProductsVariantsForCheckoutItem({ checkoutItemId: aggregateId })));
20
16
  const saveCheckoutBooking = ({ dataSource }) => async (aggregateRoot) => {
@@ -5,7 +5,6 @@ const toCheckoutItemProjection = (checkoutItem) => ({
5
5
  status: checkoutItem.status,
6
6
  productVariant: {},
7
7
  feedbacks: {},
8
- replacedFor: null,
9
8
  price: checkoutItem.price,
10
9
  });
11
10
  const toCheckoutItemDomain = (checkoutItem) => {
@@ -16,7 +15,6 @@ const toCheckoutItemDomain = (checkoutItem) => {
16
15
  status: checkoutItem.status,
17
16
  price: checkoutItem.price,
18
17
  feedbacks: checkoutItem.feedbacks,
19
- replacedForId: checkoutItem.replacedFor?.id,
20
18
  domainEvents: [],
21
19
  };
22
20
  };
@@ -7,7 +7,7 @@ const toCheckoutDomain = (checkout) => {
7
7
  status: checkout.status,
8
8
  customerId: checkout.customerId,
9
9
  boxId: checkout.boxId,
10
- checkoutBookingId: checkout.checkoutBookingId,
10
+ bookingId: checkout.bookingId,
11
11
  expiresOn: checkout.expiresOn,
12
12
  aggregateId: checkout.id,
13
13
  domainEvents: [],
@@ -18,7 +18,7 @@ const toCheckoutProjection = (checkout) => ({
18
18
  status: checkout.status,
19
19
  customerId: checkout.customerId,
20
20
  boxId: checkout.boxId,
21
- checkoutBookingId: checkout.checkoutBookingId,
21
+ bookingId: checkout.bookingId,
22
22
  expiresOn: checkout.expiresOn,
23
23
  items: [],
24
24
  });
@@ -9,7 +9,7 @@ const toDomain = (checkout) => {
9
9
  status: checkout.status,
10
10
  customerId: checkout.customerId,
11
11
  boxId: checkout.boxId,
12
- checkoutBookingId: checkout.checkoutBookingId,
12
+ bookingId: checkout.bookingId,
13
13
  expiresOn: checkout.expiresOn,
14
14
  aggregateId: checkout.id,
15
15
  domainEvents: [],
@@ -1,21 +1,14 @@
1
1
  import invariant from "tiny-invariant";
2
2
  import { viewCheckoutBookingById, } from "../../../../projection/checkoutBooking/viewCheckoutBookingById";
3
- import { httpCheckoutBookingsBlock } from "./httpCheckoutBookingsBlock";
4
3
  import { httpCheckoutBookingsBook } from "./httpCheckoutBookingsBook";
5
4
  const toDomain = (checkoutBooking) => {
6
5
  invariant(checkoutBooking, "No checkout booking found!");
7
6
  return {
8
- aggregateId: checkoutBooking.id,
9
7
  checkoutItemIds: checkoutBooking.checkoutItemIds,
10
- checkoutStatus: checkoutBooking.checkoutStatus,
8
+ aggregateId: checkoutBooking.id,
11
9
  domainEvents: [],
12
10
  };
13
11
  };
14
12
  const getCheckoutBooking = ({ queryBus }) => async (aggregateId) => toDomain(await queryBus(viewCheckoutBookingById({ checkoutBookingId: aggregateId })));
15
- const saveCheckoutBooking = ({ httpPost }) => async (aggregateRoot) => {
16
- await Promise.all([
17
- httpCheckoutBookingsBook({ httpPost })(aggregateRoot),
18
- httpCheckoutBookingsBlock({ httpPost })(aggregateRoot),
19
- ]);
20
- };
13
+ const saveCheckoutBooking = ({ httpPost }) => async (aggregateRoot) => await httpCheckoutBookingsBook({ httpPost })(aggregateRoot);
21
14
  export { getCheckoutBooking, saveCheckoutBooking };
@@ -0,0 +1,13 @@
1
+ import { CommandStatus } from "@lookiero/messaging-react";
2
+ interface BookFunction {
3
+ (): Promise<void>;
4
+ }
5
+ type UseBookCheckouBookingForCheckoutItem = [book: BookFunction, status: CommandStatus];
6
+ interface UseBookCheckouBookingForCheckoutItemFunctionArgs {
7
+ readonly checkoutItemId: string;
8
+ }
9
+ interface UseBookCheckouBookingForCheckoutItemFunction {
10
+ (args: UseBookCheckouBookingForCheckoutItemFunctionArgs): UseBookCheckouBookingForCheckoutItem;
11
+ }
12
+ declare const useBookCheckouBookingForCheckoutItem: UseBookCheckouBookingForCheckoutItemFunction;
13
+ export { useBookCheckouBookingForCheckoutItem };