@lookiero/checkout 8.14.0-beta.2 → 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 (225) 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 +0 -2
  26. package/dist/src/infrastructure/ui/Root.js +2 -2
  27. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.d.ts +0 -5
  28. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.js +5 -3
  29. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.d.ts +0 -5
  30. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.js +1 -1
  31. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/behaviors/isChildReturnQuestion.js +2 -1
  32. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionItem.d.ts +3 -3
  33. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.d.ts +4 -8
  34. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionFeedbackItem/HostDefaultReturnQuestionFeedbackItem.d.ts +2 -1
  35. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionFeedbackItem/HostDefaultReturnQuestionFeedbackItem.js +1 -0
  36. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.d.ts +2 -1
  37. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.js +8 -6
  38. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.d.ts +2 -1
  39. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.js +2 -1
  40. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.d.ts +2 -1
  41. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +4 -3
  42. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.d.ts +1 -1
  43. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.js +1 -1
  44. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/form/HostStackReturnQuestionItem.d.ts +2 -1
  45. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/form/HostStackReturnQuestionItem.js +2 -1
  46. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.d.ts +2 -1
  47. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.js +7 -5
  48. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.d.ts +1 -3
  49. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.js +6 -4
  50. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.d.ts +2 -1
  51. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.js +2 -1
  52. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.d.ts +2 -1
  53. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.js +6 -5
  54. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.d.ts +2 -1
  55. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.js +2 -1
  56. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.d.ts +2 -1
  57. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.js +2 -1
  58. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/util/returnQuestionFeedback.js +18 -9
  59. package/dist/src/infrastructure/ui/routing/Routing.d.ts +0 -7
  60. package/dist/src/infrastructure/ui/routing/Routing.js +5 -5
  61. package/dist/src/infrastructure/ui/views/App.d.ts +0 -8
  62. package/dist/src/infrastructure/ui/views/App.js +6 -8
  63. package/dist/src/infrastructure/ui/views/item/Item.d.ts +0 -5
  64. package/dist/src/infrastructure/ui/views/item/Item.js +3 -3
  65. package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.d.ts +0 -2
  66. package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js +2 -2
  67. package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.d.ts +1 -1
  68. package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.js +1 -1
  69. package/dist/src/infrastructure/ui/views/item/components/itemActions/ItemActions.d.ts +1 -5
  70. package/dist/src/infrastructure/ui/views/item/components/itemActions/ItemActions.js +2 -2
  71. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.d.ts +0 -5
  72. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.js +3 -3
  73. package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.d.ts +3 -3
  74. package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.js +2 -2
  75. package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.d.ts +1 -1
  76. package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.js +1 -1
  77. package/dist/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.d.ts +0 -2
  78. package/dist/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.js +2 -2
  79. package/dist/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.d.ts +0 -5
  80. package/dist/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.js +2 -2
  81. package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.d.ts +0 -5
  82. package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.js +2 -2
  83. package/dist/src/infrastructure/ui/views/return/Return.d.ts +0 -5
  84. package/dist/src/infrastructure/ui/views/return/Return.js +2 -2
  85. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +0 -5
  86. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.js +15 -13
  87. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +6 -2
  88. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.js +6 -2
  89. package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.js +2 -2
  90. package/dist/src/projection/returnQuestion/returnQuestion.constants.d.ts +9 -0
  91. package/dist/src/projection/returnQuestion/returnQuestion.constants.js +10 -0
  92. package/dist/src/projection/returnQuestion/returnQuestion.d.ts +23 -16
  93. package/dist/src/projection/returnQuestion/returnQuestion.js +1 -11
  94. package/dist/src/projection/returnQuestion/returnQuestion.metadata.d.ts +12 -0
  95. package/dist/src/projection/returnQuestion/returnQuestion.metadata.js +1 -0
  96. package/dist/src/projection/returnQuestion/returnQuestion.typeguard.d.ts +5 -0
  97. package/dist/src/projection/returnQuestion/returnQuestion.typeguard.js +10 -0
  98. package/dist/src/version.d.ts +1 -1
  99. package/dist/src/version.js +1 -1
  100. package/jest.setup.js +0 -20
  101. package/package.json +9 -8
  102. package/src/ExpoRoot.tsx +2 -2
  103. package/src/infrastructure/domain/uiSetting/react/useUpdateUiSetting.test.ts +1 -1
  104. package/src/infrastructure/projection/payment/react/useViewPaymentFlowPayloadByCheckoutId.ts +1 -1
  105. package/src/infrastructure/projection/returnQuestion/react/useListReturnQuestionsByCheckoutItemId.test.ts +4 -9
  106. package/src/infrastructure/projection/returnQuestion/returnQuestions.mock.ts +72 -117
  107. package/src/infrastructure/ui/Root.tsx +1 -4
  108. package/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.test.tsx +10 -12
  109. package/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.tsx +11 -22
  110. package/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.test.tsx +10 -9
  111. package/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.tsx +1 -8
  112. package/src/infrastructure/ui/components/organisms/returnQuestions/behaviors/isChildReturnQuestion.ts +2 -1
  113. package/src/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionItem.test.tsx +7 -9
  114. package/src/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionItem.tsx +3 -3
  115. package/src/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.ts +4 -9
  116. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionFeedbackItem/HostDefaultReturnQuestionFeedbackItem.test.tsx +7 -13
  117. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionFeedbackItem/HostDefaultReturnQuestionFeedbackItem.tsx +4 -2
  118. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.test.tsx +8 -14
  119. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.tsx +13 -7
  120. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.tsx +7 -5
  121. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.ts +1 -1
  122. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.test.tsx +10 -14
  123. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.tsx +8 -7
  124. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/form/HostStackReturnQuestionItem.tsx +5 -5
  125. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.test.tsx +43 -36
  126. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.tsx +10 -9
  127. package/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.tsx +13 -14
  128. package/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.test.tsx +8 -14
  129. package/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.tsx +6 -4
  130. package/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.tsx +8 -7
  131. package/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.test.tsx +23 -25
  132. package/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.tsx +5 -3
  133. package/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.test.tsx +9 -29
  134. package/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.tsx +7 -5
  135. package/src/infrastructure/ui/components/organisms/returnQuestions/util/__snapshots__/returnQuestionFeedback.test.ts.snap +5 -4
  136. package/src/infrastructure/ui/components/organisms/returnQuestions/util/returnQuestionFeedback.ts +32 -18
  137. package/src/infrastructure/ui/routing/Routing.tsx +5 -13
  138. package/src/infrastructure/ui/views/App.tsx +11 -21
  139. package/src/infrastructure/ui/views/item/Item.tsx +2 -8
  140. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.ts +1 -1
  141. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.tsx +3 -9
  142. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/__snapshots__/GetOutOfCheckoutModal.test.tsx.snap +7 -0
  143. package/src/infrastructure/ui/views/item/components/itemActions/ItemActions.tsx +1 -8
  144. package/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.tsx +5 -16
  145. package/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.ts +1 -1
  146. package/src/infrastructure/ui/views/item/components/selectModal/SelectModal.tsx +6 -6
  147. package/src/infrastructure/ui/views/item/components/selectModal/__snapshots__/SelecModal.test.tsx.snap +7 -0
  148. package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.tsx +3 -4
  149. package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/__snapshots__/SizeWithoutStockModal.test.tsx.snap +7 -0
  150. package/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.tsx +2 -12
  151. package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.tsx +4 -14
  152. package/src/infrastructure/ui/views/return/Return.tsx +1 -8
  153. package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.ts +6 -2
  154. package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx +39 -34
  155. package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.tsx +2 -2
  156. package/src/infrastructure/ui/views/summary/components/collapsiblePricing/__snapshots__/CollapsiblePricing.test.tsx.snap +2 -2
  157. package/src/projection/returnQuestion/listReturnQuestionsByCheckoutItemId.test.ts +4 -12
  158. package/src/projection/returnQuestion/returnQuestion.constants.ts +10 -0
  159. package/src/projection/returnQuestion/returnQuestion.metadata.ts +17 -0
  160. package/src/projection/returnQuestion/returnQuestion.ts +42 -20
  161. package/src/projection/returnQuestion/returnQuestion.typeguard.ts +24 -0
  162. package/dist/pact.config.d.ts +0 -13
  163. package/dist/pact.config.js +0 -9
  164. package/dist/public/public/assets/adaptive-icon.png +0 -0
  165. package/dist/public/public/assets/favicon.png +0 -0
  166. package/dist/public/public/assets/icon.png +0 -0
  167. package/dist/public/public/assets/splash.png +0 -0
  168. package/dist/public/public/images/not-found.png +0 -0
  169. package/dist/src/infrastructure/projection/bookedProductsVariants/bookedProductsVariants.mock.d.ts +0 -3
  170. package/dist/src/infrastructure/projection/bookedProductsVariants/bookedProductsVariants.mock.js +0 -27
  171. package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.d.ts +0 -1
  172. package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.js +0 -48
  173. package/dist/src/infrastructure/projection/checkout/checkout.mock.d.ts +0 -19
  174. package/dist/src/infrastructure/projection/checkout/checkout.mock.js +0 -21
  175. package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.d.ts +0 -1
  176. package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.js +0 -109
  177. package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.d.ts +0 -1
  178. package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.js +0 -49
  179. package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.d.ts +0 -1
  180. package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.js +0 -44
  181. package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.d.ts +0 -1
  182. package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.js +0 -44
  183. package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.d.ts +0 -1
  184. package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.js +0 -44
  185. package/dist/src/infrastructure/projection/checkoutBooking/checkoutBooking.mock.d.ts +0 -3
  186. package/dist/src/infrastructure/projection/checkoutBooking/checkoutBooking.mock.js +0 -6
  187. package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.d.ts +0 -1
  188. package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.js +0 -49
  189. package/dist/src/infrastructure/projection/checkoutItem/checkoutItem.mock.d.ts +0 -15
  190. package/dist/src/infrastructure/projection/checkoutItem/checkoutItem.mock.js +0 -43
  191. package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.d.ts +0 -1
  192. package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.js +0 -50
  193. package/dist/src/infrastructure/projection/checkoutQuestion/checkoutQuestions.mock.d.ts +0 -3
  194. package/dist/src/infrastructure/projection/checkoutQuestion/checkoutQuestions.mock.js +0 -103
  195. package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.d.ts +0 -1
  196. package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.js +0 -48
  197. package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.d.ts +0 -1
  198. package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.js +0 -109
  199. package/dist/src/infrastructure/projection/payment/paymentFlowPayload.mock.d.ts +0 -6
  200. package/dist/src/infrastructure/projection/payment/paymentFlowPayload.mock.js +0 -183
  201. package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.d.ts +0 -1
  202. package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.js +0 -48
  203. package/dist/src/infrastructure/projection/pricing/pricing.mock.d.ts +0 -9
  204. package/dist/src/infrastructure/projection/pricing/pricing.mock.js +0 -42
  205. package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.d.ts +0 -1
  206. package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.js +0 -48
  207. package/dist/src/infrastructure/projection/returnQuestion/returnQuestions.mock.d.ts +0 -3
  208. package/dist/src/infrastructure/projection/returnQuestion/returnQuestions.mock.js +0 -400
  209. package/dist/src/infrastructure/ui/views/App.style.d.ts +0 -6
  210. package/dist/src/infrastructure/ui/views/App.style.js +0 -7
  211. package/pact.config.ts +0 -31
  212. package/pact.publish.js +0 -32
  213. package/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.ts +0 -62
  214. package/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.ts +0 -128
  215. package/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.ts +0 -63
  216. package/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.ts +0 -57
  217. package/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.ts +0 -57
  218. package/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.ts +0 -57
  219. package/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.ts +0 -63
  220. package/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.ts +0 -64
  221. package/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.ts +0 -62
  222. package/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.ts +0 -136
  223. package/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.ts +0 -62
  224. package/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.ts +0 -62
  225. package/src/infrastructure/ui/views/App.style.ts +0 -9
