@gofynd/fdk-store-gql 3.0.38-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (352) hide show
  1. package/.github/workflows/npm-publish.yml +29 -0
  2. package/README.md +84 -0
  3. package/azure-pipelines.yml +56 -0
  4. package/codegen.yml +6 -0
  5. package/lib/graphql/mutations/UnFollowById.handler.d.ts +3 -0
  6. package/lib/graphql/mutations/UnFollowById.handler.js +5 -0
  7. package/lib/graphql/mutations/UnFollowById.handler.js.map +1 -0
  8. package/lib/graphql/mutations/addItemsToCart.handler.d.ts +3 -0
  9. package/lib/graphql/mutations/addItemsToCart.handler.js +9 -0
  10. package/lib/graphql/mutations/addItemsToCart.handler.js.map +1 -0
  11. package/lib/graphql/mutations/applyCoupon.handler.d.ts +3 -0
  12. package/lib/graphql/mutations/applyCoupon.handler.js +7 -0
  13. package/lib/graphql/mutations/applyCoupon.handler.js.map +1 -0
  14. package/lib/graphql/mutations/applyRewardPoints.handler.d.ts +3 -0
  15. package/lib/graphql/mutations/applyRewardPoints.handler.js +7 -0
  16. package/lib/graphql/mutations/applyRewardPoints.handler.js.map +1 -0
  17. package/lib/graphql/mutations/followById.handler.d.ts +3 -0
  18. package/lib/graphql/mutations/followById.handler.js +5 -0
  19. package/lib/graphql/mutations/followById.handler.js.map +1 -0
  20. package/lib/graphql/mutations/getCartShareLink.handler.d.ts +3 -0
  21. package/lib/graphql/mutations/getCartShareLink.handler.js +7 -0
  22. package/lib/graphql/mutations/getCartShareLink.handler.js.map +1 -0
  23. package/lib/graphql/mutations/index.d.ts +2 -0
  24. package/lib/graphql/mutations/index.js +54 -0
  25. package/lib/graphql/mutations/index.js.map +1 -0
  26. package/lib/graphql/mutations/loginWithAppleIOS.handler.d.ts +3 -0
  27. package/lib/graphql/mutations/loginWithAppleIOS.handler.js +7 -0
  28. package/lib/graphql/mutations/loginWithAppleIOS.handler.js.map +1 -0
  29. package/lib/graphql/mutations/loginWithEmailAndPassword.handler.d.ts +3 -0
  30. package/lib/graphql/mutations/loginWithEmailAndPassword.handler.js +7 -0
  31. package/lib/graphql/mutations/loginWithEmailAndPassword.handler.js.map +1 -0
  32. package/lib/graphql/mutations/loginWithFacebook.handler.d.ts +3 -0
  33. package/lib/graphql/mutations/loginWithFacebook.handler.js +7 -0
  34. package/lib/graphql/mutations/loginWithFacebook.handler.js.map +1 -0
  35. package/lib/graphql/mutations/loginWithGoogle.handler.d.ts +3 -0
  36. package/lib/graphql/mutations/loginWithGoogle.handler.js +7 -0
  37. package/lib/graphql/mutations/loginWithGoogle.handler.js.map +1 -0
  38. package/lib/graphql/mutations/loginWithOTP.handler.d.ts +3 -0
  39. package/lib/graphql/mutations/loginWithOTP.handler.js +7 -0
  40. package/lib/graphql/mutations/loginWithOTP.handler.js.map +1 -0
  41. package/lib/graphql/mutations/removeCoupon.handler.d.ts +3 -0
  42. package/lib/graphql/mutations/removeCoupon.handler.js +7 -0
  43. package/lib/graphql/mutations/removeCoupon.handler.js.map +1 -0
  44. package/lib/graphql/mutations/selectAddress.handler.d.ts +3 -0
  45. package/lib/graphql/mutations/selectAddress.handler.js +5 -0
  46. package/lib/graphql/mutations/selectAddress.handler.js.map +1 -0
  47. package/lib/graphql/mutations/selectPaymentMode.handler.d.ts +3 -0
  48. package/lib/graphql/mutations/selectPaymentMode.handler.js +5 -0
  49. package/lib/graphql/mutations/selectPaymentMode.handler.js.map +1 -0
  50. package/lib/graphql/mutations/updateAddress.handler.d.ts +3 -0
  51. package/lib/graphql/mutations/updateAddress.handler.js +7 -0
  52. package/lib/graphql/mutations/updateAddress.handler.js.map +1 -0
  53. package/lib/graphql/mutations/updateCart.handler.d.ts +3 -0
  54. package/lib/graphql/mutations/updateCart.handler.js +14 -0
  55. package/lib/graphql/mutations/updateCart.handler.js.map +1 -0
  56. package/lib/graphql/mutations/updateCartMeta.handler.d.ts +3 -0
  57. package/lib/graphql/mutations/updateCartMeta.handler.js +7 -0
  58. package/lib/graphql/mutations/updateCartMeta.handler.js.map +1 -0
  59. package/lib/graphql/mutations/updateProfile.handler.d.ts +3 -0
  60. package/lib/graphql/mutations/updateProfile.handler.js +9 -0
  61. package/lib/graphql/mutations/updateProfile.handler.js.map +1 -0
  62. package/lib/graphql/mutations/verifyEmailOtp.handler.d.ts +3 -0
  63. package/lib/graphql/mutations/verifyEmailOtp.handler.js +7 -0
  64. package/lib/graphql/mutations/verifyEmailOtp.handler.js.map +1 -0
  65. package/lib/graphql/mutations/verifyMobileOTP.handler.d.ts +3 -0
  66. package/lib/graphql/mutations/verifyMobileOTP.handler.js +7 -0
  67. package/lib/graphql/mutations/verifyMobileOTP.handler.js.map +1 -0
  68. package/lib/graphql/query/address.handler.d.ts +3 -0
  69. package/lib/graphql/query/address.handler.js +7 -0
  70. package/lib/graphql/query/address.handler.js.map +1 -0
  71. package/lib/graphql/query/addresses.handler.d.ts +3 -0
  72. package/lib/graphql/query/addresses.handler.js +7 -0
  73. package/lib/graphql/query/addresses.handler.js.map +1 -0
  74. package/lib/graphql/query/aggregatorsConfig.handler.d.ts +3 -0
  75. package/lib/graphql/query/aggregatorsConfig.handler.js +7 -0
  76. package/lib/graphql/query/aggregatorsConfig.handler.js.map +1 -0
  77. package/lib/graphql/query/allCountries.handler.d.ts +3 -0
  78. package/lib/graphql/query/allCountries.handler.js +8 -0
  79. package/lib/graphql/query/allCountries.handler.js.map +1 -0
  80. package/lib/graphql/query/applicationConfiguration.handler.d.ts +3 -0
  81. package/lib/graphql/query/applicationConfiguration.handler.js +24 -0
  82. package/lib/graphql/query/applicationConfiguration.handler.js.map +1 -0
  83. package/lib/graphql/query/applicationContent.handler.d.ts +3 -0
  84. package/lib/graphql/query/applicationContent.handler.js +38 -0
  85. package/lib/graphql/query/applicationContent.handler.js.map +1 -0
  86. package/lib/graphql/query/applicationStaff.handler.d.ts +2 -0
  87. package/lib/graphql/query/applicationStaff.handler.js +7 -0
  88. package/lib/graphql/query/applicationStaff.handler.js.map +1 -0
  89. package/lib/graphql/query/blog.handler.d.ts +3 -0
  90. package/lib/graphql/query/blog.handler.js +7 -0
  91. package/lib/graphql/query/blog.handler.js.map +1 -0
  92. package/lib/graphql/query/brands.handler.d.ts +3 -0
  93. package/lib/graphql/query/brands.handler.js +8 -0
  94. package/lib/graphql/query/brands.handler.js.map +1 -0
  95. package/lib/graphql/query/bulkDiscountOffers.handler.d.ts +3 -0
  96. package/lib/graphql/query/bulkDiscountOffers.handler.js +7 -0
  97. package/lib/graphql/query/bulkDiscountOffers.handler.js.map +1 -0
  98. package/lib/graphql/query/cartHandler.d.ts +3 -0
  99. package/lib/graphql/query/cartHandler.js +9 -0
  100. package/lib/graphql/query/cartHandler.js.map +1 -0
  101. package/lib/graphql/query/cartShipmentDetails.handler.d.ts +3 -0
  102. package/lib/graphql/query/cartShipmentDetails.handler.js +7 -0
  103. package/lib/graphql/query/cartShipmentDetails.handler.js.map +1 -0
  104. package/lib/graphql/query/categories.handler.d.ts +3 -0
  105. package/lib/graphql/query/categories.handler.js +8 -0
  106. package/lib/graphql/query/categories.handler.js.map +1 -0
  107. package/lib/graphql/query/collection.handler.d.ts +3 -0
  108. package/lib/graphql/query/collection.handler.js +9 -0
  109. package/lib/graphql/query/collection.handler.js.map +1 -0
  110. package/lib/graphql/query/collectionItems.handler.d.ts +3 -0
  111. package/lib/graphql/query/collectionItems.handler.js +7 -0
  112. package/lib/graphql/query/collectionItems.handler.js.map +1 -0
  113. package/lib/graphql/query/collections.handler.d.ts +3 -0
  114. package/lib/graphql/query/collections.handler.js +7 -0
  115. package/lib/graphql/query/collections.handler.js.map +1 -0
  116. package/lib/graphql/query/coupons.handler.d.ts +3 -0
  117. package/lib/graphql/query/coupons.handler.js +7 -0
  118. package/lib/graphql/query/coupons.handler.js.map +1 -0
  119. package/lib/graphql/query/customPage.hadler.d.ts +2 -0
  120. package/lib/graphql/query/customPage.hadler.js +7 -0
  121. package/lib/graphql/query/customPage.hadler.js.map +1 -0
  122. package/lib/graphql/query/faqsByCategory.handler.d.ts +3 -0
  123. package/lib/graphql/query/faqsByCategory.handler.js +7 -0
  124. package/lib/graphql/query/faqsByCategory.handler.js.map +1 -0
  125. package/lib/graphql/query/followedListing.handler.d.ts +3 -0
  126. package/lib/graphql/query/followedListing.handler.js +7 -0
  127. package/lib/graphql/query/followedListing.handler.js.map +1 -0
  128. package/lib/graphql/query/followerCount.handler.d.ts +3 -0
  129. package/lib/graphql/query/followerCount.handler.js +7 -0
  130. package/lib/graphql/query/followerCount.handler.js.map +1 -0
  131. package/lib/graphql/query/index.d.ts +2 -0
  132. package/lib/graphql/query/index.js +83 -0
  133. package/lib/graphql/query/index.js.map +1 -0
  134. package/lib/graphql/query/localityHandler.d.ts +3 -0
  135. package/lib/graphql/query/localityHandler.js +7 -0
  136. package/lib/graphql/query/localityHandler.js.map +1 -0
  137. package/lib/graphql/query/order.handler.d.ts +3 -0
  138. package/lib/graphql/query/order.handler.js +5 -0
  139. package/lib/graphql/query/order.handler.js.map +1 -0
  140. package/lib/graphql/query/page.handler.d.ts +3 -0
  141. package/lib/graphql/query/page.handler.js +3 -0
  142. package/lib/graphql/query/page.handler.js.map +1 -0
  143. package/lib/graphql/query/paymentModeRoutes.handler.d.ts +3 -0
  144. package/lib/graphql/query/paymentModeRoutes.handler.js +8 -0
  145. package/lib/graphql/query/paymentModeRoutes.handler.js.map +1 -0
  146. package/lib/graphql/query/pincodeDetails.handler.d.ts +2 -0
  147. package/lib/graphql/query/pincodeDetails.handler.js +7 -0
  148. package/lib/graphql/query/pincodeDetails.handler.js.map +1 -0
  149. package/lib/graphql/query/platformConfig.handler.d.ts +3 -0
  150. package/lib/graphql/query/platformConfig.handler.js +7 -0
  151. package/lib/graphql/query/platformConfig.handler.js.map +1 -0
  152. package/lib/graphql/query/product.handler.d.ts +3 -0
  153. package/lib/graphql/query/product.handler.js +12 -0
  154. package/lib/graphql/query/product.handler.js.map +1 -0
  155. package/lib/graphql/query/productLadderPromotion.handler.d.ts +3 -0
  156. package/lib/graphql/query/productLadderPromotion.handler.js +7 -0
  157. package/lib/graphql/query/productLadderPromotion.handler.js.map +1 -0
  158. package/lib/graphql/query/productPrice.handler.d.ts +3 -0
  159. package/lib/graphql/query/productPrice.handler.js +5 -0
  160. package/lib/graphql/query/productPrice.handler.js.map +1 -0
  161. package/lib/graphql/query/productSellers.handler.d.ts +3 -0
  162. package/lib/graphql/query/productSellers.handler.js +7 -0
  163. package/lib/graphql/query/productSellers.handler.js.map +1 -0
  164. package/lib/graphql/query/products.handler.d.ts +3 -0
  165. package/lib/graphql/query/products.handler.js +9 -0
  166. package/lib/graphql/query/products.handler.js.map +1 -0
  167. package/lib/graphql/query/promotionOffers.handler.d.ts +3 -0
  168. package/lib/graphql/query/promotionOffers.handler.js +7 -0
  169. package/lib/graphql/query/promotionOffers.handler.js.map +1 -0
  170. package/lib/graphql/query/store.handler.d.ts +3 -0
  171. package/lib/graphql/query/store.handler.js +7 -0
  172. package/lib/graphql/query/store.handler.js.map +1 -0
  173. package/lib/graphql/query/theme.handler.d.ts +3 -0
  174. package/lib/graphql/query/theme.handler.js +13 -0
  175. package/lib/graphql/query/theme.handler.js.map +1 -0
  176. package/lib/graphql/query/user.handler.d.ts +3 -0
  177. package/lib/graphql/query/user.handler.js +12 -0
  178. package/lib/graphql/query/user.handler.js.map +1 -0
  179. package/lib/helpers/FPI-events.d.ts +34 -0
  180. package/lib/helpers/FPI-events.js +590 -0
  181. package/lib/helpers/FPI-events.js.map +1 -0
  182. package/lib/helpers/utils.d.ts +7 -0
  183. package/lib/helpers/utils.js +101 -0
  184. package/lib/helpers/utils.js.map +1 -0
  185. package/lib/index.d.ts +7 -0
  186. package/lib/index.js +13 -0
  187. package/lib/index.js.map +1 -0
  188. package/lib/store/enums/keys.d.ts +35 -0
  189. package/lib/store/enums/keys.js +38 -0
  190. package/lib/store/enums/keys.js.map +1 -0
  191. package/lib/store/index.d.ts +24 -0
  192. package/lib/store/index.js +244 -0
  193. package/lib/store/index.js.map +1 -0
  194. package/lib/store/modules/custom.d.ts +8 -0
  195. package/lib/store/modules/custom.js +11 -0
  196. package/lib/store/modules/custom.js.map +1 -0
  197. package/lib/store/modules/payment.d.ts +6 -0
  198. package/lib/store/modules/payment.js +10 -0
  199. package/lib/store/modules/payment.js.map +1 -0
  200. package/lib/store/modules/theme.d.ts +17 -0
  201. package/lib/store/modules/theme.js +30 -0
  202. package/lib/store/modules/theme.js.map +1 -0
  203. package/lib/store/slices/address.d.ts +4 -0
  204. package/lib/store/slices/address.js +24 -0
  205. package/lib/store/slices/address.js.map +1 -0
  206. package/lib/store/slices/auth.d.ts +4 -0
  207. package/lib/store/slices/auth.js +25 -0
  208. package/lib/store/slices/auth.js.map +1 -0
  209. package/lib/store/slices/brands.d.ts +4 -0
  210. package/lib/store/slices/brands.js +18 -0
  211. package/lib/store/slices/brands.js.map +1 -0
  212. package/lib/store/slices/cart.d.ts +4 -0
  213. package/lib/store/slices/cart.js +62 -0
  214. package/lib/store/slices/cart.js.map +1 -0
  215. package/lib/store/slices/categories.d.ts +4 -0
  216. package/lib/store/slices/categories.js +17 -0
  217. package/lib/store/slices/categories.js.map +1 -0
  218. package/lib/store/slices/collection.d.ts +4 -0
  219. package/lib/store/slices/collection.js +25 -0
  220. package/lib/store/slices/collection.js.map +1 -0
  221. package/lib/store/slices/configuration.d.ts +4 -0
  222. package/lib/store/slices/configuration.js +45 -0
  223. package/lib/store/slices/configuration.js.map +1 -0
  224. package/lib/store/slices/content.d.ts +4 -0
  225. package/lib/store/slices/content.js +75 -0
  226. package/lib/store/slices/content.js.map +1 -0
  227. package/lib/store/slices/custom.d.ts +3 -0
  228. package/lib/store/slices/custom.js +17 -0
  229. package/lib/store/slices/custom.js.map +1 -0
  230. package/lib/store/slices/logistic.d.ts +4 -0
  231. package/lib/store/slices/logistic.js +81 -0
  232. package/lib/store/slices/logistic.js.map +1 -0
  233. package/lib/store/slices/order.d.ts +1 -0
  234. package/lib/store/slices/order.js +11 -0
  235. package/lib/store/slices/order.js.map +1 -0
  236. package/lib/store/slices/payment.d.ts +23 -0
  237. package/lib/store/slices/payment.js +57 -0
  238. package/lib/store/slices/payment.js.map +1 -0
  239. package/lib/store/slices/product.d.ts +4 -0
  240. package/lib/store/slices/product.js +70 -0
  241. package/lib/store/slices/product.js.map +1 -0
  242. package/lib/store/slices/products.d.ts +4 -0
  243. package/lib/store/slices/products.js +27 -0
  244. package/lib/store/slices/products.js.map +1 -0
  245. package/lib/store/slices/share.d.ts +1 -0
  246. package/lib/store/slices/share.js +11 -0
  247. package/lib/store/slices/share.js.map +1 -0
  248. package/lib/store/slices/theme.d.ts +25 -0
  249. package/lib/store/slices/theme.js +84 -0
  250. package/lib/store/slices/theme.js.map +1 -0
  251. package/lib/store/store.d.ts +64 -0
  252. package/lib/store/store.js +44 -0
  253. package/lib/store/store.js.map +1 -0
  254. package/lib/store/utils/gateways/ajiodhan.d.ts +8 -0
  255. package/lib/store/utils/gateways/ajiodhan.js +27 -0
  256. package/lib/store/utils/gateways/ajiodhan.js.map +1 -0
  257. package/lib/store/utils/gateways/ccavenue.d.ts +13 -0
  258. package/lib/store/utils/gateways/ccavenue.js +19 -0
  259. package/lib/store/utils/gateways/ccavenue.js.map +1 -0
  260. package/lib/store/utils/gateways/epaylater.d.ts +14 -0
  261. package/lib/store/utils/gateways/epaylater.js +28 -0
  262. package/lib/store/utils/gateways/epaylater.js.map +1 -0
  263. package/lib/store/utils/gateways/helper.d.ts +1 -0
  264. package/lib/store/utils/gateways/helper.js +17 -0
  265. package/lib/store/utils/gateways/helper.js.map +1 -0
  266. package/lib/store/utils/gateways/index.d.ts +1 -0
  267. package/lib/store/utils/gateways/index.js +27 -0
  268. package/lib/store/utils/gateways/index.js.map +1 -0
  269. package/lib/store/utils/gateways/jio.d.ts +12 -0
  270. package/lib/store/utils/gateways/jio.js +24 -0
  271. package/lib/store/utils/gateways/jio.js.map +1 -0
  272. package/lib/store/utils/gateways/jiopay.d.ts +21 -0
  273. package/lib/store/utils/gateways/jiopay.js +30 -0
  274. package/lib/store/utils/gateways/jiopay.js.map +1 -0
  275. package/lib/store/utils/gateways/juspay.d.ts +34 -0
  276. package/lib/store/utils/gateways/juspay.js +63 -0
  277. package/lib/store/utils/gateways/juspay.js.map +1 -0
  278. package/lib/store/utils/gateways/payumoney.d.ts +8 -0
  279. package/lib/store/utils/gateways/payumoney.js +17 -0
  280. package/lib/store/utils/gateways/payumoney.js.map +1 -0
  281. package/lib/store/utils/gateways/potlee.d.ts +63 -0
  282. package/lib/store/utils/gateways/potlee.js +315 -0
  283. package/lib/store/utils/gateways/potlee.js.map +1 -0
  284. package/lib/store/utils/gateways/razorpay.d.ts +46 -0
  285. package/lib/store/utils/gateways/razorpay.js +70 -0
  286. package/lib/store/utils/gateways/razorpay.js.map +1 -0
  287. package/lib/store/utils/gateways/rupifi.d.ts +17 -0
  288. package/lib/store/utils/gateways/rupifi.js +63 -0
  289. package/lib/store/utils/gateways/rupifi.js.map +1 -0
  290. package/lib/store/utils/gateways/simply.d.ts +43 -0
  291. package/lib/store/utils/gateways/simply.js +222 -0
  292. package/lib/store/utils/gateways/simply.js.map +1 -0
  293. package/lib/store/utils/gateways/standard_extension.d.ts +13 -0
  294. package/lib/store/utils/gateways/standard_extension.js +22 -0
  295. package/lib/store/utils/gateways/standard_extension.js.map +1 -0
  296. package/lib/store/utils/helper.d.ts +1 -0
  297. package/lib/store/utils/helper.js +17 -0
  298. package/lib/store/utils/helper.js.map +1 -0
  299. package/lib/store/utils/payment.d.ts +4 -0
  300. package/lib/store/utils/payment.js +496 -0
  301. package/lib/store/utils/payment.js.map +1 -0
  302. package/lib/store/utils/util.d.ts +14 -0
  303. package/lib/store/utils/util.js +67 -0
  304. package/lib/store/utils/util.js.map +1 -0
  305. package/lib/types/address.d.ts +7 -0
  306. package/lib/types/address.js +2 -0
  307. package/lib/types/address.js.map +1 -0
  308. package/lib/types/auth.d.ts +69 -0
  309. package/lib/types/auth.js +2 -0
  310. package/lib/types/auth.js.map +1 -0
  311. package/lib/types/brands.d.ts +6 -0
  312. package/lib/types/brands.js +2 -0
  313. package/lib/types/brands.js.map +1 -0
  314. package/lib/types/cart.d.ts +39 -0
  315. package/lib/types/cart.js +2 -0
  316. package/lib/types/cart.js.map +1 -0
  317. package/lib/types/categories.d.ts +5 -0
  318. package/lib/types/categories.js +2 -0
  319. package/lib/types/categories.js.map +1 -0
  320. package/lib/types/collection.d.ts +10 -0
  321. package/lib/types/collection.js +2 -0
  322. package/lib/types/collection.js.map +1 -0
  323. package/lib/types/configuration.d.ts +19 -0
  324. package/lib/types/configuration.js +2 -0
  325. package/lib/types/configuration.js.map +1 -0
  326. package/lib/types/content.d.ts +35 -0
  327. package/lib/types/content.js +2 -0
  328. package/lib/types/content.js.map +1 -0
  329. package/lib/types/custom.d.ts +12 -0
  330. package/lib/types/custom.js +2 -0
  331. package/lib/types/custom.js.map +1 -0
  332. package/lib/types/graphql.d.ts +11471 -0
  333. package/lib/types/graphql.js +198 -0
  334. package/lib/types/graphql.js.map +1 -0
  335. package/lib/types/index.d.ts +56 -0
  336. package/lib/types/index.js +2 -0
  337. package/lib/types/index.js.map +1 -0
  338. package/lib/types/logistic.d.ts +9 -0
  339. package/lib/types/logistic.js +2 -0
  340. package/lib/types/logistic.js.map +1 -0
  341. package/lib/types/product.d.ts +29 -0
  342. package/lib/types/product.js +2 -0
  343. package/lib/types/product.js.map +1 -0
  344. package/lib/types/products.d.ts +29 -0
  345. package/lib/types/products.js +2 -0
  346. package/lib/types/products.js.map +1 -0
  347. package/lib/types/theme.d.ts +26 -0
  348. package/lib/types/theme.js +2 -0
  349. package/lib/types/theme.js.map +1 -0
  350. package/package.json +45 -0
  351. package/schema.json +58765 -0
  352. package/webpack.config.js +23 -0
