@storepecker/storefront-core 1.0.0 → 1.0.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 (33) hide show
  1. package/dist/api/index.cjs +17 -17
  2. package/dist/api/index.d.cts +4 -5
  3. package/dist/api/index.d.ts +4 -5
  4. package/dist/api/index.js +1 -1
  5. package/dist/{booking-ClX-dhX7.d.ts → booking-Bo_tELLX.d.ts} +1 -1
  6. package/dist/{booking-Drl7-IL7.d.cts → booking-Dd877kxd.d.cts} +1 -1
  7. package/dist/{cart-DVrn8hD0.d.cts → cart-D8UXTY1g.d.cts} +51 -1
  8. package/dist/{cart-DVrn8hD0.d.ts → cart-D8UXTY1g.d.ts} +51 -1
  9. package/dist/checkout/index.d.cts +2 -3
  10. package/dist/checkout/index.d.ts +2 -3
  11. package/dist/{chunk-RCXQJ6XC.cjs → chunk-34KV265H.cjs} +2 -1
  12. package/dist/{chunk-7MQOVWLW.js → chunk-AZIFK7HK.js} +1 -1
  13. package/dist/{chunk-GH75WUO2.cjs → chunk-NBZIUA6W.cjs} +3 -3
  14. package/dist/{chunk-57ZBPAXU.js → chunk-Z7LHRD3V.js} +2 -1
  15. package/dist/hooks/index.cjs +9 -13
  16. package/dist/hooks/index.d.cts +3 -4
  17. package/dist/hooks/index.d.ts +3 -4
  18. package/dist/hooks/index.js +4 -8
  19. package/dist/models/index.d.cts +4 -5
  20. package/dist/models/index.d.ts +4 -5
  21. package/dist/{orders-CkUzv5Xh.d.ts → orders-DHJhJ3xz.d.cts} +1 -18
  22. package/dist/{orders-D0oC9ugD.d.cts → orders-DHJhJ3xz.d.ts} +1 -18
  23. package/dist/store/index.cjs +7 -7
  24. package/dist/store/index.d.cts +2 -2
  25. package/dist/store/index.d.ts +2 -2
  26. package/dist/store/index.js +3 -3
  27. package/dist/utils/index.d.cts +3 -3
  28. package/dist/utils/index.d.ts +3 -3
  29. package/dist/{wishlist-BzhnCAQD.d.ts → wishlist-BMWfB0Xe.d.ts} +1 -1
  30. package/dist/{wishlist-CBCZD66Y.d.cts → wishlist-C3SK9SS0.d.cts} +1 -1
  31. package/package.json +1 -1
  32. package/dist/coupons-C7iJ-1cy.d.cts +0 -37
  33. package/dist/coupons-CnfTKL1i.d.ts +0 -37
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkKWKHHRRJ_cjs = require('../chunk-KWKHHRRJ.cjs');
4
- var chunkRCXQJ6XC_cjs = require('../chunk-RCXQJ6XC.cjs');
4
+ var chunk34KV265H_cjs = require('../chunk-34KV265H.cjs');
5
5
  require('../chunk-CFF632IQ.cjs');
6
6
  var chunkA6IO3HIN_cjs = require('../chunk-A6IO3HIN.cjs');
7
7
  var chunkJHGXIIBZ_cjs = require('../chunk-JHGXIIBZ.cjs');
@@ -143,67 +143,67 @@ Object.defineProperty(exports, "updateUserDetails", {
143
143
  });
144
144
  Object.defineProperty(exports, "addToCart", {
145
145
  enumerable: true,
146
- get: function () { return chunkRCXQJ6XC_cjs.addToCart; }
146
+ get: function () { return chunk34KV265H_cjs.addToCart; }
147
147
  });
148
148
  Object.defineProperty(exports, "addWishlist", {
149
149
  enumerable: true,
150
- get: function () { return chunkRCXQJ6XC_cjs.addWishlist; }
150
+ get: function () { return chunk34KV265H_cjs.addWishlist; }
151
151
  });
152
152
  Object.defineProperty(exports, "getCart", {
153
153
  enumerable: true,
154
- get: function () { return chunkRCXQJ6XC_cjs.getCart; }
154
+ get: function () { return chunk34KV265H_cjs.getCart; }
155
155
  });
156
156
  Object.defineProperty(exports, "getCategories", {
157
157
  enumerable: true,
158
- get: function () { return chunkRCXQJ6XC_cjs.getCategories; }
158
+ get: function () { return chunk34KV265H_cjs.getCategories; }
159
159
  });
160
160
  Object.defineProperty(exports, "getDigitalProductDownloadLink", {
161
161
  enumerable: true,
162
- get: function () { return chunkRCXQJ6XC_cjs.getDigitalProductDownloadLink; }
162
+ get: function () { return chunk34KV265H_cjs.getDigitalProductDownloadLink; }
163
163
  });
164
164
  Object.defineProperty(exports, "getProductCategories", {
165
165
  enumerable: true,
166
- get: function () { return chunkRCXQJ6XC_cjs.getProductCategories; }
166
+ get: function () { return chunk34KV265H_cjs.getProductCategories; }
167
167
  });
168
168
  Object.defineProperty(exports, "getProductDetail", {
169
169
  enumerable: true,
170
- get: function () { return chunkRCXQJ6XC_cjs.getProductDetail; }
170
+ get: function () { return chunk34KV265H_cjs.getProductDetail; }
171
171
  });
172
172
  Object.defineProperty(exports, "getProductDetailBySlug", {
173
173
  enumerable: true,
174
- get: function () { return chunkRCXQJ6XC_cjs.getProductDetailBySlug; }
174
+ get: function () { return chunk34KV265H_cjs.getProductDetailBySlug; }
175
175
  });
176
176
  Object.defineProperty(exports, "getProductList", {
177
177
  enumerable: true,
178
- get: function () { return chunkRCXQJ6XC_cjs.getProductList; }
178
+ get: function () { return chunk34KV265H_cjs.getProductList; }
179
179
  });
180
180
  Object.defineProperty(exports, "getProducts", {
181
181
  enumerable: true,
182
- get: function () { return chunkRCXQJ6XC_cjs.getProducts; }
182
+ get: function () { return chunk34KV265H_cjs.getProducts; }
183
183
  });
