@lookiero/checkout 8.14.0-beta.3 → 8.14.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 (254) hide show
  1. package/.eslintrc.js +1 -1
  2. package/cypress/integration/checkout.spec.ts +259 -0
  3. package/cypress/support/e2e.ts +3 -0
  4. package/cypress/support/index.d.ts +8 -0
  5. package/cypress/support/interceptBlockCheckoutBooking.ts +4 -0
  6. package/cypress/support/interceptGiveCheckoutFeedback.ts +4 -0
  7. package/cypress/support/interceptKeepCheckoutItem.ts +4 -0
  8. package/cypress/support/interceptListCheckoutQuestionsByCheckoutId.ts +9 -0
  9. package/cypress/support/interceptListReturnQuestionsByCheckoutItemId.ts +9 -0
  10. package/cypress/support/interceptPayment.ts +23 -0
  11. package/cypress/support/interceptReplaceCheckoutItem.ts +4 -0
  12. package/cypress/support/interceptReturnCheckoutItem.ts +4 -0
  13. package/cypress/support/interceptSubmitCheckout.ts +4 -0
  14. package/cypress/support/interceptViewBookedProductsVariantsForCheckoutItem.ts +9 -0
  15. package/cypress/support/interceptViewCheckoutById.ts +6 -0
  16. package/cypress/support/interceptViewFirstAvailableCheckoutByCustomerId.ts +9 -0
  17. package/cypress/support/interceptViewFiveItemsDiscountByCustomerId.ts +6 -0
  18. package/cypress/support/interceptViewIsSizeChangeEnabledByCheckoutId.ts +6 -0
  19. package/cypress/support/interceptViewPaymentFlowPayloadByCheckoutId.ts +9 -0
  20. package/cypress/support/interceptViewPricingByCheckoutId.ts +6 -0
  21. package/cypress/tsconfig.json +8 -0
  22. package/cypress.config.ts +50 -0
  23. package/dist/src/ExpoRoot.js +2 -2
  24. package/dist/src/infrastructure/projection/payment/react/useViewPaymentFlowPayloadByCheckoutId.js +1 -1
  25. package/dist/src/infrastructure/ui/Root.d.ts +1 -2
  26. package/dist/src/infrastructure/ui/Root.js +2 -4
  27. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.js +3 -1
  28. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/behaviors/isChildReturnQuestion.js +2 -1
  29. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionItem.d.ts +3 -3
  30. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.d.ts +4 -3
  31. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionFeedbackItem/HostDefaultReturnQuestionFeedbackItem.d.ts +2 -1
  32. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionFeedbackItem/HostDefaultReturnQuestionFeedbackItem.js +1 -0
  33. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.d.ts +2 -1
  34. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.js +8 -6
  35. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.d.ts +2 -1
  36. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.js +2 -1
  37. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.d.ts +2 -1
  38. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +4 -4
  39. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.d.ts +1 -1
  40. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.js +1 -1
  41. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/form/HostStackReturnQuestionItem.d.ts +2 -1
  42. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/form/HostStackReturnQuestionItem.js +1 -0
  43. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.d.ts +2 -1
  44. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.js +5 -3
  45. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.js +6 -5
  46. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.d.ts +2 -1
  47. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.js +2 -1
  48. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.d.ts +2 -1
  49. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.js +2 -1
  50. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.d.ts +2 -1
  51. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.js +2 -1
  52. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.d.ts +2 -1
  53. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.js +2 -1
  54. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/util/returnQuestionFeedback.js +18 -9
  55. package/dist/src/infrastructure/ui/test/render.js +1 -3
  56. package/dist/src/infrastructure/ui/views/App.js +7 -12
  57. package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js +2 -3
  58. package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.d.ts +1 -1
  59. package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.js +1 -1
  60. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.js +1 -1
  61. package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.d.ts +9 -2
  62. package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.js +5 -6
  63. package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.d.ts +1 -1
  64. package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.js +1 -1
  65. package/dist/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.js +2 -3
  66. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.js +4 -3
  67. package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.js +2 -2
  68. package/dist/src/projection/returnQuestion/returnQuestion.constants.d.ts +9 -0
  69. package/dist/src/projection/returnQuestion/returnQuestion.constants.js +10 -0
  70. package/dist/src/projection/returnQuestion/returnQuestion.d.ts +23 -16
  71. package/dist/src/projection/returnQuestion/returnQuestion.js +1 -11
  72. package/dist/src/projection/returnQuestion/returnQuestion.metadata.d.ts +12 -0
  73. package/dist/src/projection/returnQuestion/returnQuestion.metadata.js +1 -0
  74. package/dist/src/projection/returnQuestion/returnQuestion.typeguard.d.ts +5 -0
  75. package/dist/src/projection/returnQuestion/returnQuestion.typeguard.js +10 -0
  76. package/dist/src/version.d.ts +1 -1
  77. package/dist/src/version.js +1 -1
  78. package/jest.setup.js +0 -20
  79. package/package.json +8 -7
  80. package/src/ExpoRoot.tsx +2 -2
  81. package/src/infrastructure/domain/uiSetting/react/useUpdateUiSetting.test.ts +1 -1
  82. package/src/infrastructure/projection/payment/react/useViewPaymentFlowPayloadByCheckoutId.ts +1 -1
  83. package/src/infrastructure/projection/returnQuestion/react/useListReturnQuestionsByCheckoutItemId.test.ts +4 -9
  84. package/src/infrastructure/projection/returnQuestion/returnQuestions.mock.ts +72 -117
  85. package/src/infrastructure/ui/Root.tsx +17 -21
  86. package/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.test.tsx +10 -12
  87. package/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.tsx +10 -8
  88. package/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.test.tsx +10 -9
  89. package/src/infrastructure/ui/components/organisms/returnQuestions/behaviors/isChildReturnQuestion.ts +2 -1
  90. package/src/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionItem.test.tsx +7 -9
  91. package/src/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionItem.tsx +3 -3
  92. package/src/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.ts +4 -3
  93. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionFeedbackItem/HostDefaultReturnQuestionFeedbackItem.test.tsx +7 -13
  94. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionFeedbackItem/HostDefaultReturnQuestionFeedbackItem.tsx +4 -2
  95. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.test.tsx +8 -14
  96. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.tsx +13 -7
  97. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.tsx +7 -5
  98. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.ts +1 -1
  99. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.test.tsx +10 -14
  100. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.tsx +9 -8
  101. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/form/HostStackReturnQuestionItem.tsx +5 -3
  102. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.test.tsx +43 -36
  103. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.tsx +10 -7
  104. package/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.tsx +13 -12
  105. package/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.test.tsx +8 -14
  106. package/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.tsx +6 -4
  107. package/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.tsx +6 -4
  108. package/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.test.tsx +23 -25
  109. package/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.tsx +5 -3
  110. package/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.test.tsx +9 -29
  111. package/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.tsx +7 -5
  112. package/src/infrastructure/ui/components/organisms/returnQuestions/util/__snapshots__/returnQuestionFeedback.test.ts.snap +5 -4
  113. package/src/infrastructure/ui/components/organisms/returnQuestions/util/returnQuestionFeedback.ts +32 -18
  114. package/src/infrastructure/ui/test/render.tsx +1 -4
  115. package/src/infrastructure/ui/views/App.tsx +16 -23
  116. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.ts +1 -1
  117. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.tsx +2 -3
  118. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/__snapshots__/GetOutOfCheckoutModal.test.tsx.snap +10 -6
  119. package/src/infrastructure/ui/views/item/components/itemActions/ItemActions.tsx +0 -1
  120. package/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.tsx +2 -4
  121. package/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.ts +1 -1
  122. package/src/infrastructure/ui/views/item/components/selectModal/SelectModal.tsx +21 -10
  123. package/src/infrastructure/ui/views/item/components/selectModal/__snapshots__/SelecModal.test.tsx.snap +15 -5
  124. package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.tsx +2 -4
  125. package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/__snapshots__/SizeWithoutStockModal.test.tsx.snap +10 -6
  126. package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.tsx +2 -2
  127. package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx +10 -4
  128. package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.tsx +2 -2
  129. package/src/infrastructure/ui/views/summary/components/collapsiblePricing/__snapshots__/CollapsiblePricing.test.tsx.snap +2 -2
  130. package/src/projection/returnQuestion/listReturnQuestionsByCheckoutItemId.test.ts +4 -12
  131. package/src/projection/returnQuestion/returnQuestion.constants.ts +10 -0
  132. package/src/projection/returnQuestion/returnQuestion.metadata.ts +17 -0
  133. package/src/projection/returnQuestion/returnQuestion.ts +42 -20
  134. package/src/projection/returnQuestion/returnQuestion.typeguard.ts +24 -0
  135. package/dist/pact.config.d.ts +0 -13
  136. package/dist/pact.config.js +0 -9
  137. package/dist/public/public/assets/adaptive-icon.png +0 -0
  138. package/dist/public/public/assets/favicon.png +0 -0
  139. package/dist/public/public/assets/icon.png +0 -0
  140. package/dist/public/public/assets/splash.png +0 -0
  141. package/dist/public/public/images/not-found.png +0 -0
  142. package/dist/src/infrastructure/projection/bookedProductsVariants/bookedProductsVariants.mock.d.ts +0 -3
  143. package/dist/src/infrastructure/projection/bookedProductsVariants/bookedProductsVariants.mock.js +0 -27
  144. package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.d.ts +0 -1
  145. package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.js +0 -48
  146. package/dist/src/infrastructure/projection/checkout/checkout.mock.d.ts +0 -19
  147. package/dist/src/infrastructure/projection/checkout/checkout.mock.js +0 -21
  148. package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.d.ts +0 -1
  149. package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.js +0 -109
  150. package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.d.ts +0 -1
  151. package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.js +0 -49
  152. package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.d.ts +0 -1
  153. package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.js +0 -44
  154. package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.d.ts +0 -1
  155. package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.js +0 -44
  156. package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.d.ts +0 -1
  157. package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.js +0 -44
  158. package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.d.ts +0 -10
  159. package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.js +0 -17
  160. package/dist/src/infrastructure/projection/checkoutBooking/checkoutBooking.mock.d.ts +0 -3
  161. package/dist/src/infrastructure/projection/checkoutBooking/checkoutBooking.mock.js +0 -6
  162. package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.d.ts +0 -1
  163. package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.js +0 -49
  164. package/dist/src/infrastructure/projection/checkoutItem/checkoutItem.mock.d.ts +0 -15
  165. package/dist/src/infrastructure/projection/checkoutItem/checkoutItem.mock.js +0 -43
  166. package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.d.ts +0 -1
  167. package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.js +0 -50
  168. package/dist/src/infrastructure/projection/checkoutQuestion/checkoutQuestions.mock.d.ts +0 -3
  169. package/dist/src/infrastructure/projection/checkoutQuestion/checkoutQuestions.mock.js +0 -103
  170. package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.d.ts +0 -1
  171. package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.js +0 -48
  172. package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.d.ts +0 -1
  173. package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.js +0 -109
  174. package/dist/src/infrastructure/projection/payment/paymentFlowPayload.mock.d.ts +0 -6
  175. package/dist/src/infrastructure/projection/payment/paymentFlowPayload.mock.js +0 -183
  176. package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.d.ts +0 -1
  177. package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.js +0 -48
  178. package/dist/src/infrastructure/projection/pricing/pricing.mock.d.ts +0 -9
  179. package/dist/src/infrastructure/projection/pricing/pricing.mock.js +0 -42
  180. package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.d.ts +0 -1
  181. package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.js +0 -48
  182. package/dist/src/infrastructure/projection/returnQuestion/returnQuestions.mock.d.ts +0 -3
  183. package/dist/src/infrastructure/projection/returnQuestion/returnQuestions.mock.js +0 -400
  184. package/dist/src/infrastructure/ui/components/layouts/layout/Layout.d.ts +0 -21
  185. package/dist/src/infrastructure/ui/components/layouts/layout/Layout.js +0 -1
  186. package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.d.ts +0 -6
  187. package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.js +0 -4
  188. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.d.ts +0 -6
  189. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.js +0 -5
  190. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.d.ts +0 -4
  191. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.js +0 -19
  192. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.d.ts +0 -3
  193. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.js +0 -18
  194. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.d.ts +0 -12
  195. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.js +0 -13
  196. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.d.ts +0 -6
  197. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.js +0 -11
  198. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.d.ts +0 -8
  199. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.js +0 -11
  200. package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.d.ts +0 -11
  201. package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.js +0 -49
  202. package/dist/src/infrastructure/ui/i18n/fetchTranslations.d.ts +0 -9
  203. package/dist/src/infrastructure/ui/i18n/fetchTranslations.js +0 -9
  204. package/dist/src/infrastructure/ui/i18n/translationEndpoint.d.ts +0 -19
  205. package/dist/src/infrastructure/ui/i18n/translationEndpoint.js +0 -21
  206. package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.d.ts +0 -9
  207. package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.js +0 -21
  208. package/dist/src/infrastructure/ui/views/App.style.d.ts +0 -6
  209. package/dist/src/infrastructure/ui/views/App.style.js +0 -7
  210. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.d.ts +0 -7
  211. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.js +0 -10
  212. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +0 -11
  213. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +0 -40
  214. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +0 -12
  215. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.js +0 -15
  216. package/dist/src/infrastructure/ui/views/return/Return.style.d.ts +0 -40
  217. package/dist/src/infrastructure/ui/views/return/Return.style.js +0 -43
  218. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.d.ts +0 -13
  219. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.js +0 -9
  220. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.d.ts +0 -7
  221. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.js +0 -10
  222. package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.d.ts +0 -17
  223. package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.js +0 -13
  224. package/dist/src/projection/shared/country.d.ts +0 -14
  225. package/dist/src/projection/shared/country.js +0 -15
  226. package/dist/src/projection/shared/customer.d.ts +0 -8
  227. package/dist/src/projection/shared/customer.js +0 -1
  228. package/dist/src/projection/shared/locale.d.ts +0 -12
  229. package/dist/src/projection/shared/locale.js +0 -13
  230. package/dist/src/projection/shared/order.d.ts +0 -6
  231. package/dist/src/projection/shared/order.js +0 -1
  232. package/dist/src/projection/shared/price.d.ts +0 -10
  233. package/dist/src/projection/shared/price.js +0 -1
  234. package/dist/src/projection/shared/size.d.ts +0 -20
  235. package/dist/src/projection/shared/size.js +0 -3
  236. package/dist/src/projection/shared/subscription.d.ts +0 -2
  237. package/dist/src/projection/shared/subscription.js +0 -1
  238. package/dist/src/shared/ui/components/atoms/error/Error.d.ts +0 -10
  239. package/dist/src/shared/ui/components/atoms/error/Error.js +0 -4
  240. package/pact.config.ts +0 -31
  241. package/pact.publish.js +0 -32
  242. package/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.ts +0 -62
  243. package/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.ts +0 -128
  244. package/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.ts +0 -63
  245. package/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.ts +0 -57
  246. package/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.ts +0 -57
  247. package/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.ts +0 -57
  248. package/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.ts +0 -63
  249. package/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.ts +0 -64
  250. package/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.ts +0 -62
  251. package/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.ts +0 -136
  252. package/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.ts +0 -62
  253. package/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.ts +0 -62
  254. package/src/infrastructure/ui/views/App.style.ts +0 -9
