@storepecker/storefront-core 2.1.0 → 2.2.0

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 (39) hide show
  1. package/dist/{address-DQEZzyUG.d.cts → address-DwBZHzbI.d.cts} +2 -2
  2. package/dist/{address-DQEZzyUG.d.ts → address-DwBZHzbI.d.ts} +2 -2
  3. package/dist/api/index.cjs +8 -0
  4. package/dist/api/index.d.cts +49 -16
  5. package/dist/api/index.d.ts +49 -16
  6. package/dist/api/index.js +8 -1
  7. package/dist/{booking-CZ59BXk3.d.ts → booking-BGvxHd-t.d.cts} +2 -2
  8. package/dist/{booking-BgZoXUBv.d.cts → booking-BSZ6NP-e.d.ts} +2 -2
  9. package/dist/{cart-BY8D8w-s.d.cts → cart-CfsntcpS.d.ts} +38 -5
  10. package/dist/{cart-GuhgeBBt.d.ts → cart-XumsY-y0.d.cts} +38 -5
  11. package/dist/checkout/index.d.cts +3 -3
  12. package/dist/checkout/index.d.ts +3 -3
  13. package/dist/collections-D4tvWcZp.d.ts +23 -0
  14. package/dist/collections-dCr3VEJo.d.cts +23 -0
  15. package/dist/components/index.d.cts +4 -4
  16. package/dist/components/index.d.ts +4 -4
  17. package/dist/hooks/index.d.cts +20 -17
  18. package/dist/hooks/index.d.ts +20 -17
  19. package/dist/models/index.d.cts +8 -8
  20. package/dist/models/index.d.ts +8 -8
  21. package/dist/{orders-DHJhJ3xz.d.cts → orders-CvCa7XWm.d.ts} +19 -17
  22. package/dist/{orders-DHJhJ3xz.d.ts → orders-Dm5Dq02y.d.cts} +19 -17
  23. package/dist/{phonepe-D7vn-9SR.d.cts → phonepe-dWMLZel6.d.cts} +3 -3
  24. package/dist/{phonepe-D7vn-9SR.d.ts → phonepe-dWMLZel6.d.ts} +3 -3
  25. package/dist/{product-Dfi0ke-4.d.cts → product-Daxj09p9.d.cts} +64 -61
  26. package/dist/{product-Dfi0ke-4.d.ts → product-Daxj09p9.d.ts} +64 -61
  27. package/dist/store/index.d.cts +8 -4
  28. package/dist/store/index.d.ts +8 -4
  29. package/dist/{useAddressForm-DgkCP1nG.d.cts → useAddressForm-DGbEn91-.d.cts} +1 -1
  30. package/dist/{useAddressForm-C-Uzug4d.d.ts → useAddressForm-cO3Au33k.d.ts} +1 -1
  31. package/dist/utils/index.d.cts +7 -6
  32. package/dist/utils/index.d.ts +7 -6
  33. package/dist/wishlist-Cow1wVqf.d.cts +10 -0
  34. package/dist/wishlist-gamNg0T1.d.ts +10 -0
  35. package/package.json +1 -1
  36. package/dist/collections-CenI9AlQ.d.cts +0 -40
  37. package/dist/collections-CenI9AlQ.d.ts +0 -40
  38. package/dist/wishlist-DHOvXmJj.d.cts +0 -41
  39. package/dist/wishlist-LfdFxddw.d.ts +0 -41
@@ -1,31 +1,31 @@
1
- import { A as Address } from '../address-DQEZzyUG.cjs';
2
- import { C as Cart, b as Category, c as Coupon } from '../cart-BY8D8w-s.cjs';
3
- import { O as Order } from '../orders-DHJhJ3xz.cjs';
4
- import { b as Product, c as ProductDetail, A as Attributes } from '../product-Dfi0ke-4.cjs';
5
- import { U as User, W as Wishlist } from '../wishlist-DHOvXmJj.cjs';
6
- export { U as UseAddressFormOptions, a as UseAddressFormReturn, u as useAddressForm } from '../useAddressForm-DgkCP1nG.cjs';
1
+ import { A as Address } from '../address-DwBZHzbI.cjs';
2
+ import { C as Cart, b as Category, U as User, c as Coupon } from '../cart-XumsY-y0.cjs';
3
+ import { O as Order } from '../orders-Dm5Dq02y.cjs';
4
+ import { d as Product, f as ProductDetail, e as ProductAttribute, A as Attributes } from '../product-Daxj09p9.cjs';
5
+ import { W as Wishlist } from '../wishlist-Cow1wVqf.cjs';
6
+ export { U as UseAddressFormOptions, a as UseAddressFormReturn, u as useAddressForm } from '../useAddressForm-DGbEn91-.cjs';
7
7
  import 'react-toastify';
