flowrix 1.0.1-beta.16 → 1.0.1-beta.160
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/module.d.mts +1 -6
- package/dist/module.json +1 -1
- package/dist/module.mjs +126 -155
- package/dist/runtime/components/DynamicComponents/SubscriptionForm.d.vue.ts +3 -0
- package/dist/runtime/components/DynamicComponents/SubscriptionForm.vue +60 -0
- package/dist/runtime/components/DynamicComponents/SubscriptionForm.vue.d.ts +3 -0
- package/dist/runtime/components/DynamicComponents/WebForm.d.vue.ts +7 -0
- package/dist/runtime/components/DynamicComponents/WebForm.vue +115 -0
- package/dist/runtime/components/DynamicComponents/WebForm.vue.d.ts +7 -0
- package/dist/runtime/components/Pages/dynamic.d.vue.ts +7 -0
- package/dist/runtime/components/Pages/dynamic.vue +124 -0
- package/dist/runtime/components/Pages/dynamic.vue.d.ts +7 -0
- package/dist/runtime/components/Pages/index.d.vue.ts +7 -0
- package/dist/runtime/components/Pages/index.vue +214 -0
- package/dist/runtime/components/Pages/index.vue.d.ts +7 -0
- package/dist/runtime/components/Product/AddToCart.d.vue.ts +15 -0
- package/dist/runtime/components/Product/AddToCart.vue +176 -0
- package/dist/runtime/components/Product/AddToCart.vue.d.ts +15 -0
- package/dist/runtime/components/Product/AddtoCartSample.d.vue.ts +6 -0
- package/dist/runtime/components/Product/AddtoCartSample.vue +110 -0
- package/dist/runtime/components/Product/AddtoCartSample.vue.d.ts +6 -0
- package/dist/runtime/components/Product/Badges.d.vue.ts +13 -0
- package/dist/runtime/components/Product/Badges.vue +84 -0
- package/dist/runtime/components/Product/Badges.vue.d.ts +13 -0
- package/dist/runtime/components/Product/Description.d.vue.ts +9 -0
- package/dist/runtime/components/Product/Description.vue +96 -0
- package/dist/runtime/components/Product/Description.vue.d.ts +9 -0
- package/dist/runtime/components/Product/Dynamic.d.vue.ts +9 -0
- package/dist/runtime/components/Product/Dynamic.vue +136 -0
- package/dist/runtime/components/Product/Dynamic.vue.d.ts +9 -0
- package/dist/runtime/components/Product/Gallery.d.vue.ts +11 -0
- package/dist/runtime/components/Product/Gallery.vue +133 -0
- package/dist/runtime/components/Product/Gallery.vue.d.ts +11 -0
- package/dist/runtime/components/Product/PopUpCart.d.vue.ts +11 -0
- package/dist/runtime/components/Product/PopUpCart.vue +155 -0
- package/dist/runtime/components/Product/PopUpCart.vue.d.ts +11 -0
- package/dist/runtime/components/Product/ProductInfo.d.vue.ts +7 -0
- package/dist/runtime/components/Product/ProductInfo.vue +105 -0
- package/dist/runtime/components/Product/ProductInfo.vue.d.ts +7 -0
- package/dist/runtime/components/Product/RequiredPopUp.d.vue.ts +9 -0
- package/dist/runtime/components/Product/RequiredPopUp.vue +57 -0
- package/dist/runtime/components/Product/RequiredPopUp.vue.d.ts +9 -0
- package/dist/runtime/components/Product/bundleProduct/Bundle.d.vue.ts +13 -0
- package/dist/runtime/components/Product/bundleProduct/Bundle.vue +35 -0
- package/dist/runtime/components/Product/bundleProduct/Bundle.vue.d.ts +13 -0
- package/dist/runtime/components/Product/bundleProduct/index.d.vue.ts +8 -0
- package/dist/runtime/components/Product/bundleProduct/index.vue +32 -0
- package/dist/runtime/components/Product/bundleProduct/index.vue.d.ts +8 -0
- package/dist/runtime/components/Product/customProduct/AddtoCartSample.d.vue.ts +6 -0
- package/dist/runtime/components/Product/customProduct/AddtoCartSample.vue +101 -0
- package/dist/runtime/components/Product/customProduct/AddtoCartSample.vue.d.ts +6 -0
- package/dist/runtime/components/Product/customProduct/Attributes.d.vue.ts +9 -0
- package/dist/runtime/components/Product/customProduct/Attributes.vue +12 -0
- package/dist/runtime/components/Product/customProduct/Attributes.vue.d.ts +9 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/AttributeType/drop-down.d.vue.ts +13 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/AttributeType/drop-down.vue +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/AttributeType/drop-down.vue.d.ts +13 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/AttributeType/multi-collection.d.vue.ts +3 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/AttributeType/multi-collection.vue +253 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/AttributeType/multi-collection.vue.d.ts +3 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/AttributeType/multi-colors.d.vue.ts +3 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/AttributeType/multi-colors.vue +253 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/AttributeType/multi-colors.vue.d.ts +3 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/AttributeType/multi-values.d.vue.ts +3 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/AttributeType/multi-values.vue +214 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/AttributeType/multi-values.vue.d.ts +3 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/AttributeType/style.d.vue.ts +13 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/AttributeType/style.vue +9 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/AttributeType/style.vue.d.ts +13 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/AttributeType/swatch.d.vue.ts +13 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/AttributeType/swatch.vue +9 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/AttributeType/swatch.vue.d.ts +13 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/PopupContent/Popup.d.vue.ts +9 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/PopupContent/Popup.vue +133 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/PopupContent/Popup.vue.d.ts +9 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/SingleAttribute.d.vue.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/SingleAttribute.vue +35 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/SingleAttribute.vue.d.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/SingleSlide.d.vue.ts +13 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/SingleSlide.vue +134 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/SingleSlide.vue.d.ts +13 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/SingleSlidemagnifier.d.vue.ts +15 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/SingleSlidemagnifier.vue +138 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/SingleSlidemagnifier.vue.d.ts +15 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/button.d.vue.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/button.vue +149 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/button.vue.d.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/dropdown.d.vue.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/dropdown.vue +82 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/dropdown.vue.d.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/dropdownWithIcon.d.vue.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/dropdownWithIcon.vue +108 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/dropdownWithIcon.vue.d.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/height.d.vue.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/height.vue +104 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/height.vue.d.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/imageBox.d.vue.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/imageBox.vue +87 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/imageBox.vue.d.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/imageBoxWithMagnifier.d.vue.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/imageBoxWithMagnifier.vue +219 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/imageBoxWithMagnifier.vue.d.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/message.d.vue.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/message.vue +36 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/message.vue.d.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/number.d.vue.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/number.vue +45 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/number.vue.d.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/orderSample/button.d.vue.ts +13 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/orderSample/button.vue +48 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/orderSample/button.vue.d.ts +13 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/radio.d.vue.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/radio.vue +154 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/radio.vue.d.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/slider.d.vue.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/slider.vue +111 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/slider.vue.d.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/sliderWithMagnifier.d.vue.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/sliderWithMagnifier.vue +269 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/sliderWithMagnifier.vue.d.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/subheight.d.vue.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/subheight.vue +63 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/subheight.vue.d.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/subwidth.d.vue.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/subwidth.vue +63 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/subwidth.vue.d.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/swatch.d.vue.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/swatch.vue +220 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/swatch.vue.d.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/text.d.vue.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/text.vue +47 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/text.vue.d.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/width.d.vue.ts +11 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/width.vue +91 -0
- package/dist/runtime/components/Product/customProduct/AttributesComponents/Styles/width.vue.d.ts +11 -0
- package/dist/runtime/components/Product/customProduct/ConfirmPopup.d.vue.ts +9 -0
- package/dist/runtime/components/Product/customProduct/ConfirmPopup.vue +25 -0
- package/dist/runtime/components/Product/customProduct/ConfirmPopup.vue.d.ts +9 -0
- package/dist/runtime/components/Product/customProduct/RequiredPopUp.d.vue.ts +9 -0
- package/dist/runtime/components/Product/customProduct/RequiredPopUp.vue +49 -0
- package/dist/runtime/components/Product/customProduct/RequiredPopUp.vue.d.ts +9 -0
- package/dist/runtime/components/Product/customProduct/Reviews.d.vue.ts +7 -0
- package/dist/runtime/components/Product/customProduct/Reviews.vue +25 -0
- package/dist/runtime/components/Product/customProduct/Reviews.vue.d.ts +7 -0
- package/dist/runtime/components/Product/customProduct/SingleStep.d.vue.ts +11 -0
- package/dist/runtime/components/Product/customProduct/SingleStep.vue +11 -0
- package/dist/runtime/components/Product/customProduct/SingleStep.vue.d.ts +11 -0
- package/dist/runtime/components/Product/customProduct/Steps.d.vue.ts +9 -0
- package/dist/runtime/components/Product/customProduct/Steps.vue +221 -0
- package/dist/runtime/components/Product/customProduct/Steps.vue.d.ts +9 -0
- package/dist/runtime/components/Product/customProduct/index.d.vue.ts +9 -0
- package/dist/runtime/components/Product/customProduct/index.vue +272 -0
- package/dist/runtime/components/Product/customProduct/index.vue.d.ts +9 -0
- package/dist/runtime/components/Product/index.d.vue.ts +8 -0
- package/dist/runtime/components/Product/index.vue +88 -0
- package/dist/runtime/components/Product/index.vue.d.ts +8 -0
- package/dist/runtime/components/Product/sampleProduct/ProductVariation.d.vue.ts +5 -0
- package/dist/runtime/components/Product/sampleProduct/ProductVariation.vue +61 -0
- package/dist/runtime/components/Product/sampleProduct/ProductVariation.vue.d.ts +5 -0
- package/dist/runtime/components/Product/sampleProduct/SampleDetails.d.vue.ts +7 -0
- package/dist/runtime/components/Product/sampleProduct/SampleDetails.vue +74 -0
- package/dist/runtime/components/Product/sampleProduct/SampleDetails.vue.d.ts +7 -0
- package/dist/runtime/components/Product/sampleProduct/SampleFeatures.d.vue.ts +9 -0
- package/dist/runtime/components/Product/sampleProduct/SampleFeatures.vue +63 -0
- package/dist/runtime/components/Product/sampleProduct/SampleFeatures.vue.d.ts +9 -0
- package/dist/runtime/components/Product/sampleProduct/index.d.vue.ts +8 -0
- package/dist/runtime/components/Product/sampleProduct/index.vue +64 -0
- package/dist/runtime/components/Product/sampleProduct/index.vue.d.ts +8 -0
- package/dist/runtime/components/Product/simpleProduct/ProductVariation.d.vue.ts +5 -0
- package/dist/runtime/components/Product/simpleProduct/ProductVariation.vue +61 -0
- package/dist/runtime/components/Product/simpleProduct/ProductVariation.vue.d.ts +5 -0
- package/dist/runtime/components/Product/simpleProduct/index.d.vue.ts +8 -0
- package/dist/runtime/components/Product/simpleProduct/index.vue +34 -0
- package/dist/runtime/components/Product/simpleProduct/index.vue.d.ts +8 -0
- package/dist/runtime/components/SampleProductCard.d.vue.ts +13 -0
- package/dist/runtime/components/SampleProductCard.vue +362 -0
- package/dist/runtime/components/SampleProductCard.vue.d.ts +13 -0
- package/dist/runtime/components/Types/brand/index.d.vue.ts +6 -0
- package/dist/runtime/components/Types/brand/index.vue +12 -0
- package/dist/runtime/components/Types/brand/index.vue.d.ts +6 -0
- package/dist/runtime/components/Types/category/index.d.vue.ts +6 -0
- package/dist/runtime/components/Types/category/index.vue +50 -0
- package/dist/runtime/components/Types/category/index.vue.d.ts +6 -0
- package/dist/runtime/components/Types/dynamic.d.vue.ts +7 -0
- package/dist/runtime/components/Types/dynamic.vue +160 -0
- package/dist/runtime/components/Types/dynamic.vue.d.ts +7 -0
- package/dist/runtime/components/Types/page/index.d.vue.ts +7 -0
- package/dist/runtime/components/Types/page/index.vue +47 -0
- package/dist/runtime/components/Types/page/index.vue.d.ts +7 -0
- package/dist/runtime/components/Types/post/index.d.vue.ts +6 -0
- package/dist/runtime/components/Types/post/index.vue +51 -0
- package/dist/runtime/components/Types/post/index.vue.d.ts +6 -0
- package/dist/runtime/components/Types/product/index.d.vue.ts +6 -0
- package/dist/runtime/components/Types/product/index.vue +10 -0
- package/dist/runtime/components/Types/product/index.vue.d.ts +6 -0
- package/dist/runtime/components/WishList/dropdown.d.vue.ts +9 -0
- package/dist/runtime/components/WishList/dropdown.vue +417 -0
- package/dist/runtime/components/WishList/dropdown.vue.d.ts +9 -0
- package/dist/runtime/components/WishList/modal.d.vue.ts +13 -0
- package/dist/runtime/components/WishList/modal.vue +229 -0
- package/dist/runtime/components/WishList/modal.vue.d.ts +13 -0
- package/dist/runtime/composables/Blog/useBlogIndex.d.ts +2 -5
- package/dist/runtime/composables/Blog/useBlogSingle.js +6 -9
- package/dist/runtime/composables/Brand/brand.d.ts +1 -1
- package/dist/runtime/composables/Brand/brand.js +30 -2
- package/dist/runtime/composables/Cart/useCart.d.ts +40 -0
- package/dist/runtime/composables/Cart/useCart.js +10 -0
- package/dist/runtime/composables/Cart/useCartComponent.d.ts +1 -0
- package/dist/runtime/composables/Cart/useCartComponent.js +11 -0
- package/dist/runtime/composables/Cart/useCartDetail.d.ts +15 -5
- package/dist/runtime/composables/Cart/useCartDetail.js +3 -0
- package/dist/runtime/composables/Category/useCategoryIndex.d.ts +25 -32
- package/dist/runtime/composables/Category/useCategoryIndex.js +63 -44
- package/dist/runtime/composables/Checkout/PaymentMethods/useDirectDeposit.js +8 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useEway.js +16 -6
- package/dist/runtime/composables/Checkout/PaymentMethods/useFlowrixpay.d.ts +40 -1
- package/dist/runtime/composables/Checkout/PaymentMethods/useFlowrixpay.js +10 -2
- package/dist/runtime/composables/Checkout/PaymentMethods/useOpayo.d.ts +40 -1
- package/dist/runtime/composables/Checkout/PaymentMethods/useOpayo.js +10 -2
- package/dist/runtime/composables/Checkout/PaymentMethods/usePaymentMethods.js +3 -14
- package/dist/runtime/composables/Checkout/PaymentMethods/usePaypal.js +8 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useStripe.d.ts +2 -2
- package/dist/runtime/composables/Checkout/PaymentMethods/useStripe.js +8 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useZippay.js +8 -0
- package/dist/runtime/composables/Checkout/useCheckout.d.ts +90 -73
- package/dist/runtime/composables/Checkout/useCheckout.js +117 -53
- package/dist/runtime/composables/Checkout/useCheckoutBillingAddress.d.ts +43 -0
- package/dist/runtime/composables/Checkout/useCheckoutBillingAddress.js +84 -0
- package/dist/runtime/composables/Checkout/useCheckoutShippingAddress.d.ts +55 -0
- package/dist/runtime/composables/Checkout/useCheckoutShippingAddress.js +196 -0
- package/dist/runtime/composables/Checkout/useCreateAccount.d.ts +7 -7
- package/dist/runtime/composables/Checkout/useCreateAccount.js +3 -1
- package/dist/runtime/composables/Checkout/useDeliveryMethod.d.ts +2 -2
- package/dist/runtime/composables/Checkout/useDeliveryMethod.js +8 -27
- package/dist/runtime/composables/Customer/useBillingAddress.d.ts +115 -0
- package/dist/runtime/composables/Customer/useBillingAddress.js +95 -0
- package/dist/runtime/composables/Customer/useLogin.d.ts +9 -0
- package/dist/runtime/composables/Customer/useLogin.js +34 -0
- package/dist/runtime/composables/Customer/useOrders.d.ts +29 -0
- package/dist/runtime/composables/Customer/useOrders.js +56 -0
- package/dist/runtime/composables/Customer/usePasswordReset.d.ts +26 -0
- package/dist/runtime/composables/Customer/usePasswordReset.js +258 -0
- package/dist/runtime/composables/Customer/useProfile.d.ts +75 -0
- package/dist/runtime/composables/Customer/useProfile.js +106 -0
- package/dist/runtime/composables/Customer/useQuotations.d.ts +32 -0
- package/dist/runtime/composables/Customer/useQuotations.js +40 -0
- package/dist/runtime/composables/Customer/useRegister.d.ts +121 -13
- package/dist/runtime/composables/Customer/useRegister.js +310 -35
- package/dist/runtime/composables/Customer/useShippingAddress.d.ts +124 -0
- package/dist/runtime/composables/Customer/useShippingAddress.js +146 -0
- package/dist/runtime/composables/Customer/useUpdatePassword.d.ts +21 -0
- package/dist/runtime/composables/Customer/useUpdatePassword.js +130 -0
- package/dist/runtime/composables/Customer/useUserCards.d.ts +22 -0
- package/dist/runtime/composables/Customer/useUserCards.js +65 -0
- package/dist/runtime/composables/{useWishlists.d.ts → Customer/useWishlists.d.ts} +7 -20
- package/dist/runtime/composables/{useWishlists.js → Customer/useWishlists.js} +21 -30
- package/dist/runtime/composables/Extras/useCountry.d.ts +11 -6
- package/dist/runtime/composables/Extras/useCountry.js +5 -4
- package/dist/runtime/composables/Footer/useFooter.d.ts +4 -4
- package/dist/runtime/composables/Footer/useFooter.js +12 -8
- package/dist/runtime/composables/Header/useHeader.d.ts +6 -20
- package/dist/runtime/composables/Header/useHeader.js +3 -2
- package/dist/runtime/composables/Product/CustomProduct/useAttributes.js +4 -0
- package/dist/runtime/composables/Product/CustomProduct/useCustomeScript.d.ts +4 -0
- package/dist/runtime/composables/Product/CustomProduct/useCustomeScript.js +9 -16
- package/dist/runtime/composables/Product/CustomProduct/useSteps.d.ts +1 -1
- package/dist/runtime/composables/Product/CustomProductDynamic/useAttributeTypeDynamic.d.ts +3 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useAttributeTypeDynamic.js +20 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useAttributesDynamic.d.ts +70 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useAttributesDynamic.js +63 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useCustomProductDynamic.d.ts +74 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useCustomProductDynamic.js +107 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useCustomeScriptDynamic.d.ts +159 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useCustomeScriptDynamic.js +2079 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useSingleAttributeDynamic.d.ts +4 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useSingleAttributeDynamic.js +27 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useSingleStepDynamic.d.ts +68 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useSingleStepDynamic.js +21 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useSingleValueDynamic.d.ts +67 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useSingleValueDynamic.js +15 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useStepsDynamic.d.ts +88 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useStepsDynamic.js +72 -0
- package/dist/runtime/composables/Product/useProductCard.d.ts +90 -9
- package/dist/runtime/composables/Product/useProductCard.js +257 -55
- package/dist/runtime/composables/Product/useProductComponent.d.ts +1 -3
- package/dist/runtime/composables/Product/useProductComponent.js +105 -1
- package/dist/runtime/composables/Product/useProductSlug.d.ts +8 -1
- package/dist/runtime/composables/Product/useQuickView.d.ts +8 -0
- package/dist/runtime/composables/Product/useQuickView.js +26 -0
- package/dist/runtime/composables/Product/useService.d.ts +31 -15
- package/dist/runtime/composables/Product/useService.js +138 -49
- package/dist/runtime/composables/Samples/useSamples.d.ts +5 -6
- package/dist/runtime/composables/Samples/useSamples.js +19 -15
- package/dist/runtime/composables/SideBar/Filters/useFilters.d.ts +2 -2
- package/dist/runtime/composables/SideBar/Filters/useSorting.d.ts +2 -2
- package/dist/runtime/composables/index.d.ts +28 -13
- package/dist/runtime/composables/index.js +28 -13
- package/dist/runtime/composables/useAddresses.js +29 -8
- package/dist/runtime/composables/useApp.d.ts +1 -0
- package/dist/runtime/composables/useApp.js +87 -0
- package/dist/runtime/composables/useCards.js +2 -3
- package/dist/runtime/composables/useClientApi.d.ts +8 -8
- package/dist/runtime/composables/useClientApi.js +74 -30
- package/dist/runtime/composables/useCookieConsent.d.ts +48 -0
- package/dist/runtime/composables/useCookieConsent.js +185 -0
- package/dist/runtime/composables/useDataLayer.js +1 -1
- package/dist/runtime/composables/useDotDigital.d.ts +3 -0
- package/dist/runtime/composables/useDotDigital.js +122 -0
- package/dist/runtime/composables/useLocation.d.ts +49 -19
- package/dist/runtime/composables/useLocation.js +332 -25
- package/dist/runtime/composables/useMetaLayer.js +13 -13
- package/dist/runtime/composables/usePriceCalculation.d.ts +33 -0
- package/dist/runtime/composables/usePriceCalculation.js +107 -0
- package/dist/runtime/composables/useQuotationCheckout.d.ts +78 -0
- package/dist/runtime/composables/useQuotationCheckout.js +137 -0
- package/dist/runtime/composables/useSubscriptions.d.ts +17 -10
- package/dist/runtime/composables/useSubscriptions.js +68 -33
- package/dist/runtime/composables/useTikTokDatalayer.js +7 -7
- package/dist/runtime/composables/useWebforms.d.ts +38 -9
- package/dist/runtime/composables/useWebforms.js +93 -60
- package/dist/runtime/middleware/flowrix.d.ts +5 -4
- package/dist/runtime/middleware/flowrix.js +41 -23
- package/dist/runtime/middleware/flowrixs3.d.ts +3 -0
- package/dist/runtime/middleware/flowrixs3.js +65 -0
- package/dist/runtime/pages/404.d.vue.ts +3 -0
- package/dist/runtime/pages/404.vue +6 -0
- package/dist/runtime/pages/404.vue.d.ts +3 -0
- package/dist/runtime/pages/flowrix-default.d.vue.ts +3 -0
- package/dist/runtime/pages/flowrix-default.vue +112 -0
- package/dist/runtime/pages/flowrix-default.vue.d.ts +3 -0
- package/dist/runtime/plugin.d.ts +1 -1
- package/dist/runtime/plugins/bootstrap.client.d.ts +3 -0
- package/dist/runtime/plugins/bootstrap.client.js +4 -0
- package/dist/runtime/plugins/full-reload.client.d.ts +2 -0
- package/dist/runtime/plugins/full-reload.client.js +28 -0
- package/dist/runtime/plugins/router.d.ts +2 -0
- package/dist/runtime/plugins/router.js +11 -0
- package/dist/runtime/server/api/albums.js +15 -14
- package/dist/runtime/server/api/auth/login.d.ts +0 -11
- package/dist/runtime/server/api/auth/login.js +0 -69
- package/dist/runtime/server/api/banners.d.ts +0 -1
- package/dist/runtime/server/api/banners.js +15 -37
- package/dist/runtime/server/api/brand/[...slug].js +26 -0
- package/dist/runtime/server/api/brand/index.js +20 -0
- package/dist/runtime/server/api/cache/[...slug].delete.d.ts +4 -1
- package/dist/runtime/server/api/cache/[...slug].delete.js +3 -7
- package/dist/runtime/server/api/cache/clean.get.d.ts +5 -0
- package/dist/runtime/server/api/cache/clean.get.js +3 -7
- package/dist/runtime/server/api/cart/[slug]/add.d.ts +0 -2
- package/dist/runtime/server/api/cart/[slug]/add.js +0 -21
- package/dist/runtime/server/api/cart/[slug]/update.d.ts +0 -2
- package/dist/runtime/server/api/cart/[slug]/update.js +0 -21
- package/dist/runtime/server/api/cart/related.d.ts +0 -0
- package/dist/runtime/server/api/cart/related.js +0 -0
- package/dist/runtime/server/api/cart/remove.d.ts +0 -2
- package/dist/runtime/server/api/cart/remove.js +0 -21
- package/dist/runtime/server/api/catalog/brands.js +20 -0
- package/dist/runtime/server/api/catalog/categories.d.ts +0 -1
- package/dist/runtime/server/api/catalog/categories.js +16 -39
- package/dist/runtime/server/api/catalog/categoriesall.js +20 -0
- package/dist/runtime/server/api/catalog/featured.d.ts +0 -1
- package/dist/runtime/server/api/catalog/featured.js +16 -37
- package/dist/runtime/server/api/catalog/posts.js +20 -0
- package/dist/runtime/server/api/catalog/samples.d.ts +0 -1
- package/dist/runtime/server/api/catalog/samples.js +16 -40
- package/dist/runtime/server/api/catalog/search.d.ts +0 -1
- package/dist/runtime/server/api/catalog/search.js +16 -40
- package/dist/runtime/server/api/category/[...slug].d.ts +1 -2
- package/dist/runtime/server/api/category/[...slug].js +37 -41
- package/dist/runtime/server/api/checkout/applyCoupon.d.ts +0 -2
- package/dist/runtime/server/api/checkout/applyCoupon.js +0 -20
- package/dist/runtime/server/api/checkout/configs.d.ts +0 -2
- package/dist/runtime/server/api/checkout/configs.js +0 -20
- package/dist/runtime/server/api/checkout/countries.d.ts +0 -2
- package/dist/runtime/server/api/checkout/countries.js +0 -17
- package/dist/runtime/server/api/checkout/paymentmethod.d.ts +0 -2
- package/dist/runtime/server/api/checkout/paymentmethod.js +0 -20
- package/dist/runtime/server/api/checkout/quotation/guest/customer.d.ts +0 -0
- package/dist/runtime/server/api/checkout/quotation/guest/customer.js +0 -0
- package/dist/runtime/server/api/{blog/[slug].d.ts → checkvariables.d.ts} +1 -1
- package/dist/runtime/server/api/checkvariables.js +36 -0
- package/dist/runtime/server/api/cmspost/[...slug].js +23 -0
- package/dist/runtime/server/api/cmspost/all.d.ts +3 -0
- package/dist/runtime/server/api/cmspost/all.js +51 -0
- package/dist/runtime/server/api/company/profile.js +15 -14
- package/dist/runtime/server/api/contact-center/webforms/[id]/details.d.ts +0 -3
- package/dist/runtime/server/api/contact-center/webforms/[id]/details.js +0 -19
- package/dist/runtime/server/api/countries.js +19 -0
- package/dist/runtime/server/api/customer/wishlist/deleteFromWishList.d.ts +0 -2
- package/dist/runtime/server/api/customer/wishlist/deleteFromWishList.js +0 -46
- package/dist/runtime/server/api/featured.d.ts +0 -0
- package/dist/runtime/server/api/featured.js +0 -0
- package/dist/runtime/server/api/generate/robots.get.d.ts +2 -0
- package/dist/runtime/server/api/generate/robots.get.js +18 -0
- package/dist/runtime/server/api/generate/sitemap.get.js +28 -0
- package/dist/runtime/server/api/global/[...slug].js +20 -0
- package/dist/runtime/server/api/location.d.ts +0 -2
- package/dist/runtime/server/api/location.js +0 -13
- package/dist/runtime/server/api/nav/[id]/links.js +21 -15
- package/dist/runtime/server/api/page/[...slug].js +23 -0
- package/dist/runtime/server/api/permalink/[...slug].get.js +31 -0
- package/dist/runtime/server/api/product/[...slug].d.ts +0 -1
- package/dist/runtime/server/api/product/[...slug].js +18 -37
- package/dist/runtime/server/api/quickview/[slug].js +22 -0
- package/dist/runtime/server/api/reviews.d.ts +2 -0
- package/dist/runtime/server/api/reviews.js +22 -0
- package/dist/runtime/server/api/reviews3.d.ts +2 -0
- package/dist/runtime/server/api/reviews3.js +19 -0
- package/dist/runtime/server/api/samples.d.ts +2 -0
- package/dist/runtime/server/api/samples.js +20 -0
- package/dist/runtime/server/api/search.d.ts +2 -0
- package/dist/runtime/server/api/search.js +20 -0
- package/dist/runtime/server/api/service/[slug].d.ts +0 -1
- package/dist/runtime/server/api/service/[slug].js +15 -40
- package/dist/runtime/server/api/service/availability.js +14 -12
- package/dist/runtime/server/api/service/getall.d.ts +2 -0
- package/dist/runtime/server/api/service/getall.js +19 -0
- package/dist/runtime/server/api/shop.d.ts +2 -0
- package/dist/runtime/server/api/shop.js +20 -0
- package/dist/runtime/server/api/subscribe.d.ts +0 -2
- package/dist/runtime/server/api/subscribe.js +0 -16
- package/dist/runtime/server/api/webform.d.ts +0 -0
- package/dist/runtime/server/api/webform.js +0 -0
- package/dist/runtime/server/middleware/powertools.d.ts +9 -0
- package/dist/runtime/server/middleware/powertools.js +30 -0
- package/dist/runtime/server/tsconfig.json +3 -3
- package/dist/runtime/stores/Booking.js +23 -7
- package/dist/runtime/stores/Cart.d.ts +12 -0
- package/dist/runtime/stores/Cart.js +87 -17
- package/dist/runtime/stores/Checkout.d.ts +9 -15
- package/dist/runtime/stores/Checkout.js +57 -50
- package/dist/runtime/stores/NavMenu.js +2 -4
- package/dist/runtime/stores/Search.d.ts +1 -1
- package/dist/runtime/stores/Search.js +9 -3
- package/dist/runtime/stores/Services.d.ts +5 -0
- package/dist/runtime/stores/Services.js +59 -8
- package/dist/runtime/stores/auth.d.ts +30 -6
- package/dist/runtime/stores/auth.js +380 -8
- package/dist/runtime/stores/countries.d.ts +1 -3
- package/dist/runtime/stores/countries.js +4 -8
- package/dist/runtime/stores/index.d.ts +0 -1
- package/dist/runtime/stores/index.js +0 -1
- package/dist/runtime/stores/locations.d.ts +1 -5
- package/dist/runtime/stores/locations.js +8 -5
- package/dist/runtime/stores/product/README.md +6 -6
- package/dist/runtime/stores/product/slug.d.ts +1 -17
- package/dist/runtime/stores/product.js +9 -3
- package/dist/runtime/stores/promotions.d.ts +51 -0
- package/dist/runtime/stores/promotions.js +65 -0
- package/dist/runtime/stores/useCompanyProfile.js +5 -2
- package/dist/runtime/stores/webforms.d.ts +24 -9
- package/dist/runtime/stores/webforms.js +105 -5
- package/dist/runtime/stores/wishlists.d.ts +125 -8
- package/dist/runtime/stores/wishlists.js +212 -20
- package/dist/runtime/utils/htmlCache.d.ts +2 -2
- package/dist/runtime/utils/htmlCache.js +23 -13
- package/dist/types.d.mts +6 -2
- package/package.json +27 -7
- package/dist/runtime/composables/Checkout/useBillingAddress.d.ts +0 -19
- package/dist/runtime/composables/Checkout/useBillingAddress.js +0 -82
- package/dist/runtime/composables/Checkout/useShippingAddress.d.ts +0 -9
- package/dist/runtime/composables/Checkout/useShippingAddress.js +0 -121
- package/dist/runtime/composables/useAuth.d.ts +0 -45
- package/dist/runtime/composables/useAuth.js +0 -180
- package/dist/runtime/composables/useCountries.d.ts +0 -12
- package/dist/runtime/composables/useCountries.js +0 -50
- package/dist/runtime/composables/useLocations.d.ts +0 -12
- package/dist/runtime/composables/useLocations.js +0 -53
- package/dist/runtime/composables/useOrders.d.ts +0 -21
- package/dist/runtime/composables/useOrders.js +0 -82
- package/dist/runtime/composables/useQuotations.d.ts +0 -14
- package/dist/runtime/composables/useQuotations.js +0 -50
- package/dist/runtime/server/api/auth/forgot.d.ts +0 -5
- package/dist/runtime/server/api/auth/forgot.js +0 -44
- package/dist/runtime/server/api/auth/logout.d.ts +0 -5
- package/dist/runtime/server/api/auth/logout.js +0 -23
- package/dist/runtime/server/api/auth/register.js +0 -51
- package/dist/runtime/server/api/auth/session.get.js +0 -46
- package/dist/runtime/server/api/auth/user/reset-password.d.ts +0 -5
- package/dist/runtime/server/api/auth/user/reset-password.js +0 -40
- package/dist/runtime/server/api/auth/user/session.js +0 -43
- package/dist/runtime/server/api/auth/user/verify-token.d.ts +0 -6
- package/dist/runtime/server/api/auth/user/verify-token.js +0 -50
- package/dist/runtime/server/api/blog/[slug].js +0 -51
- package/dist/runtime/server/api/blog/blog.d.ts +0 -3
- package/dist/runtime/server/api/blog/blog.js +0 -17
- package/dist/runtime/server/api/brand/[slug].d.ts +0 -3
- package/dist/runtime/server/api/brand/[slug].js +0 -58
- package/dist/runtime/server/api/cart/service/[slug]/add.js +0 -16
- package/dist/runtime/server/api/contact-center/webforms/create.js +0 -16
- package/dist/runtime/server/api/customer/address/add.d.ts +0 -14
- package/dist/runtime/server/api/customer/address/add.js +0 -33
- package/dist/runtime/server/api/customer/address/delete.d.ts +0 -20
- package/dist/runtime/server/api/customer/address/delete.js +0 -37
- package/dist/runtime/server/api/customer/address/setshipping.d.ts +0 -20
- package/dist/runtime/server/api/customer/address/setshipping.js +0 -41
- package/dist/runtime/server/api/customer/address/update.d.ts +0 -20
- package/dist/runtime/server/api/customer/address/update.js +0 -42
- package/dist/runtime/server/api/customer/cards/delete.d.ts +0 -2
- package/dist/runtime/server/api/customer/cards/delete.js +0 -23
- package/dist/runtime/server/api/customer/cards/get.d.ts +0 -2
- package/dist/runtime/server/api/customer/cards/get.js +0 -17
- package/dist/runtime/server/api/customer/change-password.d.ts +0 -14
- package/dist/runtime/server/api/customer/change-password.js +0 -34
- package/dist/runtime/server/api/customer/checkout.js +0 -20
- package/dist/runtime/server/api/customer/orders.d.ts +0 -2
- package/dist/runtime/server/api/customer/orders.js +0 -17
- package/dist/runtime/server/api/customer/profile/update.d.ts +0 -14
- package/dist/runtime/server/api/customer/profile/update.js +0 -34
- package/dist/runtime/server/api/customer/quotations.d.ts +0 -2
- package/dist/runtime/server/api/customer/quotations.js +0 -17
- package/dist/runtime/server/api/customer/search.js +0 -15
- package/dist/runtime/server/api/customer/tax-invoice.d.ts +0 -8
- package/dist/runtime/server/api/customer/tax-invoice.js +0 -36
- package/dist/runtime/server/api/customer/wishlist/add.js +0 -30
- package/dist/runtime/server/api/customer/wishlist/createWishList.js +0 -29
- package/dist/runtime/server/api/customer/wishlist/deleteWishList.js +0 -30
- package/dist/runtime/server/api/customer/wishlist/get.d.ts +0 -2
- package/dist/runtime/server/api/customer/wishlist/get.js +0 -17
- package/dist/runtime/server/api/customer/wishlist/getWishListItems.js +0 -21
- package/dist/runtime/server/api/customer/wishlist/updateWishList.js +0 -30
- package/dist/runtime/server/api/page/[slug].d.ts +0 -3
- package/dist/runtime/server/api/page/[slug].js +0 -51
- package/dist/runtime/server/api/v2/[...slug].d.ts +0 -3
- package/dist/runtime/server/api/v2/[...slug].js +0 -9
- package/dist/runtime/stores/IpLocation.d.ts +0 -18
- package/dist/runtime/stores/IpLocation.js +0 -29
- package/dist/runtime/utils/api.d.ts +0 -13
- package/dist/runtime/utils/api.js +0 -102
- /package/dist/runtime/server/api/{auth/register.d.ts → brand/[...slug].d.ts} +0 -0
- /package/dist/runtime/server/api/{auth/session.get.d.ts → brand/index.d.ts} +0 -0
- /package/dist/runtime/server/api/{auth/user/session.d.ts → catalog/brands.d.ts} +0 -0
- /package/dist/runtime/server/api/{cart/service/[slug]/add.d.ts → catalog/categoriesall.d.ts} +0 -0
- /package/dist/runtime/server/api/{contact-center/webforms/create.d.ts → catalog/posts.d.ts} +0 -0
- /package/dist/runtime/server/api/{customer/checkout.d.ts → cmspost/[...slug].d.ts} +0 -0
- /package/dist/runtime/server/api/{customer/search.d.ts → countries.d.ts} +0 -0
- /package/dist/runtime/server/api/{customer/wishlist/add.d.ts → generate/sitemap.get.d.ts} +0 -0
- /package/dist/runtime/server/api/{customer/wishlist/createWishList.d.ts → global/[...slug].d.ts} +0 -0
- /package/dist/runtime/server/api/{customer/wishlist/deleteWishList.d.ts → page/[...slug].d.ts} +0 -0
- /package/dist/runtime/server/api/{customer/wishlist/getWishListItems.d.ts → permalink/[...slug].get.d.ts} +0 -0
- /package/dist/runtime/server/api/{customer/wishlist/updateWishList.d.ts → quickview/[slug].d.ts} +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineEventHandler } from "h3";
|
|
2
|
+
import { useRuntimeConfig } from "#imports";
|
|
3
|
+
import { flowrixS3 } from "../../../middleware/flowrixs3.js";
|
|
4
|
+
export default defineEventHandler(async (event) => {
|
|
5
|
+
const config = useRuntimeConfig();
|
|
6
|
+
const endpoint = "services";
|
|
7
|
+
try {
|
|
8
|
+
const s3Data = await flowrixS3.get(endpoint, config);
|
|
9
|
+
console.log("Loaded from S3:", endpoint);
|
|
10
|
+
return s3Data;
|
|
11
|
+
} catch (s3Error) {
|
|
12
|
+
console.log("S3 fetch failed:", s3Error.message);
|
|
13
|
+
return {
|
|
14
|
+
status: "Error",
|
|
15
|
+
message: "File not found",
|
|
16
|
+
error: s3Error.message
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineEventHandler, getQuery } from "h3";
|
|
2
|
+
import { useRuntimeConfig } from "#imports";
|
|
3
|
+
import { flowrixS3 } from "../../middleware/flowrixs3.js";
|
|
4
|
+
export default defineEventHandler(async (event) => {
|
|
5
|
+
const config = useRuntimeConfig();
|
|
6
|
+
let query = getQuery(event);
|
|
7
|
+
const endpoint = "search";
|
|
8
|
+
try {
|
|
9
|
+
const s3Data = await flowrixS3.get(endpoint, config);
|
|
10
|
+
console.log("Loaded from S3:", endpoint);
|
|
11
|
+
return s3Data;
|
|
12
|
+
} catch (s3Error) {
|
|
13
|
+
console.log("S3 fetch failed:", s3Error.message);
|
|
14
|
+
return {
|
|
15
|
+
status: "Error",
|
|
16
|
+
message: "File not found",
|
|
17
|
+
error: s3Error.message
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { defineEventHandler, readBody } from "h3";
|
|
2
|
-
import { $fetch } from "ofetch";
|
|
3
|
-
export default defineEventHandler(async (event) => {
|
|
4
|
-
const body = await readBody(event);
|
|
5
|
-
const subscribe = await $fetch(`${process.env.FLOWRIX_API_BASE}subscribe`, {
|
|
6
|
-
method: "POST",
|
|
7
|
-
headers: {
|
|
8
|
-
"x-api-key": process.env.FLOWRIX_API_KEY,
|
|
9
|
-
"x-api-secret": process.env.FLOWRIX_API_SECRET,
|
|
10
|
-
"Origin": process.env.FLOWRIX_API_ORIGIN,
|
|
11
|
-
"Content-Type": "application/json"
|
|
12
|
-
},
|
|
13
|
-
body: JSON.stringify(body)
|
|
14
|
-
});
|
|
15
|
-
return subscribe;
|
|
16
|
-
});
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Logger } from '@aws-lambda-powertools/logger';
|
|
2
|
+
import { Metrics } from '@aws-lambda-powertools/metrics';
|
|
3
|
+
import { Tracer } from '@aws-lambda-powertools/tracer';
|
|
4
|
+
declare const logger: Logger;
|
|
5
|
+
declare const metrics: Metrics;
|
|
6
|
+
declare const tracer: Tracer;
|
|
7
|
+
export { logger, metrics, tracer };
|
|
8
|
+
declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, void>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineEventHandler } from "h3";
|
|
2
|
+
import { Logger } from "@aws-lambda-powertools/logger";
|
|
3
|
+
import { Metrics, MetricUnit } from "@aws-lambda-powertools/metrics";
|
|
4
|
+
import { Tracer } from "@aws-lambda-powertools/tracer";
|
|
5
|
+
const isLambda = !!process.env.AWS_LAMBDA_FUNCTION_NAME;
|
|
6
|
+
const logger = new Logger({
|
|
7
|
+
serviceName: process.env.POWERTOOLS_SERVICE_NAME || "flowrix",
|
|
8
|
+
logLevel: process.env.LOG_LEVEL || "INFO"
|
|
9
|
+
});
|
|
10
|
+
const metrics = new Metrics({
|
|
11
|
+
namespace: process.env.POWERTOOLS_METRICS_NAMESPACE || "Flowrix",
|
|
12
|
+
serviceName: process.env.POWERTOOLS_SERVICE_NAME || "flowrix"
|
|
13
|
+
});
|
|
14
|
+
const tracer = new Tracer({
|
|
15
|
+
serviceName: process.env.POWERTOOLS_SERVICE_NAME || "flowrix"
|
|
16
|
+
});
|
|
17
|
+
export { logger, metrics, tracer };
|
|
18
|
+
export default defineEventHandler((event) => {
|
|
19
|
+
event.context.logger = logger;
|
|
20
|
+
event.context.metrics = metrics;
|
|
21
|
+
event.context.tracer = tracer;
|
|
22
|
+
const method = event.method;
|
|
23
|
+
const path = event.path;
|
|
24
|
+
logger.info("Incoming request", { method, path });
|
|
25
|
+
if (isLambda) {
|
|
26
|
+
metrics.addMetric("RequestCount", MetricUnit.Count, 1);
|
|
27
|
+
metrics.addDimension("path", path);
|
|
28
|
+
metrics.publishStoredMetrics();
|
|
29
|
+
}
|
|
30
|
+
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../../.nuxt/tsconfig.server.json",
|
|
3
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../../.nuxt/tsconfig.server.json",
|
|
3
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineStore } from "pinia";
|
|
2
|
-
import {
|
|
2
|
+
import { flowrixApi } from "../middleware/flowrix.js";
|
|
3
|
+
import { useRuntimeConfig } from "#imports";
|
|
3
4
|
export const useBookingStore = defineStore("booking", {
|
|
4
5
|
state: () => ({
|
|
5
6
|
calendar: [],
|
|
@@ -13,12 +14,17 @@ export const useBookingStore = defineStore("booking", {
|
|
|
13
14
|
async getCalendar(calendarId = 4) {
|
|
14
15
|
try {
|
|
15
16
|
this.isLoading = true;
|
|
16
|
-
const
|
|
17
|
+
const config = useRuntimeConfig();
|
|
18
|
+
let rawCookies = "";
|
|
19
|
+
if (process.client) {
|
|
20
|
+
rawCookies = document.cookie || "";
|
|
21
|
+
}
|
|
22
|
+
const apiConfig = { ...config, cookies: rawCookies };
|
|
17
23
|
const apiUrl = "services/calendar";
|
|
18
24
|
const params = {
|
|
19
25
|
calendar: calendarId
|
|
20
26
|
};
|
|
21
|
-
const response = await get(apiUrl, { params });
|
|
27
|
+
const response = await flowrixApi.get(apiUrl, apiConfig, { params });
|
|
22
28
|
if (response) {
|
|
23
29
|
this.calendar = response.data || response;
|
|
24
30
|
}
|
|
@@ -33,13 +39,18 @@ export const useBookingStore = defineStore("booking", {
|
|
|
33
39
|
try {
|
|
34
40
|
this.isLoading = true;
|
|
35
41
|
this.selectedDate = bookingDate;
|
|
36
|
-
const
|
|
42
|
+
const config = useRuntimeConfig();
|
|
43
|
+
let rawCookies = "";
|
|
44
|
+
if (process.client) {
|
|
45
|
+
rawCookies = document.cookie || "";
|
|
46
|
+
}
|
|
47
|
+
const apiConfig = { ...config, cookies: rawCookies };
|
|
37
48
|
const apiUrl = "services/gettimeslots";
|
|
38
49
|
const params = {
|
|
39
50
|
calendar: calendarId,
|
|
40
51
|
booking_date: bookingDate
|
|
41
52
|
};
|
|
42
|
-
const response = await get(apiUrl, { params });
|
|
53
|
+
const response = await flowrixApi.get(apiUrl, apiConfig, { params });
|
|
43
54
|
if (response) {
|
|
44
55
|
this.timeSlots = response.data || response;
|
|
45
56
|
}
|
|
@@ -53,9 +64,14 @@ export const useBookingStore = defineStore("booking", {
|
|
|
53
64
|
async saveBookingSlot(bookingData) {
|
|
54
65
|
try {
|
|
55
66
|
this.isLoading = true;
|
|
56
|
-
const
|
|
67
|
+
const config = useRuntimeConfig();
|
|
68
|
+
let rawCookies = "";
|
|
69
|
+
if (process.client) {
|
|
70
|
+
rawCookies = document.cookie || "";
|
|
71
|
+
}
|
|
72
|
+
const apiConfig = { ...config, cookies: rawCookies };
|
|
57
73
|
const apiUrl = "services/calendar/save";
|
|
58
|
-
const response = await post(apiUrl, bookingData);
|
|
74
|
+
const response = await flowrixApi.post(apiUrl, apiConfig, { body: bookingData });
|
|
59
75
|
if (response) {
|
|
60
76
|
this.responseData = response;
|
|
61
77
|
return response;
|
|
@@ -36,6 +36,17 @@ export interface CartData {
|
|
|
36
36
|
shippingmethod?: string | number;
|
|
37
37
|
vouchercodes?: string[];
|
|
38
38
|
}
|
|
39
|
+
export interface RelatedData {
|
|
40
|
+
cart: Record<string, CartItem> | undefined;
|
|
41
|
+
qty?: number;
|
|
42
|
+
abndToken?: string;
|
|
43
|
+
deliverymethod?: number | string;
|
|
44
|
+
shipping_state?: string | number;
|
|
45
|
+
shipping_postcode?: number;
|
|
46
|
+
shipping_country?: string | number;
|
|
47
|
+
shippingmethod?: string | number;
|
|
48
|
+
vouchercodes?: string[];
|
|
49
|
+
}
|
|
39
50
|
export interface FormData {
|
|
40
51
|
cart: Record<string, CartItem> | undefined;
|
|
41
52
|
qty: number;
|
|
@@ -63,5 +74,6 @@ export interface CartState {
|
|
|
63
74
|
responseData: [];
|
|
64
75
|
errorResponseData: Record<string, any>;
|
|
65
76
|
addedResponse: string;
|
|
77
|
+
relatedProducts: any[];
|
|
66
78
|
}
|
|
67
79
|
export declare const useCartStore: import("pinia").StoreDefinition<"cart", CartState, {}, {}>;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { defineStore } from "pinia";
|
|
2
2
|
import { flowrixApi } from "../middleware/flowrix.js";
|
|
3
3
|
import { useCheckoutStore } from "./Checkout.js";
|
|
4
|
-
import {
|
|
4
|
+
import { useRuntimeConfig } from "#imports";
|
|
5
|
+
import { GTM_add_to_cart, GTM_remove_from_cart } from "../composables/useDataLayer.js";
|
|
6
|
+
import { META_add_to_cart, META_remove_from_cart } from "../composables/useMetaLayer.js";
|
|
7
|
+
import { TikTok_add_to_cart, TikTok_remove_from_cart } from "../composables/useTikTokDatalayer.js";
|
|
5
8
|
export const useCartStore = defineStore("cart", {
|
|
6
9
|
state: () => ({
|
|
7
10
|
cart: {},
|
|
@@ -64,8 +67,19 @@ export const useCartStore = defineStore("cart", {
|
|
|
64
67
|
apiUrl = `cart/service/${service.slug}/add`;
|
|
65
68
|
}
|
|
66
69
|
try {
|
|
67
|
-
|
|
68
|
-
const
|
|
70
|
+
const config = useRuntimeConfig();
|
|
71
|
+
const rawCookies = document.cookie;
|
|
72
|
+
const apiConfig = {
|
|
73
|
+
...config,
|
|
74
|
+
cookies: rawCookies
|
|
75
|
+
};
|
|
76
|
+
const response = await flowrixApi.post(
|
|
77
|
+
apiUrl,
|
|
78
|
+
apiConfig,
|
|
79
|
+
{
|
|
80
|
+
body: formData
|
|
81
|
+
}
|
|
82
|
+
);
|
|
69
83
|
if (response?.status == "Success") {
|
|
70
84
|
this.addedResponse = "success";
|
|
71
85
|
this.cart = {
|
|
@@ -73,7 +87,10 @@ export const useCartStore = defineStore("cart", {
|
|
|
73
87
|
["totals"]: response?.data.calculations,
|
|
74
88
|
["abndToken"]: response?.data.abndToken
|
|
75
89
|
};
|
|
76
|
-
this.lastitem = response?.data.
|
|
90
|
+
this.lastitem = response?.data.lastitem;
|
|
91
|
+
GTM_add_to_cart(response?.data.lastitem);
|
|
92
|
+
META_add_to_cart(response?.data.lastitem);
|
|
93
|
+
TikTok_add_to_cart(response?.data.lastitem);
|
|
77
94
|
useCheckoutStore().saveToCheckoutSession({
|
|
78
95
|
cart: response?.data,
|
|
79
96
|
calculations: response?.data.calculations,
|
|
@@ -88,9 +105,33 @@ export const useCartStore = defineStore("cart", {
|
|
|
88
105
|
this.addedResponse = "";
|
|
89
106
|
}
|
|
90
107
|
},
|
|
108
|
+
async sha256(message) {
|
|
109
|
+
const encoder = new TextEncoder();
|
|
110
|
+
const data = encoder.encode(JSON.stringify(message));
|
|
111
|
+
const hashBuffer = await crypto.subtle.digest("SHA-256", data);
|
|
112
|
+
return Array.from(new Uint8Array(hashBuffer)).map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
113
|
+
},
|
|
114
|
+
async fetchRelated() {
|
|
115
|
+
try {
|
|
116
|
+
const request = {
|
|
117
|
+
cart: this.cart.items
|
|
118
|
+
};
|
|
119
|
+
const apiUrl = `/api/cart/related`;
|
|
120
|
+
const hash = await this.sha256(request);
|
|
121
|
+
const response = await $fetch(apiUrl, {
|
|
122
|
+
method: "POST",
|
|
123
|
+
body: request,
|
|
124
|
+
headers: {
|
|
125
|
+
"x-amz-content-sha256": hash
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
return response;
|
|
129
|
+
} catch (error) {
|
|
130
|
+
console.error("Error removing from cart:", error);
|
|
131
|
+
}
|
|
132
|
+
},
|
|
91
133
|
async removeFromCart(id, product) {
|
|
92
134
|
try {
|
|
93
|
-
const { post } = useApi();
|
|
94
135
|
const checkoutSession = useCheckoutStore().checkoutSession;
|
|
95
136
|
const apiUrl = `cart/remove`;
|
|
96
137
|
const request = {
|
|
@@ -106,14 +147,18 @@ export const useCartStore = defineStore("cart", {
|
|
|
106
147
|
if (this.coupon?.length > 0) {
|
|
107
148
|
request.vouchercodes = this.coupon;
|
|
108
149
|
}
|
|
109
|
-
const
|
|
150
|
+
const config = useRuntimeConfig();
|
|
151
|
+
const response = await flowrixApi.post(apiUrl, config, {
|
|
152
|
+
body: request
|
|
153
|
+
});
|
|
110
154
|
if (response?.status == "Success") {
|
|
111
155
|
this.cart = {
|
|
112
156
|
["items"]: response?.data.cart,
|
|
113
157
|
["totals"]: response?.data.calculations,
|
|
114
158
|
["abndToken"]: response?.data.abndToken
|
|
115
159
|
};
|
|
116
|
-
this.lastitem = response?.data.
|
|
160
|
+
this.lastitem = response?.data.lastitem;
|
|
161
|
+
GTM_remove_from_cart(response?.data.lastitem);
|
|
117
162
|
useCheckoutStore().saveToCheckoutSession({
|
|
118
163
|
cart: response.cart.items,
|
|
119
164
|
calculations: response.cart.calculations,
|
|
@@ -130,36 +175,42 @@ export const useCartStore = defineStore("cart", {
|
|
|
130
175
|
async updateQuantity(product, qty) {
|
|
131
176
|
try {
|
|
132
177
|
const checkoutSession = useCheckoutStore().checkoutSession;
|
|
133
|
-
const { post } = useApi();
|
|
134
178
|
const apiUrl = `cart/${product.slug}/update`;
|
|
135
179
|
const request = {
|
|
136
180
|
cart: this.cart.items,
|
|
137
181
|
rowId: product.rowId,
|
|
138
182
|
qty,
|
|
139
183
|
deliverymethod: checkoutSession?.fields?.deliverymethod,
|
|
140
|
-
// shipping_state: checkoutSession?.fields?.shipping_state,
|
|
141
|
-
// shipping_postcode: checkoutSession?.fields?.shipping_postcode,
|
|
142
|
-
// shipping_country: checkoutSession?.fields?.shipping_country,
|
|
143
184
|
shippingmethod: checkoutSession?.fields?.shippingmethod,
|
|
144
185
|
abndToken: this.cart.abndToken
|
|
145
186
|
};
|
|
146
187
|
if (this.coupon?.length > 0) {
|
|
147
188
|
request.vouchercodes = this.coupon;
|
|
148
189
|
}
|
|
149
|
-
const
|
|
190
|
+
const config = useRuntimeConfig();
|
|
191
|
+
const rawCookies = document.cookie;
|
|
192
|
+
const apiConfig = {
|
|
193
|
+
...config,
|
|
194
|
+
cookies: rawCookies
|
|
195
|
+
};
|
|
196
|
+
const response = await flowrixApi.post(apiUrl, apiConfig, {
|
|
197
|
+
body: request
|
|
198
|
+
});
|
|
150
199
|
if (response?.status == "Success") {
|
|
151
200
|
this.cart = {
|
|
152
201
|
["items"]: response?.data.cart,
|
|
153
202
|
["totals"]: response?.data.calculations,
|
|
154
203
|
["abndToken"]: response?.data.abndToken
|
|
155
204
|
};
|
|
156
|
-
this.lastitem = response?.data.
|
|
205
|
+
this.lastitem = response?.data.lastitem;
|
|
157
206
|
if (qty < product.qty) {
|
|
158
207
|
GTM_remove_from_cart(this.lastitem);
|
|
159
208
|
META_remove_from_cart(this.lastitem);
|
|
209
|
+
TikTok_remove_from_cart(this.lastitem);
|
|
160
210
|
} else {
|
|
161
211
|
GTM_add_to_cart(this.lastitem);
|
|
162
212
|
META_add_to_cart(this.lastitem);
|
|
213
|
+
TikTok_add_to_cart(this.lastitem);
|
|
163
214
|
}
|
|
164
215
|
useCheckoutStore().saveToCheckoutSession({
|
|
165
216
|
cart: response.data.cart,
|
|
@@ -178,12 +229,11 @@ export const useCartStore = defineStore("cart", {
|
|
|
178
229
|
try {
|
|
179
230
|
let couponsCodes = this.coupon || [];
|
|
180
231
|
const checkoutSession = useCheckoutStore().checkoutSession;
|
|
181
|
-
|
|
182
|
-
let apiUrl = "/checkout/applyCoupon";
|
|
232
|
+
let apiUrl = "checkout/applyCoupon";
|
|
183
233
|
const removeValue = coupon.remove ?? void 0;
|
|
184
234
|
if (removeValue !== void 0) {
|
|
185
235
|
couponsCodes.splice(removeValue, 1);
|
|
186
|
-
apiUrl = "
|
|
236
|
+
apiUrl = "checkout/remove-coupon";
|
|
187
237
|
}
|
|
188
238
|
const couponData = {
|
|
189
239
|
cart: this.cart.items,
|
|
@@ -192,7 +242,15 @@ export const useCartStore = defineStore("cart", {
|
|
|
192
242
|
code: removeValue === void 0 ? coupon.code : "",
|
|
193
243
|
abndToken: this.cart.abndToken
|
|
194
244
|
};
|
|
195
|
-
const
|
|
245
|
+
const config = useRuntimeConfig();
|
|
246
|
+
const rawCookies = document.cookie;
|
|
247
|
+
const apiConfig = {
|
|
248
|
+
...config,
|
|
249
|
+
cookies: rawCookies
|
|
250
|
+
};
|
|
251
|
+
const response = await flowrixApi.post(apiUrl, apiConfig, {
|
|
252
|
+
body: couponData
|
|
253
|
+
});
|
|
196
254
|
if (response?.status === "Success" && response?.data?.calculations) {
|
|
197
255
|
this.cart.totals = response.data.calculations;
|
|
198
256
|
if (removeValue === void 0) {
|
|
@@ -201,6 +259,18 @@ export const useCartStore = defineStore("cart", {
|
|
|
201
259
|
this.coupon = Array.from(new Set(couponsCodes));
|
|
202
260
|
useCheckoutStore().saveToCheckoutSession(response.data);
|
|
203
261
|
this.errorResponseData = {};
|
|
262
|
+
this.cart = {
|
|
263
|
+
["items"]: response?.data.cart,
|
|
264
|
+
["totals"]: response?.data.calculations,
|
|
265
|
+
["abndToken"]: response?.data.abndToken
|
|
266
|
+
};
|
|
267
|
+
this.lastitem = response?.data.lastitem;
|
|
268
|
+
useCheckoutStore().saveToCheckoutSession({
|
|
269
|
+
cart: response?.data,
|
|
270
|
+
calculations: response?.data.calculations,
|
|
271
|
+
abndToken: response?.data.abndToken,
|
|
272
|
+
fields: checkoutSession?.fields
|
|
273
|
+
});
|
|
204
274
|
return response;
|
|
205
275
|
} else {
|
|
206
276
|
const errorMessage = response?.message || "Failed to apply coupon";
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
interface PreferenceData {
|
|
1
|
+
export interface PreferenceData {
|
|
2
2
|
fields?: Record<string, any>;
|
|
3
3
|
deliverytype?: string;
|
|
4
4
|
order_no?: string;
|
|
5
5
|
publishableKey?: any;
|
|
6
6
|
[key: string]: any;
|
|
7
7
|
}
|
|
8
|
-
interface CartItem {
|
|
8
|
+
export interface CartItem {
|
|
9
9
|
fields?: Record<string, any>;
|
|
10
10
|
deliverytype?: string;
|
|
11
11
|
order_no?: string;
|
|
12
12
|
publishableKey?: any;
|
|
13
13
|
[key: string]: any;
|
|
14
14
|
}
|
|
15
|
-
interface
|
|
15
|
+
export interface Country {
|
|
16
|
+
id: number | string;
|
|
17
|
+
}
|
|
18
|
+
export interface ConfigData {
|
|
16
19
|
preferences?: Record<string, any>[];
|
|
17
20
|
outlets?: Record<string, any>[];
|
|
18
21
|
deliverytype?: string;
|
|
@@ -24,7 +27,7 @@ interface ConfigData {
|
|
|
24
27
|
totals?: Record<string, any>;
|
|
25
28
|
[key: string]: any;
|
|
26
29
|
}
|
|
27
|
-
interface FieldData {
|
|
30
|
+
export interface FieldData {
|
|
28
31
|
billing_state?: number | string;
|
|
29
32
|
billing_firstname?: string | number;
|
|
30
33
|
firstname?: string | number;
|
|
@@ -58,7 +61,7 @@ interface FieldData {
|
|
|
58
61
|
quotation_no?: string;
|
|
59
62
|
[key: string]: any;
|
|
60
63
|
}
|
|
61
|
-
interface CheckoutState {
|
|
64
|
+
export interface CheckoutState {
|
|
62
65
|
publishableKey: Record<string, any>;
|
|
63
66
|
responseData: any[];
|
|
64
67
|
config: ConfigData;
|
|
@@ -73,13 +76,4 @@ interface CheckoutState {
|
|
|
73
76
|
PaymentErrors: any;
|
|
74
77
|
loading: boolean;
|
|
75
78
|
}
|
|
76
|
-
export declare const useCheckoutStore: import("pinia").StoreDefinition<"checkout", CheckoutState, {}, {
|
|
77
|
-
resetState(): void;
|
|
78
|
-
paymentMethods(formData: any): Promise<any>;
|
|
79
|
-
getConfig(): Promise<void>;
|
|
80
|
-
submitCheckout(): Promise<any>;
|
|
81
|
-
confirmPayment(checkoutId: string): Promise<void>;
|
|
82
|
-
CheckUserAccount(email: string): Promise<any>;
|
|
83
|
-
saveToCheckoutSession(fieldsData: FieldData): Promise<void>;
|
|
84
|
-
}>;
|
|
85
|
-
export {};
|
|
79
|
+
export declare const useCheckoutStore: import("pinia").StoreDefinition<"checkout", CheckoutState, {}, {}>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useCartStore } from "./Cart.js";
|
|
2
2
|
import { defineStore } from "pinia";
|
|
3
|
-
import {
|
|
3
|
+
import { flowrixApi } from "../middleware/flowrix.js";
|
|
4
|
+
import { useRuntimeConfig } from "#imports";
|
|
4
5
|
export const useCheckoutStore = defineStore("checkout", {
|
|
5
6
|
state: () => ({
|
|
6
7
|
publishableKey: {},
|
|
@@ -30,11 +31,14 @@ export const useCheckoutStore = defineStore("checkout", {
|
|
|
30
31
|
async paymentMethods(formData) {
|
|
31
32
|
try {
|
|
32
33
|
const sessionData = JSON.parse(localStorage.getItem("Checkout")) || {};
|
|
33
|
-
const apiUrl =
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
const apiUrl = `checkout/paymentmethod`;
|
|
35
|
+
const config = useRuntimeConfig();
|
|
36
|
+
const rawCookies = document.cookie;
|
|
37
|
+
const apiConfig = {
|
|
38
|
+
...config,
|
|
39
|
+
cookies: rawCookies
|
|
40
|
+
};
|
|
41
|
+
const response = await flowrixApi.post(apiUrl, apiConfig, { body: formData });
|
|
38
42
|
if (response?.data) {
|
|
39
43
|
this.publishableKey = response.data;
|
|
40
44
|
const cart = {
|
|
@@ -62,7 +66,6 @@ export const useCheckoutStore = defineStore("checkout", {
|
|
|
62
66
|
},
|
|
63
67
|
async getConfig() {
|
|
64
68
|
try {
|
|
65
|
-
const { post } = useApi();
|
|
66
69
|
const formData = this.checkoutSession.fields || this.checkoutSession;
|
|
67
70
|
if (formData.cart && Object.keys(formData.cart).length > 0) {
|
|
68
71
|
const samples = Object.keys(formData.cart).filter(
|
|
@@ -78,10 +81,26 @@ export const useCheckoutStore = defineStore("checkout", {
|
|
|
78
81
|
if (useCartStore().coupon?.length > 0) {
|
|
79
82
|
formData.vouchercodes = useCartStore().coupon;
|
|
80
83
|
}
|
|
81
|
-
|
|
84
|
+
if (useCartStore().cart.items != void 0 && Object.keys(useCartStore().cart.items).length > 0) {
|
|
85
|
+
formData.cart = useCartStore().cart.items;
|
|
86
|
+
} else {
|
|
87
|
+
delete formData.cart;
|
|
88
|
+
}
|
|
82
89
|
formData.abndToken = useCartStore().cart.abndToken;
|
|
83
90
|
const apiUrl = `checkout/configs`;
|
|
84
|
-
const
|
|
91
|
+
const config = useRuntimeConfig();
|
|
92
|
+
const rawCookies = document.cookie;
|
|
93
|
+
const apiConfig = {
|
|
94
|
+
...config,
|
|
95
|
+
cookies: rawCookies
|
|
96
|
+
};
|
|
97
|
+
const response = await flowrixApi.post(
|
|
98
|
+
apiUrl,
|
|
99
|
+
apiConfig,
|
|
100
|
+
{
|
|
101
|
+
body: formData
|
|
102
|
+
}
|
|
103
|
+
);
|
|
85
104
|
if (response?.data) {
|
|
86
105
|
this.config = response.data;
|
|
87
106
|
const shippingMethods = response.data.shippingmethods;
|
|
@@ -104,12 +123,14 @@ export const useCheckoutStore = defineStore("checkout", {
|
|
|
104
123
|
deliverymethod: deliveryMethod.id
|
|
105
124
|
};
|
|
106
125
|
}
|
|
107
|
-
|
|
126
|
+
let cart = {
|
|
108
127
|
items: response.data.cart,
|
|
109
|
-
totals: response.data.calculations
|
|
128
|
+
totals: response.data.calculations,
|
|
129
|
+
quote_items: response.data.quote_items || []
|
|
110
130
|
};
|
|
111
131
|
useCartStore().cart.items = cart.items;
|
|
112
132
|
useCartStore().cart.totals = cart.totals;
|
|
133
|
+
useCartStore().cart.quote_items = cart.quote_items;
|
|
113
134
|
this.config.totals = response.data.calculations;
|
|
114
135
|
this.checkoutSession.calculations = response.data.calculations;
|
|
115
136
|
}
|
|
@@ -120,11 +141,19 @@ export const useCheckoutStore = defineStore("checkout", {
|
|
|
120
141
|
async submitCheckout() {
|
|
121
142
|
try {
|
|
122
143
|
this.loading = true;
|
|
123
|
-
const { post } = useApi();
|
|
124
144
|
const formData = this.checkoutSession.fields || {};
|
|
125
145
|
const apiUrl = `customer/checkout`;
|
|
126
146
|
formData.billing_address2 = formData.billing_address;
|
|
127
|
-
|
|
147
|
+
formData.shipping_address2 = formData.shipping_address;
|
|
148
|
+
delete formData.fields;
|
|
149
|
+
delete formData.calculations;
|
|
150
|
+
const config = useRuntimeConfig();
|
|
151
|
+
const rawCookies = document.cookie;
|
|
152
|
+
const apiConfig = {
|
|
153
|
+
...config,
|
|
154
|
+
cookies: rawCookies
|
|
155
|
+
};
|
|
156
|
+
const response = await flowrixApi.post(apiUrl, apiConfig, { body: formData });
|
|
128
157
|
if (response?.data?.order || response?.data?.order_no) {
|
|
129
158
|
const orderData = response.data.order || response.data;
|
|
130
159
|
const invoiceId = orderData.order_no;
|
|
@@ -148,28 +177,20 @@ export const useCheckoutStore = defineStore("checkout", {
|
|
|
148
177
|
invoice: error?.data?.data?.order_no
|
|
149
178
|
};
|
|
150
179
|
this.loading = false;
|
|
151
|
-
return error;
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
async confirmPayment(checkoutId) {
|
|
155
|
-
try {
|
|
156
|
-
const apiUrl = `/api/checkout/success`;
|
|
157
|
-
await $fetch(apiUrl, {
|
|
158
|
-
method: "POST",
|
|
159
|
-
body: { token: checkoutId }
|
|
160
|
-
});
|
|
161
|
-
} catch (error) {
|
|
162
|
-
console.error("Error confirming payment:", error);
|
|
180
|
+
return error.data;
|
|
163
181
|
}
|
|
164
182
|
},
|
|
165
183
|
async CheckUserAccount(email) {
|
|
166
184
|
try {
|
|
167
185
|
this.loading = true;
|
|
168
|
-
const apiUrl =
|
|
169
|
-
const
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
186
|
+
const apiUrl = `customers/search`;
|
|
187
|
+
const config = useRuntimeConfig();
|
|
188
|
+
const rawCookies = document.cookie;
|
|
189
|
+
const apiConfig = {
|
|
190
|
+
...config,
|
|
191
|
+
cookies: rawCookies
|
|
192
|
+
};
|
|
193
|
+
const response = await flowrixApi.post(apiUrl, apiConfig, { body: { email } });
|
|
173
194
|
this.checkCustomer = response;
|
|
174
195
|
this.loading = false;
|
|
175
196
|
return response;
|
|
@@ -180,25 +201,6 @@ export const useCheckoutStore = defineStore("checkout", {
|
|
|
180
201
|
}
|
|
181
202
|
},
|
|
182
203
|
async saveToCheckoutSession(fieldsData) {
|
|
183
|
-
this.loading = true;
|
|
184
|
-
fieldsData.firstname = fieldsData.billing_firstname ?? void 0;
|
|
185
|
-
fieldsData.lastname = fieldsData.billing_lastname ?? void 0;
|
|
186
|
-
fieldsData.mobile = fieldsData.billing_mobile ?? void 0;
|
|
187
|
-
fieldsData.fullname = `${fieldsData.billing_firstname} ${fieldsData.billing_lastname}`;
|
|
188
|
-
fieldsData.billing_fullname = `${fieldsData.billing_firstname} ${fieldsData.billing_lastname}`;
|
|
189
|
-
fieldsData.shipping_fullname = `${fieldsData.billing_firstname} ${fieldsData.billing_lastname}`;
|
|
190
|
-
if (fieldsData.shippingasbilling === true) {
|
|
191
|
-
fieldsData.billing_address = fieldsData.shipping_address ?? void 0;
|
|
192
|
-
fieldsData.billing_country = fieldsData.shipping_country ?? null;
|
|
193
|
-
fieldsData.billing_state = fieldsData.shipping_state ?? void 0;
|
|
194
|
-
fieldsData.billing_suburb = fieldsData.shipping_suburb ?? void 0;
|
|
195
|
-
fieldsData.billing_firstname = fieldsData.shipping_firstname ?? void 0;
|
|
196
|
-
fieldsData.billing_fullname = fieldsData.shipping_fullname ?? null;
|
|
197
|
-
fieldsData.billing_lastname = fieldsData.shipping_lastname ?? void 0;
|
|
198
|
-
fieldsData.billing_middlename = fieldsData.shipping_middlename ?? void 0;
|
|
199
|
-
fieldsData.billing_mobile = fieldsData.shipping_mobile ?? void 0;
|
|
200
|
-
fieldsData.billing_postcode = fieldsData.shipping_postcode ?? void 0;
|
|
201
|
-
}
|
|
202
204
|
this.checkoutSession.fields = {
|
|
203
205
|
...this.checkoutSession.fields,
|
|
204
206
|
...fieldsData
|
|
@@ -209,5 +211,10 @@ export const useCheckoutStore = defineStore("checkout", {
|
|
|
209
211
|
}
|
|
210
212
|
}
|
|
211
213
|
},
|
|
212
|
-
persist:
|
|
214
|
+
persist: {
|
|
215
|
+
enabled: true,
|
|
216
|
+
// simple shape that works with most versions:
|
|
217
|
+
key: "checkoutSession",
|
|
218
|
+
storage: typeof window !== "undefined" ? localStorage : void 0
|
|
219
|
+
}
|
|
213
220
|
});
|
|
@@ -8,15 +8,13 @@ export const useNavMenu = defineStore("NavMenu", {
|
|
|
8
8
|
try {
|
|
9
9
|
const existingMenu = this.Menu.find((menu) => menu.location === location);
|
|
10
10
|
if (!existingMenu) {
|
|
11
|
-
const response = await $fetch(`/api/
|
|
11
|
+
const response = await $fetch(`/api/global/nav_${id}_links`, {
|
|
12
12
|
method: "GET",
|
|
13
13
|
headers: {
|
|
14
14
|
"Content-Type": "application/json"
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
this.Menu.push({ location, items: response.data });
|
|
19
|
-
}
|
|
17
|
+
this.Menu.push({ location, items: response.data });
|
|
20
18
|
}
|
|
21
19
|
} catch (error) {
|
|
22
20
|
console.error("Error fetching data:", error);
|