@ecomiq/core 0.1.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.
- package/README.md +42 -0
- package/dist/api.cjs +99 -0
- package/dist/api.cjs.map +1 -0
- package/dist/api.d.cts +52 -0
- package/dist/api.d.ts +52 -0
- package/dist/api.js +93 -0
- package/dist/api.js.map +1 -0
- package/dist/client.cjs +1344 -0
- package/dist/client.cjs.map +1 -0
- package/dist/client.d.cts +82 -0
- package/dist/client.d.ts +82 -0
- package/dist/client.js +1341 -0
- package/dist/client.js.map +1 -0
- package/dist/index.cjs +1611 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1109 -0
- package/dist/index.d.ts +1109 -0
- package/dist/index.js +1450 -0
- package/dist/index.js.map +1 -0
- package/dist/models/collections.cjs +20 -0
- package/dist/models/collections.cjs.map +1 -0
- package/dist/models/collections.d.cts +56 -0
- package/dist/models/collections.d.ts +56 -0
- package/dist/models/collections.js +17 -0
- package/dist/models/collections.js.map +1 -0
- package/dist/models/geo.cjs +62 -0
- package/dist/models/geo.cjs.map +1 -0
- package/dist/models/geo.d.cts +279 -0
- package/dist/models/geo.d.ts +279 -0
- package/dist/models/geo.js +48 -0
- package/dist/models/geo.js.map +1 -0
- package/dist/models/products.cjs +212 -0
- package/dist/models/products.cjs.map +1 -0
- package/dist/models/products.d.cts +1421 -0
- package/dist/models/products.d.ts +1421 -0
- package/dist/models/products.js +187 -0
- package/dist/models/products.js.map +1 -0
- package/dist/models/search.cjs +200 -0
- package/dist/models/search.cjs.map +1 -0
- package/dist/models/search.d.cts +51 -0
- package/dist/models/search.d.ts +51 -0
- package/dist/models/search.js +196 -0
- package/dist/models/search.js.map +1 -0
- package/dist/models/settings.cjs +285 -0
- package/dist/models/settings.cjs.map +1 -0
- package/dist/models/settings.d.cts +7039 -0
- package/dist/models/settings.d.ts +7039 -0
- package/dist/models/settings.js +239 -0
- package/dist/models/settings.js.map +1 -0
- package/dist/models/storefront-cart.cjs +148 -0
- package/dist/models/storefront-cart.cjs.map +1 -0
- package/dist/models/storefront-cart.d.cts +747 -0
- package/dist/models/storefront-cart.d.ts +747 -0
- package/dist/models/storefront-cart.js +133 -0
- package/dist/models/storefront-cart.js.map +1 -0
- package/dist/models/storefront-checkout.cjs +307 -0
- package/dist/models/storefront-checkout.cjs.map +1 -0
- package/dist/models/storefront-checkout.d.cts +4122 -0
- package/dist/models/storefront-checkout.d.ts +4122 -0
- package/dist/models/storefront-checkout.js +288 -0
- package/dist/models/storefront-checkout.js.map +1 -0
- package/dist/models/storefront-reviews.cjs +223 -0
- package/dist/models/storefront-reviews.cjs.map +1 -0
- package/dist/models/storefront-reviews.d.cts +147 -0
- package/dist/models/storefront-reviews.d.ts +147 -0
- package/dist/models/storefront-reviews.js +218 -0
- package/dist/models/storefront-reviews.js.map +1 -0
- package/package.json +109 -0
|
@@ -0,0 +1,747 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare function cartVariantIdFromProduct(variantId: string): number;
|
|
4
|
+
declare const StorefrontAddressSchema: z.ZodObject<{
|
|
5
|
+
name: z.ZodNullable<z.ZodString>;
|
|
6
|
+
address1: z.ZodString;
|
|
7
|
+
city: z.ZodString;
|
|
8
|
+
countryCode: z.ZodString;
|
|
9
|
+
company: z.ZodNullable<z.ZodString>;
|
|
10
|
+
address2: z.ZodNullable<z.ZodString>;
|
|
11
|
+
province: z.ZodNullable<z.ZodString>;
|
|
12
|
+
postalCode: z.ZodNullable<z.ZodString>;
|
|
13
|
+
district: z.ZodNullable<z.ZodString>;
|
|
14
|
+
phone: z.ZodNullable<z.ZodString>;
|
|
15
|
+
latitude: z.ZodNullable<z.ZodNumber>;
|
|
16
|
+
longitude: z.ZodNullable<z.ZodNumber>;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
name: string | null;
|
|
19
|
+
address1: string;
|
|
20
|
+
city: string;
|
|
21
|
+
countryCode: string;
|
|
22
|
+
company: string | null;
|
|
23
|
+
address2: string | null;
|
|
24
|
+
province: string | null;
|
|
25
|
+
postalCode: string | null;
|
|
26
|
+
district: string | null;
|
|
27
|
+
phone: string | null;
|
|
28
|
+
latitude: number | null;
|
|
29
|
+
longitude: number | null;
|
|
30
|
+
}, {
|
|
31
|
+
name: string | null;
|
|
32
|
+
address1: string;
|
|
33
|
+
city: string;
|
|
34
|
+
countryCode: string;
|
|
35
|
+
company: string | null;
|
|
36
|
+
address2: string | null;
|
|
37
|
+
province: string | null;
|
|
38
|
+
postalCode: string | null;
|
|
39
|
+
district: string | null;
|
|
40
|
+
phone: string | null;
|
|
41
|
+
latitude: number | null;
|
|
42
|
+
longitude: number | null;
|
|
43
|
+
}>;
|
|
44
|
+
declare const StorefrontCartBundleItemSchema: z.ZodObject<{
|
|
45
|
+
productId: z.ZodNumber;
|
|
46
|
+
variantId: z.ZodNumber;
|
|
47
|
+
productName: z.ZodString;
|
|
48
|
+
variantName: z.ZodNullable<z.ZodString>;
|
|
49
|
+
sku: z.ZodNullable<z.ZodString>;
|
|
50
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
51
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
52
|
+
quantity: z.ZodNumber;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
imageUrl: string | null;
|
|
55
|
+
brand: string | null;
|
|
56
|
+
productId: number;
|
|
57
|
+
sku: string | null;
|
|
58
|
+
quantity: number;
|
|
59
|
+
variantId: number;
|
|
60
|
+
productName: string;
|
|
61
|
+
variantName: string | null;
|
|
62
|
+
}, {
|
|
63
|
+
imageUrl: string | null;
|
|
64
|
+
brand: string | null;
|
|
65
|
+
productId: number;
|
|
66
|
+
sku: string | null;
|
|
67
|
+
quantity: number;
|
|
68
|
+
variantId: number;
|
|
69
|
+
productName: string;
|
|
70
|
+
variantName: string | null;
|
|
71
|
+
}>;
|
|
72
|
+
declare const StorefrontCartItemSchema: z.ZodObject<{
|
|
73
|
+
id: z.ZodString;
|
|
74
|
+
productId: z.ZodNumber;
|
|
75
|
+
title: z.ZodString;
|
|
76
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
77
|
+
productHandle: z.ZodNullable<z.ZodString>;
|
|
78
|
+
thumbnail: z.ZodNullable<z.ZodString>;
|
|
79
|
+
quantity: z.ZodNumber;
|
|
80
|
+
variantId: z.ZodNumber;
|
|
81
|
+
variantSku: z.ZodNullable<z.ZodString>;
|
|
82
|
+
unitPrice: z.ZodNumber;
|
|
83
|
+
compareAtUnitPrice: z.ZodNullable<z.ZodNumber>;
|
|
84
|
+
bundleItems: z.ZodArray<z.ZodObject<{
|
|
85
|
+
productId: z.ZodNumber;
|
|
86
|
+
variantId: z.ZodNumber;
|
|
87
|
+
productName: z.ZodString;
|
|
88
|
+
variantName: z.ZodNullable<z.ZodString>;
|
|
89
|
+
sku: z.ZodNullable<z.ZodString>;
|
|
90
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
91
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
92
|
+
quantity: z.ZodNumber;
|
|
93
|
+
}, "strip", z.ZodTypeAny, {
|
|
94
|
+
imageUrl: string | null;
|
|
95
|
+
brand: string | null;
|
|
96
|
+
productId: number;
|
|
97
|
+
sku: string | null;
|
|
98
|
+
quantity: number;
|
|
99
|
+
variantId: number;
|
|
100
|
+
productName: string;
|
|
101
|
+
variantName: string | null;
|
|
102
|
+
}, {
|
|
103
|
+
imageUrl: string | null;
|
|
104
|
+
brand: string | null;
|
|
105
|
+
productId: number;
|
|
106
|
+
sku: string | null;
|
|
107
|
+
quantity: number;
|
|
108
|
+
variantId: number;
|
|
109
|
+
productName: string;
|
|
110
|
+
variantName: string | null;
|
|
111
|
+
}>, "many">;
|
|
112
|
+
}, "strip", z.ZodTypeAny, {
|
|
113
|
+
id: string;
|
|
114
|
+
productId: number;
|
|
115
|
+
quantity: number;
|
|
116
|
+
variantId: number;
|
|
117
|
+
unitPrice: number;
|
|
118
|
+
bundleItems: {
|
|
119
|
+
imageUrl: string | null;
|
|
120
|
+
brand: string | null;
|
|
121
|
+
productId: number;
|
|
122
|
+
sku: string | null;
|
|
123
|
+
quantity: number;
|
|
124
|
+
variantId: number;
|
|
125
|
+
productName: string;
|
|
126
|
+
variantName: string | null;
|
|
127
|
+
}[];
|
|
128
|
+
title: string;
|
|
129
|
+
variantLabel: string | null;
|
|
130
|
+
productHandle: string | null;
|
|
131
|
+
thumbnail: string | null;
|
|
132
|
+
variantSku: string | null;
|
|
133
|
+
compareAtUnitPrice: number | null;
|
|
134
|
+
}, {
|
|
135
|
+
id: string;
|
|
136
|
+
productId: number;
|
|
137
|
+
quantity: number;
|
|
138
|
+
variantId: number;
|
|
139
|
+
unitPrice: number;
|
|
140
|
+
bundleItems: {
|
|
141
|
+
imageUrl: string | null;
|
|
142
|
+
brand: string | null;
|
|
143
|
+
productId: number;
|
|
144
|
+
sku: string | null;
|
|
145
|
+
quantity: number;
|
|
146
|
+
variantId: number;
|
|
147
|
+
productName: string;
|
|
148
|
+
variantName: string | null;
|
|
149
|
+
}[];
|
|
150
|
+
title: string;
|
|
151
|
+
variantLabel: string | null;
|
|
152
|
+
productHandle: string | null;
|
|
153
|
+
thumbnail: string | null;
|
|
154
|
+
variantSku: string | null;
|
|
155
|
+
compareAtUnitPrice: number | null;
|
|
156
|
+
}>;
|
|
157
|
+
declare const StorefrontCartShippingMethodSchema: z.ZodObject<{
|
|
158
|
+
id: z.ZodString;
|
|
159
|
+
shippingMethodId: z.ZodNullable<z.ZodString>;
|
|
160
|
+
rateId: z.ZodNullable<z.ZodString>;
|
|
161
|
+
name: z.ZodString;
|
|
162
|
+
description: z.ZodNullable<z.ZodString>;
|
|
163
|
+
total: z.ZodNumber;
|
|
164
|
+
locationId: z.ZodNullable<z.ZodString>;
|
|
165
|
+
estimatedDays: z.ZodNullable<z.ZodNumber>;
|
|
166
|
+
pickupPointId: z.ZodNullable<z.ZodString>;
|
|
167
|
+
scheduledDate: z.ZodNullable<z.ZodString>;
|
|
168
|
+
scheduledTime: z.ZodNullable<z.ZodString>;
|
|
169
|
+
serviceCode: z.ZodNullable<z.ZodString>;
|
|
170
|
+
sellerId: z.ZodNullable<z.ZodString>;
|
|
171
|
+
shippingProfileId: z.ZodNullable<z.ZodString>;
|
|
172
|
+
}, "strip", z.ZodTypeAny, {
|
|
173
|
+
id: string;
|
|
174
|
+
name: string;
|
|
175
|
+
description: string | null;
|
|
176
|
+
sellerId: string | null;
|
|
177
|
+
locationId: string | null;
|
|
178
|
+
shippingMethodId: string | null;
|
|
179
|
+
rateId: string | null;
|
|
180
|
+
total: number;
|
|
181
|
+
estimatedDays: number | null;
|
|
182
|
+
pickupPointId: string | null;
|
|
183
|
+
scheduledDate: string | null;
|
|
184
|
+
scheduledTime: string | null;
|
|
185
|
+
serviceCode: string | null;
|
|
186
|
+
shippingProfileId: string | null;
|
|
187
|
+
}, {
|
|
188
|
+
id: string;
|
|
189
|
+
name: string;
|
|
190
|
+
description: string | null;
|
|
191
|
+
sellerId: string | null;
|
|
192
|
+
locationId: string | null;
|
|
193
|
+
shippingMethodId: string | null;
|
|
194
|
+
rateId: string | null;
|
|
195
|
+
total: number;
|
|
196
|
+
estimatedDays: number | null;
|
|
197
|
+
pickupPointId: string | null;
|
|
198
|
+
scheduledDate: string | null;
|
|
199
|
+
scheduledTime: string | null;
|
|
200
|
+
serviceCode: string | null;
|
|
201
|
+
shippingProfileId: string | null;
|
|
202
|
+
}>;
|
|
203
|
+
declare const StorefrontCartTotalsSchema: z.ZodObject<{
|
|
204
|
+
subtotal: z.ZodNumber;
|
|
205
|
+
discountTotal: z.ZodNumber;
|
|
206
|
+
shippingOriginalTotal: z.ZodNumber;
|
|
207
|
+
shippingTotal: z.ZodNumber;
|
|
208
|
+
taxTotal: z.ZodNumber;
|
|
209
|
+
warrantyTotal: z.ZodNumber;
|
|
210
|
+
total: z.ZodNumber;
|
|
211
|
+
}, "strip", z.ZodTypeAny, {
|
|
212
|
+
total: number;
|
|
213
|
+
subtotal: number;
|
|
214
|
+
discountTotal: number;
|
|
215
|
+
shippingOriginalTotal: number;
|
|
216
|
+
shippingTotal: number;
|
|
217
|
+
taxTotal: number;
|
|
218
|
+
warrantyTotal: number;
|
|
219
|
+
}, {
|
|
220
|
+
total: number;
|
|
221
|
+
subtotal: number;
|
|
222
|
+
discountTotal: number;
|
|
223
|
+
shippingOriginalTotal: number;
|
|
224
|
+
shippingTotal: number;
|
|
225
|
+
taxTotal: number;
|
|
226
|
+
warrantyTotal: number;
|
|
227
|
+
}>;
|
|
228
|
+
declare const StorefrontCartStatusSchema: z.ZodEnum<["inProgress", "pending", "completed", "abandoned", "cancelled", "expired", "failed"]>;
|
|
229
|
+
declare const StorefrontCartSchema: z.ZodObject<{
|
|
230
|
+
id: z.ZodString;
|
|
231
|
+
cartNumber: z.ZodString;
|
|
232
|
+
email: z.ZodNullable<z.ZodString>;
|
|
233
|
+
phone: z.ZodNullable<z.ZodString>;
|
|
234
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
235
|
+
lastName: z.ZodNullable<z.ZodString>;
|
|
236
|
+
currencyCode: z.ZodString;
|
|
237
|
+
status: z.ZodEnum<["inProgress", "pending", "completed", "abandoned", "cancelled", "expired", "failed"]>;
|
|
238
|
+
completedAt: z.ZodNullable<z.ZodString>;
|
|
239
|
+
shippingAddress: z.ZodNullable<z.ZodObject<{
|
|
240
|
+
name: z.ZodNullable<z.ZodString>;
|
|
241
|
+
address1: z.ZodString;
|
|
242
|
+
city: z.ZodString;
|
|
243
|
+
countryCode: z.ZodString;
|
|
244
|
+
company: z.ZodNullable<z.ZodString>;
|
|
245
|
+
address2: z.ZodNullable<z.ZodString>;
|
|
246
|
+
province: z.ZodNullable<z.ZodString>;
|
|
247
|
+
postalCode: z.ZodNullable<z.ZodString>;
|
|
248
|
+
district: z.ZodNullable<z.ZodString>;
|
|
249
|
+
phone: z.ZodNullable<z.ZodString>;
|
|
250
|
+
latitude: z.ZodNullable<z.ZodNumber>;
|
|
251
|
+
longitude: z.ZodNullable<z.ZodNumber>;
|
|
252
|
+
}, "strip", z.ZodTypeAny, {
|
|
253
|
+
name: string | null;
|
|
254
|
+
address1: string;
|
|
255
|
+
city: string;
|
|
256
|
+
countryCode: string;
|
|
257
|
+
company: string | null;
|
|
258
|
+
address2: string | null;
|
|
259
|
+
province: string | null;
|
|
260
|
+
postalCode: string | null;
|
|
261
|
+
district: string | null;
|
|
262
|
+
phone: string | null;
|
|
263
|
+
latitude: number | null;
|
|
264
|
+
longitude: number | null;
|
|
265
|
+
}, {
|
|
266
|
+
name: string | null;
|
|
267
|
+
address1: string;
|
|
268
|
+
city: string;
|
|
269
|
+
countryCode: string;
|
|
270
|
+
company: string | null;
|
|
271
|
+
address2: string | null;
|
|
272
|
+
province: string | null;
|
|
273
|
+
postalCode: string | null;
|
|
274
|
+
district: string | null;
|
|
275
|
+
phone: string | null;
|
|
276
|
+
latitude: number | null;
|
|
277
|
+
longitude: number | null;
|
|
278
|
+
}>>;
|
|
279
|
+
billingAddress: z.ZodNullable<z.ZodObject<{
|
|
280
|
+
name: z.ZodNullable<z.ZodString>;
|
|
281
|
+
address1: z.ZodString;
|
|
282
|
+
city: z.ZodString;
|
|
283
|
+
countryCode: z.ZodString;
|
|
284
|
+
company: z.ZodNullable<z.ZodString>;
|
|
285
|
+
address2: z.ZodNullable<z.ZodString>;
|
|
286
|
+
province: z.ZodNullable<z.ZodString>;
|
|
287
|
+
postalCode: z.ZodNullable<z.ZodString>;
|
|
288
|
+
district: z.ZodNullable<z.ZodString>;
|
|
289
|
+
phone: z.ZodNullable<z.ZodString>;
|
|
290
|
+
latitude: z.ZodNullable<z.ZodNumber>;
|
|
291
|
+
longitude: z.ZodNullable<z.ZodNumber>;
|
|
292
|
+
}, "strip", z.ZodTypeAny, {
|
|
293
|
+
name: string | null;
|
|
294
|
+
address1: string;
|
|
295
|
+
city: string;
|
|
296
|
+
countryCode: string;
|
|
297
|
+
company: string | null;
|
|
298
|
+
address2: string | null;
|
|
299
|
+
province: string | null;
|
|
300
|
+
postalCode: string | null;
|
|
301
|
+
district: string | null;
|
|
302
|
+
phone: string | null;
|
|
303
|
+
latitude: number | null;
|
|
304
|
+
longitude: number | null;
|
|
305
|
+
}, {
|
|
306
|
+
name: string | null;
|
|
307
|
+
address1: string;
|
|
308
|
+
city: string;
|
|
309
|
+
countryCode: string;
|
|
310
|
+
company: string | null;
|
|
311
|
+
address2: string | null;
|
|
312
|
+
province: string | null;
|
|
313
|
+
postalCode: string | null;
|
|
314
|
+
district: string | null;
|
|
315
|
+
phone: string | null;
|
|
316
|
+
latitude: number | null;
|
|
317
|
+
longitude: number | null;
|
|
318
|
+
}>>;
|
|
319
|
+
promotionCodes: z.ZodArray<z.ZodString, "many">;
|
|
320
|
+
items: z.ZodArray<z.ZodObject<{
|
|
321
|
+
id: z.ZodString;
|
|
322
|
+
productId: z.ZodNumber;
|
|
323
|
+
title: z.ZodString;
|
|
324
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
325
|
+
productHandle: z.ZodNullable<z.ZodString>;
|
|
326
|
+
thumbnail: z.ZodNullable<z.ZodString>;
|
|
327
|
+
quantity: z.ZodNumber;
|
|
328
|
+
variantId: z.ZodNumber;
|
|
329
|
+
variantSku: z.ZodNullable<z.ZodString>;
|
|
330
|
+
unitPrice: z.ZodNumber;
|
|
331
|
+
compareAtUnitPrice: z.ZodNullable<z.ZodNumber>;
|
|
332
|
+
bundleItems: z.ZodArray<z.ZodObject<{
|
|
333
|
+
productId: z.ZodNumber;
|
|
334
|
+
variantId: z.ZodNumber;
|
|
335
|
+
productName: z.ZodString;
|
|
336
|
+
variantName: z.ZodNullable<z.ZodString>;
|
|
337
|
+
sku: z.ZodNullable<z.ZodString>;
|
|
338
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
339
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
340
|
+
quantity: z.ZodNumber;
|
|
341
|
+
}, "strip", z.ZodTypeAny, {
|
|
342
|
+
imageUrl: string | null;
|
|
343
|
+
brand: string | null;
|
|
344
|
+
productId: number;
|
|
345
|
+
sku: string | null;
|
|
346
|
+
quantity: number;
|
|
347
|
+
variantId: number;
|
|
348
|
+
productName: string;
|
|
349
|
+
variantName: string | null;
|
|
350
|
+
}, {
|
|
351
|
+
imageUrl: string | null;
|
|
352
|
+
brand: string | null;
|
|
353
|
+
productId: number;
|
|
354
|
+
sku: string | null;
|
|
355
|
+
quantity: number;
|
|
356
|
+
variantId: number;
|
|
357
|
+
productName: string;
|
|
358
|
+
variantName: string | null;
|
|
359
|
+
}>, "many">;
|
|
360
|
+
}, "strip", z.ZodTypeAny, {
|
|
361
|
+
id: string;
|
|
362
|
+
productId: number;
|
|
363
|
+
quantity: number;
|
|
364
|
+
variantId: number;
|
|
365
|
+
unitPrice: number;
|
|
366
|
+
bundleItems: {
|
|
367
|
+
imageUrl: string | null;
|
|
368
|
+
brand: string | null;
|
|
369
|
+
productId: number;
|
|
370
|
+
sku: string | null;
|
|
371
|
+
quantity: number;
|
|
372
|
+
variantId: number;
|
|
373
|
+
productName: string;
|
|
374
|
+
variantName: string | null;
|
|
375
|
+
}[];
|
|
376
|
+
title: string;
|
|
377
|
+
variantLabel: string | null;
|
|
378
|
+
productHandle: string | null;
|
|
379
|
+
thumbnail: string | null;
|
|
380
|
+
variantSku: string | null;
|
|
381
|
+
compareAtUnitPrice: number | null;
|
|
382
|
+
}, {
|
|
383
|
+
id: string;
|
|
384
|
+
productId: number;
|
|
385
|
+
quantity: number;
|
|
386
|
+
variantId: number;
|
|
387
|
+
unitPrice: number;
|
|
388
|
+
bundleItems: {
|
|
389
|
+
imageUrl: string | null;
|
|
390
|
+
brand: string | null;
|
|
391
|
+
productId: number;
|
|
392
|
+
sku: string | null;
|
|
393
|
+
quantity: number;
|
|
394
|
+
variantId: number;
|
|
395
|
+
productName: string;
|
|
396
|
+
variantName: string | null;
|
|
397
|
+
}[];
|
|
398
|
+
title: string;
|
|
399
|
+
variantLabel: string | null;
|
|
400
|
+
productHandle: string | null;
|
|
401
|
+
thumbnail: string | null;
|
|
402
|
+
variantSku: string | null;
|
|
403
|
+
compareAtUnitPrice: number | null;
|
|
404
|
+
}>, "many">;
|
|
405
|
+
shippingMethods: z.ZodArray<z.ZodObject<{
|
|
406
|
+
id: z.ZodString;
|
|
407
|
+
shippingMethodId: z.ZodNullable<z.ZodString>;
|
|
408
|
+
rateId: z.ZodNullable<z.ZodString>;
|
|
409
|
+
name: z.ZodString;
|
|
410
|
+
description: z.ZodNullable<z.ZodString>;
|
|
411
|
+
total: z.ZodNumber;
|
|
412
|
+
locationId: z.ZodNullable<z.ZodString>;
|
|
413
|
+
estimatedDays: z.ZodNullable<z.ZodNumber>;
|
|
414
|
+
pickupPointId: z.ZodNullable<z.ZodString>;
|
|
415
|
+
scheduledDate: z.ZodNullable<z.ZodString>;
|
|
416
|
+
scheduledTime: z.ZodNullable<z.ZodString>;
|
|
417
|
+
serviceCode: z.ZodNullable<z.ZodString>;
|
|
418
|
+
sellerId: z.ZodNullable<z.ZodString>;
|
|
419
|
+
shippingProfileId: z.ZodNullable<z.ZodString>;
|
|
420
|
+
}, "strip", z.ZodTypeAny, {
|
|
421
|
+
id: string;
|
|
422
|
+
name: string;
|
|
423
|
+
description: string | null;
|
|
424
|
+
sellerId: string | null;
|
|
425
|
+
locationId: string | null;
|
|
426
|
+
shippingMethodId: string | null;
|
|
427
|
+
rateId: string | null;
|
|
428
|
+
total: number;
|
|
429
|
+
estimatedDays: number | null;
|
|
430
|
+
pickupPointId: string | null;
|
|
431
|
+
scheduledDate: string | null;
|
|
432
|
+
scheduledTime: string | null;
|
|
433
|
+
serviceCode: string | null;
|
|
434
|
+
shippingProfileId: string | null;
|
|
435
|
+
}, {
|
|
436
|
+
id: string;
|
|
437
|
+
name: string;
|
|
438
|
+
description: string | null;
|
|
439
|
+
sellerId: string | null;
|
|
440
|
+
locationId: string | null;
|
|
441
|
+
shippingMethodId: string | null;
|
|
442
|
+
rateId: string | null;
|
|
443
|
+
total: number;
|
|
444
|
+
estimatedDays: number | null;
|
|
445
|
+
pickupPointId: string | null;
|
|
446
|
+
scheduledDate: string | null;
|
|
447
|
+
scheduledTime: string | null;
|
|
448
|
+
serviceCode: string | null;
|
|
449
|
+
shippingProfileId: string | null;
|
|
450
|
+
}>, "many">;
|
|
451
|
+
totals: z.ZodObject<{
|
|
452
|
+
subtotal: z.ZodNumber;
|
|
453
|
+
discountTotal: z.ZodNumber;
|
|
454
|
+
shippingOriginalTotal: z.ZodNumber;
|
|
455
|
+
shippingTotal: z.ZodNumber;
|
|
456
|
+
taxTotal: z.ZodNumber;
|
|
457
|
+
warrantyTotal: z.ZodNumber;
|
|
458
|
+
total: z.ZodNumber;
|
|
459
|
+
}, "strip", z.ZodTypeAny, {
|
|
460
|
+
total: number;
|
|
461
|
+
subtotal: number;
|
|
462
|
+
discountTotal: number;
|
|
463
|
+
shippingOriginalTotal: number;
|
|
464
|
+
shippingTotal: number;
|
|
465
|
+
taxTotal: number;
|
|
466
|
+
warrantyTotal: number;
|
|
467
|
+
}, {
|
|
468
|
+
total: number;
|
|
469
|
+
subtotal: number;
|
|
470
|
+
discountTotal: number;
|
|
471
|
+
shippingOriginalTotal: number;
|
|
472
|
+
shippingTotal: number;
|
|
473
|
+
taxTotal: number;
|
|
474
|
+
warrantyTotal: number;
|
|
475
|
+
}>;
|
|
476
|
+
}, "strip", z.ZodTypeAny, {
|
|
477
|
+
status: "inProgress" | "pending" | "completed" | "abandoned" | "cancelled" | "expired" | "failed";
|
|
478
|
+
id: string;
|
|
479
|
+
phone: string | null;
|
|
480
|
+
cartNumber: string;
|
|
481
|
+
email: string | null;
|
|
482
|
+
firstName: string | null;
|
|
483
|
+
lastName: string | null;
|
|
484
|
+
currencyCode: string;
|
|
485
|
+
completedAt: string | null;
|
|
486
|
+
shippingAddress: {
|
|
487
|
+
name: string | null;
|
|
488
|
+
address1: string;
|
|
489
|
+
city: string;
|
|
490
|
+
countryCode: string;
|
|
491
|
+
company: string | null;
|
|
492
|
+
address2: string | null;
|
|
493
|
+
province: string | null;
|
|
494
|
+
postalCode: string | null;
|
|
495
|
+
district: string | null;
|
|
496
|
+
phone: string | null;
|
|
497
|
+
latitude: number | null;
|
|
498
|
+
longitude: number | null;
|
|
499
|
+
} | null;
|
|
500
|
+
billingAddress: {
|
|
501
|
+
name: string | null;
|
|
502
|
+
address1: string;
|
|
503
|
+
city: string;
|
|
504
|
+
countryCode: string;
|
|
505
|
+
company: string | null;
|
|
506
|
+
address2: string | null;
|
|
507
|
+
province: string | null;
|
|
508
|
+
postalCode: string | null;
|
|
509
|
+
district: string | null;
|
|
510
|
+
phone: string | null;
|
|
511
|
+
latitude: number | null;
|
|
512
|
+
longitude: number | null;
|
|
513
|
+
} | null;
|
|
514
|
+
promotionCodes: string[];
|
|
515
|
+
items: {
|
|
516
|
+
id: string;
|
|
517
|
+
productId: number;
|
|
518
|
+
quantity: number;
|
|
519
|
+
variantId: number;
|
|
520
|
+
unitPrice: number;
|
|
521
|
+
bundleItems: {
|
|
522
|
+
imageUrl: string | null;
|
|
523
|
+
brand: string | null;
|
|
524
|
+
productId: number;
|
|
525
|
+
sku: string | null;
|
|
526
|
+
quantity: number;
|
|
527
|
+
variantId: number;
|
|
528
|
+
productName: string;
|
|
529
|
+
variantName: string | null;
|
|
530
|
+
}[];
|
|
531
|
+
title: string;
|
|
532
|
+
variantLabel: string | null;
|
|
533
|
+
productHandle: string | null;
|
|
534
|
+
thumbnail: string | null;
|
|
535
|
+
variantSku: string | null;
|
|
536
|
+
compareAtUnitPrice: number | null;
|
|
537
|
+
}[];
|
|
538
|
+
shippingMethods: {
|
|
539
|
+
id: string;
|
|
540
|
+
name: string;
|
|
541
|
+
description: string | null;
|
|
542
|
+
sellerId: string | null;
|
|
543
|
+
locationId: string | null;
|
|
544
|
+
shippingMethodId: string | null;
|
|
545
|
+
rateId: string | null;
|
|
546
|
+
total: number;
|
|
547
|
+
estimatedDays: number | null;
|
|
548
|
+
pickupPointId: string | null;
|
|
549
|
+
scheduledDate: string | null;
|
|
550
|
+
scheduledTime: string | null;
|
|
551
|
+
serviceCode: string | null;
|
|
552
|
+
shippingProfileId: string | null;
|
|
553
|
+
}[];
|
|
554
|
+
totals: {
|
|
555
|
+
total: number;
|
|
556
|
+
subtotal: number;
|
|
557
|
+
discountTotal: number;
|
|
558
|
+
shippingOriginalTotal: number;
|
|
559
|
+
shippingTotal: number;
|
|
560
|
+
taxTotal: number;
|
|
561
|
+
warrantyTotal: number;
|
|
562
|
+
};
|
|
563
|
+
}, {
|
|
564
|
+
status: "inProgress" | "pending" | "completed" | "abandoned" | "cancelled" | "expired" | "failed";
|
|
565
|
+
id: string;
|
|
566
|
+
phone: string | null;
|
|
567
|
+
cartNumber: string;
|
|
568
|
+
email: string | null;
|
|
569
|
+
firstName: string | null;
|
|
570
|
+
lastName: string | null;
|
|
571
|
+
currencyCode: string;
|
|
572
|
+
completedAt: string | null;
|
|
573
|
+
shippingAddress: {
|
|
574
|
+
name: string | null;
|
|
575
|
+
address1: string;
|
|
576
|
+
city: string;
|
|
577
|
+
countryCode: string;
|
|
578
|
+
company: string | null;
|
|
579
|
+
address2: string | null;
|
|
580
|
+
province: string | null;
|
|
581
|
+
postalCode: string | null;
|
|
582
|
+
district: string | null;
|
|
583
|
+
phone: string | null;
|
|
584
|
+
latitude: number | null;
|
|
585
|
+
longitude: number | null;
|
|
586
|
+
} | null;
|
|
587
|
+
billingAddress: {
|
|
588
|
+
name: string | null;
|
|
589
|
+
address1: string;
|
|
590
|
+
city: string;
|
|
591
|
+
countryCode: string;
|
|
592
|
+
company: string | null;
|
|
593
|
+
address2: string | null;
|
|
594
|
+
province: string | null;
|
|
595
|
+
postalCode: string | null;
|
|
596
|
+
district: string | null;
|
|
597
|
+
phone: string | null;
|
|
598
|
+
latitude: number | null;
|
|
599
|
+
longitude: number | null;
|
|
600
|
+
} | null;
|
|
601
|
+
promotionCodes: string[];
|
|
602
|
+
items: {
|
|
603
|
+
id: string;
|
|
604
|
+
productId: number;
|
|
605
|
+
quantity: number;
|
|
606
|
+
variantId: number;
|
|
607
|
+
unitPrice: number;
|
|
608
|
+
bundleItems: {
|
|
609
|
+
imageUrl: string | null;
|
|
610
|
+
brand: string | null;
|
|
611
|
+
productId: number;
|
|
612
|
+
sku: string | null;
|
|
613
|
+
quantity: number;
|
|
614
|
+
variantId: number;
|
|
615
|
+
productName: string;
|
|
616
|
+
variantName: string | null;
|
|
617
|
+
}[];
|
|
618
|
+
title: string;
|
|
619
|
+
variantLabel: string | null;
|
|
620
|
+
productHandle: string | null;
|
|
621
|
+
thumbnail: string | null;
|
|
622
|
+
variantSku: string | null;
|
|
623
|
+
compareAtUnitPrice: number | null;
|
|
624
|
+
}[];
|
|
625
|
+
shippingMethods: {
|
|
626
|
+
id: string;
|
|
627
|
+
name: string;
|
|
628
|
+
description: string | null;
|
|
629
|
+
sellerId: string | null;
|
|
630
|
+
locationId: string | null;
|
|
631
|
+
shippingMethodId: string | null;
|
|
632
|
+
rateId: string | null;
|
|
633
|
+
total: number;
|
|
634
|
+
estimatedDays: number | null;
|
|
635
|
+
pickupPointId: string | null;
|
|
636
|
+
scheduledDate: string | null;
|
|
637
|
+
scheduledTime: string | null;
|
|
638
|
+
serviceCode: string | null;
|
|
639
|
+
shippingProfileId: string | null;
|
|
640
|
+
}[];
|
|
641
|
+
totals: {
|
|
642
|
+
total: number;
|
|
643
|
+
subtotal: number;
|
|
644
|
+
discountTotal: number;
|
|
645
|
+
shippingOriginalTotal: number;
|
|
646
|
+
shippingTotal: number;
|
|
647
|
+
taxTotal: number;
|
|
648
|
+
warrantyTotal: number;
|
|
649
|
+
};
|
|
650
|
+
}>;
|
|
651
|
+
declare const CreateCartParamsSchema: z.ZodObject<{
|
|
652
|
+
currencyCode: z.ZodString;
|
|
653
|
+
salesChannelId: z.ZodOptional<z.ZodString>;
|
|
654
|
+
email: z.ZodOptional<z.ZodString>;
|
|
655
|
+
}, "strip", z.ZodTypeAny, {
|
|
656
|
+
currencyCode: string;
|
|
657
|
+
email?: string | undefined;
|
|
658
|
+
salesChannelId?: string | undefined;
|
|
659
|
+
}, {
|
|
660
|
+
currencyCode: string;
|
|
661
|
+
email?: string | undefined;
|
|
662
|
+
salesChannelId?: string | undefined;
|
|
663
|
+
}>;
|
|
664
|
+
declare const GetCartParamsSchema: z.ZodObject<{
|
|
665
|
+
cartId: z.ZodString;
|
|
666
|
+
}, "strip", z.ZodTypeAny, {
|
|
667
|
+
cartId: string;
|
|
668
|
+
}, {
|
|
669
|
+
cartId: string;
|
|
670
|
+
}>;
|
|
671
|
+
declare const CartItemModifierSchema: z.ZodObject<{
|
|
672
|
+
modifierGroupId: z.ZodNumber;
|
|
673
|
+
optionIds: z.ZodArray<z.ZodNumber, "many">;
|
|
674
|
+
}, "strip", z.ZodTypeAny, {
|
|
675
|
+
modifierGroupId: number;
|
|
676
|
+
optionIds: number[];
|
|
677
|
+
}, {
|
|
678
|
+
modifierGroupId: number;
|
|
679
|
+
optionIds: number[];
|
|
680
|
+
}>;
|
|
681
|
+
declare const AddCartItemParamsSchema: z.ZodObject<{
|
|
682
|
+
cartId: z.ZodString;
|
|
683
|
+
variantId: z.ZodNumber;
|
|
684
|
+
quantity: z.ZodNumber;
|
|
685
|
+
modifiers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
686
|
+
modifierGroupId: z.ZodNumber;
|
|
687
|
+
optionIds: z.ZodArray<z.ZodNumber, "many">;
|
|
688
|
+
}, "strip", z.ZodTypeAny, {
|
|
689
|
+
modifierGroupId: number;
|
|
690
|
+
optionIds: number[];
|
|
691
|
+
}, {
|
|
692
|
+
modifierGroupId: number;
|
|
693
|
+
optionIds: number[];
|
|
694
|
+
}>, "many">>;
|
|
695
|
+
}, "strip", z.ZodTypeAny, {
|
|
696
|
+
quantity: number;
|
|
697
|
+
variantId: number;
|
|
698
|
+
cartId: string;
|
|
699
|
+
modifiers?: {
|
|
700
|
+
modifierGroupId: number;
|
|
701
|
+
optionIds: number[];
|
|
702
|
+
}[] | undefined;
|
|
703
|
+
}, {
|
|
704
|
+
quantity: number;
|
|
705
|
+
variantId: number;
|
|
706
|
+
cartId: string;
|
|
707
|
+
modifiers?: {
|
|
708
|
+
modifierGroupId: number;
|
|
709
|
+
optionIds: number[];
|
|
710
|
+
}[] | undefined;
|
|
711
|
+
}>;
|
|
712
|
+
declare const UpdateCartItemQuantityParamsSchema: z.ZodObject<{
|
|
713
|
+
cartId: z.ZodString;
|
|
714
|
+
cartItemId: z.ZodString;
|
|
715
|
+
quantity: z.ZodNumber;
|
|
716
|
+
}, "strip", z.ZodTypeAny, {
|
|
717
|
+
quantity: number;
|
|
718
|
+
cartId: string;
|
|
719
|
+
cartItemId: string;
|
|
720
|
+
}, {
|
|
721
|
+
quantity: number;
|
|
722
|
+
cartId: string;
|
|
723
|
+
cartItemId: string;
|
|
724
|
+
}>;
|
|
725
|
+
declare const RemoveCartItemParamsSchema: z.ZodObject<{
|
|
726
|
+
cartId: z.ZodString;
|
|
727
|
+
cartItemId: z.ZodString;
|
|
728
|
+
}, "strip", z.ZodTypeAny, {
|
|
729
|
+
cartId: string;
|
|
730
|
+
cartItemId: string;
|
|
731
|
+
}, {
|
|
732
|
+
cartId: string;
|
|
733
|
+
cartItemId: string;
|
|
734
|
+
}>;
|
|
735
|
+
type StorefrontAddress = z.infer<typeof StorefrontAddressSchema>;
|
|
736
|
+
type StorefrontCartBundleItem = z.infer<typeof StorefrontCartBundleItemSchema>;
|
|
737
|
+
type StorefrontCartItem = z.infer<typeof StorefrontCartItemSchema>;
|
|
738
|
+
type StorefrontCartShippingMethod = z.infer<typeof StorefrontCartShippingMethodSchema>;
|
|
739
|
+
type StorefrontCartTotals = z.infer<typeof StorefrontCartTotalsSchema>;
|
|
740
|
+
type StorefrontCart = z.infer<typeof StorefrontCartSchema>;
|
|
741
|
+
type CreateCartParams = z.input<typeof CreateCartParamsSchema>;
|
|
742
|
+
type GetCartParams = z.input<typeof GetCartParamsSchema>;
|
|
743
|
+
type AddCartItemParams = z.input<typeof AddCartItemParamsSchema>;
|
|
744
|
+
type UpdateCartItemQuantityParams = z.input<typeof UpdateCartItemQuantityParamsSchema>;
|
|
745
|
+
type RemoveCartItemParams = z.input<typeof RemoveCartItemParamsSchema>;
|
|
746
|
+
|
|
747
|
+
export { type AddCartItemParams, AddCartItemParamsSchema, CartItemModifierSchema, type CreateCartParams, CreateCartParamsSchema, type GetCartParams, GetCartParamsSchema, type RemoveCartItemParams, RemoveCartItemParamsSchema, type StorefrontAddress, StorefrontAddressSchema, type StorefrontCart, type StorefrontCartBundleItem, StorefrontCartBundleItemSchema, type StorefrontCartItem, StorefrontCartItemSchema, StorefrontCartSchema, type StorefrontCartShippingMethod, StorefrontCartShippingMethodSchema, StorefrontCartStatusSchema, type StorefrontCartTotals, StorefrontCartTotalsSchema, type UpdateCartItemQuantityParams, UpdateCartItemQuantityParamsSchema, cartVariantIdFromProduct };
|