@tonytang99/integration-canonical 1.0.0 → 1.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 (38) hide show
  1. package/README.md +414 -1
  2. package/dist/index.d.ts +5 -1
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +80 -15
  5. package/dist/index.js.map +1 -1
  6. package/dist/schemas/customer.d.ts +746 -0
  7. package/dist/schemas/customer.d.ts.map +1 -0
  8. package/dist/schemas/customer.js +282 -0
  9. package/dist/schemas/customer.js.map +1 -0
  10. package/dist/schemas/index.d.ts +13 -0
  11. package/dist/schemas/index.d.ts.map +1 -0
  12. package/dist/schemas/index.js +33 -0
  13. package/dist/schemas/index.js.map +1 -0
  14. package/dist/schemas/inventory.d.ts +1642 -0
  15. package/dist/schemas/inventory.d.ts.map +1 -0
  16. package/dist/schemas/inventory.js +302 -0
  17. package/dist/schemas/inventory.js.map +1 -0
  18. package/dist/schemas/order.d.ts +1339 -0
  19. package/dist/schemas/order.d.ts.map +1 -0
  20. package/dist/schemas/order.js +310 -0
  21. package/dist/schemas/order.js.map +1 -0
  22. package/dist/schemas/product.d.ts +717 -0
  23. package/dist/schemas/product.d.ts.map +1 -0
  24. package/dist/schemas/product.js +303 -0
  25. package/dist/schemas/product.js.map +1 -0
  26. package/dist/slots.d.ts +572 -0
  27. package/dist/slots.d.ts.map +1 -0
  28. package/dist/slots.js +20 -0
  29. package/dist/slots.js.map +1 -0
  30. package/dist/types/common.d.ts +284 -0
  31. package/dist/types/common.d.ts.map +1 -0
  32. package/dist/types/common.js +401 -0
  33. package/dist/types/common.js.map +1 -0
  34. package/dist/types/enrichments.d.ts +378 -0
  35. package/dist/types/enrichments.d.ts.map +1 -0
  36. package/dist/types/enrichments.js +96 -0
  37. package/dist/types/enrichments.js.map +1 -0
  38. package/package.json +2 -1