@@ -0,0 +1,4 @@
1
+ import { AuthSlice } from "../../types/auth";
2
+ import { AuthSuccess, LoginSuccess, PlatformConfig, ProfileEditSuccess, SendOtpResponse, UserDetail, VerifyOtpSuccess } from "../../types/graphql";
3
+ export declare const authReducer: import("redux").Reducer<AuthSlice, import("redux").AnyAction>;
4
+ export declare const setUserData: import("@reduxjs/toolkit").ActionCreatorWithPayload<UserDetail | AuthSuccess | LoginSuccess | SendOtpResponse | ProfileEditSuccess | VerifyOtpSuccess, "auth/setUserData">, setplatformConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<PlatformConfig, "auth/setplatformConfig">;
@@ -0,0 +1,25 @@
1
+ import { createSlice } from "@reduxjs/toolkit";
2
+ import { STORE_KEYS } from "../enums/keys";
3
+ const initialState = {
4
+ logged_in: false,
5
+ platform_data: {},
6
+ user_data: {},
7
+ user_fetched: false,
8
+ };
9
+ const authSlice = createSlice({
10
+ name: STORE_KEYS.AUTH,
11
+ initialState,
12
+ reducers: {
13
+ setUserData(state, action) {
14
+ state.user_data = action.payload;
15
+ state.logged_in = true;
16
+ state.user_fetched = true;
17
+ },
18
+ setplatformConfig(state, action) {
19
+ state.platform_data = action.payload;
20
+ },
21
+ },
22
+ });
23
+ export const authReducer = authSlice.reducer;
24
+ export const { setUserData, setplatformConfig } = authSlice.actions;
25
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/store/slices/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAI/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,YAAY,GAAc;IAC9B,SAAS,EAAE,KAAK;IAChB,aAAa,EAAE,EAAE;IACjB,SAAS,EAAE,EAAE;IACb,YAAY,EAAE,KAAK;CACpB,CAAC;AAEF,MAAM,SAAS,GAAG,WAAW,CAAC;IAC5B,IAAI,EAAE,UAAU,CAAC,IAAI;IACrB,YAAY;IACZ,QAAQ,EAAE;QACR,WAAW,CAAC,KAAK,EAAE,MAAuH;YACxI,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC;YACjC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;YACvB,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;QAC5B,CAAC;QACD,iBAAiB,CAAC,KAAK,EAAE,MAAoC;YAC1D,KAAK,CAAC,aAAa,GAAG,MAAM,CAAC,OAAO,CAAA;QACvC,CAAC;KACF;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,SAAS,CAAC,OAAO,CAAC;AAC7C,MAAM,CAAC,MAAM,EAAE,WAAW,EAAC,iBAAiB,EAAE,GAAG,SAAS,CAAC,OAAO,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { BrandsSlice } from "../../types/brands";
2
+ import { BrandConnection } from "../../types/graphql";
3
+ export declare const brandsReducer: import("redux").Reducer<BrandsSlice, import("redux").AnyAction>;
4
+ export declare const setBrands: import("@reduxjs/toolkit").ActionCreatorWithPayload<BrandConnection, "brands/setBrands">;
@@ -0,0 +1,18 @@
1
+ import { createSlice, } from "@reduxjs/toolkit";
2
+ import { STORE_KEYS } from "../enums/keys";
3
+ const initialState = {
4
+ brands: {},
5
+ brand: {}
6
+ };
7
+ const brandsSlice = createSlice({
8
+ name: STORE_KEYS.BRANDS,
9
+ initialState,
10
+ reducers: {
11
+ setBrands(state, action) {
12
+ state.brands = action.payload;
13
+ },
14
+ },
15
+ });
16
+ export const brandsReducer = brandsSlice.reducer;
17
+ export const { setBrands } = brandsSlice.actions;
18
+ //# sourceMappingURL=brands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"brands.js","sourceRoot":"","sources":["../../../src/store/slices/brands.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,MAAM,YAAY,GAAgB;IAChC,MAAM,EAAE,EAAE;IACV,KAAK,EAAC,EAAE;CACT,CAAC;AAEF,MAAM,WAAW,GAAG,WAAW,CAAC;IAC9B,IAAI,EAAE,UAAU,CAAC,MAAM;IACvB,YAAY;IACZ,QAAQ,EAAE;QACR,SAAS,CAAC,KAAK,EAAE,MAAqC;YACpD,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC;QAChC,CAAC;KACF;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC,OAAO,CAAC;AACjD,MAAM,CAAC,MAAM,EAAC,SAAS,EAAC,GAAG,WAAW,CAAC,OAAO,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { CartSlice } from "../../types/cart";
2
+ import { AddCartDetailResponse, Cart, CartDetailResponse, CartMetaResponse, CartShipmentsResponse, Coupons, GetShareCartLinkResponse, ProductLadderPromotion, PromotionOffer } from "../../types/graphql";
3
+ export declare const cartReducer: import("redux").Reducer<CartSlice, import("redux").AnyAction>;
4
+ export declare const setCart: import("@reduxjs/toolkit").ActionCreatorWithPayload<Cart, "cart/setCart">, setaddItemsToCart: import("@reduxjs/toolkit").ActionCreatorWithPayload<AddCartDetailResponse, "cart/setaddItemsToCart">, setUpdateCartMeta: import("@reduxjs/toolkit").ActionCreatorWithPayload<CartMetaResponse, "cart/setUpdateCartMeta">, setrewardPoints: import("@reduxjs/toolkit").ActionCreatorWithPayload<CartDetailResponse, "cart/setrewardPoints">, setapplyCoupon: import("@reduxjs/toolkit").ActionCreatorWithPayload<CartDetailResponse, "cart/setapplyCoupon">, setremoveCoupon: import("@reduxjs/toolkit").ActionCreatorWithPayload<CartDetailResponse, "cart/setremoveCoupon">, setCartShipmentDetails: import("@reduxjs/toolkit").ActionCreatorWithPayload<CartShipmentsResponse, "cart/setCartShipmentDetails">, setgetCartShareLink: import("@reduxjs/toolkit").ActionCreatorWithPayload<GetShareCartLinkResponse, "cart/setgetCartShareLink">, setUpdateCart: import("@reduxjs/toolkit").ActionCreatorWithPayload<CartDetailResponse, "cart/setUpdateCart">, setproductLadderPromotion: import("@reduxjs/toolkit").ActionCreatorWithPayload<ProductLadderPromotion, "cart/setproductLadderPromotion">, setpromotionOffers: import("@reduxjs/toolkit").ActionCreatorWithPayload<PromotionOffer, "cart/setpromotionOffers">, setcoupons: import("@reduxjs/toolkit").ActionCreatorWithPayload<Coupons, "cart/setcoupons">;
@@ -0,0 +1,62 @@
1
+ import { createSlice, } from "@reduxjs/toolkit";
2
+ import { cartItemsCount } from "../../helpers/utils";
3
+ import { STORE_KEYS } from "../enums/keys";
4
+ const initialState = {
5
+ cart_items: {},
6
+ buy_now_cart_items: {},
7
+ checkout_mode: {
8
+ mode: "self",
9
+ },
10
+ cart_items_count: {},
11
+ shipments: {},
12
+ ladder_offers: {},
13
+ promotion_offers: {},
14
+ coupons: {},
15
+ cart_share_link: {},
16
+ };
17
+ const cartSlice = createSlice({
18
+ name: STORE_KEYS.CART,
19
+ initialState,
20
+ reducers: {
21
+ setCart(state, action) {
22
+ state.cart_items = action.payload;
23
+ },
24
+ setCartShipmentDetails(state, action) {
25
+ state.shipments = action.payload;
26
+ },
27
+ setUpdateCart(state, action) {
28
+ state.cart_items = action.payload;
29
+ },
30
+ setproductLadderPromotion(state, action) {
31
+ state.ladder_offers = action.payload;
32
+ },
33
+ setpromotionOffers(state, action) {
34
+ state.promotion_offers = action.payload;
35
+ },
36
+ setcoupons(state, action) {
37
+ state.coupons = action.payload;
38
+ },
39
+ setgetCartShareLink(state, action) {
40
+ state.cart_share_link = action.payload;
41
+ },
42
+ setUpdateCartMeta(state, action) {
43
+ state.checkout_mode = action.payload;
44
+ },
45
+ setaddItemsToCart(state, action) {
46
+ state.buy_now_cart_items = action.payload || {};
47
+ state.cart_items_count.user_cart_items_count = cartItemsCount(action.payload || {});
48
+ },
49
+ setapplyCoupon(state, action) {
50
+ state.cart_items = action.payload;
51
+ },
52
+ setremoveCoupon(state, action) {
53
+ state.cart_items = action.payload;
54
+ },
55
+ setrewardPoints(state, action) {
56
+ state.cart_items = action.payload;
57
+ }
58
+ }
59
+ });
60
+ export const cartReducer = cartSlice.reducer;
61
+ export const { setCart, setaddItemsToCart, setUpdateCartMeta, setrewardPoints, setapplyCoupon, setremoveCoupon, setCartShipmentDetails, setgetCartShareLink, setUpdateCart, setproductLadderPromotion, setpromotionOffers, setcoupons } = cartSlice.actions;
62
+ //# sourceMappingURL=cart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cart.js","sourceRoot":"","sources":["../../../src/store/slices/cart.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAKrD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,MAAM,YAAY,GAAc;IAC9B,UAAU,EAAE,EAAE;IACd,kBAAkB,EAAE,EAAE;IACtB,aAAa,EAAE;QACb,IAAI,EAAE,MAAM;KACb;IACD,gBAAgB,EAAE,EAAE;IACpB,SAAS,EAAE,EAAE;IACb,aAAa,EAAE,EAAE;IACjB,gBAAgB,EAAE,EAAE;IACpB,OAAO,EAAE,EAAE;IACX,eAAe,EAAE,EAAE;CACpB,CAAC;AAGF,MAAM,SAAS,GAAG,WAAW,CAAC;IAC5B,IAAI,EAAE,UAAU,CAAC,IAAI;IACrB,YAAY;IACZ,QAAQ,EAAE;QACR,OAAO,CAAC,KAAK,EAAE,MAA0B;YACvC,KAAK,CAAC,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC;QACpC,CAAC;QACD,sBAAsB,CAAC,KAAK,EAAE,MAA2C;YACvE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC;QACnC,CAAC;QACD,aAAa,CAAC,KAAK,EAAE,MAAwC;YAC3D,KAAK,CAAC,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC;QACpC,CAAC;QACD,yBAAyB,CAAC,KAAK,EAAE,MAA4C;YAC3E,KAAK,CAAC,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC;QACvC,CAAC;QACD,kBAAkB,CAAC,KAAK,EAAE,MAAoC;YAC5D,KAAK,CA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{ CategoriesSlice } from "../../types/categories";
2
+ import { Categories } from "../../types/graphql";
3
+ export declare const categoriesReducer: import("redux").Reducer<CategoriesSlice, import("redux").AnyAction>;
4
+ export declare const setCategories: import("@reduxjs/toolkit").ActionCreatorWithPayload<Categories, "categories/setCategories">;
@@ -0,0 +1,17 @@
1
+ import { createSlice } from "@reduxjs/toolkit";
2
+ import { STORE_KEYS } from "../enums/keys";
3
+ const initialState = {
4
+ categories: {},
5
+ };
6
+ const categoriesSlice = createSlice({
7
+ name: STORE_KEYS.CATEGORIES,
8
+ initialState,
9
+ reducers: {
10
+ setCategories(state, action) {
11
+ state.categories = action.payload;
12
+ },
13
+ }
14
+ });
15
+ export const categoriesReducer = categoriesSlice.reducer;
16
+ export const { setCategories } = categoriesSlice.actions;
17
+ //# sourceMappingURL=categories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"categories.js","sourceRoot":"","sources":["../../../src/store/slices/categories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAGjE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,MAAM,YAAY,GAAoB;IACpC,UAAU,EAAE,EAAE;CACf,CAAC;AAGF,MAAM,eAAe,GAAG,WAAW,CAAC;IAClC,IAAI,EAAE,UAAU,CAAC,UAAU;IAC3B,YAAY;IACZ,QAAQ,EAAE;QACR,aAAa,CAAC,KAAK,EAAE,MAAgC;YACnD,KAAK,CAAC,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC;QACpC,CAAC;KACF;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC,OAAO,CAAC;AACzD,MAAM,CAAC,MAAM,EAAC,aAAa,EAAC,GAAG,eAAe,CAAC,OAAO,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { CollectionsSlice } from "../../types/collection";
2
+ import { Collection, CollectionConnection, CollectionItems } from "../../types/graphql";
3
+ export declare const collectionReducer: import("redux").Reducer<CollectionsSlice, import("redux").AnyAction>;
4
+ export declare const setcollection: import("@reduxjs/toolkit").ActionCreatorWithPayload<Collection, "collection/setcollection">, setcollectionItems: import("@reduxjs/toolkit").ActionCreatorWithPayload<CollectionItems, "collection/setcollectionItems">, setcollections: import("@reduxjs/toolkit").ActionCreatorWithPayload<CollectionConnection, "collection/setcollections">;
@@ -0,0 +1,25 @@
1
+ import { createSlice } from "@reduxjs/toolkit";
2
+ import { STORE_KEYS } from "../enums/keys";
3
+ const initialState = {
4
+ collection: {},
5
+ item: {},
6
+ collections: {},
7
+ };
8
+ const collectionSlice = createSlice({
9
+ name: STORE_KEYS.COLLECTION,
10
+ initialState,
11
+ reducers: {
12
+ setcollection(state, action) {
13
+ state.collection = action.payload;
14
+ },
15
+ setcollectionItems(state, action) {
16
+ state.item = action.payload;
17
+ },
18
+ setcollections(state, action) {
19
+ state.collections = action.payload;
20
+ },
21
+ }
22
+ });
23
+ export const collectionReducer = collectionSlice.reducer;
24
+ export const { setcollection, setcollectionItems, setcollections } = collectionSlice.actions;
25
+ //# sourceMappingURL=collection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collection.js","sourceRoot":"","sources":["../../../src/store/slices/collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAQjE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,YAAY,GAAqB;IACrC,UAAU,EAAE,EAAE;IACd,IAAI,EAAE,EAAE;IACR,WAAW,EAAE,EAAE;CAChB,CAAC;AAEF,MAAM,eAAe,GAAG,WAAW,CAAC;IAClC,IAAI,EAAE,UAAU,CAAC,UAAU;IAC3B,YAAY;IACZ,QAAQ,EAAE;QACR,aAAa,CAAC,KAAK,EAAE,MAAgC;YACnD,KAAK,CAAC,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC;QACpC,CAAC;QACD,kBAAkB,CAAC,KAAK,EAAE,MAAqC;YAC7D,KAAK,CAAC,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;QAC9B,CAAC;QACD,cAAc,CAAC,KAAK,EAAE,MAA0C;YAC9D,KAAK,CAAC,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC;QACrC,CAAC;KACF;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC,OAAO,CAAC;AACzD,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAChE,eAAe,CAAC,OAAO,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { ConfigurationSlice } from "../../types/configuration";
2
+ import { AppDetails, AppFeature, AppIntegrationTokens, ContactInfo, CurrencyFeature, DeploymentStoreSelectionFeature, Store } from "../../types/graphql";
3
+ export declare const configurationReducer: import("redux").Reducer<ConfigurationSlice, import("redux").AnyAction>;
4
+ export declare const setappDetails: import("@reduxjs/toolkit").ActionCreatorWithPayload<AppDetails, "configuration/setappDetails">, setContactInfo: import("@reduxjs/toolkit").ActionCreatorWithPayload<ContactInfo, "configuration/setContactInfo">, setstore: import("@reduxjs/toolkit").ActionCreatorWithPayload<Store, "configuration/setstore">, setFeatures: import("@reduxjs/toolkit").ActionCreatorWithPayload<AppFeature, "configuration/setFeatures">, setapplicationStaff: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "configuration/setapplicationStaff">, setintegrationTokens: import("@reduxjs/toolkit").ActionCreatorWithPayload<AppIntegrationTokens, "configuration/setintegrationTokens">, setdeploymentStore: import("@reduxjs/toolkit").ActionCreatorWithPayload<DeploymentStoreSelectionFeature, "configuration/setdeploymentStore">, setcurrency: import("@reduxjs/toolkit").ActionCreatorWithPayload<CurrencyFeature, "configuration/setcurrency">;
@@ -0,0 +1,45 @@
1
+ import { createSlice } from "@reduxjs/toolkit";
2
+ import { STORE_KEYS } from "../enums/keys";
3
+ const initialState = {
4
+ application: {},
5
+ contact_info: {},
6
+ app_features: {},
7
+ integration_tokens: {},
8
+ deployment_stores: {},
9
+ staff: {},
10
+ store_details: {},
11
+ currencies: {},
12
+ };
13
+ const configurationSlice = createSlice({
14
+ name: STORE_KEYS.CONFIGURATION,
15
+ initialState,
16
+ reducers: {
17
+ setappDetails(state, action) {
18
+ state.application = action.payload;
19
+ },
20
+ setContactInfo(state, action) {
21
+ state.contact_info = Object.assign(Object.assign({}, action.payload), { error: null, loading: false });
22
+ },
23
+ setFeatures(state, action) {
24
+ state.app_features = Object.assign(Object.assign({}, action.payload), { error: null, loading: false });
25
+ },
26
+ setintegrationTokens(state, action) {
27
+ state.integration_tokens = Object.assign(Object.assign({}, action.payload), { error: null, loading: false });
28
+ },
29
+ setdeploymentStore(state, action) {
30
+ state.deployment_stores = Object.assign(Object.assign({}, action.payload), { error: null, loading: false });
31
+ },
32
+ setcurrency(state, action) {
33
+ state.currencies = Object.assign(Object.assign({}, action.payload), { error: null, loading: false });
34
+ },
35
+ setstore(state, action) {
36
+ state.store_details = Object.assign(Object.assign({}, action.payload), { error: null, loading: false });
37
+ },
38
+ setapplicationStaff(state, action) {
39
+ state.staff = Object.assign(Object.assign({}, action.payload), { error: null, loading: false });
40
+ }
41
+ },
42
+ });
43
+ export const configurationReducer = configurationSlice.reducer;
44
+ export const { setappDetails, setContactInfo, setstore, setFeatures, setapplicationStaff, setintegrationTokens, setdeploymentStore, setcurrency } = configurationSlice.actions;
45
+ //# sourceMappingURL=configuration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../src/store/slices/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAIjE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,YAAY,GAAuB;IACvC,WAAW,EAAE,EAAE;IACf,YAAY,EAAE,EAAE;IAChB,YAAY,EAAE,EAAE;IAChB,kBAAkB,EAAE,EAAE;IACtB,iBAAiB,EAAE,E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AC;QACJ,CAAC;QACD,mBAAmB,CAAC,KAAK,EAAE,MAAyB;YAClD,KAAK,CAAC,KAAK,mCACN,MAAM,CAAC,OAAO,KACjB,KAAK,EAAG,IAAI,EACZ,OAAO,EAAG,KAAK,GAChB,CAAC;QACJ,CAAC;KACJ;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,kBAAkB,CAAC,OAAO,CAAC;AAC/D,MAAM,CAAC,MAAM,EAAE,aAAa,EAAC,cAAc,EAAE,QAAQ,EAAC,WAAW,EAAE,mBAAmB,EAAE,oBAAoB,EAAC,kBAAkB,EAAC,WAAW,EAAE,GAAG,kBAAkB,CAAC,OAAO,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { ContentSlice } from "../../types/content";
2
+ import { Announcements, Blog, Blogs, DataLoaders, FaqCategories, FaQs, LandingPage, LeagalInformation, Maybe, Navigations, SeoSchema } from "../../types/graphql";
3
+ export declare const contentReducer: import("redux").Reducer<ContentSlice, import("redux").AnyAction>;
4
+ export declare const setnavigations: import("@reduxjs/toolkit").ActionCreatorWithPayload<Navigations, "content/setnavigations">, setseoConfiguration: import("@reduxjs/toolkit").ActionCreatorWithPayload<Maybe<SeoSchema>, "content/setseoConfiguration">, setblogs: import("@reduxjs/toolkit").ActionCreatorWithPayload<Blogs, "content/setblogs">, settags: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "content/settags">, setsupportInformation: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "content/setsupportInformation">, setlandingPage: import("@reduxjs/toolkit").ActionCreatorWithPayload<LandingPage, "content/setlandingPage">, setannouncements: import("@reduxjs/toolkit").ActionCreatorWithPayload<Announcements, "content/setannouncements">, setcustomPage: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "content/setcustomPage">, setblog: import("@reduxjs/toolkit").ActionCreatorWithPayload<Blog, "content/setblog">, setdataLoaders: import("@reduxjs/toolkit").ActionCreatorWithPayload<DataLoaders, "content/setdataLoaders">, setfaqCategories: import("@reduxjs/toolkit").ActionCreatorWithPayload<FaqCategories, "content/setfaqCategories">, setfaqs: import("@reduxjs/toolkit").ActionCreatorWithPayload<FaQs, "content/setfaqs">, setfaqsByCategory: import("@reduxjs/toolkit").ActionCreatorWithPayload<FaQs, "content/setfaqsByCategory">, setlegalInformation: import("@reduxjs/toolkit").ActionCreatorWithPayload<LeagalInformation, "content/setlegalInformation">;
@@ -0,0 +1,75 @@
1
+ import { createSlice, } from "@reduxjs/toolkit";
2
+ import { STORE_KEYS } from "../enums/keys";
3
+ const initialState = {
4
+ navigation: {},
5
+ seo: {},
6
+ blog: {},
7
+ blogs: {},
8
+ custom_page: {},
9
+ faq_data: {},
10
+ faqs: {},
11
+ faqCategory: {},
12
+ faqCategories: {},
13
+ tags: {},
14
+ legal_data: {},
15
+ screen_saver: {},
16
+ support_information: {},
17
+ announcement: {},
18
+ landing_page: {},
19
+ data_loaders: {},
20
+ };
21
+ const contentSlice = createSlice({
22
+ name: STORE_KEYS.CONTENT,
23
+ initialState,
24
+ reducers: {
25
+ setnavigations(state, action) {
26
+ state.navigation = Object.assign(Object.assign({}, action.payload), { error: null, loading: false });
27
+ },
28
+ setseoConfiguration(state, action) {
29
+ state.seo = {
30
+ seo: action.payload,
31
+ error: null,
32
+ loading: false,
33
+ };
34
+ },
35
+ setblogs(state, action) {
36
+ state.blogs = Object.assign(Object.assign({}, action.payload), { error: null, loading: false });
37
+ },
38
+ setfaqCategories(state, action) {
39
+ state.faqCategories = action.payload;
40
+ },
41
+ setfaqs(state, action) {
42
+ state.faqs = action.payload;
43
+ },
44
+ setblog(state, action) {
45
+ state.blogs = Object.assign(Object.assign({}, action.payload), { error: null, loading: false });
46
+ },
47
+ settags(state, action) {
48
+ state.tags = Object.assign(Object.assign({}, action.payload), { error: null, loading: false });
49
+ },
50
+ setsupportInformation(state, action) {
51
+ state.support_information = Object.assign(Object.assign({}, action.payload), { error: null, loading: false });
52
+ },
53
+ setannouncements(state, action) {
54
+ state.support_information = Object.assign(Object.assign({}, action.payload), { error: null, loading: false });
55
+ },
56
+ setlandingPage(state, action) {
57
+ state.landing_page = Object.assign(Object.assign({}, action.payload), { error: null, loading: false });
58
+ },
59
+ setdataLoaders(state, action) {
60
+ state.data_loaders = Object.assign(Object.assign({}, action.payload), { error: null, loading: false });
61
+ },
62
+ setfaqsByCategory(state, action) {
63
+ state.faqs = Object.assign(Object.assign({}, action.payload), { error: null, loading: false });
64
+ },
65
+ setlegalInformation(state, action) {
66
+ state.legal_data = action.payload;
67
+ },
68
+ setcustomPage(state, action) {
69
+ state.custom_page = Object.assign(Object.assign({}, action.payload), { error: null, loading: false });
70
+ },
71
+ }
72
+ });
73
+ export const contentReducer = contentSlice.reducer;
74
+ export const { setnavigations, setseoConfiguration, setblogs, settags, setsupportInformation, setlandingPage, setannouncements, setcustomPage, setblog, setdataLoaders, setfaqCategories, setfaqs, setfaqsByCategory, setlegalInformation } = contentSlice.actions;
75
+ //# sourceMappingURL=content.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content.js","sourceRoot":"","sources":["../../../src/store/slices/content.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAuB1B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,MAAM,YAAY,GAAiB;IACjC,UAAU,EAAE,EAAE;IACd,GAAG,EAAE,EAAE;IACP,IAAI,EAAE,EAAE;IACR,KAAK,EAAE,EAAE;IACT,WAAW,EAAE,EAAE;IACf,QAAQ,EAAE,EAAE;IACZ,IAAI,EAAE,EAAE;IACR,WAAW,EAAE,EAAE;IACf,aAAa,EAAE,EAAE;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,EAAE;IACd,YAAY,EAAE,EAAE;IAChB,mBAAmB,EAAE,EAAE;IACvB,YAAY,EAAE,EAAE;IAChB,YAAY,EAAE,EAAE;IAChB,YAAY,EAAE,EAAE;CACjB,CAAC;AAGF,MAAM,YAAY,GAAG,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 @@
1
+ import { CustomPayload, CustomSlice } from "../../types/custom";
2
+ export declare const customReducer: import("redux").Reducer<CustomSlice, import("redux").AnyAction>;
3
+ export declare const setValue: import("@reduxjs/toolkit").ActionCreatorWithPayload<CustomPayload, "custom/setValue">;
@@ -0,0 +1,17 @@
1
+ import { createSlice } from "@reduxjs/toolkit";
2
+ import { STORE_KEYS } from "../enums/keys";
3
+ const initialState = {};
4
+ const customSlice = createSlice({
5
+ name: STORE_KEYS.CUSTOM,
6
+ initialState,
7
+ reducers: {
8
+ setValue(state, action) {
9
+ const { key, value } = action.payload;
10
+ state[key] = value;
11
+ },
12
+ },
13
+ extraReducers: (builder) => { },
14
+ });
15
+ export const customReducer = customSlice.reducer;
16
+ export const { setValue } = customSlice.actions;
17
+ //# sourceMappingURL=custom.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom.js","sourceRoot":"","sources":["../../../src/store/slices/custom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAI/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,YAAY,GAAgB,EAAE,CAAC;AAErC,MAAM,WAAW,GAAG,WAAW,CAAC;IAC9B,IAAI,EAAE,UAAU,CAAC,MAAM;IACvB,YAAY;IACZ,QAAQ,EAAE;QACR,QAAQ,CAAC,KAAK,EAAE,MAAmC;YACjD,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC;YACtC,KAAK,CAAC,GAAa,CAAC,GAAG,KAAK,CAAC;QAC/B,CAAC;KACF;IACD,aAAa,EAAE,CAAC,OAAO,EAAE,EAAE,GAAE,CAAC;CAC/B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC,OAAO,CAAC;AACjD,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,GAAG,WAAW,CAAC,OAAO,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { LogisticSlice } from "../../types/logistic";
2
+ import { CountryList } from "../../types/graphql";
3
+ export declare const logisticsReducer: import("redux").Reducer<LogisticSlice, import("redux").AnyAction>;
4
+ export declare const setallCountries: import("@reduxjs/toolkit").ActionCreatorWithPayload<CountryList, "logistic/setallCountries">, setpincodeDetails: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "logistic/setpincodeDetails">, setlocality: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "logistic/setlocality">;
@@ -0,0 +1,81 @@
1
+ import { createSlice } from "@reduxjs/toolkit";
2
+ import { getCookie, setCookie } from "../../helpers/utils";
3
+ import { STORE_KEYS, COOKIE_KEYS } from "../enums/keys";
4
+ const initialState = {
5
+ countries: {},
6
+ product_tat: {},
7
+ pincode_details: {},
8
+ };
9
+ const logisticSlice = createSlice({
10
+ name: STORE_KEYS.LOGISTIC,
11
+ initialState,
12
+ reducers: {
13
+ setallCountries(state, action) {
14
+ state.countries = action.payload;
15
+ },
16
+ setpincodeDetails(state, action) {
17
+ var _a, _b, _c;
18
+ if (action.payload.success) {
19
+ const locationObj = (_b = (_a = action.payload.data) === null || _a === void 0 ? void 0 : _a.reduce) === null || _b === void 0 ? void 0 : _b.call(_a, (acc, curr) => {
20
+ acc[curr.sub_type] = curr.name;
21
+ return acc;
22
+ }, {});
23
+ const locationData = {
24
+ country: (locationObj === null || locationObj === void 0 ? void 0 : locationObj.country) || "India",
25
+ city: locationObj === null || locationObj === void 0 ? void 0 : locationObj.city,
26
+ pincode: `${(_c = action.payload) === null || _c === void 0 ? void 0 : _c.pincode}`, // to be discuss
27
+ };
28
+ setCookie(COOKIE_KEYS.LOCATION_DATA, locationData, 1);
29
+ }
30
+ state.pincode_details = action.payload;
31
+ },
32
+ setlocality(state, action) {
33
+ var _a, _b, _c;
34
+ let locationObj;
35
+ let loactionDataCookie = getCookie(COOKIE_KEYS.LOCATION_DATA);
36
+ if (typeof loactionDataCookie === "string") {
37
+ try {
38
+ loactionDataCookie = JSON.parse(loactionDataCookie);
39
+ }
40
+ catch (e) {
41
+ loactionDataCookie = {};
42
+ }
43
+ }
44
+ let cities = (_a = action.payload) === null || _a === void 0 ? void 0 : _a.localities;
45
+ if (Array.isArray(cities) && cities.length > 0) {
46
+ locationObj = cities.reduce((result, it) => {
47
+ if (it.type === "state") {
48
+ if (it.meta && it.meta.state_code) {
49
+ result["state_code"] = it.meta.state_code;
50
+ }
51
+ result[it.type] = it.display_name;
52
+ }
53
+ else {
54
+ result[it.type] = it.display_name;
55
+ }
56
+ return result;
57
+ }, {});
58
+ }
59
+ const locationData = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (loactionDataCookie || {})), (((_b = action.payload) === null || _b === void 0 ? void 0 : _b.locality) && ((_c = action.payload) === null || _c === void 0 ? void 0 : _c.localityValue)
60
+ ? { [action.payload.locality]: action.payload.localityValue }
61
+ : {})), { city: locationObj === null || locationObj === void 0 ? void 0 : locationObj.city }), (locationObj.state
62
+ ? {
63
+ state: locationObj.state,
64
+ }
65
+ : {})), (locationObj.state_code
66
+ ? {
67
+ state_code: locationObj.state_code,
68
+ }
69
+ : {}));
70
+ setCookie(COOKIE_KEYS.LOCATION_DATA, locationData, 1);
71
+ // This is to defer another state update from within a reducer
72
+ setTimeout(() => {
73
+ window.fpi.custom.setValue("locationDetailsKey", locationData);
74
+ }, 0);
75
+ state.pincode_details = action.payload;
76
+ },
77
+ }
78
+ });
79
+ export const logisticsReducer = logisticSlice.reducer;
80
+ export const { setallCountries, setpincodeDetails, setlocality } = logisticSlice.actions;
81
+ //# sourceMappingURL=logistic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logistic.js","sourceRoot":"","sources":["../../../src/store/slices/logistic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE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IAAI,KACpB,CAAC,WAAW,CAAC,KAAK;gBACnB,CAAC,CAAC;oBACE,KAAK,EAAE,WAAW,CAAC,KAAK;iBACzB;gBACH,CAAC,CAAC,EAAE,CAAC,GACJ,CAAC,WAAW,CAAC,UAAU;gBACxB,CAAC,CAAC;oBACE,UAAU,EAAE,WAAW,CAAC,UAAU;iBACnC;gBACH,CAAC,CAAC,EAAE,CAAC,CACR,CAAC;YACF,SAAS,CAAC,WAAW,CAAC,aAAa,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC;YAEtD,8DAA8D;YAC9D,UAAU,CAAC,GAAG,EAAE;gBACd,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,oBAAoB,EAAE,YAAY,CAAC,CAAA;YAChE,CAAC,EAAE,CAAC,CAAC,CAAC;YAEN,KAAK,CAAC,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC;QACzC,CAAC;KACF;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAC,OAAO,CAAC;AACtD,MAAM,CAAC,MAAM,EAAE,eAAe,EAAE,iBAAiB,EAAE,WAAW,EAAE,GAAG,aAAa,CAAC,OAAO,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const orderReducer: import("redux").Reducer<{}, import("redux").AnyAction>;
@@ -0,0 +1,11 @@
1
+ import { createSlice } from '@reduxjs/toolkit';
2
+ import { STORE_KEYS } from '../enums/keys';
3
+ const initialState = {};
4
+ const orderSlice = createSlice({
5
+ name: STORE_KEYS.ORDER,
6
+ initialState,
7
+ reducers: {},
8
+ extraReducers: (builder) => { },
9
+ });
10
+ export const orderReducer = orderSlice.reducer;
11
+ //# sourceMappingURL=order.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"order.js","sourceRoot":"","sources":["../../../src/store/slices/order.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,YAAY,GAAO,EACxB,CAAC;AAGF,MAAM,UAAU,GAAG,WAAW,CAAC;IAC3B,IAAI,EAAE,UAAU,CAAC,KAAK;IACtB,YAAY;IACZ,QAAQ,EAAE,EAAE;IACZ,aAAa,EAAE,CAAC,OAAO,EAAE,EAAE,GAAG,CAAC;CAClC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { SerializedError } from "@reduxjs/toolkit";
2
+ import { AggregatorsConfigDetail, PaymentOptionDetails } from "../../types/graphql";
3
+ declare global {
4
+ interface Window {
5
+ fpi: any;
6
+ PaymentGateways: any;
7
+ }
8
+ }
9
+ export declare const checkoutPayment: import("@reduxjs/toolkit").AsyncThunk<any, any, {
10
+ extra: {};
11
+ rejectValue: SerializedError;
12
+ state?: unknown;
13
+ dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
14
+ serializedErrorType?: unknown;
15
+ pendingMeta?: unknown;
16
+ fulfilledMeta?: unknown;
17
+ rejectedMeta?: unknown;
18
+ }>;
19
+ export declare const paymentReducer: import("redux").Reducer<{
20
+ payment_options: any;
21
+ aggregators_config: any;
22
+ }, import("redux").AnyAction>;
23
+ export declare const setPaymentModeRoutes: import("@reduxjs/toolkit").ActionCreatorWithPayload<PaymentOptionDetails, "payment/setPaymentModeRoutes">, setaggregatorsConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<AggregatorsConfigDetail, "payment/setaggregatorsConfig">;
@@ -0,0 +1,57 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { createAsyncThunk, createSlice, } from "@reduxjs/toolkit";
11
+ import { getCookie, removeCookie } from "../../helpers/utils";
12
+ import { COOKIE_KEYS, STORE_KEYS } from "../enums/keys";
13
+ import { handleCODOrder, transactOrder, } from "../utils/payment";
14
+ const initialState = {
15
+ payment_options: {},
16
+ aggregators_config: {},
17
+ };
18
+ export const checkoutPayment = createAsyncThunk("checkoutPayment", (payload, { extra, getState }) => __awaiter(void 0, void 0, void 0, function* () {
19
+ const { cart_id, payment, meta, custom_meta, paymentflow, address_id, billing_address_id, aggregator_name, payment_identifier, payment_mode, queryParams, callback_url = "", payment_config = "", merchant_code = "", } = payload;
20
+ const mutablePayment = Object.assign({}, payment);
21
+ if (mutablePayment.payment_meta) {
22
+ // Only for backword compatiblity
23
+ mutablePayment.paymentFlowMeta = payment.payment_meta;
24
+ }
25
+ else {
26
+ mutablePayment.paymentFlowMeta = paymentflow;
27
+ }
28
+ removeCookie(COOKIE_KEYS.USER_CART);
29
+ const paymentOptions = Object.assign(Object.assign(Object.assign({ address_id: address_id || queryParams.address_id, billing_address_id: billing_address_id ||
30
+ queryParams.billing_address_id ||
31
+ queryParams.address_id, aggregator: aggregator_name || queryParams.aggregator_name, payment_identifier: payment_identifier || queryParams.payment_identifier, payment_mode: payment_mode || queryParams.payment_mode, callback_url: window.location.origin + "/cart/order-status", payment: mutablePayment, meta }, (cart_id ? { id: cart_id } : {})), (custom_meta && custom_meta.length > 0 ? { custom_meta } : {})), { ordering_store: undefined });
32
+ const depStoreId = getCookie(COOKIE_KEYS.DEPLOYMENT_STORE);
33
+ let ordering_store_id = getCookie(COOKIE_KEYS.ORDERING_STORE) || (depStoreId && depStoreId.uid);
34
+ if (ordering_store_id) {
35
+ paymentOptions.ordering_store = ordering_store_id;
36
+ }
37
+ if (paymentOptions.payment_mode === "COD") {
38
+ return handleCODOrder(paymentOptions);
39
+ }
40
+ //transact with payment gateway
41
+ return transactOrder(paymentOptions, window.fpi.store.getState());
42
+ }));
43
+ const paymentSlice = createSlice({
44
+ name: STORE_KEYS.PAYMENT,
45
+ initialState,
46
+ reducers: {
47
+ setPaymentModeRoutes(state, action) {
48
+ state.payment_options = action.payload;
49
+ },
50
+ setaggregatorsConfig(state, action) {
51
+ state.aggregators_config = action.payload;
52
+ },
53
+ },
54
+ });
55
+ export const paymentReducer = paymentSlice.reducer;
56
+ export const { setPaymentModeRoutes, setaggregatorsConfig } = paymentSlice.actions;
57
+ //# sourceMappingURL=payment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payment.js","sourceRoot":"","sources":["../../../src/store/slices/payment.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,gBAAgB,EAChB,WAAW,GAEZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EACL,cAAc,EACd,aAAa,GACd,MAAM,kBAAkB,CAAC;AAmB1B,MAAM,YAAY,GAGd;IACF,eAAe,EAAE,EAAE;IACnB,kBAAkB,EAAE,EAAE;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,gBAAgB,CAC7C,iBAAiB,EACjB,CAAO,OAAO,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;IACrC,MAAM,EACJ,OAAO,EACP,OAAO,EACP,IAAI,EACJ,WAAW,EACX,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,WAAW,EACX,YAAY,GAAG,EAAE,EACjB,cAAc,GAAG,EAAE,EACnB,aAAa,GAAG,EAAE,GACnB,GAAG,OAAO,CAAC;IACZ,MAAM,cAAc,qBAAQ,OAAO,C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C;KACvC;IAED,+BAA+B;IAC/B,OAAO,aAAa,CAAC,cAAc,EAAE,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;AACpE,CAAC,CAAA,CACF,CAAC;AAGF,MAAM,YAAY,GAAG,WAAW,CAAC;IAC/B,IAAI,EAAE,UAAU,CAAC,OAAO;IACxB,YAAY;IACZ,QAAQ,EAAE;QACR,oBAAoB,CAAC,KAAK,EAAE,MAA0C;YACpE,KAAK,CAAC,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC;QACzC,CAAC;QACD,oBAAoB,CAAC,KAAK,EAAE,MAA6C;YACvE,KAAK,CAAC,kBAAkB,GAAG,MAAM,CAAC,OAAO,CAAC;QAC5C,CAAC;KACF;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,YAAY,CAAC,OAAO,CAAC;AACnD,MAAM,CAAC,MAAM,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,GACzD,YAAY,CAAC,OAAO,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { ProductSlice } from "../../types/product";
2
+ import { BulkDiscountOffers, FollowerCount, FollowListing, Product, ProductCompareDetails, ProductSellers, ProductSizePrice, QueryProductPriceArgs } from "../../types/graphql";
3
+ export declare const pdpReducer: import("redux").Reducer<ProductSlice, import("redux").AnyAction>;
4
+ export declare const setProduct: import("@reduxjs/toolkit").ActionCreatorWithPayload<Product, "product/setProduct">, setfollowerCount: import("@reduxjs/toolkit").ActionCreatorWithPayload<FollowerCount, "product/setfollowerCount">, setproductSellers: import("@reduxjs/toolkit").ActionCreatorWithPayload<ProductSellers, "product/setproductSellers">, setproductPrice: import("@reduxjs/toolkit").ActionCreatorWithPayload<ProductSizePrice & QueryProductPriceArgs, "product/setproductPrice">, setcompareWithFrequentlyCompared: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "product/setcompareWithFrequentlyCompared">, setProductVariants: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "product/setProductVariants">, setbulkDiscountOffers: import("@reduxjs/toolkit").ActionCreatorWithPayload<BulkDiscountOffers, "product/setbulkDiscountOffers">, setFollowListing: import("@reduxjs/toolkit").ActionCreatorWithPayload<FollowListing, "product/setFollowListing">, setcompareSimilarProduct: import("@reduxjs/toolkit").ActionCreatorWithPayload<ProductCompareDetails, "product/setcompareSimilarProduct">, setfollowedProducts: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "product/setfollowedProducts">;