@storepecker/storefront-core 2.6.0 → 2.6.2

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 (65) hide show
  1. package/dist/api/index.cjs +30 -26
  2. package/dist/api/index.d.cts +12 -7
  3. package/dist/api/index.d.ts +12 -7
  4. package/dist/api/index.js +1 -1
  5. package/dist/{blog-ICspYuDq.d.ts → blog-kdn4wDjq.d.ts} +1 -1
  6. package/dist/{blog-DDOl23BM.d.cts → blog-yhzC2V0C.d.cts} +1 -1
  7. package/dist/{cart-DV1HcSC6.d.ts → cart-BGIsIZdM.d.ts} +1 -1
  8. package/dist/{cart-lJvJzaoH.d.cts → cart-CyN2JQTw.d.cts} +1 -1
  9. package/dist/checkout/index.cjs +23 -23
  10. package/dist/checkout/index.d.cts +3 -3
  11. package/dist/checkout/index.d.ts +3 -3
  12. package/dist/checkout/index.js +3 -3
  13. package/dist/{chunk-EGFOTJPC.js → chunk-5XVHYPOC.js} +1 -1
  14. package/dist/{chunk-OTMTHA5C.cjs → chunk-6LS5F4R3.cjs} +80 -0
  15. package/dist/{chunk-P252YNRA.js → chunk-6PF4TQXP.js} +3 -3
  16. package/dist/{chunk-F45S7UWC.js → chunk-CBKJ3Y2I.js} +80 -1
  17. package/dist/{chunk-FU46MZTI.cjs → chunk-COO7PUZH.cjs} +4 -4
  18. package/dist/{chunk-6Q7QMPOQ.js → chunk-ICKTXS6B.js} +1 -1
  19. package/dist/{chunk-HAQWCNDY.cjs → chunk-IG4BW3ZB.cjs} +3 -3
  20. package/dist/{chunk-KLNKIQQM.cjs → chunk-IVKJJLG7.cjs} +2 -2
  21. package/dist/{chunk-DXQX7ZIL.cjs → chunk-LZADKC4Y.cjs} +6 -0
  22. package/dist/{chunk-S3ZZ3ZA7.js → chunk-ME6Z7TZW.js} +6 -1
  23. package/dist/{chunk-F7CI6FHE.cjs → chunk-QSHOJ3NJ.cjs} +6 -6
  24. package/dist/{chunk-CEVCKVNX.js → chunk-VYHAWRJR.js} +1 -1
  25. package/dist/{chunk-L43KF3AC.js → chunk-W6BDMNSU.js} +1 -1
  26. package/dist/{chunk-B3BXKMQA.cjs → chunk-YLLAP3H2.cjs} +2 -2
  27. package/dist/{collections-fGX_D_Mi.d.cts → collections-8YdINtUf.d.cts} +1 -1
  28. package/dist/{collections-kERS_kZw.d.ts → collections-ycrA2cPL.d.ts} +1 -1
  29. package/dist/components/address-form.cjs +5 -4
  30. package/dist/components/address-form.js +4 -3
  31. package/dist/components/digital-product-download-modal.d.cts +2 -2
  32. package/dist/components/digital-product-download-modal.d.ts +2 -2
  33. package/dist/components/index.cjs +7 -7
  34. package/dist/components/index.d.cts +5 -5
  35. package/dist/components/index.d.ts +5 -5
  36. package/dist/components/index.js +5 -5
  37. package/dist/components/share-button.cjs +4 -3
  38. package/dist/components/share-button.d.cts +1 -1
  39. package/dist/components/share-button.d.ts +1 -1
  40. package/dist/components/share-button.js +3 -2
  41. package/dist/components/theme-data-initializer.d.cts +5 -5
  42. package/dist/components/theme-data-initializer.d.ts +5 -5
  43. package/dist/hooks/index.cjs +18 -17
  44. package/dist/hooks/index.d.cts +4 -4
  45. package/dist/hooks/index.d.ts +4 -4
  46. package/dist/hooks/index.js +6 -5
  47. package/dist/models/index.d.cts +6 -6
  48. package/dist/models/index.d.ts +6 -6
  49. package/dist/{orders-CGhcSTMg.d.ts → orders-9_scVq_M.d.cts} +3 -2
  50. package/dist/{orders-1vcg6whk.d.cts → orders-C1XZr8tx.d.ts} +3 -2
  51. package/dist/{pixelEvents-D8iynEYj.d.ts → pixelEvents-D0sH22Er.d.ts} +14 -7
  52. package/dist/{pixelEvents-BbTa1-8B.d.cts → pixelEvents-uiPHbiAQ.d.cts} +14 -7
  53. package/dist/{product-B8elBN21.d.cts → product-CZtFWhxO.d.cts} +3 -0
  54. package/dist/{product-B8elBN21.d.ts → product-CZtFWhxO.d.ts} +3 -0
  55. package/dist/store/index.cjs +5 -5
  56. package/dist/store/index.d.cts +7 -7
  57. package/dist/store/index.d.ts +7 -7
  58. package/dist/store/index.js +2 -2
  59. package/dist/utils/index.cjs +29 -25
  60. package/dist/utils/index.d.cts +12 -8
  61. package/dist/utils/index.d.ts +12 -8
  62. package/dist/utils/index.js +3 -3
  63. package/dist/{wishlist-B-bvvOxv.d.ts → wishlist-CRNbfFIx.d.ts} +1 -1
  64. package/dist/{wishlist-BdpIFX5_.d.cts → wishlist-Cx9Vrszq.d.cts} +1 -1
  65. package/package.json +1 -1
@@ -4,7 +4,7 @@ var chunkY46EHRJQ_cjs = require('../chunk-Y46EHRJQ.cjs');
4
4
  var chunkPARH5TBK_cjs = require('../chunk-PARH5TBK.cjs');
5
5
  require('../chunk-SMHJRNCR.cjs');
6
6
  var chunkXFOUNOKO_cjs = require('../chunk-XFOUNOKO.cjs');
7
- var chunkDXQX7ZIL_cjs = require('../chunk-DXQX7ZIL.cjs');
7
+ var chunkLZADKC4Y_cjs = require('../chunk-LZADKC4Y.cjs');
8
8
  var chunkRDUT4W3B_cjs = require('../chunk-RDUT4W3B.cjs');
