@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,13 @@
1
+ import { Command } from "@lookiero/messaging";
2
+ declare const START_CHECKOUT = "start_checkout";
3
+ interface StartCheckoutPayload {
4
+ readonly aggregateId: string;
5
+ }
6
+ interface StartCheckout extends Command<typeof START_CHECKOUT>, StartCheckoutPayload {
7
+ }
8
+ interface StartCheckoutFunction {
9
+ (payload: StartCheckoutPayload): StartCheckout;
10
+ }
11
+ declare const startCheckout: StartCheckoutFunction;
12
+ export type { StartCheckout };
13
+ export { START_CHECKOUT, startCheckout };
@@ -0,0 +1,4 @@
1
+ import { command } from "@lookiero/messaging";
2
+ const START_CHECKOUT = "start_checkout";
3
+ const startCheckout = ({ aggregateId }) => command({ aggregateId, name: START_CHECKOUT });
4
+ export { START_CHECKOUT, startCheckout };
@@ -0,0 +1,18 @@
1
+ import { AggregateRoot, CommandHandlerFunction } from "@lookiero/messaging";
2
+ import { StartCheckout } from "../command/startCheckout";
3
+ declare enum CheckoutStatus {
4
+ AVAILABLE = "AVAILABLE",
5
+ NOTIFIED = "NOTIFIED",
6
+ STARTED = "STARTED",
7
+ COMPLETED = "COMPLETED"
8
+ }
9
+ interface Checkout extends AggregateRoot {
10
+ readonly status: CheckoutStatus;
11
+ readonly customerId: string;
12
+ readonly boxId: string;
13
+ readonly bookingId: string;
14
+ readonly expiresOn: Date;
15
+ }
16
+ declare const startCheckoutHandler: CommandHandlerFunction<StartCheckout, Checkout>;
17
+ export type { Checkout };
18
+ export { CheckoutStatus, startCheckoutHandler };
@@ -0,0 +1,20 @@
1
+ import invariant from "tiny-invariant";
2
+ import { checkoutStarted } from "./checkoutStarted";
3
+ var CheckoutStatus;
4
+ (function (CheckoutStatus) {
5
+ CheckoutStatus["AVAILABLE"] = "AVAILABLE";
6
+ CheckoutStatus["NOTIFIED"] = "NOTIFIED";
7
+ CheckoutStatus["STARTED"] = "STARTED";
8
+ CheckoutStatus["COMPLETED"] = "COMPLETED";
9
+ })(CheckoutStatus || (CheckoutStatus = {}));
10
+ const startCheckoutHandler = () => async ({ aggregateRoot, command }) => {
11
+ const { aggregateId } = command;
12
+ invariant(aggregateRoot.status !== CheckoutStatus.STARTED, "Checkout is already started");
13
+ invariant(aggregateRoot.status !== CheckoutStatus.COMPLETED, "Checkout is already completed");
14
+ return {
15
+ ...aggregateRoot,
16
+ status: CheckoutStatus.STARTED,
17
+ domainEvents: [checkoutStarted({ aggregateId })],
18
+ };
19
+ };
20
+ export { CheckoutStatus, startCheckoutHandler };
@@ -0,0 +1,13 @@
1
+ import { DomainEvent } from "@lookiero/messaging";
2
+ declare const CHECKOUT_STARTED = "checkout_started";
3
+ interface CheckoutStartedPayload {
4
+ readonly aggregateId: string;
5
+ }
6
+ interface CheckoutStarted extends DomainEvent<typeof CHECKOUT_STARTED>, CheckoutStartedPayload {
7
+ }
8
+ interface CheckoutStartedFunction {
9
+ (payload: CheckoutStartedPayload): CheckoutStarted;
10
+ }
11
+ declare const checkoutStarted: CheckoutStartedFunction;
12
+ export type { CheckoutStarted };
13
+ export { CHECKOUT_STARTED, checkoutStarted };
@@ -0,0 +1,4 @@
1
+ import { domainEvent } from "@lookiero/messaging";
2
+ const CHECKOUT_STARTED = "checkout_started";
3
+ const checkoutStarted = ({ aggregateId }) => domainEvent({ aggregateId, name: CHECKOUT_STARTED });
4
+ export { CHECKOUT_STARTED, checkoutStarted };
@@ -0,0 +1,7 @@
1
+ import { RepositoryGetFunction, RepositoryGetFunctionArgs, RepositorySaveFunction, RepositorySaveFunctionArgs } from "@lookiero/messaging";
2
+ import { Checkout } from "./checkout";
3
+ interface CheckoutsGetFunction<CheckoutsGetFunctionArgs extends RepositoryGetFunctionArgs> extends RepositoryGetFunction<Checkout, CheckoutsGetFunctionArgs> {
4
+ }
5
+ interface CheckoutsSaveFunction<CheckoutsSaveFunctionArgs extends RepositorySaveFunctionArgs> extends RepositorySaveFunction<Checkout, CheckoutsSaveFunctionArgs> {
6
+ }
7
+ export type { CheckoutsGetFunction, CheckoutsSaveFunction };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,15 @@
1
+ import { Command } from "@lookiero/messaging";
2
+ declare const BOOK_CHECKOUT_BOOKING_FOR_CHECKOUT_ITEM = "book_checkout_booking_for_checkout_item";
3
+ interface BookCheckoutBookingForCheckoutItemPayload {
4
+ readonly aggregateId: string;
5
+ readonly checkoutId: string;
6
+ readonly checkoutItemId: string;
7
+ }
8
+ interface BookCheckoutBookingForCheckoutItem extends Command<typeof BOOK_CHECKOUT_BOOKING_FOR_CHECKOUT_ITEM>, BookCheckoutBookingForCheckoutItemPayload {
9
+ }
10
+ interface BookCheckoutBookingForCheckoutItemFunction {
11
+ (payload: BookCheckoutBookingForCheckoutItemPayload): BookCheckoutBookingForCheckoutItem;
12
+ }
13
+ declare const bookCheckoutBookingForCheckoutItem: BookCheckoutBookingForCheckoutItemFunction;
14
+ export type { BookCheckoutBookingForCheckoutItem };
15
+ export { BOOK_CHECKOUT_BOOKING_FOR_CHECKOUT_ITEM, bookCheckoutBookingForCheckoutItem };
@@ -0,0 +1,7 @@
1
+ import { command } from "@lookiero/messaging";
2
+ const BOOK_CHECKOUT_BOOKING_FOR_CHECKOUT_ITEM = "book_checkout_booking_for_checkout_item";
3
+ const bookCheckoutBookingForCheckoutItem = ({ aggregateId, ...payload }) => ({
4
+ ...command({ aggregateId, name: BOOK_CHECKOUT_BOOKING_FOR_CHECKOUT_ITEM }),
5
+ ...payload,
6
+ });
7
+ export { BOOK_CHECKOUT_BOOKING_FOR_CHECKOUT_ITEM, bookCheckoutBookingForCheckoutItem };
@@ -0,0 +1,15 @@
1
+ import { Command } from "@lookiero/messaging";
2
+ declare const BOOK_SIZE_REPLACEABLE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM = "book_size_replaceable_product_variants_for_checkout_item";
3
+ interface BookSizeReplaceableProductVariantsForCheckoutItemPayload {
4
+ readonly aggregateId: string;
5
+ readonly checkoutId: string;
6
+ readonly checkoutItemId: string;
7
+ }
8
+ interface BookSizeReplaceableProductVariantsForCheckoutItem extends Command<typeof BOOK_SIZE_REPLACEABLE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM>, BookSizeReplaceableProductVariantsForCheckoutItemPayload {
9
+ }
10
+ interface BookSizeReplaceableProductVariantsForCheckoutItemFunction {
11
+ (payload: BookSizeReplaceableProductVariantsForCheckoutItemPayload): BookSizeReplaceableProductVariantsForCheckoutItem;
12
+ }
13
+ declare const bookSizeReplaceableProductVariantsForCheckoutItem: BookSizeReplaceableProductVariantsForCheckoutItemFunction;
14
+ export type { BookSizeReplaceableProductVariantsForCheckoutItem };
15
+ export { BOOK_SIZE_REPLACEABLE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM, bookSizeReplaceableProductVariantsForCheckoutItem };
@@ -0,0 +1,7 @@
1
+ import { command } from "@lookiero/messaging";
2
+ const BOOK_SIZE_REPLACEABLE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM = "book_size_replaceable_product_variants_for_checkout_item";
3
+ const bookSizeReplaceableProductVariantsForCheckoutItem = ({ aggregateId, ...payload }) => ({
4
+ ...command({ aggregateId, name: BOOK_SIZE_REPLACEABLE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM }),
5
+ ...payload,
6
+ });
7
+ export { BOOK_SIZE_REPLACEABLE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM, bookSizeReplaceableProductVariantsForCheckoutItem };
@@ -0,0 +1,9 @@
1
+ import { AggregateRoot, CommandHandlerFunction } from "@lookiero/messaging";
2
+ import { BookCheckoutBookingForCheckoutItem } from "../command/bookCheckoutBookingForCheckoutItem";
3
+ interface CheckoutBooking extends AggregateRoot {
4
+ readonly checkoutId: string;
5
+ readonly checkoutItemIds: string[];
6
+ }
7
+ declare const bookCheckoutBookingForCheckoutItemHandler: CommandHandlerFunction<BookCheckoutBookingForCheckoutItem, CheckoutBooking>;
8
+ export type { CheckoutBooking };
9
+ export { bookCheckoutBookingForCheckoutItemHandler };
@@ -0,0 +1,9 @@
1
+ import { checkoutBookingBooked } from "./checkoutBookingBooked";
2
+ const bookCheckoutBookingForCheckoutItemHandler = () => async ({ aggregateRoot, command }) => {
3
+ const { aggregateId, checkoutItemId } = command;
4
+ return {
5
+ ...aggregateRoot,
6
+ domainEvents: [checkoutBookingBooked({ aggregateId, checkoutItemId })],
7
+ };
8
+ };
9
+ export { bookCheckoutBookingForCheckoutItemHandler };
@@ -0,0 +1,14 @@
1
+ import { DomainEvent } from "@lookiero/messaging";
2
+ declare const CHECKOUT_BOOKING_BOOKED = "checkout_booking_booked";
3
+ interface CheckoutBookingBookedPayload {
4
+ readonly aggregateId: string;
5
+ readonly checkoutItemId: string;
6
+ }
7
+ interface CheckoutBookingBooked extends DomainEvent<typeof CHECKOUT_BOOKING_BOOKED>, CheckoutBookingBookedPayload {
8
+ }
9
+ interface CheckoutBookingBookedFunction {
10
+ (payload: CheckoutBookingBookedPayload): CheckoutBookingBooked;
11
+ }
12
+ declare const checkoutBookingBooked: CheckoutBookingBookedFunction;
13
+ export type { CheckoutBookingBooked };
14
+ export { CHECKOUT_BOOKING_BOOKED, checkoutBookingBooked };
@@ -0,0 +1,7 @@
1
+ import { domainEvent } from "@lookiero/messaging";
2
+ const CHECKOUT_BOOKING_BOOKED = "checkout_booking_booked";
3
+ const checkoutBookingBooked = ({ aggregateId, ...payload }) => ({
4
+ ...domainEvent({ aggregateId, name: CHECKOUT_BOOKING_BOOKED }),
5
+ ...payload,
6
+ });
7
+ export { CHECKOUT_BOOKING_BOOKED, checkoutBookingBooked };
@@ -0,0 +1,7 @@
1
+ import { RepositoryGetFunction, RepositoryGetFunctionArgs, RepositorySaveFunction, RepositorySaveFunctionArgs } from "@lookiero/messaging";
2
+ import { CheckoutBooking } from "./checkoutBooking";
3
+ interface CheckoutBookingsGetFunction<CheckoutBookingsGetFunctionArgs extends RepositoryGetFunctionArgs> extends RepositoryGetFunction<CheckoutBooking, CheckoutBookingsGetFunctionArgs> {
4
+ }
5
+ interface CheckoutBookingsSaveFunction<CheckoutBookingsSaveFunctionArgs extends RepositorySaveFunctionArgs> extends RepositorySaveFunction<CheckoutBooking, CheckoutBookingsSaveFunctionArgs> {
6
+ }
7
+ export type { CheckoutBookingsGetFunction, CheckoutBookingsSaveFunction };
@@ -0,0 +1,13 @@
1
+ import { Command } from "@lookiero/messaging";
2
+ declare const KEEP_CHECKOUT_ITEM = "keep_checkout_item";
3
+ interface KeepCheckoutItemPayload {
4
+ readonly aggregateId: string;
5
+ }
6
+ interface KeepCheckoutItem extends Command<typeof KEEP_CHECKOUT_ITEM>, KeepCheckoutItemPayload {
7
+ }
8
+ interface KeepCheckoutItemFunction {
9
+ (payload: KeepCheckoutItemPayload): KeepCheckoutItem;
10
+ }
11
+ declare const keepCheckoutItem: KeepCheckoutItemFunction;
12
+ export type { KeepCheckoutItem };
13
+ export { KEEP_CHECKOUT_ITEM, keepCheckoutItem };
@@ -0,0 +1,4 @@
1
+ import { command } from "@lookiero/messaging";
2
+ const KEEP_CHECKOUT_ITEM = "keep_checkout_item";
3
+ const keepCheckoutItem = ({ aggregateId }) => command({ aggregateId, name: KEEP_CHECKOUT_ITEM });
4
+ export { KEEP_CHECKOUT_ITEM, keepCheckoutItem };
@@ -0,0 +1,14 @@
1
+ import { Command } from "@lookiero/messaging";
2
+ declare const REPLACE_CHECKOUT_ITEM = "replace_checkout_item";
3
+ interface ReplaceCheckoutItemPayload {
4
+ readonly aggregateId: string;
5
+ readonly replacedFor: string;
6
+ }
7
+ interface ReplaceCheckoutItem extends Command<typeof REPLACE_CHECKOUT_ITEM>, ReplaceCheckoutItemPayload {
8
+ }
9
+ interface ReplaceCheckoutItemFunction {
10
+ (payload: ReplaceCheckoutItemPayload): ReplaceCheckoutItem;
11
+ }
12
+ declare const replaceCheckoutItem: ReplaceCheckoutItemFunction;
13
+ export type { ReplaceCheckoutItem };
14
+ export { REPLACE_CHECKOUT_ITEM, replaceCheckoutItem };
@@ -0,0 +1,7 @@
1
+ import { command } from "@lookiero/messaging";
2
+ const REPLACE_CHECKOUT_ITEM = "replace_checkout_item";
3
+ const replaceCheckoutItem = ({ aggregateId, ...payload }) => ({
4
+ ...command({ aggregateId, name: REPLACE_CHECKOUT_ITEM }),
5
+ ...payload,
6
+ });
7
+ export { REPLACE_CHECKOUT_ITEM, replaceCheckoutItem };
@@ -0,0 +1,15 @@
1
+ import { Command } from "@lookiero/messaging";
2
+ import { Feedbacks } from "../model/feedbacks";
3
+ declare const RETURN_CHECKOUT_ITEM = "return_checkout_item";
4
+ interface ReturnCheckoutItemPayload {
5
+ readonly aggregateId: string;
6
+ readonly feedbacks: Feedbacks;
7
+ }
8
+ interface ReturnCheckoutItem extends Command<typeof RETURN_CHECKOUT_ITEM>, ReturnCheckoutItemPayload {
9
+ }
10
+ interface ReturnCheckoutItemFunction {
11
+ (payload: ReturnCheckoutItemPayload): ReturnCheckoutItem;
12
+ }
13
+ declare const returnCheckoutItem: ReturnCheckoutItemFunction;
14
+ export type { ReturnCheckoutItem };
15
+ export { RETURN_CHECKOUT_ITEM, returnCheckoutItem };
@@ -0,0 +1,7 @@
1
+ import { command } from "@lookiero/messaging";
2
+ const RETURN_CHECKOUT_ITEM = "return_checkout_item";
3
+ const returnCheckoutItem = ({ aggregateId, ...payload }) => ({
4
+ ...command({ aggregateId, name: RETURN_CHECKOUT_ITEM }),
5
+ ...payload,
6
+ });
7
+ export { RETURN_CHECKOUT_ITEM, returnCheckoutItem };
@@ -0,0 +1,24 @@
1
+ import { AggregateRoot, CommandHandlerFunction } from "@lookiero/messaging";
2
+ import { KeepCheckoutItem } from "../command/keepCheckoutItem";
3
+ import { ReplaceCheckoutItem } from "../command/replaceCheckoutItem";
4
+ import { ReturnCheckoutItem } from "../command/returnCheckoutItem";
5
+ import { Feedbacks } from "./feedbacks";
6
+ import { Price } from "./price";
7
+ declare enum CheckoutItemStatus {
8
+ INITIAL = "INITIAL",
9
+ KEPT = "KEPT",
10
+ RETURNED = "RETURNED",
11
+ REPLACED = "REPLACED",
12
+ EXPIRED = "EXPIRED"
13
+ }
14
+ interface CheckoutItem extends AggregateRoot {
15
+ readonly status: CheckoutItemStatus;
16
+ readonly price: Price;
17
+ readonly feedbacks: Feedbacks;
18
+ readonly replacedFor?: string;
19
+ }
20
+ declare const keepCheckoutItemHandler: CommandHandlerFunction<KeepCheckoutItem, CheckoutItem>;
21
+ declare const returnCheckoutItemHandler: CommandHandlerFunction<ReturnCheckoutItem, CheckoutItem>;
22
+ declare const replaceCheckoutItemHandler: CommandHandlerFunction<ReplaceCheckoutItem, CheckoutItem>;
23
+ export type { CheckoutItem };
24
+ export { CheckoutItemStatus, keepCheckoutItemHandler, returnCheckoutItemHandler, replaceCheckoutItemHandler };
@@ -0,0 +1,40 @@
1
+ import invariant from "tiny-invariant";
2
+ import { checkoutItemKept } from "./checkoutItemKept";
3
+ import { checkoutItemReplaced } from "./checkoutItemReplaced";
4
+ import { checkoutItemReturned } from "./checkoutItemReturned";
5
+ var CheckoutItemStatus;
6
+ (function (CheckoutItemStatus) {
7
+ CheckoutItemStatus["INITIAL"] = "INITIAL";
8
+ CheckoutItemStatus["KEPT"] = "KEPT";
9
+ CheckoutItemStatus["RETURNED"] = "RETURNED";
10
+ CheckoutItemStatus["REPLACED"] = "REPLACED";
11
+ CheckoutItemStatus["EXPIRED"] = "EXPIRED";
12
+ })(CheckoutItemStatus || (CheckoutItemStatus = {}));
13
+ const keepCheckoutItemHandler = () => async ({ aggregateRoot, command }) => {
14
+ const { aggregateId } = command;
15
+ invariant(aggregateRoot.status !== CheckoutItemStatus.KEPT, "CheckoutItem is already kept");
16
+ return {
17
+ ...aggregateRoot,
18
+ status: CheckoutItemStatus.KEPT,
19
+ domainEvents: [checkoutItemKept({ aggregateId })],
20
+ };
21
+ };
22
+ const returnCheckoutItemHandler = () => async ({ aggregateRoot, command }) => {
23
+ const { aggregateId } = command;
24
+ invariant(aggregateRoot.status !== CheckoutItemStatus.RETURNED, "CheckoutItem is already returned");
25
+ return {
26
+ ...aggregateRoot,
27
+ status: CheckoutItemStatus.RETURNED,
28
+ domainEvents: [checkoutItemReturned({ aggregateId })],
29
+ };
30
+ };
31
+ const replaceCheckoutItemHandler = () => async ({ aggregateRoot, command }) => {
32
+ const { aggregateId } = command;
33
+ invariant(aggregateRoot.status !== CheckoutItemStatus.REPLACED, "CheckoutItem is already replaced");
34
+ return {
35
+ ...aggregateRoot,
36
+ status: CheckoutItemStatus.REPLACED,
37
+ domainEvents: [checkoutItemReplaced({ aggregateId })],
38
+ };
39
+ };
40
+ export { CheckoutItemStatus, keepCheckoutItemHandler, returnCheckoutItemHandler, replaceCheckoutItemHandler };
@@ -0,0 +1,13 @@
1
+ import { DomainEvent } from "@lookiero/messaging";
2
+ declare const CHECKOUT_ITEM_KEPT = "checkout_item_kept";
3
+ interface CheckoutItemKeptPayload {
4
+ readonly aggregateId: string;
5
+ }
6
+ interface CheckoutItemKept extends DomainEvent<typeof CHECKOUT_ITEM_KEPT>, CheckoutItemKeptPayload {
7
+ }
8
+ interface CheckoutItemKeptFunction {
9
+ (payload: CheckoutItemKeptPayload): CheckoutItemKept;
10
+ }
11
+ declare const checkoutItemKept: CheckoutItemKeptFunction;
12
+ export type { CheckoutItemKept };
13
+ export { CHECKOUT_ITEM_KEPT, checkoutItemKept };
@@ -0,0 +1,4 @@
1
+ import { domainEvent } from "@lookiero/messaging";
2
+ const CHECKOUT_ITEM_KEPT = "checkout_item_kept";
3
+ const checkoutItemKept = ({ aggregateId }) => domainEvent({ aggregateId, name: CHECKOUT_ITEM_KEPT });
4
+ export { CHECKOUT_ITEM_KEPT, checkoutItemKept };
@@ -0,0 +1,13 @@
1
+ import { DomainEvent } from "@lookiero/messaging";
2
+ declare const CHECKOUT_ITEM_REPLACED = "checkout_item_replaced";
3
+ interface CheckoutItemReplacedPayload {
4
+ readonly aggregateId: string;
5
+ }
6
+ interface CheckoutItemReplaced extends DomainEvent<typeof CHECKOUT_ITEM_REPLACED>, CheckoutItemReplacedPayload {
7
+ }
8
+ interface CheckoutItemReplacedFunction {
9
+ (payload: CheckoutItemReplacedPayload): CheckoutItemReplaced;
10
+ }
11
+ declare const checkoutItemReplaced: CheckoutItemReplacedFunction;
12
+ export type { CheckoutItemReplaced };
13
+ export { CHECKOUT_ITEM_REPLACED, checkoutItemReplaced };
@@ -0,0 +1,4 @@
1
+ import { domainEvent } from "@lookiero/messaging";
2
+ const CHECKOUT_ITEM_REPLACED = "checkout_item_replaced";
3
+ const checkoutItemReplaced = ({ aggregateId }) => domainEvent({ aggregateId, name: CHECKOUT_ITEM_REPLACED });
4
+ export { CHECKOUT_ITEM_REPLACED, checkoutItemReplaced };
@@ -0,0 +1,13 @@
1
+ import { DomainEvent } from "@lookiero/messaging";
2
+ declare const CHECKOUT_ITEM_RETURNED = "checkout_item_returned";
3
+ interface CheckoutItemReturnedPayload {
4
+ readonly aggregateId: string;
5
+ }
6
+ interface CheckoutItemReturned extends DomainEvent<typeof CHECKOUT_ITEM_RETURNED>, CheckoutItemReturnedPayload {
7
+ }
8
+ interface CheckoutItemReturnedFunction {
9
+ (payload: CheckoutItemReturnedPayload): CheckoutItemReturned;
10
+ }
11
+ declare const checkoutItemReturned: CheckoutItemReturnedFunction;
12
+ export type { CheckoutItemReturned };
13
+ export { CHECKOUT_ITEM_RETURNED, checkoutItemReturned };
@@ -0,0 +1,4 @@
1
+ import { domainEvent } from "@lookiero/messaging";
2
+ const CHECKOUT_ITEM_RETURNED = "checkout_item_returned";
3
+ const checkoutItemReturned = ({ aggregateId }) => domainEvent({ aggregateId, name: CHECKOUT_ITEM_RETURNED });
4
+ export { CHECKOUT_ITEM_RETURNED, checkoutItemReturned };
@@ -0,0 +1,7 @@
1
+ import { RepositoryGetFunction, RepositoryGetFunctionArgs, RepositorySaveFunction, RepositorySaveFunctionArgs } from "@lookiero/messaging";
2
+ import { CheckoutItem } from "./checkoutItem";
3
+ interface CheckoutItemsGetFunction<CheckoutItemsGetFunctionArgs extends RepositoryGetFunctionArgs> extends RepositoryGetFunction<CheckoutItem, CheckoutItemsGetFunctionArgs> {
4
+ }
5
+ interface CheckoutItemsSaveFunction<CheckoutItemsSaveFunctionArgs extends RepositorySaveFunctionArgs> extends RepositorySaveFunction<CheckoutItem, CheckoutItemsSaveFunctionArgs> {
6
+ }
7
+ export type { CheckoutItemsGetFunction, CheckoutItemsSaveFunction };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ declare enum Currency {
2
+ EUR = "EUR",
3
+ GBP = "GBP"
4
+ }
5
+ export { Currency };
@@ -0,0 +1,6 @@
1
+ var Currency;
2
+ (function (Currency) {
3
+ Currency["EUR"] = "EUR";
4
+ Currency["GBP"] = "GBP";
5
+ })(Currency || (Currency = {}));
6
+ export { Currency };
@@ -0,0 +1,3 @@
1
+ declare type ReturnQuestionId = string;
2
+ declare type Feedbacks = Record<ReturnQuestionId, ReturnQuestionId | string>;
3
+ export type { Feedbacks };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ import { Currency } from "./currency";
2
+ interface Price {
3
+ readonly amount: number;
4
+ readonly currency: Currency;
5
+ readonly discountedPrice?: {
6
+ readonly amount: number;
7
+ readonly percentage: number;
8
+ };
9
+ }
10
+ export type { Price };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,15 @@
1
+ import { Command } from "@lookiero/messaging";
2
+ declare const UPDATE_UI_SETTING = "update_ui_setting";
3
+ interface UpdateUiSettingPayload {
4
+ readonly aggregateId: string;
5
+ readonly key: string;
6
+ readonly value: unknown;
7
+ }
8
+ interface UpdateUiSetting extends Command<typeof UPDATE_UI_SETTING>, UpdateUiSettingPayload {
9
+ }
10
+ interface UpdateUiSettingFunction {
11
+ (payload: UpdateUiSettingPayload): UpdateUiSetting;
12
+ }
13
+ declare const updateUiSetting: UpdateUiSettingFunction;
14
+ export type { UpdateUiSetting };
15
+ export { UPDATE_UI_SETTING, updateUiSetting };
@@ -0,0 +1,10 @@
1
+ import { command } from "@lookiero/messaging";
2
+ const UPDATE_UI_SETTING = "update_ui_setting";
3
+ const updateUiSetting = ({ aggregateId, ...payload }) => ({
4
+ ...command({
5
+ aggregateId,
6
+ name: UPDATE_UI_SETTING,
7
+ }),
8
+ ...payload,
9
+ });
10
+ export { UPDATE_UI_SETTING, updateUiSetting };
@@ -0,0 +1,9 @@
1
+ import { AggregateRoot, CommandHandlerFunction } from "@lookiero/messaging";
2
+ import { UpdateUiSetting } from "../command/updateUiSetting";
3
+ interface UiSetting extends AggregateRoot {
4
+ readonly key: string;
5
+ readonly value: unknown;
6
+ }
7
+ declare const updateUiSettingHandler: CommandHandlerFunction<UpdateUiSetting, UiSetting>;
8
+ export type { UiSetting };
9
+ export { updateUiSettingHandler };
@@ -0,0 +1,11 @@
1
+ import { uiSettingUpdated } from "./uiSettingUpdated";
2
+ const updateUiSettingHandler = () => async ({ aggregateRoot, command }) => {
3
+ const { aggregateId, key, value } = command;
4
+ return {
5
+ ...aggregateRoot,
6
+ key,
7
+ value,
8
+ domainEvents: [uiSettingUpdated({ aggregateId, key })],
9
+ };
10
+ };
11
+ export { updateUiSettingHandler };
@@ -0,0 +1,14 @@
1
+ import { DomainEvent } from "@lookiero/messaging";
2
+ declare const UI_SETTING_UPDATED = "ui_setting_updated";
3
+ interface UiSettingUpdatedPayload {
4
+ readonly aggregateId: string;
5
+ readonly key: string;
6
+ }
7
+ interface UiSettingUpdated extends DomainEvent<typeof UI_SETTING_UPDATED>, UiSettingUpdatedPayload {
8
+ }
9
+ interface UiSettingUpdatedFunction {
10
+ (payload: UiSettingUpdatedPayload): UiSettingUpdated;
11
+ }
12
+ declare const uiSettingUpdated: UiSettingUpdatedFunction;
13
+ export type { UiSettingUpdated };
14
+ export { UI_SETTING_UPDATED, uiSettingUpdated };
@@ -0,0 +1,7 @@
1
+ import { domainEvent } from "@lookiero/messaging";
2
+ const UI_SETTING_UPDATED = "ui_setting_updated";
3
+ const uiSettingUpdated = ({ aggregateId, key }) => ({
4
+ ...domainEvent({ aggregateId, name: UI_SETTING_UPDATED }),
5
+ key,
6
+ });
7
+ export { UI_SETTING_UPDATED, uiSettingUpdated };
@@ -0,0 +1,7 @@
1
+ import { RepositoryGetFunction, RepositoryGetFunctionArgs, RepositorySaveFunction, RepositorySaveFunctionArgs } from "@lookiero/messaging";
2
+ import { UiSetting } from "./uiSetting";
3
+ interface UiSettingGetFunction<UiSettingGetFunctionArgs extends RepositoryGetFunctionArgs> extends RepositoryGetFunction<UiSetting, UiSettingGetFunctionArgs> {
4
+ }
5
+ interface UiSettingSaveFunction<UiSettingSaveFunctionArgs extends RepositorySaveFunctionArgs> extends RepositorySaveFunction<UiSetting, UiSettingSaveFunctionArgs> {
6
+ }
7
+ export type { UiSettingGetFunction, UiSettingSaveFunction };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ import { EndpointFunction } from "@lookiero/i18n";
2
+ import { FC } from "react";
3
+ import { RootProps } from "./infrastructure/ui/Root";
4
+ import { IsCheckoutAccessibleByCustomerIdProjection } from "./projection/checkout/viewIsCheckoutAccessibleByCustomerId";
5
+ interface IsCheckoutAccessibleFunctionArgs {
6
+ readonly customerId: string | undefined;
7
+ }
8
+ interface IsCheckoutAccessibleFunction {
9
+ (args: IsCheckoutAccessibleFunctionArgs): Promise<IsCheckoutAccessibleByCustomerIdProjection>;
10
+ }
11
+ interface BootstrapFunctionArgs {
12
+ readonly getAuthToken: () => Promise<string>;
13
+ readonly apiUrl: string;
14
+ readonly translations: EndpointFunction;
15
+ }
16
+ interface BootstrapFunctionReturn {
17
+ readonly Root: FC<RootProps>;
18
+ readonly isCheckoutAccessible: IsCheckoutAccessibleFunction;
19
+ }
20
+ interface BootstrapFunction {
21
+ (args: BootstrapFunctionArgs): BootstrapFunctionReturn;
22
+ }
23
+ declare const bootstrap: BootstrapFunction;
24
+ export { bootstrap };
package/dist/index.js ADDED
@@ -0,0 +1,19 @@
1
+ import { fetchFetchTranslation } from "@lookiero/i18n";
2
+ import { i18n } from "@lookiero/i18n-react";
3
+ import { bootstrap as checkoutBootstrap } from "./infrastructure/delivery/bootstrap";
4
+ import { root } from "./infrastructure/ui/Root";
5
+ import { viewIsCheckoutAccessibleByCustomerId, } from "./projection/checkout/viewIsCheckoutAccessibleByCustomerId";
6
+ const bootstrap = ({ apiUrl, getAuthToken, translations }) => {
7
+ const { Component: Messaging, queryBus } = checkoutBootstrap({ apiUrl, getAuthToken });
8
+ const I18n = i18n({
9
+ fetchTranslation: fetchFetchTranslation({ endpoint: translations }),
10
+ contextId: "CheckoutI18n",
11
+ });
12
+ const Root = root({ Messaging, I18n });
13
+ const isCheckoutAccessible = ({ customerId }) => queryBus(viewIsCheckoutAccessibleByCustomerId({ customerId }));
14
+ return {
15
+ Root,
16
+ isCheckoutAccessible,
17
+ };
18
+ };
19
+ export { bootstrap };