@storepecker/storefront-core 2.3.1 → 2.3.3

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 (51) hide show
  1. package/dist/api/index.cjs +52 -51
  2. package/dist/api/index.d.cts +6 -6
  3. package/dist/api/index.d.ts +6 -6
  4. package/dist/api/index.js +3 -2
  5. package/dist/{booking-BSZ6NP-e.d.ts → booking-BVWe8HHh.d.ts} +1 -1
  6. package/dist/{booking-BGvxHd-t.d.cts → booking-DX9SU_qm.d.cts} +1 -1
  7. package/dist/{cart-XumsY-y0.d.cts → cart-kJoawc_Z.d.cts} +4 -1
  8. package/dist/{cart-CfsntcpS.d.ts → cart-y-7RPmnQ.d.ts} +4 -1
  9. package/dist/checkout/index.cjs +40 -35
  10. package/dist/checkout/index.d.cts +9 -4
  11. package/dist/checkout/index.d.ts +9 -4
  12. package/dist/checkout/index.js +4 -3
  13. package/dist/chunk-7M5CVYZJ.js +17 -0
  14. package/dist/{chunk-X35IATPX.js → chunk-ANTJLYQD.js} +12 -1
  15. package/dist/{chunk-65Z7I5UP.cjs → chunk-BTT3XQ32.cjs} +11 -10
  16. package/dist/{chunk-B7FOXIZN.js → chunk-ELP23UGF.js} +27 -2
  17. package/dist/{chunk-CV6DWPYF.cjs → chunk-HTFVROIV.cjs} +0 -18
  18. package/dist/{chunk-AFM4IJVE.js → chunk-ILVGYHNI.js} +1 -1
  19. package/dist/{chunk-665CNTEX.cjs → chunk-JCOOINQF.cjs} +5 -5
  20. package/dist/{chunk-VWFZZFZL.js → chunk-LW3V53WJ.js} +1 -15
  21. package/dist/{chunk-47XTPPII.cjs → chunk-TB72NPRM.cjs} +27 -1
  22. package/dist/{chunk-YEJZYH55.js → chunk-U25T7M6S.js} +2 -1
  23. package/dist/{chunk-Z4DBCDAH.cjs → chunk-WZ6I3N4O.cjs} +17 -6
  24. package/dist/chunk-XFOUNOKO.cjs +22 -0
  25. package/dist/{chunk-6BVTMDR2.cjs → chunk-Y2CPMT34.cjs} +2 -1
  26. package/dist/{chunk-27MTKBJL.js → chunk-Y4NGR42Z.js} +2 -1
  27. package/dist/{collections-D4tvWcZp.d.ts → collections-BDSVfRNo.d.ts} +1 -1
  28. package/dist/{collections-dCr3VEJo.d.cts → collections-WzvTO0OQ.d.cts} +1 -1
  29. package/dist/components/index.cjs +3 -3
  30. package/dist/components/index.d.cts +2 -2
  31. package/dist/components/index.d.ts +2 -2
  32. package/dist/components/index.js +2 -2
  33. package/dist/hooks/index.cjs +28 -27
  34. package/dist/hooks/index.d.cts +4 -4
  35. package/dist/hooks/index.d.ts +4 -4
  36. package/dist/hooks/index.js +7 -6
  37. package/dist/models/index.d.cts +6 -6
  38. package/dist/models/index.d.ts +6 -6
  39. package/dist/{orders-Dm5Dq02y.d.cts → orders-CjNmCY5I.d.cts} +1 -1
  40. package/dist/{orders-CvCa7XWm.d.ts → orders-L_8eIkUS.d.ts} +1 -1
  41. package/dist/{product-Daxj09p9.d.cts → product-DJMdi4D4.d.cts} +4 -0
  42. package/dist/{product-Daxj09p9.d.ts → product-DJMdi4D4.d.ts} +4 -0
  43. package/dist/store/index.cjs +8 -7
  44. package/dist/store/index.d.cts +8 -3
  45. package/dist/store/index.d.ts +8 -3
  46. package/dist/store/index.js +3 -2
  47. package/dist/utils/index.d.cts +5 -5
  48. package/dist/utils/index.d.ts +5 -5
  49. package/dist/{wishlist-Cow1wVqf.d.cts → wishlist-CUuCTSVJ.d.cts} +1 -1
  50. package/dist/{wishlist-gamNg0T1.d.ts → wishlist-DKYFZR0s.d.ts} +1 -1
  51. package/package.json +1 -1
@@ -2,16 +2,17 @@
2
2
 
3
3
  var chunkY46EHRJQ_cjs = require('../chunk-Y46EHRJQ.cjs');
4
4
  var chunk2AHH3XBW_cjs = require('../chunk-2AHH3XBW.cjs');
5
- var chunkZ4DBCDAH_cjs = require('../chunk-Z4DBCDAH.cjs');
6
- var chunk6BVTMDR2_cjs = require('../chunk-6BVTMDR2.cjs');
5
+ var chunkWZ6I3N4O_cjs = require('../chunk-WZ6I3N4O.cjs');
6
+ var chunkY2CPMT34_cjs = require('../chunk-Y2CPMT34.cjs');
7
7
  var chunkSMHJRNCR_cjs = require('../chunk-SMHJRNCR.cjs');
