@storepecker/storefront-core 2.1.1 → 2.2.1
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.
- package/dist/{address-DQEZzyUG.d.cts → address-DwBZHzbI.d.cts} +2 -2
- package/dist/{address-DQEZzyUG.d.ts → address-DwBZHzbI.d.ts} +2 -2
- package/dist/api/index.cjs +25 -17
- package/dist/api/index.d.cts +50 -17
- package/dist/api/index.d.ts +50 -17
- package/dist/api/index.js +9 -2
- package/dist/{booking-CZ59BXk3.d.ts → booking-BGvxHd-t.d.cts} +2 -2
- package/dist/{booking-BgZoXUBv.d.cts → booking-BSZ6NP-e.d.ts} +2 -2
- package/dist/{cart-BY8D8w-s.d.cts → cart-CfsntcpS.d.ts} +38 -5
- package/dist/{cart-GuhgeBBt.d.ts → cart-XumsY-y0.d.cts} +38 -5
- package/dist/checkout/index.d.cts +3 -3
- package/dist/checkout/index.d.ts +3 -3
- package/dist/{chunk-26A3EBZI.cjs → chunk-A67PCF55.cjs} +1 -2
- package/dist/{chunk-Y6NFUWTH.js → chunk-ERLBPVFK.js} +1 -2
- package/dist/{chunk-PWYWNRVO.cjs → chunk-JVSR6THX.cjs} +6 -6
- package/dist/{chunk-UOFTDL4D.js → chunk-ZKHQPHT5.js} +1 -1
- package/dist/collections-D4tvWcZp.d.ts +23 -0
- package/dist/collections-dCr3VEJo.d.cts +23 -0
- package/dist/components/index.d.cts +11 -11
- package/dist/components/index.d.ts +11 -11
- package/dist/hooks/index.cjs +16 -16
- package/dist/hooks/index.d.cts +24 -18
- package/dist/hooks/index.d.ts +24 -18
- package/dist/hooks/index.js +7 -7
- package/dist/models/index.d.cts +8 -8
- package/dist/models/index.d.ts +8 -8
- package/dist/{orders-DHJhJ3xz.d.cts → orders-CvCa7XWm.d.ts} +19 -17
- package/dist/{orders-DHJhJ3xz.d.ts → orders-Dm5Dq02y.d.cts} +19 -17
- package/dist/{phonepe-D7vn-9SR.d.cts → phonepe-dWMLZel6.d.cts} +3 -3
- package/dist/{phonepe-D7vn-9SR.d.ts → phonepe-dWMLZel6.d.ts} +3 -3
- package/dist/{product-Dfi0ke-4.d.cts → product-Daxj09p9.d.cts} +64 -61
- package/dist/{product-Dfi0ke-4.d.ts → product-Daxj09p9.d.ts} +64 -61
- package/dist/store/index.cjs +10 -10
- package/dist/store/index.d.cts +8 -4
- package/dist/store/index.d.ts +8 -4
- package/dist/store/index.js +5 -5
- package/dist/{useAddressForm-DgkCP1nG.d.cts → useAddressForm-DGbEn91-.d.cts} +1 -1
- package/dist/{useAddressForm-C-Uzug4d.d.ts → useAddressForm-cO3Au33k.d.ts} +1 -1
- package/dist/utils/index.d.cts +6 -6
- package/dist/utils/index.d.ts +6 -6
- package/dist/wishlist-Cow1wVqf.d.cts +10 -0
- package/dist/wishlist-gamNg0T1.d.ts +10 -0
- package/package.json +1 -1
- package/dist/collections-CenI9AlQ.d.cts +0 -40
- package/dist/collections-CenI9AlQ.d.ts +0 -40
- package/dist/wishlist-DHOvXmJj.d.cts +0 -41
- package/dist/wishlist-LfdFxddw.d.ts +0 -41
|
@@ -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:
|
|
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:
|
|
19
|
-
tracking_url:
|
|
20
|
+
tracking_id: string | null;
|
|
21
|
+
tracking_url: string | null;
|
|
20
22
|
delivery_date?: string;
|
|
21
|
-
delivered_at:
|
|
22
|
-
cancelled_at:
|
|
23
|
-
returned_at:
|
|
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:
|
|
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:
|
|
69
|
-
tracking_url:
|
|
70
|
-
delivery_date:
|
|
71
|
-
delivered_at:
|
|
72
|
-
cancelled_at:
|
|
73
|
-
returned_at:
|
|
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:
|
|
78
|
-
confirmed_at:
|
|
79
|
-
refunded_at:
|
|
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:
|
|
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:
|
|
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:
|
|
19
|
-
tracking_url:
|
|
20
|
+
tracking_id: string | null;
|
|
21
|
+
tracking_url: string | null;
|
|
20
22
|
delivery_date?: string;
|
|
21
|
-
delivered_at:
|
|
22
|
-
cancelled_at:
|
|
23
|
-
returned_at:
|
|
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:
|
|
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:
|
|
69
|
-
tracking_url:
|
|
70
|
-
delivery_date:
|
|
71
|
-
delivered_at:
|
|
72
|
-
cancelled_at:
|
|
73
|
-
returned_at:
|
|
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:
|
|
78
|
-
confirmed_at:
|
|
79
|
-
refunded_at:
|
|
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:
|
|
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:
|
|
21
|
-
pgAuthorizationCode:
|
|
20
|
+
bankTransactionId: string | null;
|
|
21
|
+
pgAuthorizationCode: string | null;
|
|
22
22
|
arn: string;
|
|
23
|
-
bankId:
|
|
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:
|
|
21
|
-
pgAuthorizationCode:
|
|
20
|
+
bankTransactionId: string | null;
|
|
21
|
+
pgAuthorizationCode: string | null;
|
|
22
22
|
arn: string;
|
|
23
|
-
bankId:
|
|
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:
|
|
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:
|
|
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:
|
|
78
|
+
photos: Photos[];
|
|
63
79
|
product_category: number;
|
|
64
|
-
brand:
|
|
80
|
+
brand: Brand | null;
|
|
65
81
|
badge: string;
|
|
66
82
|
multi_size: boolean;
|
|
67
|
-
size_chart:
|
|
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:
|
|
98
|
+
photos: Photos[];
|
|
83
99
|
product_category: number;
|
|
84
|
-
brand:
|
|
100
|
+
brand: Brand | null;
|
|
85
101
|
badge: string;
|
|
86
102
|
multi_size: boolean;
|
|
87
|
-
size_chart:
|
|
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:
|
|
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:
|
|
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
|
-
|
|
208
|
-
|
|
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:
|
|
270
|
+
product: Product;
|
|
249
271
|
is_featured: boolean;
|
|
250
272
|
product_measurements: string;
|
|
251
273
|
attributes: Attributes;
|
|
252
274
|
status: string;
|
|
253
|
-
product_photos:
|
|
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:
|
|
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
|
|
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 };
|
|
@@ -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:
|
|
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:
|
|
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:
|
|
78
|
+
photos: Photos[];
|
|
63
79
|
product_category: number;
|
|
64
|
-
brand:
|
|
80
|
+
brand: Brand | null;
|
|
65
81
|
badge: string;
|
|
66
82
|
multi_size: boolean;
|
|
67
|
-
size_chart:
|
|
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:
|
|
98
|
+
photos: Photos[];
|
|
83
99
|
product_category: number;
|
|
84
|
-
brand:
|
|
100
|
+
brand: Brand | null;
|
|
85
101
|
badge: string;
|
|
86
102
|
multi_size: boolean;
|
|
87
|
-
size_chart:
|
|
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:
|
|
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:
|
|
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
|
-
|
|
208
|
-
|
|
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:
|
|
270
|
+
product: Product;
|
|
249
271
|
is_featured: boolean;
|
|
250
272
|
product_measurements: string;
|
|
251
273
|
attributes: Attributes;
|
|
252
274
|
status: string;
|
|
253
|
-
product_photos:
|
|
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:
|
|
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
|
|
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 };
|
package/dist/store/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkJVSR6THX_cjs = require('../chunk-JVSR6THX.cjs');
|
|
4
|
+
var chunkA67PCF55_cjs = require('../chunk-A67PCF55.cjs');
|
|
5
5
|
require('../chunk-SMHJRNCR.cjs');
|
|
6
6
|
require('../chunk-ZO2HREQL.cjs');
|
|
7
7
|
require('../chunk-BBRXE57K.cjs');
|
|
@@ -19,11 +19,11 @@ var useWishlistStore = zustand.create((set) => ({
|
|
|
19
19
|
resetWishlist: () => set(initialState),
|
|
20
20
|
syncWishlist: async () => {
|
|
21
21
|
try {
|
|
22
|
-
const response = await
|
|
23
|
-
if (response) {
|
|
22
|
+
const response = await chunkA67PCF55_cjs.getWishlist("/customer/wishlist/");
|
|
23
|
+
if (response.data) {
|
|
24
24
|
set({
|
|
25
|
-
wishlist_count: response.wishlist_count,
|
|
26
|
-
product_variants: response.product_variants
|
|
25
|
+
wishlist_count: response.data.wishlist_count,
|
|
26
|
+
product_variants: response.data.product_variants
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
} catch {
|
|
@@ -47,7 +47,7 @@ var useProductStore = zustand.create((set, get) => ({
|
|
|
47
47
|
data: filter.page === 1 ? [] : state.data
|
|
48
48
|
}));
|
|
49
49
|
try {
|
|
50
|
-
const response = await
|
|
50
|
+
const response = await chunkA67PCF55_cjs.getProducts({ ...filter });
|
|
51
51
|
if (response.data) {
|
|
52
52
|
const { results, ...meta } = response.data;
|
|
53
53
|
set((state) => ({
|
|
@@ -67,15 +67,15 @@ var useProductStore = zustand.create((set, get) => ({
|
|
|
67
67
|
|
|
68
68
|
Object.defineProperty(exports, "loginUser", {
|
|
69
69
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunkJVSR6THX_cjs.loginUser; }
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "useAuthStore", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunkJVSR6THX_cjs.useAuthStore; }
|
|
75
75
|
});
|
|
76
76
|
Object.defineProperty(exports, "useCartStore", {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunkJVSR6THX_cjs.useCartStore; }
|
|
79
79
|
});
|
|
80
80
|
exports.useProductStore = useProductStore;
|
|
81
81
|
exports.useWishlistStore = useWishlistStore;
|