9
9
  var chunkECHV2JSY_cjs = require('../chunk-ECHV2JSY.cjs');
10
10
  require('../chunk-BBRXE57K.cjs');
@@ -249,103 +249,107 @@ Object.defineProperty(exports, "removeCoupon", {
249
249
  });
250
250
  Object.defineProperty(exports, "checkPhonepePaymentStatus", {
251
251
  enumerable: true,
252
- get: function () { return chunkDXQX7ZIL_cjs.checkPhonepePaymentStatus; }
252
+ get: function () { return chunkLZADKC4Y_cjs.checkPhonepePaymentStatus; }
253
253
  });
254
254
  Object.defineProperty(exports, "getOrderDetails", {
255
255
  enumerable: true,
256
- get: function () { return chunkDXQX7ZIL_cjs.getOrderDetails; }
256
+ get: function () { return chunkLZADKC4Y_cjs.getOrderDetails; }
257
257
  });
258
258
  Object.defineProperty(exports, "getOrderDetailsByNumber", {
259
259
  enumerable: true,
260
- get: function () { return chunkDXQX7ZIL_cjs.getOrderDetailsByNumber; }
260
+ get: function () { return chunkLZADKC4Y_cjs.getOrderDetailsByNumber; }
261
261
  });
262
262
  Object.defineProperty(exports, "getOrderDetailsByRef", {
263
263
  enumerable: true,
264
- get: function () { return chunkDXQX7ZIL_cjs.getOrderDetailsByRef; }
264
+ get: function () { return chunkLZADKC4Y_cjs.getOrderDetailsByRef; }
265
265
  });
266
266
  Object.defineProperty(exports, "getOrderDetailsByRefV2", {
267
267
  enumerable: true,
268
- get: function () { return chunkDXQX7ZIL_cjs.getOrderDetailsByRefV2; }
268
+ get: function () { return chunkLZADKC4Y_cjs.getOrderDetailsByRefV2; }
269
269
  });
270
270
  Object.defineProperty(exports, "getOrders", {
271
271
  enumerable: true,
272
- get: function () { return chunkDXQX7ZIL_cjs.getOrders; }
272
+ get: function () { return chunkLZADKC4Y_cjs.getOrders; }
273
273
  });
274
274
  Object.defineProperty(exports, "getPublicOrderDetailsByNumber", {
275
275
  enumerable: true,
276
- get: function () { return chunkDXQX7ZIL_cjs.getPublicOrderDetailsByNumber; }
276
+ get: function () { return chunkLZADKC4Y_cjs.getPublicOrderDetailsByNumber; }
277
+ });
278
+ Object.defineProperty(exports, "getPublicOrderDetailsByRef", {
279
+ enumerable: true,
280
+ get: function () { return chunkLZADKC4Y_cjs.getPublicOrderDetailsByRef; }
277
281
  });
278
282
  Object.defineProperty(exports, "getStripePaymentStatus", {
279
283
  enumerable: true,
280
- get: function () { return chunkDXQX7ZIL_cjs.getStripePaymentStatus; }
284
+ get: function () { return chunkLZADKC4Y_cjs.getStripePaymentStatus; }
281
285
  });
282
286
  Object.defineProperty(exports, "getStripePaymentStatusPublic", {
283
287
  enumerable: true,
284
- get: function () { return chunkDXQX7ZIL_cjs.getStripePaymentStatusPublic; }
288
+ get: function () { return chunkLZADKC4Y_cjs.getStripePaymentStatusPublic; }
285
289
  });
286
290
  Object.defineProperty(exports, "makeCODOrder", {
287
291
  enumerable: true,
288
- get: function () { return chunkDXQX7ZIL_cjs.makeCODOrder; }
292
+ get: function () { return chunkLZADKC4Y_cjs.makeCODOrder; }
289
293
  });
290
294
  Object.defineProperty(exports, "phonepeOrderSuccess", {
291
295
  enumerable: true,
292
- get: function () { return chunkDXQX7ZIL_cjs.phonepeOrderSuccess; }
296
+ get: function () { return chunkLZADKC4Y_cjs.phonepeOrderSuccess; }
293
297
  });
294
298
  Object.defineProperty(exports, "phonepePublicOrderSuccess", {
295
299
  enumerable: true,
296
- get: function () { return chunkDXQX7ZIL_cjs.phonepePublicOrderSuccess; }
300
+ get: function () { return chunkLZADKC4Y_cjs.phonepePublicOrderSuccess; }
297
301
  });
298
302
  Object.defineProperty(exports, "placeOrder", {
299
303
  enumerable: true,
300
- get: function () { return chunkDXQX7ZIL_cjs.placeOrder; }
304
+ get: function () { return chunkLZADKC4Y_cjs.placeOrder; }
301
305
  });
302
306
  Object.defineProperty(exports, "publicMakeCODOrder", {
303
307
  enumerable: true,
304
- get: function () { return chunkDXQX7ZIL_cjs.publicMakeCODOrder; }
308
+ get: function () { return chunkLZADKC4Y_cjs.publicMakeCODOrder; }
305
309
  });
306
310
  Object.defineProperty(exports, "publicPlaceOrder", {
307
311
  enumerable: true,
308
- get: function () { return chunkDXQX7ZIL_cjs.publicPlaceOrder; }
312
+ get: function () { return chunkLZADKC4Y_cjs.publicPlaceOrder; }
309
313
  });
310
314
  Object.defineProperty(exports, "razorpayOrderFail", {
311
315
  enumerable: true,
312
- get: function () { return chunkDXQX7ZIL_cjs.razorpayOrderFail; }
316
+ get: function () { return chunkLZADKC4Y_cjs.razorpayOrderFail; }
313
317
  });
314
318
  Object.defineProperty(exports, "razorpayOrderSuccess", {
315
319
  enumerable: true,
316
- get: function () { return chunkDXQX7ZIL_cjs.razorpayOrderSuccess; }
320
+ get: function () { return chunkLZADKC4Y_cjs.razorpayOrderSuccess; }
317
321
  });
