@storepecker/storefront-core 2.10.0 → 2.10.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/api/index.cjs +20 -20
- package/dist/api/index.d.cts +8 -15
- package/dist/api/index.d.ts +8 -15
- package/dist/api/index.js +2 -2
- package/dist/{buy-now-kII0KrhP.d.ts → buy-now-CDug6LJ_.d.ts} +1 -1
- package/dist/{buy-now-B_15RUVT.d.cts → buy-now-DrKY5_9R.d.cts} +1 -1
- package/dist/checkout/index.cjs +92 -98
- package/dist/checkout/index.d.cts +17 -30
- package/dist/checkout/index.d.ts +17 -30
- package/dist/checkout/index.js +48 -63
- package/dist/{pincode-Ch3bZSJz.d.cts → checkout-totals-CbmXM9L7.d.cts} +42 -1
- package/dist/{pincode-CHM-ZD3H.d.ts → checkout-totals-DU8l-Wyb.d.ts} +42 -1
- package/dist/{chunk-NQZ5GUOG.cjs → chunk-3YPE6UPC.cjs} +24 -16
- package/dist/{chunk-Y4RNRPBC.js → chunk-DZPK7GPG.js} +58 -2
- package/dist/{chunk-TH7OAMGC.js → chunk-E4D4XOAE.js} +24 -16
- package/dist/{chunk-NRPK5GCJ.cjs → chunk-EFYAFXIS.cjs} +3 -3
- package/dist/{chunk-NOT6VKXA.cjs → chunk-H6UZTS5O.cjs} +67 -23
- package/dist/{chunk-ZAWZ3RB6.js → chunk-NNE42NMP.js} +1 -1
- package/dist/{chunk-QED6QJZC.cjs → chunk-PN6KH5PX.cjs} +59 -1
- package/dist/{chunk-QQHQTBAM.js → chunk-QSRVMOXT.js} +48 -6
- package/dist/{collections-CXgOv5_G.d.cts → collections-CKNFcE2d.d.cts} +1 -1
- package/dist/{collections-CNh2OGbl.d.ts → collections-CtRKsWVx.d.ts} +1 -1
- package/dist/components/digital-product-download-modal.d.cts +2 -2
- package/dist/components/digital-product-download-modal.d.ts +2 -2
- package/dist/components/index.d.cts +4 -5
- package/dist/components/index.d.ts +4 -5
- package/dist/components/share-button.d.cts +1 -1
- package/dist/components/share-button.d.ts +1 -1
- package/dist/components/theme-data-initializer.d.cts +4 -5
- package/dist/components/theme-data-initializer.d.ts +4 -5
- package/dist/hooks/index.cjs +62 -58
- package/dist/hooks/index.d.cts +9 -7
- package/dist/hooks/index.d.ts +9 -7
- package/dist/hooks/index.js +8 -5
- package/dist/{instagram-DalreBu6.d.cts → instagram-CSzrxk10.d.cts} +8 -2
- package/dist/{instagram-BADLnNQ3.d.ts → instagram-CagTLmyq.d.ts} +8 -2
- package/dist/models/index.d.cts +6 -7
- package/dist/models/index.d.ts +6 -7
- package/dist/orders-B6BmHCJN.d.ts +337 -0
- package/dist/orders-ZKP0lqRN.d.cts +337 -0
- package/dist/{pixelEvents-Ds6fwS9t.d.ts → pixelEvents-DqJ_CEEr.d.ts} +3 -4
- package/dist/{pixelEvents-COqZIgTu.d.cts → pixelEvents-bahgVW4_.d.cts} +3 -4
- package/dist/{product-D9liEtl4.d.cts → product-D4kol-Z-.d.cts} +26 -2
- package/dist/{product-D9liEtl4.d.ts → product-D4kol-Z-.d.ts} +26 -2
- package/dist/store/index.cjs +20 -30
- package/dist/store/index.d.cts +21 -7
- package/dist/store/index.d.ts +21 -7
- package/dist/store/index.js +9 -26
- package/dist/utils/index.cjs +2 -2
- package/dist/utils/index.d.cts +14 -8
- package/dist/utils/index.d.ts +14 -8
- package/dist/utils/index.js +1 -1
- package/dist/{wishlist-Cj0sQxiY.d.ts → wishlist-L3fM5-ie.d.ts} +1 -1
- package/dist/{wishlist-BakHvIFN.d.cts → wishlist-_0x0r1jt.d.cts} +1 -1
- package/package.json +1 -1
- package/dist/cart-DZq1ZEnE.d.ts +0 -153
- package/dist/cart-DwMFBmpC.d.cts +0 -153
- package/dist/orders-B3G4CyhH.d.cts +0 -166
- package/dist/orders-Bl-Slh72.d.ts +0 -166
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
import { g as SLICE_STATUS, d as Product, f as ProductDetail, P as Photos } from './product-D4kol-Z-.js';
|
|
2
|
+
|
|
3
|
+
declare namespace User {
|
|
4
|
+
interface Root {
|
|
5
|
+
customer_name: string;
|
|
6
|
+
phone: string;
|
|
7
|
+
email: string;
|
|
8
|
+
date_of_birth: string;
|
|
9
|
+
country_code: string;
|
|
10
|
+
gender: string;
|
|
11
|
+
}
|
|
12
|
+
interface UserState {
|
|
13
|
+
user: LoginUserData | null;
|
|
14
|
+
isAuthenticated: boolean;
|
|
15
|
+
status: SLICE_STATUS;
|
|
16
|
+
}
|
|
17
|
+
interface LoginUserData {
|
|
18
|
+
email: string;
|
|
19
|
+
first_name: string;
|
|
20
|
+
last_name: string;
|
|
21
|
+
access: string;
|
|
22
|
+
refresh: string;
|
|
23
|
+
user_id: number;
|
|
24
|
+
phone_number: string;
|
|
25
|
+
}
|
|
26
|
+
interface UserDetailsPayload {
|
|
27
|
+
customer_name: string;
|
|
28
|
+
gender: string;
|
|
29
|
+
date_of_birth: string;
|
|
30
|
+
}
|
|
31
|
+
type LoginMethod = "email_otp" | "phone_otp";
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare namespace Category {
|
|
35
|
+
interface Root {
|
|
36
|
+
id: number;
|
|
37
|
+
name: string;
|
|
38
|
+
photo: string;
|
|
39
|
+
slug: string;
|
|
40
|
+
description: string;
|
|
41
|
+
children?: Root[];
|
|
42
|
+
}
|
|
43
|
+
interface CategoriesState {
|
|
44
|
+
data: Root[];
|
|
45
|
+
status: SLICE_STATUS;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
type DiscountType = "discount";
|
|
50
|
+
type ValueType = "percentage" | "fixed";
|
|
51
|
+
type ApplicableTarget = "product_category" | "product_variant" | "product_bundle" | "customer";
|
|
52
|
+
type CouponStatus = "active" | "inactive" | "expired";
|
|
53
|
+
interface Coupon {
|
|
54
|
+
id: number;
|
|
55
|
+
coupon_code: string;
|
|
56
|
+
name?: string;
|
|
57
|
+
description?: string | null;
|
|
58
|
+
discount_type: DiscountType;
|
|
59
|
+
value: string;
|
|
60
|
+
value_type: ValueType;
|
|
61
|
+
min_order_amount: string;
|
|
62
|
+
max_discount_amount: string;
|
|
63
|
+
start_date: string;
|
|
64
|
+
end_date: string;
|
|
65
|
+
status: CouponStatus;
|
|
66
|
+
is_deleted: boolean;
|
|
67
|
+
usage_limit: number;
|
|
68
|
+
usage_count: number;
|
|
69
|
+
applicable_target: ApplicableTarget;
|
|
70
|
+
applicable_product_variants: Product.ProductVariant[];
|
|
71
|
+
applicable_product_bundles: any[];
|
|
72
|
+
applicable_product_categories: Category.Root[];
|
|
73
|
+
applicable_customers: User.Root[];
|
|
74
|
+
auto_apply: boolean;
|
|
75
|
+
created_at: string;
|
|
76
|
+
updated_at: string;
|
|
77
|
+
is_cart_applicable: boolean;
|
|
78
|
+
coupon_message: string;
|
|
79
|
+
}
|
|
80
|
+
type Coupons = Coupon[];
|
|
81
|
+
interface CouponResponse {
|
|
82
|
+
coupon: Coupon;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
interface CartState {
|
|
86
|
+
cart: Cart.Root | null;
|
|
87
|
+
total_quantity: number;
|
|
88
|
+
status: SLICE_STATUS;
|
|
89
|
+
}
|
|
90
|
+
declare namespace Cart {
|
|
91
|
+
interface Root {
|
|
92
|
+
product_variants: ProductDetail.Root[];
|
|
93
|
+
total_amount: number;
|
|
94
|
+
total_quantity: number;
|
|
95
|
+
products_quantity: ProductsQuantity;
|
|
96
|
+
cart_count: number;
|
|
97
|
+
missing_items: {
|
|
98
|
+
[key: number]: number;
|
|
99
|
+
};
|
|
100
|
+
missing_cart_items: {
|
|
101
|
+
[key: string]: number;
|
|
102
|
+
};
|
|
103
|
+
customization_inputs: Array<CustomizationInput>;
|
|
104
|
+
total_coupon_discount: number;
|
|
105
|
+
variant_discounts: {
|
|
106
|
+
[key: number]: number;
|
|
107
|
+
};
|
|
108
|
+
total_shipping: number;
|
|
109
|
+
total_tax_amount: number;
|
|
110
|
+
applied_coupon: Coupon | {};
|
|
111
|
+
shipping_options: ShippingOption[];
|
|
112
|
+
selected_shipping_option_id: number | null;
|
|
113
|
+
selected_address_id: number | null;
|
|
114
|
+
split_preview?: {
|
|
115
|
+
has_split: boolean;
|
|
116
|
+
regular_total: string;
|
|
117
|
+
preorder_total: string;
|
|
118
|
+
preorder_ship_days: number;
|
|
119
|
+
} | null;
|
|
120
|
+
}
|
|
121
|
+
interface CustomizationInput {
|
|
122
|
+
id: number;
|
|
123
|
+
product_variant: number;
|
|
124
|
+
customization_option: number;
|
|
125
|
+
customer_wishlist: null;
|
|
126
|
+
customer_order: null;
|
|
127
|
+
customer_cart: number;
|
|
128
|
+
customer_input: string;
|
|
129
|
+
customization_option_name: string;
|
|
130
|
+
customization_option_type: string;
|
|
131
|
+
is_mandatory: boolean;
|
|
132
|
+
additional_price?: number;
|
|
133
|
+
customization_price?: number;
|
|
134
|
+
effective_price?: number;
|
|
135
|
+
}
|
|
136
|
+
interface ProductsQuantity {
|
|
137
|
+
[key: number]: number;
|
|
138
|
+
}
|
|
139
|
+
interface ShippingOption {
|
|
140
|
+
id: number;
|
|
141
|
+
name: string;
|
|
142
|
+
description: string;
|
|
143
|
+
pricing_type: string;
|
|
144
|
+
base_price: string;
|
|
145
|
+
shipping_profile: number | null;
|
|
146
|
+
shipping_partner: string;
|
|
147
|
+
estimated_days_min: number;
|
|
148
|
+
estimated_days_max: number;
|
|
149
|
+
display_order: number;
|
|
150
|
+
is_active: boolean;
|
|
151
|
+
allowed_zones: any[];
|
|
152
|
+
price: string | null;
|
|
153
|
+
price_note: string | null;
|
|
154
|
+
estimated_delivery: string | null;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
declare namespace Order {
|
|
159
|
+
interface Root {
|
|
160
|
+
id: number;
|
|
161
|
+
store: number;
|
|
162
|
+
customer: number;
|
|
163
|
+
total_amount: number;
|
|
164
|
+
paid_amount: number;
|
|
165
|
+
purchased_at: string;
|
|
166
|
+
purchased_products: PurchasedProduct[];
|
|
167
|
+
order_status: OrderStatus;
|
|
168
|
+
order_number: number;
|
|
169
|
+
order_ref: string;
|
|
170
|
+
payment_method: string | null;
|
|
171
|
+
cod_amount?: number;
|
|
172
|
+
shipping_address: string;
|
|
173
|
+
shipping_city: string;
|
|
174
|
+
shipping_state: string;
|
|
175
|
+
shipping_country: string;
|
|
176
|
+
shipping_zip: string;
|
|
177
|
+
tracking_id: string | null;
|
|
178
|
+
tracking_url: string | null;
|
|
179
|
+
delivery_date?: string;
|
|
180
|
+
delivered_at: string | null;
|
|
181
|
+
cancelled_at: string | null;
|
|
182
|
+
returned_at: string | null;
|
|
183
|
+
customer_details: CustomerDetails;
|
|
184
|
+
customer_name: string;
|
|
185
|
+
customer_phone: string;
|
|
186
|
+
linked_order: number;
|
|
187
|
+
linked_orders: {
|
|
188
|
+
id: number;
|
|
189
|
+
order_number: number;
|
|
190
|
+
is_preorder: boolean;
|
|
191
|
+
total_amount: number;
|
|
192
|
+
}[];
|
|
193
|
+
is_preorder: boolean;
|
|
194
|
+
selected_shipping_option_name: string;
|
|
195
|
+
shipping_amount: number;
|
|
196
|
+
is_cod: boolean;
|
|
197
|
+
currency_code: string;
|
|
198
|
+
payment_captured_mismatch: boolean;
|
|
199
|
+
payment_gateway_log: unknown[];
|
|
200
|
+
shipping_activity: unknown[];
|
|
201
|
+
}
|
|
202
|
+
interface OrderResponse {
|
|
203
|
+
current_page: number;
|
|
204
|
+
total_pages: number;
|
|
205
|
+
total_orders: number;
|
|
206
|
+
results: Root[];
|
|
207
|
+
}
|
|
208
|
+
interface VariantAttributes {
|
|
209
|
+
size: {
|
|
210
|
+
name: string;
|
|
211
|
+
value: string;
|
|
212
|
+
};
|
|
213
|
+
color?: {
|
|
214
|
+
name: string;
|
|
215
|
+
value: string;
|
|
216
|
+
};
|
|
217
|
+
Color?: {
|
|
218
|
+
name: string;
|
|
219
|
+
value: string;
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
interface CustomerDetails {
|
|
223
|
+
name: string;
|
|
224
|
+
phone: string;
|
|
225
|
+
}
|
|
226
|
+
type OrderStatus = "pending" | "confirmed" | "packed" | "shipped" | "delivered" | "cancelled" | "failed" | "paid" | "payment_pending" | "refunded" | "returned";
|
|
227
|
+
interface OrderSummary {
|
|
228
|
+
id: number;
|
|
229
|
+
store: number;
|
|
230
|
+
customer: number;
|
|
231
|
+
total_amount: number;
|
|
232
|
+
paid_amount: number;
|
|
233
|
+
purchased_at: string;
|
|
234
|
+
purchased_products: PurchasedProduct[];
|
|
235
|
+
order_status: string;
|
|
236
|
+
order_number: number;
|
|
237
|
+
order_ref: string;
|
|
238
|
+
payment_method: string | null;
|
|
239
|
+
shipping_address: string;
|
|
240
|
+
shipping_city: string;
|
|
241
|
+
shipping_state: string;
|
|
242
|
+
shipping_country: string;
|
|
243
|
+
shipping_zip: string;
|
|
244
|
+
tracking_id: string | null;
|
|
245
|
+
tracking_url: string | null;
|
|
246
|
+
delivery_date: string | null;
|
|
247
|
+
delivered_at: string | null;
|
|
248
|
+
cancelled_at: string | null;
|
|
249
|
+
returned_at: string | null;
|
|
250
|
+
customer_email: string;
|
|
251
|
+
customer_name: string;
|
|
252
|
+
customer_phone: string;
|
|
253
|
+
shipped_at: string | null;
|
|
254
|
+
confirmed_at: string | null;
|
|
255
|
+
refunded_at: string | null;
|
|
256
|
+
store_address: string;
|
|
257
|
+
store_city: string;
|
|
258
|
+
store_state: string;
|
|
259
|
+
store_country: string;
|
|
260
|
+
store_zip: string;
|
|
261
|
+
cart_count: number;
|
|
262
|
+
razorpay_public_token: string;
|
|
263
|
+
razorpay_order_id: string;
|
|
264
|
+
razorpay_order_status: string;
|
|
265
|
+
razorpay_order_amount: number;
|
|
266
|
+
razorpay_order_currency: string;
|
|
267
|
+
razorpay_payment_id: string;
|
|
268
|
+
razorpay_signature: string;
|
|
269
|
+
store_color_scheme: {
|
|
270
|
+
primary: string;
|
|
271
|
+
secondary: string;
|
|
272
|
+
};
|
|
273
|
+
store_logo: string;
|
|
274
|
+
store_name: string;
|
|
275
|
+
shipping_amount: number;
|
|
276
|
+
phonepe_redirect_url: string;
|
|
277
|
+
stripe_client_secret: string;
|
|
278
|
+
stripe_payment_intent_id: string;
|
|
279
|
+
stripe_publishable_key: string;
|
|
280
|
+
total_coupon_discount: number;
|
|
281
|
+
stripe_payment_link_url: string;
|
|
282
|
+
tabby_redirect_url?: string;
|
|
283
|
+
linked_order: number;
|
|
284
|
+
linked_orders: {
|
|
285
|
+
id: number;
|
|
286
|
+
order_number: number;
|
|
287
|
+
is_preorder: boolean;
|
|
288
|
+
total_amount: number;
|
|
289
|
+
}[];
|
|
290
|
+
is_preorder: boolean;
|
|
291
|
+
cod_amount: number;
|
|
292
|
+
customization_inputs: Cart.CustomizationInput[];
|
|
293
|
+
selected_shipping_option_name?: string;
|
|
294
|
+
fulfilment_time?: string;
|
|
295
|
+
}
|
|
296
|
+
interface PurchasedProduct {
|
|
297
|
+
product_id: number;
|
|
298
|
+
product_name: string;
|
|
299
|
+
product_variant_id: number;
|
|
300
|
+
product_variant_slug: string;
|
|
301
|
+
product_variant_name: string;
|
|
302
|
+
product_variant_sku: string;
|
|
303
|
+
quantity: number;
|
|
304
|
+
variant_price: number;
|
|
305
|
+
tax_percentage: number;
|
|
306
|
+
total_tax_price: number;
|
|
307
|
+
total_price: number;
|
|
308
|
+
variant_attributes: VariantAttributes;
|
|
309
|
+
product_variant_photo: Photos | null;
|
|
310
|
+
is_digital: boolean;
|
|
311
|
+
discount_amount: number;
|
|
312
|
+
}
|
|
313
|
+
interface StripePaymentStatus {
|
|
314
|
+
order_id: number;
|
|
315
|
+
order_status: string;
|
|
316
|
+
payment_link_id: string;
|
|
317
|
+
payment_link_url: string;
|
|
318
|
+
checkout_session_id: string;
|
|
319
|
+
status: string;
|
|
320
|
+
payment_status: string;
|
|
321
|
+
session_status: string;
|
|
322
|
+
amount_total: number;
|
|
323
|
+
currency: string;
|
|
324
|
+
customer_email: string | null;
|
|
325
|
+
payment_intent: string;
|
|
326
|
+
payment_link: string;
|
|
327
|
+
success?: boolean;
|
|
328
|
+
}
|
|
329
|
+
interface TabbyPaymentStatus {
|
|
330
|
+
order_status: string;
|
|
331
|
+
message: string;
|
|
332
|
+
status: string;
|
|
333
|
+
payment_id?: string;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export { type ApplicableTarget as A, Cart as C, type DiscountType as D, Order as O, User as U, type ValueType as V, type CartState as a, Category as b, type Coupon as c, type CouponResponse as d, type CouponStatus as e, type Coupons as f };
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
import { g as SLICE_STATUS, d as Product, f as ProductDetail, P as Photos } from './product-D4kol-Z-.cjs';
|
|
2
|
+
|
|
3
|
+
declare namespace User {
|
|
4
|
+
interface Root {
|
|
5
|
+
customer_name: string;
|
|
6
|
+
phone: string;
|
|
7
|
+
email: string;
|
|
8
|
+
date_of_birth: string;
|
|
9
|
+
country_code: string;
|
|
10
|
+
gender: string;
|
|
11
|
+
}
|
|
12
|
+
interface UserState {
|
|
13
|
+
user: LoginUserData | null;
|
|
14
|
+
isAuthenticated: boolean;
|
|
15
|
+
status: SLICE_STATUS;
|
|
16
|
+
}
|
|
17
|
+
interface LoginUserData {
|
|
18
|
+
email: string;
|
|
19
|
+
first_name: string;
|
|
20
|
+
last_name: string;
|
|
21
|
+
access: string;
|
|
22
|
+
refresh: string;
|
|
23
|
+
user_id: number;
|
|
24
|
+
phone_number: string;
|
|
25
|
+
}
|
|
26
|
+
interface UserDetailsPayload {
|
|
27
|
+
customer_name: string;
|
|
28
|
+
gender: string;
|
|
29
|
+
date_of_birth: string;
|
|
30
|
+
}
|
|
31
|
+
type LoginMethod = "email_otp" | "phone_otp";
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare namespace Category {
|
|
35
|
+
interface Root {
|
|
36
|
+
id: number;
|
|
37
|
+
name: string;
|
|
38
|
+
photo: string;
|
|
39
|
+
slug: string;
|
|
40
|
+
description: string;
|
|
41
|
+
children?: Root[];
|
|
42
|
+
}
|
|
43
|
+
interface CategoriesState {
|
|
44
|
+
data: Root[];
|
|
45
|
+
status: SLICE_STATUS;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
type DiscountType = "discount";
|
|
50
|
+
type ValueType = "percentage" | "fixed";
|
|
51
|
+
type ApplicableTarget = "product_category" | "product_variant" | "product_bundle" | "customer";
|
|
52
|
+
type CouponStatus = "active" | "inactive" | "expired";
|
|
53
|
+
interface Coupon {
|
|
54
|
+
id: number;
|
|
55
|
+
coupon_code: string;
|
|
56
|
+
name?: string;
|
|
57
|
+
description?: string | null;
|
|
58
|
+
discount_type: DiscountType;
|
|
59
|
+
value: string;
|
|
60
|
+
value_type: ValueType;
|
|
61
|
+
min_order_amount: string;
|
|
62
|
+
max_discount_amount: string;
|
|
63
|
+
start_date: string;
|
|
64
|
+
end_date: string;
|
|
65
|
+
status: CouponStatus;
|
|
66
|
+
is_deleted: boolean;
|
|
67
|
+
usage_limit: number;
|
|
68
|
+
usage_count: number;
|
|
69
|
+
applicable_target: ApplicableTarget;
|
|
70
|
+
applicable_product_variants: Product.ProductVariant[];
|
|
71
|
+
applicable_product_bundles: any[];
|
|
72
|
+
applicable_product_categories: Category.Root[];
|
|
73
|
+
applicable_customers: User.Root[];
|
|
74
|
+
auto_apply: boolean;
|
|
75
|
+
created_at: string;
|
|
76
|
+
updated_at: string;
|
|
77
|
+
is_cart_applicable: boolean;
|
|
78
|
+
coupon_message: string;
|
|
79
|
+
}
|
|
80
|
+
type Coupons = Coupon[];
|
|
81
|
+
interface CouponResponse {
|
|
82
|
+
coupon: Coupon;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
interface CartState {
|
|
86
|
+
cart: Cart.Root | null;
|
|
87
|
+
total_quantity: number;
|
|
88
|
+
status: SLICE_STATUS;
|
|
89
|
+
}
|
|
90
|
+
declare namespace Cart {
|
|
91
|
+
interface Root {
|
|
92
|
+
product_variants: ProductDetail.Root[];
|
|
93
|
+
total_amount: number;
|
|
94
|
+
total_quantity: number;
|
|
95
|
+
products_quantity: ProductsQuantity;
|
|
96
|
+
cart_count: number;
|
|
97
|
+
missing_items: {
|
|
98
|
+
[key: number]: number;
|
|
99
|
+
};
|
|
100
|
+
missing_cart_items: {
|
|
101
|
+
[key: string]: number;
|
|
102
|
+
};
|
|
103
|
+
customization_inputs: Array<CustomizationInput>;
|
|
104
|
+
total_coupon_discount: number;
|
|
105
|
+
variant_discounts: {
|
|
106
|
+
[key: number]: number;
|
|
107
|
+
};
|
|
108
|
+
total_shipping: number;
|
|
109
|
+
total_tax_amount: number;
|
|
110
|
+
applied_coupon: Coupon | {};
|
|
111
|
+
shipping_options: ShippingOption[];
|
|
112
|
+
selected_shipping_option_id: number | null;
|
|
113
|
+
selected_address_id: number | null;
|
|
114
|
+
split_preview?: {
|
|
115
|
+
has_split: boolean;
|
|
116
|
+
regular_total: string;
|
|
117
|
+
preorder_total: string;
|
|
118
|
+
preorder_ship_days: number;
|
|
119
|
+
} | null;
|
|
120
|
+
}
|
|
121
|
+
interface CustomizationInput {
|
|
122
|
+
id: number;
|
|
123
|
+
product_variant: number;
|
|
124
|
+
customization_option: number;
|
|
125
|
+
customer_wishlist: null;
|
|
126
|
+
customer_order: null;
|
|
127
|
+
customer_cart: number;
|
|
128
|
+
customer_input: string;
|
|
129
|
+
customization_option_name: string;
|
|
130
|
+
customization_option_type: string;
|
|
131
|
+
is_mandatory: boolean;
|
|
132
|
+
additional_price?: number;
|
|
133
|
+
customization_price?: number;
|
|
134
|
+
effective_price?: number;
|
|
135
|
+
}
|
|
136
|
+
interface ProductsQuantity {
|
|
137
|
+
[key: number]: number;
|
|
138
|
+
}
|
|
139
|
+
interface ShippingOption {
|
|
140
|
+
id: number;
|
|
141
|
+
name: string;
|
|
142
|
+
description: string;
|
|
143
|
+
pricing_type: string;
|
|
144
|
+
base_price: string;
|
|
145
|
+
shipping_profile: number | null;
|
|
146
|
+
shipping_partner: string;
|
|
147
|
+
estimated_days_min: number;
|
|
148
|
+
estimated_days_max: number;
|
|
149
|
+
display_order: number;
|
|
150
|
+
is_active: boolean;
|
|
151
|
+
allowed_zones: any[];
|
|
152
|
+
price: string | null;
|
|
153
|
+
price_note: string | null;
|
|
154
|
+
estimated_delivery: string | null;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
declare namespace Order {
|
|
159
|
+
interface Root {
|
|
160
|
+
id: number;
|
|
161
|
+
store: number;
|
|
162
|
+
customer: number;
|
|
163
|
+
total_amount: number;
|
|
164
|
+
paid_amount: number;
|
|
165
|
+
purchased_at: string;
|
|
166
|
+
purchased_products: PurchasedProduct[];
|
|
167
|
+
order_status: OrderStatus;
|
|
168
|
+
order_number: number;
|
|
169
|
+
order_ref: string;
|
|
170
|
+
payment_method: string | null;
|
|
171
|
+
cod_amount?: number;
|
|
172
|
+
shipping_address: string;
|
|
173
|
+
shipping_city: string;
|
|
174
|
+
shipping_state: string;
|
|
175
|
+
shipping_country: string;
|
|
176
|
+
shipping_zip: string;
|
|
177
|
+
tracking_id: string | null;
|
|
178
|
+
tracking_url: string | null;
|
|
179
|
+
delivery_date?: string;
|
|
180
|
+
delivered_at: string | null;
|
|
181
|
+
cancelled_at: string | null;
|
|
182
|
+
returned_at: string | null;
|
|
183
|
+
customer_details: CustomerDetails;
|
|
184
|
+
customer_name: string;
|
|
185
|
+
customer_phone: string;
|
|
186
|
+
linked_order: number;
|
|
187
|
+
linked_orders: {
|
|
188
|
+
id: number;
|
|
189
|
+
order_number: number;
|
|
190
|
+
is_preorder: boolean;
|
|
191
|
+
total_amount: number;
|
|
192
|
+
}[];
|
|
193
|
+
is_preorder: boolean;
|
|
194
|
+
selected_shipping_option_name: string;
|
|
195
|
+
shipping_amount: number;
|
|
196
|
+
is_cod: boolean;
|
|
197
|
+
currency_code: string;
|
|
198
|
+
payment_captured_mismatch: boolean;
|
|
199
|
+
payment_gateway_log: unknown[];
|
|
200
|
+
shipping_activity: unknown[];
|
|
201
|
+
}
|
|
202
|
+
interface OrderResponse {
|
|
203
|
+
current_page: number;
|
|
204
|
+
total_pages: number;
|
|
205
|
+
total_orders: number;
|
|
206
|
+
results: Root[];
|
|
207
|
+
}
|
|
208
|
+
interface VariantAttributes {
|
|
209
|
+
size: {
|
|
210
|
+
name: string;
|
|
211
|
+
value: string;
|
|
212
|
+
};
|
|
213
|
+
color?: {
|
|
214
|
+
name: string;
|
|
215
|
+
value: string;
|
|
216
|
+
};
|
|
217
|
+
Color?: {
|
|
218
|
+
name: string;
|
|
219
|
+
value: string;
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
interface CustomerDetails {
|
|
223
|
+
name: string;
|
|
224
|
+
phone: string;
|
|
225
|
+
}
|
|
226
|
+
type OrderStatus = "pending" | "confirmed" | "packed" | "shipped" | "delivered" | "cancelled" | "failed" | "paid" | "payment_pending" | "refunded" | "returned";
|
|
227
|
+
interface OrderSummary {
|
|
228
|
+
id: number;
|
|
229
|
+
store: number;
|
|
230
|
+
customer: number;
|
|
231
|
+
total_amount: number;
|
|
232
|
+
paid_amount: number;
|
|
233
|
+
purchased_at: string;
|
|
234
|
+
purchased_products: PurchasedProduct[];
|
|
235
|
+
order_status: string;
|
|
236
|
+
order_number: number;
|
|
237
|
+
order_ref: string;
|
|
238
|
+
payment_method: string | null;
|
|
239
|
+
shipping_address: string;
|
|
240
|
+
shipping_city: string;
|
|
241
|
+
shipping_state: string;
|
|
242
|
+
shipping_country: string;
|
|
243
|
+
shipping_zip: string;
|
|
244
|
+
tracking_id: string | null;
|
|
245
|
+
tracking_url: string | null;
|
|
246
|
+
delivery_date: string | null;
|
|
247
|
+
delivered_at: string | null;
|
|
248
|
+
cancelled_at: string | null;
|
|
249
|
+
returned_at: string | null;
|
|
250
|
+
customer_email: string;
|
|
251
|
+
customer_name: string;
|
|
252
|
+
customer_phone: string;
|
|
253
|
+
shipped_at: string | null;
|
|
254
|
+
confirmed_at: string | null;
|
|
255
|
+
refunded_at: string | null;
|
|
256
|
+
store_address: string;
|
|
257
|
+
store_city: string;
|
|
258
|
+
store_state: string;
|
|
259
|
+
store_country: string;
|
|
260
|
+
store_zip: string;
|
|
261
|
+
cart_count: number;
|
|
262
|
+
razorpay_public_token: string;
|
|
263
|
+
razorpay_order_id: string;
|
|
264
|
+
razorpay_order_status: string;
|
|
265
|
+
razorpay_order_amount: number;
|
|
266
|
+
razorpay_order_currency: string;
|
|
267
|
+
razorpay_payment_id: string;
|
|
268
|
+
razorpay_signature: string;
|
|
269
|
+
store_color_scheme: {
|
|
270
|
+
primary: string;
|
|
271
|
+
secondary: string;
|
|
272
|
+
};
|
|
273
|
+
store_logo: string;
|
|
274
|
+
store_name: string;
|
|
275
|
+
shipping_amount: number;
|
|
276
|
+
phonepe_redirect_url: string;
|
|
277
|
+
stripe_client_secret: string;
|
|
278
|
+
stripe_payment_intent_id: string;
|
|
279
|
+
stripe_publishable_key: string;
|
|
280
|
+
total_coupon_discount: number;
|
|
281
|
+
stripe_payment_link_url: string;
|
|
282
|
+
tabby_redirect_url?: string;
|
|
283
|
+
linked_order: number;
|
|
284
|
+
linked_orders: {
|
|
285
|
+
id: number;
|
|
286
|
+
order_number: number;
|
|
287
|
+
is_preorder: boolean;
|
|
288
|
+
total_amount: number;
|
|
289
|
+
}[];
|
|
290
|
+
is_preorder: boolean;
|
|
291
|
+
cod_amount: number;
|
|
292
|
+
customization_inputs: Cart.CustomizationInput[];
|
|
293
|
+
selected_shipping_option_name?: string;
|
|
294
|
+
fulfilment_time?: string;
|
|
295
|
+
}
|
|
296
|
+
interface PurchasedProduct {
|
|
297
|
+
product_id: number;
|
|
298
|
+
product_name: string;
|
|
299
|
+
product_variant_id: number;
|
|
300
|
+
product_variant_slug: string;
|
|
301
|
+
product_variant_name: string;
|
|
302
|
+
product_variant_sku: string;
|
|
303
|
+
quantity: number;
|
|
304
|
+
variant_price: number;
|
|
305
|
+
tax_percentage: number;
|
|
306
|
+
total_tax_price: number;
|
|
307
|
+
total_price: number;
|
|
308
|
+
variant_attributes: VariantAttributes;
|
|
309
|
+
product_variant_photo: Photos | null;
|
|
310
|
+
is_digital: boolean;
|
|
311
|
+
discount_amount: number;
|
|
312
|
+
}
|
|
313
|
+
interface StripePaymentStatus {
|
|
314
|
+
order_id: number;
|
|
315
|
+
order_status: string;
|
|
316
|
+
payment_link_id: string;
|
|
317
|
+
payment_link_url: string;
|
|
318
|
+
checkout_session_id: string;
|
|
319
|
+
status: string;
|
|
320
|
+
payment_status: string;
|
|
321
|
+
session_status: string;
|
|
322
|
+
amount_total: number;
|
|
323
|
+
currency: string;
|
|
324
|
+
customer_email: string | null;
|
|
325
|
+
payment_intent: string;
|
|
326
|
+
payment_link: string;
|
|
327
|
+
success?: boolean;
|
|
328
|
+
}
|
|
329
|
+
interface TabbyPaymentStatus {
|
|
330
|
+
order_status: string;
|
|
331
|
+
message: string;
|
|
332
|
+
status: string;
|
|
333
|
+
payment_id?: string;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export { type ApplicableTarget as A, Cart as C, type DiscountType as D, Order as O, User as U, type ValueType as V, type CartState as a, Category as b, type Coupon as c, type CouponResponse as d, type CouponStatus as e, type Coupons as f };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { b as Category$1, C as Cart } from './
|
|
2
|
-
import { C as CollectionResponse } from './collections-
|
|
3
|
-
import {
|
|
4
|
-
import { f as ProductDetail, d as Product } from './product-D9liEtl4.js';
|
|
1
|
+
import { b as Category$1, O as Order, C as Cart } from './orders-B6BmHCJN.js';
|
|
2
|
+
import { C as CollectionResponse } from './collections-CtRKsWVx.js';
|
|
3
|
+
import { f as ProductDetail, d as Product } from './product-D4kol-Z-.js';
|
|
5
4
|
|
|
6
5
|
interface PageProps {
|
|
7
6
|
nav_bar: NavBar;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { b as Category$1, C as Cart } from './
|
|
2
|
-
import { C as CollectionResponse } from './collections-
|
|
3
|
-
import {
|
|
4
|
-
import { f as ProductDetail, d as Product } from './product-D9liEtl4.cjs';
|
|
1
|
+
import { b as Category$1, O as Order, C as Cart } from './orders-ZKP0lqRN.cjs';
|
|
2
|
+
import { C as CollectionResponse } from './collections-CKNFcE2d.cjs';
|
|
3
|
+
import { f as ProductDetail, d as Product } from './product-D4kol-Z-.cjs';
|
|
5
4
|
|
|
6
5
|
interface PageProps {
|
|
7
6
|
nav_bar: NavBar;
|