@gofynd/fdk-store-gql 3.0.38-beta.11
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/.github/workflows/npm-publish.yml +26 -0
- package/README.md +84 -0
- package/azure-pipelines.yml +56 -0
- package/codegen.yml +6 -0
- package/lib/graphql/mutations/UnFollowById.handler.d.ts +3 -0
- package/lib/graphql/mutations/UnFollowById.handler.js +5 -0
- package/lib/graphql/mutations/UnFollowById.handler.js.map +1 -0
- package/lib/graphql/mutations/addItemsToCart.handler.d.ts +3 -0
- package/lib/graphql/mutations/addItemsToCart.handler.js +9 -0
- package/lib/graphql/mutations/addItemsToCart.handler.js.map +1 -0
- package/lib/graphql/mutations/applyCoupon.handler.d.ts +3 -0
- package/lib/graphql/mutations/applyCoupon.handler.js +7 -0
- package/lib/graphql/mutations/applyCoupon.handler.js.map +1 -0
- package/lib/graphql/mutations/applyRewardPoints.handler.d.ts +3 -0
- package/lib/graphql/mutations/applyRewardPoints.handler.js +7 -0
- package/lib/graphql/mutations/applyRewardPoints.handler.js.map +1 -0
- package/lib/graphql/mutations/followById.handler.d.ts +3 -0
- package/lib/graphql/mutations/followById.handler.js +5 -0
- package/lib/graphql/mutations/followById.handler.js.map +1 -0
- package/lib/graphql/mutations/getCartShareLink.handler.d.ts +3 -0
- package/lib/graphql/mutations/getCartShareLink.handler.js +7 -0
- package/lib/graphql/mutations/getCartShareLink.handler.js.map +1 -0
- package/lib/graphql/mutations/index.d.ts +2 -0
- package/lib/graphql/mutations/index.js +54 -0
- package/lib/graphql/mutations/index.js.map +1 -0
- package/lib/graphql/mutations/loginWithAppleIOS.handler.d.ts +3 -0
- package/lib/graphql/mutations/loginWithAppleIOS.handler.js +7 -0
- package/lib/graphql/mutations/loginWithAppleIOS.handler.js.map +1 -0
- package/lib/graphql/mutations/loginWithEmailAndPassword.handler.d.ts +3 -0
- package/lib/graphql/mutations/loginWithEmailAndPassword.handler.js +7 -0
- package/lib/graphql/mutations/loginWithEmailAndPassword.handler.js.map +1 -0
- package/lib/graphql/mutations/loginWithFacebook.handler.d.ts +3 -0
- package/lib/graphql/mutations/loginWithFacebook.handler.js +7 -0
- package/lib/graphql/mutations/loginWithFacebook.handler.js.map +1 -0
- package/lib/graphql/mutations/loginWithGoogle.handler.d.ts +3 -0
- package/lib/graphql/mutations/loginWithGoogle.handler.js +7 -0
- package/lib/graphql/mutations/loginWithGoogle.handler.js.map +1 -0
- package/lib/graphql/mutations/loginWithOTP.handler.d.ts +3 -0
- package/lib/graphql/mutations/loginWithOTP.handler.js +7 -0
- package/lib/graphql/mutations/loginWithOTP.handler.js.map +1 -0
- package/lib/graphql/mutations/removeCoupon.handler.d.ts +3 -0
- package/lib/graphql/mutations/removeCoupon.handler.js +7 -0
- package/lib/graphql/mutations/removeCoupon.handler.js.map +1 -0
- package/lib/graphql/mutations/selectAddress.handler.d.ts +3 -0
- package/lib/graphql/mutations/selectAddress.handler.js +5 -0
- package/lib/graphql/mutations/selectAddress.handler.js.map +1 -0
- package/lib/graphql/mutations/selectPaymentMode.handler.d.ts +3 -0
- package/lib/graphql/mutations/selectPaymentMode.handler.js +5 -0
- package/lib/graphql/mutations/selectPaymentMode.handler.js.map +1 -0
- package/lib/graphql/mutations/updateAddress.handler.d.ts +3 -0
- package/lib/graphql/mutations/updateAddress.handler.js +7 -0
- package/lib/graphql/mutations/updateAddress.handler.js.map +1 -0
- package/lib/graphql/mutations/updateCart.handler.d.ts +3 -0
- package/lib/graphql/mutations/updateCart.handler.js +14 -0
- package/lib/graphql/mutations/updateCart.handler.js.map +1 -0
- package/lib/graphql/mutations/updateCartMeta.handler.d.ts +3 -0
- package/lib/graphql/mutations/updateCartMeta.handler.js +7 -0
- package/lib/graphql/mutations/updateCartMeta.handler.js.map +1 -0
- package/lib/graphql/mutations/updateProfile.handler.d.ts +3 -0
- package/lib/graphql/mutations/updateProfile.handler.js +9 -0
- package/lib/graphql/mutations/updateProfile.handler.js.map +1 -0
- package/lib/graphql/mutations/verifyEmailOtp.handler.d.ts +3 -0
- package/lib/graphql/mutations/verifyEmailOtp.handler.js +7 -0
- package/lib/graphql/mutations/verifyEmailOtp.handler.js.map +1 -0
- package/lib/graphql/mutations/verifyMobileOTP.handler.d.ts +3 -0
- package/lib/graphql/mutations/verifyMobileOTP.handler.js +7 -0
- package/lib/graphql/mutations/verifyMobileOTP.handler.js.map +1 -0
- package/lib/graphql/query/address.handler.d.ts +3 -0
- package/lib/graphql/query/address.handler.js +7 -0
- package/lib/graphql/query/address.handler.js.map +1 -0
- package/lib/graphql/query/addresses.handler.d.ts +3 -0
- package/lib/graphql/query/addresses.handler.js +7 -0
- package/lib/graphql/query/addresses.handler.js.map +1 -0
- package/lib/graphql/query/aggregatorsConfig.handler.d.ts +3 -0
- package/lib/graphql/query/aggregatorsConfig.handler.js +7 -0
- package/lib/graphql/query/aggregatorsConfig.handler.js.map +1 -0
- package/lib/graphql/query/allCountries.handler.d.ts +3 -0
- package/lib/graphql/query/allCountries.handler.js +8 -0
- package/lib/graphql/query/allCountries.handler.js.map +1 -0
- package/lib/graphql/query/applicationConfiguration.handler.d.ts +3 -0
- package/lib/graphql/query/applicationConfiguration.handler.js +24 -0
- package/lib/graphql/query/applicationConfiguration.handler.js.map +1 -0
- package/lib/graphql/query/applicationContent.handler.d.ts +3 -0
- package/lib/graphql/query/applicationContent.handler.js +38 -0
- package/lib/graphql/query/applicationContent.handler.js.map +1 -0
- package/lib/graphql/query/applicationStaff.handler.d.ts +2 -0
- package/lib/graphql/query/applicationStaff.handler.js +7 -0
- package/lib/graphql/query/applicationStaff.handler.js.map +1 -0
- package/lib/graphql/query/blog.handler.d.ts +3 -0
- package/lib/graphql/query/blog.handler.js +7 -0
- package/lib/graphql/query/blog.handler.js.map +1 -0
- package/lib/graphql/query/brands.handler.d.ts +3 -0
- package/lib/graphql/query/brands.handler.js +8 -0
- package/lib/graphql/query/brands.handler.js.map +1 -0
- package/lib/graphql/query/bulkDiscountOffers.handler.d.ts +3 -0
- package/lib/graphql/query/bulkDiscountOffers.handler.js +7 -0
- package/lib/graphql/query/bulkDiscountOffers.handler.js.map +1 -0
- package/lib/graphql/query/cartHandler.d.ts +3 -0
- package/lib/graphql/query/cartHandler.js +9 -0
- package/lib/graphql/query/cartHandler.js.map +1 -0
- package/lib/graphql/query/cartShipmentDetails.handler.d.ts +3 -0
- package/lib/graphql/query/cartShipmentDetails.handler.js +7 -0
- package/lib/graphql/query/cartShipmentDetails.handler.js.map +1 -0
- package/lib/graphql/query/categories.handler.d.ts +3 -0
- package/lib/graphql/query/categories.handler.js +8 -0
- package/lib/graphql/query/categories.handler.js.map +1 -0
- package/lib/graphql/query/collection.handler.d.ts +3 -0
- package/lib/graphql/query/collection.handler.js +9 -0
- package/lib/graphql/query/collection.handler.js.map +1 -0
- package/lib/graphql/query/collectionItems.handler.d.ts +3 -0
- package/lib/graphql/query/collectionItems.handler.js +7 -0
- package/lib/graphql/query/collectionItems.handler.js.map +1 -0
- package/lib/graphql/query/collections.handler.d.ts +3 -0
- package/lib/graphql/query/collections.handler.js +7 -0
- package/lib/graphql/query/collections.handler.js.map +1 -0
- package/lib/graphql/query/coupons.handler.d.ts +3 -0
- package/lib/graphql/query/coupons.handler.js +7 -0
- package/lib/graphql/query/coupons.handler.js.map +1 -0
- package/lib/graphql/query/customPage.hadler.d.ts +2 -0
- package/lib/graphql/query/customPage.hadler.js +7 -0
- package/lib/graphql/query/customPage.hadler.js.map +1 -0
- package/lib/graphql/query/faqsByCategory.handler.d.ts +3 -0
- package/lib/graphql/query/faqsByCategory.handler.js +7 -0
- package/lib/graphql/query/faqsByCategory.handler.js.map +1 -0
- package/lib/graphql/query/followedListing.handler.d.ts +3 -0
- package/lib/graphql/query/followedListing.handler.js +7 -0
- package/lib/graphql/query/followedListing.handler.js.map +1 -0
- package/lib/graphql/query/followerCount.handler.d.ts +3 -0
- package/lib/graphql/query/followerCount.handler.js +7 -0
- package/lib/graphql/query/followerCount.handler.js.map +1 -0
- package/lib/graphql/query/index.d.ts +2 -0
- package/lib/graphql/query/index.js +83 -0
- package/lib/graphql/query/index.js.map +1 -0
- package/lib/graphql/query/localityHandler.d.ts +3 -0
- package/lib/graphql/query/localityHandler.js +7 -0
- package/lib/graphql/query/localityHandler.js.map +1 -0
- package/lib/graphql/query/order.handler.d.ts +3 -0
- package/lib/graphql/query/order.handler.js +5 -0
- package/lib/graphql/query/order.handler.js.map +1 -0
- package/lib/graphql/query/page.handler.d.ts +3 -0
- package/lib/graphql/query/page.handler.js +3 -0
- package/lib/graphql/query/page.handler.js.map +1 -0
- package/lib/graphql/query/paymentModeRoutes.handler.d.ts +3 -0
- package/lib/graphql/query/paymentModeRoutes.handler.js +8 -0
- package/lib/graphql/query/paymentModeRoutes.handler.js.map +1 -0
- package/lib/graphql/query/pincodeDetails.handler.d.ts +2 -0
- package/lib/graphql/query/pincodeDetails.handler.js +7 -0
- package/lib/graphql/query/pincodeDetails.handler.js.map +1 -0
- package/lib/graphql/query/platformConfig.handler.d.ts +3 -0
- package/lib/graphql/query/platformConfig.handler.js +7 -0
- package/lib/graphql/query/platformConfig.handler.js.map +1 -0
- package/lib/graphql/query/product.handler.d.ts +3 -0
- package/lib/graphql/query/product.handler.js +12 -0
- package/lib/graphql/query/product.handler.js.map +1 -0
- package/lib/graphql/query/productLadderPromotion.handler.d.ts +3 -0
- package/lib/graphql/query/productLadderPromotion.handler.js +7 -0
- package/lib/graphql/query/productLadderPromotion.handler.js.map +1 -0
- package/lib/graphql/query/productPrice.handler.d.ts +3 -0
- package/lib/graphql/query/productPrice.handler.js +5 -0
- package/lib/graphql/query/productPrice.handler.js.map +1 -0
- package/lib/graphql/query/productSellers.handler.d.ts +3 -0
- package/lib/graphql/query/productSellers.handler.js +7 -0
- package/lib/graphql/query/productSellers.handler.js.map +1 -0
- package/lib/graphql/query/products.handler.d.ts +3 -0
- package/lib/graphql/query/products.handler.js +9 -0
- package/lib/graphql/query/products.handler.js.map +1 -0
- package/lib/graphql/query/promotionOffers.handler.d.ts +3 -0
- package/lib/graphql/query/promotionOffers.handler.js +7 -0
- package/lib/graphql/query/promotionOffers.handler.js.map +1 -0
- package/lib/graphql/query/store.handler.d.ts +3 -0
- package/lib/graphql/query/store.handler.js +7 -0
- package/lib/graphql/query/store.handler.js.map +1 -0
- package/lib/graphql/query/theme.handler.d.ts +3 -0
- package/lib/graphql/query/theme.handler.js +13 -0
- package/lib/graphql/query/theme.handler.js.map +1 -0
- package/lib/graphql/query/user.handler.d.ts +3 -0
- package/lib/graphql/query/user.handler.js +12 -0
- package/lib/graphql/query/user.handler.js.map +1 -0
- package/lib/helpers/FPI-events.d.ts +34 -0
- package/lib/helpers/FPI-events.js +590 -0
- package/lib/helpers/FPI-events.js.map +1 -0
- package/lib/helpers/utils.d.ts +7 -0
- package/lib/helpers/utils.js +101 -0
- package/lib/helpers/utils.js.map +1 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.js +13 -0
- package/lib/index.js.map +1 -0
- package/lib/store/enums/keys.d.ts +35 -0
- package/lib/store/enums/keys.js +38 -0
- package/lib/store/enums/keys.js.map +1 -0
- package/lib/store/index.d.ts +24 -0
- package/lib/store/index.js +244 -0
- package/lib/store/index.js.map +1 -0
- package/lib/store/modules/custom.d.ts +8 -0
- package/lib/store/modules/custom.js +11 -0
- package/lib/store/modules/custom.js.map +1 -0
- package/lib/store/modules/payment.d.ts +6 -0
- package/lib/store/modules/payment.js +10 -0
- package/lib/store/modules/payment.js.map +1 -0
- package/lib/store/modules/theme.d.ts +17 -0
- package/lib/store/modules/theme.js +30 -0
- package/lib/store/modules/theme.js.map +1 -0
- package/lib/store/slices/address.d.ts +4 -0
- package/lib/store/slices/address.js +24 -0
- package/lib/store/slices/address.js.map +1 -0
- package/lib/store/slices/auth.d.ts +4 -0
- package/lib/store/slices/auth.js +25 -0
- package/lib/store/slices/auth.js.map +1 -0
- package/lib/store/slices/brands.d.ts +4 -0
- package/lib/store/slices/brands.js +18 -0
- package/lib/store/slices/brands.js.map +1 -0
- package/lib/store/slices/cart.d.ts +4 -0
- package/lib/store/slices/cart.js +62 -0
- package/lib/store/slices/cart.js.map +1 -0
- package/lib/store/slices/categories.d.ts +4 -0
- package/lib/store/slices/categories.js +17 -0
- package/lib/store/slices/categories.js.map +1 -0
- package/lib/store/slices/collection.d.ts +4 -0
- package/lib/store/slices/collection.js +25 -0
- package/lib/store/slices/collection.js.map +1 -0
- package/lib/store/slices/configuration.d.ts +4 -0
- package/lib/store/slices/configuration.js +45 -0
- package/lib/store/slices/configuration.js.map +1 -0
- package/lib/store/slices/content.d.ts +4 -0
- package/lib/store/slices/content.js +75 -0
- package/lib/store/slices/content.js.map +1 -0
- package/lib/store/slices/custom.d.ts +3 -0
- package/lib/store/slices/custom.js +17 -0
- package/lib/store/slices/custom.js.map +1 -0
- package/lib/store/slices/logistic.d.ts +4 -0
- package/lib/store/slices/logistic.js +81 -0
- package/lib/store/slices/logistic.js.map +1 -0
- package/lib/store/slices/order.d.ts +1 -0
- package/lib/store/slices/order.js +11 -0
- package/lib/store/slices/order.js.map +1 -0
- package/lib/store/slices/payment.d.ts +23 -0
- package/lib/store/slices/payment.js +57 -0
- package/lib/store/slices/payment.js.map +1 -0
- package/lib/store/slices/product.d.ts +4 -0
- package/lib/store/slices/product.js +70 -0
- package/lib/store/slices/product.js.map +1 -0
- package/lib/store/slices/products.d.ts +4 -0
- package/lib/store/slices/products.js +27 -0
- package/lib/store/slices/products.js.map +1 -0
- package/lib/store/slices/share.d.ts +1 -0
- package/lib/store/slices/share.js +11 -0
- package/lib/store/slices/share.js.map +1 -0
- package/lib/store/slices/theme.d.ts +25 -0
- package/lib/store/slices/theme.js +84 -0
- package/lib/store/slices/theme.js.map +1 -0
- package/lib/store/store.d.ts +64 -0
- package/lib/store/store.js +44 -0
- package/lib/store/store.js.map +1 -0
- package/lib/store/utils/gateways/ajiodhan.d.ts +8 -0
- package/lib/store/utils/gateways/ajiodhan.js +27 -0
- package/lib/store/utils/gateways/ajiodhan.js.map +1 -0
- package/lib/store/utils/gateways/ccavenue.d.ts +13 -0
- package/lib/store/utils/gateways/ccavenue.js +19 -0
- package/lib/store/utils/gateways/ccavenue.js.map +1 -0
- package/lib/store/utils/gateways/epaylater.d.ts +14 -0
- package/lib/store/utils/gateways/epaylater.js +28 -0
- package/lib/store/utils/gateways/epaylater.js.map +1 -0
- package/lib/store/utils/gateways/helper.d.ts +1 -0
- package/lib/store/utils/gateways/helper.js +17 -0
- package/lib/store/utils/gateways/helper.js.map +1 -0
- package/lib/store/utils/gateways/index.d.ts +1 -0
- package/lib/store/utils/gateways/index.js +27 -0
- package/lib/store/utils/gateways/index.js.map +1 -0
- package/lib/store/utils/gateways/jio.d.ts +12 -0
- package/lib/store/utils/gateways/jio.js +24 -0
- package/lib/store/utils/gateways/jio.js.map +1 -0
- package/lib/store/utils/gateways/jiopay.d.ts +21 -0
- package/lib/store/utils/gateways/jiopay.js +30 -0
- package/lib/store/utils/gateways/jiopay.js.map +1 -0
- package/lib/store/utils/gateways/juspay.d.ts +34 -0
- package/lib/store/utils/gateways/juspay.js +63 -0
- package/lib/store/utils/gateways/juspay.js.map +1 -0
- package/lib/store/utils/gateways/payumoney.d.ts +8 -0
- package/lib/store/utils/gateways/payumoney.js +17 -0
- package/lib/store/utils/gateways/payumoney.js.map +1 -0
- package/lib/store/utils/gateways/potlee.d.ts +63 -0
- package/lib/store/utils/gateways/potlee.js +315 -0
- package/lib/store/utils/gateways/potlee.js.map +1 -0
- package/lib/store/utils/gateways/razorpay.d.ts +46 -0
- package/lib/store/utils/gateways/razorpay.js +70 -0
- package/lib/store/utils/gateways/razorpay.js.map +1 -0
- package/lib/store/utils/gateways/rupifi.d.ts +17 -0
- package/lib/store/utils/gateways/rupifi.js +63 -0
- package/lib/store/utils/gateways/rupifi.js.map +1 -0
- package/lib/store/utils/gateways/simply.d.ts +43 -0
- package/lib/store/utils/gateways/simply.js +222 -0
- package/lib/store/utils/gateways/simply.js.map +1 -0
- package/lib/store/utils/gateways/standard_extension.d.ts +13 -0
- package/lib/store/utils/gateways/standard_extension.js +22 -0
- package/lib/store/utils/gateways/standard_extension.js.map +1 -0
- package/lib/store/utils/helper.d.ts +1 -0
- package/lib/store/utils/helper.js +17 -0
- package/lib/store/utils/helper.js.map +1 -0
- package/lib/store/utils/payment.d.ts +4 -0
- package/lib/store/utils/payment.js +496 -0
- package/lib/store/utils/payment.js.map +1 -0
- package/lib/store/utils/util.d.ts +14 -0
- package/lib/store/utils/util.js +67 -0
- package/lib/store/utils/util.js.map +1 -0
- package/lib/types/address.d.ts +7 -0
- package/lib/types/address.js +2 -0
- package/lib/types/address.js.map +1 -0
- package/lib/types/auth.d.ts +69 -0
- package/lib/types/auth.js +2 -0
- package/lib/types/auth.js.map +1 -0
- package/lib/types/brands.d.ts +6 -0
- package/lib/types/brands.js +2 -0
- package/lib/types/brands.js.map +1 -0
- package/lib/types/cart.d.ts +39 -0
- package/lib/types/cart.js +2 -0
- package/lib/types/cart.js.map +1 -0
- package/lib/types/categories.d.ts +5 -0
- package/lib/types/categories.js +2 -0
- package/lib/types/categories.js.map +1 -0
- package/lib/types/collection.d.ts +10 -0
- package/lib/types/collection.js +2 -0
- package/lib/types/collection.js.map +1 -0
- package/lib/types/configuration.d.ts +19 -0
- package/lib/types/configuration.js +2 -0
- package/lib/types/configuration.js.map +1 -0
- package/lib/types/content.d.ts +35 -0
- package/lib/types/content.js +2 -0
- package/lib/types/content.js.map +1 -0
- package/lib/types/custom.d.ts +12 -0
- package/lib/types/custom.js +2 -0
- package/lib/types/custom.js.map +1 -0
- package/lib/types/graphql.d.ts +11471 -0
- package/lib/types/graphql.js +198 -0
- package/lib/types/graphql.js.map +1 -0
- package/lib/types/index.d.ts +56 -0
- package/lib/types/index.js +2 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/logistic.d.ts +9 -0
- package/lib/types/logistic.js +2 -0
- package/lib/types/logistic.js.map +1 -0
- package/lib/types/product.d.ts +29 -0
- package/lib/types/product.js +2 -0
- package/lib/types/product.js.map +1 -0
- package/lib/types/products.d.ts +29 -0
- package/lib/types/products.js +2 -0
- package/lib/types/products.js.map +1 -0
- package/lib/types/theme.d.ts +26 -0
- package/lib/types/theme.js +2 -0
- package/lib/types/theme.js.map +1 -0
- package/package.json +45 -0
- package/schema.json +58765 -0
- package/webpack.config.js +23 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
|
3
|
+
|
|
4
|
+
name: Node.js Package
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
release:
|
|
8
|
+
types: [created]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
publish-npm:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- uses: actions/setup-node@v4
|
|
16
|
+
with:
|
|
17
|
+
node-version: 20
|
|
18
|
+
registry-url: https://registry.npmjs.org/
|
|
19
|
+
- uses: jaywcjlove/github-action-package@main
|
|
20
|
+
with:
|
|
21
|
+
version: ${{ github.ref_name }}
|
|
22
|
+
rename: "@gofynd/fdk-store-gql"
|
|
23
|
+
- run: npm ci
|
|
24
|
+
- run: npm publish --access public
|
|
25
|
+
env:
|
|
26
|
+
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}}
|
package/README.md
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# FDK Store
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
The FDK Store is an NPM package that serves as a wrapper over the FDK Client Javascript SDK, providing users with a convenient interface to interact with the SDK's functionality. This package utilizes Redux Toolkit to manage the application state and automatically updates the store based on actions performed through the SDK.
|
|
6
|
+
|
|
7
|
+
The FDK Store exports a class that encapsulates the Redux store and exposes methods for interacting with the SDK and retrieving data from the store. It also includes a getters object that provides getter functions for different slices of the store.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
To install the FDK Store package in your project, use the following command:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
npm install github:@gofynd/fdk-store
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
### Importing the Package
|
|
21
|
+
|
|
22
|
+
To import the FDK Store package into your project, use the following import statement:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
import FDKStore from 'fdk-store';
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Creating an Instance
|
|
29
|
+
|
|
30
|
+
To import the FDK Store package into your project, use the following import statement:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
const fpiOptions = {
|
|
34
|
+
applicationID,
|
|
35
|
+
applicationToken,
|
|
36
|
+
domain,
|
|
37
|
+
storeInitialData,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const { client: fpi } = new FDKStore(fpiOptions);
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Using FPI Client Instance
|
|
44
|
+
|
|
45
|
+
For theme developers, each route level theme page will be provided with `fpi` client instance. Theme developers can use this client to fetch and sync data with their redux stores.
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Read Redux State
|
|
49
|
+
|
|
50
|
+
#### Get current State Snapshot
|
|
51
|
+
|
|
52
|
+
The `fpi` client exposes the standard redux store at `fpi.store`. Developers can use redux method ` fpi.store.getState()` to the current snapshot of the state.
|
|
53
|
+
|
|
54
|
+
#### Subscribe to a slice of state
|
|
55
|
+
|
|
56
|
+
FDK Store uses Redux Toolkit to manage slices of state internally. Theme developers can leverage the `useGlobalStore` hook provided by the theme engine through a global package called `fdk-core/utils`. The `useGlobalStore` hook is similar to the standard `useSelector` hook provided by redux toolkit. Developers can use `useGlobalStore` and pass the required getters provided in `fpi.getters` to subscribe to state changes in a React Component.
|
|
57
|
+
|
|
58
|
+
##### Example
|
|
59
|
+
```
|
|
60
|
+
import React from 'react';
|
|
61
|
+
import { useGlobalStore } from 'fdk-core/utils';
|
|
62
|
+
|
|
63
|
+
function Home({ fpi }) {
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Get PAGE data from store
|
|
67
|
+
*/
|
|
68
|
+
const page = useGlobalStore(fpi.getters.PAGE) || {};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Rendering Logic Here
|
|
72
|
+
*/
|
|
73
|
+
|
|
74
|
+
return (
|
|
75
|
+
<p>Home Component</p>
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## API Guide
|
|
83
|
+
|
|
84
|
+
Check [docs](docs/API.md) for full API guide.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
trigger:
|
|
2
|
+
tags:
|
|
3
|
+
include:
|
|
4
|
+
- "v*"
|
|
5
|
+
|
|
6
|
+
resources:
|
|
7
|
+
containers:
|
|
8
|
+
- container: node18
|
|
9
|
+
image: node:18-buster
|
|
10
|
+
|
|
11
|
+
pool:
|
|
12
|
+
docker
|
|
13
|
+
|
|
14
|
+
variables:
|
|
15
|
+
- group: pipeline
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
- job: GitHubSync
|
|
19
|
+
container: node18
|
|
20
|
+
steps:
|
|
21
|
+
- checkout: self
|
|
22
|
+
|
|
23
|
+
- script: |
|
|
24
|
+
if [ "$(Build.SourceBranch)" != "refs/tags/*" ]; then
|
|
25
|
+
|
|
26
|
+
echo "This is a tag push. Sync starting..."
|
|
27
|
+
BRANCH_NAME=$(echo $(Build.SourceBranchName) | sed 's/^refs\/tags\///' | sed 's/\./_/g')
|
|
28
|
+
|
|
29
|
+
git config --global user.email "jigar.dafda@gmail.com"
|
|
30
|
+
git config --global user.name "Jigar Dafda"
|
|
31
|
+
|
|
32
|
+
git clone https://$(GITHUB_USERNAME):$(GITHUB_PERSONAL_TOKEN)@github.com/gofynd/fdk-store-gql.git
|
|
33
|
+
cd fdk-store-gql
|
|
34
|
+
git checkout -b $BRANCH_NAME
|
|
35
|
+
rm -rf ./*
|
|
36
|
+
cd ..
|
|
37
|
+
|
|
38
|
+
cp -R `ls | grep -v "fdk-store-gql"` ./fdk-store-gql
|
|
39
|
+
cp .gitignore.ci ./fdk-store-gql/.gitignore
|
|
40
|
+
|
|
41
|
+
cd fdk-store-gql
|
|
42
|
+
NODE_ENV=development npm i
|
|
43
|
+
npm run build
|
|
44
|
+
|
|
45
|
+
git add .
|
|
46
|
+
git commit -m "[Auto Generated]"
|
|
47
|
+
git push origin $BRANCH_NAME
|
|
48
|
+
|
|
49
|
+
git tag $(Build.SourceBranchName)
|
|
50
|
+
git push origin $(Build.SourceBranchName)
|
|
51
|
+
|
|
52
|
+
else
|
|
53
|
+
echo "This is not a tag push. Exiting..."
|
|
54
|
+
exit 0
|
|
55
|
+
fi
|
|
56
|
+
displayName: 'Sync with GitHub'
|
package/codegen.yml
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnFollowById.handler.js","sourceRoot":"","sources":["../../../src/graphql/mutations/UnFollowById.handler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEpE,MAAM,UAAU,mBAAmB,CACjC,GAAuB,EACvB,QAAkC,EAClC,MAAe,EACf,QAAiB;IAEjB,YAAY,CAAC,UAAU,CAAC,oBAAoB,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC;AACvE,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ThunkActionDispatch } from "redux-thunk";
|
|
2
|
+
import { AddCartDetailResponse } from "../../types/graphql";
|
|
3
|
+
export declare function addItemsToCartHandler(addItemsToCart: AddCartDetailResponse, dispatch: ThunkActionDispatch<any>, params: unknown, oldStore: unknown): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { setaddItemsToCart, } from "../../store/slices/cart";
|
|
2
|
+
import { emitFPIEvent, FPI_EVENTS } from "../../helpers/FPI-events";
|
|
3
|
+
export function addItemsToCartHandler(addItemsToCart, dispatch, params, oldStore) {
|
|
4
|
+
if (addItemsToCart) {
|
|
5
|
+
dispatch(setaddItemsToCart(addItemsToCart));
|
|
6
|
+
emitFPIEvent(FPI_EVENTS.ADD_TO_CART, params, addItemsToCart, oldStore);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=addItemsToCart.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addItemsToCart.handler.js","sourceRoot":"","sources":["../../../src/graphql/mutations/addItemsToCart.handler.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEpE,MAAM,UAAU,qBAAqB,CACnC,cAAqC,EACrC,QAAkC,EAClC,MAAe,EACf,QAAiB;IAEjB,IAAI,cAAc,EAAE;QAClB,QAAQ,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC,CAAC;QAC5C,YAAY,CAAC,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,CAAC,CAAC;KACxE;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applyCoupon.handler.js","sourceRoot":"","sources":["../../../src/graphql/mutations/applyCoupon.handler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAqB,cAAc,EAAuB,MAAM,yBAAyB,CAAC;AAGjG,MAAM,UAAU,kBAAkB,CAAC,WAA+B,EAAE,QAAkC;IACpG,IAAI,WAAW,EAAE;QACf,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC;KACvC;AACH,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { setrewardPoints } from "../../store/slices/cart";
|
|
2
|
+
export function applyRewardPointsHandler(applyRewardPoints, dispatch) {
|
|
3
|
+
if (applyRewardPoints) {
|
|
4
|
+
dispatch(setrewardPoints(applyRewardPoints));
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=applyRewardPoints.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applyRewardPoints.handler.js","sourceRoot":"","sources":["../../../src/graphql/mutations/applyRewardPoints.handler.ts"],"names":[],"mappings":"AAGA,OAAO,EAA0D,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAGlH,MAAM,UAAU,wBAAwB,CAAC,iBAAqC,EAAE,QAAkC;IAChH,IAAI,iBAAiB,EAAE;QACrB,QAAQ,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC,CAAC;KAC9C;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"followById.handler.js","sourceRoot":"","sources":["../../../src/graphql/mutations/followById.handler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEpE,MAAM,UAAU,iBAAiB,CAC/B,GAAuB,EACvB,QAAkC,EAClC,MAAe,EACf,QAAiB;IAEjB,YAAY,CAAC,UAAU,CAAC,eAAe,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { setgetCartShareLink } from "../../store/slices/cart";
|
|
2
|
+
export function getCartShareLinkHandler(getCartShareLink, dispatch) {
|
|
3
|
+
if (getCartShareLink) {
|
|
4
|
+
dispatch(setgetCartShareLink(getCartShareLink));
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=getCartShareLink.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCartShareLink.handler.js","sourceRoot":"","sources":["../../../src/graphql/mutations/getCartShareLink.handler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG9D,MAAM,UAAU,uBAAuB,CAAC,gBAA0C,EAAE,QAAkC;IACpH,IAAI,gBAAgB,EAAE;QACpB,QAAQ,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,CAAC;KACjD;AACH,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { addItemsToCartHandler } from "./addItemsToCart.handler";
|
|
2
|
+
import { applyCouponHandler } from "./applyCoupon.handler";
|
|
3
|
+
import { applyRewardPointsHandler } from "./applyRewardPoints.handler";
|
|
4
|
+
import { getCartShareLinkHandler } from "./getCartShareLink.handler";
|
|
5
|
+
import { loginWithAppleIOSHandler } from "./loginWithAppleIOS.handler";
|
|
6
|
+
import { loginWithEmailAndPasswordHandler } from "./loginWithEmailAndPassword.handler";
|
|
7
|
+
import { loginWithFacebookHandler } from "./loginWithFacebook.handler";
|
|
8
|
+
import { loginWithGoogleHandler } from "./loginWithGoogle.handler";
|
|
9
|
+
import { loginWithOTPHandler } from "./loginWithOTP.handler";
|
|
10
|
+
import { removeCouponHandler } from "./removeCoupon.handler";
|
|
11
|
+
import { updateAddressHandler } from "./updateAddress.handler";
|
|
12
|
+
import { updateCartHandler } from "./updateCart.handler";
|
|
13
|
+
import { updateCartMetaHandler } from "./updateCartMeta.handler";
|
|
14
|
+
import { updateProfileHandler } from "./updateProfile.handler";
|
|
15
|
+
import { verifyEmailOTPHandler } from "./verifyEmailOtp.handler";
|
|
16
|
+
import { verifyMobileOTPHandler } from "./verifyMobileOTP.handler";
|
|
17
|
+
import { followByIdHandler } from "./followById.handler";
|
|
18
|
+
import { unfollowByIdHandler } from "./UnFollowById.handler";
|
|
19
|
+
import { selectAddressHandler } from "./selectAddress.handler";
|
|
20
|
+
import { selectPaymentModehandler } from "./selectPaymentMode.handler";
|
|
21
|
+
const handlerMap = {
|
|
22
|
+
updateAddress: updateAddressHandler,
|
|
23
|
+
loginWithAppleIOS: loginWithAppleIOSHandler,
|
|
24
|
+
loginWithEmailAndPassword: loginWithEmailAndPasswordHandler,
|
|
25
|
+
loginWithOTP: loginWithOTPHandler,
|
|
26
|
+
loginWithFacebook: loginWithFacebookHandler,
|
|
27
|
+
loginWithGoogle: loginWithGoogleHandler,
|
|
28
|
+
verifyMobileOTP: verifyMobileOTPHandler,
|
|
29
|
+
verifyEmailOtp: verifyEmailOTPHandler,
|
|
30
|
+
updateProfile: updateProfileHandler,
|
|
31
|
+
getCartShareLink: getCartShareLinkHandler,
|
|
32
|
+
addItemsToCart: addItemsToCartHandler,
|
|
33
|
+
updateCart: updateCartHandler,
|
|
34
|
+
updateCartMeta: updateCartMetaHandler,
|
|
35
|
+
applyCoupon: applyCouponHandler,
|
|
36
|
+
removeCoupon: removeCouponHandler,
|
|
37
|
+
applyRewardPoints: applyRewardPointsHandler,
|
|
38
|
+
followById: followByIdHandler,
|
|
39
|
+
unfollowById: unfollowByIdHandler,
|
|
40
|
+
selectAddress: selectAddressHandler,
|
|
41
|
+
selectPaymentMode: selectPaymentModehandler
|
|
42
|
+
};
|
|
43
|
+
export function mutationResponseHandler(responseData, dispatch, params) {
|
|
44
|
+
console.log({ responseData });
|
|
45
|
+
if (!responseData) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
Object.keys(handlerMap).forEach(key => {
|
|
49
|
+
if (responseData.hasOwnProperty(key)) {
|
|
50
|
+
handlerMap[key](responseData[key], dispatch, params);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/graphql/mutations/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,gCAAgC,EAAE,MAAM,qCAAqC,CAAC;AACvF,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,MAAM,UAAU,GAAQ;IACtB,aAAa,EAAE,oBAAoB;IACnC,iBAAiB,EAAE,wBAAwB;IAC3C,yBAAyB,EAAE,gCAAgC;IAC3D,YAAY,EAAE,mBAAmB;IACjC,iBAAiB,EAAE,wBAAwB;IAC3C,eAAe,EAAE,sBAAsB;IACvC,eAAe,EAAE,sBAAsB;IACvC,cAAc,EAAE,qBAAqB;IACrC,aAAa,EAAE,oBAAoB;IACnC,gBAAgB,EAAE,uBAAuB;IACzC,cAAc,EAAE,qBAAqB;IACrC,UAAU,EAAE,iBAAiB;IAC7B,cAAc,EAAE,qBAAqB;IACrC,WAAW,EAAE,kBAAkB;IAC/B,YAAY,EAAE,mBAAmB;IACjC,iBAAiB,EAAE,wBAAwB;IAC3C,UAAU,EAAE,iBAAiB;IAC7B,YAAY,EAAE,mBAAmB;IACjC,aAAa,EAAE,oBAAoB;IACnC,iBAAiB,EAAC,wBAAwB;CAE3C,CAAA;AAGD,MAAM,UAAU,uBAAuB,CAAC,YAAiB,EAAE,QAAkC,EAAE,MAAU;IACvG,OAAO,CAAC,GAAG,CAAC,EAAC,YAAY,EAAC,CAAC,CAAC;IAE1B,IAAI,CAAC,YAAY,EAAE;QACf,OAAO;KACV;IACD,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QACpC,IAAI,YAAY,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;YACpC,UAAU,CAAC,GAAG,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;SACtD;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loginWithAppleIOS.handler.js","sourceRoot":"","sources":["../../../src/graphql/mutations/loginWithAppleIOS.handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGtD,MAAM,UAAU,wBAAwB,CAAC,iBAA8B,EAAE,QAAkC;IACzG,IAAI,iBAAiB,EAAE;QACrB,QAAQ,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC,CAAC;KAC1C;AACH,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { setUserData } from "../../store/slices/auth";
|
|
2
|
+
export function loginWithEmailAndPasswordHandler(loginWithEmailAndPassword, dispatch) {
|
|
3
|
+
if (loginWithEmailAndPassword) {
|
|
4
|
+
dispatch(setUserData(loginWithEmailAndPassword));
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=loginWithEmailAndPassword.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loginWithEmailAndPassword.handler.js","sourceRoot":"","sources":["../../../src/graphql/mutations/loginWithEmailAndPassword.handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGtD,MAAM,UAAU,gCAAgC,CAAC,yBAAuC,EAAE,QAAkC;IAC1H,IAAI,yBAAyB,EAAE;QAC7B,QAAQ,CAAC,WAAW,CAAC,yBAAyB,CAAC,CAAC,CAAC;KAClD;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loginWithFacebook.handler.js","sourceRoot":"","sources":["../../../src/graphql/mutations/loginWithFacebook.handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGtD,MAAM,UAAU,wBAAwB,CAAC,iBAA8B,EAAE,QAAkC;IACzG,IAAI,iBAAiB,EAAE;QACrB,QAAQ,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC,CAAC;KAC1C;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loginWithGoogle.handler.js","sourceRoot":"","sources":["../../../src/graphql/mutations/loginWithGoogle.handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGtD,MAAM,UAAU,sBAAsB,CAAC,eAA4B,EAAE,QAAkC;IACrG,IAAI,eAAe,EAAE;QACnB,QAAQ,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,CAAC;KACxC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loginWithOTP.handler.js","sourceRoot":"","sources":["../../../src/graphql/mutations/loginWithOTP.handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGtD,MAAM,UAAU,mBAAmB,CAAC,YAA6B,EAAE,QAAkC;IACnG,IAAI,YAAY,EAAE;QAChB,QAAQ,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC;KACrC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"removeCoupon.handler.js","sourceRoot":"","sources":["../../../src/graphql/mutations/removeCoupon.handler.ts"],"names":[],"mappings":"AAGA,OAAO,EAA0D,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAGlH,MAAM,UAAU,mBAAmB,CAAC,YAAgC,EAAE,QAAkC;IACtG,IAAI,YAAY,EAAE;QAChB,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC;KACzC;AACH,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { emitFPIEvent, FPI_EVENTS } from "../../helpers/FPI-events";
|
|
2
|
+
export function selectAddressHandler(res, dispatch, params, oldStore) {
|
|
3
|
+
emitFPIEvent(FPI_EVENTS.ADD_ADDRESS_INFORMATION, params, res, oldStore);
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=selectAddress.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectAddress.handler.js","sourceRoot":"","sources":["../../../src/graphql/mutations/selectAddress.handler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEpE,MAAM,UAAU,oBAAoB,CAAC,GAA0B,EAAE,QAAkC,EAAG,MAAe,EACnH,QAAiB;IACjB,YAAY,CAAC,UAAU,CAAC,uBAAuB,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC;AAC1E,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { emitFPIEvent, FPI_EVENTS } from "../../helpers/FPI-events";
|
|
2
|
+
export function selectPaymentModehandler(res, dispatch, params, oldStore) {
|
|
3
|
+
emitFPIEvent(FPI_EVENTS.ADD_PAYMENT_INFORMATION, params, res, oldStore);
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=selectPaymentMode.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectPaymentMode.handler.js","sourceRoot":"","sources":["../../../src/graphql/mutations/selectPaymentMode.handler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEpE,MAAM,UAAU,wBAAwB,CAAC,GAAS,EAAE,QAAkC,EAAG,MAAe,EACtG,QAAiB;IACjB,YAAY,CAAC,UAAU,CAAC,uBAAuB,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC;AAC1E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateAddress.handler.js","sourceRoot":"","sources":["../../../src/graphql/mutations/updateAddress.handler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAG9D,MAAM,UAAU,oBAAoB,CAAC,aAAoC,EAAE,QAAkC;IACzG,IAAI,aAAa,EAAE;QACf,QAAQ,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC,CAAA;KAC5C;AACL,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ThunkActionDispatch } from "redux-thunk";
|
|
2
|
+
import { UpdateCartDetailResponse } from "../../types/graphql";
|
|
3
|
+
export declare function updateCartHandler(updateCart: UpdateCartDetailResponse, dispatch: ThunkActionDispatch<any>, params: any, oldStore: unknown): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { setUpdateCart } from "../../store/slices/cart";
|
|
2
|
+
import { emitFPIEvent, FPI_EVENTS } from "../../helpers/FPI-events";
|
|
3
|
+
export function updateCartHandler(updateCart, dispatch, params, oldStore) {
|
|
4
|
+
if (updateCart.cart) {
|
|
5
|
+
if (params.updateCartRequestInput.operation === "update_item") {
|
|
6
|
+
emitFPIEvent(FPI_EVENTS.UPDATE_CART, params, updateCart, oldStore);
|
|
7
|
+
}
|
|
8
|
+
else {
|
|
9
|
+
emitFPIEvent(FPI_EVENTS.REMOVE_FROM_CART, params, updateCart, oldStore);
|
|
10
|
+
}
|
|
11
|
+
dispatch(setUpdateCart(updateCart.cart));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=updateCart.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateCart.handler.js","sourceRoot":"","sources":["../../../src/graphql/mutations/updateCart.handler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEpE,MAAM,UAAU,iBAAiB,CAC/B,UAAoC,EACpC,QAAkC,EAClC,MAAW,EACX,QAAiB;IAEjB,IAAI,UAAU,CAAC,IAAI,EAAE;QACnB,IAAI,MAAM,CAAC,sBAAsB,CAAC,SAAS,KAAK,aAAa,EAAE;YAC7D,YAAY,CAAC,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;SACpE;aAAM;YACH,YAAY,CAAC,UAAU,CAAC,gBAAgB,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;SAC3E;QACD,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;KAG1C;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateCartMeta.handler.js","sourceRoot":"","sources":["../../../src/graphql/mutations/updateCartMeta.handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,UAAU,qBAAqB,CAAC,cAAgC,EAAE,QAAkC;IACtG,IAAI,cAAc,EAAE;QAChB,QAAQ,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC,CAAA;KAC9C;AACL,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ThunkActionDispatch } from "redux-thunk";
|
|
2
|
+
import { ProfileEditSuccess } from "../../types/graphql";
|
|
3
|
+
export declare function updateProfileHandler(updateProfile: ProfileEditSuccess, dispatch: ThunkActionDispatch<any>, params: unknown, oldStore: unknown): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { setUserData } from "../../store/slices/auth";
|
|
2
|
+
import { emitFPIEvent, FPI_EVENTS } from "../../helpers/FPI-events";
|
|
3
|
+
export function updateProfileHandler(updateProfile, dispatch, params, oldStore) {
|
|
4
|
+
if (updateProfile) {
|
|
5
|
+
dispatch(setUserData(updateProfile));
|
|
6
|
+
emitFPIEvent(FPI_EVENTS.PROFILE_UPDATE, params, updateProfile, oldStore);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=updateProfile.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateProfile.handler.js","sourceRoot":"","sources":["../../../src/graphql/mutations/updateProfile.handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEpE,MAAM,UAAU,oBAAoB,CAAC,aAAiC,EAAE,QAAkC,EAAI,MAAe,EAC3H,QAAiB;IACjB,IAAI,aAAa,EAAE;QACjB,QAAQ,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC;QACrC,YAAY,CACV,UAAU,CAAC,cAAc,EACzB,MAAM,EACN,aAAa,EACb,QAAQ,CACT,CAAA;KACF;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyEmailOtp.handler.js","sourceRoot":"","sources":["../../../src/graphql/mutations/verifyEmailOtp.handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGtD,MAAM,UAAU,qBAAqB,CAAC,cAAgC,EAAE,QAAkC;IACxG,IAAI,cAAc,EAAE;QAClB,QAAQ,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC;KACvC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyMobileOTP.handler.js","sourceRoot":"","sources":["../../../src/graphql/mutations/verifyMobileOTP.handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGtD,MAAM,UAAU,sBAAsB,CAAC,eAAiC,EAAE,QAAkC;IAC1G,IAAI,eAAe,EAAE;QACnB,QAAQ,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,CAAC;KACxC;AACH,CAAC"}
|