@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,56 @@
|
|
|
1
|
+
import { AggregateRoot, RepositoryGetFunction, RepositoryGetFunctionArgs, RepositorySaveFunction, RepositorySaveFunctionArgs } from "@lookiero/messaging";
|
|
2
|
+
import { BuildBootstrapFunctionReturn } from "@lookiero/messaging-react";
|
|
3
|
+
import { Checkout } from "../../domain/checkout/model/checkout";
|
|
4
|
+
import { CheckoutsGetFunction, CheckoutsSaveFunction } from "../../domain/checkout/model/checkouts";
|
|
5
|
+
import { CheckoutBooking } from "../../domain/checkoutBooking/model/checkoutBooking";
|
|
6
|
+
import { CheckoutBookingsGetFunction, CheckoutBookingsSaveFunction } from "../../domain/checkoutBooking/model/checkoutBookings";
|
|
7
|
+
import { CheckoutItem } from "../../domain/checkoutItem/model/checkoutItem";
|
|
8
|
+
import { CheckoutItemsGetFunction, CheckoutItemsSaveFunction } from "../../domain/checkoutItem/model/checkoutItems";
|
|
9
|
+
import { UiSetting } from "../../domain/uiSetting/model/uiSetting";
|
|
10
|
+
import { UiSettingGetFunction, UiSettingSaveFunction } from "../../domain/uiSetting/model/uiSettings";
|
|
11
|
+
import { BookedSizeChangeProductsVariantsForCheckoutItemView } from "../../projection/bookedSizeChangeProductsVariants/viewBookedSizeChangeProductVariantsForCheckoutItem";
|
|
12
|
+
import { CheckoutByIdView } from "../../projection/checkout/viewCheckoutById";
|
|
13
|
+
import { FirstAvailableCheckoutByCustomerIdView } from "../../projection/checkout/viewFirstAvailableCheckoutByCustomerId";
|
|
14
|
+
import { FiveItemsDiscountByCustomerIdView } from "../../projection/checkout/viewFiveItemsDiscountByCustomerId";
|
|
15
|
+
import { IsCheckoutEnabledByCustomerIdView } from "../../projection/checkout/viewIsCheckoutEnabledByCustomerId";
|
|
16
|
+
import { CheckoutItemByIdView } from "../../projection/checkoutItem/viewCheckoutItemById";
|
|
17
|
+
import { ReturnQuestionsByCheckoutItemIdView } from "../../projection/returnQuestion/listReturnQuestionsByCheckoutItemId";
|
|
18
|
+
import { UiSettingByKeyView } from "../../projection/uiSetting/viewUiSettingByKey";
|
|
19
|
+
declare const MESSAGING_CONTEXT_ID = "Checkout";
|
|
20
|
+
declare type NeverWhenEmptyRecord<K extends [Record<string, unknown>]> = K extends [Record<string, never>] ? [never?] : K;
|
|
21
|
+
declare type RepositoryDependencies<A extends AggregateRoot, GetFunctionArgs extends RepositoryGetFunctionArgs, SaveFunctionArgs extends RepositorySaveFunctionArgs> = Omit<Parameters<RepositoryGetFunction<A, GetFunctionArgs>>[0] & Parameters<RepositorySaveFunction<A, SaveFunctionArgs>>[0], keyof RepositoryGetFunctionArgs>;
|
|
22
|
+
interface BaseBootstrapFunctionArgs<UiSettingGetFunctionArgs extends RepositoryGetFunctionArgs, UiSettingSaveFunctionArgs extends RepositorySaveFunctionArgs, CheckoutGetFunctionArgs extends RepositoryGetFunctionArgs, CheckoutSaveFunctionArgs extends RepositorySaveFunctionArgs, CheckoutItemGetFunctionArgs extends RepositoryGetFunctionArgs, CheckoutItemSaveFunctionArgs extends RepositorySaveFunctionArgs, CheckoutBookingGetFunctionArgs extends RepositoryGetFunctionArgs, CheckoutBookingSaveFunctionArgs extends RepositorySaveFunctionArgs> {
|
|
23
|
+
readonly checkoutByIdView: CheckoutByIdView;
|
|
24
|
+
readonly firstAvailableCheckoutByCustomerIdView: FirstAvailableCheckoutByCustomerIdView;
|
|
25
|
+
readonly isCheckoutEnabledByCustomerIdView: IsCheckoutEnabledByCustomerIdView;
|
|
26
|
+
readonly fiveItemsDiscountByCustomerIdView: FiveItemsDiscountByCustomerIdView;
|
|
27
|
+
readonly uiSettingByKeyView: UiSettingByKeyView;
|
|
28
|
+
readonly checkoutItemByIdView: CheckoutItemByIdView;
|
|
29
|
+
readonly returnQuestionsByCheckoutItemIdView: ReturnQuestionsByCheckoutItemIdView;
|
|
30
|
+
readonly bookedSizeChangeProductsVariantsForCheckoutItemView: BookedSizeChangeProductsVariantsForCheckoutItemView;
|
|
31
|
+
readonly getUiSetting: UiSettingGetFunction<UiSettingGetFunctionArgs>;
|
|
32
|
+
readonly saveUiSetting: UiSettingSaveFunction<UiSettingSaveFunctionArgs>;
|
|
33
|
+
readonly uiSettingsDependencies: NeverWhenEmptyRecord<[
|
|
34
|
+
RepositoryDependencies<UiSetting, UiSettingGetFunctionArgs, UiSettingSaveFunctionArgs>
|
|
35
|
+
]>;
|
|
36
|
+
readonly getCheckout: CheckoutsGetFunction<CheckoutGetFunctionArgs>;
|
|
37
|
+
readonly saveCheckout: CheckoutsSaveFunction<CheckoutSaveFunctionArgs>;
|
|
38
|
+
readonly checkoutsDependencies: NeverWhenEmptyRecord<[
|
|
39
|
+
RepositoryDependencies<Checkout, CheckoutGetFunctionArgs, CheckoutSaveFunctionArgs>
|
|
40
|
+
]>;
|
|
41
|
+
readonly getCheckoutItem: CheckoutItemsGetFunction<CheckoutItemGetFunctionArgs>;
|
|
42
|
+
readonly saveCheckoutItem: CheckoutItemsSaveFunction<CheckoutItemSaveFunctionArgs>;
|
|
43
|
+
readonly checkoutItemsDependencies: NeverWhenEmptyRecord<[
|
|
44
|
+
RepositoryDependencies<CheckoutItem, CheckoutItemGetFunctionArgs, CheckoutItemSaveFunctionArgs>
|
|
45
|
+
]>;
|
|
46
|
+
readonly getCheckoutBooking: CheckoutBookingsGetFunction<CheckoutBookingGetFunctionArgs>;
|
|
47
|
+
readonly saveCheckoutBooking: CheckoutBookingsSaveFunction<CheckoutBookingSaveFunctionArgs>;
|
|
48
|
+
readonly checkoutBookingsDependencies: NeverWhenEmptyRecord<[
|
|
49
|
+
RepositoryDependencies<CheckoutBooking, CheckoutBookingGetFunctionArgs, CheckoutBookingSaveFunctionArgs>
|
|
50
|
+
]>;
|
|
51
|
+
}
|
|
52
|
+
interface BaseBootstrapFunction {
|
|
53
|
+
<UiSettingGetArgs extends RepositoryGetFunctionArgs, UiSettingSaveArgs extends RepositorySaveFunctionArgs, CheckoutGetFunctionArgs extends RepositoryGetFunctionArgs, CheckoutSaveFunctionArgs extends RepositorySaveFunctionArgs, CheckoutItemGetFunctionArgs extends RepositoryGetFunctionArgs, CheckoutItemSaveFunctionArgs extends RepositorySaveFunctionArgs, CheckoutBookingGetFunctionArgs extends RepositoryGetFunctionArgs, CheckoutBookingSaveFunctionArgs extends RepositorySaveFunctionArgs>(args: BaseBootstrapFunctionArgs<UiSettingGetArgs, UiSettingSaveArgs, CheckoutGetFunctionArgs, CheckoutSaveFunctionArgs, CheckoutItemGetFunctionArgs, CheckoutItemSaveFunctionArgs, CheckoutBookingGetFunctionArgs, CheckoutBookingSaveFunctionArgs>): BuildBootstrapFunctionReturn;
|
|
54
|
+
}
|
|
55
|
+
declare const baseBootstrap: BaseBootstrapFunction;
|
|
56
|
+
export { baseBootstrap, MESSAGING_CONTEXT_ID };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { bootstrap as messagingBootstrap } from "@lookiero/messaging-react";
|
|
2
|
+
import { START_CHECKOUT } from "../../domain/checkout/command/startCheckout";
|
|
3
|
+
import { startCheckoutHandler } from "../../domain/checkout/model/checkout";
|
|
4
|
+
import { BOOK_CHECKOUT_BOOKING_FOR_CHECKOUT_ITEM } from "../../domain/checkoutBooking/command/bookCheckoutBookingForCheckoutItem";
|
|
5
|
+
import { bookCheckoutBookingForCheckoutItemHandler, } from "../../domain/checkoutBooking/model/checkoutBooking";
|
|
6
|
+
import { KEEP_CHECKOUT_ITEM } from "../../domain/checkoutItem/command/keepCheckoutItem";
|
|
7
|
+
import { REPLACE_CHECKOUT_ITEM } from "../../domain/checkoutItem/command/replaceCheckoutItem";
|
|
8
|
+
import { RETURN_CHECKOUT_ITEM } from "../../domain/checkoutItem/command/returnCheckoutItem";
|
|
9
|
+
import { keepCheckoutItemHandler, replaceCheckoutItemHandler, returnCheckoutItemHandler, } from "../../domain/checkoutItem/model/checkoutItem";
|
|
10
|
+
import { UPDATE_UI_SETTING } from "../../domain/uiSetting/command/updateUiSetting";
|
|
11
|
+
import { updateUiSettingHandler } from "../../domain/uiSetting/model/uiSetting";
|
|
12
|
+
import { viewBookedSizeChangeProductsVariantsForCheckoutItemHandler, VIEW_BOOKED_SIZE_CHANGE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM, } from "../../projection/bookedSizeChangeProductsVariants/viewBookedSizeChangeProductVariantsForCheckoutItem";
|
|
13
|
+
import { viewCheckoutByIdHandler, VIEW_CHECKOUT_BY_ID, } from "../../projection/checkout/viewCheckoutById";
|
|
14
|
+
import { viewFirstAvailableCheckoutByCustomerIdHandler, VIEW_FIRST_AVAILABLE_CHECKOUT_BY_CUSTOMER_ID, } from "../../projection/checkout/viewFirstAvailableCheckoutByCustomerId";
|
|
15
|
+
import { viewFiveItemsDiscountByCustomerIdHandler, VIEW_FIVE_ITEMS_DISCOUNT_BY_CUSTOMER_ID, } from "../../projection/checkout/viewFiveItemsDiscountByCustomerId";
|
|
16
|
+
import { viewIsCheckoutAccessibleByCustomerIdHandler, VIEW_IS_CHECKOUT_ACCESSIBLE_BY_CUSTOMER_ID, } from "../../projection/checkout/viewIsCheckoutAccessibleByCustomerId";
|
|
17
|
+
import { viewIsCheckoutEnabledByCustomerIdHandler, VIEW_IS_CHECKOUT_ENABLED_BY_CUSTOMER_ID, } from "../../projection/checkout/viewIsCheckoutEnabledByCustomerId";
|
|
18
|
+
import { viewCheckoutItemByIdHandler, VIEW_CHECKOUT_ITEM_BY_ID, } from "../../projection/checkoutItem/viewCheckoutItemById";
|
|
19
|
+
import { listReturnQuestionsByCheckoutItemIdHandler, LIST_RETURN_QUESTIONS_BY_CHECKOUT_ITEM_ID, } from "../../projection/returnQuestion/listReturnQuestionsByCheckoutItemId";
|
|
20
|
+
import { viewUiSettingByKeyHandler, VIEW_UI_SETTING_BY_KEY, } from "../../projection/uiSetting/viewUiSettingByKey";
|
|
21
|
+
const MESSAGING_CONTEXT_ID = "Checkout";
|
|
22
|
+
const baseBootstrap = ({ checkoutByIdView, firstAvailableCheckoutByCustomerIdView, isCheckoutEnabledByCustomerIdView, fiveItemsDiscountByCustomerIdView, uiSettingByKeyView, checkoutItemByIdView, returnQuestionsByCheckoutItemIdView, bookedSizeChangeProductsVariantsForCheckoutItemView, getUiSetting, saveUiSetting, uiSettingsDependencies, getCheckout, saveCheckout, checkoutsDependencies, getCheckoutItem, saveCheckoutItem, checkoutItemsDependencies, getCheckoutBooking, saveCheckoutBooking, checkoutBookingsDependencies, }) => messagingBootstrap({ id: MESSAGING_CONTEXT_ID })
|
|
23
|
+
.query(VIEW_FIVE_ITEMS_DISCOUNT_BY_CUSTOMER_ID, viewFiveItemsDiscountByCustomerIdHandler, {
|
|
24
|
+
view: fiveItemsDiscountByCustomerIdView,
|
|
25
|
+
})
|
|
26
|
+
.query(VIEW_CHECKOUT_BY_ID, viewCheckoutByIdHandler, {
|
|
27
|
+
view: checkoutByIdView,
|
|
28
|
+
})
|
|
29
|
+
.query(VIEW_FIRST_AVAILABLE_CHECKOUT_BY_CUSTOMER_ID, viewFirstAvailableCheckoutByCustomerIdHandler, {
|
|
30
|
+
view: firstAvailableCheckoutByCustomerIdView,
|
|
31
|
+
})
|
|
32
|
+
.query(VIEW_IS_CHECKOUT_ENABLED_BY_CUSTOMER_ID, viewIsCheckoutEnabledByCustomerIdHandler, {
|
|
33
|
+
view: isCheckoutEnabledByCustomerIdView,
|
|
34
|
+
})
|
|
35
|
+
.query(VIEW_IS_CHECKOUT_ACCESSIBLE_BY_CUSTOMER_ID, viewIsCheckoutAccessibleByCustomerIdHandler)
|
|
36
|
+
.command(START_CHECKOUT, startCheckoutHandler)(getCheckout, saveCheckout, ...checkoutsDependencies)
|
|
37
|
+
.query(VIEW_CHECKOUT_ITEM_BY_ID, viewCheckoutItemByIdHandler, {
|
|
38
|
+
view: checkoutItemByIdView,
|
|
39
|
+
})
|
|
40
|
+
.query(LIST_RETURN_QUESTIONS_BY_CHECKOUT_ITEM_ID, listReturnQuestionsByCheckoutItemIdHandler, {
|
|
41
|
+
view: returnQuestionsByCheckoutItemIdView,
|
|
42
|
+
})
|
|
43
|
+
.command(KEEP_CHECKOUT_ITEM, keepCheckoutItemHandler)(getCheckoutItem, saveCheckoutItem, ...checkoutItemsDependencies)
|
|
44
|
+
.command(RETURN_CHECKOUT_ITEM, returnCheckoutItemHandler)(getCheckoutItem, saveCheckoutItem, ...checkoutItemsDependencies)
|
|
45
|
+
.command(REPLACE_CHECKOUT_ITEM, replaceCheckoutItemHandler)(getCheckoutItem, saveCheckoutItem, ...checkoutItemsDependencies)
|
|
46
|
+
.query(VIEW_BOOKED_SIZE_CHANGE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM, viewBookedSizeChangeProductsVariantsForCheckoutItemHandler, {
|
|
47
|
+
view: bookedSizeChangeProductsVariantsForCheckoutItemView,
|
|
48
|
+
})
|
|
49
|
+
.command(BOOK_CHECKOUT_BOOKING_FOR_CHECKOUT_ITEM, bookCheckoutBookingForCheckoutItemHandler)(getCheckoutBooking, saveCheckoutBooking, ...checkoutBookingsDependencies)
|
|
50
|
+
.query(VIEW_UI_SETTING_BY_KEY, viewUiSettingByKeyHandler, {
|
|
51
|
+
view: uiSettingByKeyView,
|
|
52
|
+
})
|
|
53
|
+
.command(UPDATE_UI_SETTING, updateUiSettingHandler)(getUiSetting, saveUiSetting, ...uiSettingsDependencies)
|
|
54
|
+
.build();
|
|
55
|
+
export { baseBootstrap, MESSAGING_CONTEXT_ID };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BuildBootstrapFunctionReturn } from "@lookiero/messaging-react";
|
|
2
|
+
interface BootstrapFunctionArgs {
|
|
3
|
+
readonly getAuthToken: () => Promise<string>;
|
|
4
|
+
readonly apiUrl: string;
|
|
5
|
+
}
|
|
6
|
+
interface BootstrapFunction {
|
|
7
|
+
(args: BootstrapFunctionArgs): BuildBootstrapFunctionReturn;
|
|
8
|
+
}
|
|
9
|
+
declare const bootstrap: BootstrapFunction;
|
|
10
|
+
export { bootstrap };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { getCheckout, saveCheckout } from "../domain/checkout/model/httpCheckouts";
|
|
2
|
+
import { getCheckoutBooking, saveCheckoutBooking } from "../domain/checkoutBooking/model/httpCheckoutBookings";
|
|
3
|
+
import { getCheckoutItem, saveCheckoutItem } from "../domain/checkoutItem/model/httpCheckoutItems";
|
|
4
|
+
import { getUiSetting, saveUiSetting } from "../domain/uiSetting/model/storageUiSettings";
|
|
5
|
+
import { read, write } from "../persistence/asyncStorageStorage";
|
|
6
|
+
import { httpBookedSizeChangeProductsVariantsForCheckoutItemView } from "../projection/bookedSizeChangeProductsVariants/httpBookedSizeChangeProductsVariantsForCheckoutItemView";
|
|
7
|
+
import { httpCheckoutByIdView } from "../projection/checkout/httpCheckoutByIdView";
|
|
8
|
+
import { httpFirstAvailableCheckoutByCustomerIdView } from "../projection/checkout/httpFirstAvailableCheckoutByCustomerIdView";
|
|
9
|
+
import { httpFiveItemsDiscountByCustomerIdView } from "../projection/checkout/httpFiveItemsDiscountByCustomerIdView";
|
|
10
|
+
import { httpIsCheckoutEnabledByCustomerIdView } from "../projection/checkout/httpIsCheckoutEnabledByCustomerIdView";
|
|
11
|
+
import { httpCheckoutItemByIdView } from "../projection/checkoutItem/httpCheckoutItemByIdView";
|
|
12
|
+
import { httpReturnQuestionsByCheckoutItemIdView } from "../projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView";
|
|
13
|
+
import { storageUiSettingByKeyView } from "../projection/uiSetting/storageUiSettingByKeyView";
|
|
14
|
+
import { baseBootstrap } from "./baseBootstrap";
|
|
15
|
+
import { fetchHttpGet, fetchHttpPost } from "./http/fetchHttpClient";
|
|
16
|
+
const bootstrap = ({ apiUrl, getAuthToken }) => {
|
|
17
|
+
const httpGet = fetchHttpGet({ apiUrl, getAuthToken });
|
|
18
|
+
const httpPost = fetchHttpPost({ apiUrl, getAuthToken });
|
|
19
|
+
return baseBootstrap({
|
|
20
|
+
checkoutByIdView: httpCheckoutByIdView({ httpPost }),
|
|
21
|
+
firstAvailableCheckoutByCustomerIdView: httpFirstAvailableCheckoutByCustomerIdView({ httpPost }),
|
|
22
|
+
isCheckoutEnabledByCustomerIdView: httpIsCheckoutEnabledByCustomerIdView({ httpGet }),
|
|
23
|
+
fiveItemsDiscountByCustomerIdView: httpFiveItemsDiscountByCustomerIdView({ httpGet }),
|
|
24
|
+
uiSettingByKeyView: storageUiSettingByKeyView({ read }),
|
|
25
|
+
checkoutItemByIdView: httpCheckoutItemByIdView({ httpPost }),
|
|
26
|
+
returnQuestionsByCheckoutItemIdView: httpReturnQuestionsByCheckoutItemIdView({ httpPost }),
|
|
27
|
+
bookedSizeChangeProductsVariantsForCheckoutItemView: httpBookedSizeChangeProductsVariantsForCheckoutItemView({
|
|
28
|
+
httpPost,
|
|
29
|
+
}),
|
|
30
|
+
getUiSetting,
|
|
31
|
+
saveUiSetting,
|
|
32
|
+
uiSettingsDependencies: [{ read, write }],
|
|
33
|
+
getCheckout,
|
|
34
|
+
saveCheckout,
|
|
35
|
+
checkoutsDependencies: [{ httpPost }],
|
|
36
|
+
getCheckoutItem,
|
|
37
|
+
saveCheckoutItem,
|
|
38
|
+
checkoutItemsDependencies: [{ httpPost }],
|
|
39
|
+
getCheckoutBooking,
|
|
40
|
+
saveCheckoutBooking,
|
|
41
|
+
checkoutBookingsDependencies: [{ httpPost }],
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
export { bootstrap };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HttpGetFunction, HttpPostFunction } from "./httpClient";
|
|
2
|
+
interface FetchHttpFunctionArgs {
|
|
3
|
+
readonly apiUrl: string;
|
|
4
|
+
readonly getAuthToken: () => Promise<string>;
|
|
5
|
+
}
|
|
6
|
+
interface FetchHttpPostFunction {
|
|
7
|
+
(args: FetchHttpFunctionArgs): HttpPostFunction;
|
|
8
|
+
}
|
|
9
|
+
interface FetchHttpGetFunction {
|
|
10
|
+
(args: FetchHttpFunctionArgs): HttpGetFunction;
|
|
11
|
+
}
|
|
12
|
+
declare const fetchHttpPost: FetchHttpPostFunction;
|
|
13
|
+
declare const fetchHttpGet: FetchHttpGetFunction;
|
|
14
|
+
export { fetchHttpGet, fetchHttpPost };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const fetchHttpPost = ({ apiUrl, getAuthToken }) => async ({ endpoint, body, signal }) => fetch(`${apiUrl}${endpoint}`, {
|
|
2
|
+
method: "POST",
|
|
3
|
+
headers: {
|
|
4
|
+
["Content-Type"]: "application/json",
|
|
5
|
+
authorization: `Bearer ${await getAuthToken()}`,
|
|
6
|
+
},
|
|
7
|
+
body: JSON.stringify(body),
|
|
8
|
+
signal,
|
|
9
|
+
});
|
|
10
|
+
const fetchHttpGet = ({ apiUrl, getAuthToken }) => async ({ endpoint, signal }) => fetch(`${apiUrl}${endpoint}`, {
|
|
11
|
+
method: "GET",
|
|
12
|
+
credentials: "include",
|
|
13
|
+
headers: {
|
|
14
|
+
Authorization: `Bearer ${await getAuthToken()}`,
|
|
15
|
+
["Content-Type"]: "application/json",
|
|
16
|
+
},
|
|
17
|
+
referrer: "",
|
|
18
|
+
signal,
|
|
19
|
+
});
|
|
20
|
+
export { fetchHttpGet, fetchHttpPost };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface HttpGetFunctionArgs {
|
|
2
|
+
readonly endpoint: string;
|
|
3
|
+
readonly signal?: AbortSignal;
|
|
4
|
+
}
|
|
5
|
+
interface HttpGetFunction {
|
|
6
|
+
(args: HttpGetFunctionArgs): Promise<Response>;
|
|
7
|
+
}
|
|
8
|
+
interface HttpPostFunctionArgs {
|
|
9
|
+
readonly endpoint: string;
|
|
10
|
+
readonly body: Record<string, unknown>;
|
|
11
|
+
readonly signal?: AbortSignal;
|
|
12
|
+
}
|
|
13
|
+
interface HttpPostFunction {
|
|
14
|
+
(args: HttpPostFunctionArgs): Promise<Response>;
|
|
15
|
+
}
|
|
16
|
+
export type { HttpGetFunction, HttpPostFunction };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CheckoutBookingProjection } from "../../../projection/checkoutBooking/checkoutBooking";
|
|
2
|
+
interface CheckoutBookingDataSourceFunctionArgs {
|
|
3
|
+
readonly data: CheckoutBookingProjection;
|
|
4
|
+
}
|
|
5
|
+
interface CheckoutBookingDataSource {
|
|
6
|
+
readonly getCheckoutBooking: (id: string) => CheckoutBookingProjection | undefined;
|
|
7
|
+
readonly saveCheckoutBooking: (checkoutBooking: CheckoutBookingProjection) => void;
|
|
8
|
+
}
|
|
9
|
+
interface CheckoutBookingDataSourceFunction {
|
|
10
|
+
(args: CheckoutBookingDataSourceFunctionArgs): CheckoutBookingDataSource;
|
|
11
|
+
}
|
|
12
|
+
declare const checkoutBookingDataSource: CheckoutBookingDataSourceFunction;
|
|
13
|
+
export type { CheckoutBookingDataSource };
|
|
14
|
+
export { checkoutBookingDataSource };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const checkoutBookingDataSource = ({ data: initialData }) => {
|
|
2
|
+
let data = initialData;
|
|
3
|
+
const getCheckoutBooking = () => data;
|
|
4
|
+
const saveCheckoutBooking = (checkoutBooking) => {
|
|
5
|
+
data = checkoutBooking;
|
|
6
|
+
};
|
|
7
|
+
return {
|
|
8
|
+
getCheckoutBooking,
|
|
9
|
+
saveCheckoutBooking,
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export { checkoutBookingDataSource };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CheckoutProjection } from "../../../projection/checkout/checkout";
|
|
2
|
+
import { CheckoutItemProjection } from "../../../projection/checkoutItem/checkoutItem";
|
|
3
|
+
interface CheckoutDataSourceFunctionArgs {
|
|
4
|
+
readonly data: CheckoutProjection;
|
|
5
|
+
}
|
|
6
|
+
interface CheckoutDataSource {
|
|
7
|
+
readonly getCheckout: () => CheckoutProjection;
|
|
8
|
+
readonly saveCheckout: (checkout: CheckoutProjection) => void;
|
|
9
|
+
readonly getCheckoutItem: (id: string) => CheckoutItemProjection | null;
|
|
10
|
+
readonly saveCheckoutItem: (checkoutItem: CheckoutItemProjection) => void;
|
|
11
|
+
}
|
|
12
|
+
interface CheckoutDataSourceFunction {
|
|
13
|
+
(args: CheckoutDataSourceFunctionArgs): CheckoutDataSource;
|
|
14
|
+
}
|
|
15
|
+
declare const checkoutDataSource: CheckoutDataSourceFunction;
|
|
16
|
+
export type { CheckoutDataSource };
|
|
17
|
+
export { checkoutDataSource };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const checkoutDataSource = ({ data: initialData }) => {
|
|
2
|
+
let data = initialData;
|
|
3
|
+
const getCheckout = () => data;
|
|
4
|
+
const saveCheckout = (checkout) => {
|
|
5
|
+
data = checkout;
|
|
6
|
+
};
|
|
7
|
+
const getCheckoutItem = (id) => data.items.find((item) => item.id === id) || null;
|
|
8
|
+
const saveCheckoutItem = (checkoutItem) => {
|
|
9
|
+
data = { ...data, items: data.items.map((item) => (item.id === checkoutItem.id ? checkoutItem : item)) };
|
|
10
|
+
};
|
|
11
|
+
return {
|
|
12
|
+
getCheckout,
|
|
13
|
+
saveCheckout,
|
|
14
|
+
getCheckoutItem,
|
|
15
|
+
saveCheckoutItem,
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export { checkoutDataSource };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RepositoryGetFunctionArgs, RepositorySaveFunctionArgs } from "@lookiero/messaging";
|
|
2
|
+
import { CheckoutBooking } from "../../../domain/checkoutBooking/model/checkoutBooking";
|
|
3
|
+
import { CheckoutBookingsGetFunction, CheckoutBookingsSaveFunction } from "../../../domain/checkoutBooking/model/checkoutBookings";
|
|
4
|
+
import { CheckoutBookingProjection } from "../../../projection/checkoutBooking/checkoutBooking";
|
|
5
|
+
import { CheckoutBookingDataSource } from "./checkoutBookingDataSource";
|
|
6
|
+
declare const toCheckoutBookingProjection: (checkoutBooking: CheckoutBooking) => CheckoutBookingProjection;
|
|
7
|
+
declare const getCheckoutBooking: CheckoutBookingsGetFunction<RepositoryGetFunctionArgs>;
|
|
8
|
+
interface DataSourceCheckoutItemsSaveFunctionArgs extends RepositorySaveFunctionArgs {
|
|
9
|
+
readonly dataSource: CheckoutBookingDataSource;
|
|
10
|
+
}
|
|
11
|
+
interface DataSourceCheckoutItemsSaveFunction extends CheckoutBookingsSaveFunction<DataSourceCheckoutItemsSaveFunctionArgs> {
|
|
12
|
+
}
|
|
13
|
+
declare const saveCheckoutBooking: DataSourceCheckoutItemsSaveFunction;
|
|
14
|
+
export { getCheckoutBooking, saveCheckoutBooking, toCheckoutBookingProjection };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import invariant from "tiny-invariant";
|
|
2
|
+
import { viewBookedSizeChangeProductsVariantsForCheckoutItem, } from "../../../projection/bookedSizeChangeProductsVariants/viewBookedSizeChangeProductVariantsForCheckoutItem";
|
|
3
|
+
const toCheckoutBookingDomain = (checkoutBooking) => {
|
|
4
|
+
invariant(checkoutBooking, "No checkoutBooking found!");
|
|
5
|
+
return {
|
|
6
|
+
aggregateId: checkoutBooking.id,
|
|
7
|
+
checkoutId: checkoutBooking.checkoutId,
|
|
8
|
+
checkoutItemIds: [checkoutBooking.checkoutItemId],
|
|
9
|
+
domainEvents: [],
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
const toCheckoutBookingProjection = (checkoutBooking) => ({
|
|
13
|
+
id: checkoutBooking.aggregateId,
|
|
14
|
+
checkoutId: checkoutBooking.checkoutId,
|
|
15
|
+
checkoutItemIds: checkoutBooking.checkoutItemIds,
|
|
16
|
+
});
|
|
17
|
+
const getCheckoutBooking = ({ queryBus }) => async (aggregateId) => toCheckoutBookingDomain(await queryBus(viewBookedSizeChangeProductsVariantsForCheckoutItem({ checkoutItemId: aggregateId })));
|
|
18
|
+
const saveCheckoutBooking = ({ dataSource }) => async (aggregateRoot) => {
|
|
19
|
+
dataSource.saveCheckoutBooking(toCheckoutBookingProjection(aggregateRoot));
|
|
20
|
+
};
|
|
21
|
+
export { getCheckoutBooking, saveCheckoutBooking, toCheckoutBookingProjection };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RepositoryGetFunctionArgs, RepositorySaveFunctionArgs } from "@lookiero/messaging";
|
|
2
|
+
import { CheckoutItem } from "../../../domain/checkoutItem/model/checkoutItem";
|
|
3
|
+
import { CheckoutItemsGetFunction, CheckoutItemsSaveFunction } from "../../../domain/checkoutItem/model/checkoutItems";
|
|
4
|
+
import { CheckoutItemProjection } from "../../../projection/checkoutItem/checkoutItem";
|
|
5
|
+
import { CheckoutDataSource } from "./checkoutDataSource";
|
|
6
|
+
declare const toCheckoutItemProjection: (checkoutItem: CheckoutItem) => CheckoutItemProjection;
|
|
7
|
+
declare const getCheckoutItem: CheckoutItemsGetFunction<RepositoryGetFunctionArgs>;
|
|
8
|
+
interface DataSourceCheckoutItemsSaveFunctionArgs extends RepositorySaveFunctionArgs {
|
|
9
|
+
readonly dataSource: CheckoutDataSource;
|
|
10
|
+
}
|
|
11
|
+
interface DataSourceCheckoutItemsSaveFunction extends CheckoutItemsSaveFunction<DataSourceCheckoutItemsSaveFunctionArgs> {
|
|
12
|
+
}
|
|
13
|
+
declare const saveCheckoutItem: DataSourceCheckoutItemsSaveFunction;
|
|
14
|
+
export { getCheckoutItem, saveCheckoutItem, toCheckoutItemProjection };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import invariant from "tiny-invariant";
|
|
2
|
+
import { viewCheckoutItemById, } from "../../../projection/checkoutItem/viewCheckoutItemById";
|
|
3
|
+
const toCheckoutItemProjection = (checkoutItem) => ({
|
|
4
|
+
id: checkoutItem.aggregateId,
|
|
5
|
+
status: checkoutItem.status,
|
|
6
|
+
productVariant: {},
|
|
7
|
+
feedback: {},
|
|
8
|
+
price: checkoutItem.price,
|
|
9
|
+
});
|
|
10
|
+
const toCheckoutItemDomain = (checkoutItem) => {
|
|
11
|
+
invariant(checkoutItem, "No checkoutItem found!");
|
|
12
|
+
return {
|
|
13
|
+
aggregateId: checkoutItem.id,
|
|
14
|
+
id: checkoutItem.id,
|
|
15
|
+
status: checkoutItem.status,
|
|
16
|
+
price: checkoutItem.price,
|
|
17
|
+
feedbacks: checkoutItem.feedback,
|
|
18
|
+
domainEvents: [],
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
const getCheckoutItem = ({ queryBus }) => async (aggregateId) => toCheckoutItemDomain(await queryBus(viewCheckoutItemById({ checkoutItemId: aggregateId })));
|
|
22
|
+
const saveCheckoutItem = ({ dataSource }) => async (aggregateRoot) => {
|
|
23
|
+
dataSource.saveCheckoutItem(toCheckoutItemProjection(aggregateRoot));
|
|
24
|
+
};
|
|
25
|
+
export { getCheckoutItem, saveCheckoutItem, toCheckoutItemProjection };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RepositoryGetFunctionArgs, RepositorySaveFunctionArgs } from "@lookiero/messaging";
|
|
2
|
+
import { CheckoutsGetFunction, CheckoutsSaveFunction } from "../../../domain/checkout/model/checkouts";
|
|
3
|
+
import { CheckoutDataSource } from "./checkoutDataSource";
|
|
4
|
+
declare const getCheckout: CheckoutsGetFunction<RepositoryGetFunctionArgs>;
|
|
5
|
+
interface DataSourceCheckoutsSaveFunctionArgs extends RepositorySaveFunctionArgs {
|
|
6
|
+
readonly dataSource: CheckoutDataSource;
|
|
7
|
+
}
|
|
8
|
+
interface DataSourceCheckoutsSaveFunction extends CheckoutsSaveFunction<DataSourceCheckoutsSaveFunctionArgs> {
|
|
9
|
+
}
|
|
10
|
+
declare const saveCheckout: DataSourceCheckoutsSaveFunction;
|
|
11
|
+
export { getCheckout, saveCheckout };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import invariant from "tiny-invariant";
|
|
2
|
+
import { viewCheckoutById, } from "../../../projection/checkout/viewCheckoutById";
|
|
3
|
+
const toCheckoutDomain = (checkout) => {
|
|
4
|
+
invariant(checkout, "No checkout found!");
|
|
5
|
+
return {
|
|
6
|
+
id: checkout.id,
|
|
7
|
+
status: checkout.status,
|
|
8
|
+
customerId: checkout.customerId,
|
|
9
|
+
boxId: checkout.boxId,
|
|
10
|
+
bookingId: checkout.bookingId,
|
|
11
|
+
expiresOn: checkout.expiresOn,
|
|
12
|
+
aggregateId: checkout.id,
|
|
13
|
+
domainEvents: [],
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
const toCheckoutProjection = (checkout) => ({
|
|
17
|
+
id: checkout.aggregateId,
|
|
18
|
+
status: checkout.status,
|
|
19
|
+
customerId: checkout.customerId,
|
|
20
|
+
boxId: checkout.boxId,
|
|
21
|
+
bookingId: checkout.bookingId,
|
|
22
|
+
expiresOn: checkout.expiresOn,
|
|
23
|
+
items: [],
|
|
24
|
+
});
|
|
25
|
+
const getCheckout = ({ queryBus }) => async (aggregateId) => toCheckoutDomain(await queryBus(viewCheckoutById({ checkoutId: aggregateId })));
|
|
26
|
+
const saveCheckout = ({ dataSource }) => async (aggregateRoot) => dataSource.saveCheckout(toCheckoutProjection(aggregateRoot));
|
|
27
|
+
export { getCheckout, saveCheckout };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RepositoryGetFunctionArgs, RepositorySaveFunctionArgs } from "@lookiero/messaging";
|
|
2
|
+
import { CheckoutsGetFunction, CheckoutsSaveFunction } from "../../../../domain/checkout/model/checkouts";
|
|
3
|
+
import { HttpPostFunction } from "../../../delivery/http/httpClient";
|
|
4
|
+
interface HttpCheckoutsGetFunctionArgs extends RepositoryGetFunctionArgs {
|
|
5
|
+
}
|
|
6
|
+
interface HttpCheckoutsGetFunction extends CheckoutsGetFunction<HttpCheckoutsGetFunctionArgs> {
|
|
7
|
+
}
|
|
8
|
+
declare const getCheckout: HttpCheckoutsGetFunction;
|
|
9
|
+
interface HttpCheckoutsSaveFunctionArgs extends RepositorySaveFunctionArgs {
|
|
10
|
+
readonly httpPost: HttpPostFunction;
|
|
11
|
+
}
|
|
12
|
+
interface HttpCheckoutsSaveFunction extends CheckoutsSaveFunction<HttpCheckoutsSaveFunctionArgs> {
|
|
13
|
+
}
|
|
14
|
+
declare const saveCheckout: HttpCheckoutsSaveFunction;
|
|
15
|
+
export type { HttpCheckoutsSaveFunction };
|
|
16
|
+
export { getCheckout, saveCheckout };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import invariant from "tiny-invariant";
|
|
2
|
+
import { viewCheckoutById, } from "../../../../projection/checkout/viewCheckoutById";
|
|
3
|
+
import { httpCheckoutsStart } from "./httpCheckoutsStart";
|
|
4
|
+
const toDomain = (checkout) => {
|
|
5
|
+
invariant(checkout, "No checkout found!");
|
|
6
|
+
return {
|
|
7
|
+
id: checkout.id,
|
|
8
|
+
status: checkout.status,
|
|
9
|
+
customerId: checkout.customerId,
|
|
10
|
+
boxId: checkout.boxId,
|
|
11
|
+
bookingId: checkout.bookingId,
|
|
12
|
+
expiresOn: checkout.expiresOn,
|
|
13
|
+
aggregateId: checkout.id,
|
|
14
|
+
domainEvents: [],
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
const getCheckout = ({ queryBus }) => async (aggregateId) => toDomain(await queryBus(viewCheckoutById({ checkoutId: aggregateId })));
|
|
18
|
+
const saveCheckout = ({ httpPost }) => async (aggregateRoot) => await httpCheckoutsStart({ httpPost })(aggregateRoot);
|
|
19
|
+
export { getCheckout, saveCheckout };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CHECKOUT_STARTED } from "../../../../domain/checkout/model/checkoutStarted";
|
|
2
|
+
const isCheckoutStarted = (event) => event.name === CHECKOUT_STARTED;
|
|
3
|
+
const httpCheckoutsStart = ({ httpPost }) => async ({ aggregateId, domainEvents }) => {
|
|
4
|
+
const checkoutStarted = domainEvents.find(isCheckoutStarted);
|
|
5
|
+
if (!checkoutStarted) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
await httpPost({
|
|
9
|
+
endpoint: "/start-checkout",
|
|
10
|
+
body: { checkoutId: aggregateId },
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
export { httpCheckoutsStart };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CommandStatus } from "@lookiero/messaging-react";
|
|
2
|
+
interface StartCheckoutFunction {
|
|
3
|
+
(): Promise<void>;
|
|
4
|
+
}
|
|
5
|
+
interface UseStartCheckoutArgs {
|
|
6
|
+
readonly checkoutId: string;
|
|
7
|
+
}
|
|
8
|
+
declare type UseStartCheckoutResult = [start: StartCheckoutFunction, status: CommandStatus];
|
|
9
|
+
interface UseStartCheckout {
|
|
10
|
+
(args: UseStartCheckoutArgs): UseStartCheckoutResult;
|
|
11
|
+
}
|
|
12
|
+
declare const useStartCheckout: UseStartCheckout;
|
|
13
|
+
export { useStartCheckout };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useCommand } from "@lookiero/messaging-react";
|
|
2
|
+
import { useCallback } from "react";
|
|
3
|
+
import { startCheckout } from "../../../../domain/checkout/command/startCheckout";
|
|
4
|
+
import { MESSAGING_CONTEXT_ID } from "../../../delivery/baseBootstrap";
|
|
5
|
+
const useStartCheckout = ({ checkoutId }) => {
|
|
6
|
+
const [commandBus, status] = useCommand({ contextId: MESSAGING_CONTEXT_ID });
|
|
7
|
+
const start = useCallback(() => commandBus(startCheckout({ aggregateId: checkoutId })), [checkoutId, commandBus]);
|
|
8
|
+
return [start, status];
|
|
9
|
+
};
|
|
10
|
+
export { useStartCheckout };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RepositoryGetFunctionArgs, RepositorySaveFunctionArgs } from "@lookiero/messaging";
|
|
2
|
+
import { CheckoutBookingsGetFunction, CheckoutBookingsSaveFunction } from "../../../../domain/checkoutBooking/model/checkoutBookings";
|
|
3
|
+
import { HttpPostFunction } from "../../../delivery/http/httpClient";
|
|
4
|
+
interface HttpCheckoutBookingsGetFunctionArgs extends RepositoryGetFunctionArgs {
|
|
5
|
+
}
|
|
6
|
+
interface HttpCheckoutBookingsGetFunction extends CheckoutBookingsGetFunction<HttpCheckoutBookingsGetFunctionArgs> {
|
|
7
|
+
}
|
|
8
|
+
declare const getCheckoutBooking: HttpCheckoutBookingsGetFunction;
|
|
9
|
+
interface HttpCheckoutBookingsSaveFunctionArgs extends RepositorySaveFunctionArgs {
|
|
10
|
+
readonly httpPost: HttpPostFunction;
|
|
11
|
+
}
|
|
12
|
+
interface HttpCheckoutBookingsSaveFunction extends CheckoutBookingsSaveFunction<HttpCheckoutBookingsSaveFunctionArgs> {
|
|
13
|
+
}
|
|
14
|
+
declare const saveCheckoutBooking: HttpCheckoutBookingsSaveFunction;
|
|
15
|
+
export type { HttpCheckoutBookingsSaveFunction };
|
|
16
|
+
export { getCheckoutBooking, saveCheckoutBooking };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import invariant from "tiny-invariant";
|
|
2
|
+
import { viewCheckoutBookingById, } from "../../../../projection/checkoutBooking/viewCheckoutBookingById";
|
|
3
|
+
import { httpCheckoutBookingsBook } from "./httpCheckoutBookingsBook";
|
|
4
|
+
const toDomain = (checkoutBooking) => {
|
|
5
|
+
invariant(checkoutBooking, "No checkout booking found!");
|
|
6
|
+
return {
|
|
7
|
+
checkoutId: checkoutBooking.checkoutId,
|
|
8
|
+
checkoutItemIds: checkoutBooking.checkoutItemIds,
|
|
9
|
+
aggregateId: checkoutBooking.id,
|
|
10
|
+
domainEvents: [],
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
const getCheckoutBooking = ({ queryBus }) => async (aggregateId) => toDomain(await queryBus(viewCheckoutBookingById({ checkoutBookingId: aggregateId })));
|
|
14
|
+
const saveCheckoutBooking = ({ httpPost }) => async (aggregateRoot) => await httpCheckoutBookingsBook({ httpPost })(aggregateRoot);
|
|
15
|
+
export { getCheckoutBooking, saveCheckoutBooking };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { HttpCheckoutBookingsSaveFunction } from "./httpCheckoutBookings";
|
|
2
|
+
interface HttpCheckoutBookingsBookFunction extends HttpCheckoutBookingsSaveFunction {
|
|
3
|
+
}
|
|
4
|
+
declare const httpCheckoutBookingsBook: HttpCheckoutBookingsBookFunction;
|
|
5
|
+
export { httpCheckoutBookingsBook };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CHECKOUT_BOOKING_BOOKED, } from "../../../../domain/checkoutBooking/model/checkoutBookingBooked";
|
|
2
|
+
const isCheckoutBookingBooked = (event) => event.name === CHECKOUT_BOOKING_BOOKED;
|
|
3
|
+
const httpCheckoutBookingsBook = ({ httpPost }) => async ({ aggregateId, checkoutId, domainEvents }) => {
|
|
4
|
+
const checkoutBookingBooked = domainEvents.find(isCheckoutBookingBooked);
|
|
5
|
+
if (!checkoutBookingBooked) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
const { checkoutItemId } = checkoutBookingBooked;
|
|
9
|
+
await httpPost({
|
|
10
|
+
endpoint: "/book-size-change-product-variants-for-checkout-item",
|
|
11
|
+
body: {
|
|
12
|
+
checkoutId,
|
|
13
|
+
checkoutItemId,
|
|
14
|
+
checkoutBookingId: aggregateId,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
export { httpCheckoutBookingsBook };
|
package/dist/infrastructure/domain/checkoutBooking/react/useBookCheckouBookingForCheckoutItem.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CommandStatus } from "@lookiero/messaging-react";
|
|
2
|
+
interface BookFunction {
|
|
3
|
+
(): Promise<void>;
|
|
4
|
+
}
|
|
5
|
+
declare type UseBookCheckouBookingForCheckoutItem = [book: BookFunction, status: CommandStatus];
|
|
6
|
+
interface UseBookCheckouBookingForCheckoutItemFunctionArgs {
|
|
7
|
+
readonly checkoutId: string;
|
|
8
|
+
readonly checkoutItemId: string;
|
|
9
|
+
readonly checkoutBookingId: string | undefined;
|
|
10
|
+
}
|
|
11
|
+
interface UseBookCheckouBookingForCheckoutItemFunction {
|
|
12
|
+
(args: UseBookCheckouBookingForCheckoutItemFunctionArgs): UseBookCheckouBookingForCheckoutItem;
|
|
13
|
+
}
|
|
14
|
+
declare const useBookCheckouBookingForCheckoutItem: UseBookCheckouBookingForCheckoutItemFunction;
|
|
15
|
+
export { useBookCheckouBookingForCheckoutItem };
|
package/dist/infrastructure/domain/checkoutBooking/react/useBookCheckouBookingForCheckoutItem.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useCommand } from "@lookiero/messaging-react";
|
|
2
|
+
import { useCallback } from "react";
|
|
3
|
+
import { v4 as uuid } from "uuid";
|
|
4
|
+
import { bookCheckoutBookingForCheckoutItem } from "../../../../domain/checkoutBooking/command/bookCheckoutBookingForCheckoutItem";
|
|
5
|
+
import { MESSAGING_CONTEXT_ID } from "../../../delivery/baseBootstrap";
|
|
6
|
+
const useBookCheckouBookingForCheckoutItem = ({ checkoutId, checkoutItemId, checkoutBookingId, }) => {
|
|
7
|
+
const [commandBus, status] = useCommand({ contextId: MESSAGING_CONTEXT_ID });
|
|
8
|
+
const book = useCallback(() => commandBus(bookCheckoutBookingForCheckoutItem({
|
|
9
|
+
aggregateId: checkoutBookingId || uuid(),
|
|
10
|
+
checkoutId,
|
|
11
|
+
checkoutItemId,
|
|
12
|
+
})), [checkoutBookingId, checkoutId, checkoutItemId, commandBus]);
|
|
13
|
+
return [book, status];
|
|
14
|
+
};
|
|
15
|
+
export { useBookCheckouBookingForCheckoutItem };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CommandStatus } from "@lookiero/messaging-react";
|
|
2
|
+
interface BookFunction {
|
|
3
|
+
(): Promise<void>;
|
|
4
|
+
}
|
|
5
|
+
declare type UseBookSizeReplaceableProductVariantsForCheckoutItem = [book: BookFunction, status: CommandStatus];
|
|
6
|
+
interface UseBookSizeReplaceableProductVariantsForCheckoutItemFunctionArgs {
|
|
7
|
+
readonly checkoutId: string;
|
|
8
|
+
readonly checkoutItemId: string;
|
|
9
|
+
readonly checkoutBookingId: string;
|
|
10
|
+
}
|
|
11
|
+
interface UseBookSizeReplaceableProductVariantsForCheckoutItemFunction {
|
|
12
|
+
(args: UseBookSizeReplaceableProductVariantsForCheckoutItemFunctionArgs): UseBookSizeReplaceableProductVariantsForCheckoutItem;
|
|
13
|
+
}
|
|
14
|
+
declare const useBookSizeReplaceableProductVariantsForCheckoutItem: UseBookSizeReplaceableProductVariantsForCheckoutItemFunction;
|
|
15
|
+
export { useBookSizeReplaceableProductVariantsForCheckoutItem };
|