184
184
  Object.defineProperty(exports, "getWishlist", {
185
185
  enumerable: true,
186
- get: function () { return chunkRCXQJ6XC_cjs.getWishlist; }
186
+ get: function () { return chunk34KV265H_cjs.getWishlist; }
187
187
  });
188
188
  Object.defineProperty(exports, "notifyProductStock", {
189
189
  enumerable: true,
190
- get: function () { return chunkRCXQJ6XC_cjs.notifyProductStock; }
190
+ get: function () { return chunk34KV265H_cjs.notifyProductStock; }
191
191
  });
192
192
  Object.defineProperty(exports, "removeFromCart", {
193
193
  enumerable: true,
194
- get: function () { return chunkRCXQJ6XC_cjs.removeFromCart; }
194
+ get: function () { return chunk34KV265H_cjs.removeFromCart; }
195
195
  });
196
196
  Object.defineProperty(exports, "removeFromWishlist", {
197
197
  enumerable: true,
198
- get: function () { return chunkRCXQJ6XC_cjs.removeFromWishlist; }
198
+ get: function () { return chunk34KV265H_cjs.removeFromWishlist; }
199
199
  });
200
200
  Object.defineProperty(exports, "updateCart", {
201
201
  enumerable: true,
202
- get: function () { return chunkRCXQJ6XC_cjs.updateCart; }
202
+ get: function () { return chunk34KV265H_cjs.updateCart; }
203
203
  });
204
204
  Object.defineProperty(exports, "updateDigitalProductDownloadLinkCount", {
205
205
  enumerable: true,
206
- get: function () { return chunkRCXQJ6XC_cjs.updateDigitalProductDownloadLinkCount; }
206
+ get: function () { return chunk34KV265H_cjs.updateDigitalProductDownloadLinkCount; }
207
207
  });