8
- var chunk65Z7I5UP_cjs = require('../chunk-65Z7I5UP.cjs');
9
- var chunkCV6DWPYF_cjs = require('../chunk-CV6DWPYF.cjs');
8
+ var chunkBTT3XQ32_cjs = require('../chunk-BTT3XQ32.cjs');
9
+ var chunkXFOUNOKO_cjs = require('../chunk-XFOUNOKO.cjs');
10
10
  require('../chunk-K44JZ5NL.cjs');
11
- var chunk665CNTEX_cjs = require('../chunk-665CNTEX.cjs');
11
+ var chunkHTFVROIV_cjs = require('../chunk-HTFVROIV.cjs');
12
+ var chunkJCOOINQF_cjs = require('../chunk-JCOOINQF.cjs');
12
13
  var chunkRDUT4W3B_cjs = require('../chunk-RDUT4W3B.cjs');
13
14
  var chunk4CVKE6CC_cjs = require('../chunk-4CVKE6CC.cjs');
14
- require('../chunk-47XTPPII.cjs');
15
+ require('../chunk-TB72NPRM.cjs');
15
16
  require('../chunk-ECHV2JSY.cjs');
16
17
  require('../chunk-BBRXE57K.cjs');
17
18
  require('../chunk-NE3ZHELZ.cjs');
