@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.
- package/dist/domain/checkout/command/startCheckout.d.ts +13 -0
- package/dist/domain/checkout/command/startCheckout.js +4 -0
- package/dist/domain/checkout/model/checkout.d.ts +18 -0
- package/dist/domain/checkout/model/checkout.js +20 -0
- package/dist/domain/checkout/model/checkoutStarted.d.ts +13 -0
- package/dist/domain/checkout/model/checkoutStarted.js +4 -0
- package/dist/domain/checkout/model/checkouts.d.ts +7 -0
- package/dist/domain/checkout/model/checkouts.js +1 -0
- package/dist/domain/checkoutBooking/command/bookCheckoutBookingForCheckoutItem.d.ts +15 -0
- package/dist/domain/checkoutBooking/command/bookCheckoutBookingForCheckoutItem.js +7 -0
- package/dist/domain/checkoutBooking/command/bookSizeReplaceableProductVariantsForCheckoutItem.d.ts +15 -0
- package/dist/domain/checkoutBooking/command/bookSizeReplaceableProductVariantsForCheckoutItem.js +7 -0
- package/dist/domain/checkoutBooking/model/checkoutBooking.d.ts +9 -0
- package/dist/domain/checkoutBooking/model/checkoutBooking.js +9 -0
- package/dist/domain/checkoutBooking/model/checkoutBookingBooked.d.ts +14 -0
- package/dist/domain/checkoutBooking/model/checkoutBookingBooked.js +7 -0
- package/dist/domain/checkoutBooking/model/checkoutBookings.d.ts +7 -0
- package/dist/domain/checkoutBooking/model/checkoutBookings.js +1 -0
- package/dist/domain/checkoutItem/command/keepCheckoutItem.d.ts +13 -0
- package/dist/domain/checkoutItem/command/keepCheckoutItem.js +4 -0
- package/dist/domain/checkoutItem/command/replaceCheckoutItem.d.ts +14 -0
- package/dist/domain/checkoutItem/command/replaceCheckoutItem.js +7 -0
- package/dist/domain/checkoutItem/command/returnCheckoutItem.d.ts +15 -0
- package/dist/domain/checkoutItem/command/returnCheckoutItem.js +7 -0
- package/dist/domain/checkoutItem/model/checkoutItem.d.ts +24 -0
- package/dist/domain/checkoutItem/model/checkoutItem.js +40 -0
- package/dist/domain/checkoutItem/model/checkoutItemKept.d.ts +13 -0
- package/dist/domain/checkoutItem/model/checkoutItemKept.js +4 -0
- package/dist/domain/checkoutItem/model/checkoutItemReplaced.d.ts +13 -0
- package/dist/domain/checkoutItem/model/checkoutItemReplaced.js +4 -0
- package/dist/domain/checkoutItem/model/checkoutItemReturned.d.ts +13 -0
- package/dist/domain/checkoutItem/model/checkoutItemReturned.js +4 -0
- package/dist/domain/checkoutItem/model/checkoutItems.d.ts +7 -0
- package/dist/domain/checkoutItem/model/checkoutItems.js +1 -0
- package/dist/domain/checkoutItem/model/currency.d.ts +5 -0
- package/dist/domain/checkoutItem/model/currency.js +6 -0
- package/dist/domain/checkoutItem/model/feedbacks.d.ts +3 -0
- package/dist/domain/checkoutItem/model/feedbacks.js +1 -0
- package/dist/domain/checkoutItem/model/price.d.ts +10 -0
- package/dist/domain/checkoutItem/model/price.js +1 -0
- package/dist/domain/uiSetting/command/updateUiSetting.d.ts +15 -0
- package/dist/domain/uiSetting/command/updateUiSetting.js +10 -0
- package/dist/domain/uiSetting/model/uiSetting.d.ts +9 -0
- package/dist/domain/uiSetting/model/uiSetting.js +11 -0
- package/dist/domain/uiSetting/model/uiSettingUpdated.d.ts +14 -0
- package/dist/domain/uiSetting/model/uiSettingUpdated.js +7 -0
- package/dist/domain/uiSetting/model/uiSettings.d.ts +7 -0
- package/dist/domain/uiSetting/model/uiSettings.js +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +19 -0
- package/dist/infrastructure/delivery/baseBootstrap.d.ts +56 -0
- package/dist/infrastructure/delivery/baseBootstrap.js +55 -0
- package/dist/infrastructure/delivery/bootstrap.d.ts +10 -0
- package/dist/infrastructure/delivery/bootstrap.js +44 -0
- package/dist/infrastructure/delivery/http/fetchHttpClient.d.ts +14 -0
- package/dist/infrastructure/delivery/http/fetchHttpClient.js +20 -0
- package/dist/infrastructure/delivery/http/httpClient.d.ts +16 -0
- package/dist/infrastructure/delivery/http/httpClient.js +1 -0
- package/dist/infrastructure/delivery/mock/checkoutBookingDataSource.d.ts +14 -0
- package/dist/infrastructure/delivery/mock/checkoutBookingDataSource.js +12 -0
- package/dist/infrastructure/delivery/mock/checkoutDataSource.d.ts +17 -0
- package/dist/infrastructure/delivery/mock/checkoutDataSource.js +18 -0
- package/dist/infrastructure/delivery/mock/dataSourceCheckoutBookings.d.ts +14 -0
- package/dist/infrastructure/delivery/mock/dataSourceCheckoutBookings.js +21 -0
- package/dist/infrastructure/delivery/mock/dataSourceCheckoutItems.d.ts +14 -0
- package/dist/infrastructure/delivery/mock/dataSourceCheckoutItems.js +25 -0
- package/dist/infrastructure/delivery/mock/dataSourceCheckouts.d.ts +11 -0
- package/dist/infrastructure/delivery/mock/dataSourceCheckouts.js +27 -0
- package/dist/infrastructure/domain/checkout/model/httpCheckouts.d.ts +16 -0
- package/dist/infrastructure/domain/checkout/model/httpCheckouts.js +19 -0
- package/dist/infrastructure/domain/checkout/model/httpCheckoutsStart.d.ts +5 -0
- package/dist/infrastructure/domain/checkout/model/httpCheckoutsStart.js +13 -0
- package/dist/infrastructure/domain/checkout/react/useStartCheckout.d.ts +13 -0
- package/dist/infrastructure/domain/checkout/react/useStartCheckout.js +10 -0
- package/dist/infrastructure/domain/checkoutBooking/model/httpCheckoutBookings.d.ts +16 -0
- package/dist/infrastructure/domain/checkoutBooking/model/httpCheckoutBookings.js +15 -0
- package/dist/infrastructure/domain/checkoutBooking/model/httpCheckoutBookingsBook.d.ts +5 -0
- package/dist/infrastructure/domain/checkoutBooking/model/httpCheckoutBookingsBook.js +18 -0
- package/dist/infrastructure/domain/checkoutBooking/react/useBookCheckouBookingForCheckoutItem.d.ts +15 -0
- package/dist/infrastructure/domain/checkoutBooking/react/useBookCheckouBookingForCheckoutItem.js +15 -0
- package/dist/infrastructure/domain/checkoutBooking/react/useBookSizeReplaceableProductVariantsForCheckoutItem.d.ts +15 -0
- package/dist/infrastructure/domain/checkoutBooking/react/useBookSizeReplaceableProductVariantsForCheckoutItem.js +14 -0
- package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItems.d.ts +16 -0
- package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItems.js +26 -0
- package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItemsKeep.d.ts +5 -0
- package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItemsKeep.js +13 -0
- package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItemsReplace.d.ts +5 -0
- package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItemsReplace.js +13 -0
- package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItemsReturn.d.ts +5 -0
- package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItemsReturn.js +13 -0
- package/dist/infrastructure/domain/checkoutItem/react/useKeepCheckoutItem.d.ts +13 -0
- package/dist/infrastructure/domain/checkoutItem/react/useKeepCheckoutItem.js +12 -0
- package/dist/infrastructure/domain/checkoutItem/react/useReplaceCheckoutItem.d.ts +16 -0
- package/dist/infrastructure/domain/checkoutItem/react/useReplaceCheckoutItem.js +13 -0
- package/dist/infrastructure/domain/checkoutItem/react/useReturnCheckoutItem.d.ts +17 -0
- package/dist/infrastructure/domain/checkoutItem/react/useReturnCheckoutItem.js +13 -0
- package/dist/infrastructure/domain/uiSetting/model/storageUiSettings.d.ts +17 -0
- package/dist/infrastructure/domain/uiSetting/model/storageUiSettings.js +20 -0
- package/dist/infrastructure/domain/uiSetting/react/useIncrementIntroShownCount.d.ts +10 -0
- package/dist/infrastructure/domain/uiSetting/react/useIncrementIntroShownCount.js +11 -0
- package/dist/infrastructure/domain/uiSetting/react/useUpdateUiSetting.d.ts +14 -0
- package/dist/infrastructure/domain/uiSetting/react/useUpdateUiSetting.js +15 -0
- package/dist/infrastructure/persistence/asyncStorageStorage.d.ts +5 -0
- package/dist/infrastructure/persistence/asyncStorageStorage.js +7 -0
- package/dist/infrastructure/persistence/storage.d.ts +7 -0
- package/dist/infrastructure/persistence/storage.js +1 -0
- package/dist/infrastructure/persistence/uiSettingData.d.ts +6 -0
- package/dist/infrastructure/persistence/uiSettingData.js +1 -0
- package/dist/infrastructure/projection/bookedSizeChangeProductsVariants/httpBookedSizeChangeProductsVariantsForCheckoutItemView.d.ts +12 -0
- package/dist/infrastructure/projection/bookedSizeChangeProductsVariants/httpBookedSizeChangeProductsVariantsForCheckoutItemView.js +9 -0
- package/dist/infrastructure/projection/bookedSizeChangeProductsVariants/react/useViewBookedSizeChangeProductsVariantsForCheckoutItem.d.ts +10 -0
- package/dist/infrastructure/projection/bookedSizeChangeProductsVariants/react/useViewBookedSizeChangeProductsVariantsForCheckoutItem.js +9 -0
- package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/bookedSizeReplaceableProductVariants.mock.d.ts +3 -0
- package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/bookedSizeReplaceableProductVariants.mock.js +17 -0
- package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/httpBookedSizeReplaceableProductVariantsForCheckoutItemView.d.ts +34 -0
- package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/httpBookedSizeReplaceableProductVariantsForCheckoutItemView.js +26 -0
- package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/react/useViewBookedSizeReplaceableProductVariantsForCheckoutItem.d.ts +10 -0
- package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/react/useViewBookedSizeReplaceableProductVariantsForCheckoutItem.js +9 -0
- package/dist/infrastructure/projection/checkout/checkout.d.ts +18 -0
- package/dist/infrastructure/projection/checkout/checkout.js +5 -0
- package/dist/infrastructure/projection/checkout/httpCheckoutByIdView.d.ts +12 -0
- package/dist/infrastructure/projection/checkout/httpCheckoutByIdView.js +10 -0
- package/dist/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.d.ts +12 -0
- package/dist/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.js +10 -0
- package/dist/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.d.ts +12 -0
- package/dist/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.js +8 -0
- package/dist/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.d.ts +12 -0
- package/dist/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.js +8 -0
- package/dist/infrastructure/projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId.d.ts +10 -0
- package/dist/infrastructure/projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId.js +14 -0
- package/dist/infrastructure/projection/checkout/react/useViewFiveItemsDiscountByCustomerId.d.ts +10 -0
- package/dist/infrastructure/projection/checkout/react/useViewFiveItemsDiscountByCustomerId.js +9 -0
- package/dist/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.d.ts +10 -0
- package/dist/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.js +9 -0
- package/dist/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.d.ts +12 -0
- package/dist/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.js +9 -0
- package/dist/infrastructure/projection/checkoutItem/checkoutItem.d.ts +45 -0
- package/dist/infrastructure/projection/checkoutItem/checkoutItem.js +40 -0
- package/dist/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.d.ts +12 -0
- package/dist/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.js +9 -0
- package/dist/infrastructure/projection/feedback/feedback.mock.d.ts +3 -0
- package/dist/infrastructure/projection/feedback/feedback.mock.js +6 -0
- package/dist/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.d.ts +12 -0
- package/dist/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.js +9 -0
- package/dist/infrastructure/projection/returnQuestion/react/useListReturnQuestionsByCheckoutItemId.d.ts +10 -0
- package/dist/infrastructure/projection/returnQuestion/react/useListReturnQuestionsByCheckoutItemId.js +9 -0
- package/dist/infrastructure/projection/returnQuestion/returnQuestion.d.ts +14 -0
- package/dist/infrastructure/projection/returnQuestion/returnQuestion.js +9 -0
- package/dist/infrastructure/projection/uiSetting/react/useShouldIntroBeShown.d.ts +6 -0
- package/dist/infrastructure/projection/uiSetting/react/useShouldIntroBeShown.js +7 -0
- package/dist/infrastructure/projection/uiSetting/react/useViewIntroShownCount.d.ts +6 -0
- package/dist/infrastructure/projection/uiSetting/react/useViewIntroShownCount.js +9 -0
- package/dist/infrastructure/projection/uiSetting/react/useViewUiSettingByKey.d.ts +10 -0
- package/dist/infrastructure/projection/uiSetting/react/useViewUiSettingByKey.js +12 -0
- package/dist/infrastructure/projection/uiSetting/storageUiSettingByKeyView.d.ts +13 -0
- package/dist/infrastructure/projection/uiSetting/storageUiSettingByKeyView.js +15 -0
- package/dist/infrastructure/ui/Root.d.ts +20 -0
- package/dist/infrastructure/ui/Root.js +11 -0
- package/dist/infrastructure/ui/components/atoms/price/Price.d.ts +12 -0
- package/dist/infrastructure/ui/components/atoms/price/Price.js +28 -0
- package/dist/infrastructure/ui/components/atoms/price/Price.style.d.ts +13 -0
- package/dist/infrastructure/ui/components/atoms/price/Price.style.js +16 -0
- package/dist/infrastructure/ui/components/layouts/body/Body.d.ts +9 -0
- package/dist/infrastructure/ui/components/layouts/body/Body.js +7 -0
- package/dist/infrastructure/ui/components/layouts/body/Body.style.d.ts +7 -0
- package/dist/infrastructure/ui/components/layouts/body/Body.style.js +8 -0
- package/dist/infrastructure/ui/components/layouts/tabs/Tabs.d.ts +26 -0
- package/dist/infrastructure/ui/components/layouts/tabs/Tabs.js +47 -0
- package/dist/infrastructure/ui/components/layouts/tabs/Tabs.style.d.ts +32 -0
- package/dist/infrastructure/ui/components/layouts/tabs/Tabs.style.js +35 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.d.ts +9 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.js +8 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.d.ts +8 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.js +4 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionFeedback.d.ts +29 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionFeedback.js +27 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionItem.d.ts +18 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionItem.js +12 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.d.ts +10 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.js +1 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionFeedbackItem/HostDefaultReturnQuestionFeedbackItem.d.ts +3 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionFeedbackItem/HostDefaultReturnQuestionFeedbackItem.js +3 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.d.ts +3 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.js +12 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.style.d.ts +8 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.style.js +11 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.d.ts +3 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +34 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.d.ts +11 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.js +14 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.d.ts +3 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.js +27 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.style.d.ts +12 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.style.js +15 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.d.ts +3 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.js +15 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.style.d.ts +12 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.style.js +15 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.d.ts +3 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.js +26 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.style.d.ts +10 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.style.js +13 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.d.ts +3 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.js +13 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/util/returnQuestionFeedback.d.ts +22 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/util/returnQuestionFeedback.js +58 -0
- package/dist/infrastructure/ui/components/templates/SafeAreaScrollView.d.ts +8 -0
- package/dist/infrastructure/ui/components/templates/SafeAreaScrollView.js +14 -0
- package/dist/infrastructure/ui/hooks/useMediaImage.d.ts +7 -0
- package/dist/infrastructure/ui/hooks/useMediaImage.js +12 -0
- package/dist/infrastructure/ui/i18n/i18n.d.ts +39 -0
- package/dist/infrastructure/ui/i18n/i18n.js +40 -0
- package/dist/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.d.ts +9 -0
- package/dist/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.js +21 -0
- package/dist/infrastructure/ui/routing/CheckoutMiddleware.d.ts +9 -0
- package/dist/infrastructure/ui/routing/CheckoutMiddleware.js +47 -0
- package/dist/infrastructure/ui/routing/Routing.d.ts +12 -0
- package/dist/infrastructure/ui/routing/Routing.js +45 -0
- package/dist/infrastructure/ui/routing/router/Router.d.ts +1 -0
- package/dist/infrastructure/ui/routing/router/Router.js +1 -0
- package/dist/infrastructure/ui/routing/router/Router.native.d.ts +1 -0
- package/dist/infrastructure/ui/routing/router/Router.native.js +1 -0
- package/dist/infrastructure/ui/routing/routes.d.ts +6 -0
- package/dist/infrastructure/ui/routing/routes.js +7 -0
- package/dist/infrastructure/ui/settings/UISettings.d.ts +4 -0
- package/dist/infrastructure/ui/settings/UISettings.js +5 -0
- package/dist/infrastructure/ui/shared/components/atoms/error/Error.d.ts +10 -0
- package/dist/infrastructure/ui/shared/components/atoms/error/Error.js +5 -0
- package/dist/infrastructure/ui/shared/components/atoms/error/Error.style.d.ts +6 -0
- package/dist/infrastructure/ui/shared/components/atoms/error/Error.style.js +9 -0
- package/dist/infrastructure/ui/shared/components/atoms/field/Field.d.ts +14 -0
- package/dist/infrastructure/ui/shared/components/atoms/field/Field.js +29 -0
- package/dist/infrastructure/ui/shared/components/atoms/field/Field.style.d.ts +14 -0
- package/dist/infrastructure/ui/shared/components/atoms/field/Field.style.js +17 -0
- package/dist/infrastructure/ui/shared/components/atoms/icon/Icon.d.ts +12 -0
- package/dist/infrastructure/ui/shared/components/atoms/icon/Icon.js +7 -0
- package/dist/infrastructure/ui/shared/components/atoms/icon/Icon.style.d.ts +13 -0
- package/dist/infrastructure/ui/shared/components/atoms/icon/Icon.style.js +16 -0
- package/dist/infrastructure/ui/shared/components/atoms/input/Input.d.ts +11 -0
- package/dist/infrastructure/ui/shared/components/atoms/input/Input.js +37 -0
- package/dist/infrastructure/ui/shared/components/atoms/input/Input.style.d.ts +19 -0
- package/dist/infrastructure/ui/shared/components/atoms/input/Input.style.js +26 -0
- package/dist/infrastructure/ui/shared/components/atoms/spinner/Spinner.d.ts +3 -0
- package/dist/infrastructure/ui/shared/components/atoms/spinner/Spinner.js +8 -0
- package/dist/infrastructure/ui/shared/components/atoms/spinner/Spinner.style.d.ts +9 -0
- package/dist/infrastructure/ui/shared/components/atoms/spinner/Spinner.style.js +10 -0
- package/dist/infrastructure/ui/shared/components/layouts/column/Column.d.ts +10 -0
- package/dist/infrastructure/ui/shared/components/layouts/column/Column.js +10 -0
- package/dist/infrastructure/ui/shared/components/layouts/column/Column.style.d.ts +12 -0
- package/dist/infrastructure/ui/shared/components/layouts/column/Column.style.js +23 -0
- package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.d.ts +20 -0
- package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.js +79 -0
- package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.style.d.ts +58 -0
- package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.style.js +70 -0
- package/dist/infrastructure/ui/shared/components/layouts/row/Row.d.ts +6 -0
- package/dist/infrastructure/ui/shared/components/layouts/row/Row.js +10 -0
- package/dist/infrastructure/ui/shared/components/layouts/row/Row.style.d.ts +13 -0
- package/dist/infrastructure/ui/shared/components/layouts/row/Row.style.js +17 -0
- package/dist/infrastructure/ui/shared/components/layouts/slider/Pagination.d.ts +14 -0
- package/dist/infrastructure/ui/shared/components/layouts/slider/Pagination.js +11 -0
- package/dist/infrastructure/ui/shared/components/layouts/slider/Pagination.style.d.ts +23 -0
- package/dist/infrastructure/ui/shared/components/layouts/slider/Pagination.style.js +27 -0
- package/dist/infrastructure/ui/shared/components/layouts/slider/Slider.d.ts +20 -0
- package/dist/infrastructure/ui/shared/components/layouts/slider/Slider.js +132 -0
- package/dist/infrastructure/ui/shared/components/layouts/slider/Slider.style.d.ts +11 -0
- package/dist/infrastructure/ui/shared/components/layouts/slider/Slider.style.js +12 -0
- package/dist/infrastructure/ui/shared/components/layouts/sticky/Sticky.d.ts +14 -0
- package/dist/infrastructure/ui/shared/components/layouts/sticky/Sticky.js +12 -0
- package/dist/infrastructure/ui/shared/components/layouts/sticky/Sticky.style.d.ts +46 -0
- package/dist/infrastructure/ui/shared/components/layouts/sticky/Sticky.style.js +33 -0
- package/dist/infrastructure/ui/shared/components/molecules/buttonIcon/ButtonIcon.d.ts +16 -0
- package/dist/infrastructure/ui/shared/components/molecules/buttonIcon/ButtonIcon.js +7 -0
- package/dist/infrastructure/ui/shared/components/molecules/buttonIcon/ButtonIcon.style.d.ts +7 -0
- package/dist/infrastructure/ui/shared/components/molecules/buttonIcon/ButtonIcon.style.js +10 -0
- package/dist/infrastructure/ui/shared/components/molecules/inputField/InputField.d.ts +25 -0
- package/dist/infrastructure/ui/shared/components/molecules/inputField/InputField.js +26 -0
- package/dist/infrastructure/ui/shared/components/molecules/inputField/InputField.style.d.ts +17 -0
- package/dist/infrastructure/ui/shared/components/molecules/inputField/InputField.style.js +20 -0
- package/dist/infrastructure/ui/shared/components/molecules/selectField/SelectField.d.ts +26 -0
- package/dist/infrastructure/ui/shared/components/molecules/selectField/SelectField.js +26 -0
- package/dist/infrastructure/ui/shared/components/molecules/selectField/SelectField.style.d.ts +15 -0
- package/dist/infrastructure/ui/shared/components/molecules/selectField/SelectField.style.js +18 -0
- package/dist/infrastructure/ui/shared/hooks/useScreenSize.d.ts +4 -0
- package/dist/infrastructure/ui/shared/hooks/useScreenSize.js +9 -0
- package/dist/infrastructure/ui/theme/theme.d.ts +10 -0
- package/dist/infrastructure/ui/theme/theme.js +5 -0
- package/dist/infrastructure/ui/views/App.d.ts +6 -0
- package/dist/infrastructure/ui/views/App.js +6 -0
- package/dist/infrastructure/ui/views/intro/Intro.d.ts +6 -0
- package/dist/infrastructure/ui/views/intro/Intro.js +51 -0
- package/dist/infrastructure/ui/views/intro/Intro.style.d.ts +52 -0
- package/dist/infrastructure/ui/views/intro/Intro.style.js +55 -0
- package/dist/infrastructure/ui/views/item/Item.d.ts +7 -0
- package/dist/infrastructure/ui/views/item/Item.js +97 -0
- package/dist/infrastructure/ui/views/item/Item.style.d.ts +15 -0
- package/dist/infrastructure/ui/views/item/Item.style.js +18 -0
- package/dist/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.d.ts +10 -0
- package/dist/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.js +21 -0
- package/dist/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.style.d.ts +17 -0
- package/dist/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.style.js +20 -0
- package/dist/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.d.ts +8 -0
- package/dist/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js +34 -0
- package/dist/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.d.ts +19 -0
- package/dist/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.js +22 -0
- package/dist/infrastructure/ui/views/item/components/itemActions/ItemActions.d.ts +18 -0
- package/dist/infrastructure/ui/views/item/components/itemActions/ItemActions.js +33 -0
- package/dist/infrastructure/ui/views/item/components/itemActions/ItemActions.style.d.ts +21 -0
- package/dist/infrastructure/ui/views/item/components/itemActions/ItemActions.style.js +24 -0
- package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.d.ts +13 -0
- package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.js +30 -0
- package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.style.d.ts +23 -0
- package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.style.js +27 -0
- package/dist/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.d.ts +12 -0
- package/dist/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.js +26 -0
- package/dist/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.d.ts +19 -0
- package/dist/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.js +22 -0
- package/dist/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.d.ts +7 -0
- package/dist/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.js +22 -0
- package/dist/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.style.d.ts +25 -0
- package/dist/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.style.js +29 -0
- package/dist/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.d.ts +10 -0
- package/dist/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.js +32 -0
- package/dist/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.style.d.ts +12 -0
- package/dist/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.style.js +15 -0
- package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +15 -0
- package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +46 -0
- package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +11 -0
- package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.js +14 -0
- package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.d.ts +7 -0
- package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.js +25 -0
- package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.style.d.ts +16 -0
- package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.style.js +19 -0
- package/dist/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.d.ts +7 -0
- package/dist/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.js +25 -0
- package/dist/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.style.d.ts +16 -0
- package/dist/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.style.js +19 -0
- package/dist/infrastructure/ui/views/summary/Summary.d.ts +6 -0
- package/dist/infrastructure/ui/views/summary/Summary.js +18 -0
- package/dist/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.d.ts +7 -0
- package/dist/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.js +20 -0
- package/dist/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.style.d.ts +9 -0
- package/dist/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.style.js +12 -0
- package/dist/package.json +1 -1
- package/dist/projection/bookedSizeChangeProductsVariants/bookedSizeChangeProductsVariants.d.ts +13 -0
- package/dist/projection/bookedSizeChangeProductsVariants/bookedSizeChangeProductsVariants.js +1 -0
- package/dist/projection/bookedSizeChangeProductsVariants/viewBookedSizeChangeProductVariantsForCheckoutItem.d.ts +25 -0
- package/dist/projection/bookedSizeChangeProductsVariants/viewBookedSizeChangeProductVariantsForCheckoutItem.js +8 -0
- package/dist/projection/bookedSizeReplaceableProductVariants/viewBookedSizeReplaceableProductVariantsForCheckoutItem.d.ts +33 -0
- package/dist/projection/bookedSizeReplaceableProductVariants/viewBookedSizeReplaceableProductVariantsForCheckoutItem.js +8 -0
- package/dist/projection/checkout/checkout.d.ts +12 -0
- package/dist/projection/checkout/checkout.js +1 -0
- package/dist/projection/checkout/viewCheckoutById.d.ts +25 -0
- package/dist/projection/checkout/viewCheckoutById.js +8 -0
- package/dist/projection/checkout/viewFirstAvailableCheckoutByCustomerId.d.ts +25 -0
- package/dist/projection/checkout/viewFirstAvailableCheckoutByCustomerId.js +8 -0
- package/dist/projection/checkout/viewFiveItemsDiscountByCustomerId.d.ts +24 -0
- package/dist/projection/checkout/viewFiveItemsDiscountByCustomerId.js +8 -0
- package/dist/projection/checkout/viewIsCheckoutAccessibleByCustomerId.d.ts +17 -0
- package/dist/projection/checkout/viewIsCheckoutAccessibleByCustomerId.js +13 -0
- package/dist/projection/checkout/viewIsCheckoutEnabledByCustomerId.d.ts +24 -0
- package/dist/projection/checkout/viewIsCheckoutEnabledByCustomerId.js +8 -0
- package/dist/projection/checkoutBooking/checkoutBooking.d.ts +6 -0
- package/dist/projection/checkoutBooking/checkoutBooking.js +1 -0
- package/dist/projection/checkoutBooking/viewCheckoutBookingById.d.ts +25 -0
- package/dist/projection/checkoutBooking/viewCheckoutBookingById.js +8 -0
- package/dist/projection/checkoutItem/checkoutItem.d.ts +53 -0
- package/dist/projection/checkoutItem/checkoutItem.js +17 -0
- package/dist/projection/checkoutItem/viewCheckoutItemById.d.ts +25 -0
- package/dist/projection/checkoutItem/viewCheckoutItemById.js +8 -0
- package/dist/projection/feedback/feedback.d.ts +3 -0
- package/dist/projection/feedback/feedback.js +1 -0
- package/dist/projection/returnQuestion/listReturnQuestionsByCheckoutItemId.d.ts +25 -0
- package/dist/projection/returnQuestion/listReturnQuestionsByCheckoutItemId.js +8 -0
- package/dist/projection/returnQuestion/returnQuestion.d.ts +17 -0
- package/dist/projection/returnQuestion/returnQuestion.js +11 -0
- package/dist/projection/shared/size.d.ts +10 -0
- package/dist/projection/shared/size.js +1 -0
- package/dist/projection/uiSetting/viewUiSettingByKey.d.ts +29 -0
- package/dist/projection/uiSetting/viewUiSettingByKey.js +8 -0
- package/dist/src/ExpoRoot.js +10 -2
- package/dist/src/domain/checkout/model/checkout.d.ts +2 -3
- package/dist/src/domain/checkout/model/checkout.js +0 -1
- package/dist/src/domain/checkoutBooking/model/checkoutBooking.d.ts +1 -5
- package/dist/src/domain/checkoutBooking/model/checkoutBooking.js +1 -17
- package/dist/src/domain/checkoutItem/command/replaceCheckoutItem.d.ts +1 -1
- package/dist/src/domain/checkoutItem/model/checkoutItem.d.ts +1 -1
- package/dist/src/domain/checkoutItem/model/checkoutItem.js +2 -2
- package/dist/src/infrastructure/delivery/baseBootstrap.d.ts +0 -2
- package/dist/src/infrastructure/delivery/baseBootstrap.js +2 -8
- package/dist/src/infrastructure/delivery/bootstrap.js +0 -2
- package/dist/src/infrastructure/delivery/mock/dataSourceCheckoutBookings.js +1 -5
- package/dist/src/infrastructure/delivery/mock/dataSourceCheckoutItems.js +0 -2
- package/dist/src/infrastructure/delivery/mock/dataSourceCheckouts.js +2 -2
- package/dist/src/infrastructure/domain/checkout/model/httpCheckouts.js +1 -1
- package/dist/src/infrastructure/domain/checkoutBooking/model/httpCheckoutBookings.js +2 -9
- package/dist/src/infrastructure/domain/checkoutBooking/react/useBookCheckouBookingForCheckoutItem.d.ts +13 -0
- package/dist/src/infrastructure/domain/checkoutBooking/react/{useBookCheckoutBookingForCheckoutItem.js → useBookCheckouBookingForCheckoutItem.js} +2 -2
- package/dist/src/infrastructure/domain/checkoutItem/model/httpCheckoutItems.js +1 -1
- package/dist/src/infrastructure/domain/checkoutItem/model/httpCheckoutItemsReplace.js +2 -2
- package/dist/src/infrastructure/domain/checkoutItem/react/useReplaceCheckoutItem.d.ts +1 -1
- package/dist/src/infrastructure/domain/checkoutItem/react/useReplaceCheckoutItem.js +2 -2
- package/dist/src/infrastructure/projection/bookedSizeChangeProductsVariants/httpBookedSizeChangeProductsVariantsForCheckoutItemView.js +1 -1
- package/dist/src/infrastructure/projection/checkout/checkout.d.ts +1 -1
- package/dist/src/infrastructure/projection/pricing/react/useViewPricingByCheckoutId.js +1 -9
- package/dist/src/infrastructure/ui/Root.d.ts +2 -0
- package/dist/src/infrastructure/ui/Root.js +2 -2
- package/dist/src/infrastructure/ui/routing/CheckoutMiddleware.js +9 -7
- package/dist/src/infrastructure/ui/routing/Routing.d.ts +2 -0
- package/dist/src/infrastructure/ui/routing/Routing.js +2 -2
- package/dist/src/infrastructure/ui/views/App.d.ts +2 -0
- package/dist/src/infrastructure/ui/views/App.js +2 -2
- package/dist/src/infrastructure/ui/views/header/Header.d.ts +7 -0
- package/dist/src/infrastructure/ui/views/header/Header.js +8 -6
- package/dist/src/infrastructure/ui/views/item/Item.js +25 -49
- package/dist/src/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.js +4 -7
- package/dist/src/infrastructure/ui/views/summary/components/pricing/Pricing.js +2 -2
- package/dist/src/projection/bookedSizeChangeProductsVariants/bookedSizeChangeProductsVariants.d.ts +1 -0
- package/dist/src/projection/checkout/checkout.d.ts +1 -1
- package/dist/src/projection/checkoutBooking/checkoutBooking.d.ts +0 -2
- package/dist/src/projection/checkoutItem/checkoutItem.d.ts +1 -1
- package/dist/src/projection/pricing/pricing.d.ts +3 -3
- package/package.json +1 -1
- package/dist/src/domain/checkoutBooking/command/blockCheckoutBooking.d.ts +0 -13
- package/dist/src/domain/checkoutBooking/command/blockCheckoutBooking.js +0 -4
- package/dist/src/domain/checkoutBooking/model/checkoutBookingBlocked.d.ts +0 -13
- package/dist/src/domain/checkoutBooking/model/checkoutBookingBlocked.js +0 -4
- package/dist/src/domain/checkoutBooking/model/checkoutBookingExpired.d.ts +0 -13
- package/dist/src/domain/checkoutBooking/model/checkoutBookingExpired.js +0 -4
- package/dist/src/infrastructure/domain/checkoutBooking/model/httpCheckoutBookingsBlock.d.ts +0 -5
- package/dist/src/infrastructure/domain/checkoutBooking/model/httpCheckoutBookingsBlock.js +0 -15
- package/dist/src/infrastructure/domain/checkoutBooking/react/useBlockCheckoutBooking.d.ts +0 -13
- package/dist/src/infrastructure/domain/checkoutBooking/react/useBlockCheckoutBooking.js +0 -12
- package/dist/src/infrastructure/domain/checkoutBooking/react/useBookCheckoutBookingForCheckoutItem.d.ts +0 -13
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CancelableQueryViewArgs, Query, QueryHandlerFunction, QueryHandlerFunctionArgs } from "@lookiero/messaging";
|
|
2
|
+
import { CheckoutBookingProjection } from "./checkoutBooking";
|
|
3
|
+
declare const VIEW_CHECKOUT_BOOKING_BY_ID = "view_checkout_booking_by_id";
|
|
4
|
+
interface ViewCheckoutBookingByIdPayload {
|
|
5
|
+
readonly checkoutBookingId: string;
|
|
6
|
+
}
|
|
7
|
+
interface ViewCheckoutBookingById extends Query<typeof VIEW_CHECKOUT_BOOKING_BY_ID>, ViewCheckoutBookingByIdPayload {
|
|
8
|
+
}
|
|
9
|
+
interface ViewCheckoutBookingByIdFunction {
|
|
10
|
+
(payload: ViewCheckoutBookingByIdPayload): ViewCheckoutBookingById;
|
|
11
|
+
}
|
|
12
|
+
declare const viewCheckoutBookingById: ViewCheckoutBookingByIdFunction;
|
|
13
|
+
declare type ViewCheckoutBookingByIdResult = CheckoutBookingProjection | null;
|
|
14
|
+
interface CheckoutBookingByIdViewArgs extends CancelableQueryViewArgs {
|
|
15
|
+
readonly checkoutBookingId: string;
|
|
16
|
+
}
|
|
17
|
+
interface CheckoutBookingByIdView {
|
|
18
|
+
(args: CheckoutBookingByIdViewArgs): Promise<ViewCheckoutBookingByIdResult>;
|
|
19
|
+
}
|
|
20
|
+
interface ViewCheckoutBookingByIdHandlerFunctionArgs extends QueryHandlerFunctionArgs {
|
|
21
|
+
readonly view: CheckoutBookingByIdView;
|
|
22
|
+
}
|
|
23
|
+
declare const viewCheckoutBookingByIdHandler: QueryHandlerFunction<ViewCheckoutBookingById, ViewCheckoutBookingByIdResult, ViewCheckoutBookingByIdHandlerFunctionArgs>;
|
|
24
|
+
export type { ViewCheckoutBookingById, CheckoutBookingByIdView, ViewCheckoutBookingByIdResult };
|
|
25
|
+
export { VIEW_CHECKOUT_BOOKING_BY_ID, viewCheckoutBookingById, viewCheckoutBookingByIdHandler };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { query, } from "@lookiero/messaging";
|
|
2
|
+
const VIEW_CHECKOUT_BOOKING_BY_ID = "view_checkout_booking_by_id";
|
|
3
|
+
const viewCheckoutBookingById = (payload) => ({
|
|
4
|
+
...query({ name: VIEW_CHECKOUT_BOOKING_BY_ID }),
|
|
5
|
+
...payload,
|
|
6
|
+
});
|
|
7
|
+
const viewCheckoutBookingByIdHandler = ({ view, signal }) => async ({ checkoutBookingId }) => view({ checkoutBookingId, signal });
|
|
8
|
+
export { VIEW_CHECKOUT_BOOKING_BY_ID, viewCheckoutBookingById, viewCheckoutBookingByIdHandler };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { CheckoutItemStatus } from "../../domain/checkoutItem/model/checkoutItem";
|
|
2
|
+
import { Currency } from "../../domain/checkoutItem/model/currency";
|
|
3
|
+
import { FeedbackProjection } from "../feedback/feedback";
|
|
4
|
+
import { SizeProjection } from "../shared/size";
|
|
5
|
+
declare enum MediaPerspective {
|
|
6
|
+
BACK = "BACK",
|
|
7
|
+
BOTTOM_UP = "BOTTOM_UP",
|
|
8
|
+
COLLAGE = "COLLAGE",
|
|
9
|
+
DETAIL = "DETAIL",
|
|
10
|
+
FLAT_BACK = "FLAT_BACK",
|
|
11
|
+
FRONT = "FRONT",
|
|
12
|
+
FRONT_FAR = "FRONT_FAR",
|
|
13
|
+
LABEL = "LABEL",
|
|
14
|
+
MAIN = "MAIN",
|
|
15
|
+
MAIN_TRANSPARENT = "MAIN_TRANSPARENT",
|
|
16
|
+
OTHER = "OTHER",
|
|
17
|
+
SIDE = "SIDE"
|
|
18
|
+
}
|
|
19
|
+
interface MediaProjection {
|
|
20
|
+
readonly id: string;
|
|
21
|
+
readonly url: string;
|
|
22
|
+
readonly perspective: MediaPerspective;
|
|
23
|
+
}
|
|
24
|
+
interface PriceProjection {
|
|
25
|
+
readonly amount: number;
|
|
26
|
+
readonly currency: Currency;
|
|
27
|
+
readonly discountedPrice?: {
|
|
28
|
+
readonly amount: number;
|
|
29
|
+
readonly percentage: number;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
interface ColorProjection {
|
|
33
|
+
readonly id: string;
|
|
34
|
+
readonly label: string;
|
|
35
|
+
}
|
|
36
|
+
interface CheckoutItemProductVariantProjection {
|
|
37
|
+
readonly id: string;
|
|
38
|
+
readonly media: MediaProjection[];
|
|
39
|
+
readonly brand: string;
|
|
40
|
+
readonly name: string;
|
|
41
|
+
readonly size: SizeProjection;
|
|
42
|
+
readonly color: ColorProjection;
|
|
43
|
+
}
|
|
44
|
+
interface CheckoutItemProjection {
|
|
45
|
+
readonly id: string;
|
|
46
|
+
readonly status: CheckoutItemStatus;
|
|
47
|
+
readonly price: PriceProjection;
|
|
48
|
+
readonly replacedFor?: string;
|
|
49
|
+
readonly productVariant: CheckoutItemProductVariantProjection;
|
|
50
|
+
readonly feedback: FeedbackProjection;
|
|
51
|
+
}
|
|
52
|
+
export type { CheckoutItemProjection, CheckoutItemProductVariantProjection, ColorProjection, MediaProjection, PriceProjection, };
|
|
53
|
+
export { Currency, MediaPerspective };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Currency } from "../../domain/checkoutItem/model/currency";
|
|
2
|
+
var MediaPerspective;
|
|
3
|
+
(function (MediaPerspective) {
|
|
4
|
+
MediaPerspective["BACK"] = "BACK";
|
|
5
|
+
MediaPerspective["BOTTOM_UP"] = "BOTTOM_UP";
|
|
6
|
+
MediaPerspective["COLLAGE"] = "COLLAGE";
|
|
7
|
+
MediaPerspective["DETAIL"] = "DETAIL";
|
|
8
|
+
MediaPerspective["FLAT_BACK"] = "FLAT_BACK";
|
|
9
|
+
MediaPerspective["FRONT"] = "FRONT";
|
|
10
|
+
MediaPerspective["FRONT_FAR"] = "FRONT_FAR";
|
|
11
|
+
MediaPerspective["LABEL"] = "LABEL";
|
|
12
|
+
MediaPerspective["MAIN"] = "MAIN";
|
|
13
|
+
MediaPerspective["MAIN_TRANSPARENT"] = "MAIN_TRANSPARENT";
|
|
14
|
+
MediaPerspective["OTHER"] = "OTHER";
|
|
15
|
+
MediaPerspective["SIDE"] = "SIDE";
|
|
16
|
+
})(MediaPerspective || (MediaPerspective = {}));
|
|
17
|
+
export { Currency, MediaPerspective };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CancelableQueryViewArgs, Query, QueryHandlerFunction, QueryHandlerFunctionArgs } from "@lookiero/messaging";
|
|
2
|
+
import { CheckoutItemProjection } from "./checkoutItem";
|
|
3
|
+
declare const VIEW_CHECKOUT_ITEM_BY_ID = "view_checkout_item_by_id";
|
|
4
|
+
interface ViewCheckoutItemByIdPayload {
|
|
5
|
+
readonly checkoutItemId: string;
|
|
6
|
+
}
|
|
7
|
+
interface ViewCheckoutItemById extends Query<typeof VIEW_CHECKOUT_ITEM_BY_ID>, ViewCheckoutItemByIdPayload {
|
|
8
|
+
}
|
|
9
|
+
interface ViewCheckoutItemByIdFunction {
|
|
10
|
+
(payload: ViewCheckoutItemByIdPayload): ViewCheckoutItemById;
|
|
11
|
+
}
|
|
12
|
+
declare const viewCheckoutItemById: ViewCheckoutItemByIdFunction;
|
|
13
|
+
declare type ViewCheckoutItemByIdResult = CheckoutItemProjection | null;
|
|
14
|
+
interface CheckoutItemByIdViewArgs extends CancelableQueryViewArgs {
|
|
15
|
+
readonly checkoutItemId: string;
|
|
16
|
+
}
|
|
17
|
+
interface CheckoutItemByIdView {
|
|
18
|
+
(args: CheckoutItemByIdViewArgs): Promise<ViewCheckoutItemByIdResult>;
|
|
19
|
+
}
|
|
20
|
+
interface ViewCheckoutItemByIdHandlerFunctionArgs extends QueryHandlerFunctionArgs {
|
|
21
|
+
readonly view: CheckoutItemByIdView;
|
|
22
|
+
}
|
|
23
|
+
declare const viewCheckoutItemByIdHandler: QueryHandlerFunction<ViewCheckoutItemById, ViewCheckoutItemByIdResult, ViewCheckoutItemByIdHandlerFunctionArgs>;
|
|
24
|
+
export type { ViewCheckoutItemById, CheckoutItemByIdView, ViewCheckoutItemByIdResult };
|
|
25
|
+
export { VIEW_CHECKOUT_ITEM_BY_ID, viewCheckoutItemById, viewCheckoutItemByIdHandler };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { query, } from "@lookiero/messaging";
|
|
2
|
+
const VIEW_CHECKOUT_ITEM_BY_ID = "view_checkout_item_by_id";
|
|
3
|
+
const viewCheckoutItemById = (payload) => ({
|
|
4
|
+
...query({ name: VIEW_CHECKOUT_ITEM_BY_ID }),
|
|
5
|
+
...payload,
|
|
6
|
+
});
|
|
7
|
+
const viewCheckoutItemByIdHandler = ({ view, signal }) => async ({ checkoutItemId }) => view({ checkoutItemId, signal });
|
|
8
|
+
export { VIEW_CHECKOUT_ITEM_BY_ID, viewCheckoutItemById, viewCheckoutItemByIdHandler };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CancelableQueryViewArgs, Query, QueryHandlerFunction, QueryHandlerFunctionArgs } from "@lookiero/messaging";
|
|
2
|
+
import { ReturnQuestionProjection } from "./returnQuestion";
|
|
3
|
+
declare const LIST_RETURN_QUESTIONS_BY_CHECKOUT_ITEM_ID = "list_return_questions_by_checkout_item_id";
|
|
4
|
+
interface ListReturnQuestionsByCheckoutItemIdPayload {
|
|
5
|
+
readonly checkoutItemId: string;
|
|
6
|
+
}
|
|
7
|
+
interface ListReturnQuestionsByCheckoutItemId extends Query<typeof LIST_RETURN_QUESTIONS_BY_CHECKOUT_ITEM_ID>, ListReturnQuestionsByCheckoutItemIdPayload {
|
|
8
|
+
}
|
|
9
|
+
interface ListReturnQuestionsByCheckoutItemIdFunction {
|
|
10
|
+
(payload: ListReturnQuestionsByCheckoutItemIdPayload): ListReturnQuestionsByCheckoutItemId;
|
|
11
|
+
}
|
|
12
|
+
declare const listReturnQuestionsByCheckoutItemId: ListReturnQuestionsByCheckoutItemIdFunction;
|
|
13
|
+
declare type ListReturnQuestionsByCheckoutItemIdResult = ReturnQuestionProjection[] | null;
|
|
14
|
+
interface ReturnQuestionsByCheckoutItemIdViewArgs extends CancelableQueryViewArgs {
|
|
15
|
+
readonly checkoutItemId: string;
|
|
16
|
+
}
|
|
17
|
+
interface ReturnQuestionsByCheckoutItemIdView {
|
|
18
|
+
(args: ReturnQuestionsByCheckoutItemIdViewArgs): Promise<ListReturnQuestionsByCheckoutItemIdResult>;
|
|
19
|
+
}
|
|
20
|
+
interface ListReturnQuestionsByCheckoutItemIdHandlerFunctionArgs extends QueryHandlerFunctionArgs {
|
|
21
|
+
readonly view: ReturnQuestionsByCheckoutItemIdView;
|
|
22
|
+
}
|
|
23
|
+
declare const listReturnQuestionsByCheckoutItemIdHandler: QueryHandlerFunction<ListReturnQuestionsByCheckoutItemId, ListReturnQuestionsByCheckoutItemIdResult, ListReturnQuestionsByCheckoutItemIdHandlerFunctionArgs>;
|
|
24
|
+
export type { ListReturnQuestionsByCheckoutItemId, ReturnQuestionsByCheckoutItemIdView, ListReturnQuestionsByCheckoutItemIdResult, };
|
|
25
|
+
export { LIST_RETURN_QUESTIONS_BY_CHECKOUT_ITEM_ID, listReturnQuestionsByCheckoutItemId, listReturnQuestionsByCheckoutItemIdHandler, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { query, } from "@lookiero/messaging";
|
|
2
|
+
const LIST_RETURN_QUESTIONS_BY_CHECKOUT_ITEM_ID = "list_return_questions_by_checkout_item_id";
|
|
3
|
+
const listReturnQuestionsByCheckoutItemId = (payload) => ({
|
|
4
|
+
...query({ name: LIST_RETURN_QUESTIONS_BY_CHECKOUT_ITEM_ID }),
|
|
5
|
+
...payload,
|
|
6
|
+
});
|
|
7
|
+
const listReturnQuestionsByCheckoutItemIdHandler = ({ view, signal }) => async ({ checkoutItemId }) => view({ checkoutItemId, signal });
|
|
8
|
+
export { LIST_RETURN_QUESTIONS_BY_CHECKOUT_ITEM_ID, listReturnQuestionsByCheckoutItemId, listReturnQuestionsByCheckoutItemIdHandler, };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare enum ReturnQuestionType {
|
|
2
|
+
HOST_DEFAULT = "HOST_DEFAULT",
|
|
3
|
+
HOST_TEXTAREA = "HOST_TEXTAREA",
|
|
4
|
+
HOST_SELECT = "HOST_SELECT",
|
|
5
|
+
HOST_STACK = "HOST_STACK",
|
|
6
|
+
TEXTAREA = "TEXTAREA",
|
|
7
|
+
OPTION = "OPTION"
|
|
8
|
+
}
|
|
9
|
+
interface ReturnQuestionProjection {
|
|
10
|
+
readonly id: string;
|
|
11
|
+
readonly name: string;
|
|
12
|
+
readonly placeholder: string;
|
|
13
|
+
readonly type: ReturnQuestionType;
|
|
14
|
+
readonly children?: ReturnQuestionProjection[];
|
|
15
|
+
}
|
|
16
|
+
export { ReturnQuestionType };
|
|
17
|
+
export type { ReturnQuestionProjection };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var ReturnQuestionType;
|
|
2
|
+
(function (ReturnQuestionType) {
|
|
3
|
+
ReturnQuestionType["HOST_DEFAULT"] = "HOST_DEFAULT";
|
|
4
|
+
ReturnQuestionType["HOST_TEXTAREA"] = "HOST_TEXTAREA";
|
|
5
|
+
ReturnQuestionType["HOST_SELECT"] = "HOST_SELECT";
|
|
6
|
+
ReturnQuestionType["HOST_STACK"] = "HOST_STACK";
|
|
7
|
+
ReturnQuestionType["TEXTAREA"] = "TEXTAREA";
|
|
8
|
+
ReturnQuestionType["OPTION"] = "OPTION";
|
|
9
|
+
// ICON = "ICON",
|
|
10
|
+
})(ReturnQuestionType || (ReturnQuestionType = {}));
|
|
11
|
+
export { ReturnQuestionType };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Query, QueryHandlerFunction, QueryHandlerFunctionArgs } from "@lookiero/messaging";
|
|
2
|
+
interface UiSettingProjection {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly key: string;
|
|
5
|
+
readonly value: unknown;
|
|
6
|
+
}
|
|
7
|
+
declare const VIEW_UI_SETTING_BY_KEY = "view_ui_setting_by_key";
|
|
8
|
+
interface ViewUiSettingByKeyPayload {
|
|
9
|
+
readonly key: string;
|
|
10
|
+
}
|
|
11
|
+
interface ViewUiSettingByKey extends Query<typeof VIEW_UI_SETTING_BY_KEY>, ViewUiSettingByKeyPayload {
|
|
12
|
+
}
|
|
13
|
+
interface ViewUiSettingByKeyFunction {
|
|
14
|
+
(payload: ViewUiSettingByKeyPayload): ViewUiSettingByKey;
|
|
15
|
+
}
|
|
16
|
+
declare const viewUiSettingByKey: ViewUiSettingByKeyFunction;
|
|
17
|
+
declare type ViewUiSettingByKeyResult = UiSettingProjection | null;
|
|
18
|
+
interface UiSettingByKeyViewArgs {
|
|
19
|
+
readonly key: string;
|
|
20
|
+
}
|
|
21
|
+
interface UiSettingByKeyView {
|
|
22
|
+
(args: UiSettingByKeyViewArgs): Promise<ViewUiSettingByKeyResult>;
|
|
23
|
+
}
|
|
24
|
+
interface ViewUiSettingByKeyHandlerFunctionArgs extends QueryHandlerFunctionArgs {
|
|
25
|
+
readonly view: UiSettingByKeyView;
|
|
26
|
+
}
|
|
27
|
+
declare const viewUiSettingByKeyHandler: QueryHandlerFunction<ViewUiSettingByKey, ViewUiSettingByKeyResult, ViewUiSettingByKeyHandlerFunctionArgs>;
|
|
28
|
+
export type { UiSettingProjection, UiSettingByKeyView };
|
|
29
|
+
export { VIEW_UI_SETTING_BY_KEY, viewUiSettingByKey, viewUiSettingByKeyHandler };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { query } from "@lookiero/messaging";
|
|
2
|
+
const VIEW_UI_SETTING_BY_KEY = "view_ui_setting_by_key";
|
|
3
|
+
const viewUiSettingByKey = (payload) => ({
|
|
4
|
+
...query({ name: VIEW_UI_SETTING_BY_KEY }),
|
|
5
|
+
...payload,
|
|
6
|
+
});
|
|
7
|
+
const viewUiSettingByKeyHandler = ({ view }) => async ({ key }) => view({ key });
|
|
8
|
+
export { VIEW_UI_SETTING_BY_KEY, viewUiSettingByKey, viewUiSettingByKeyHandler };
|
package/dist/src/ExpoRoot.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
import { Panel } from "@lookiero/aurora-next/build/components/molecules/Panel/Panel";
|
|
1
2
|
import { Aurora } from "@lookiero/aurora-next/build/components/primitives/Aurora/Aurora";
|
|
2
3
|
import { Text } from "@lookiero/aurora-next/build/components/primitives/Text/Text";
|
|
4
|
+
import { ALIGN } from "@lookiero/aurora-next/build/hooks/useStyler/styler.definition";
|
|
3
5
|
import { fetchFetchTranslation } from "@lookiero/i18n";
|
|
4
6
|
import { i18n } from "@lookiero/i18n-react";
|
|
5
7
|
import { setPaymentsBridge } from "@lookiero/payments-front";
|
|
6
8
|
import { useFonts } from "expo-font";
|
|
7
9
|
import "expo/build/Expo.fx";
|
|
8
10
|
import React, { useCallback, useState } from "react";
|
|
9
|
-
import { Platform, StatusBar } from "react-native";
|
|
11
|
+
import { Platform, StatusBar, View } from "react-native";
|
|
10
12
|
import "react-native-get-random-values";
|
|
11
13
|
import { version } from "../package.json";
|
|
12
14
|
// import { bootstrap as checkoutMockBootstrap } from "./infrastructure/delivery/bootstrap.mock";
|
|
@@ -14,6 +16,7 @@ import { bootstrap as checkoutBootstrap } from "./infrastructure/delivery/bootst
|
|
|
14
16
|
import { root } from "./infrastructure/ui/Root";
|
|
15
17
|
import { Router } from "./infrastructure/ui/routing/router/Router";
|
|
16
18
|
import { notificationsRoot } from "./shared/notifications";
|
|
19
|
+
import { ButtonIcon } from "./shared/ui/components/molecules/buttonIcon/ButtonIcon";
|
|
17
20
|
const apiUrl = Platform.OS !== "web" ? "https://web2.ps.dev.aws.lookiero.es/checkout/api" : __DEV__ ? "/local-to-dev" : "/api";
|
|
18
21
|
const authToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjIwOTUxNjAsImV4cCI6MTY3MjI5OTg4MSwiZGlzcGxheU5hbWUiOiJBbGV4YW5kZXIiLCJjb3VudHJ5X2NvZGUiOiJFUyIsImFjY2Vzc1ZpYSI6ImVtYWlsIiwic3Vic2NyaXB0aW9uU3RhcnRpbmdEYXRlIjoiMjAyMC0wOS0wMSIsImltcGVyc29uYXRlZCI6ZmFsc2UsInV1aWQiOiJjZjdjNjQxZi0wZTVjLTQ4NTAtYWUwNy0yNzY3NDdlZGZkMGIiLCJpYXQiOjE2Njk3MDc4ODF9.-nGGMNmMlsq-PsupefyjxH0Z3td7ybM9TpnUV_VIYSg";
|
|
19
22
|
const translationsUrl = Platform.OS !== "web" ? "https://web2.ps.dev.aws.lookiero.es/checkout/i18n" : __DEV__ ? "/local-to-i18n" : "/i18n";
|
|
@@ -22,6 +25,11 @@ const translations = (locale) => `${translationsUrl}/${locale}?key=${translation
|
|
|
22
25
|
const useRedirect = () => ({
|
|
23
26
|
returnUrl: "https://web2.dev.aws.lookiero.es/user/",
|
|
24
27
|
});
|
|
28
|
+
// eslint-disable-next-line react/prop-types
|
|
29
|
+
const DummyMenu = ({ visible, onClose }) => (React.createElement(Panel, { align: ALIGN.RIGHT, isVisible: visible, onClose: onClose },
|
|
30
|
+
React.createElement(View, { style: { flexDirection: "row", justifyContent: "space-between" } },
|
|
31
|
+
React.createElement(Text, null, "Menu component"),
|
|
32
|
+
React.createElement(ButtonIcon, { name: "close", onPress: onClose }))));
|
|
25
33
|
setPaymentsBridge({
|
|
26
34
|
getToken: () => Promise.resolve(authToken),
|
|
27
35
|
stripeKey: "pk_test_6dwdUfkUm7AaUH3oSje9H0kk",
|
|
@@ -91,7 +99,7 @@ const ExpoRoot = () => {
|
|
|
91
99
|
React.createElement(Aurora, { useStack: false },
|
|
92
100
|
isAccessible === false && React.createElement(Text, { heading: true }, "Checkout is not accessible!"),
|
|
93
101
|
React.createElement(Router, null,
|
|
94
|
-
React.createElement(Root, { basePath: "", customerId: "cf7c641f-0e5c-4850-ae07-276747edfd0b", locale: "es", useRedirect: useRedirect, onNotAccessible: onNotAccessible }))),
|
|
102
|
+
React.createElement(Root, { basePath: "", customerId: "cf7c641f-0e5c-4850-ae07-276747edfd0b", locale: "es", menu: DummyMenu, useRedirect: useRedirect, onNotAccessible: onNotAccessible }))),
|
|
95
103
|
React.createElement(StatusBar, null))) : null;
|
|
96
104
|
};
|
|
97
105
|
export { ExpoRoot };
|
|
@@ -6,14 +6,13 @@ declare enum CheckoutStatus {
|
|
|
6
6
|
NOTIFIED = "NOTIFIED",
|
|
7
7
|
STARTED = "STARTED",
|
|
8
8
|
COMPLETED = "COMPLETED",
|
|
9
|
-
PAID = "PAID"
|
|
10
|
-
EXPIRED = "EXPIRED"
|
|
9
|
+
PAID = "PAID"
|
|
11
10
|
}
|
|
12
11
|
interface Checkout extends AggregateRoot {
|
|
13
12
|
readonly status: CheckoutStatus;
|
|
14
13
|
readonly customerId: string;
|
|
15
14
|
readonly boxId: string;
|
|
16
|
-
readonly
|
|
15
|
+
readonly bookingId: string;
|
|
17
16
|
readonly expiresOn: Date;
|
|
18
17
|
}
|
|
19
18
|
declare const startCheckoutHandler: CommandHandlerFunction<StartCheckout, Checkout>;
|
|
@@ -8,7 +8,6 @@ var CheckoutStatus;
|
|
|
8
8
|
CheckoutStatus["STARTED"] = "STARTED";
|
|
9
9
|
CheckoutStatus["COMPLETED"] = "COMPLETED";
|
|
10
10
|
CheckoutStatus["PAID"] = "PAID";
|
|
11
|
-
CheckoutStatus["EXPIRED"] = "EXPIRED";
|
|
12
11
|
})(CheckoutStatus || (CheckoutStatus = {}));
|
|
13
12
|
const startCheckoutHandler = () => async ({ aggregateRoot, command }) => {
|
|
14
13
|
const { aggregateId } = command;
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { AggregateRoot, CommandHandlerFunction } from "@lookiero/messaging";
|
|
2
|
-
import { CheckoutStatus } from "../../checkout/model/checkout";
|
|
3
|
-
import { BlockCheckoutBooking } from "../command/blockCheckoutBooking";
|
|
4
2
|
import { BookCheckoutBookingForCheckoutItem } from "../command/bookCheckoutBookingForCheckoutItem";
|
|
5
3
|
interface CheckoutBooking extends AggregateRoot {
|
|
6
4
|
readonly checkoutItemIds: string[];
|
|
7
|
-
readonly checkoutStatus: CheckoutStatus;
|
|
8
5
|
}
|
|
9
6
|
declare const bookCheckoutBookingForCheckoutItemHandler: CommandHandlerFunction<BookCheckoutBookingForCheckoutItem, CheckoutBooking>;
|
|
10
|
-
declare const blockCheckoutBookingHandler: CommandHandlerFunction<BlockCheckoutBooking, CheckoutBooking>;
|
|
11
7
|
export type { CheckoutBooking };
|
|
12
|
-
export { bookCheckoutBookingForCheckoutItemHandler
|
|
8
|
+
export { bookCheckoutBookingForCheckoutItemHandler };
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { CheckoutStatus } from "../../checkout/model/checkout";
|
|
2
|
-
import { checkoutBookingBlocked } from "./checkoutBookingBlocked";
|
|
3
1
|
import { checkoutBookingBooked } from "./checkoutBookingBooked";
|
|
4
|
-
import { checkoutBookingExpired } from "./checkoutBookingExpired";
|
|
5
2
|
const bookCheckoutBookingForCheckoutItemHandler = () => async ({ aggregateRoot, command }) => {
|
|
6
3
|
const { aggregateId, checkoutItemId } = command;
|
|
7
4
|
return {
|
|
@@ -9,17 +6,4 @@ const bookCheckoutBookingForCheckoutItemHandler = () => async ({ aggregateRoot,
|
|
|
9
6
|
domainEvents: [checkoutBookingBooked({ aggregateId, checkoutItemId })],
|
|
10
7
|
};
|
|
11
8
|
};
|
|
12
|
-
|
|
13
|
-
const { aggregateId } = command;
|
|
14
|
-
if (aggregateRoot.checkoutStatus === CheckoutStatus.EXPIRED) {
|
|
15
|
-
return {
|
|
16
|
-
...aggregateRoot,
|
|
17
|
-
domainEvents: [checkoutBookingExpired({ aggregateId })],
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
return {
|
|
21
|
-
...aggregateRoot,
|
|
22
|
-
domainEvents: [checkoutBookingBlocked({ aggregateId })],
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
export { bookCheckoutBookingForCheckoutItemHandler, blockCheckoutBookingHandler };
|
|
9
|
+
export { bookCheckoutBookingForCheckoutItemHandler };
|
|
@@ -2,7 +2,7 @@ import { Command } from "@lookiero/messaging";
|
|
|
2
2
|
declare const REPLACE_CHECKOUT_ITEM = "replace_checkout_item";
|
|
3
3
|
interface ReplaceCheckoutItemPayload {
|
|
4
4
|
readonly aggregateId: string;
|
|
5
|
-
readonly
|
|
5
|
+
readonly replacedFor: string;
|
|
6
6
|
}
|
|
7
7
|
interface ReplaceCheckoutItem extends Command<typeof REPLACE_CHECKOUT_ITEM>, ReplaceCheckoutItemPayload {
|
|
8
8
|
}
|
|
@@ -15,7 +15,7 @@ interface CheckoutItem extends AggregateRoot {
|
|
|
15
15
|
readonly status: CheckoutItemStatus;
|
|
16
16
|
readonly price: Price;
|
|
17
17
|
readonly feedbacks: Feedbacks;
|
|
18
|
-
readonly
|
|
18
|
+
readonly replacedFor?: string;
|
|
19
19
|
}
|
|
20
20
|
declare const keepCheckoutItemHandler: CommandHandlerFunction<KeepCheckoutItem, CheckoutItem>;
|
|
21
21
|
declare const returnCheckoutItemHandler: CommandHandlerFunction<ReturnCheckoutItem, CheckoutItem>;
|
|
@@ -29,10 +29,10 @@ const returnCheckoutItemHandler = () => async ({ aggregateRoot, command }) => {
|
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
31
|
const replaceCheckoutItemHandler = () => async ({ aggregateRoot, command }) => {
|
|
32
|
-
const { aggregateId,
|
|
32
|
+
const { aggregateId, replacedFor } = command;
|
|
33
33
|
return {
|
|
34
34
|
...aggregateRoot,
|
|
35
|
-
|
|
35
|
+
replacedFor,
|
|
36
36
|
status: CheckoutItemStatus.REPLACED,
|
|
37
37
|
domainEvents: [checkoutItemReplaced({ aggregateId })],
|
|
38
38
|
};
|
|
@@ -15,7 +15,6 @@ import { CheckoutByIdView } from "../../projection/checkout/viewCheckoutById";
|
|
|
15
15
|
import { FirstAvailableCheckoutByCustomerIdView } from "../../projection/checkout/viewFirstAvailableCheckoutByCustomerId";
|
|
16
16
|
import { FiveItemsDiscountByCustomerIdView } from "../../projection/checkout/viewFiveItemsDiscountByCustomerId";
|
|
17
17
|
import { IsCheckoutEnabledByCustomerIdView } from "../../projection/checkout/viewIsCheckoutEnabledByCustomerId";
|
|
18
|
-
import { CheckoutBookingByIdView } from "../../projection/checkoutBooking/viewCheckoutBookingById";
|
|
19
18
|
import { CheckoutItemByIdView } from "../../projection/checkoutItem/viewCheckoutItemById";
|
|
20
19
|
import { CheckoutQuestionsByCheckoutIdView } from "../../projection/checkoutQuestion/listCheckoutQuestionsByCheckoutId";
|
|
21
20
|
import { PaymentFlowPayloadByCheckoutIdView } from "../../projection/payment/viewPaymentFlowPayloadByCheckoutId";
|
|
@@ -32,7 +31,6 @@ interface BaseBootstrapFunctionArgs<UiSettingGetFunctionArgs extends RepositoryG
|
|
|
32
31
|
readonly fiveItemsDiscountByCustomerIdView: FiveItemsDiscountByCustomerIdView;
|
|
33
32
|
readonly uiSettingByKeyView: UiSettingByKeyView;
|
|
34
33
|
readonly checkoutItemByIdView: CheckoutItemByIdView;
|
|
35
|
-
readonly checkoutBookingByIdView: CheckoutBookingByIdView;
|
|
36
34
|
readonly returnQuestionsByCheckoutItemIdView: ReturnQuestionsByCheckoutItemIdView;
|
|
37
35
|
readonly bookedSizeChangeProductsVariantsForCheckoutItemView: BookedSizeChangeProductsVariantsForCheckoutItemView;
|
|
38
36
|
readonly pricingByCheckoutIdView: PricingByCheckoutIdView;
|
|
@@ -2,9 +2,8 @@ import { bootstrap as messagingBootstrap } from "@lookiero/messaging-react";
|
|
|
2
2
|
import { MARK_CHECKOUT_AS_PAID } from "../../domain/checkout/command/markCheckoutAsPaid";
|
|
3
3
|
import { START_CHECKOUT } from "../../domain/checkout/command/startCheckout";
|
|
4
4
|
import { markCheckoutAsPaidHandler, startCheckoutHandler } from "../../domain/checkout/model/checkout";
|
|
5
|
-
import { BLOCK_CHECKOUT_BOOKING } from "../../domain/checkoutBooking/command/blockCheckoutBooking";
|
|
6
5
|
import { BOOK_CHECKOUT_BOOKING_FOR_CHECKOUT_ITEM } from "../../domain/checkoutBooking/command/bookCheckoutBookingForCheckoutItem";
|
|
7
|
-
import {
|
|
6
|
+
import { bookCheckoutBookingForCheckoutItemHandler, } from "../../domain/checkoutBooking/model/checkoutBooking";
|
|
8
7
|
import { GIVE_CHECKOUT_FEEDBACK } from "../../domain/checkoutFeedback/command/giveCheckoutFeedback";
|
|
9
8
|
import { giveCheckoutFeedbackHandler } from "../../domain/checkoutFeedback/model/checkoutFeedback";
|
|
10
9
|
import { KEEP_CHECKOUT_ITEM } from "../../domain/checkoutItem/command/keepCheckoutItem";
|
|
@@ -19,7 +18,6 @@ import { viewFirstAvailableCheckoutByCustomerIdHandler, VIEW_FIRST_AVAILABLE_CHE
|
|
|
19
18
|
import { viewFiveItemsDiscountByCustomerIdHandler, VIEW_FIVE_ITEMS_DISCOUNT_BY_CUSTOMER_ID, } from "../../projection/checkout/viewFiveItemsDiscountByCustomerId";
|
|
20
19
|
import { viewIsCheckoutAccessibleByCustomerIdHandler, VIEW_IS_CHECKOUT_ACCESSIBLE_BY_CUSTOMER_ID, } from "../../projection/checkout/viewIsCheckoutAccessibleByCustomerId";
|
|
21
20
|
import { viewIsCheckoutEnabledByCustomerIdHandler, VIEW_IS_CHECKOUT_ENABLED_BY_CUSTOMER_ID, } from "../../projection/checkout/viewIsCheckoutEnabledByCustomerId";
|
|
22
|
-
import { viewCheckoutBookingByIdHandler, VIEW_CHECKOUT_BOOKING_BY_ID, } from "../../projection/checkoutBooking/viewCheckoutBookingById";
|
|
23
21
|
import { viewCheckoutItemByIdHandler, VIEW_CHECKOUT_ITEM_BY_ID, } from "../../projection/checkoutItem/viewCheckoutItemById";
|
|
24
22
|
import { listCheckoutQuestionsByCheckoutIdHandler, LIST_CHECKOUT_QUESTIONS_BY_CHECKOUT_ID, } from "../../projection/checkoutQuestion/listCheckoutQuestionsByCheckoutId";
|
|
25
23
|
import { viewPaymentFlowPayloadByCheckoutIdHandler, VIEW_PAYMENT_FLOW_PAYLOAD_BY_CHECKOUT_ID, } from "../../projection/payment/viewPaymentFlowPayloadByCheckoutId";
|
|
@@ -27,7 +25,7 @@ import { viewPricingByCheckoutIdHandler, VIEW_PRICING_BY_CHECKOUT_ID, } from "..
|
|
|
27
25
|
import { listReturnQuestionsByCheckoutItemIdHandler, LIST_RETURN_QUESTIONS_BY_CHECKOUT_ITEM_ID, } from "../../projection/returnQuestion/listReturnQuestionsByCheckoutItemId";
|
|
28
26
|
import { viewUiSettingByKeyHandler, VIEW_UI_SETTING_BY_KEY, } from "../../projection/uiSetting/viewUiSettingByKey";
|
|
29
27
|
const MESSAGING_CONTEXT_ID = "Checkout";
|
|
30
|
-
const baseBootstrap = ({ checkoutByIdView, firstAvailableCheckoutByCustomerIdView, isCheckoutEnabledByCustomerIdView, fiveItemsDiscountByCustomerIdView, uiSettingByKeyView, checkoutItemByIdView, returnQuestionsByCheckoutItemIdView, bookedSizeChangeProductsVariantsForCheckoutItemView,
|
|
28
|
+
const baseBootstrap = ({ checkoutByIdView, firstAvailableCheckoutByCustomerIdView, isCheckoutEnabledByCustomerIdView, fiveItemsDiscountByCustomerIdView, uiSettingByKeyView, checkoutItemByIdView, returnQuestionsByCheckoutItemIdView, bookedSizeChangeProductsVariantsForCheckoutItemView, pricingByCheckoutIdView, paymentFlowPayloadByCheckoutIdView, checkoutQuestionsByCheckoutIdView, getUiSetting, saveUiSetting, uiSettingsDependencies, getCheckout, saveCheckout, checkoutsDependencies, getCheckoutItem, saveCheckoutItem, checkoutItemsDependencies, getCheckoutBooking, saveCheckoutBooking, checkoutBookingsDependencies, getCheckoutFeedback, saveCheckoutFeedback, checkoutFeedbacksDependencies, }) => messagingBootstrap({ id: MESSAGING_CONTEXT_ID })
|
|
31
29
|
.query(VIEW_FIVE_ITEMS_DISCOUNT_BY_CUSTOMER_ID, viewFiveItemsDiscountByCustomerIdHandler, {
|
|
32
30
|
view: fiveItemsDiscountByCustomerIdView,
|
|
33
31
|
})
|
|
@@ -60,15 +58,11 @@ const baseBootstrap = ({ checkoutByIdView, firstAvailableCheckoutByCustomerIdVie
|
|
|
60
58
|
})
|
|
61
59
|
.query(LIST_CHECKOUT_QUESTIONS_BY_CHECKOUT_ID, listCheckoutQuestionsByCheckoutIdHandler, {
|
|
62
60
|
view: checkoutQuestionsByCheckoutIdView,
|
|
63
|
-
})
|
|
64
|
-
.query(VIEW_CHECKOUT_BOOKING_BY_ID, viewCheckoutBookingByIdHandler, {
|
|
65
|
-
view: checkoutBookingByIdView,
|
|
66
61
|
})
|
|
67
62
|
.query(VIEW_BOOKED_SIZE_CHANGE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM, viewBookedSizeChangeProductsVariantsForCheckoutItemHandler, {
|
|
68
63
|
view: bookedSizeChangeProductsVariantsForCheckoutItemView,
|
|
69
64
|
})
|
|
70
65
|
.command(BOOK_CHECKOUT_BOOKING_FOR_CHECKOUT_ITEM, bookCheckoutBookingForCheckoutItemHandler)(getCheckoutBooking, saveCheckoutBooking, ...checkoutBookingsDependencies)
|
|
71
|
-
.command(BLOCK_CHECKOUT_BOOKING, blockCheckoutBookingHandler)(getCheckoutBooking, saveCheckoutBooking, ...checkoutBookingsDependencies)
|
|
72
66
|
.command(GIVE_CHECKOUT_FEEDBACK, giveCheckoutFeedbackHandler)(getCheckoutFeedback, saveCheckoutFeedback, ...checkoutFeedbacksDependencies)
|
|
73
67
|
.query(VIEW_UI_SETTING_BY_KEY, viewUiSettingByKeyHandler, {
|
|
74
68
|
view: uiSettingByKeyView,
|
|
@@ -9,7 +9,6 @@ import { httpCheckoutByIdView } from "../projection/checkout/httpCheckoutByIdVie
|
|
|
9
9
|
import { httpFirstAvailableCheckoutByCustomerIdView } from "../projection/checkout/httpFirstAvailableCheckoutByCustomerIdView";
|
|
10
10
|
import { httpFiveItemsDiscountByCustomerIdView } from "../projection/checkout/httpFiveItemsDiscountByCustomerIdView";
|
|
11
11
|
import { httpIsCheckoutEnabledByCustomerIdView } from "../projection/checkout/httpIsCheckoutEnabledByCustomerIdView";
|
|
12
|
-
import { httpCheckoutBookingByIdView } from "../projection/checkoutBooking/httpCheckoutBookingByIdView";
|
|
13
12
|
import { httpCheckoutItemByIdView } from "../projection/checkoutItem/httpCheckoutItemByIdView";
|
|
14
13
|
import { httpCheckoutQuestionsByCheckoutIdView } from "../projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView";
|
|
15
14
|
import { httpPaymentFlowPayloadByCheckoutIdView } from "../projection/payment/httpPaymentFlowPayloadByCheckoutIdView";
|
|
@@ -29,7 +28,6 @@ const bootstrap = ({ apiUrl, authToken }) => {
|
|
|
29
28
|
uiSettingByKeyView: storageUiSettingByKeyView({ read }),
|
|
30
29
|
checkoutItemByIdView: httpCheckoutItemByIdView({ httpPost }),
|
|
31
30
|
returnQuestionsByCheckoutItemIdView: httpReturnQuestionsByCheckoutItemIdView({ httpPost }),
|
|
32
|
-
checkoutBookingByIdView: httpCheckoutBookingByIdView({ httpPost }),
|
|
33
31
|
bookedSizeChangeProductsVariantsForCheckoutItemView: httpBookedSizeChangeProductsVariantsForCheckoutItemView({
|
|
34
32
|
httpPost,
|
|
35
33
|
}),
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import invariant from "tiny-invariant";
|
|
2
|
-
import { v4 as uuid } from "uuid";
|
|
3
|
-
import { CheckoutStatus } from "../../../domain/checkout/model/checkout";
|
|
4
2
|
import { viewBookedSizeChangeProductsVariantsForCheckoutItem, } from "../../../projection/bookedSizeChangeProductsVariants/viewBookedSizeChangeProductVariantsForCheckoutItem";
|
|
5
3
|
const toCheckoutBookingDomain = (checkoutBooking) => {
|
|
6
4
|
invariant(checkoutBooking, "No checkoutBooking found!");
|
|
7
5
|
return {
|
|
8
|
-
aggregateId:
|
|
6
|
+
aggregateId: checkoutBooking.bookingId,
|
|
9
7
|
checkoutItemIds: checkoutBooking.productVariants.map((productVariant) => productVariant.id),
|
|
10
|
-
checkoutStatus: CheckoutStatus.AVAILABLE,
|
|
11
8
|
domainEvents: [],
|
|
12
9
|
};
|
|
13
10
|
};
|
|
14
11
|
const toCheckoutBookingProjection = (checkoutBooking) => ({
|
|
15
12
|
id: checkoutBooking.aggregateId,
|
|
16
13
|
checkoutItemIds: checkoutBooking.checkoutItemIds,
|
|
17
|
-
checkoutStatus: checkoutBooking.checkoutStatus,
|
|
18
14
|
});
|
|
19
15
|
const getCheckoutBooking = ({ queryBus }) => async (aggregateId) => toCheckoutBookingDomain(await queryBus(viewBookedSizeChangeProductsVariantsForCheckoutItem({ checkoutItemId: aggregateId })));
|
|
20
16
|
const saveCheckoutBooking = ({ dataSource }) => async (aggregateRoot) => {
|
|
@@ -5,7 +5,6 @@ const toCheckoutItemProjection = (checkoutItem) => ({
|
|
|
5
5
|
status: checkoutItem.status,
|
|
6
6
|
productVariant: {},
|
|
7
7
|
feedbacks: {},
|
|
8
|
-
replacedFor: null,
|
|
9
8
|
price: checkoutItem.price,
|
|
10
9
|
});
|
|
11
10
|
const toCheckoutItemDomain = (checkoutItem) => {
|
|
@@ -16,7 +15,6 @@ const toCheckoutItemDomain = (checkoutItem) => {
|
|
|
16
15
|
status: checkoutItem.status,
|
|
17
16
|
price: checkoutItem.price,
|
|
18
17
|
feedbacks: checkoutItem.feedbacks,
|
|
19
|
-
replacedForId: checkoutItem.replacedFor?.id,
|
|
20
18
|
domainEvents: [],
|
|
21
19
|
};
|
|
22
20
|
};
|
|
@@ -7,7 +7,7 @@ const toCheckoutDomain = (checkout) => {
|
|
|
7
7
|
status: checkout.status,
|
|
8
8
|
customerId: checkout.customerId,
|
|
9
9
|
boxId: checkout.boxId,
|
|
10
|
-
|
|
10
|
+
bookingId: checkout.bookingId,
|
|
11
11
|
expiresOn: checkout.expiresOn,
|
|
12
12
|
aggregateId: checkout.id,
|
|
13
13
|
domainEvents: [],
|
|
@@ -18,7 +18,7 @@ const toCheckoutProjection = (checkout) => ({
|
|
|
18
18
|
status: checkout.status,
|
|
19
19
|
customerId: checkout.customerId,
|
|
20
20
|
boxId: checkout.boxId,
|
|
21
|
-
|
|
21
|
+
bookingId: checkout.bookingId,
|
|
22
22
|
expiresOn: checkout.expiresOn,
|
|
23
23
|
items: [],
|
|
24
24
|
});
|
|
@@ -9,7 +9,7 @@ const toDomain = (checkout) => {
|
|
|
9
9
|
status: checkout.status,
|
|
10
10
|
customerId: checkout.customerId,
|
|
11
11
|
boxId: checkout.boxId,
|
|
12
|
-
|
|
12
|
+
bookingId: checkout.bookingId,
|
|
13
13
|
expiresOn: checkout.expiresOn,
|
|
14
14
|
aggregateId: checkout.id,
|
|
15
15
|
domainEvents: [],
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
import invariant from "tiny-invariant";
|
|
2
2
|
import { viewCheckoutBookingById, } from "../../../../projection/checkoutBooking/viewCheckoutBookingById";
|
|
3
|
-
import { httpCheckoutBookingsBlock } from "./httpCheckoutBookingsBlock";
|
|
4
3
|
import { httpCheckoutBookingsBook } from "./httpCheckoutBookingsBook";
|
|
5
4
|
const toDomain = (checkoutBooking) => {
|
|
6
5
|
invariant(checkoutBooking, "No checkout booking found!");
|
|
7
6
|
return {
|
|
8
|
-
aggregateId: checkoutBooking.id,
|
|
9
7
|
checkoutItemIds: checkoutBooking.checkoutItemIds,
|
|
10
|
-
|
|
8
|
+
aggregateId: checkoutBooking.id,
|
|
11
9
|
domainEvents: [],
|
|
12
10
|
};
|
|
13
11
|
};
|
|
14
12
|
const getCheckoutBooking = ({ queryBus }) => async (aggregateId) => toDomain(await queryBus(viewCheckoutBookingById({ checkoutBookingId: aggregateId })));
|
|
15
|
-
const saveCheckoutBooking = ({ httpPost }) => async (aggregateRoot) => {
|
|
16
|
-
await Promise.all([
|
|
17
|
-
httpCheckoutBookingsBook({ httpPost })(aggregateRoot),
|
|
18
|
-
httpCheckoutBookingsBlock({ httpPost })(aggregateRoot),
|
|
19
|
-
]);
|
|
20
|
-
};
|
|
13
|
+
const saveCheckoutBooking = ({ httpPost }) => async (aggregateRoot) => await httpCheckoutBookingsBook({ httpPost })(aggregateRoot);
|
|
21
14
|
export { getCheckoutBooking, saveCheckoutBooking };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CommandStatus } from "@lookiero/messaging-react";
|
|
2
|
+
interface BookFunction {
|
|
3
|
+
(): Promise<void>;
|
|
4
|
+
}
|
|
5
|
+
type UseBookCheckouBookingForCheckoutItem = [book: BookFunction, status: CommandStatus];
|
|
6
|
+
interface UseBookCheckouBookingForCheckoutItemFunctionArgs {
|
|
7
|
+
readonly checkoutItemId: string;
|
|
8
|
+
}
|
|
9
|
+
interface UseBookCheckouBookingForCheckoutItemFunction {
|
|
10
|
+
(args: UseBookCheckouBookingForCheckoutItemFunctionArgs): UseBookCheckouBookingForCheckoutItem;
|
|
11
|
+
}
|
|
12
|
+
declare const useBookCheckouBookingForCheckoutItem: UseBookCheckouBookingForCheckoutItemFunction;
|
|
13
|
+
export { useBookCheckouBookingForCheckoutItem };
|