@@ -1,183 +0,0 @@
1
- const paymentFlowPayloadForKeptItems = {
2
- bookingId: "",
3
- orderId: "3062898",
4
- comment: "",
5
- items: [
6
- { reference: "9P1435C9L" },
7
- { reference: "9C2017C22M" },
8
- { reference: "9J1800C22M" },
9
- { reference: "9M608C15L" },
10
- { reference: "10S769C48S" },
11
- ],
12
- };
13
- const paymentFlowPayloadForReturnedItems = {
14
- bookingId: "",
15
- orderId: "3071170",
16
- comment: "",
17
- items: [
18
- {
19
- reference: "9J1800C22M",
20
- feedback: {
21
- size: { name: "La talla es...", value: "3" },
22
- price: { name: "El precio es...", value: "8" },
23
- quality: { name: "La calidad es...", value: "15" },
24
- style: { name: "El estilo es...", value: "5" },
25
- shape: { name: "La forma es...", value: "12" },
26
- comment: { name: "¿Algo más sobre esta prenda?", value: "Me queda pequeño" },
27
- },
28
- },
29
- {
30
- reference: "10S769C48S",
31
- feedback: {
32
- size: { name: "La talla es...", value: "1" },
33
- price: { name: "El precio es...", value: "10" },
34
- quality: { name: "La calidad es...", value: "15" },
35
- style: { name: "El estilo es...", value: "5" },
36
- shape: { name: "La forma es...", value: "14" },
37
- comment: { name: "¿Algo más sobre esta prenda?", value: "Me queda grande y no me gusta demasiado" },
38
- },
39
- },
40
- {
41
- reference: "9C2017C22M",
42
- feedback: {
43
- size: { name: "La talla es...", value: "2" },
44
- price: { name: "El precio es...", value: "10" },
45
- quality: { name: "La calidad es...", value: "15" },
46
- style: { name: "El estilo es...", value: "5" },
47
- shape: { name: "La forma es...", value: "12" },
48
- comment: { name: "¿Algo más sobre esta prenda?", value: "Demasiado caro para mi presupuesto" },
49
- },
50
- },
51
- {
52
- reference: "9M608C15L",
53
- feedback: {
54
- style: { name: "El estilo es...", value: "7" },
55
- shape: { name: "La forma es...", value: "14" },
56
- quality: { name: "La calidad es...", value: "15" },
57
- price: { name: "El precio es...", value: "9" },
58
- size: { name: "La talla es...", value: "2" },
59
- comment: { name: "¿Algo más sobre esta prenda?", value: "No me gusta nada" },
60
- },
61
- },
62
- {
63
- reference: "9P1435C9L",
64
- feedback: {
65
- quality: { name: "La calidad es...", value: "17" },
66
- size: { name: "La talla es...", value: "2" },
67
- price: { name: "El precio es...", value: "10" },
68
- style: { name: "El estilo es...", value: "5" },
69
- shape: { name: "La forma es...", value: "12" },
70
- comment: { name: "¿Algo más sobre esta prenda?", value: "Demasiado caro para la calidad que ofrece" },
71
- },
72
- },
73
- ],
74
- };
75
- const paymentFlowPayloadForReplacedItems = {
76
- bookingId: "ca2e03e6-1644-4406-a379-0e5c3c321f32",
77
- orderId: "3071171",
78
- comment: "",
79
- items: [
80
- {
81
- reference: "9J1800C22M",
82
- sizeChange: {
83
- brand: "ONLY",
84
- color: "blue_dark",
85
- description: "Onlglamour Sweater knit T. XS C. blue_dark",
86
- id: "5a95dffc-5031-4c2a-b8bc-f100c4710336",
87
- reference: "9J1800C22XS",
88
- size: "XS",
89
- title: "Onlglamour Sweater knit ",
90
- },
91
- },
92
- {
93
- reference: "10S769C48S",
94
- sizeChange: {
95
- brand: "FRANSA",
96
- color: "brick",
97
- description: "Zawov Shirt fransa T. XS C. brick",
98
- id: "b74df550-a4ab-4fb0-9a34-5767c700dcd0",
99
- reference: "10S769C48XS",
100
- size: "XS",
101
- title: "Zawov Shirt fransa ",
102
- },
103
- },
104
- {
105
- reference: "9C2017C22M",
106
- sizeChange: {
107
- brand: "VERO MODA",
108
- color: "blue_dark",
109
- description: "Vmlina Tshirt vback T. XS C. blue_dark",
110
- id: "349a4aeb-d8ca-4f3d-9efb-5b333da22290",
111
- reference: "9C2017C22XS",
112
- size: "XS",
113
- title: "Vmlina Tshirt vback ",
114
- },
115
- },
116
- {
117
- reference: "9M608C15L",
118
- sizeChange: {
119
- brand: "ESPRIT CASUAL",
120
- color: "beige",
121
- description: "Hope Jeans skinny T. S C. beige",
122
- id: "86aed12f-81e1-4a09-9c68-15dce7a844b7",
123
- reference: "9M608C15S",
124
- size: "S",
125
- title: "Hope Jeans skinny ",
126
- },
127
- },
128
- {
129
- reference: "9P1435C9L",
130
- sizeChange: {
131
- brand: "ICHI",
132
- color: "orange",
133
- description: "Kate Pant mazarine T. S C. orange",
134
- id: "34f311e2-ba8e-4261-bf70-6f25fc0e9ed9",
135
- reference: "9P1435C9S",
136
- size: "S",
137
- title: "Kate Pant mazarine ",
138
- },
139
- },
140
- ],
141
- };
142
- const paymentFlowPayload = {
143
- bookingId: "7a3c298a-a3ee-45ac-a452-e276c1c98069",
144
- orderId: "3062898",
145
- comment: "",
146
- items: [
147
- {
148
- reference: "9P1435C9L",
149
- feedback: {
150
- size: {
151
- name: "La talla es...",
152
- value: "1",
153
- },
154
- price: {
155
- name: "El precio es...",
156
- value: "10",
157
- },
158
- },
159
- },
160
- {
161
- reference: "9C2017C22M",
162
- },
163
- {
164
- reference: "9J1800C22M",
165
- },
166
- {
167
- reference: "9M608C15L",
168
- },
169
- {
170
- reference: "10S769C48S",
171
- sizeChange: {
172
- brand: "FRANSA",
173
- color: "brick",
174
- description: "Zawov Shirt fransa T. M C. brick",
175
- id: "dbabf321-2ca8-4ac0-a727-05e39779e3b3",
176
- reference: "10S769C48M",
177
- size: "M",
178
- title: "Zawov Shirt fransa ",
179
- },
180
- },
181
- ],
182
- };
183
- export { paymentFlowPayload, paymentFlowPayloadForKeptItems, paymentFlowPayloadForReturnedItems, paymentFlowPayloadForReplacedItems, };
@@ -1,48 +0,0 @@
1
- import { MatchersV3, PactV3 } from "@pact-foundation/pact";
2
- import { fetchHttpPost } from "@lookiero/sty-psp-http";
3
- import { AUTH_TOKEN, DEFAULT_PACT_OPTIONS, DEFAULT_REQUEST_HEADERS, DEFAULT_RESPONSE_HEADERS, fromMockServerUrlToApiUrl, } from "../../../../pact.config";
4
- import { httpPricingByCheckoutIdView } from "./httpPricingByCheckoutIdView";
5
- import { pricing } from "./pricing.mock";
6
- const provider = new PactV3({
7
- ...DEFAULT_PACT_OPTIONS,
8
- consumer: "STY-BOX_CHECKOUT-FRONT",
9
- provider: "STY-BOX_CHECKOUT-BACK_ViewPricingByCheckoutId",
10
- });
11
- const checkoutId = "6f720954-8039-4bed-9596-34fc5a02131b";
12
- const pricingResponse = {
13
- result: pricing(),
14
- };
15
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
16
- // @ts-ignore
17
- const EXPECTED_BODY = MatchersV3.like(pricingResponse);
18
- describe("STY-BOX_CHECKOUT-BACK_ViewPricingByCheckoutId API", () => {
19
- it("returns a valid pricing for the given checkout", () => {
20
- provider
21
- .given("a valid pricing for the given checkout")
22
- .uponReceiving("pricing projection")
23
- .withRequest({
24
- method: "POST",
25
- path: "/api/view-pricing-by-checkout-id",
26
- headers: DEFAULT_REQUEST_HEADERS,
27
- body: { checkoutId },
28
- })
29
- .willRespondWith({
30
- status: 200,
31
- headers: DEFAULT_RESPONSE_HEADERS,
32
- body: EXPECTED_BODY,
33
- });
34
- return provider.executeTest(async (mockserver) => {
35
- const httpPost = fetchHttpPost({
36
- apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
37
- getAuthToken: () => Promise.resolve(AUTH_TOKEN),
38
- device: "web",
39
- version: "1.0.0",
40
- });
41
- const response = await httpPricingByCheckoutIdView({ httpPost })({
42
- checkoutId,
43
- signal: undefined,
44
- });
45
- expect(response).toStrictEqual(pricingResponse.result);
46
- });
47
- });
48
- });
@@ -1,9 +0,0 @@
1
- import { PricingProjection } from "../../../projection/pricing/pricing";
2
- interface PricingFunctionArgs {
3
- readonly paidWithPromocode: boolean;
4
- }
5
- interface PricingFunction {
6
- (args?: PricingFunctionArgs): PricingProjection;
7
- }
8
- declare const pricing: PricingFunction;
9
- export { pricing };
@@ -1,42 +0,0 @@
1
- import { Currency } from "../../../domain/checkoutItem/model/currency";
2
- const pricing = ({ paidWithPromocode } = { paidWithPromocode: false }) => ({
3
- orderTotal: {
4
- amount: 18301,
5
- currency: Currency.EUR,
6
- },
7
- pendingToPay: {
8
- amount: 16301,
9
- currency: Currency.EUR,
10
- },
11
- subtotal: {
12
- amount: 21801,
13
- currency: Currency.EUR,
14
- },
15
- discount: {
16
- amount: -2500,
17
- currency: Currency.EUR,
18
- },
19
- discountPercentage: 25,
20
- balanceDiscount: {
21
- amount: -2000,
22
- currency: Currency.EUR,
23
- },
24
- service: {
25
- reference: "LK-service",
26
- originalPrice: {
27
- amount: 10.0,
28
- currency: Currency.EUR,
29
- },
30
- discount: {
31
- amount: 0,
32
- currency: Currency.EUR,
33
- },
34
- finalPrice: {
35
- amount: -1000,
36
- currency: Currency.EUR,
37
- },
38
- prepaid: true,
39
- paidWithPromocode,
40
- },
41
- });
42
- export { pricing };
@@ -1,48 +0,0 @@
1
- import { MatchersV3, PactV3 } from "@pact-foundation/pact";
2
- import { fetchHttpPost } from "@lookiero/sty-psp-http";
3
- import { AUTH_TOKEN, DEFAULT_PACT_OPTIONS, DEFAULT_REQUEST_HEADERS, DEFAULT_RESPONSE_HEADERS, fromMockServerUrlToApiUrl, } from "../../../../pact.config";
4
- import { httpReturnQuestionsByCheckoutItemIdView } from "./httpReturnQuestionsByCheckoutItemIdView";
5
- import { returnQuestions } from "./returnQuestions.mock";
6
- const provider = new PactV3({
7
- ...DEFAULT_PACT_OPTIONS,
8
- consumer: "STY-BOX_CHECKOUT-FRONT",
9
- provider: "STY-BOX_CHECKOUT-BACK_ListReturnQuestionsByCheckoutItemId",
10
- });
11
- const checkoutItemId = "52440ae5-7a4c-498b-8b35-08ecfde15776";
12
- const returnQuestionsResponse = {
13
- result: returnQuestions,
14
- };
15
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
16
- // @ts-ignore
17
- const EXPECTED_BODY = MatchersV3.like(returnQuestionsResponse);
18
- describe("STY-BOX_CHECKOUT-BACK_ListReturnQuestionsByCheckoutItemId API", () => {
19
- it("returns a valid return questions for the given checkout item id", () => {
20
- provider
21
- .given("a valid return questions for the given checkout item id")
22
- .uponReceiving("return questions projection")
23
- .withRequest({
24
- method: "POST",
25
- path: "/api/list-return-questions-by-checkout-item-id",
26
- headers: DEFAULT_REQUEST_HEADERS,
27
- body: { checkoutItemId },
28
- })
29
- .willRespondWith({
30
- status: 200,
31
- headers: DEFAULT_RESPONSE_HEADERS,
32
- body: EXPECTED_BODY,
33
- });
34
- return provider.executeTest(async (mockserver) => {
35
- const httpPost = fetchHttpPost({
36
- apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
37
- getAuthToken: () => Promise.resolve(AUTH_TOKEN),
38
- device: "web",
39
- version: "1.0.0",
40
- });
41
- const response = await httpReturnQuestionsByCheckoutItemIdView({ httpPost })({
42
- checkoutItemId,
43
- signal: undefined,
44
- });
45
- expect(response).toStrictEqual(returnQuestionsResponse.result);
46
- });
47
- });
48
- });
@@ -1,3 +0,0 @@
1
- import { ReturnQuestionProjection } from "../../../projection/returnQuestion/returnQuestion";
2
- declare const returnQuestions: ReturnQuestionProjection[];
3
- export { returnQuestions };