@@ -53,7 +54,7 @@ var useCart = (addressId) => {
53
54
  async (addrId) => {
54
55
  try {
55
56
  setIsLoading(true);
56
- const result = await chunk6BVTMDR2_cjs.getCart("/customer/cart/", addrId ?? addressId);
57
+ const result = await chunkY2CPMT34_cjs.getCart("/customer/cart/", addrId ?? addressId);
57
58
  setData(result);
58
59
  setError(null);
59
60
  } catch (err) {
@@ -88,7 +89,7 @@ var useOrders = (filters) => {
88
89
  try {
89
90
  setIsLoading(true);
90
91
  const url = `/customer/order/?${queryString}`;
91
- const result = await chunkCV6DWPYF_cjs.getOrders(url);
92
+ const result = await chunkHTFVROIV_cjs.getOrders(url);
92
93
  setData(result);
93
94
  setError(null);
94
95
  } catch (err) {
@@ -125,7 +126,7 @@ function useGetProducts(initialFilter, options) {
125
126
  apiParams[key] = value;
126
127
  }
127
128
  }
128
- const result = await chunk6BVTMDR2_cjs.getProductList(endpoint, apiParams);
129
+ const result = await chunkY2CPMT34_cjs.getProductList(endpoint, apiParams);
129
130
  setData(result);
130
131
  if (modeRef.current === "append" && isLoadMoreRef.current) {
131
132
  setProducts((prev) => [...prev, ...result.results || []]);
@@ -193,7 +194,7 @@ var useGetProductDetails = (slug) => {
193
194
  const fetchData = react.useCallback(async () => {
194
195
  try {
195
196
  setIsLoading(true);
196
- const result = await chunk6BVTMDR2_cjs.getProductDetail("/inventory/products/", slug);
197
+ const result = await chunkY2CPMT34_cjs.getProductDetail("/inventory/products/", slug);
197
198
  setData(result);
198
199
  } catch (err) {
199
200
  } finally {
@@ -216,7 +217,7 @@ var useGetProductCategories = () => {
216
217
  const fetchData = async () => {
217
218
  try {
218
219
  setIsLoading(true);
219
- const result = await chunk6BVTMDR2_cjs.getProductCategories("/store/categories");
220
+ const result = await chunkY2CPMT34_cjs.getProductCategories("/store/categories");
220
221
  setData(result || []);
221
222
  } catch (err) {
222
223
  setError(err);
@@ -261,7 +262,7 @@ var useWishlist = () => {
261
262
  const fetchData = react.useCallback(async () => {
262
263
  try {
263
264
  setIsLoading(true);
264
- const response = await chunk6BVTMDR2_cjs.getWishlist("/customer/wishlist/");
265
+ const response = await chunkY2CPMT34_cjs.getWishlist("/customer/wishlist/");
265
266
  if (response.data) setData(response.data);
266
267
  setError(null);
267
268
  } catch (err) {
@@ -319,7 +320,7 @@ function useCheckoutPayment(options) {
319
320
  const [isConfirmingPayment, setIsConfirmingPayment] = react.useState(false);
320
321
  const [showSuccessModal, setShowSuccessModal] = react.useState(false);
321
322
  const [showFailureModal, setShowFailureModal] = react.useState(false);
322
- const resetCartCount = chunkZ4DBCDAH_cjs.useCartStore((s) => s.resetCartCount);
323
+ const resetCartCount = chunkWZ6I3N4O_cjs.useCartStore((s) => s.resetCartCount);
323
324
  const callbacks = {
324
325
  onSuccess: (order) => {
325
326
  setOrderSummary(order);
@@ -342,7 +343,7 @@ function useCheckoutPayment(options) {
342
343
  try {
343
344
  setIsPlacingOrder(true);
344
345
  const isCod = paymentMethod === "cod";
345
- const response = await chunkCV6DWPYF_cjs.placeOrder(
346
+ const response = await chunkHTFVROIV_cjs.placeOrder(
346
347
  addressId,
347
348
  options.phonepeRedirectUrl,
348
349
  isCod,
@@ -351,7 +352,7 @@ function useCheckoutPayment(options) {
351
352
  );
352
353
  const order = response.data;
353
354
  setOrderSummary(order);
354
- chunk65Z7I5UP_cjs.processPayment(order, paymentMethod, callbacks);
355
+ chunkBTT3XQ32_cjs.processPayment(order, paymentMethod, callbacks);
355
356
  } catch {
356
357
  setShowFailureModal(true);
357
358
  } finally {
@@ -381,7 +382,7 @@ function useCheckoutCoupon(options) {
381
382
  const refreshCoupons = react.useCallback(async () => {
382
383
  setIsLoading(true);
383
384
  try {
384
- const coupons = await chunk65Z7I5UP_cjs.fetchAvailableCoupons();
385
+ const coupons = await chunkBTT3XQ32_cjs.fetchAvailableCoupons();
385
386
  setAvailableCoupons(coupons);
386
387
  } catch {
387
388
  } finally {
@@ -393,7 +394,7 @@ function useCheckoutCoupon(options) {
393
394
  setError(null);
394
395
  setIsApplying(true);
395
396
  try {
396
- const coupon = await chunk65Z7I5UP_cjs.applyCheckoutCoupon(code, callbacks);
397
+ const coupon = await chunkBTT3XQ32_cjs.applyCheckoutCoupon(code, callbacks);
397
398
  setAppliedCoupon(coupon);
398
399
  } catch (err) {
399
400
  setError(err instanceof Error ? err.message : "Failed to apply coupon");
@@ -406,7 +407,7 @@ function useCheckoutCoupon(options) {
406
407
  const removeCouponHandler = react.useCallback(async () => {
407
408
  if (!appliedCoupon) return;
408
409
  try {
409
- await chunk65Z7I5UP_cjs.removeCheckoutCoupon(appliedCoupon.coupon_code, callbacks);
410
+ await chunkBTT3XQ32_cjs.removeCheckoutCoupon(appliedCoupon.coupon_code, callbacks);
410
411
  setAppliedCoupon(null);
411
412
  setError(null);
412
413
  } catch {
@@ -505,8 +506,8 @@ function useVariantSelector(options) {
505
506
  }
506
507
  function useShopCheckout(options) {
507
508
  const { product, onNavigateToCart, onToast } = options;
508
- const { addToCart, setCart } = chunkZ4DBCDAH_cjs.useCartStore();
509
- const isUserAuthenticated = chunkZ4DBCDAH_cjs.useAuthStore((s) => s.isAuthenticated);
509
+ const { addToCart, setCart } = chunkWZ6I3N4O_cjs.useCartStore();
510
+ const isUserAuthenticated = chunkWZ6I3N4O_cjs.useAuthStore((s) => s.isAuthenticated);
510
511
  const [isWishlisted, setIsWishlisted] = react.useState(product.is_wishlisted);
511
512
  const [isAddedToCart, setIsAddedToCart] = react.useState(false);
512
513
  const [loading, setLoading] = react.useState(false);
@@ -517,7 +518,7 @@ function useShopCheckout(options) {
517
518
  react.useEffect(() => {
518
519
  const fetchCategories = async () => {
519
520
  try {
520
- const response = await chunk6BVTMDR2_cjs.getCategories();
521
+ const response = await chunkY2CPMT34_cjs.getCategories();
521
522
  setCategories(response.data);
522
523
  } catch (error) {
523
524
  console.log(error);
@@ -631,7 +632,7 @@ function useShopCheckout(options) {
631
632
  const handleNotifyMeFormSubmit = react.useCallback(
632
633
  async (values) => {
633
634
  try {
634
- const response = await chunk6BVTMDR2_cjs.notifyProductStock({
635
+ const response = await chunkY2CPMT34_cjs.notifyProductStock({
635
636
  ...values,
636
637
  variant_slug: product.slug
637
638
  });
@@ -694,7 +695,7 @@ function useCoupon(options = {}) {
694
695
  react.useEffect(() => {
695
696
  const fetchCoupons = async () => {
696
697
  try {
697
- const response = await chunkCV6DWPYF_cjs.getCoupons();
698
+ const response = await chunkXFOUNOKO_cjs.getCoupons();
698
699
  if (response.data) {
699
700
  setAvailableCoupons(response.data);
700
701
  }
@@ -703,7 +704,7 @@ function useCoupon(options = {}) {
703
704
  };
704
705
  const fetchAppliedCoupon2 = async () => {
705
706
  try {
706
- const response = await chunkCV6DWPYF_cjs.getAppliedCoupon();
707
+ const response = await chunkXFOUNOKO_cjs.getAppliedCoupon();
707
708
  if (response.data) {
708
709
  setAppliedCoupon(response.data);
709
710
  }
@@ -724,7 +725,7 @@ function useCoupon(options = {}) {
724
725
  try {
725
726
  setCouponApplyingLoading(true);
726
727
  setCouponApplyingError(null);
727
- const response = await chunkCV6DWPYF_cjs.applyCoupon(code);
728
+ const response = await chunkXFOUNOKO_cjs.applyCoupon(code);
728
729
  if (response.data) {
729
730
  onCouponStatusChange?.(response.data.coupon);
730
731
  setAppliedCoupon(response.data.coupon);
@@ -742,7 +743,7 @@ function useCoupon(options = {}) {
742
743
  const handleRemoveCoupon = react.useCallback(async () => {
743
744
  if (!appliedCoupon) return;
744
745
  try {
745
- const response = await chunkCV6DWPYF_cjs.removeCoupon(appliedCoupon.coupon_code);
746
+ const response = await chunkXFOUNOKO_cjs.removeCoupon(appliedCoupon.coupon_code);
746
747
  if (response.data) {
747
748
  setAppliedCoupon(null);
748
749
  onCouponStatusChange?.(null);
@@ -766,7 +767,7 @@ function useCoupon(options = {}) {
766
767
 
767
768
  Object.defineProperty(exports, "useAddressForm", {
768
769
  enumerable: true,
769
- get: function () { return chunk665CNTEX_cjs.useAddressForm; }
770
+ get: function () { return chunkJCOOINQF_cjs.useAddressForm; }
770
771
  });
771
772
  exports.useAddress = useAddress;
772
773
  exports.useCart = useCart;
@@ -1,9 +1,9 @@
1
1
  import { A as Address } from '../address-DwBZHzbI.cjs';
2
2
  import * as React from 'react';
3
- import { C as Cart, b as Category, U as User, c as Coupon } from '../cart-XumsY-y0.cjs';
4
- import { O as Order } from '../orders-Dm5Dq02y.cjs';
5
- import { d as Product, f as ProductDetail, e as ProductAttribute, A as Attributes } from '../product-Daxj09p9.cjs';
6
- import { W as Wishlist } from '../wishlist-Cow1wVqf.cjs';
3
+ import { C as Cart, b as Category, U as User, c as Coupon } from '../cart-kJoawc_Z.cjs';
4
+ import { O as Order } from '../orders-CjNmCY5I.cjs';
5
+ import { d as Product, f as ProductDetail, e as ProductAttribute, A as Attributes } from '../product-DJMdi4D4.cjs';
6
+ import { W as Wishlist } from '../wishlist-CUuCTSVJ.cjs';
7
7
  export { U as UseAddressFormOptions, a as UseAddressFormReturn, u as useAddressForm } from '../useAddressForm-DGbEn91-.cjs';
8
8
  import 'react-toastify';
9
9
  import 'formik';
@@ -1,9 +1,9 @@
1
1
  import { A as Address } from '../address-DwBZHzbI.js';
2
2
  import * as React from 'react';
3
- import { C as Cart, b as Category, U as User, c as Coupon } from '../cart-CfsntcpS.js';
4
- import { O as Order } from '../orders-CvCa7XWm.js';
5
- import { d as Product, f as ProductDetail, e as ProductAttribute, A as Attributes } from '../product-Daxj09p9.js';
6
- import { W as Wishlist } from '../wishlist-gamNg0T1.js';
3
+ import { C as Cart, b as Category, U as User, c as Coupon } from '../cart-y-7RPmnQ.js';
4
+ import { O as Order } from '../orders-L_8eIkUS.js';
5
+ import { d as Product, f as ProductDetail, e as ProductAttribute, A as Attributes } from '../product-DJMdi4D4.js';
6
+ import { W as Wishlist } from '../wishlist-DKYFZR0s.js';
7
7
  export { U as UseAddressFormOptions, a as UseAddressFormReturn, u as useAddressForm } from '../useAddressForm-cO3Au33k.js';
8
8
  import 'react-toastify';
9
9
  import 'formik';
@@ -1,15 +1,16 @@
1
1
  import { getUserDetails } from '../chunk-WYXT5AAG.js';
2
2
  import { findMatchingVariant, findSimilarVariant, isVariantCombinationAvailable, isColorVariantType } from '../chunk-HEFA67WK.js';
3
- import { useCartStore, useAuthStore } from '../chunk-X35IATPX.js';
4
- import { getCart, getProductList, getProductDetail, getWishlist, notifyProductStock, getProductCategories, getCategories } from '../chunk-YEJZYH55.js';
3
+ import { useCartStore, useAuthStore } from '../chunk-ANTJLYQD.js';
4
+ import { getCart, getProductList, getProductDetail, getWishlist, notifyProductStock, getProductCategories, getCategories } from '../chunk-U25T7M6S.js';
5
5
  import { cart_default } from '../chunk-QAC72HKO.js';
6
- import { processPayment, fetchAvailableCoupons, applyCheckoutCoupon, removeCheckoutCoupon } from '../chunk-27MTKBJL.js';
7
- import { getOrders, placeOrder, applyCoupon, removeCoupon, getCoupons, getAppliedCoupon } from '../chunk-VWFZZFZL.js';
6
+ import { processPayment, fetchAvailableCoupons, applyCheckoutCoupon, removeCheckoutCoupon } from '../chunk-Y4NGR42Z.js';
7
+ import { applyCoupon, removeCoupon, getCoupons, getAppliedCoupon } from '../chunk-7M5CVYZJ.js';
8
8
  import '../chunk-WFDKKOO7.js';
9
- export { useAddressForm } from '../chunk-AFM4IJVE.js';
9
+ import { getOrders, placeOrder } from '../chunk-LW3V53WJ.js';
10
+ export { useAddressForm } from '../chunk-ILVGYHNI.js';
10
11
  import { getAddresses } from '../chunk-ZGMLOLTC.js';
11
12
  import { shareLink, convertToCurrency } from '../chunk-YUPBTD4M.js';
12
- import '../chunk-B7FOXIZN.js';
13
+ import '../chunk-ELP23UGF.js';
13
14
  import '../chunk-3SYYP3XV.js';
14
15
  import '../chunk-WEMNXIRS.js';
15
16
  import '../chunk-BQ256JKN.js';
@@ -1,11 +1,11 @@
1
1
  export { A as Address } from '../address-DwBZHzbI.cjs';
2
- export { A as Analytics, B as Booking, a as BookingDetails, R as Review } from '../booking-BGvxHd-t.cjs';
3
- export { A as ApplicableTarget, C as Cart, a as CartState, b as Category, c as Coupon, d as CouponResponse, e as CouponStatus, f as Coupons, D as DiscountType, U as User, V as ValueType } from '../cart-XumsY-y0.cjs';
4
- export { A as CollectionAttributes, C as CollectionResponse, s as singleCollection } from '../collections-dCr3VEJo.cjs';
5
- export { O as Order } from '../orders-Dm5Dq02y.cjs';
2
+ export { A as Analytics, B as Booking, a as BookingDetails, R as Review } from '../booking-DX9SU_qm.cjs';
3
+ export { A as ApplicableTarget, C as Cart, a as CartState, b as Category, c as Coupon, d as CouponResponse, e as CouponStatus, f as Coupons, D as DiscountType, U as User, V as ValueType } from '../cart-kJoawc_Z.cjs';
4
+ export { A as CollectionAttributes, C as CollectionResponse, s as singleCollection } from '../collections-WzvTO0OQ.cjs';
5
+ export { O as Order } from '../orders-CjNmCY5I.cjs';
6
6
  export { D as Data, P as PaymentInstrument, a as PhonePe } from '../phonepe-dWMLZel6.cjs';
7
- export { A as Attributes, B as BaseProduct, a as BookingService, b as BookingServiceDate, c as Brand, C as CustomField, O as OperatingHours, P as Photos, d as Product, e as ProductAttribute, f as ProductDetail, S as SpecialHours, T as TimeSlot, W as WishlistState } from '../product-Daxj09p9.cjs';
8
- export { W as Wishlist } from '../wishlist-Cow1wVqf.cjs';
7
+ export { A as Attributes, B as BaseProduct, a as BookingService, b as BookingServiceDate, c as Brand, C as CustomField, O as OperatingHours, P as Photos, d as Product, e as ProductAttribute, f as ProductDetail, S as SpecialHours, T as TimeSlot, W as WishlistState } from '../product-DJMdi4D4.cjs';
8
+ export { W as Wishlist } from '../wishlist-CUuCTSVJ.cjs';
9
9
  import 'react-toastify';
10
10
 
11
11
  declare namespace CountryModel {
@@ -1,11 +1,11 @@
1
1
  export { A as Address } from '../address-DwBZHzbI.js';
2
- export { A as Analytics, B as Booking, a as BookingDetails, R as Review } from '../booking-BSZ6NP-e.js';
3
- export { A as ApplicableTarget, C as Cart, a as CartState, b as Category, c as Coupon, d as CouponResponse, e as CouponStatus, f as Coupons, D as DiscountType, U as User, V as ValueType } from '../cart-CfsntcpS.js';
4
- export { A as CollectionAttributes, C as CollectionResponse, s as singleCollection } from '../collections-D4tvWcZp.js';
5
- export { O as Order } from '../orders-CvCa7XWm.js';
2
+ export { A as Analytics, B as Booking, a as BookingDetails, R as Review } from '../booking-BVWe8HHh.js';
3
+ export { A as ApplicableTarget, C as Cart, a as CartState, b as Category, c as Coupon, d as CouponResponse, e as CouponStatus, f as Coupons, D as DiscountType, U as User, V as ValueType } from '../cart-y-7RPmnQ.js';
4
+ export { A as CollectionAttributes, C as CollectionResponse, s as singleCollection } from '../collections-BDSVfRNo.js';
5
+ export { O as Order } from '../orders-L_8eIkUS.js';
6
6
  export { D as Data, P as PaymentInstrument, a as PhonePe } from '../phonepe-dWMLZel6.js';
7
- export { A as Attributes, B as BaseProduct, a as BookingService, b as BookingServiceDate, c as Brand, C as CustomField, O as OperatingHours, P as Photos, d as Product, e as ProductAttribute, f as ProductDetail, S as SpecialHours, T as TimeSlot, W as WishlistState } from '../product-Daxj09p9.js';
8
- export { W as Wishlist } from '../wishlist-gamNg0T1.js';
7
+ export { A as Attributes, B as BaseProduct, a as BookingService, b as BookingServiceDate, c as Brand, C as CustomField, O as OperatingHours, P as Photos, d as Product, e as ProductAttribute, f as ProductDetail, S as SpecialHours, T as TimeSlot, W as WishlistState } from '../product-DJMdi4D4.js';
8
+ export { W as Wishlist } from '../wishlist-DKYFZR0s.js';
9
9
  import 'react-toastify';
10
10
 
11
11
  declare namespace CountryModel {
@@ -1,4 +1,4 @@
1
- import { P as Photos } from './product-Daxj09p9.cjs';
1
+ import { P as Photos } from './product-DJMdi4D4.cjs';
2
2
 
3
3
  declare namespace Order {
4
4
  interface Root {
@@ -1,4 +1,4 @@
1
- import { P as Photos } from './product-Daxj09p9.js';
1
+ import { P as Photos } from './product-DJMdi4D4.js';
2
2
 
3
3
  declare namespace Order {
4
4
  interface Root {
@@ -53,6 +53,7 @@ declare namespace Product {
53
53
  actual_price: string;
54
54
  selling_price: string;
55
55
  stock_quantity: number;
56
+ available_quantity: number;
56
57
  product: Product;
57
58
  is_active: boolean;
58
59
  is_featured: boolean;
@@ -105,6 +106,7 @@ declare namespace Product {
105
106
  actual_price: string;
106
107
  selling_price: string;
107
108
  stock_quantity: number;
109
+ available_quantity: number;
108
110
  product: Product;
109
111
  is_active: boolean;
110
112
  is_featured: boolean;
@@ -208,6 +210,7 @@ declare namespace ProductDetail {
208
210
  actual_price: string;
209
211
  selling_price: string;
210
212
  stock_quantity: number;
213
+ available_quantity: number;
211
214
  product: Product;
212
215
  is_featured: boolean;
213
216
  product_measurements: string;
@@ -267,6 +270,7 @@ declare namespace ProductDetail {
267
270
  actual_price: string;
268
271
  selling_price: string;
269
272
  stock_quantity: number;
273
+ available_quantity: number;
270
274
  product: Product;
271
275
  is_featured: boolean;
272
276
  product_measurements: string;
@@ -53,6 +53,7 @@ declare namespace Product {
53
53
  actual_price: string;
54
54
  selling_price: string;
55
55
  stock_quantity: number;
56
+ available_quantity: number;
56
57
  product: Product;
57
58
  is_active: boolean;
58
59
  is_featured: boolean;
@@ -105,6 +106,7 @@ declare namespace Product {
105
106
  actual_price: string;
106
107
  selling_price: string;
107
108
  stock_quantity: number;
109
+ available_quantity: number;
108
110
  product: Product;
109
111
  is_active: boolean;
110
112
  is_featured: boolean;
@@ -208,6 +210,7 @@ declare namespace ProductDetail {
208
210
  actual_price: string;
209
211
  selling_price: string;
210
212
  stock_quantity: number;
213
+ available_quantity: number;
211
214
  product: Product;
212
215
  is_featured: boolean;
213
216
  product_measurements: string;
@@ -267,6 +270,7 @@ declare namespace ProductDetail {
267
270
  actual_price: string;
268
271
  selling_price: string;
269
272
  stock_quantity: number;
273
+ available_quantity: number;
270
274
  product: Product;
271
275
  is_featured: boolean;
272
276
  product_measurements: string;
@@ -1,8 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkZ4DBCDAH_cjs = require('../chunk-Z4DBCDAH.cjs');
4
- var chunk6BVTMDR2_cjs = require('../chunk-6BVTMDR2.cjs');
3
+ var chunkWZ6I3N4O_cjs = require('../chunk-WZ6I3N4O.cjs');
4
+ var chunkY2CPMT34_cjs = require('../chunk-Y2CPMT34.cjs');
5
5
  require('../chunk-SMHJRNCR.cjs');
6
+ require('../chunk-HTFVROIV.cjs');
6
7
  require('../chunk-ECHV2JSY.cjs');
7
8
  require('../chunk-BBRXE57K.cjs');
8
9
  require('../chunk-NE3ZHELZ.cjs');
@@ -19,7 +20,7 @@ var useWishlistStore = zustand.create((set) => ({
19
20
  resetWishlist: () => set(initialState),
20
21
  syncWishlist: async () => {
21
22
  try {
22
- const response = await chunk6BVTMDR2_cjs.getWishlist("/customer/wishlist/");
23
+ const response = await chunkY2CPMT34_cjs.getWishlist("/customer/wishlist/");
23
24
  if (response.data) {
24
25
  set({
25
26
  wishlist_count: response.data.wishlist_count,
@@ -47,7 +48,7 @@ var useProductStore = zustand.create((set, get) => ({
47
48
  data: filter.page === 1 ? [] : state.data
48
49
  }));
49
50
  try {
50
- const response = await chunk6BVTMDR2_cjs.getProducts({ ...filter });
51
+ const response = await chunkY2CPMT34_cjs.getProducts({ ...filter });
51
52
  if (response.data) {
52
53
  const { results, ...meta } = response.data;
53
54
  set((state) => ({
@@ -67,15 +68,15 @@ var useProductStore = zustand.create((set, get) => ({
67
68
 
68
69
  Object.defineProperty(exports, "loginUser", {
69
70
  enumerable: true,
70
- get: function () { return chunkZ4DBCDAH_cjs.loginUser; }
71
+ get: function () { return chunkWZ6I3N4O_cjs.loginUser; }
71
72
  });
72
73
  Object.defineProperty(exports, "useAuthStore", {
73
74
  enumerable: true,
74
- get: function () { return chunkZ4DBCDAH_cjs.useAuthStore; }
75
+ get: function () { return chunkWZ6I3N4O_cjs.useAuthStore; }
75
76
  });
76
77
  Object.defineProperty(exports, "useCartStore", {
77
78
  enumerable: true,
78
- get: function () { return chunkZ4DBCDAH_cjs.useCartStore; }
79
+ get: function () { return chunkWZ6I3N4O_cjs.useCartStore; }
79
80
  });
80
81
  exports.useProductStore = useProductStore;
81
82
  exports.useWishlistStore = useWishlistStore;
@@ -1,7 +1,7 @@
1
1
  import * as zustand from 'zustand';
2
- import { a as CartState, C as Cart, U as User } from '../cart-XumsY-y0.cjs';
3
- import { W as Wishlist } from '../wishlist-Cow1wVqf.cjs';
4
- import { d as Product } from '../product-Daxj09p9.cjs';
2
+ import { a as CartState, C as Cart, U as User } from '../cart-kJoawc_Z.cjs';
3
+ import { W as Wishlist } from '../wishlist-CUuCTSVJ.cjs';
4
+ import { d as Product } from '../product-DJMdi4D4.cjs';
5
5
  import 'react-toastify';
6
6
 
7
7
  interface CartStore extends CartState {
@@ -33,6 +33,11 @@ interface CartStore extends CartState {
33
33
  variant_id: number;
34
34
  quantity: number;
35
35
  }>, addressId?: number) => Promise<void>;
36
+ updateCustomization: (customizationInput: Array<{
37
+ customization_option: number;
38
+ customer_input: string;
39
+ product_variant: number;
40
+ }>) => Promise<void>;
36
41
  }
37
42
  declare const useCartStore: zustand.UseBoundStore<zustand.StoreApi<CartStore>>;
38
43
 
@@ -1,7 +1,7 @@
1
1
  import * as zustand from 'zustand';
2
- import { a as CartState, C as Cart, U as User } from '../cart-CfsntcpS.js';
3
- import { W as Wishlist } from '../wishlist-gamNg0T1.js';
4
- import { d as Product } from '../product-Daxj09p9.js';
2
+ import { a as CartState, C as Cart, U as User } from '../cart-y-7RPmnQ.js';
3
+ import { W as Wishlist } from '../wishlist-DKYFZR0s.js';
4
+ import { d as Product } from '../product-DJMdi4D4.js';
5
5
  import 'react-toastify';
6
6
 
7
7
  interface CartStore extends CartState {
@@ -33,6 +33,11 @@ interface CartStore extends CartState {
33
33
  variant_id: number;
34
34
  quantity: number;
35
35
  }>, addressId?: number) => Promise<void>;
36
+ updateCustomization: (customizationInput: Array<{
37
+ customization_option: number;
38
+ customer_input: string;
39
+ product_variant: number;
40
+ }>) => Promise<void>;
36
41
  }
37
42
  declare const useCartStore: zustand.UseBoundStore<zustand.StoreApi<CartStore>>;
38
43
 
@@ -1,6 +1,7 @@
1
- export { loginUser, useAuthStore, useCartStore } from '../chunk-X35IATPX.js';
2
- import { getWishlist, getProducts } from '../chunk-YEJZYH55.js';
1
+ export { loginUser, useAuthStore, useCartStore } from '../chunk-ANTJLYQD.js';
2
+ import { getWishlist, getProducts } from '../chunk-U25T7M6S.js';
3
3
  import '../chunk-QAC72HKO.js';
4
+ import '../chunk-LW3V53WJ.js';
4
5
  import '../chunk-3SYYP3XV.js';
5
6
  import '../chunk-WEMNXIRS.js';
6
7
  import '../chunk-BQ256JKN.js';
@@ -1,11 +1,11 @@
1
- import { f as ProductDetail, d as Product, O as OperatingHours, T as TimeSlot, A as Attributes } from '../product-Daxj09p9.cjs';
2
- export { h as ADDRESS_FORM_SESSION_KEY, i as ALLOWED_COUNTRIES, D as DEFAULT_TOAST_CONFIG, j as PRODUCT_STATUSES, g as SLICE_STATUS, U as USER_CART, k as USER_CREDENTIALS, l as USER_CRED_REFRESH_TOKEN, m as USER_CRED_TOKEN, p as pathNameMap } from '../product-Daxj09p9.cjs';
3
- import { C as Cart, b as Category$1 } from '../cart-XumsY-y0.cjs';
1
+ import { f as ProductDetail, d as Product, O as OperatingHours, T as TimeSlot, A as Attributes } from '../product-DJMdi4D4.cjs';
2
+ export { h as ADDRESS_FORM_SESSION_KEY, i as ALLOWED_COUNTRIES, D as DEFAULT_TOAST_CONFIG, j as PRODUCT_STATUSES, g as SLICE_STATUS, U as USER_CART, k as USER_CREDENTIALS, l as USER_CRED_REFRESH_TOKEN, m as USER_CRED_TOKEN, p as pathNameMap } from '../product-DJMdi4D4.cjs';
3
+ import { C as Cart, b as Category$1 } from '../cart-kJoawc_Z.cjs';
4
4
  export { S as SnapstoreConfig, g as getApiEndpoint, a as getCloudFront, b as getConfig, c as getPhonePeApiEndpoint, d as getPublicApiEndpoint, e as getSecretKey, f as getStoreId, i as initConfig } from '../index-DTyIuLuI.cjs';
5
- import { C as CollectionResponse } from '../collections-dCr3VEJo.cjs';
5
+ import { C as CollectionResponse } from '../collections-WzvTO0OQ.cjs';
6
6
  import { AxiosResponse } from 'axios';
7
7
  import { a as PhonePe } from '../phonepe-dWMLZel6.cjs';
8
- import { O as Order } from '../orders-Dm5Dq02y.cjs';
8
+ import { O as Order } from '../orders-CjNmCY5I.cjs';
9
9
  import 'react-toastify';
10
10
 
11
11
  declare function setAuthTokenChangeCallback(callback: (token: string | undefined) => void): void;
@@ -1,11 +1,11 @@
1
- import { f as ProductDetail, d as Product, O as OperatingHours, T as TimeSlot, A as Attributes } from '../product-Daxj09p9.js';
2
- export { h as ADDRESS_FORM_SESSION_KEY, i as ALLOWED_COUNTRIES, D as DEFAULT_TOAST_CONFIG, j as PRODUCT_STATUSES, g as SLICE_STATUS, U as USER_CART, k as USER_CREDENTIALS, l as USER_CRED_REFRESH_TOKEN, m as USER_CRED_TOKEN, p as pathNameMap } from '../product-Daxj09p9.js';
3
- import { C as Cart, b as Category$1 } from '../cart-CfsntcpS.js';
1
+ import { f as ProductDetail, d as Product, O as OperatingHours, T as TimeSlot, A as Attributes } from '../product-DJMdi4D4.js';
2
+ export { h as ADDRESS_FORM_SESSION_KEY, i as ALLOWED_COUNTRIES, D as DEFAULT_TOAST_CONFIG, j as PRODUCT_STATUSES, g as SLICE_STATUS, U as USER_CART, k as USER_CREDENTIALS, l as USER_CRED_REFRESH_TOKEN, m as USER_CRED_TOKEN, p as pathNameMap } from '../product-DJMdi4D4.js';
3
+ import { C as Cart, b as Category$1 } from '../cart-y-7RPmnQ.js';
4
4
  export { S as SnapstoreConfig, g as getApiEndpoint, a as getCloudFront, b as getConfig, c as getPhonePeApiEndpoint, d as getPublicApiEndpoint, e as getSecretKey, f as getStoreId, i as initConfig } from '../index-DTyIuLuI.js';
5
- import { C as CollectionResponse } from '../collections-D4tvWcZp.js';
5
+ import { C as CollectionResponse } from '../collections-BDSVfRNo.js';
6
6
  import { AxiosResponse } from 'axios';
7
7
  import { a as PhonePe } from '../phonepe-dWMLZel6.js';
8
- import { O as Order } from '../orders-CvCa7XWm.js';
8
+ import { O as Order } from '../orders-L_8eIkUS.js';
9
9
  import 'react-toastify';
10
10
 
11
11
  declare function setAuthTokenChangeCallback(callback: (token: string | undefined) => void): void;
@@ -1,4 +1,4 @@
1
- import { f as ProductDetail } from './product-Daxj09p9.cjs';
1
+ import { f as ProductDetail } from './product-DJMdi4D4.cjs';
2
2
 
3
3
  declare namespace Wishlist {
4
4
  interface Root {
@@ -1,4 +1,4 @@
1
- import { f as ProductDetail } from './product-Daxj09p9.js';
1
+ import { f as ProductDetail } from './product-DJMdi4D4.js';
2
2
 
3
3
  declare namespace Wishlist {
4
4
  interface Root {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storepecker/storefront-core",
3
- "version": "2.3.1",
3
+ "version": "2.3.3",
4
4
  "description": "Shared logic and utilities for Snapstore themes",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",