@@ -1,9 +0,0 @@
1
- import { fetchFetchTranslation } from "@lookiero/i18n";
2
- const fetchTranslations = ({ translations }) => async ({ locale }) => {
3
- const translationsMessages = await Promise.all(translations.map((endpoint) => fetchFetchTranslation({ endpoint })({ locale })));
4
- return translationsMessages.reduce((acc, translationMessages) => ({
5
- ...acc,
6
- ...translationMessages,
7
- }), {});
8
- };
9
- export { fetchTranslations };
@@ -1,19 +0,0 @@
1
- import { EndpointFunction } from "@lookiero/i18n";
2
- interface TranslationEndpointFunctionArgs {
3
- readonly translationsUrl: string;
4
- readonly translationsApiKey: string;
5
- }
6
- interface TranslationEndpointFunction {
7
- (args: TranslationEndpointFunctionArgs): EndpointFunction;
8
- }
9
- declare const translationEndpoint: TranslationEndpointFunction;
10
- type Project = "user-area-front" | "inventory-catalog" | "checkout";
11
- interface TranslationExternalEndpointFunctionArgs {
12
- readonly translationsUrl: string;
13
- readonly projects: [project: Project, filter?: string][];
14
- }
15
- interface TranslationExternalEndpointFunction {
16
- (args: TranslationExternalEndpointFunctionArgs): EndpointFunction;
17
- }
18
- declare const translationExternalEndpoint: TranslationExternalEndpointFunction;
19
- export { translationEndpoint, translationExternalEndpoint };
@@ -1,21 +0,0 @@
1
- import { Country } from "../../../projection/shared/country";
2
- import { Locale } from "../../../projection/shared/locale";
3
- const translationEndpoint = ({ translationsUrl, translationsApiKey }) => (locale) => `${translationsUrl}/${locale}?key=${translationsApiKey}&no-folding=true`;
4
- const COUNTRY = {
5
- [Locale.ES]: Country.ES,
6
- [Locale.FR]: Country.FR,
7
- [Locale.EN]: Country.GB,
8
- [Locale.IT]: Country.IT,
9
- [Locale.PT]: Country.PT,
10
- [Locale.DE]: Country.DE,
11
- [Locale.AT]: Country.AT,
12
- [Locale.NL]: Country.NL,
13
- [Locale.SE]: Country.SE,
14
- };
15
- const translationExternalEndpoint = ({ translationsUrl, projects }) => (locale) => {
16
- const projectsQueryParam = projects
17
- .map(([project, filter]) => `projectFilter=${project}${filter ? `:${filter}` : ""}`)
18
- .join("&");
19
- return `${translationsUrl}/${locale}/${COUNTRY[locale]}?${projectsQueryParam}`;
20
- };
21
- export { translationEndpoint, translationExternalEndpoint };
@@ -1,9 +0,0 @@
1
- import { FC } from "react";
2
- interface CheckoutAccessibilityMiddlewareProps {
3
- readonly customerId: string | undefined;
4
- readonly onNotAccessible: () => void;
5
- readonly loader?: JSX.Element;
6
- readonly children: JSX.Element;
7
- }
8
- declare const CheckoutAccessibilityMiddleware: FC<CheckoutAccessibilityMiddlewareProps>;
9
- export { CheckoutAccessibilityMiddleware };
@@ -1,21 +0,0 @@
1
- import React, { useEffect, useRef } from "react";
2
- import { Spinner } from "@lookiero/aurora";
3
- import { QueryStatus } from "@lookiero/messaging-react";
4
- import { useViewIsCheckoutAccessibleByCustomerId } from "../../projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId";
5
- const CheckoutAccessibilityMiddleware = ({ customerId, onNotAccessible, loader = React.createElement(Spinner, null), children, }) => {
6
- const [accessible, status] = useViewIsCheckoutAccessibleByCustomerId({ customerId });
7
- const onNotAccessibleRef = useRef(onNotAccessible);
8
- onNotAccessibleRef.current = onNotAccessible;
9
- const notAccessible = accessible === false || status === QueryStatus.ERROR;
10
- useEffect(() => {
11
- if (notAccessible) {
12
- onNotAccessibleRef.current();
13
- }
14
- }, [notAccessible]);
15
- return accessible === undefined && [QueryStatus.IDLE, QueryStatus.LOADING].includes(status)
16
- ? loader
17
- : accessible
18
- ? children
19
- : null;
20
- };
21
- export { CheckoutAccessibilityMiddleware };
@@ -1,6 +0,0 @@
1
- declare const style: {
2
- container: {
3
- flex: number;
4
- };
5
- };
6
- export { style };
@@ -1,7 +0,0 @@
1
- import { StyleSheet } from "react-native";
2
- const style = StyleSheet.create({
3
- container: {
4
- flex: 1,
5
- },
6
- });
7
- export { style };
@@ -1,7 +0,0 @@
1
- declare const style: {
2
- buttonContainer: {
3
- paddingHorizontal: number;
4
- paddingVertical: number;
5
- };
6
- };
7
- export { style };
@@ -1,10 +0,0 @@
1
- import { StyleSheet } from "react-native";
2
- import { theme } from "@lookiero/sty-psp-ui";
3
- const { space6, space8 } = theme();
4
- const style = StyleSheet.create({
5
- buttonContainer: {
6
- paddingHorizontal: space6,
7
- paddingVertical: space8,
8
- },
9
- });
10
- export { style };
@@ -1,11 +0,0 @@
1
- import { FC } from "react";
2
- import { FeedbackProjection } from "../../../../../../projection/feedback/feedback";
3
- import { ReturnQuestionProjection } from "../../../../../../projection/returnQuestion/returnQuestion";
4
- interface ReturnQuestionsFormProps {
5
- readonly visible: boolean;
6
- readonly returnQuestions: ReturnQuestionProjection[];
7
- readonly onSubmit: (feedback: FeedbackProjection) => void;
8
- readonly onClose: () => void;
9
- }
10
- declare const ReturnQuestionsForm: FC<ReturnQuestionsFormProps>;
11
- export { ReturnQuestionsForm };
@@ -1,40 +0,0 @@
1
- import { PortalHost } from "@gorhom/portal";
2
- import React, { useCallback } from "react";
3
- import { View } from "react-native";
4
- import { Button, Text } from "@lookiero/aurora";
5
- import { useI18nMessage } from "@lookiero/i18n-react";
6
- import { Modal } from "@lookiero/sty-psp-ui";
7
- import { ReturnQuestionType, } from "../../../../../../projection/returnQuestion/returnQuestion";
8
- import { ReturnQuestions } from "../../../../components/organisms/returnQuestions/ReturnQuestions";
9
- import { useReturnQuestionFeedback } from "../../../../components/organisms/returnQuestions/behaviors/useReturnQuestionFeedback";
10
- import { ReturnQuestionItemProvider, } from "../../../../components/organisms/returnQuestions/behaviors/useReturnQuestionItem";
11
- import { HostDefaultReturnQuestionItem } from "../../../../components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem";
12
- import { HostSelectReturnQuestionItem } from "../../../../components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem";
13
- import { HostStackReturnQuestionItem } from "../../../../components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem";
14
- import { OptionReturnQuestionItem } from "../../../../components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem";
15
- import { TextareaReturnQuestionItem } from "../../../../components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem";
16
- import { I18nMessages } from "../../../../i18n/i18n";
17
- import { style } from "./ReturnQuestionsForm.style";
18
- const RETURN_QUESTION_FORM_PORTAL_HOST_NAME = "return-question-form-portal";
19
- const returnQuestionItems = {
20
- [ReturnQuestionType.HOST_DEFAULT]: HostDefaultReturnQuestionItem,
21
- [ReturnQuestionType.HOST_TEXTAREA]: HostDefaultReturnQuestionItem,
22
- [ReturnQuestionType.HOST_SELECT]: HostSelectReturnQuestionItem,
23
- [ReturnQuestionType.HOST_STACK]: HostStackReturnQuestionItem,
24
- [ReturnQuestionType.TEXTAREA]: TextareaReturnQuestionItem,
25
- [ReturnQuestionType.OPTION]: OptionReturnQuestionItem,
26
- };
27
- const ReturnQuestionsForm = ({ returnQuestions, visible, onSubmit, onClose }) => {
28
- const titleText = useI18nMessage({ id: I18nMessages.RETURN_QUESTIONS_TITLE });
29
- const submitButtonText = useI18nMessage({ id: I18nMessages.RETURN_QUESTIONS_SUBMIT_BUTTON });
30
- const feedback = useReturnQuestionFeedback();
31
- const handleOnSubmit = useCallback(() => onSubmit(feedback), [feedback, onSubmit]);
32
- return (React.createElement(ReturnQuestionItemProvider, { returnQuestionItems: returnQuestionItems },
33
- React.createElement(PortalHost, { name: RETURN_QUESTION_FORM_PORTAL_HOST_NAME }),
34
- React.createElement(Modal, { portalHostName: RETURN_QUESTION_FORM_PORTAL_HOST_NAME, testID: "return-questions-form-modal", visible: visible, scroll: true, showCloseButton: true, onClose: onClose },
35
- React.createElement(View, { style: style.modalContent },
36
- React.createElement(Text, { level: 3, style: style.title, heading: true }, titleText),
37
- React.createElement(ReturnQuestions, { portalHostName: RETURN_QUESTION_FORM_PORTAL_HOST_NAME, returnQuestions: returnQuestions }),
38
- React.createElement(Button, { style: style.submit, testID: "return-questions-button", onPress: handleOnSubmit }, submitButtonText)))));
39
- };
40
- export { ReturnQuestionsForm };
@@ -1,12 +0,0 @@
1
- declare const style: {
2
- modalContent: {
3
- paddingHorizontal: number;
4
- };
5
- submit: {
6
- marginTop: number;
7
- };
8
- title: {
9
- marginBottom: number;
10
- };
11
- };
12
- export { style };
@@ -1,15 +0,0 @@
1
- import { StyleSheet } from "react-native";
2
- import { theme } from "@lookiero/sty-psp-ui";
3
- const { space6, space8 } = theme();
4
- const style = StyleSheet.create({
5
- modalContent: {
6
- paddingHorizontal: space6,
7
- },
8
- submit: {
9
- marginTop: space8,
10
- },
11
- title: {
12
- marginBottom: space6,
13
- },
14
- });
15
- export { style };
@@ -1,40 +0,0 @@
1
- declare const style: {
2
- description: {
3
- color: string;
4
- };
5
- desktopInfo: {
6
- borderTopLeftRadius: number;
7
- borderTopRightRadius: number;
8
- };
9
- desktopLayoutSpacing: {
10
- paddingVertical: number;
11
- };
12
- headerWrapper: {
13
- display: "flex";
14
- flexDirection: "column";
15
- };
16
- info: {
17
- backgroundColor: string;
18
- paddingBottom: number;
19
- paddingHorizontal: number;
20
- paddingTop: number;
21
- };
22
- layout: {
23
- flex: number;
24
- justifyContent: "center";
25
- };
26
- safeAreaView: {
27
- backgroundColor: string;
28
- flex: number;
29
- };
30
- scrollView: {
31
- flex: number;
32
- };
33
- submit: {
34
- backgroundColor: string;
35
- borderBottomLeftRadius: number;
36
- borderBottomRightRadius: number;
37
- padding: number;
38
- };
39
- };
40
- export { style };
@@ -1,43 +0,0 @@
1
- import { StyleSheet } from "react-native";
2
- import { theme } from "@lookiero/sty-psp-ui";
3
- const { borderRadius5, colorBgPrimaryLight, colorBgBase, colorTextMedium, space4, space6, space8 } = theme();
4
- const style = StyleSheet.create({
5
- description: {
6
- color: colorTextMedium,
7
- },
8
- desktopInfo: {
9
- borderTopLeftRadius: borderRadius5,
10
- borderTopRightRadius: borderRadius5,
11
- },
12
- desktopLayoutSpacing: {
13
- paddingVertical: space8,
14
- },
15
- headerWrapper: {
16
- display: "flex",
17
- flexDirection: "column",
18
- },
19
- info: {
20
- backgroundColor: colorBgBase,
21
- paddingBottom: space4,
22
- paddingHorizontal: space6,
23
- paddingTop: space8,
24
- },
25
- layout: {
26
- flex: 1,
27
- justifyContent: "center",
28
- },
29
- safeAreaView: {
30
- backgroundColor: colorBgPrimaryLight,
31
- flex: 1,
32
- },
33
- scrollView: {
34
- flex: 1,
35
- },
36
- submit: {
37
- backgroundColor: colorBgBase,
38
- borderBottomLeftRadius: borderRadius5,
39
- borderBottomRightRadius: borderRadius5,
40
- padding: space6,
41
- },
42
- });
43
- export { style };
@@ -1,13 +0,0 @@
1
- import { FC } from "react";
2
- import { LayoutRectangle } from "react-native";
3
- import { PricingProjection } from "../../../../../../projection/pricing/pricing";
4
- interface StickyPricingProps {
5
- readonly pricing: PricingProjection;
6
- readonly totalCheckoutItemsKept: number;
7
- readonly collapsed: boolean;
8
- readonly onPress: () => void;
9
- readonly onSubmit: () => void;
10
- readonly onLayout?: ({ width, height }: LayoutRectangle) => void;
11
- }
12
- declare const StickyPricing: FC<StickyPricingProps>;
13
- export { StickyPricing };
@@ -1,9 +0,0 @@
1
- import React from "react";
2
- import { Sticky } from "@lookiero/sty-psp-ui";
3
- import { Body } from "../../../../components/layouts/body/Body";
4
- import { Pricing } from "../pricing/Pricing";
5
- import { style } from "./StickyPricing.style";
6
- const StickyPricing = ({ pricing, totalCheckoutItemsKept, collapsed, onPress, onSubmit, onLayout, }) => (React.createElement(Sticky, { style: style.sticky, onLayout: onLayout },
7
- React.createElement(Body, null,
8
- React.createElement(Pricing, { balanceDiscount: pricing.balanceDiscount, collapsed: collapsed, discount: pricing.discount, discountPercentage: pricing.discountPercentage, pendingToPay: pricing.pendingToPay, service: pricing.service, subtotal: pricing.subtotal, totalCheckoutItemsKept: totalCheckoutItemsKept, onPress: onPress, onSubmit: onSubmit }))));
9
- export { StickyPricing };
@@ -1,7 +0,0 @@
1
- declare const style: {
2
- sticky: {
3
- paddingBottom: number;
4
- paddingTop: number;
5
- };
6
- };
7
- export { style };
@@ -1,10 +0,0 @@
1
- import { StyleSheet } from "react-native";
2
- import { theme } from "@lookiero/sty-psp-ui";
3
- const { space3, space4 } = theme();
4
- const style = StyleSheet.create({
5
- sticky: {
6
- paddingBottom: space4,
7
- paddingTop: space3,
8
- },
9
- });
10
- export { style };
@@ -1,17 +0,0 @@
1
- import { Query, QueryHandlerFunction, QueryHandlerFunctionArgs } from "@lookiero/messaging";
2
- type IsCheckoutAccessibleByCustomerIdProjection = boolean;
3
- declare const VIEW_IS_CHECKOUT_ACCESSIBLE_BY_CUSTOMER_ID = "view_is_checkout_accessible_by_customer_id";
4
- interface ViewIsCheckoutAccessibleByCustomerIdPayload {
5
- readonly customerId: string | undefined;
6
- }
7
- interface ViewIsCheckoutAccessibleByCustomerId extends Query<typeof VIEW_IS_CHECKOUT_ACCESSIBLE_BY_CUSTOMER_ID>, ViewIsCheckoutAccessibleByCustomerIdPayload {
8
- }
9
- interface ViewIsCheckoutAccessibleByCustomerIdFunction {
10
- (payload: ViewIsCheckoutAccessibleByCustomerIdPayload): ViewIsCheckoutAccessibleByCustomerId;
11
- }
12
- declare const viewIsCheckoutAccessibleByCustomerId: ViewIsCheckoutAccessibleByCustomerIdFunction;
13
- interface ViewIsCheckoutAccessibleByCustomerIdHandlerFunctionArgs extends QueryHandlerFunctionArgs {
14
- }
15
- declare const viewIsCheckoutAccessibleByCustomerIdHandler: QueryHandlerFunction<ViewIsCheckoutAccessibleByCustomerId, IsCheckoutAccessibleByCustomerIdProjection, ViewIsCheckoutAccessibleByCustomerIdHandlerFunctionArgs>;
16
- export type { IsCheckoutAccessibleByCustomerIdProjection };
17
- export { VIEW_IS_CHECKOUT_ACCESSIBLE_BY_CUSTOMER_ID, viewIsCheckoutAccessibleByCustomerId, viewIsCheckoutAccessibleByCustomerIdHandler, };
@@ -1,13 +0,0 @@
1
- import { query } from "@lookiero/messaging";
2
- import { viewFirstAvailableCheckoutByCustomerId } from "./viewFirstAvailableCheckoutByCustomerId";
3
- import { viewIsCheckoutEnabledByCustomerId } from "./viewIsCheckoutEnabledByCustomerId";
4
- const VIEW_IS_CHECKOUT_ACCESSIBLE_BY_CUSTOMER_ID = "view_is_checkout_accessible_by_customer_id";
5
- const viewIsCheckoutAccessibleByCustomerId = (payload) => ({
6
- ...query({ name: VIEW_IS_CHECKOUT_ACCESSIBLE_BY_CUSTOMER_ID }),
7
- ...payload,
8
- });
9
- const isNonEmptyCustomerId = (customerId) => Boolean(customerId);
10
- const viewIsCheckoutAccessibleByCustomerIdHandler = ({ queryBus }) => async ({ customerId }) => isNonEmptyCustomerId(customerId) &&
11
- Boolean(await queryBus(viewFirstAvailableCheckoutByCustomerId({ customerId }))) &&
12
- Boolean(await queryBus(viewIsCheckoutEnabledByCustomerId({ customerId })));
13
- export { VIEW_IS_CHECKOUT_ACCESSIBLE_BY_CUSTOMER_ID, viewIsCheckoutAccessibleByCustomerId, viewIsCheckoutAccessibleByCustomerIdHandler, };
@@ -1,14 +0,0 @@
1
- declare enum Country {
2
- ES = "ES",
3
- FR = "FR",
4
- GB = "GB",
5
- BE = "BE",
6
- LU = "LU",
7
- IT = "IT",
8
- PT = "PT",
9
- DE = "DE",
10
- AT = "AT",
11
- NL = "NL",
12
- SE = "SE"
13
- }
14
- export { Country };
@@ -1,15 +0,0 @@
1
- var Country;
2
- (function (Country) {
3
- Country["ES"] = "ES";
4
- Country["FR"] = "FR";
5
- Country["GB"] = "GB";
6
- Country["BE"] = "BE";
7
- Country["LU"] = "LU";
8
- Country["IT"] = "IT";
9
- Country["PT"] = "PT";
10
- Country["DE"] = "DE";
11
- Country["AT"] = "AT";
12
- Country["NL"] = "NL";
13
- Country["SE"] = "SE";
14
- })(Country || (Country = {}));
15
- export { Country };
@@ -1,8 +0,0 @@
1
- import { Country } from "@lookiero/sty-psp-locale";
2
- import { Segment } from "@lookiero/sty-psp-segment";
3
- interface Customer {
4
- readonly customerId: string;
5
- readonly country: Country;
6
- readonly segment: Segment;
7
- }
8
- export type { Customer };
@@ -1 +0,0 @@
1
- export {};
@@ -1,12 +0,0 @@
1
- declare enum Locale {
2
- ES = "es",
3
- FR = "fr",
4
- EN = "en",
5
- IT = "it",
6
- PT = "pt",
7
- DE = "de",
8
- AT = "at",
9
- NL = "nl",
10
- SE = "sv"
11
- }
12
- export { Locale };
@@ -1,13 +0,0 @@
1
- var Locale;
2
- (function (Locale) {
3
- Locale["ES"] = "es";
4
- Locale["FR"] = "fr";
5
- Locale["EN"] = "en";
6
- Locale["IT"] = "it";
7
- Locale["PT"] = "pt";
8
- Locale["DE"] = "de";
9
- Locale["AT"] = "at";
10
- Locale["NL"] = "nl";
11
- Locale["SE"] = "sv";
12
- })(Locale || (Locale = {}));
13
- export { Locale };
@@ -1,6 +0,0 @@
1
- interface Order {
2
- readonly orderNumber: number;
3
- readonly isFirstOrder: boolean;
4
- readonly coupon: string | null;
5
- }
6
- export type { Order };
@@ -1 +0,0 @@
1
- export {};
@@ -1,10 +0,0 @@
1
- import { Currency } from "../../domain/checkoutItem/model/currency";
2
- interface PriceProjection {
3
- readonly amount: number;
4
- readonly currency: Currency;
5
- readonly discountedPrice?: {
6
- readonly amount: number;
7
- readonly percentage: number;
8
- };
9
- }
10
- export type { PriceProjection };
@@ -1 +0,0 @@
1
- export {};
@@ -1,20 +0,0 @@
1
- import { Country } from "./country";
2
- interface SizeProjection {
3
- readonly id: string;
4
- readonly lookiero: string;
5
- readonly uk: string;
6
- readonly it: string;
7
- readonly europe: string;
8
- readonly unique: boolean;
9
- readonly visualOrder?: number;
10
- }
11
- interface SizeFunctionArgs {
12
- readonly size: SizeProjection;
13
- readonly country: Country;
14
- }
15
- interface SizeFunction {
16
- (args: SizeFunctionArgs): string;
17
- }
18
- declare const size: SizeFunction;
19
- export type { SizeProjection };
20
- export { size };
@@ -1,3 +0,0 @@
1
- import { Country } from "./country";
2
- const size = ({ size, country }) => (country === Country.GB ? size.uk : size.lookiero);
3
- export { size };
@@ -1,2 +0,0 @@
1
- type Subscription = "o" | "m" | "b" | "q";
2
- export type { Subscription };
@@ -1 +0,0 @@
1
- export {};
@@ -1,10 +0,0 @@
1
- import { FC } from "react";
2
- import { StyleProp, TextStyle } from "react-native";
3
- type ErrorStyle = StyleProp<TextStyle>;
4
- interface ErrorProps {
5
- readonly error?: string | null;
6
- readonly style?: ErrorStyle;
7
- }
8
- declare const Error: FC<ErrorProps>;
9
- export type { ErrorStyle };
10
- export { Error };
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- import { COLOR, Text } from "@lookiero/aurora";
3
- const Error = ({ error, style: customStyle }) => (React.createElement(Text, { color: COLOR.TEXT_ERROR, level: 2, style: customStyle, detail: true }, error));
4
- export { Error };
package/pact.config.ts DELETED
@@ -1,31 +0,0 @@
1
- import { V3MockServer } from "@pact-foundation/pact";
2
-
3
- interface StringObject {
4
- readonly [k: string]: string;
5
- }
6
-
7
- const DEFAULT_PACT_OPTIONS: StringObject = { dir: ".contracts", logDir: ".pact/logs" };
8
-
9
- const AUTH_TOKEN =
10
- "eyJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6InBpY2tlcixwYWNrZXIiLCJzdWIiOiIxIiwiaWF0IjoxNjAyODQ4MzEyfQ.gCs2_vBcJsXt4EdreNSjDI8NWkOTQ5Cy4SwtrGnuJ44";
11
-
12
- const DEFAULT_REQUEST_HEADERS: StringObject = {
13
- Authorization: `Bearer ${AUTH_TOKEN}`,
14
- ["Content-Type"]: "application/json",
15
- };
16
-
17
- const DEFAULT_RESPONSE_HEADERS: StringObject = { ["Content-Type"]: "application/json" };
18
-
19
- interface FromMockServerUrlToApiUrlFunction {
20
- (mockServer: V3MockServer): string;
21
- }
22
-
23
- const fromMockServerUrlToApiUrl: FromMockServerUrlToApiUrlFunction = (mockServer) => mockServer.url.concat("/api");
24
-
25
- export {
26
- fromMockServerUrlToApiUrl,
27
- AUTH_TOKEN,
28
- DEFAULT_PACT_OPTIONS,
29
- DEFAULT_REQUEST_HEADERS,
30
- DEFAULT_RESPONSE_HEADERS,
31
- };
package/pact.publish.js DELETED
@@ -1,32 +0,0 @@
1
- const pact = require("@pact-foundation/pact-node");
2
-
3
- const path = require("path");
4
- const pwd = process.cwd();
5
-
6
- const pjson = require(`${pwd}/package.json`);
7
-
8
- const projectName = "checkout-front";
9
-
10
- const branchName =
11
- process.env.BRANCH_NAME ||
12
- (() => {
13
- throw "There is no defined branch";
14
- })();
15
-
16
- const options = {
17
- pactFilesOrDirs: [path.resolve(pwd, ".contracts")],
18
- pactBroker: "https://pact.dev.envs.lookiero.tech",
19
- consumerVersion: pjson.version,
20
- tags: [branchName, projectName],
21
- };
22
-
23
- console.log("Publishing contracts with options:", options);
24
-
25
- pact
26
- .publishPacts(options)
27
- .then(() => {
28
- console.log("Pact contract publishing complete!");
29
- })
30
- .catch((exception) => {
31
- console.log("Pact contract publishing failed: ", exception);
32
- });