318
322
  Object.defineProperty(exports, "razorpayPublicOrderSuccess", {
319
323
  enumerable: true,
320
- get: function () { return chunkDXQX7ZIL_cjs.razorpayPublicOrderSuccess; }
324
+ get: function () { return chunkLZADKC4Y_cjs.razorpayPublicOrderSuccess; }
321
325
  });
322
326
  Object.defineProperty(exports, "stripeOrderFail", {
323
327
  enumerable: true,
324
- get: function () { return chunkDXQX7ZIL_cjs.stripeOrderFail; }
328
+ get: function () { return chunkLZADKC4Y_cjs.stripeOrderFail; }
325
329
  });
326
330
  Object.defineProperty(exports, "stripeOrderSuccess", {
327
331
  enumerable: true,
328
- get: function () { return chunkDXQX7ZIL_cjs.stripeOrderSuccess; }
332
+ get: function () { return chunkLZADKC4Y_cjs.stripeOrderSuccess; }
329
333
  });
330
334
  Object.defineProperty(exports, "stripePublicOrderSuccess", {
331
335
  enumerable: true,
332
- get: function () { return chunkDXQX7ZIL_cjs.stripePublicOrderSuccess; }
336
+ get: function () { return chunkLZADKC4Y_cjs.stripePublicOrderSuccess; }
333
337
  });
334
338
  Object.defineProperty(exports, "updateOrder", {
335
339
  enumerable: true,
336
- get: function () { return chunkDXQX7ZIL_cjs.updateOrder; }
340
+ get: function () { return chunkLZADKC4Y_cjs.updateOrder; }
337
341
  });
338
342
  Object.defineProperty(exports, "updateOrderCustomization", {
339
343
  enumerable: true,
340
- get: function () { return chunkDXQX7ZIL_cjs.updateOrderCustomization; }
344
+ get: function () { return chunkLZADKC4Y_cjs.updateOrderCustomization; }
341
345
  });
342
346
  Object.defineProperty(exports, "uploadCustomizationImage", {
343
347
  enumerable: true,
344
- get: function () { return chunkDXQX7ZIL_cjs.uploadCustomizationImage; }
348
+ get: function () { return chunkLZADKC4Y_cjs.uploadCustomizationImage; }
345
349
  });
346
350
  Object.defineProperty(exports, "verifyTabbyPayment", {
347
351
  enumerable: true,
348
- get: function () { return chunkDXQX7ZIL_cjs.verifyTabbyPayment; }
352
+ get: function () { return chunkLZADKC4Y_cjs.verifyTabbyPayment; }
349
353
  });