208
208
  Object.defineProperty(exports, "applyCoupon", {
209
209
  enumerable: true,
@@ -1,11 +1,10 @@
1
1
  import * as axios from 'axios';
2
2
  import { AxiosInstance, AxiosResponse } from 'axios';
3
3
  import { A as Address } from '../address-DQEZzyUG.cjs';
4
- import { U as User, W as Wishlist } from '../wishlist-CBCZD66Y.cjs';
5
- import { C as Cart, d as Product, e as ProductDetail } from '../cart-DVrn8hD0.cjs';
6
- import { a as CouponResponse, C as Coupon } from '../coupons-C7iJ-1cy.cjs';
7
- import { O as Order, C as Category } from '../orders-D0oC9ugD.cjs';
8
- import { C as CollectionResponse, R as Review, A as Analytics, B as Booking } from '../booking-Drl7-IL7.cjs';
4
+ import { U as User, W as Wishlist } from '../wishlist-C3SK9SS0.cjs';
5
+ import { C as Cart, j as Product, f as CouponResponse, e as Coupon, d as Category, k as ProductDetail } from '../cart-D8UXTY1g.cjs';
6
+ import { O as Order } from '../orders-DHJhJ3xz.cjs';
7
+ import { C as CollectionResponse, R as Review, A as Analytics, B as Booking } from '../booking-Dd877kxd.cjs';
9
8
  import 'react-toastify';
10
9
 
11
10
  declare function getHttpService(): AxiosInstance;
@@ -1,11 +1,10 @@
1
1
  import * as axios from 'axios';
2
2
  import { AxiosInstance, AxiosResponse } from 'axios';
3
3
  import { A as Address } from '../address-DQEZzyUG.js';
4
- import { U as User, W as Wishlist } from '../wishlist-BzhnCAQD.js';
5
- import { C as Cart, d as Product, e as ProductDetail } from '../cart-DVrn8hD0.js';
6
- import { a as CouponResponse, C as Coupon } from '../coupons-CnfTKL1i.js';
7
- import { O as Order, C as Category } from '../orders-CkUzv5Xh.js';
8
- import { C as CollectionResponse, R as Review, A as Analytics, B as Booking } from '../booking-ClX-dhX7.js';
4
+ import { U as User, W as Wishlist } from '../wishlist-BMWfB0Xe.js';
5
+ import { C as Cart, j as Product, f as CouponResponse, e as Coupon, d as Category, k as ProductDetail } from '../cart-D8UXTY1g.js';
6
+ import { O as Order } from '../orders-DHJhJ3xz.js';
7
+ import { C as CollectionResponse, R as Review, A as Analytics, B as Booking } from '../booking-Bo_tELLX.js';
9
8
  import 'react-toastify';
10
9
 
11
10
  declare function getHttpService(): AxiosInstance;
package/dist/api/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { getUserDetails, updateUserDetails } from '../chunk-7UH6REGV.js';
2
- export { addToCart, addWishlist, getCart, getCategories, getDigitalProductDownloadLink, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getWishlist, notifyProductStock, removeFromCart, removeFromWishlist, updateCart, updateDigitalProductDownloadLinkCount } from '../chunk-57ZBPAXU.js';
2
+ export { addToCart, addWishlist, getCart, getCategories, getDigitalProductDownloadLink, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getWishlist, notifyProductStock, removeFromCart, removeFromWishlist, updateCart, updateDigitalProductDownloadLinkCount } from '../chunk-Z7LHRD3V.js';
3
3
  import '../chunk-E7WPE3PV.js';
4
4
  export { applyCoupon, checkPhonepePaymentStatus, getAppliedCoupon, getCoupons, getOrderDetails, getOrderDetailsByNumber, getOrders, getPublicOrderDetailsByNumber, getStripePaymentStatus, getStripePaymentStatusPublic, makeCODOrder, phonepeOrderSuccess, phonepePublicOrderSuccess, placeOrder, publicMakeCODOrder, publicPlaceOrder, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, removeCoupon, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, updateOrder, updateOrderCustomization, uploadCustomizationImage, verifyTabbyPayment } from '../chunk-4MJMNIAB.js';
5
5
  export { addAddress, deleteAddress, getAddresses, getCountries, getSubdivisions, updateAddress } from '../chunk-LBGIUNM6.js';
@@ -1,4 +1,4 @@
1
- import { e as ProductDetail } from './cart-DVrn8hD0.js';
1
+ import { k as ProductDetail } from './cart-D8UXTY1g.js';
2
2
 
3
3
  interface CollectionResponse {
4
4
  id: number;
@@ -1,4 +1,4 @@
1
- import { e as ProductDetail } from './cart-DVrn8hD0.cjs';
1
+ import { k as ProductDetail } from './cart-D8UXTY1g.cjs';
2
2
 
3
3
  interface CollectionResponse {
4
4
  id: number;
@@ -327,6 +327,55 @@ interface TimeSlot {
327
327
  interface SpecialHours {
328
328
  }
329
329
 
330
+ declare namespace Category {
331
+ interface Root {
332
+ id: number;
333
+ name: string;
334
+ photo: string;
335
+ slug: string;
336
+ description: string;
337
+ children?: Root[];
338
+ }
339
+ interface CategoriesState {
340
+ data: Root[];
341
+ status: SLICE_STATUS;
342
+ }
343
+ }
344
+
345
+ type DiscountType = "discount";
346
+ type ValueType = "percentage" | "fixed";
347
+ type ApplicableTarget = "product_category" | "product_variant" | "product_bundle" | "customer";
348
+ type CouponStatus = "active" | "inactive" | "expired";
349
+ interface Coupon {
350
+ id: number;
351
+ coupon_code: string;
352
+ discount_type: DiscountType;
353
+ value: string;
354
+ value_type: ValueType;
355
+ min_order_amount: string;
356
+ max_discount_amount: string;
357
+ start_date: string;
358
+ end_date: string;
359
+ status: CouponStatus;
360
+ is_deleted: boolean;
361
+ usage_limit: number;
362
+ usage_count: number;
363
+ applicable_target: ApplicableTarget;
364
+ applicable_product_variants: any[];
365
+ applicable_product_bundles: any[];
366
+ applicable_product_categories: Category.Root[];
367
+ applicable_customers: any[];
368
+ auto_apply: boolean;
369
+ created_at: string;
370
+ updated_at: string;
371
+ is_cart_applicable: boolean;
372
+ coupon_message: string;
373
+ }
374
+ type Coupons = Coupon[];
375
+ interface CouponResponse {
376
+ coupon: Coupon;
377
+ }
378
+
330
379
  interface CartState {
331
380
  cart: Cart.Root | null;
332
381
  status: SLICE_STATUS;
@@ -346,6 +395,7 @@ declare namespace Cart {
346
395
  };
347
396
  total_shipping: number;
348
397
  total_tax_amount: number;
398
+ applied_coupon: Coupon | {};
349
399
  }
350
400
  interface CustomizationInput {
351
401
  id: number;
@@ -364,4 +414,4 @@ declare namespace Cart {
364
414
  }
365
415
  }
366
416
 
367
- export { type Attributes as A, type BookingService as B, Cart as C, DEFAULT_TOAST_CONFIG as D, type OperatingHours as O, type Photos as P, type SpecialHours as S, type TimeSlot as T, USER_CART as U, type WishlistState as W, type BookingServiceDate as a, type CartState as b, type CustomField as c, Product as d, ProductDetail as e, SLICE_STATUS as f, ADDRESS_FORM_SESSION_KEY as g, ALLOWED_COUNTRIES as h, PRODUCT_STATUSES as i, USER_CREDENTIALS as j, USER_CRED_REFRESH_TOKEN as k, USER_CRED_TOKEN as l, pathNameMap as p };
417
+ export { type ApplicableTarget as A, type BookingService as B, Cart as C, type DiscountType as D, type OperatingHours as O, type Photos as P, type SpecialHours as S, type TimeSlot as T, USER_CART as U, type ValueType as V, type WishlistState as W, type Attributes as a, type BookingServiceDate as b, type CartState as c, Category as d, type Coupon as e, type CouponResponse as f, type CouponStatus as g, type Coupons as h, type CustomField as i, Product as j, ProductDetail as k, SLICE_STATUS as l, ADDRESS_FORM_SESSION_KEY as m, ALLOWED_COUNTRIES as n, DEFAULT_TOAST_CONFIG as o, PRODUCT_STATUSES as p, USER_CREDENTIALS as q, USER_CRED_REFRESH_TOKEN as r, USER_CRED_TOKEN as s, pathNameMap as t };
@@ -327,6 +327,55 @@ interface TimeSlot {
327
327
  interface SpecialHours {
328
328
  }
329
329
 
330
+ declare namespace Category {
331
+ interface Root {
332
+ id: number;
333
+ name: string;
334
+ photo: string;
335
+ slug: string;
336
+ description: string;
337
+ children?: Root[];
338
+ }
339
+ interface CategoriesState {
340
+ data: Root[];
341
+ status: SLICE_STATUS;
342
+ }
343
+ }
344
+
345
+ type DiscountType = "discount";
346
+ type ValueType = "percentage" | "fixed";
347
+ type ApplicableTarget = "product_category" | "product_variant" | "product_bundle" | "customer";
348
+ type CouponStatus = "active" | "inactive" | "expired";
349
+ interface Coupon {
350
+ id: number;
351
+ coupon_code: string;
352
+ discount_type: DiscountType;
353
+ value: string;
354
+ value_type: ValueType;
355
+ min_order_amount: string;
356
+ max_discount_amount: string;
357
+ start_date: string;
358
+ end_date: string;
359
+ status: CouponStatus;
360
+ is_deleted: boolean;
361
+ usage_limit: number;
362
+ usage_count: number;
363
+ applicable_target: ApplicableTarget;
364
+ applicable_product_variants: any[];
365
+ applicable_product_bundles: any[];
366
+ applicable_product_categories: Category.Root[];
367
+ applicable_customers: any[];
368
+ auto_apply: boolean;
369
+ created_at: string;
370
+ updated_at: string;
371
+ is_cart_applicable: boolean;
372
+ coupon_message: string;
373
+ }
374
+ type Coupons = Coupon[];
375
+ interface CouponResponse {
376
+ coupon: Coupon;
377
+ }
378
+
330
379
  interface CartState {
331
380
  cart: Cart.Root | null;
332
381
  status: SLICE_STATUS;
@@ -346,6 +395,7 @@ declare namespace Cart {
346
395
  };
347
396
  total_shipping: number;
348
397
  total_tax_amount: number;
398
+ applied_coupon: Coupon | {};
349
399
  }
350
400
  interface CustomizationInput {
351
401
  id: number;
@@ -364,4 +414,4 @@ declare namespace Cart {
364
414
  }
365
415
  }
366
416
 
367
- export { type Attributes as A, type BookingService as B, Cart as C, DEFAULT_TOAST_CONFIG as D, type OperatingHours as O, type Photos as P, type SpecialHours as S, type TimeSlot as T, USER_CART as U, type WishlistState as W, type BookingServiceDate as a, type CartState as b, type CustomField as c, Product as d, ProductDetail as e, SLICE_STATUS as f, ADDRESS_FORM_SESSION_KEY as g, ALLOWED_COUNTRIES as h, PRODUCT_STATUSES as i, USER_CREDENTIALS as j, USER_CRED_REFRESH_TOKEN as k, USER_CRED_TOKEN as l, pathNameMap as p };
417
+ export { type ApplicableTarget as A, type BookingService as B, Cart as C, type DiscountType as D, type OperatingHours as O, type Photos as P, type SpecialHours as S, type TimeSlot as T, USER_CART as U, type ValueType as V, type WishlistState as W, type Attributes as a, type BookingServiceDate as b, type CartState as c, Category as d, type Coupon as e, type CouponResponse as f, type CouponStatus as g, type Coupons as h, type CustomField as i, Product as j, ProductDetail as k, SLICE_STATUS as l, ADDRESS_FORM_SESSION_KEY as m, ALLOWED_COUNTRIES as n, DEFAULT_TOAST_CONFIG as o, PRODUCT_STATUSES as p, USER_CREDENTIALS as q, USER_CRED_REFRESH_TOKEN as r, USER_CRED_TOKEN as s, pathNameMap as t };
@@ -1,7 +1,6 @@
1
1
  import * as Yup from 'yup';
2
- import { C as Cart } from '../cart-DVrn8hD0.cjs';
3
- import { C as Coupon } from '../coupons-C7iJ-1cy.cjs';
4
- import { O as Order } from '../orders-D0oC9ugD.cjs';
2
+ import { C as Cart, e as Coupon } from '../cart-D8UXTY1g.cjs';
3
+ import { O as Order } from '../orders-DHJhJ3xz.cjs';
5
4
  import 'react-toastify';
6
5
 
7
6
  /**
@@ -1,7 +1,6 @@
1
1
  import * as Yup from 'yup';
2
- import { C as Cart } from '../cart-DVrn8hD0.js';
3
- import { C as Coupon } from '../coupons-CnfTKL1i.js';
4
- import { O as Order } from '../orders-CkUzv5Xh.js';
2
+ import { C as Cart, e as Coupon } from '../cart-D8UXTY1g.js';
3
+ import { O as Order } from '../orders-DHJhJ3xz.js';
5
4
  import 'react-toastify';
6
5
 
7
6
  /**
@@ -18,7 +18,8 @@ async function getCart(url, addressId) {
18
18
  total_coupon_discount: 0,
19
19
  variant_discounts: {},
20
20
  total_shipping: 0,
21
- total_tax_amount: 0
21
+ total_tax_amount: 0,
22
+ applied_coupon: {}
22
23
  };
23
24
  }
24
25
  async function addToCart(product, customizationInputs) {
@@ -1,4 +1,4 @@
1
- import { getCart } from './chunk-57ZBPAXU.js';
1
+ import { getCart } from './chunk-Z7LHRD3V.js';
2
2
  import { create } from 'zustand';
3
3
 
4
4
  var initialState = {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkRCXQJ6XC_cjs = require('./chunk-RCXQJ6XC.cjs');
3
+ var chunk34KV265H_cjs = require('./chunk-34KV265H.cjs');
4
4
  var zustand = require('zustand');
5
5
 
6
6
  var initialState = {
@@ -18,7 +18,7 @@ var useCartStore = zustand.create((set) => ({
18
18
  syncCart: async () => {
19
19
  set({ status: "loading" /* LOADING */ });
20
20
  try {
21
- const response = await chunkRCXQJ6XC_cjs.getCart("/customer/cart/");
21
+ const response = await chunk34KV265H_cjs.getCart("/customer/cart/");
22
22
  if (response) {
23
23
  set({ cart: response, status: "idle" /* IDLE */ });
24
24
  }
@@ -29,7 +29,7 @@ var useCartStore = zustand.create((set) => ({
29
29
  fetchCart: async (addressId) => {
30
30
  set({ status: "loading" /* LOADING */ });
31
31
  try {
32
- const response = await chunkRCXQJ6XC_cjs.getCart("/customer/cart/", addressId);
32
+ const response = await chunk34KV265H_cjs.getCart("/customer/cart/", addressId);
33
33
  if (response) {
34
34
  set({ cart: response, status: "idle" /* IDLE */ });
35
35
  }
@@ -16,7 +16,8 @@ async function getCart(url, addressId) {
16
16
  total_coupon_discount: 0,
17
17
  variant_discounts: {},
18
18
  total_shipping: 0,
19
- total_tax_amount: 0
19
+ total_tax_amount: 0,
20
+ applied_coupon: {}
20
21
  };
21
22
  }
22
23
  async function addToCart(product, customizationInputs) {
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkKWKHHRRJ_cjs = require('../chunk-KWKHHRRJ.cjs');
4
- var chunkGH75WUO2_cjs = require('../chunk-GH75WUO2.cjs');
5
- var chunkRCXQJ6XC_cjs = require('../chunk-RCXQJ6XC.cjs');
4
+ var chunkNBZIUA6W_cjs = require('../chunk-NBZIUA6W.cjs');
5
+ var chunk34KV265H_cjs = require('../chunk-34KV265H.cjs');
6
6
  require('../chunk-CFF632IQ.cjs');
7
7
  var chunkLC5ZAUKL_cjs = require('../chunk-LC5ZAUKL.cjs');
8
8
  var chunkA6IO3HIN_cjs = require('../chunk-A6IO3HIN.cjs');
@@ -49,7 +49,7 @@ var useCart = (addressId) => {
49
49
  async (addrId) => {
50
50
  try {
51
51
  setIsLoading(true);
52
- const result = await chunkRCXQJ6XC_cjs.getCart("/customer/cart/", addrId ?? addressId);
52
+ const result = await chunk34KV265H_cjs.getCart("/customer/cart/", addrId ?? addressId);
53
53
  setData(result);
54
54
  setError(null);
55
55
  } catch (err) {
@@ -106,7 +106,7 @@ var useGetProducts = (filter) => {
106
106
  const fetchData = async () => {
107
107
  try {
108
108
  setIsLoading(true);
109
- const result = await chunkRCXQJ6XC_cjs.getProductList("/inventory/products/", filter);
109
+ const result = await chunk34KV265H_cjs.getProductList("/inventory/products/", filter);
110
110
  setData(result);
111
111
  } catch (err) {
112
112
  } finally {
@@ -123,7 +123,7 @@ var useGetProductDetails = (slug) => {
123
123
  const fetchData = react.useCallback(async () => {
124
124
  try {
125
125
  setIsLoading(true);
126
- const result = await chunkRCXQJ6XC_cjs.getProductDetail("/inventory/products/", slug);
126
+ const result = await chunk34KV265H_cjs.getProductDetail("/inventory/products/", slug);
127
127
  setData(result);
128
128
  } catch (err) {
129
129
  } finally {
@@ -146,7 +146,7 @@ var useGetProductCategories = () => {
146
146
  const fetchData = async () => {
147
147
  try {
148
148
  setIsLoading(true);
149
- const result = await chunkRCXQJ6XC_cjs.getProductCategories("/store/categories");
149
+ const result = await chunk34KV265H_cjs.getProductCategories("/store/categories");
150
150
  setData(result || []);
151
151
  } catch (err) {
152
152
  setError(err);
@@ -191,7 +191,7 @@ var useWishlist = () => {
191
191
  const fetchData = react.useCallback(async () => {
192
192
  try {
193
193
  setIsLoading(true);
194
- const result = await chunkRCXQJ6XC_cjs.getWishlist("/customer/wishlist/");
194
+ const result = await chunk34KV265H_cjs.getWishlist("/customer/wishlist/");
195
195
  setData(result);
196
196
  setError(null);
197
197
  } catch (err) {
@@ -249,7 +249,7 @@ function useCheckoutPayment(options) {
249
249
  const [isConfirmingPayment, setIsConfirmingPayment] = react.useState(false);
250
250
  const [showSuccessModal, setShowSuccessModal] = react.useState(false);
251
251
  const [showFailureModal, setShowFailureModal] = react.useState(false);
252
- const resetCartCount = chunkGH75WUO2_cjs.useCartStore((s) => s.resetCartCount);
252
+ const resetCartCount = chunkNBZIUA6W_cjs.useCartStore((s) => s.resetCartCount);
253
253
  const callbacks = {
254
254
  onSuccess: (order) => {
255
255
  setOrderSummary(order);
@@ -311,12 +311,8 @@ function useCheckoutCoupon(options) {
311
311
  const refreshCoupons = react.useCallback(async () => {
312
312
  setIsLoading(true);
313
313
  try {
314
- const [coupons, applied] = await Promise.all([
315
- chunkLC5ZAUKL_cjs.fetchAvailableCoupons(),
316
- chunkLC5ZAUKL_cjs.fetchAppliedCoupon()
317
- ]);
314
+ const coupons = await chunkLC5ZAUKL_cjs.fetchAvailableCoupons();
318
315
  setAvailableCoupons(coupons);
319
- setAppliedCoupon(applied);
320
316
  } catch {
321
317
  } finally {
322
318
  setIsLoading(false);
@@ -1,8 +1,7 @@
1
1
  import { A as Address } from '../address-DQEZzyUG.cjs';
2
- import { C as Cart, d as Product } from '../cart-DVrn8hD0.cjs';
3
- import { O as Order, C as Category } from '../orders-D0oC9ugD.cjs';
4
- import { U as User, W as Wishlist } from '../wishlist-CBCZD66Y.cjs';
5
- import { C as Coupon } from '../coupons-C7iJ-1cy.cjs';
2
+ import { C as Cart, d as Category, j as Product, e as Coupon } from '../cart-D8UXTY1g.cjs';
3
+ import { O as Order } from '../orders-DHJhJ3xz.cjs';
4
+ import { U as User, W as Wishlist } from '../wishlist-C3SK9SS0.cjs';
6
5
  export { U as UseAddressFormOptions, a as UseAddressFormReturn, u as useAddressForm } from '../useAddressForm-DgkCP1nG.cjs';
7
6
  import 'react-toastify';
8
7
  import 'react';
@@ -1,8 +1,7 @@
1
1
  import { A as Address } from '../address-DQEZzyUG.js';
2
- import { C as Cart, d as Product } from '../cart-DVrn8hD0.js';
3
- import { O as Order, C as Category } from '../orders-CkUzv5Xh.js';
4
- import { U as User, W as Wishlist } from '../wishlist-BzhnCAQD.js';
5
- import { C as Coupon } from '../coupons-CnfTKL1i.js';
2
+ import { C as Cart, d as Category, j as Product, e as Coupon } from '../cart-D8UXTY1g.js';
3
+ import { O as Order } from '../orders-DHJhJ3xz.js';
4
+ import { U as User, W as Wishlist } from '../wishlist-BMWfB0Xe.js';
6
5
  export { U as UseAddressFormOptions, a as UseAddressFormReturn, u as useAddressForm } from '../useAddressForm-C-Uzug4d.js';
7
6
  import 'react-toastify';
8
7
  import 'react';
@@ -1,8 +1,8 @@
1
1
  import { getUserDetails } from '../chunk-7UH6REGV.js';
2
- import { useCartStore } from '../chunk-7MQOVWLW.js';
3
- import { getCart, getProductDetail, getWishlist, getProductCategories, getProductList } from '../chunk-57ZBPAXU.js';
2
+ import { useCartStore } from '../chunk-AZIFK7HK.js';
3
+ import { getCart, getProductDetail, getWishlist, getProductCategories, getProductList } from '../chunk-Z7LHRD3V.js';
4
4
  import '../chunk-E7WPE3PV.js';
5
- import { processPayment, fetchAvailableCoupons, fetchAppliedCoupon, applyCheckoutCoupon, removeCheckoutCoupon } from '../chunk-QCQCFYYR.js';
5
+ import { processPayment, fetchAvailableCoupons, applyCheckoutCoupon, removeCheckoutCoupon } from '../chunk-QCQCFYYR.js';
6
6
  import { getOrders, placeOrder } from '../chunk-4MJMNIAB.js';
7
7
  import '../chunk-WFDKKOO7.js';
8
8
  export { useAddressForm } from '../chunk-UM24VDYB.js';
@@ -309,12 +309,8 @@ function useCheckoutCoupon(options) {
309
309
  const refreshCoupons = useCallback(async () => {
310
310
  setIsLoading(true);
311
311
  try {
312
- const [coupons, applied] = await Promise.all([
313
- fetchAvailableCoupons(),
314
- fetchAppliedCoupon()
315
- ]);
312
+ const coupons = await fetchAvailableCoupons();
316
313
  setAvailableCoupons(coupons);
317
- setAppliedCoupon(applied);
318
314
  } catch {
319
315
  } finally {
320
316
  setIsLoading(false);
@@ -1,10 +1,9 @@
1
1
  export { A as Address } from '../address-DQEZzyUG.cjs';
2
- export { A as Analytics, B as Booking, a as BookingDetails, b as CollectionAttributes, C as CollectionResponse, c as CollectionVariant, R as Review, s as singleCollection } from '../booking-Drl7-IL7.cjs';
3
- export { A as Attributes, B as BookingService, a as BookingServiceDate, C as Cart, b as CartState, c as CustomField, O as OperatingHours, P as Photos, d as Product, e as ProductDetail, S as SpecialHours, T as TimeSlot, W as WishlistState } from '../cart-DVrn8hD0.cjs';
4
- export { C as Category, O as Order } from '../orders-D0oC9ugD.cjs';
5
- export { A as ApplicableTarget, C as Coupon, a as CouponResponse, b as CouponStatus, c as Coupons, D as DiscountType, V as ValueType } from '../coupons-C7iJ-1cy.cjs';
2
+ export { A as Analytics, B as Booking, a as BookingDetails, b as CollectionAttributes, C as CollectionResponse, c as CollectionVariant, R as Review, s as singleCollection } from '../booking-Dd877kxd.cjs';
3
+ export { A as ApplicableTarget, a as Attributes, B as BookingService, b as BookingServiceDate, C as Cart, c as CartState, d as Category, e as Coupon, f as CouponResponse, g as CouponStatus, h as Coupons, i as CustomField, D as DiscountType, O as OperatingHours, P as Photos, j as Product, k as ProductDetail, S as SpecialHours, T as TimeSlot, V as ValueType, W as WishlistState } from '../cart-D8UXTY1g.cjs';
4
+ export { O as Order } from '../orders-DHJhJ3xz.cjs';
6
5
  export { D as Data, P as PaymentInstrument, a as PhonePe } from '../phonepe-D7vn-9SR.cjs';
7
- export { U as User, W as Wishlist } from '../wishlist-CBCZD66Y.cjs';
6
+ export { U as User, W as Wishlist } from '../wishlist-C3SK9SS0.cjs';
8
7
  import 'react-toastify';
9
8
 
10
9
  declare namespace CountryModel {
@@ -1,10 +1,9 @@
1
1
  export { A as Address } from '../address-DQEZzyUG.js';
2
- export { A as Analytics, B as Booking, a as BookingDetails, b as CollectionAttributes, C as CollectionResponse, c as CollectionVariant, R as Review, s as singleCollection } from '../booking-ClX-dhX7.js';
3
- export { A as Attributes, B as BookingService, a as BookingServiceDate, C as Cart, b as CartState, c as CustomField, O as OperatingHours, P as Photos, d as Product, e as ProductDetail, S as SpecialHours, T as TimeSlot, W as WishlistState } from '../cart-DVrn8hD0.js';
4
- export { C as Category, O as Order } from '../orders-CkUzv5Xh.js';
5
- export { A as ApplicableTarget, C as Coupon, a as CouponResponse, b as CouponStatus, c as Coupons, D as DiscountType, V as ValueType } from '../coupons-CnfTKL1i.js';
2
+ export { A as Analytics, B as Booking, a as BookingDetails, b as CollectionAttributes, C as CollectionResponse, c as CollectionVariant, R as Review, s as singleCollection } from '../booking-Bo_tELLX.js';
3
+ export { A as ApplicableTarget, a as Attributes, B as BookingService, b as BookingServiceDate, C as Cart, c as CartState, d as Category, e as Coupon, f as CouponResponse, g as CouponStatus, h as Coupons, i as CustomField, D as DiscountType, O as OperatingHours, P as Photos, j as Product, k as ProductDetail, S as SpecialHours, T as TimeSlot, V as ValueType, W as WishlistState } from '../cart-D8UXTY1g.js';
4
+ export { O as Order } from '../orders-DHJhJ3xz.js';
6
5
  export { D as Data, P as PaymentInstrument, a as PhonePe } from '../phonepe-D7vn-9SR.js';
7
- export { U as User, W as Wishlist } from '../wishlist-BzhnCAQD.js';
6
+ export { U as User, W as Wishlist } from '../wishlist-BMWfB0Xe.js';
8
7
  import 'react-toastify';
9
8
 
10
9
  declare namespace CountryModel {
@@ -1,20 +1,3 @@
1
- import { f as SLICE_STATUS } from './cart-DVrn8hD0.js';
2
-
3
- declare namespace Category {
4
- interface Root {
5
- id: number;
6
- name: string;
7
- photo: string;
8
- slug: string;
9
- description: string;
10
- children?: Root[];
11
- }
12
- interface CategoriesState {
13
- data: Root[];
14
- status: SLICE_STATUS;
15
- }
16
- }
17
-
18
1
  declare namespace Order {
19
2
  interface Root {
20
3
  id: number;
@@ -156,4 +139,4 @@ declare namespace Order {
156
139
  }
157
140
  }
158
141
 
159
- export { Category as C, Order as O };
142
+ export { Order as O };
@@ -1,20 +1,3 @@
1
- import { f as SLICE_STATUS } from './cart-DVrn8hD0.cjs';
2
-
3
- declare namespace Category {
4
- interface Root {
5
- id: number;
6
- name: string;
7
- photo: string;
8
- slug: string;
9
- description: string;
10
- children?: Root[];
11
- }
12
- interface CategoriesState {
13
- data: Root[];
14
- status: SLICE_STATUS;
15
- }
16
- }
17
-
18
1
  declare namespace Order {
19
2
  interface Root {
20
3
  id: number;
@@ -156,4 +139,4 @@ declare namespace Order {
156
139
  }
157
140
  }
158
141
 
159
- export { Category as C, Order as O };
142
+ export { Order as O };
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkGH75WUO2_cjs = require('../chunk-GH75WUO2.cjs');
4
- var chunkRCXQJ6XC_cjs = require('../chunk-RCXQJ6XC.cjs');
3
+ var chunkNBZIUA6W_cjs = require('../chunk-NBZIUA6W.cjs');
4
+ var chunk34KV265H_cjs = require('../chunk-34KV265H.cjs');
5
5
  var chunkCFF632IQ_cjs = require('../chunk-CFF632IQ.cjs');
6
6
  require('../chunk-UXLUE3HW.cjs');
7
7
  var chunkGQTO5ZE2_cjs = require('../chunk-GQTO5ZE2.cjs');
@@ -36,7 +36,7 @@ var useAuthStore = zustand.create((set, get) => ({
36
36
  set({ user, status: "success" /* SUCCESS */, isAuthenticated: true });
37
37
  const localCartItems = chunkCFF632IQ_cjs.cart_default.get();
38
38
  if (localCartItems) {
39
- const response = await chunkRCXQJ6XC_cjs.addToCart(
39
+ const response = await chunk34KV265H_cjs.addToCart(
40
40
  Object.entries(localCartItems.products_quantity).map(
41
41
  ([key, value]) => ({
42
42
  variant_id: parseInt(key),
@@ -46,7 +46,7 @@ var useAuthStore = zustand.create((set, get) => ({
46
46
  );
47
47
  if (response) {
48
48
  chunkCFF632IQ_cjs.cart_default.clear();
49
- chunkGH75WUO2_cjs.useCartStore.getState().fetchCart();
49
+ chunkNBZIUA6W_cjs.useCartStore.getState().fetchCart();
50
50
  setTimeout(() => {
51
51
  if (!preventRefreshAfterLogin) {
52
52
  if (redirect) {
@@ -93,7 +93,7 @@ var useWishlistStore = zustand.create((set) => ({
93
93
  resetWishlist: () => set(initialState),
94
94
  syncWishlist: async () => {
95
95
  try {
96
- const response = await chunkRCXQJ6XC_cjs.getWishlist("/customer/wishlist/");
96
+ const response = await chunk34KV265H_cjs.getWishlist("/customer/wishlist/");
97
97
  if (response) {
98
98
  set({
99
99
  wishlist_count: response.wishlist_count,
@@ -121,7 +121,7 @@ var useProductStore = zustand.create((set, get) => ({
121
121
  data: filter.page === 1 ? [] : state.data
122
122
  }));
123
123
  try {
124
- const response = await chunkRCXQJ6XC_cjs.getProducts({ ...filter });
124
+ const response = await chunk34KV265H_cjs.getProducts({ ...filter });
125
125
  if (response.data) {
126
126
  const { results, ...meta } = response.data;
127
127
  set((state) => ({
@@ -141,7 +141,7 @@ var useProductStore = zustand.create((set, get) => ({
141
141
 
142
142
  Object.defineProperty(exports, "useCartStore", {
143
143
  enumerable: true,
144
- get: function () { return chunkGH75WUO2_cjs.useCartStore; }
144
+ get: function () { return chunkNBZIUA6W_cjs.useCartStore; }
145
145
  });
146
146
  exports.loginUser = loginUser;
147
147
  exports.useAuthStore = useAuthStore;
@@ -1,6 +1,6 @@
1
1
  import * as zustand from 'zustand';
2
- import { b as CartState, C as Cart, d as Product } from '../cart-DVrn8hD0.cjs';
3
- import { U as User, W as Wishlist } from '../wishlist-CBCZD66Y.cjs';
2
+ import { c as CartState, C as Cart, j as Product } from '../cart-D8UXTY1g.cjs';
3
+ import { U as User, W as Wishlist } from '../wishlist-C3SK9SS0.cjs';
4
4
  import 'react-toastify';
5
5
 
6
6
  interface CartStore extends CartState {
@@ -1,6 +1,6 @@
1
1
  import * as zustand from 'zustand';
2
- import { b as CartState, C as Cart, d as Product } from '../cart-DVrn8hD0.js';
3
- import { U as User, W as Wishlist } from '../wishlist-BzhnCAQD.js';
2
+ import { c as CartState, C as Cart, j as Product } from '../cart-D8UXTY1g.js';
3
+ import { U as User, W as Wishlist } from '../wishlist-BMWfB0Xe.js';
4
4
  import 'react-toastify';
5
5
 
6
6
  interface CartStore extends CartState {
@@ -1,6 +1,6 @@
1
- import { useCartStore } from '../chunk-7MQOVWLW.js';
2
- export { useCartStore } from '../chunk-7MQOVWLW.js';
3
- import { addToCart, getWishlist, getProducts } from '../chunk-57ZBPAXU.js';
1
+ import { useCartStore } from '../chunk-AZIFK7HK.js';
2
+ export { useCartStore } from '../chunk-AZIFK7HK.js';
3
+ import { addToCart, getWishlist, getProducts } from '../chunk-Z7LHRD3V.js';
4
4
  import { cart_default } from '../chunk-E7WPE3PV.js';
5
5
  import '../chunk-GB3HW6DM.js';
6
6
  import { auth_default, USER_CRED_TOKEN, USER_CREDENTIALS } from '../chunk-FLBJKM6G.js';
@@ -1,9 +1,9 @@
1
- import { C as Cart, e as ProductDetail, d as Product, O as OperatingHours, T as TimeSlot } from '../cart-DVrn8hD0.cjs';
2
- export { g as ADDRESS_FORM_SESSION_KEY, h as ALLOWED_COUNTRIES, D as DEFAULT_TOAST_CONFIG, i as PRODUCT_STATUSES, f as SLICE_STATUS, U as USER_CART, j as USER_CREDENTIALS, k as USER_CRED_REFRESH_TOKEN, l as USER_CRED_TOKEN, p as pathNameMap } from '../cart-DVrn8hD0.cjs';
1
+ import { C as Cart, k as ProductDetail, d as Category$1, j as Product, O as OperatingHours, T as TimeSlot } from '../cart-D8UXTY1g.cjs';
2
+ export { m as ADDRESS_FORM_SESSION_KEY, n as ALLOWED_COUNTRIES, o as DEFAULT_TOAST_CONFIG, p as PRODUCT_STATUSES, l as SLICE_STATUS, U as USER_CART, q as USER_CREDENTIALS, r as USER_CRED_REFRESH_TOKEN, s as USER_CRED_TOKEN, t as pathNameMap } from '../cart-D8UXTY1g.cjs';
3
3
  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';
4
- import { C as Category$1, O as Order } from '../orders-D0oC9ugD.cjs';
5
4
  import { AxiosResponse } from 'axios';
6
5
  import { a as PhonePe } from '../phonepe-D7vn-9SR.cjs';
6
+ import { O as Order } from '../orders-DHJhJ3xz.cjs';
7
7
  import 'react-toastify';
8
8
 
9
9
  declare function setAuthTokenChangeCallback(callback: (token: string | undefined) => void): void;
@@ -1,9 +1,9 @@
1
- import { C as Cart, e as ProductDetail, d as Product, O as OperatingHours, T as TimeSlot } from '../cart-DVrn8hD0.js';
2
- export { g as ADDRESS_FORM_SESSION_KEY, h as ALLOWED_COUNTRIES, D as DEFAULT_TOAST_CONFIG, i as PRODUCT_STATUSES, f as SLICE_STATUS, U as USER_CART, j as USER_CREDENTIALS, k as USER_CRED_REFRESH_TOKEN, l as USER_CRED_TOKEN, p as pathNameMap } from '../cart-DVrn8hD0.js';
1
+ import { C as Cart, k as ProductDetail, d as Category$1, j as Product, O as OperatingHours, T as TimeSlot } from '../cart-D8UXTY1g.js';
2
+ export { m as ADDRESS_FORM_SESSION_KEY, n as ALLOWED_COUNTRIES, o as DEFAULT_TOAST_CONFIG, p as PRODUCT_STATUSES, l as SLICE_STATUS, U as USER_CART, q as USER_CREDENTIALS, r as USER_CRED_REFRESH_TOKEN, s as USER_CRED_TOKEN, t as pathNameMap } from '../cart-D8UXTY1g.js';
3
3
  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';
4
- import { C as Category$1, O as Order } from '../orders-CkUzv5Xh.js';
5
4
  import { AxiosResponse } from 'axios';
6
5
  import { a as PhonePe } from '../phonepe-D7vn-9SR.js';
6
+ import { O as Order } from '../orders-DHJhJ3xz.js';
7
7
  import 'react-toastify';
8
8
 
9
9
  declare function setAuthTokenChangeCallback(callback: (token: string | undefined) => void): void;
@@ -1,4 +1,4 @@
1
- import { f as SLICE_STATUS, e as ProductDetail } from './cart-DVrn8hD0.js';
1
+ import { l as SLICE_STATUS, k as ProductDetail } from './cart-D8UXTY1g.js';
2
2
 
3
3
  declare namespace User {
4
4
  interface Root {
@@ -1,4 +1,4 @@
1
- import { f as SLICE_STATUS, e as ProductDetail } from './cart-DVrn8hD0.cjs';
1
+ import { l as SLICE_STATUS, k as ProductDetail } from './cart-D8UXTY1g.cjs';
2
2
 
3
3
  declare namespace User {
4
4
  interface Root {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storepecker/storefront-core",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Shared logic and utilities for Snapstore themes",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,37 +0,0 @@
1
- import { C as Category } from './orders-D0oC9ugD.cjs';
2
-
3
- type DiscountType = "discount";
4
- type ValueType = "percentage" | "fixed";
5
- type ApplicableTarget = "product_category" | "product_variant" | "product_bundle" | "customer";
6
- type CouponStatus = "active" | "inactive" | "expired";
7
- interface Coupon {
8
- id: number;
9
- coupon_code: string;
10
- discount_type: DiscountType;
11
- value: string;
12
- value_type: ValueType;
13
- min_order_amount: string;
14
- max_discount_amount: string;
15
- start_date: string;
16
- end_date: string;
17
- status: CouponStatus;
18
- is_deleted: boolean;
19
- usage_limit: number;
20
- usage_count: number;
21
- applicable_target: ApplicableTarget;
22
- applicable_product_variants: any[];
23
- applicable_product_bundles: any[];
24
- applicable_product_categories: Category.Root[];
25
- applicable_customers: any[];
26
- auto_apply: boolean;
27
- created_at: string;
28
- updated_at: string;
29
- is_cart_applicable: boolean;
30
- coupon_message: string;
31
- }
32
- type Coupons = Coupon[];
33
- interface CouponResponse {
34
- coupon: Coupon;
35
- }
36
-
37
- export type { ApplicableTarget as A, Coupon as C, DiscountType as D, ValueType as V, CouponResponse as a, CouponStatus as b, Coupons as c };
@@ -1,37 +0,0 @@
1
- import { C as Category } from './orders-CkUzv5Xh.js';
2
-
3
- type DiscountType = "discount";
4
- type ValueType = "percentage" | "fixed";
5
- type ApplicableTarget = "product_category" | "product_variant" | "product_bundle" | "customer";
6
- type CouponStatus = "active" | "inactive" | "expired";
7
- interface Coupon {
8
- id: number;
9
- coupon_code: string;
10
- discount_type: DiscountType;
11
- value: string;
12
- value_type: ValueType;
13
- min_order_amount: string;
14
- max_discount_amount: string;
15
- start_date: string;
16
- end_date: string;
17
- status: CouponStatus;
18
- is_deleted: boolean;
19
- usage_limit: number;
20
- usage_count: number;
21
- applicable_target: ApplicableTarget;
22
- applicable_product_variants: any[];
23
- applicable_product_bundles: any[];
24
- applicable_product_categories: Category.Root[];
25
- applicable_customers: any[];
26
- auto_apply: boolean;
27
- created_at: string;
28
- updated_at: string;
29
- is_cart_applicable: boolean;
30
- coupon_message: string;
31
- }
32
- type Coupons = Coupon[];
33
- interface CouponResponse {
34
- coupon: Coupon;
35
- }
36
-
37
- export type { ApplicableTarget as A, Coupon as C, DiscountType as D, ValueType as V, CouponResponse as a, CouponStatus as b, Coupons as c };