@@ -0,0 +1,717 @@
1
+ import { z } from 'zod';
2
+ import { type Money } from '../types/common';
3
+ /**
4
+ * Product availability status
5
+ */
6
+ export declare const ProductAvailability: z.ZodEnum<["available", "preorder", "backorder", "discontinued", "out-of-stock"]>;
7
+ export type ProductAvailability = z.infer<typeof ProductAvailability>;
8
+ /**
9
+ * Product condition
10
+ */
11
+ export declare const ProductCondition: z.ZodEnum<["new", "refurbished", "used"]>;
12
+ export type ProductCondition = z.infer<typeof ProductCondition>;
13
+ /**
14
+ * Product weight with unit
15
+ */
16
+ export declare const ProductWeightSchema: z.ZodObject<{
17
+ value: z.ZodNumber;
18
+ unit: z.ZodEnum<["kg", "g", "lb", "oz"]>;
19
+ }, "strip", z.ZodTypeAny, {
20
+ value: number;
21
+ unit: "g" | "kg" | "oz" | "lb";
22
+ }, {
23
+ value: number;
24
+ unit: "g" | "kg" | "oz" | "lb";
25
+ }>;
26
+ export type ProductWeight = z.infer<typeof ProductWeightSchema>;
27
+ /**
28
+ * Product dimensions
29
+ */
30
+ export declare const ProductDimensionsSchema: z.ZodObject<{
31
+ length: z.ZodNumber;
32
+ width: z.ZodNumber;
33
+ height: z.ZodNumber;
34
+ unit: z.ZodEnum<["cm", "m", "in", "ft"]>;
35
+ }, "strip", z.ZodTypeAny, {
36
+ length: number;
37
+ unit: "cm" | "m" | "in" | "ft";
38
+ width: number;
39
+ height: number;
40
+ }, {
41
+ length: number;
42
+ unit: "cm" | "m" | "in" | "ft";
43
+ width: number;
44
+ height: number;
45
+ }>;
46
+ export type ProductDimensions = z.infer<typeof ProductDimensionsSchema>;
47
+ /**
48
+ * Product image
49
+ */
50
+ export declare const ProductImageSchema: z.ZodObject<{
51
+ url: z.ZodString;
52
+ altText: z.ZodOptional<z.ZodString>;
53
+ sortOrder: z.ZodOptional<z.ZodNumber>;
54
+ isThumbnail: z.ZodOptional<z.ZodBoolean>;
55
+ }, "strip", z.ZodTypeAny, {
56
+ url: string;
57
+ altText?: string | undefined;
58
+ sortOrder?: number | undefined;
59
+ isThumbnail?: boolean | undefined;
60
+ }, {
61
+ url: string;
62
+ altText?: string | undefined;
63
+ sortOrder?: number | undefined;
64
+ isThumbnail?: boolean | undefined;
65
+ }>;
66
+ export type ProductImage = z.infer<typeof ProductImageSchema>;
67
+ /**
68
+ * Product variant/option
69
+ */
70
+ export declare const ProductVariantSchema: z.ZodObject<{
71
+ id: z.ZodString;
72
+ sku: z.ZodString;
73
+ name: z.ZodOptional<z.ZodString>;
74
+ price: z.ZodOptional<z.ZodObject<{
75
+ amount: z.ZodNumber;
76
+ currency: z.ZodEnum<["USD", "EUR", "GBP", "AUD", "CAD", "NZD", "JPY", "CNY", "INR", "SGD", "HKD", "MXN", "BRL", "ZAR"]>;
77
+ }, "strip", z.ZodTypeAny, {
78
+ amount: number;
79
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
80
+ }, {
81
+ amount: number;
82
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
83
+ }>>;
84
+ compareAtPrice: z.ZodOptional<z.ZodObject<{
85
+ amount: z.ZodNumber;
86
+ currency: z.ZodEnum<["USD", "EUR", "GBP", "AUD", "CAD", "NZD", "JPY", "CNY", "INR", "SGD", "HKD", "MXN", "BRL", "ZAR"]>;
87
+ }, "strip", z.ZodTypeAny, {
88
+ amount: number;
89
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
90
+ }, {
91
+ amount: number;
92
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
93
+ }>>;
94
+ inventory: z.ZodOptional<z.ZodObject<{
95
+ quantity: z.ZodNumber;
96
+ tracked: z.ZodBoolean;
97
+ allowBackorder: z.ZodOptional<z.ZodBoolean>;
98
+ }, "strip", z.ZodTypeAny, {
99
+ quantity: number;
100
+ tracked: boolean;
101
+ allowBackorder?: boolean | undefined;
102
+ }, {
103
+ quantity: number;
104
+ tracked: boolean;
105
+ allowBackorder?: boolean | undefined;
106
+ }>>;
107
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
108
+ image: z.ZodOptional<z.ZodObject<{
109
+ url: z.ZodString;
110
+ altText: z.ZodOptional<z.ZodString>;
111
+ sortOrder: z.ZodOptional<z.ZodNumber>;
112
+ isThumbnail: z.ZodOptional<z.ZodBoolean>;
113
+ }, "strip", z.ZodTypeAny, {
114
+ url: string;
115
+ altText?: string | undefined;
116
+ sortOrder?: number | undefined;
117
+ isThumbnail?: boolean | undefined;
118
+ }, {
119
+ url: string;
120
+ altText?: string | undefined;
121
+ sortOrder?: number | undefined;
122
+ isThumbnail?: boolean | undefined;
123
+ }>>;
124
+ isAvailable: z.ZodOptional<z.ZodBoolean>;
125
+ }, "strip", z.ZodTypeAny, {
126
+ id: string;
127
+ sku: string;
128
+ options?: Record<string, string> | undefined;
129
+ name?: string | undefined;
130
+ price?: {
131
+ amount: number;
132
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
133
+ } | undefined;
134
+ compareAtPrice?: {
135
+ amount: number;
136
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
137
+ } | undefined;
138
+ inventory?: {
139
+ quantity: number;
140
+ tracked: boolean;
141
+ allowBackorder?: boolean | undefined;
142
+ } | undefined;
143
+ image?: {
144
+ url: string;
145
+ altText?: string | undefined;
146
+ sortOrder?: number | undefined;
147
+ isThumbnail?: boolean | undefined;
148
+ } | undefined;
149
+ isAvailable?: boolean | undefined;
150
+ }, {
151
+ id: string;
152
+ sku: string;
153
+ options?: Record<string, string> | undefined;
154
+ name?: string | undefined;
155
+ price?: {
156
+ amount: number;
157
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
158
+ } | undefined;
159
+ compareAtPrice?: {
160
+ amount: number;
161
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
162
+ } | undefined;
163
+ inventory?: {
164
+ quantity: number;
165
+ tracked: boolean;
166
+ allowBackorder?: boolean | undefined;
167
+ } | undefined;
168
+ image?: {
169
+ url: string;
170
+ altText?: string | undefined;
171
+ sortOrder?: number | undefined;
172
+ isThumbnail?: boolean | undefined;
173
+ } | undefined;
174
+ isAvailable?: boolean | undefined;
175
+ }>;
176
+ export type ProductVariant = z.infer<typeof ProductVariantSchema>;
177
+ /**
178
+ * Canonical Product Schema
179
+ *
180
+ * This represents a normalized product that can be mapped to/from:
181
+ * - BigCommerce Products
182
+ * - MYOB Stock Items
183
+ * - Adobe Commerce (Magento) Products
184
+ * - Shopify Products
185
+ * etc.
186
+ */
187
+ export declare const CanonicalProductSchema: z.ZodObject<{
188
+ id: z.ZodString;
189
+ sku: z.ZodString;
190
+ name: z.ZodString;
191
+ description: z.ZodOptional<z.ZodString>;
192
+ shortDescription: z.ZodOptional<z.ZodString>;
193
+ price: z.ZodObject<{
194
+ amount: z.ZodNumber;
195
+ currency: z.ZodEnum<["USD", "EUR", "GBP", "AUD", "CAD", "NZD", "JPY", "CNY", "INR", "SGD", "HKD", "MXN", "BRL", "ZAR"]>;
196
+ }, "strip", z.ZodTypeAny, {
197
+ amount: number;
198
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
199
+ }, {
200
+ amount: number;
201
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
202
+ }>;
203
+ compareAtPrice: z.ZodOptional<z.ZodObject<{
204
+ amount: z.ZodNumber;
205
+ currency: z.ZodEnum<["USD", "EUR", "GBP", "AUD", "CAD", "NZD", "JPY", "CNY", "INR", "SGD", "HKD", "MXN", "BRL", "ZAR"]>;
206
+ }, "strip", z.ZodTypeAny, {
207
+ amount: number;
208
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
209
+ }, {
210
+ amount: number;
211
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
212
+ }>>;
213
+ costPrice: z.ZodOptional<z.ZodObject<{
214
+ amount: z.ZodNumber;
215
+ currency: z.ZodEnum<["USD", "EUR", "GBP", "AUD", "CAD", "NZD", "JPY", "CNY", "INR", "SGD", "HKD", "MXN", "BRL", "ZAR"]>;
216
+ }, "strip", z.ZodTypeAny, {
217
+ amount: number;
218
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
219
+ }, {
220
+ amount: number;
221
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
222
+ }>>;
223
+ taxable: z.ZodOptional<z.ZodBoolean>;
224
+ taxCode: z.ZodOptional<z.ZodString>;
225
+ inventory: z.ZodObject<{
226
+ quantity: z.ZodNumber;
227
+ tracked: z.ZodBoolean;
228
+ allowBackorder: z.ZodOptional<z.ZodBoolean>;
229
+ lowStockLevel: z.ZodOptional<z.ZodNumber>;
230
+ warningLevel: z.ZodOptional<z.ZodNumber>;
231
+ }, "strip", z.ZodTypeAny, {
232
+ quantity: number;
233
+ tracked: boolean;
234
+ allowBackorder?: boolean | undefined;
235
+ lowStockLevel?: number | undefined;
236
+ warningLevel?: number | undefined;
237
+ }, {
238
+ quantity: number;
239
+ tracked: boolean;
240
+ allowBackorder?: boolean | undefined;
241
+ lowStockLevel?: number | undefined;
242
+ warningLevel?: number | undefined;
243
+ }>;
244
+ weight: z.ZodOptional<z.ZodObject<{
245
+ value: z.ZodNumber;
246
+ unit: z.ZodEnum<["kg", "g", "lb", "oz"]>;
247
+ }, "strip", z.ZodTypeAny, {
248
+ value: number;
249
+ unit: "g" | "kg" | "oz" | "lb";
250
+ }, {
251
+ value: number;
252
+ unit: "g" | "kg" | "oz" | "lb";
253
+ }>>;
254
+ dimensions: z.ZodOptional<z.ZodObject<{
255
+ length: z.ZodNumber;
256
+ width: z.ZodNumber;
257
+ height: z.ZodNumber;
258
+ unit: z.ZodEnum<["cm", "m", "in", "ft"]>;
259
+ }, "strip", z.ZodTypeAny, {
260
+ length: number;
261
+ unit: "cm" | "m" | "in" | "ft";
262
+ width: number;
263
+ height: number;
264
+ }, {
265
+ length: number;
266
+ unit: "cm" | "m" | "in" | "ft";
267
+ width: number;
268
+ height: number;
269
+ }>>;
270
+ isVisible: z.ZodOptional<z.ZodBoolean>;
271
+ availability: z.ZodOptional<z.ZodEnum<["available", "preorder", "backorder", "discontinued", "out-of-stock"]>>;
272
+ condition: z.ZodOptional<z.ZodEnum<["new", "refurbished", "used"]>>;
273
+ categories: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
274
+ brand: z.ZodOptional<z.ZodString>;
275
+ manufacturer: z.ZodOptional<z.ZodString>;
276
+ images: z.ZodOptional<z.ZodArray<z.ZodObject<{
277
+ url: z.ZodString;
278
+ altText: z.ZodOptional<z.ZodString>;
279
+ sortOrder: z.ZodOptional<z.ZodNumber>;
280
+ isThumbnail: z.ZodOptional<z.ZodBoolean>;
281
+ }, "strip", z.ZodTypeAny, {
282
+ url: string;
283
+ altText?: string | undefined;
284
+ sortOrder?: number | undefined;
285
+ isThumbnail?: boolean | undefined;
286
+ }, {
287
+ url: string;
288
+ altText?: string | undefined;
289
+ sortOrder?: number | undefined;
290
+ isThumbnail?: boolean | undefined;
291
+ }>, "many">>;
292
+ variants: z.ZodOptional<z.ZodArray<z.ZodObject<{
293
+ id: z.ZodString;
294
+ sku: z.ZodString;
295
+ name: z.ZodOptional<z.ZodString>;
296
+ price: z.ZodOptional<z.ZodObject<{
297
+ amount: z.ZodNumber;
298
+ currency: z.ZodEnum<["USD", "EUR", "GBP", "AUD", "CAD", "NZD", "JPY", "CNY", "INR", "SGD", "HKD", "MXN", "BRL", "ZAR"]>;
299
+ }, "strip", z.ZodTypeAny, {
300
+ amount: number;
301
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
302
+ }, {
303
+ amount: number;
304
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
305
+ }>>;
306
+ compareAtPrice: z.ZodOptional<z.ZodObject<{
307
+ amount: z.ZodNumber;
308
+ currency: z.ZodEnum<["USD", "EUR", "GBP", "AUD", "CAD", "NZD", "JPY", "CNY", "INR", "SGD", "HKD", "MXN", "BRL", "ZAR"]>;
309
+ }, "strip", z.ZodTypeAny, {
310
+ amount: number;
311
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
312
+ }, {
313
+ amount: number;
314
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
315
+ }>>;
316
+ inventory: z.ZodOptional<z.ZodObject<{
317
+ quantity: z.ZodNumber;
318
+ tracked: z.ZodBoolean;
319
+ allowBackorder: z.ZodOptional<z.ZodBoolean>;
320
+ }, "strip", z.ZodTypeAny, {
321
+ quantity: number;
322
+ tracked: boolean;
323
+ allowBackorder?: boolean | undefined;
324
+ }, {
325
+ quantity: number;
326
+ tracked: boolean;
327
+ allowBackorder?: boolean | undefined;
328
+ }>>;
329
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
330
+ image: z.ZodOptional<z.ZodObject<{
331
+ url: z.ZodString;
332
+ altText: z.ZodOptional<z.ZodString>;
333
+ sortOrder: z.ZodOptional<z.ZodNumber>;
334
+ isThumbnail: z.ZodOptional<z.ZodBoolean>;
335
+ }, "strip", z.ZodTypeAny, {
336
+ url: string;
337
+ altText?: string | undefined;
338
+ sortOrder?: number | undefined;
339
+ isThumbnail?: boolean | undefined;
340
+ }, {
341
+ url: string;
342
+ altText?: string | undefined;
343
+ sortOrder?: number | undefined;
344
+ isThumbnail?: boolean | undefined;
345
+ }>>;
346
+ isAvailable: z.ZodOptional<z.ZodBoolean>;
347
+ }, "strip", z.ZodTypeAny, {
348
+ id: string;
349
+ sku: string;
350
+ options?: Record<string, string> | undefined;
351
+ name?: string | undefined;
352
+ price?: {
353
+ amount: number;
354
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
355
+ } | undefined;
356
+ compareAtPrice?: {
357
+ amount: number;
358
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
359
+ } | undefined;
360
+ inventory?: {
361
+ quantity: number;
362
+ tracked: boolean;
363
+ allowBackorder?: boolean | undefined;
364
+ } | undefined;
365
+ image?: {
366
+ url: string;
367
+ altText?: string | undefined;
368
+ sortOrder?: number | undefined;
369
+ isThumbnail?: boolean | undefined;
370
+ } | undefined;
371
+ isAvailable?: boolean | undefined;
372
+ }, {
373
+ id: string;
374
+ sku: string;
375
+ options?: Record<string, string> | undefined;
376
+ name?: string | undefined;
377
+ price?: {
378
+ amount: number;
379
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
380
+ } | undefined;
381
+ compareAtPrice?: {
382
+ amount: number;
383
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
384
+ } | undefined;
385
+ inventory?: {
386
+ quantity: number;
387
+ tracked: boolean;
388
+ allowBackorder?: boolean | undefined;
389
+ } | undefined;
390
+ image?: {
391
+ url: string;
392
+ altText?: string | undefined;
393
+ sortOrder?: number | undefined;
394
+ isThumbnail?: boolean | undefined;
395
+ } | undefined;
396
+ isAvailable?: boolean | undefined;
397
+ }>, "many">>;
398
+ hasVariants: z.ZodOptional<z.ZodBoolean>;
399
+ seo: z.ZodOptional<z.ZodObject<{
400
+ title: z.ZodOptional<z.ZodString>;
401
+ description: z.ZodOptional<z.ZodString>;
402
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
403
+ }, "strip", z.ZodTypeAny, {
404
+ description?: string | undefined;
405
+ title?: string | undefined;
406
+ keywords?: string[] | undefined;
407
+ }, {
408
+ description?: string | undefined;
409
+ title?: string | undefined;
410
+ keywords?: string[] | undefined;
411
+ }>>;
412
+ requiresShipping: z.ZodOptional<z.ZodBoolean>;
413
+ freeShipping: z.ZodOptional<z.ZodBoolean>;
414
+ customFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
415
+ metadata: z.ZodObject<{
416
+ createdAt: z.ZodOptional<z.ZodString>;
417
+ updatedAt: z.ZodOptional<z.ZodString>;
418
+ source: z.ZodString;
419
+ sourceId: z.ZodString;
420
+ externalIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
421
+ }, "strip", z.ZodTypeAny, {
422
+ source: string;
423
+ sourceId: string;
424
+ createdAt?: string | undefined;
425
+ updatedAt?: string | undefined;
426
+ externalIds?: Record<string, string> | undefined;
427
+ }, {
428
+ source: string;
429
+ sourceId: string;
430
+ createdAt?: string | undefined;
431
+ updatedAt?: string | undefined;
432
+ externalIds?: Record<string, string> | undefined;
433
+ }>;
434
+ }, "strip", z.ZodTypeAny, {
435
+ id: string;
436
+ sku: string;
437
+ name: string;
438
+ price: {
439
+ amount: number;
440
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
441
+ };
442
+ inventory: {
443
+ quantity: number;
444
+ tracked: boolean;
445
+ allowBackorder?: boolean | undefined;
446
+ lowStockLevel?: number | undefined;
447
+ warningLevel?: number | undefined;
448
+ };
449
+ metadata: {
450
+ source: string;
451
+ sourceId: string;
452
+ createdAt?: string | undefined;
453
+ updatedAt?: string | undefined;
454
+ externalIds?: Record<string, string> | undefined;
455
+ };
456
+ compareAtPrice?: {
457
+ amount: number;
458
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
459
+ } | undefined;
460
+ description?: string | undefined;
461
+ shortDescription?: string | undefined;
462
+ costPrice?: {
463
+ amount: number;
464
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
465
+ } | undefined;
466
+ taxable?: boolean | undefined;
467
+ taxCode?: string | undefined;
468
+ weight?: {
469
+ value: number;
470
+ unit: "g" | "kg" | "oz" | "lb";
471
+ } | undefined;
472
+ dimensions?: {
473
+ length: number;
474
+ unit: "cm" | "m" | "in" | "ft";
475
+ width: number;
476
+ height: number;
477
+ } | undefined;
478
+ isVisible?: boolean | undefined;
479
+ availability?: "available" | "preorder" | "backorder" | "discontinued" | "out-of-stock" | undefined;
480
+ condition?: "new" | "refurbished" | "used" | undefined;
481
+ categories?: string[] | undefined;
482
+ brand?: string | undefined;
483
+ manufacturer?: string | undefined;
484
+ images?: {
485
+ url: string;
486
+ altText?: string | undefined;
487
+ sortOrder?: number | undefined;
488
+ isThumbnail?: boolean | undefined;
489
+ }[] | undefined;
490
+ variants?: {
491
+ id: string;
492
+ sku: string;
493
+ options?: Record<string, string> | undefined;
494
+ name?: string | undefined;
495
+ price?: {
496
+ amount: number;
497
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
498
+ } | undefined;
499
+ compareAtPrice?: {
500
+ amount: number;
501
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
502
+ } | undefined;
503
+ inventory?: {
504
+ quantity: number;
505
+ tracked: boolean;
506
+ allowBackorder?: boolean | undefined;
507
+ } | undefined;
508
+ image?: {
509
+ url: string;
510
+ altText?: string | undefined;
511
+ sortOrder?: number | undefined;
512
+ isThumbnail?: boolean | undefined;
513
+ } | undefined;
514
+ isAvailable?: boolean | undefined;
515
+ }[] | undefined;
516
+ hasVariants?: boolean | undefined;
517
+ seo?: {
518
+ description?: string | undefined;
519
+ title?: string | undefined;
520
+ keywords?: string[] | undefined;
521
+ } | undefined;
522
+ requiresShipping?: boolean | undefined;
523
+ freeShipping?: boolean | undefined;
524
+ customFields?: Record<string, any> | undefined;
525
+ }, {
526
+ id: string;
527
+ sku: string;
528
+ name: string;
529
+ price: {
530
+ amount: number;
531
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
532
+ };
533
+ inventory: {
534
+ quantity: number;
535
+ tracked: boolean;
536
+ allowBackorder?: boolean | undefined;
537
+ lowStockLevel?: number | undefined;
538
+ warningLevel?: number | undefined;
539
+ };
540
+ metadata: {
541
+ source: string;
542
+ sourceId: string;
543
+ createdAt?: string | undefined;
544
+ updatedAt?: string | undefined;
545
+ externalIds?: Record<string, string> | undefined;
546
+ };
547
+ compareAtPrice?: {
548
+ amount: number;
549
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
550
+ } | undefined;
551
+ description?: string | undefined;
552
+ shortDescription?: string | undefined;
553
+ costPrice?: {
554
+ amount: number;
555
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
556
+ } | undefined;
557
+ taxable?: boolean | undefined;
558
+ taxCode?: string | undefined;
559
+ weight?: {
560
+ value: number;
561
+ unit: "g" | "kg" | "oz" | "lb";
562
+ } | undefined;
563
+ dimensions?: {
564
+ length: number;
565
+ unit: "cm" | "m" | "in" | "ft";
566
+ width: number;
567
+ height: number;
568
+ } | undefined;
569
+ isVisible?: boolean | undefined;
570
+ availability?: "available" | "preorder" | "backorder" | "discontinued" | "out-of-stock" | undefined;
571
+ condition?: "new" | "refurbished" | "used" | undefined;
572
+ categories?: string[] | undefined;
573
+ brand?: string | undefined;
574
+ manufacturer?: string | undefined;
575
+ images?: {
576
+ url: string;
577
+ altText?: string | undefined;
578
+ sortOrder?: number | undefined;
579
+ isThumbnail?: boolean | undefined;
580
+ }[] | undefined;
581
+ variants?: {
582
+ id: string;
583
+ sku: string;
584
+ options?: Record<string, string> | undefined;
585
+ name?: string | undefined;
586
+ price?: {
587
+ amount: number;
588
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
589
+ } | undefined;
590
+ compareAtPrice?: {
591
+ amount: number;
592
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
593
+ } | undefined;
594
+ inventory?: {
595
+ quantity: number;
596
+ tracked: boolean;
597
+ allowBackorder?: boolean | undefined;
598
+ } | undefined;
599
+ image?: {
600
+ url: string;
601
+ altText?: string | undefined;
602
+ sortOrder?: number | undefined;
603
+ isThumbnail?: boolean | undefined;
604
+ } | undefined;
605
+ isAvailable?: boolean | undefined;
606
+ }[] | undefined;
607
+ hasVariants?: boolean | undefined;
608
+ seo?: {
609
+ description?: string | undefined;
610
+ title?: string | undefined;
611
+ keywords?: string[] | undefined;
612
+ } | undefined;
613
+ requiresShipping?: boolean | undefined;
614
+ freeShipping?: boolean | undefined;
615
+ customFields?: Record<string, any> | undefined;
616
+ }>;
617
+ export type CanonicalProduct = z.infer<typeof CanonicalProductSchema>;
618
+ /**
619
+ * Minimal product schema for simple operations
620
+ */
621
+ export declare const MinimalProductSchema: z.ZodObject<{
622
+ id: z.ZodString;
623
+ sku: z.ZodString;
624
+ name: z.ZodString;
625
+ price: z.ZodObject<{
626
+ amount: z.ZodNumber;
627
+ currency: z.ZodEnum<["USD", "EUR", "GBP", "AUD", "CAD", "NZD", "JPY", "CNY", "INR", "SGD", "HKD", "MXN", "BRL", "ZAR"]>;
628
+ }, "strip", z.ZodTypeAny, {
629
+ amount: number;
630
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
631
+ }, {
632
+ amount: number;
633
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
634
+ }>;
635
+ inventory: z.ZodObject<{
636
+ quantity: z.ZodNumber;
637
+ tracked: z.ZodBoolean;
638
+ }, "strip", z.ZodTypeAny, {
639
+ quantity: number;
640
+ tracked: boolean;
641
+ }, {
642
+ quantity: number;
643
+ tracked: boolean;
644
+ }>;
645
+ }, "strip", z.ZodTypeAny, {
646
+ id: string;
647
+ sku: string;
648
+ name: string;
649
+ price: {
650
+ amount: number;
651
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
652
+ };
653
+ inventory: {
654
+ quantity: number;
655
+ tracked: boolean;
656
+ };
657
+ }, {
658
+ id: string;
659
+ sku: string;
660
+ name: string;
661
+ price: {
662
+ amount: number;
663
+ currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
664
+ };
665
+ inventory: {
666
+ quantity: number;
667
+ tracked: boolean;
668
+ };
669
+ }>;
670
+ export type MinimalProduct = z.infer<typeof MinimalProductSchema>;
671
+ export declare const ProductHelper: {
672
+ /**
673
+ * Check if product is in stock
674
+ */
675
+ isInStock(product: CanonicalProduct): boolean;
676
+ /**
677
+ * Check if product is low stock
678
+ */
679
+ isLowStock(product: CanonicalProduct): boolean;
680
+ /**
681
+ * Get product display price (considering compare-at price)
682
+ */
683
+ getDisplayPrice(product: CanonicalProduct): {
684
+ price: Money;
685
+ isOnSale: boolean;
686
+ discount?: Money;
687
+ };
688
+ /**
689
+ * Get product thumbnail image
690
+ */
691
+ getThumbnail(product: CanonicalProduct): ProductImage | null;
692
+ /**
693
+ * Get variant by SKU
694
+ */
695
+ getVariantBySku(product: CanonicalProduct, sku: string): ProductVariant | null;
696
+ /**
697
+ * Get total inventory across all variants
698
+ */
699
+ getTotalInventory(product: CanonicalProduct): number;
700
+ /**
701
+ * Create a minimal product from full product
702
+ */
703
+ toMinimal(product: CanonicalProduct): MinimalProduct;
704
+ /**
705
+ * Check if product has valid price
706
+ */
707
+ hasValidPrice(product: CanonicalProduct): boolean;
708
+ /**
709
+ * Get product weight in kilograms (normalized)
710
+ */
711
+ getWeightInKg(product: CanonicalProduct): number | null;
712
+ /**
713
+ * Get product volume in cubic meters (normalized)
714
+ */
715
+ getVolumeInCubicMeters(product: CanonicalProduct): number | null;
716
+ };
717
+ //# sourceMappingURL=product.d.ts.map