350
354
  Object.defineProperty(exports, "addAddress", {
351
355
  enumerable: true,
@@ -1,12 +1,12 @@
1
1
  import * as axios from 'axios';
2
2
  import { AxiosInstance, AxiosResponse } from 'axios';
3
3
  import { A as Address } from '../address-DwBZHzbI.cjs';
4
- import { U as User, C as Cart, d as CouponResponse, c as Coupon, b as Category } from '../cart-lJvJzaoH.cjs';
5
- import { d as Product, f as ProductDetail } from '../product-B8elBN21.cjs';
6
- import { O as Order } from '../orders-1vcg6whk.cjs';
7
- import { W as Wishlist } from '../wishlist-BdpIFX5_.cjs';
8
- import { C as CollectionResponse } from '../collections-fGX_D_Mi.cjs';
9
- import { R as Review, A as Analytics, a as Booking, B as Blog } from '../blog-DDOl23BM.cjs';
4
+ import { U as User, C as Cart, d as CouponResponse, c as Coupon, b as Category } from '../cart-CyN2JQTw.cjs';
5
+ import { d as Product, f as ProductDetail } from '../product-CZtFWhxO.cjs';
6
+ import { O as Order } from '../orders-9_scVq_M.cjs';
7
+ import { W as Wishlist } from '../wishlist-Cx9Vrszq.cjs';
8
+ import { C as CollectionResponse } from '../collections-8YdINtUf.cjs';
9
+ import { R as Review, A as Analytics, a as Booking, B as Blog } from '../blog-yhzC2V0C.cjs';
10
10
  import 'react-toastify';
11
11
 
12
12
  /**
@@ -79,7 +79,11 @@ declare function getOrderDetails(orderId: number): Promise<AxiosResponse<Order.R
79
79
  declare function getOrderDetailsByNumber(orderNumber: number): Promise<AxiosResponse<Order.OrderSummary>>;
80
80
  declare function getOrderDetailsByRef(orderRef: string): Promise<AxiosResponse<Order.OrderSummary>>;
81
81
  declare function getOrderDetailsByRefV2(orderRef: string): Promise<AxiosResponse<Order.OrderSummary>>;
82
+ /**
83
+ * @deprecated Use getPublicOrderDetailsByRef instead
84
+ */
82
85
  declare function getPublicOrderDetailsByNumber(orderNumber: number): Promise<AxiosResponse<Order.OrderSummary>>;
86
+ declare function getPublicOrderDetailsByRef(orderRef: string): Promise<AxiosResponse<Order.OrderSummary>>;
83
87
  declare function placeOrder(address_id: number, redirect: string, isCod?: boolean, shipping_option_id?: number, stripeRedirect?: string, tabbyRedirect?: string): Promise<AxiosResponse<Order.OrderSummary>>;
84
88
  interface PublicOrderDetails {
85
89
  email: string;
@@ -115,6 +119,7 @@ declare function uploadCustomizationImage(uploadForm: FormData): Promise<AxiosRe
115
119
  declare function verifyTabbyPayment(orderNumber: number): Promise<AxiosResponse<{
116
120
  order_status: string;
117
121
  message: string;
122
+ status: string;
118
123
  }>>;
119
124
 
120
125
  declare function getProductList(url: string, filter: unknown): Promise<Product.ProductResponse>;
@@ -180,4 +185,4 @@ declare function getMultipleBlogsBySlugs(slugs: string): Promise<AxiosResponse<{
180
185
  results: Blog.Post[];
181
186
  }>>;
182
187
 
183
- export { type BookingFilter, type OTPCredentials, type VerifyOTPCredentials, addAddress, addReview, addToCart, addWishlist, applyCoupon, checkPhonepePaymentStatus, createBooking, deleteAddress, getAddresses, getAffiliateRedirect, getAppliedCoupon, getBlogPostBySlug, getBlogPostsList, getCart, getCartItemQuantity, getCategories, getCollection, getCountries, getCoupons, getDigitalProductDownloadLink, getFilters, getHttpService, getLoginMethod, getMultipleBlogsBySlugs, getMultipleCollections, getNewToken, getOrderDetails, getOrderDetailsByNumber, getOrderDetailsByRef, getOrderDetailsByRefV2, getOrders, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getPublicOrderDetailsByNumber, getReviewSummary, getReviews, getServerHttpService, getStripePaymentStatus, getStripePaymentStatusPublic, getSubdivisions, getUserBookings, getUserDetails, getWishlist, httpService, makeCODOrder, notifyProductStock, phonepeOrderSuccess, phonepePublicOrderSuccess, placeOrder, postAnalytics, publicMakeCODOrder, publicPlaceOrder, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, removeCoupon, removeFromCart, removeFromWishlist, resetHttpService, sendOTP, serverHttpService, setSessionExpiredCallback, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, updateAddress, updateCart, updateDigitalProductDownloadLinkCount, updateOrder, updateOrderCustomization, updateUserDetails, uploadCustomizationImage, uploadReviewImages, verifyOTP, verifyTabbyPayment };
188
+ export { type BookingFilter, type OTPCredentials, type VerifyOTPCredentials, addAddress, addReview, addToCart, addWishlist, applyCoupon, checkPhonepePaymentStatus, createBooking, deleteAddress, getAddresses, getAffiliateRedirect, getAppliedCoupon, getBlogPostBySlug, getBlogPostsList, getCart, getCartItemQuantity, getCategories, getCollection, getCountries, getCoupons, getDigitalProductDownloadLink, getFilters, getHttpService, getLoginMethod, getMultipleBlogsBySlugs, getMultipleCollections, getNewToken, getOrderDetails, getOrderDetailsByNumber, getOrderDetailsByRef, getOrderDetailsByRefV2, getOrders, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getPublicOrderDetailsByNumber, getPublicOrderDetailsByRef, getReviewSummary, getReviews, getServerHttpService, getStripePaymentStatus, getStripePaymentStatusPublic, getSubdivisions, getUserBookings, getUserDetails, getWishlist, httpService, makeCODOrder, notifyProductStock, phonepeOrderSuccess, phonepePublicOrderSuccess, placeOrder, postAnalytics, publicMakeCODOrder, publicPlaceOrder, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, removeCoupon, removeFromCart, removeFromWishlist, resetHttpService, sendOTP, serverHttpService, setSessionExpiredCallback, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, updateAddress, updateCart, updateDigitalProductDownloadLinkCount, updateOrder, updateOrderCustomization, updateUserDetails, uploadCustomizationImage, uploadReviewImages, verifyOTP, verifyTabbyPayment };
@@ -1,12 +1,12 @@
1
1
  import * as axios from 'axios';
2
2
  import { AxiosInstance, AxiosResponse } from 'axios';
3
3
  import { A as Address } from '../address-DwBZHzbI.js';
4
- import { U as User, C as Cart, d as CouponResponse, c as Coupon, b as Category } from '../cart-DV1HcSC6.js';
5
- import { d as Product, f as ProductDetail } from '../product-B8elBN21.js';
6
- import { O as Order } from '../orders-CGhcSTMg.js';
7
- import { W as Wishlist } from '../wishlist-B-bvvOxv.js';
8
- import { C as CollectionResponse } from '../collections-kERS_kZw.js';
9
- import { R as Review, A as Analytics, a as Booking, B as Blog } from '../blog-ICspYuDq.js';
4
+ import { U as User, C as Cart, d as CouponResponse, c as Coupon, b as Category } from '../cart-BGIsIZdM.js';
5
+ import { d as Product, f as ProductDetail } from '../product-CZtFWhxO.js';
6
+ import { O as Order } from '../orders-C1XZr8tx.js';
7
+ import { W as Wishlist } from '../wishlist-CRNbfFIx.js';
8
+ import { C as CollectionResponse } from '../collections-ycrA2cPL.js';
9
+ import { R as Review, A as Analytics, a as Booking, B as Blog } from '../blog-kdn4wDjq.js';
10
10
  import 'react-toastify';
11
11
 
12
12
  /**
@@ -79,7 +79,11 @@ declare function getOrderDetails(orderId: number): Promise<AxiosResponse<Order.R
79
79
  declare function getOrderDetailsByNumber(orderNumber: number): Promise<AxiosResponse<Order.OrderSummary>>;
80
80
  declare function getOrderDetailsByRef(orderRef: string): Promise<AxiosResponse<Order.OrderSummary>>;
81
81
  declare function getOrderDetailsByRefV2(orderRef: string): Promise<AxiosResponse<Order.OrderSummary>>;
82
+ /**
83
+ * @deprecated Use getPublicOrderDetailsByRef instead
84
+ */
82
85
  declare function getPublicOrderDetailsByNumber(orderNumber: number): Promise<AxiosResponse<Order.OrderSummary>>;
86
+ declare function getPublicOrderDetailsByRef(orderRef: string): Promise<AxiosResponse<Order.OrderSummary>>;
83
87
  declare function placeOrder(address_id: number, redirect: string, isCod?: boolean, shipping_option_id?: number, stripeRedirect?: string, tabbyRedirect?: string): Promise<AxiosResponse<Order.OrderSummary>>;
84
88
  interface PublicOrderDetails {
85
89
  email: string;
@@ -115,6 +119,7 @@ declare function uploadCustomizationImage(uploadForm: FormData): Promise<AxiosRe
115
119
  declare function verifyTabbyPayment(orderNumber: number): Promise<AxiosResponse<{
116
120
  order_status: string;
117
121
  message: string;
122
+ status: string;
118
123
  }>>;
119
124
 
120
125
  declare function getProductList(url: string, filter: unknown): Promise<Product.ProductResponse>;
@@ -180,4 +185,4 @@ declare function getMultipleBlogsBySlugs(slugs: string): Promise<AxiosResponse<{
180
185
  results: Blog.Post[];
181
186
  }>>;
182
187
 
183
- export { type BookingFilter, type OTPCredentials, type VerifyOTPCredentials, addAddress, addReview, addToCart, addWishlist, applyCoupon, checkPhonepePaymentStatus, createBooking, deleteAddress, getAddresses, getAffiliateRedirect, getAppliedCoupon, getBlogPostBySlug, getBlogPostsList, getCart, getCartItemQuantity, getCategories, getCollection, getCountries, getCoupons, getDigitalProductDownloadLink, getFilters, getHttpService, getLoginMethod, getMultipleBlogsBySlugs, getMultipleCollections, getNewToken, getOrderDetails, getOrderDetailsByNumber, getOrderDetailsByRef, getOrderDetailsByRefV2, getOrders, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getPublicOrderDetailsByNumber, getReviewSummary, getReviews, getServerHttpService, getStripePaymentStatus, getStripePaymentStatusPublic, getSubdivisions, getUserBookings, getUserDetails, getWishlist, httpService, makeCODOrder, notifyProductStock, phonepeOrderSuccess, phonepePublicOrderSuccess, placeOrder, postAnalytics, publicMakeCODOrder, publicPlaceOrder, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, removeCoupon, removeFromCart, removeFromWishlist, resetHttpService, sendOTP, serverHttpService, setSessionExpiredCallback, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, updateAddress, updateCart, updateDigitalProductDownloadLinkCount, updateOrder, updateOrderCustomization, updateUserDetails, uploadCustomizationImage, uploadReviewImages, verifyOTP, verifyTabbyPayment };
188
+ export { type BookingFilter, type OTPCredentials, type VerifyOTPCredentials, addAddress, addReview, addToCart, addWishlist, applyCoupon, checkPhonepePaymentStatus, createBooking, deleteAddress, getAddresses, getAffiliateRedirect, getAppliedCoupon, getBlogPostBySlug, getBlogPostsList, getCart, getCartItemQuantity, getCategories, getCollection, getCountries, getCoupons, getDigitalProductDownloadLink, getFilters, getHttpService, getLoginMethod, getMultipleBlogsBySlugs, getMultipleCollections, getNewToken, getOrderDetails, getOrderDetailsByNumber, getOrderDetailsByRef, getOrderDetailsByRefV2, getOrders, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getPublicOrderDetailsByNumber, getPublicOrderDetailsByRef, getReviewSummary, getReviews, getServerHttpService, getStripePaymentStatus, getStripePaymentStatusPublic, getSubdivisions, getUserBookings, getUserDetails, getWishlist, httpService, makeCODOrder, notifyProductStock, phonepeOrderSuccess, phonepePublicOrderSuccess, placeOrder, postAnalytics, publicMakeCODOrder, publicPlaceOrder, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, removeCoupon, removeFromCart, removeFromWishlist, resetHttpService, sendOTP, serverHttpService, setSessionExpiredCallback, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, updateAddress, updateCart, updateDigitalProductDownloadLinkCount, updateOrder, updateOrderCustomization, updateUserDetails, uploadCustomizationImage, uploadReviewImages, verifyOTP, verifyTabbyPayment };
package/dist/api/index.js CHANGED
@@ -2,7 +2,7 @@ export { getUserDetails, updateUserDetails } from '../chunk-WYXT5AAG.js';
2
2
  export { addToCart, addWishlist, getCart, getCartItemQuantity, getCategories, getDigitalProductDownloadLink, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getWishlist, notifyProductStock, removeFromCart, removeFromWishlist, updateCart, updateDigitalProductDownloadLinkCount } from '../chunk-CUR7CHR5.js';
3
3
  import '../chunk-QAC72HKO.js';
4
4
  export { applyCoupon, getAppliedCoupon, getCoupons, removeCoupon } from '../chunk-7M5CVYZJ.js';
5
- export { checkPhonepePaymentStatus, getOrderDetails, getOrderDetailsByNumber, getOrderDetailsByRef, getOrderDetailsByRefV2, getOrders, getPublicOrderDetailsByNumber, getStripePaymentStatus, getStripePaymentStatusPublic, makeCODOrder, phonepeOrderSuccess, phonepePublicOrderSuccess, placeOrder, publicMakeCODOrder, publicPlaceOrder, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, updateOrder, updateOrderCustomization, uploadCustomizationImage, verifyTabbyPayment } from '../chunk-S3ZZ3ZA7.js';
5
+ export { checkPhonepePaymentStatus, getOrderDetails, getOrderDetailsByNumber, getOrderDetailsByRef, getOrderDetailsByRefV2, getOrders, getPublicOrderDetailsByNumber, getPublicOrderDetailsByRef, getStripePaymentStatus, getStripePaymentStatusPublic, makeCODOrder, phonepeOrderSuccess, phonepePublicOrderSuccess, placeOrder, publicMakeCODOrder, publicPlaceOrder, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, updateOrder, updateOrderCustomization, uploadCustomizationImage, verifyTabbyPayment } from '../chunk-ME6Z7TZW.js';
6
6
  export { addAddress, deleteAddress, getAddresses, getCountries, getSubdivisions, updateAddress } from '../chunk-ZGMLOLTC.js';
7
7
  import { http_service_default } from '../chunk-3SYYP3XV.js';
8
8
  export { getHttpService, http_service_default as httpService, resetHttpService, setSessionExpiredCallback } from '../chunk-3SYYP3XV.js';
@@ -1,4 +1,4 @@
1
- import { f as ProductDetail } from './product-B8elBN21.js';
1
+ import { f as ProductDetail } from './product-CZtFWhxO.js';
2
2
 
3
3
  declare namespace Review {
4
4
  interface ReviewPayload {
@@ -1,4 +1,4 @@
1
- import { f as ProductDetail } from './product-B8elBN21.cjs';
1
+ import { f as ProductDetail } from './product-CZtFWhxO.cjs';
2
2
 
3
3
  declare namespace Review {
4
4
  interface ReviewPayload {
@@ -1,4 +1,4 @@
1
- import { g as SLICE_STATUS, d as Product, f as ProductDetail } from './product-B8elBN21.js';
1
+ import { g as SLICE_STATUS, d as Product, f as ProductDetail } from './product-CZtFWhxO.js';
2
2
 
3
3
  declare namespace User {
4
4
  interface Root {
@@ -1,4 +1,4 @@
1
- import { g as SLICE_STATUS, d as Product, f as ProductDetail } from './product-B8elBN21.cjs';
1
+ import { g as SLICE_STATUS, d as Product, f as ProductDetail } from './product-CZtFWhxO.cjs';
2
2
 
3
3
  declare namespace User {
4
4
  interface Root {
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkF7CI6FHE_cjs = require('../chunk-F7CI6FHE.cjs');
3
+ var chunkQSHOJ3NJ_cjs = require('../chunk-QSHOJ3NJ.cjs');
4
4
  require('../chunk-XFOUNOKO.cjs');
5
5
  var chunkK44JZ5NL_cjs = require('../chunk-K44JZ5NL.cjs');
6
- var chunkDXQX7ZIL_cjs = require('../chunk-DXQX7ZIL.cjs');
6
+ var chunkLZADKC4Y_cjs = require('../chunk-LZADKC4Y.cjs');
7
7
  var chunkTB72NPRM_cjs = require('../chunk-TB72NPRM.cjs');
8
8
  require('../chunk-ECHV2JSY.cjs');
9
9
  require('../chunk-BBRXE57K.cjs');
@@ -49,7 +49,7 @@ function calculateCartTotals(cart) {
49
49
  // src/checkout/payment-status.ts
50
50
  async function checkPhonepeReturnStatus(transactionId, callbacks) {
51
51
  try {
52
- const response = await chunkDXQX7ZIL_cjs.checkPhonepePaymentStatus(transactionId);
52
+ const response = await chunkLZADKC4Y_cjs.checkPhonepePaymentStatus(transactionId);
53
53
  if (response.data.success) {
54
54
  callbacks.onSuccess(void 0);
55
55
  } else {
@@ -62,8 +62,8 @@ async function checkPhonepeReturnStatus(transactionId, callbacks) {
62
62
  async function checkPhonepeReturnStatusWithOrder(transactionId, orderNumber, callbacks) {
63
63
  try {
64
64
  const [paymentResponse, orderResponse] = await Promise.all([
65
- chunkDXQX7ZIL_cjs.checkPhonepePaymentStatus(transactionId),
66
- chunkDXQX7ZIL_cjs.getOrderDetailsByNumber(orderNumber)
65
+ chunkLZADKC4Y_cjs.checkPhonepePaymentStatus(transactionId),
66
+ chunkLZADKC4Y_cjs.getOrderDetailsByNumber(orderNumber)
67
67
  ]);
68
68
  const order = orderResponse.data;
69
69
  callbacks.onOrderLoaded?.(order);
@@ -80,12 +80,12 @@ async function checkPhonepeReturnStatusWithOrder(transactionId, orderNumber, cal
80
80
  }
81
81
  async function checkStripeReturnStatus(sessionId, orderNumber, paymentLinkUrl, callbacks, options) {
82
82
  try {
83
- const getStatus = options?.isPublic ? chunkDXQX7ZIL_cjs.getStripePaymentStatusPublic : chunkDXQX7ZIL_cjs.getStripePaymentStatus;
83
+ const getStatus = options?.isPublic ? chunkLZADKC4Y_cjs.getStripePaymentStatusPublic : chunkLZADKC4Y_cjs.getStripePaymentStatus;
84
84
  const response = await getStatus(sessionId, orderNumber, paymentLinkUrl);
85
85
  const data = response.data;
86
86
  if (data.payment_status === "paid" || data.status === "complete") {
87
87
  try {
88
- const orderResponse = await chunkDXQX7ZIL_cjs.getOrderDetailsByNumber(orderNumber);
88
+ const orderResponse = await chunkLZADKC4Y_cjs.getOrderDetailsByNumber(orderNumber);
89
89
  const order = orderResponse.data;
90
90
  callbacks.onOrderLoaded?.(order);
91
91
  chunkK44JZ5NL_cjs.pixelEvents.purchase(order);
@@ -103,10 +103,10 @@ async function checkStripeReturnStatus(sessionId, orderNumber, paymentLinkUrl, c
103
103
  }
104
104
  async function checkTabbyReturnStatus(orderNumber, callbacks) {
105
105
  try {
106
- const response = await chunkDXQX7ZIL_cjs.verifyTabbyPayment(orderNumber);
107
- if (response.data.order_status === "paid" || response.data.order_status === "confirmed") {
106
+ const response = await chunkLZADKC4Y_cjs.verifyTabbyPayment(orderNumber);
107
+ if (response.data.order_status === "paid" || response.data.order_status === "confirmed" || response.data.status === "paid") {
108
108
  try {
109
- const orderResponse = await chunkDXQX7ZIL_cjs.getOrderDetailsByNumber(orderNumber);
109
+ const orderResponse = await chunkLZADKC4Y_cjs.getOrderDetailsByNumber(orderNumber);
110
110
  const order = orderResponse.data;
111
111
  callbacks.onOrderLoaded?.(order);
112
112
  chunkK44JZ5NL_cjs.pixelEvents.purchase(order);
@@ -125,55 +125,55 @@ async function checkTabbyReturnStatus(orderNumber, callbacks) {
125
125
 
126
126
  Object.defineProperty(exports, "applyCheckoutCoupon", {
127
127
  enumerable: true,
128
- get: function () { return chunkF7CI6FHE_cjs.applyCheckoutCoupon; }
128
+ get: function () { return chunkQSHOJ3NJ_cjs.applyCheckoutCoupon; }
129
129
  });
130
130
  Object.defineProperty(exports, "fetchAppliedCoupon", {
131
131
  enumerable: true,
132
- get: function () { return chunkF7CI6FHE_cjs.fetchAppliedCoupon; }
132
+ get: function () { return chunkQSHOJ3NJ_cjs.fetchAppliedCoupon; }
133
133
  });
134
134
  Object.defineProperty(exports, "fetchAvailableCoupons", {
135
135
  enumerable: true,
136
- get: function () { return chunkF7CI6FHE_cjs.fetchAvailableCoupons; }
136
+ get: function () { return chunkQSHOJ3NJ_cjs.fetchAvailableCoupons; }
137
137
  });
138
138
  Object.defineProperty(exports, "handleCODPayment", {
139
139
  enumerable: true,
140
- get: function () { return chunkF7CI6FHE_cjs.handleCODPayment; }
140
+ get: function () { return chunkQSHOJ3NJ_cjs.handleCODPayment; }
141
141
  });
142
142
  Object.defineProperty(exports, "handlePhonepePayment", {
143
143
  enumerable: true,
144
- get: function () { return chunkF7CI6FHE_cjs.handlePhonepePayment; }
144
+ get: function () { return chunkQSHOJ3NJ_cjs.handlePhonepePayment; }
145
145
  });
146
146
  Object.defineProperty(exports, "handleRazorpayFail", {
147
147
  enumerable: true,
148
- get: function () { return chunkF7CI6FHE_cjs.handleRazorpayFail; }
148
+ get: function () { return chunkQSHOJ3NJ_cjs.handleRazorpayFail; }
149
149
  });
150
150
  Object.defineProperty(exports, "handleRazorpaySuccess", {
151
151
  enumerable: true,
152
- get: function () { return chunkF7CI6FHE_cjs.handleRazorpaySuccess; }
152
+ get: function () { return chunkQSHOJ3NJ_cjs.handleRazorpaySuccess; }
153
153
  });
154
154
  Object.defineProperty(exports, "handleStripePayment", {
155
155
  enumerable: true,
156
- get: function () { return chunkF7CI6FHE_cjs.handleStripePayment; }
156
+ get: function () { return chunkQSHOJ3NJ_cjs.handleStripePayment; }
157
157
  });
158
158
  Object.defineProperty(exports, "handleStripeSuccess", {
159
159
  enumerable: true,
160
- get: function () { return chunkF7CI6FHE_cjs.handleStripeSuccess; }
160
+ get: function () { return chunkQSHOJ3NJ_cjs.handleStripeSuccess; }
161
161
  });
162
162
  Object.defineProperty(exports, "handleTabbyPayment", {
163
163
  enumerable: true,
164
- get: function () { return chunkF7CI6FHE_cjs.handleTabbyPayment; }
164
+ get: function () { return chunkQSHOJ3NJ_cjs.handleTabbyPayment; }
165
165
  });
166
166
  Object.defineProperty(exports, "openRazorpayCheckout", {
167
167
  enumerable: true,
168
- get: function () { return chunkF7CI6FHE_cjs.openRazorpayCheckout; }
168
+ get: function () { return chunkQSHOJ3NJ_cjs.openRazorpayCheckout; }
169
169
  });
170
170
  Object.defineProperty(exports, "processPayment", {
171
171
  enumerable: true,
172
- get: function () { return chunkF7CI6FHE_cjs.processPayment; }
172
+ get: function () { return chunkQSHOJ3NJ_cjs.processPayment; }
173
173
  });
174
174
  Object.defineProperty(exports, "removeCheckoutCoupon", {
175
175
  enumerable: true,
176
- get: function () { return chunkF7CI6FHE_cjs.removeCheckoutCoupon; }
176
+ get: function () { return chunkQSHOJ3NJ_cjs.removeCheckoutCoupon; }
177
177
  });
178
178
  Object.defineProperty(exports, "IP_API_CACHE_KEY", {
179
179
  enumerable: true,
@@ -1,7 +1,7 @@
1
1
  import * as Yup from 'yup';
2
- import { C as Cart, c as Coupon } from '../cart-lJvJzaoH.cjs';
3
- import { O as Order } from '../orders-1vcg6whk.cjs';
4
- import '../product-B8elBN21.cjs';
2
+ import { C as Cart, c as Coupon } from '../cart-CyN2JQTw.cjs';
3
+ import { O as Order } from '../orders-9_scVq_M.cjs';
4
+ import '../product-CZtFWhxO.cjs';
5
5
  import 'react-toastify';
6
6
 
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  import * as Yup from 'yup';
2
- import { C as Cart, c as Coupon } from '../cart-DV1HcSC6.js';
3
- import { O as Order } from '../orders-CGhcSTMg.js';
4
- import '../product-B8elBN21.js';
2
+ import { C as Cart, c as Coupon } from '../cart-BGIsIZdM.js';
3
+ import { O as Order } from '../orders-C1XZr8tx.js';
4
+ import '../product-CZtFWhxO.js';
5
5
  import 'react-toastify';
6
6
 
7
7
  /**
@@ -1,7 +1,7 @@
1
- export { applyCheckoutCoupon, fetchAppliedCoupon, fetchAvailableCoupons, handleCODPayment, handlePhonepePayment, handleRazorpayFail, handleRazorpaySuccess, handleStripePayment, handleStripeSuccess, handleTabbyPayment, openRazorpayCheckout, processPayment, removeCheckoutCoupon } from '../chunk-CEVCKVNX.js';
1
+ export { applyCheckoutCoupon, fetchAppliedCoupon, fetchAvailableCoupons, handleCODPayment, handlePhonepePayment, handleRazorpayFail, handleRazorpaySuccess, handleStripePayment, handleStripeSuccess, handleTabbyPayment, openRazorpayCheckout, processPayment, removeCheckoutCoupon } from '../chunk-VYHAWRJR.js';
2
2
  import '../chunk-7M5CVYZJ.js';
3
3
  import { pixelEvents } from '../chunk-WFDKKOO7.js';
4
- import { checkPhonepePaymentStatus, getOrderDetailsByNumber, getStripePaymentStatusPublic, getStripePaymentStatus, verifyTabbyPayment } from '../chunk-S3ZZ3ZA7.js';
4
+ import { checkPhonepePaymentStatus, getOrderDetailsByNumber, getStripePaymentStatusPublic, getStripePaymentStatus, verifyTabbyPayment } from '../chunk-ME6Z7TZW.js';
5
5
  export { IP_API_CACHE_KEY, addressFormInitialValues, addressValidationSchema, buildAddressPayload, buildSubmitPayload, clearAddressFormSession, decodeAddress, encodeAddress, isValidPhoneNumber, loadAddressFormFromSession, parseEditAddress, sanitizePhoneNumber, saveAddressFormToSession } from '../chunk-ELP23UGF.js';
6
6
  import '../chunk-3SYYP3XV.js';
7
7
  import '../chunk-WEMNXIRS.js';
@@ -102,7 +102,7 @@ async function checkStripeReturnStatus(sessionId, orderNumber, paymentLinkUrl, c
102
102
  async function checkTabbyReturnStatus(orderNumber, callbacks) {
103
103
  try {
104
104
  const response = await verifyTabbyPayment(orderNumber);
105
- if (response.data.order_status === "paid" || response.data.order_status === "confirmed") {
105
+ if (response.data.order_status === "paid" || response.data.order_status === "confirmed" || response.data.status === "paid") {
106
106
  try {
107
107
  const orderResponse = await getOrderDetailsByNumber(orderNumber);
108
108
  const order = orderResponse.data;
@@ -1,5 +1,5 @@
1
1
  import { ShareIcon } from './chunk-U7EXLQCT.js';
2
- import { shareLink, convertToCurrency } from './chunk-F45S7UWC.js';
2
+ import { shareLink, convertToCurrency } from './chunk-CBKJ3Y2I.js';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
5
5
  var ShareButton = ({
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ var chunkBBRB475I_cjs = require('./chunk-BBRB475I.cjs');
4
+
3
5
  // src/utils/misc.ts
4
6
  function convertObjectToParams(params) {
5
7
  const cleanedParams = Object.fromEntries(
@@ -149,6 +151,83 @@ async function getAddressMeta(countryCode) {
149
151
  hasPostal: !!data.zip_name_type
150
152
  };
151
153
  }
154
+ function getOrderStatus(order) {
155
+ switch (order.order_status) {
156
+ case "pending":
157
+ return {
158
+ title: "Order yet to confirm by the seller",
159
+ info: "We are waiting for the seller to confirm your order. This usually takes less than 24 hours."
160
+ };
161
+ case "confirmed":
162
+ return {
163
+ title: "Order confirmed",
164
+ info: "Your order has been confirmed and is being processed. You will receive a notification once it is dispatched."
165
+ };
166
+ case "packed":
167
+ return {
168
+ title: "Order packed",
169
+ info: "Your order has been packed and is ready for dispatch. You will receive a notification once it is shipped."
170
+ };
171
+ case "shipped":
172
+ return {
173
+ title: order.delivered_at ? `Arriving by ${formatDateTime(order.delivered_at)}` : "Order shipped",
174
+ info: `Your order has been shipped and is on its way to you. ${order.tracking_id ? `Track your order using ${order.tracking_id}` : ""}`
175
+ };
176
+ case "delivered":
177
+ if (!order.delivered_at) {
178
+ return {
179
+ title: "Delivered"
180
+ };
181
+ }
182
+ const deliveredDate = new Date(order.delivered_at);
183
+ const currentDate = /* @__PURE__ */ new Date();
184
+ const diffTime = currentDate.getTime() - deliveredDate.getTime();
185
+ const difference = Math.floor(diffTime / (1e3 * 60 * 60 * 24));
186
+ if (difference < 3) {
187
+ return {
188
+ title: `Delivered ${chunkBBRB475I_cjs.timeFromNow(order.delivered_at)}`
189
+ };
190
+ }
191
+ return {
192
+ title: `Delivered on ${formatDateTime(order.delivered_at)}`
193
+ };
194
+ case "failed":
195
+ return {
196
+ title: "Order failed",
197
+ info: "Your order has failed. If you have any queries, please contact customer support"
198
+ };
199
+ case "cancelled":
200
+ return {
201
+ title: "Cancelled",
202
+ info: "Your order has been cancelled. If you have any queries, please contact customer support"
203
+ };
204
+ case "paid":
205
+ return {
206
+ title: "Order placed, Thank you",
207
+ info: "Your order has been placed successfully. Order status will be updated soon."
208
+ };
209
+ case "payment_pending":
210
+ return {
211
+ title: "Payment pending",
212
+ info: "Your order has not been placed. Please retry your payment to proceed."
213
+ };
214
+ case "refunded":
215
+ return {
216
+ title: "Refunded",
217
+ info: "Your order has been refunded. If you have any queries, please contact customer support."
218
+ };
219
+ case "returned":
220
+ return {
221
+ title: "Returned",
222
+ info: "Your order has been returned. If you have any queries, please contact customer support."
223
+ };
224
+ default:
225
+ return {
226
+ title: "Purchase successful",
227
+ info: "Your order has been placed successfully. Order status will be updated soon."
228
+ };
229
+ }
230
+ }
152
231
 
153
232
  exports.constructFilter = constructFilter;
154
233
  exports.convertObjectToParams = convertObjectToParams;
@@ -158,6 +237,7 @@ exports.formatDateTime = formatDateTime;
158
237
  exports.formatPostalLabel = formatPostalLabel;
159
238
  exports.getAddressMeta = getAddressMeta;
160
239
  exports.getDelayInMilliseconds = getDelayInMilliseconds;
240
+ exports.getOrderStatus = getOrderStatus;
161
241
  exports.getParamsFromURL = getParamsFromURL;
162
242
  exports.getQueryParams = getQueryParams;
163
243
  exports.pluralize = pluralize;
@@ -1,6 +1,6 @@
1
1
  import { updateCart, removeFromCart, addToCart, getCart, getCartItemQuantity } from './chunk-CUR7CHR5.js';
2
2
  import { cart_default } from './chunk-QAC72HKO.js';
3
- import { updateOrderCustomization } from './chunk-S3ZZ3ZA7.js';
3
+ import { updateOrderCustomization } from './chunk-ME6Z7TZW.js';
4
4
  import { auth_default } from './chunk-WEMNXIRS.js';
5
5
  import { USER_CRED_TOKEN, USER_CREDENTIALS } from './chunk-BQ256JKN.js';
6
6
  import { create } from 'zustand';
@@ -19,12 +19,12 @@ var useCartStore = create((set) => ({
19
19
  if (!state.cart) return { ...state, total_quantity: 0 };
20
20
  return { cart: { ...state.cart, total_quantity: 0 }, total_quantity: 0 };
21
21
  }),
22
- fetchCartQuantity: async () => {
22
+ fetchCartItemQuantity: async () => {
23
23
  try {
24
24
  const { total_quantity } = await getCartItemQuantity();
25
25
  set({ total_quantity });
26
26
  } catch (error) {
27
- console.error("Failed to fetch cart quantity", error);
27
+ console.error("Failed to fetch cart item quantity", error);
28
28
  }
29
29
  },
30
30
  syncCart: async (addressId, shippingOptionId) => {