8
8
  import 'react';
9
9
  import 'formik';
10
10
 
11
11
  declare const useAddress: () => {
12
12
  data: Address[];
13
- error: any;
13
+ error: unknown;
14
14
  isLoading: boolean;
15
15
  mutate: () => Promise<void>;
16
16
  };
17
17
 
18
18
  declare const useCart: (addressId?: number) => {
19
19
  data: Cart.Root | undefined;
20
- error: any;
20
+ error: unknown;
21
21
  isLoading: boolean;
22
22
  mutate: (addrId?: number) => Promise<void>;
23
23
  refetchWithParams: (newAddressId?: number) => void;
24
24
  };
25
25
 
26
- declare const useOrders: (filters: any) => {
26
+ declare const useOrders: (filters: Record<string, string>) => {
27
27
  data: Order.OrderResponse | undefined;
28
- error: any;
28
+ error: unknown;
29
29
  isLoading: boolean;
30
30
  mutate: () => Promise<void>;
31
31
  };
@@ -51,26 +51,26 @@ interface UseGetProductsReturn {
51
51
  }
52
52
  declare function useGetProducts(initialFilter: CustomObject, options?: UseGetProductsOptions): UseGetProductsReturn;
53
53
  declare const useGetProductDetails: (slug: string) => {
54
- data: any;
54
+ data: Product.Root | undefined;
55
55
  loading: boolean;
56
56
  isLoading: boolean;
57
57
  };
58
58
  declare const useGetProductCategories: () => {
59
59
  data: Category.Root[];
60
60
  loading: boolean;
61
- error: any;
61
+ error: unknown;
62
62
  };
63
63
 
64
64
  declare const useUserDetails: () => {
65
65
  data: User.Root | undefined;
66
- error: any;
66
+ error: unknown;
67
67
  isLoading: boolean;
68
68
  mutate: () => Promise<void>;
69
69
  };
70
70
 
71
71
  declare const useWishlist: () => {
72
72
  data: Wishlist.Root | undefined;
73
- error: any;
73
+ error: unknown;
74
74
  isLoading: boolean;
75
75
  mutate: () => Promise<void>;
76
76
  };
@@ -139,7 +139,7 @@ interface UseVariantSelectorOptions {
139
139
  /** The current product detail. */
140
140
  product: ProductDetail.Root;
141
141
  /** Product attributes map (variant type → choices). */
142
- productAttributes: Record<string, ProductDetail.ProductAttribute[]>;
142
+ productAttributes: Record<string, ProductAttribute[]>;
143
143
  /** Called when a new variant is resolved. Theme handles navigation/callback. */
144
144
  onVariantChange?: (slug: string) => void;
145
145
  }
@@ -183,13 +183,16 @@ interface UseShopCheckoutReturn {
183
183
  isUserAuthenticated: boolean;
184
184
  productCustomizations: ProductDetail.Customization[];
185
185
  handleAddToCart: () => Promise<void>;
186
- handleCustomizationSubmit: (data: any) => Promise<void>;
186
+ handleCustomizationSubmit: (data: Record<string, string>) => Promise<void>;
187
187
  handleQuantityChange: (value: number) => void;
188
188
  handleShare: () => void;
189
189
  handleLogin: () => void;
190
190
  closeLoginModal: () => void;
191
191
  handleNotifyMe: () => void;
192
- handleNotifyMeFormSubmit: (values: any) => Promise<void>;
192
+ handleNotifyMeFormSubmit: (values: {
193
+ email: string;
194
+ name: string;
195
+ }) => Promise<void>;
193
196
  handleNotifyMeModalClose: () => void;
194
197
  handleWishlistUpdated: (status: "add" | "remove") => void;
195
198
  isOutOfStock: boolean;
@@ -1,31 +1,31 @@
1
- import { A as Address } from '../address-DQEZzyUG.js';
2
- import { C as Cart, b as Category, c as Coupon } from '../cart-GuhgeBBt.js';
3
- import { O as Order } from '../orders-DHJhJ3xz.js';
4
- import { b as Product, c as ProductDetail, A as Attributes } from '../product-Dfi0ke-4.js';
5
- import { U as User, W as Wishlist } from '../wishlist-LfdFxddw.js';
6
- export { U as UseAddressFormOptions, a as UseAddressFormReturn, u as useAddressForm } from '../useAddressForm-C-Uzug4d.js';
1
+ import { A as Address } from '../address-DwBZHzbI.js';
2
+ import { C as Cart, b as Category, U as User, c as Coupon } from '../cart-CfsntcpS.js';
3
+ import { O as Order } from '../orders-CvCa7XWm.js';
4
+ import { d as Product, f as ProductDetail, e as ProductAttribute, A as Attributes } from '../product-Daxj09p9.js';
5
+ import { W as Wishlist } from '../wishlist-gamNg0T1.js';
6
+ export { U as UseAddressFormOptions, a as UseAddressFormReturn, u as useAddressForm } from '../useAddressForm-cO3Au33k.js';
7
7
  import 'react-toastify';
8
8
  import 'react';
9
9
  import 'formik';
10
10
 
11
11
  declare const useAddress: () => {
12
12
  data: Address[];
13
- error: any;
13
+ error: unknown;
14
14
  isLoading: boolean;
15
15
  mutate: () => Promise<void>;
16
16
  };
17
17
 
18
18
  declare const useCart: (addressId?: number) => {
19
19
  data: Cart.Root | undefined;
20
- error: any;
20
+ error: unknown;
21
21
  isLoading: boolean;
22
22
  mutate: (addrId?: number) => Promise<void>;
23
23
  refetchWithParams: (newAddressId?: number) => void;
24
24
  };
25
25
 
26
- declare const useOrders: (filters: any) => {
26
+ declare const useOrders: (filters: Record<string, string>) => {
27
27
  data: Order.OrderResponse | undefined;
28
- error: any;
28
+ error: unknown;
29
29
  isLoading: boolean;
30
30
  mutate: () => Promise<void>;
31
31
  };
@@ -51,26 +51,26 @@ interface UseGetProductsReturn {
51
51
  }
52
52
  declare function useGetProducts(initialFilter: CustomObject, options?: UseGetProductsOptions): UseGetProductsReturn;
53
53
  declare const useGetProductDetails: (slug: string) => {
54
- data: any;
54
+ data: Product.Root | undefined;
55
55
  loading: boolean;
56
56
  isLoading: boolean;
57
57
  };
58
58
  declare const useGetProductCategories: () => {
59
59
  data: Category.Root[];
60
60
  loading: boolean;
61
- error: any;
61
+ error: unknown;
62
62
  };
63
63
 
64
64
  declare const useUserDetails: () => {
65
65
  data: User.Root | undefined;
66
- error: any;
66
+ error: unknown;
67
67
  isLoading: boolean;
68
68
  mutate: () => Promise<void>;
69
69
  };
70
70
 
71
71
  declare const useWishlist: () => {
72
72
  data: Wishlist.Root | undefined;
73
- error: any;
73
+ error: unknown;
74
74
  isLoading: boolean;
75
75
  mutate: () => Promise<void>;
76
76
  };
@@ -139,7 +139,7 @@ interface UseVariantSelectorOptions {
139
139
  /** The current product detail. */
140
140
  product: ProductDetail.Root;
141
141
  /** Product attributes map (variant type → choices). */
142
- productAttributes: Record<string, ProductDetail.ProductAttribute[]>;
142
+ productAttributes: Record<string, ProductAttribute[]>;
143
143
  /** Called when a new variant is resolved. Theme handles navigation/callback. */
144
144
  onVariantChange?: (slug: string) => void;
145
145
  }
@@ -183,13 +183,16 @@ interface UseShopCheckoutReturn {
183
183
  isUserAuthenticated: boolean;
184
184
  productCustomizations: ProductDetail.Customization[];
185
185
  handleAddToCart: () => Promise<void>;
186
- handleCustomizationSubmit: (data: any) => Promise<void>;
186
+ handleCustomizationSubmit: (data: Record<string, string>) => Promise<void>;
187
187
  handleQuantityChange: (value: number) => void;
188
188
  handleShare: () => void;
189
189
  handleLogin: () => void;
190
190
  closeLoginModal: () => void;
191
191
  handleNotifyMe: () => void;
192
- handleNotifyMeFormSubmit: (values: any) => Promise<void>;
192
+ handleNotifyMeFormSubmit: (values: {
193
+ email: string;
194
+ name: string;
195
+ }) => Promise<void>;
193
196
  handleNotifyMeModalClose: () => void;
194
197
  handleWishlistUpdated: (status: "add" | "remove") => void;
195
198
  isOutOfStock: boolean;
@@ -1,11 +1,11 @@
1
- export { A as Address } from '../address-DQEZzyUG.cjs';
2
- export { A as Analytics, B as Booking, a as BookingDetails, R as Review } from '../booking-BgZoXUBv.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, V as ValueType } from '../cart-BY8D8w-s.cjs';
4
- export { A as CollectionAttributes, C as CollectionResponse, a as CollectionVariant, s as singleCollection } from '../collections-CenI9AlQ.cjs';
5
- export { O as Order } from '../orders-DHJhJ3xz.cjs';
6
- export { D as Data, P as PaymentInstrument, a as PhonePe } from '../phonepe-D7vn-9SR.cjs';
7
- export { A as Attributes, B as BookingService, a as BookingServiceDate, C as CustomField, O as OperatingHours, P as Photos, b as Product, c as ProductDetail, S as SpecialHours, T as TimeSlot, W as WishlistState } from '../product-Dfi0ke-4.cjs';
8
- export { U as User, W as Wishlist } from '../wishlist-DHOvXmJj.cjs';
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';
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';
9
9
  import 'react-toastify';
10
10
 
11
11
  declare namespace CountryModel {
@@ -1,11 +1,11 @@
1
- export { A as Address } from '../address-DQEZzyUG.js';
2
- export { A as Analytics, B as Booking, a as BookingDetails, R as Review } from '../booking-CZ59BXk3.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, V as ValueType } from '../cart-GuhgeBBt.js';
4
- export { A as CollectionAttributes, C as CollectionResponse, a as CollectionVariant, s as singleCollection } from '../collections-CenI9AlQ.js';
5
- export { O as Order } from '../orders-DHJhJ3xz.js';
6
- export { D as Data, P as PaymentInstrument, a as PhonePe } from '../phonepe-D7vn-9SR.js';
7
- export { A as Attributes, B as BookingService, a as BookingServiceDate, C as CustomField, O as OperatingHours, P as Photos, b as Product, c as ProductDetail, S as SpecialHours, T as TimeSlot, W as WishlistState } from '../product-Dfi0ke-4.js';
8
- export { U as User, W as Wishlist } from '../wishlist-LfdFxddw.js';
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';
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';
9
9
  import 'react-toastify';
10
10
 
11
11
  declare namespace CountryModel {
@@ -1,3 +1,5 @@
1
+ import { P as Photos } from './product-Daxj09p9.js';
2
+
1
3
  declare namespace Order {
2
4
  interface Root {
3
5
  id: number;
@@ -9,18 +11,18 @@ declare namespace Order {
9
11
  purchased_products: PurchasedProduct[];
10
12
  order_status: OrderStatus;
11
13
  order_number: number;
12
- payment_method: any;
14
+ payment_method: string | null;
13
15
  shipping_address: string;
14
16
  shipping_city: string;
15
17
  shipping_state: string;
16
18
  shipping_country: string;
17
19
  shipping_zip: string;
18
- tracking_id: any;
19
- tracking_url: any;
20
+ tracking_id: string | null;
21
+ tracking_url: string | null;
20
22
  delivery_date?: string;
21
- delivered_at: any;
22
- cancelled_at: any;
23
- returned_at: any;
23
+ delivered_at: string | null;
24
+ cancelled_at: string | null;
25
+ returned_at: string | null;
24
26
  customer_details: CustomerDetails;
25
27
  customer_name: string;
26
28
  customer_phone: string;
@@ -59,24 +61,24 @@ declare namespace Order {
59
61
  purchased_products: PurchasedProduct[];
60
62
  order_status: string;
61
63
  order_number: number;
62
- payment_method: any;
64
+ payment_method: string | null;
63
65
  shipping_address: string;
64
66
  shipping_city: string;
65
67
  shipping_state: string;
66
68
  shipping_country: string;
67
69
  shipping_zip: string;
68
- tracking_id: any;
69
- tracking_url: any;
70
- delivery_date: any;
71
- delivered_at: any;
72
- cancelled_at: any;
73
- returned_at: any;
70
+ tracking_id: string | null;
71
+ tracking_url: string | null;
72
+ delivery_date: string | null;
73
+ delivered_at: string | null;
74
+ cancelled_at: string | null;
75
+ returned_at: string | null;
74
76
  customer_email: string;
75
77
  customer_name: string;
76
78
  customer_phone: string;
77
- shipped_at: any;
78
- confirmed_at: any;
79
- refunded_at: any;
79
+ shipped_at: string | null;
80
+ confirmed_at: string | null;
81
+ refunded_at: string | null;
80
82
  store_address: string;
81
83
  store_city: string;
82
84
  store_state: string;
@@ -118,7 +120,7 @@ declare namespace Order {
118
120
  total_tax_price: number;
119
121
  total_price: number;
120
122
  variant_attributes: VariantAttributes;
121
- product_variant_photo: any;
123
+ product_variant_photo: Photos | null;
122
124
  is_digital: boolean;
123
125
  discount_amount: number;
124
126
  }
@@ -1,3 +1,5 @@
1
+ import { P as Photos } from './product-Daxj09p9.cjs';
2
+
1
3
  declare namespace Order {
2
4
  interface Root {
3
5
  id: number;
@@ -9,18 +11,18 @@ declare namespace Order {
9
11
  purchased_products: PurchasedProduct[];
10
12
  order_status: OrderStatus;
11
13
  order_number: number;
12
- payment_method: any;
14
+ payment_method: string | null;
13
15
  shipping_address: string;
14
16
  shipping_city: string;
15
17
  shipping_state: string;
16
18
  shipping_country: string;
17
19
  shipping_zip: string;
18
- tracking_id: any;
19
- tracking_url: any;
20
+ tracking_id: string | null;
21
+ tracking_url: string | null;
20
22
  delivery_date?: string;
21
- delivered_at: any;
22
- cancelled_at: any;
23
- returned_at: any;
23
+ delivered_at: string | null;
24
+ cancelled_at: string | null;
25
+ returned_at: string | null;
24
26
  customer_details: CustomerDetails;
25
27
  customer_name: string;
26
28
  customer_phone: string;
@@ -59,24 +61,24 @@ declare namespace Order {
59
61
  purchased_products: PurchasedProduct[];
60
62
  order_status: string;
61
63
  order_number: number;
62
- payment_method: any;
64
+ payment_method: string | null;
63
65
  shipping_address: string;
64
66
  shipping_city: string;
65
67
  shipping_state: string;
66
68
  shipping_country: string;
67
69
  shipping_zip: string;
68
- tracking_id: any;
69
- tracking_url: any;
70
- delivery_date: any;
71
- delivered_at: any;
72
- cancelled_at: any;
73
- returned_at: any;
70
+ tracking_id: string | null;
71
+ tracking_url: string | null;
72
+ delivery_date: string | null;
73
+ delivered_at: string | null;
74
+ cancelled_at: string | null;
75
+ returned_at: string | null;
74
76
  customer_email: string;
75
77
  customer_name: string;
76
78
  customer_phone: string;
77
- shipped_at: any;
78
- confirmed_at: any;
79
- refunded_at: any;
79
+ shipped_at: string | null;
80
+ confirmed_at: string | null;
81
+ refunded_at: string | null;
80
82
  store_address: string;
81
83
  store_city: string;
82
84
  store_state: string;
@@ -118,7 +120,7 @@ declare namespace Order {
118
120
  total_tax_price: number;
119
121
  total_price: number;
120
122
  variant_attributes: VariantAttributes;
121
- product_variant_photo: any;
123
+ product_variant_photo: Photos | null;
122
124
  is_digital: boolean;
123
125
  discount_amount: number;
124
126
  }
@@ -17,10 +17,10 @@ interface PaymentInstrument {
17
17
  type: string;
18
18
  cardType: string;
19
19
  pgTransactionId: string;
20
- bankTransactionId: any;
21
- pgAuthorizationCode: any;
20
+ bankTransactionId: string | null;
21
+ pgAuthorizationCode: string | null;
22
22
  arn: string;
23
- bankId: any;
23
+ bankId: string | null;
24
24
  brn: string;
25
25
  }
26
26
 
@@ -17,10 +17,10 @@ interface PaymentInstrument {
17
17
  type: string;
18
18
  cardType: string;
19
19
  pgTransactionId: string;
20
- bankTransactionId: any;
21
- pgAuthorizationCode: any;
20
+ bankTransactionId: string | null;
21
+ pgAuthorizationCode: string | null;
22
22
  arn: string;
23
- bankId: any;
23
+ bankId: string | null;
24
24
  brn: string;
25
25
  }
26
26
 
@@ -30,6 +30,22 @@ declare namespace Product {
30
30
  inventory?: number;
31
31
  }>;
32
32
  }
33
+ interface Product extends BaseProduct {
34
+ videos: any[];
35
+ variants_grouped_by: string;
36
+ category_name: string;
37
+ brand_name: string;
38
+ is_digital: boolean;
39
+ live_customisation_enabled: boolean;
40
+ customizations: Customization[];
41
+ }
42
+ interface Customization {
43
+ name: string;
44
+ customization_type: string;
45
+ customization_options?: Customization[];
46
+ is_mandatory?: boolean;
47
+ additional_price?: string;
48
+ }
33
49
  interface ProductVariant {
34
50
  id: number;
35
51
  name: string;
@@ -37,7 +53,7 @@ declare namespace Product {
37
53
  actual_price: string;
38
54
  selling_price: string;
39
55
  stock_quantity: number;
40
- product: number;
56
+ product: Product;
41
57
  is_active: boolean;
42
58
  is_featured: boolean;
43
59
  product_measurements: string;
@@ -46,7 +62,7 @@ declare namespace Product {
46
62
  back_order_limit: number;
47
63
  user_purchase_limit: number;
48
64
  status: string;
49
- product_photos: any[];
65
+ product_photos: Photos[];
50
66
  media: string;
51
67
  }
52
68
  interface ProductDetails {
@@ -59,12 +75,12 @@ declare namespace Product {
59
75
  description: string;
60
76
  slug: string;
61
77
  item_code: string;
62
- photos: any[];
78
+ photos: Photos[];
63
79
  product_category: number;
64
- brand: any;
80
+ brand: Brand | null;
65
81
  badge: string;
66
82
  multi_size: boolean;
67
- size_chart: any;
83
+ size_chart: string[];
68
84
  is_featured: boolean;
69
85
  back_order: boolean;
70
86
  back_order_limit: number;
@@ -79,17 +95,17 @@ declare namespace Product {
79
95
  description: string;
80
96
  slug: string;
81
97
  item_code: string;
82
- photos: any[];
98
+ photos: Photos[];
83
99
  product_category: number;
84
- brand: any;
100
+ brand: Brand | null;
85
101
  badge: string;
86
102
  multi_size: boolean;
87
- size_chart: any;
103
+ size_chart: string[];
88
104
  sku: string;
89
105
  actual_price: string;
90
106
  selling_price: string;
91
107
  stock_quantity: number;
92
- product: number;
108
+ product: Product;
93
109
  is_active: boolean;
94
110
  is_featured: boolean;
95
111
  is_wishlisted: boolean;
@@ -148,6 +164,37 @@ interface Photos {
148
164
  image: string;
149
165
  order: number;
150
166
  }
167
+ interface Brand {
168
+ id: number;
169
+ name: string;
170
+ }
171
+ interface ProductAttribute {
172
+ order: number;
173
+ name: string;
174
+ value: string;
175
+ }
176
+ interface BaseProduct {
177
+ id: number;
178
+ name: string;
179
+ description: string;
180
+ slug: string;
181
+ item_code: string;
182
+ product_category: number;
183
+ brand: Brand | null;
184
+ badge: string;
185
+ multi_size: boolean;
186
+ size_chart: string[];
187
+ is_featured: boolean;
188
+ back_order: boolean;
189
+ back_order_limit: number;
190
+ user_purchase_limit: number;
191
+ product_status: string;
192
+ is_active: boolean;
193
+ photos: string[];
194
+ attributes: {
195
+ [key: string]: ProductAttribute[];
196
+ };
197
+ }
151
198
  interface Attributes {
152
199
  [key: string]: {
153
200
  name: string;
@@ -169,7 +216,7 @@ declare namespace ProductDetail {
169
216
  product_photos: Photos[];
170
217
  media: string;
171
218
  sku: string;
172
- variants: Variant[];
219
+ variants: Product.ProductVariant[];
173
220
  variantAttributes: Array<VariantAttribute>;
174
221
  quantity: number;
175
222
  is_wishlisted: boolean;
@@ -196,30 +243,10 @@ declare namespace ProductDetail {
196
243
  [key: string]: {
197
244
  name: string;
198
245
  value: string;
199
- };
200
- slug: any;
201
- }
202
- interface Product {
203
- id: number;
204
- name: string;
205
- description: string;
246
+ } | string;
206
247
  slug: string;
207
- item_code: string;
208
- product_category: number;
209
- brand: any;
210
- badge: string;
211
- multi_size: boolean;
212
- size_chart: string[];
213
- is_featured: boolean;
214
- back_order: boolean;
215
- back_order_limit: number;
216
- user_purchase_limit: number;
217
- status: string;
218
- is_active: boolean;
219
- photos: any[];
220
- attributes: {
221
- [key: string]: ProductAttribute[];
222
- };
248
+ }
249
+ interface Product extends BaseProduct {
223
250
  customizations: Customization[];
224
251
  }
225
252
  interface Customization {
@@ -233,11 +260,6 @@ declare namespace ProductDetail {
233
260
  name: string;
234
261
  value: string;
235
262
  }
236
- interface ProductAttribute {
237
- order: number;
238
- name: string;
239
- value: string;
240
- }
241
263
  interface Variant {
242
264
  id: number;
243
265
  name: string;
@@ -245,33 +267,14 @@ declare namespace ProductDetail {
245
267
  actual_price: string;
246
268
  selling_price: string;
247
269
  stock_quantity: number;
248
- product: Product2;
270
+ product: Product;
249
271
  is_featured: boolean;
250
272
  product_measurements: string;
251
273
  attributes: Attributes;
252
274
  status: string;
253
- product_photos: any[];
275
+ product_photos: Photos[];
254
276
  media: string;
255
277
  }
256
- interface Product2 {
257
- id: number;
258
- name: string;
259
- description: string;
260
- slug: string;
261
- item_code: string;
262
- product_category: number;
263
- brand: any;
264
- badge: string;
265
- multi_size: boolean;
266
- size_chart: string[];
267
- is_featured: boolean;
268
- back_order: boolean;
269
- back_order_limit: number;
270
- user_purchase_limit: number;
271
- status: string;
272
- is_active: boolean;
273
- photos: any[];
274
- }
275
278
  interface DigitalProductVariant {
276
279
  status: "active" | "inactive";
277
280
  download_link: string;
@@ -304,7 +307,7 @@ interface BookingService {
304
307
  slot_duration: number;
305
308
  available_days: string[];
306
309
  operating_hours: OperatingHours;
307
- blocked_dates: any[];
310
+ blocked_dates: string[];
308
311
  special_hours: SpecialHours;
309
312
  slot_duration_unit: string;
310
313
  max_bookings_per_slot: number;
@@ -327,4 +330,4 @@ interface TimeSlot {
327
330
  interface SpecialHours {
328
331
  }
329
332
 
330
- export { type Attributes as A, type BookingService as B, type CustomField 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, Product as b, ProductDetail as c, SLICE_STATUS as d, ADDRESS_FORM_SESSION_KEY as e, ALLOWED_COUNTRIES as f, PRODUCT_STATUSES as g, USER_CREDENTIALS as h, USER_CRED_REFRESH_TOKEN as i, USER_CRED_TOKEN as j, pathNameMap as p };
333
+ export { type Attributes as A, type BaseProduct as B, type CustomField 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 BookingService as a, type BookingServiceDate as b, type Brand as c, Product as d, type ProductAttribute as e, ProductDetail as f, SLICE_STATUS as g, ADDRESS_FORM_SESSION_KEY as h, ALLOWED_COUNTRIES as i, PRODUCT_STATUSES as j, USER_CREDENTIALS as k, USER_CRED_REFRESH_TOKEN as l, USER_CRED_TOKEN as m, pathNameMap as p };