continentept-mcp 0.6.0 → 0.7.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/CHANGELOG.md +42 -1
- package/README.md +4 -2
- package/dist/clients/storefront.d.ts +22 -3
- package/dist/clients/storefront.js +86 -45
- package/dist/domain/models.d.ts +599 -2
- package/dist/domain/models.js +102 -4
- package/dist/domain/money.d.ts +20 -0
- package/dist/domain/money.js +12 -0
- package/dist/mcp/contracts.d.ts +1704 -324
- package/dist/mcp/contracts.js +53 -4
- package/dist/mcp/guide.d.ts +2 -2
- package/dist/mcp/guide.js +5 -2
- package/dist/mcp/shopping.d.ts +16 -3
- package/dist/mcp/shopping.js +124 -21
- package/dist/parsers/cart.d.ts +12 -1
- package/dist/parsers/cart.js +40 -8
- package/dist/parsers/catalog.d.ts +13 -3
- package/dist/parsers/catalog.js +43 -15
- package/dist/parsers/label.d.ts +6 -0
- package/dist/parsers/label.js +79 -0
- package/dist/parsers/orders.d.ts +2 -0
- package/dist/parsers/orders.js +7 -4
- package/dist/parsers/package.d.ts +7 -0
- package/dist/parsers/package.js +91 -0
- package/dist/parsers/product.js +16 -4
- package/dist/ports.d.ts +14 -2
- package/dist/runtime.js +1 -1
- package/dist/services/cart.js +17 -2
- package/dist/services/catalog.d.ts +75 -5
- package/dist/services/catalog.js +141 -13
- package/dist/services/preview.d.ts +19 -0
- package/dist/services/preview.js +91 -0
- package/dist/services/updates.js +6 -2
- package/docs/tools.md +161 -15
- package/package.json +1 -1
- package/skills/basket-planner/SKILL.md +1 -1
package/dist/domain/models.d.ts
CHANGED
|
@@ -1,4 +1,40 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
/** Pack details parsed from the label; parts the label does not state are null. */
|
|
3
|
+
export declare const PackageSchema: z.ZodObject<{
|
|
4
|
+
count: z.ZodNullable<z.ZodNumber>;
|
|
5
|
+
each: z.ZodNullable<z.ZodObject<{
|
|
6
|
+
value: z.ZodNumber;
|
|
7
|
+
unit: z.ZodEnum<{
|
|
8
|
+
g: "g";
|
|
9
|
+
kg: "kg";
|
|
10
|
+
l: "l";
|
|
11
|
+
ml: "ml";
|
|
12
|
+
un: "un";
|
|
13
|
+
}>;
|
|
14
|
+
}, z.core.$strict>>;
|
|
15
|
+
net: z.ZodNullable<z.ZodObject<{
|
|
16
|
+
value: z.ZodNumber;
|
|
17
|
+
unit: z.ZodEnum<{
|
|
18
|
+
g: "g";
|
|
19
|
+
kg: "kg";
|
|
20
|
+
l: "l";
|
|
21
|
+
ml: "ml";
|
|
22
|
+
un: "un";
|
|
23
|
+
}>;
|
|
24
|
+
}, z.core.$strict>>;
|
|
25
|
+
drained: z.ZodNullable<z.ZodObject<{
|
|
26
|
+
value: z.ZodNumber;
|
|
27
|
+
unit: z.ZodEnum<{
|
|
28
|
+
g: "g";
|
|
29
|
+
kg: "kg";
|
|
30
|
+
l: "l";
|
|
31
|
+
ml: "ml";
|
|
32
|
+
un: "un";
|
|
33
|
+
}>;
|
|
34
|
+
}, z.core.$strict>>;
|
|
35
|
+
approximate: z.ZodBoolean;
|
|
36
|
+
}, z.core.$strict>;
|
|
37
|
+
export type Package = z.infer<typeof PackageSchema>;
|
|
2
38
|
export declare const FavoriteProductSchema: z.ZodObject<{
|
|
3
39
|
productId: z.core.$ZodBranded<z.ZodString, "ProductId", "out">;
|
|
4
40
|
productSlug: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "ProductSlug", "out">>;
|
|
@@ -35,6 +71,42 @@ export declare const ProductSchema: z.ZodObject<{
|
|
|
35
71
|
}>;
|
|
36
72
|
}, z.core.$strict>>;
|
|
37
73
|
url: z.ZodURL;
|
|
74
|
+
packageText: z.ZodNullable<z.ZodString>;
|
|
75
|
+
package: z.ZodNullable<z.ZodObject<{
|
|
76
|
+
count: z.ZodNullable<z.ZodNumber>;
|
|
77
|
+
each: z.ZodNullable<z.ZodObject<{
|
|
78
|
+
value: z.ZodNumber;
|
|
79
|
+
unit: z.ZodEnum<{
|
|
80
|
+
g: "g";
|
|
81
|
+
kg: "kg";
|
|
82
|
+
l: "l";
|
|
83
|
+
ml: "ml";
|
|
84
|
+
un: "un";
|
|
85
|
+
}>;
|
|
86
|
+
}, z.core.$strict>>;
|
|
87
|
+
net: z.ZodNullable<z.ZodObject<{
|
|
88
|
+
value: z.ZodNumber;
|
|
89
|
+
unit: z.ZodEnum<{
|
|
90
|
+
g: "g";
|
|
91
|
+
kg: "kg";
|
|
92
|
+
l: "l";
|
|
93
|
+
ml: "ml";
|
|
94
|
+
un: "un";
|
|
95
|
+
}>;
|
|
96
|
+
}, z.core.$strict>>;
|
|
97
|
+
drained: z.ZodNullable<z.ZodObject<{
|
|
98
|
+
value: z.ZodNumber;
|
|
99
|
+
unit: z.ZodEnum<{
|
|
100
|
+
g: "g";
|
|
101
|
+
kg: "kg";
|
|
102
|
+
l: "l";
|
|
103
|
+
ml: "ml";
|
|
104
|
+
un: "un";
|
|
105
|
+
}>;
|
|
106
|
+
}, z.core.$strict>>;
|
|
107
|
+
approximate: z.ZodBoolean;
|
|
108
|
+
}, z.core.$strict>>;
|
|
109
|
+
minimumText: z.ZodNullable<z.ZodString>;
|
|
38
110
|
secondaryPrice: z.ZodNullable<z.ZodObject<{
|
|
39
111
|
amount: z.ZodObject<{
|
|
40
112
|
currency: z.ZodLiteral<"EUR">;
|
|
@@ -47,7 +119,6 @@ export declare const ProductSchema: z.ZodObject<{
|
|
|
47
119
|
piece: "piece";
|
|
48
120
|
}>;
|
|
49
121
|
}, z.core.$strict>>;
|
|
50
|
-
packageText: z.ZodNullable<z.ZodString>;
|
|
51
122
|
recommendedPrice: z.ZodNullable<z.ZodObject<{
|
|
52
123
|
amount: z.ZodObject<{
|
|
53
124
|
currency: z.ZodLiteral<"EUR">;
|
|
@@ -60,7 +131,25 @@ export declare const ProductSchema: z.ZodObject<{
|
|
|
60
131
|
piece: "piece";
|
|
61
132
|
}>;
|
|
62
133
|
}, z.core.$strict>>;
|
|
63
|
-
|
|
134
|
+
availability: z.ZodEnum<{
|
|
135
|
+
available: "available";
|
|
136
|
+
unavailable: "unavailable";
|
|
137
|
+
unknown: "unknown";
|
|
138
|
+
}>;
|
|
139
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
140
|
+
category: z.ZodNullable<z.ZodString>;
|
|
141
|
+
drainedPrice: z.ZodNullable<z.ZodObject<{
|
|
142
|
+
amount: z.ZodObject<{
|
|
143
|
+
currency: z.ZodLiteral<"EUR">;
|
|
144
|
+
minorUnits: z.ZodNumber;
|
|
145
|
+
}, z.core.$strict>;
|
|
146
|
+
per: z.ZodEnum<{
|
|
147
|
+
item: "item";
|
|
148
|
+
kg: "kg";
|
|
149
|
+
l: "l";
|
|
150
|
+
piece: "piece";
|
|
151
|
+
}>;
|
|
152
|
+
}, z.core.$strict>>;
|
|
64
153
|
}, z.core.$strict>;
|
|
65
154
|
export type Product = z.infer<typeof ProductSchema>;
|
|
66
155
|
export declare const CartItemSchema: z.ZodObject<{
|
|
@@ -94,6 +183,16 @@ export declare const CartItemSchema: z.ZodObject<{
|
|
|
94
183
|
unsupported_unit: "unsupported_unit";
|
|
95
184
|
}>>;
|
|
96
185
|
}, z.core.$strict>], "status">;
|
|
186
|
+
storefrontQuantity: z.ZodNullable<z.ZodObject<{
|
|
187
|
+
value: z.ZodNumber;
|
|
188
|
+
unit: z.ZodEnum<{
|
|
189
|
+
g: "g";
|
|
190
|
+
kg: "kg";
|
|
191
|
+
l: "l";
|
|
192
|
+
ml: "ml";
|
|
193
|
+
un: "un";
|
|
194
|
+
}>;
|
|
195
|
+
}, z.core.$strict>>;
|
|
97
196
|
price: z.ZodNullable<z.ZodObject<{
|
|
98
197
|
amount: z.ZodObject<{
|
|
99
198
|
currency: z.ZodLiteral<"EUR">;
|
|
@@ -110,6 +209,7 @@ export declare const CartItemSchema: z.ZodObject<{
|
|
|
110
209
|
currency: z.ZodLiteral<"EUR">;
|
|
111
210
|
minorUnits: z.ZodNumber;
|
|
112
211
|
}, z.core.$strict>>;
|
|
212
|
+
estimated: z.ZodBoolean;
|
|
113
213
|
}, z.core.$strict>;
|
|
114
214
|
export type CartItem = z.infer<typeof CartItemSchema>;
|
|
115
215
|
/** Each amount as the website reports it, or null when it reports none. */
|
|
@@ -138,6 +238,7 @@ export declare const CartTotalsSchema: z.ZodObject<{
|
|
|
138
238
|
currency: z.ZodLiteral<"EUR">;
|
|
139
239
|
minorUnits: z.ZodNumber;
|
|
140
240
|
}, z.core.$strict>>;
|
|
241
|
+
estimated: z.ZodBoolean;
|
|
141
242
|
}, z.core.$strict>;
|
|
142
243
|
export type CartTotals = z.infer<typeof CartTotalsSchema>;
|
|
143
244
|
export declare const CartSchema: z.ZodObject<{
|
|
@@ -173,6 +274,16 @@ export declare const CartSchema: z.ZodObject<{
|
|
|
173
274
|
unsupported_unit: "unsupported_unit";
|
|
174
275
|
}>>;
|
|
175
276
|
}, z.core.$strict>], "status">;
|
|
277
|
+
storefrontQuantity: z.ZodNullable<z.ZodObject<{
|
|
278
|
+
value: z.ZodNumber;
|
|
279
|
+
unit: z.ZodEnum<{
|
|
280
|
+
g: "g";
|
|
281
|
+
kg: "kg";
|
|
282
|
+
l: "l";
|
|
283
|
+
ml: "ml";
|
|
284
|
+
un: "un";
|
|
285
|
+
}>;
|
|
286
|
+
}, z.core.$strict>>;
|
|
176
287
|
price: z.ZodNullable<z.ZodObject<{
|
|
177
288
|
amount: z.ZodObject<{
|
|
178
289
|
currency: z.ZodLiteral<"EUR">;
|
|
@@ -189,6 +300,7 @@ export declare const CartSchema: z.ZodObject<{
|
|
|
189
300
|
currency: z.ZodLiteral<"EUR">;
|
|
190
301
|
minorUnits: z.ZodNumber;
|
|
191
302
|
}, z.core.$strict>>;
|
|
303
|
+
estimated: z.ZodBoolean;
|
|
192
304
|
}, z.core.$strict>>;
|
|
193
305
|
totals: z.ZodObject<{
|
|
194
306
|
products: z.ZodNullable<z.ZodObject<{
|
|
@@ -215,6 +327,7 @@ export declare const CartSchema: z.ZodObject<{
|
|
|
215
327
|
currency: z.ZodLiteral<"EUR">;
|
|
216
328
|
minorUnits: z.ZodNumber;
|
|
217
329
|
}, z.core.$strict>>;
|
|
330
|
+
estimated: z.ZodBoolean;
|
|
218
331
|
}, z.core.$strict>;
|
|
219
332
|
}, z.core.$strict>;
|
|
220
333
|
export type Cart = z.infer<typeof CartSchema>;
|
|
@@ -362,6 +475,42 @@ export type FavoritesCache = z.infer<typeof FavoritesCacheSchema>;
|
|
|
362
475
|
export declare const ProductDetailsSchema: z.ZodObject<{
|
|
363
476
|
productId: z.core.$ZodBranded<z.ZodString, "ProductId", "out">;
|
|
364
477
|
productSlug: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "ProductSlug", "out">>;
|
|
478
|
+
packageText: z.ZodNullable<z.ZodString>;
|
|
479
|
+
package: z.ZodNullable<z.ZodObject<{
|
|
480
|
+
count: z.ZodNullable<z.ZodNumber>;
|
|
481
|
+
each: z.ZodNullable<z.ZodObject<{
|
|
482
|
+
value: z.ZodNumber;
|
|
483
|
+
unit: z.ZodEnum<{
|
|
484
|
+
g: "g";
|
|
485
|
+
kg: "kg";
|
|
486
|
+
l: "l";
|
|
487
|
+
ml: "ml";
|
|
488
|
+
un: "un";
|
|
489
|
+
}>;
|
|
490
|
+
}, z.core.$strict>>;
|
|
491
|
+
net: z.ZodNullable<z.ZodObject<{
|
|
492
|
+
value: z.ZodNumber;
|
|
493
|
+
unit: z.ZodEnum<{
|
|
494
|
+
g: "g";
|
|
495
|
+
kg: "kg";
|
|
496
|
+
l: "l";
|
|
497
|
+
ml: "ml";
|
|
498
|
+
un: "un";
|
|
499
|
+
}>;
|
|
500
|
+
}, z.core.$strict>>;
|
|
501
|
+
drained: z.ZodNullable<z.ZodObject<{
|
|
502
|
+
value: z.ZodNumber;
|
|
503
|
+
unit: z.ZodEnum<{
|
|
504
|
+
g: "g";
|
|
505
|
+
kg: "kg";
|
|
506
|
+
l: "l";
|
|
507
|
+
ml: "ml";
|
|
508
|
+
un: "un";
|
|
509
|
+
}>;
|
|
510
|
+
}, z.core.$strict>>;
|
|
511
|
+
approximate: z.ZodBoolean;
|
|
512
|
+
}, z.core.$strict>>;
|
|
513
|
+
minimumText: z.ZodNullable<z.ZodString>;
|
|
365
514
|
name: z.ZodString;
|
|
366
515
|
url: z.ZodURL;
|
|
367
516
|
price: z.ZodNullable<z.ZodObject<{
|
|
@@ -400,6 +549,18 @@ export declare const ProductDetailsSchema: z.ZodObject<{
|
|
|
400
549
|
piece: "piece";
|
|
401
550
|
}>;
|
|
402
551
|
}, z.core.$strict>>;
|
|
552
|
+
drainedPrice: z.ZodNullable<z.ZodObject<{
|
|
553
|
+
amount: z.ZodObject<{
|
|
554
|
+
currency: z.ZodLiteral<"EUR">;
|
|
555
|
+
minorUnits: z.ZodNumber;
|
|
556
|
+
}, z.core.$strict>;
|
|
557
|
+
per: z.ZodEnum<{
|
|
558
|
+
item: "item";
|
|
559
|
+
kg: "kg";
|
|
560
|
+
l: "l";
|
|
561
|
+
piece: "piece";
|
|
562
|
+
}>;
|
|
563
|
+
}, z.core.$strict>>;
|
|
403
564
|
availability: z.ZodEnum<{
|
|
404
565
|
available: "available";
|
|
405
566
|
unavailable: "unavailable";
|
|
@@ -485,3 +646,439 @@ export declare const ProductDetailsSchema: z.ZodObject<{
|
|
|
485
646
|
}, z.core.$strict>], "status">;
|
|
486
647
|
}, z.core.$strict>;
|
|
487
648
|
export type ProductDetails = z.infer<typeof ProductDetailsSchema>;
|
|
649
|
+
/** One nutrient as the label gives it, per `nutrition.per`. */
|
|
650
|
+
export declare const NutrientSchema: z.ZodObject<{
|
|
651
|
+
name: z.ZodString;
|
|
652
|
+
key: z.ZodNullable<z.ZodEnum<{
|
|
653
|
+
carbohydrates: "carbohydrates";
|
|
654
|
+
energy_kcal: "energy_kcal";
|
|
655
|
+
energy_kj: "energy_kj";
|
|
656
|
+
fat: "fat";
|
|
657
|
+
fibre: "fibre";
|
|
658
|
+
protein: "protein";
|
|
659
|
+
salt: "salt";
|
|
660
|
+
saturated_fat: "saturated_fat";
|
|
661
|
+
sugars: "sugars";
|
|
662
|
+
}>>;
|
|
663
|
+
amount: z.ZodNumber;
|
|
664
|
+
unit: z.ZodString;
|
|
665
|
+
}, z.core.$strict>;
|
|
666
|
+
/** What the website's copy of a product label declares. Nothing is inferred; the packaging prevails. */
|
|
667
|
+
export declare const ProductLabelSchema: z.ZodObject<{
|
|
668
|
+
regulatedName: z.ZodNullable<z.ZodString>;
|
|
669
|
+
ingredients: z.ZodNullable<z.ZodString>;
|
|
670
|
+
emphasised: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
671
|
+
allergenStatement: z.ZodNullable<z.ZodString>;
|
|
672
|
+
mayContain: z.ZodNullable<z.ZodString>;
|
|
673
|
+
storage: z.ZodNullable<z.ZodString>;
|
|
674
|
+
nutrition: z.ZodNullable<z.ZodObject<{
|
|
675
|
+
per: z.ZodNullable<z.ZodObject<{
|
|
676
|
+
value: z.ZodNumber;
|
|
677
|
+
unit: z.ZodEnum<{
|
|
678
|
+
g: "g";
|
|
679
|
+
kg: "kg";
|
|
680
|
+
l: "l";
|
|
681
|
+
ml: "ml";
|
|
682
|
+
un: "un";
|
|
683
|
+
}>;
|
|
684
|
+
}, z.core.$strict>>;
|
|
685
|
+
nutrients: z.ZodArray<z.ZodObject<{
|
|
686
|
+
name: z.ZodString;
|
|
687
|
+
key: z.ZodNullable<z.ZodEnum<{
|
|
688
|
+
carbohydrates: "carbohydrates";
|
|
689
|
+
energy_kcal: "energy_kcal";
|
|
690
|
+
energy_kj: "energy_kj";
|
|
691
|
+
fat: "fat";
|
|
692
|
+
fibre: "fibre";
|
|
693
|
+
protein: "protein";
|
|
694
|
+
salt: "salt";
|
|
695
|
+
saturated_fat: "saturated_fat";
|
|
696
|
+
sugars: "sugars";
|
|
697
|
+
}>>;
|
|
698
|
+
amount: z.ZodNumber;
|
|
699
|
+
unit: z.ZodString;
|
|
700
|
+
}, z.core.$strict>>;
|
|
701
|
+
}, z.core.$strict>>;
|
|
702
|
+
}, z.core.$strict>;
|
|
703
|
+
export type ProductLabel = z.infer<typeof ProductLabelSchema>;
|
|
704
|
+
/** One requested line of a basket preview: what the cart holds, what would change and what it would cost. */
|
|
705
|
+
export declare const BasketPreviewLineSchema: z.ZodObject<{
|
|
706
|
+
productId: z.core.$ZodBranded<z.ZodString, "ProductId", "out">;
|
|
707
|
+
cartItemId: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CartItemId", "out">>;
|
|
708
|
+
name: z.ZodNullable<z.ZodString>;
|
|
709
|
+
requested: z.ZodNullable<z.ZodObject<{
|
|
710
|
+
value: z.ZodNumber;
|
|
711
|
+
unit: z.ZodEnum<{
|
|
712
|
+
g: "g";
|
|
713
|
+
kg: "kg";
|
|
714
|
+
l: "l";
|
|
715
|
+
ml: "ml";
|
|
716
|
+
un: "un";
|
|
717
|
+
}>;
|
|
718
|
+
}, z.core.$strict>>;
|
|
719
|
+
storefrontQuantity: z.ZodNullable<z.ZodObject<{
|
|
720
|
+
value: z.ZodNumber;
|
|
721
|
+
unit: z.ZodEnum<{
|
|
722
|
+
g: "g";
|
|
723
|
+
kg: "kg";
|
|
724
|
+
l: "l";
|
|
725
|
+
ml: "ml";
|
|
726
|
+
un: "un";
|
|
727
|
+
}>;
|
|
728
|
+
}, z.core.$strict>>;
|
|
729
|
+
current: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
730
|
+
status: z.ZodLiteral<"known">;
|
|
731
|
+
quantity: z.ZodObject<{
|
|
732
|
+
value: z.ZodNumber;
|
|
733
|
+
unit: z.ZodEnum<{
|
|
734
|
+
g: "g";
|
|
735
|
+
kg: "kg";
|
|
736
|
+
l: "l";
|
|
737
|
+
ml: "ml";
|
|
738
|
+
un: "un";
|
|
739
|
+
}>;
|
|
740
|
+
}, z.core.$strict>;
|
|
741
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
742
|
+
status: z.ZodLiteral<"unknown">;
|
|
743
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
744
|
+
rawText: z.ZodNullable<z.ZodString>;
|
|
745
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
746
|
+
invalid_value: "invalid_value";
|
|
747
|
+
missing: "missing";
|
|
748
|
+
unrecognized_format: "unrecognized_format";
|
|
749
|
+
unsupported_unit: "unsupported_unit";
|
|
750
|
+
}>>;
|
|
751
|
+
}, z.core.$strict>], "status">;
|
|
752
|
+
change: z.ZodNullable<z.ZodEnum<{
|
|
753
|
+
add: "add";
|
|
754
|
+
decrease: "decrease";
|
|
755
|
+
increase: "increase";
|
|
756
|
+
none: "none";
|
|
757
|
+
remove: "remove";
|
|
758
|
+
}>>;
|
|
759
|
+
availability: z.ZodNullable<z.ZodEnum<{
|
|
760
|
+
available: "available";
|
|
761
|
+
unavailable: "unavailable";
|
|
762
|
+
unknown: "unknown";
|
|
763
|
+
}>>;
|
|
764
|
+
price: z.ZodNullable<z.ZodObject<{
|
|
765
|
+
amount: z.ZodObject<{
|
|
766
|
+
currency: z.ZodLiteral<"EUR">;
|
|
767
|
+
minorUnits: z.ZodNumber;
|
|
768
|
+
}, z.core.$strict>;
|
|
769
|
+
per: z.ZodEnum<{
|
|
770
|
+
item: "item";
|
|
771
|
+
kg: "kg";
|
|
772
|
+
l: "l";
|
|
773
|
+
piece: "piece";
|
|
774
|
+
}>;
|
|
775
|
+
}, z.core.$strict>>;
|
|
776
|
+
packageText: z.ZodNullable<z.ZodString>;
|
|
777
|
+
package: z.ZodNullable<z.ZodObject<{
|
|
778
|
+
count: z.ZodNullable<z.ZodNumber>;
|
|
779
|
+
each: z.ZodNullable<z.ZodObject<{
|
|
780
|
+
value: z.ZodNumber;
|
|
781
|
+
unit: z.ZodEnum<{
|
|
782
|
+
g: "g";
|
|
783
|
+
kg: "kg";
|
|
784
|
+
l: "l";
|
|
785
|
+
ml: "ml";
|
|
786
|
+
un: "un";
|
|
787
|
+
}>;
|
|
788
|
+
}, z.core.$strict>>;
|
|
789
|
+
net: z.ZodNullable<z.ZodObject<{
|
|
790
|
+
value: z.ZodNumber;
|
|
791
|
+
unit: z.ZodEnum<{
|
|
792
|
+
g: "g";
|
|
793
|
+
kg: "kg";
|
|
794
|
+
l: "l";
|
|
795
|
+
ml: "ml";
|
|
796
|
+
un: "un";
|
|
797
|
+
}>;
|
|
798
|
+
}, z.core.$strict>>;
|
|
799
|
+
drained: z.ZodNullable<z.ZodObject<{
|
|
800
|
+
value: z.ZodNumber;
|
|
801
|
+
unit: z.ZodEnum<{
|
|
802
|
+
g: "g";
|
|
803
|
+
kg: "kg";
|
|
804
|
+
l: "l";
|
|
805
|
+
ml: "ml";
|
|
806
|
+
un: "un";
|
|
807
|
+
}>;
|
|
808
|
+
}, z.core.$strict>>;
|
|
809
|
+
approximate: z.ZodBoolean;
|
|
810
|
+
}, z.core.$strict>>;
|
|
811
|
+
saleRules: z.ZodNullable<z.ZodObject<{
|
|
812
|
+
saleUnit: z.ZodEnum<{
|
|
813
|
+
g: "g";
|
|
814
|
+
kg: "kg";
|
|
815
|
+
l: "l";
|
|
816
|
+
ml: "ml";
|
|
817
|
+
un: "un";
|
|
818
|
+
}>;
|
|
819
|
+
storefrontUnit: z.ZodEnum<{
|
|
820
|
+
g: "g";
|
|
821
|
+
kg: "kg";
|
|
822
|
+
l: "l";
|
|
823
|
+
ml: "ml";
|
|
824
|
+
un: "un";
|
|
825
|
+
}>;
|
|
826
|
+
storefrontUnitsPerSaleUnit: z.ZodNumber;
|
|
827
|
+
minimum: z.ZodNullable<z.ZodObject<{
|
|
828
|
+
value: z.ZodNumber;
|
|
829
|
+
unit: z.ZodEnum<{
|
|
830
|
+
g: "g";
|
|
831
|
+
kg: "kg";
|
|
832
|
+
l: "l";
|
|
833
|
+
ml: "ml";
|
|
834
|
+
un: "un";
|
|
835
|
+
}>;
|
|
836
|
+
}, z.core.$strict>>;
|
|
837
|
+
maximum: z.ZodNullable<z.ZodObject<{
|
|
838
|
+
value: z.ZodNumber;
|
|
839
|
+
unit: z.ZodEnum<{
|
|
840
|
+
g: "g";
|
|
841
|
+
kg: "kg";
|
|
842
|
+
l: "l";
|
|
843
|
+
ml: "ml";
|
|
844
|
+
un: "un";
|
|
845
|
+
}>;
|
|
846
|
+
}, z.core.$strict>>;
|
|
847
|
+
step: z.ZodNullable<z.ZodObject<{
|
|
848
|
+
value: z.ZodNumber;
|
|
849
|
+
unit: z.ZodEnum<{
|
|
850
|
+
g: "g";
|
|
851
|
+
kg: "kg";
|
|
852
|
+
l: "l";
|
|
853
|
+
ml: "ml";
|
|
854
|
+
un: "un";
|
|
855
|
+
}>;
|
|
856
|
+
}, z.core.$strict>>;
|
|
857
|
+
}, z.core.$strict>>;
|
|
858
|
+
estimatedCost: z.ZodNullable<z.ZodObject<{
|
|
859
|
+
currency: z.ZodLiteral<"EUR">;
|
|
860
|
+
minorUnits: z.ZodNumber;
|
|
861
|
+
}, z.core.$strict>>;
|
|
862
|
+
estimated: z.ZodBoolean;
|
|
863
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
864
|
+
code: z.ZodEnum<{
|
|
865
|
+
browser_unavailable: "browser_unavailable";
|
|
866
|
+
cache_unavailable: "cache_unavailable";
|
|
867
|
+
cancelled: "cancelled";
|
|
868
|
+
cart_change_rejected: "cart_change_rejected";
|
|
869
|
+
cart_change_unconfirmed: "cart_change_unconfirmed";
|
|
870
|
+
deadline_exceeded: "deadline_exceeded";
|
|
871
|
+
invalid_data: "invalid_data";
|
|
872
|
+
invalid_input: "invalid_input";
|
|
873
|
+
not_authenticated: "not_authenticated";
|
|
874
|
+
not_found: "not_found";
|
|
875
|
+
order_details_unavailable: "order_details_unavailable";
|
|
876
|
+
quantity_below_minimum: "quantity_below_minimum";
|
|
877
|
+
queue_full: "queue_full";
|
|
878
|
+
sale_rules_unknown: "sale_rules_unknown";
|
|
879
|
+
server_closed: "server_closed";
|
|
880
|
+
upstream_unavailable: "upstream_unavailable";
|
|
881
|
+
}>;
|
|
882
|
+
message: z.ZodString;
|
|
883
|
+
retryable: z.ZodBoolean;
|
|
884
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
885
|
+
path: z.ZodString;
|
|
886
|
+
code: z.ZodString;
|
|
887
|
+
}, z.core.$strict>>>;
|
|
888
|
+
}, z.core.$strict>>;
|
|
889
|
+
}, z.core.$strict>;
|
|
890
|
+
export type BasketPreviewLine = z.infer<typeof BasketPreviewLineSchema>;
|
|
891
|
+
export declare const BasketPreviewSchema: z.ZodObject<{
|
|
892
|
+
lines: z.ZodArray<z.ZodObject<{
|
|
893
|
+
productId: z.core.$ZodBranded<z.ZodString, "ProductId", "out">;
|
|
894
|
+
cartItemId: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CartItemId", "out">>;
|
|
895
|
+
name: z.ZodNullable<z.ZodString>;
|
|
896
|
+
requested: z.ZodNullable<z.ZodObject<{
|
|
897
|
+
value: z.ZodNumber;
|
|
898
|
+
unit: z.ZodEnum<{
|
|
899
|
+
g: "g";
|
|
900
|
+
kg: "kg";
|
|
901
|
+
l: "l";
|
|
902
|
+
ml: "ml";
|
|
903
|
+
un: "un";
|
|
904
|
+
}>;
|
|
905
|
+
}, z.core.$strict>>;
|
|
906
|
+
storefrontQuantity: z.ZodNullable<z.ZodObject<{
|
|
907
|
+
value: z.ZodNumber;
|
|
908
|
+
unit: z.ZodEnum<{
|
|
909
|
+
g: "g";
|
|
910
|
+
kg: "kg";
|
|
911
|
+
l: "l";
|
|
912
|
+
ml: "ml";
|
|
913
|
+
un: "un";
|
|
914
|
+
}>;
|
|
915
|
+
}, z.core.$strict>>;
|
|
916
|
+
current: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
917
|
+
status: z.ZodLiteral<"known">;
|
|
918
|
+
quantity: z.ZodObject<{
|
|
919
|
+
value: z.ZodNumber;
|
|
920
|
+
unit: z.ZodEnum<{
|
|
921
|
+
g: "g";
|
|
922
|
+
kg: "kg";
|
|
923
|
+
l: "l";
|
|
924
|
+
ml: "ml";
|
|
925
|
+
un: "un";
|
|
926
|
+
}>;
|
|
927
|
+
}, z.core.$strict>;
|
|
928
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
929
|
+
status: z.ZodLiteral<"unknown">;
|
|
930
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
931
|
+
rawText: z.ZodNullable<z.ZodString>;
|
|
932
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
933
|
+
invalid_value: "invalid_value";
|
|
934
|
+
missing: "missing";
|
|
935
|
+
unrecognized_format: "unrecognized_format";
|
|
936
|
+
unsupported_unit: "unsupported_unit";
|
|
937
|
+
}>>;
|
|
938
|
+
}, z.core.$strict>], "status">;
|
|
939
|
+
change: z.ZodNullable<z.ZodEnum<{
|
|
940
|
+
add: "add";
|
|
941
|
+
decrease: "decrease";
|
|
942
|
+
increase: "increase";
|
|
943
|
+
none: "none";
|
|
944
|
+
remove: "remove";
|
|
945
|
+
}>>;
|
|
946
|
+
availability: z.ZodNullable<z.ZodEnum<{
|
|
947
|
+
available: "available";
|
|
948
|
+
unavailable: "unavailable";
|
|
949
|
+
unknown: "unknown";
|
|
950
|
+
}>>;
|
|
951
|
+
price: z.ZodNullable<z.ZodObject<{
|
|
952
|
+
amount: z.ZodObject<{
|
|
953
|
+
currency: z.ZodLiteral<"EUR">;
|
|
954
|
+
minorUnits: z.ZodNumber;
|
|
955
|
+
}, z.core.$strict>;
|
|
956
|
+
per: z.ZodEnum<{
|
|
957
|
+
item: "item";
|
|
958
|
+
kg: "kg";
|
|
959
|
+
l: "l";
|
|
960
|
+
piece: "piece";
|
|
961
|
+
}>;
|
|
962
|
+
}, z.core.$strict>>;
|
|
963
|
+
packageText: z.ZodNullable<z.ZodString>;
|
|
964
|
+
package: z.ZodNullable<z.ZodObject<{
|
|
965
|
+
count: z.ZodNullable<z.ZodNumber>;
|
|
966
|
+
each: z.ZodNullable<z.ZodObject<{
|
|
967
|
+
value: z.ZodNumber;
|
|
968
|
+
unit: z.ZodEnum<{
|
|
969
|
+
g: "g";
|
|
970
|
+
kg: "kg";
|
|
971
|
+
l: "l";
|
|
972
|
+
ml: "ml";
|
|
973
|
+
un: "un";
|
|
974
|
+
}>;
|
|
975
|
+
}, z.core.$strict>>;
|
|
976
|
+
net: z.ZodNullable<z.ZodObject<{
|
|
977
|
+
value: z.ZodNumber;
|
|
978
|
+
unit: z.ZodEnum<{
|
|
979
|
+
g: "g";
|
|
980
|
+
kg: "kg";
|
|
981
|
+
l: "l";
|
|
982
|
+
ml: "ml";
|
|
983
|
+
un: "un";
|
|
984
|
+
}>;
|
|
985
|
+
}, z.core.$strict>>;
|
|
986
|
+
drained: z.ZodNullable<z.ZodObject<{
|
|
987
|
+
value: z.ZodNumber;
|
|
988
|
+
unit: z.ZodEnum<{
|
|
989
|
+
g: "g";
|
|
990
|
+
kg: "kg";
|
|
991
|
+
l: "l";
|
|
992
|
+
ml: "ml";
|
|
993
|
+
un: "un";
|
|
994
|
+
}>;
|
|
995
|
+
}, z.core.$strict>>;
|
|
996
|
+
approximate: z.ZodBoolean;
|
|
997
|
+
}, z.core.$strict>>;
|
|
998
|
+
saleRules: z.ZodNullable<z.ZodObject<{
|
|
999
|
+
saleUnit: z.ZodEnum<{
|
|
1000
|
+
g: "g";
|
|
1001
|
+
kg: "kg";
|
|
1002
|
+
l: "l";
|
|
1003
|
+
ml: "ml";
|
|
1004
|
+
un: "un";
|
|
1005
|
+
}>;
|
|
1006
|
+
storefrontUnit: z.ZodEnum<{
|
|
1007
|
+
g: "g";
|
|
1008
|
+
kg: "kg";
|
|
1009
|
+
l: "l";
|
|
1010
|
+
ml: "ml";
|
|
1011
|
+
un: "un";
|
|
1012
|
+
}>;
|
|
1013
|
+
storefrontUnitsPerSaleUnit: z.ZodNumber;
|
|
1014
|
+
minimum: z.ZodNullable<z.ZodObject<{
|
|
1015
|
+
value: z.ZodNumber;
|
|
1016
|
+
unit: z.ZodEnum<{
|
|
1017
|
+
g: "g";
|
|
1018
|
+
kg: "kg";
|
|
1019
|
+
l: "l";
|
|
1020
|
+
ml: "ml";
|
|
1021
|
+
un: "un";
|
|
1022
|
+
}>;
|
|
1023
|
+
}, z.core.$strict>>;
|
|
1024
|
+
maximum: z.ZodNullable<z.ZodObject<{
|
|
1025
|
+
value: z.ZodNumber;
|
|
1026
|
+
unit: z.ZodEnum<{
|
|
1027
|
+
g: "g";
|
|
1028
|
+
kg: "kg";
|
|
1029
|
+
l: "l";
|
|
1030
|
+
ml: "ml";
|
|
1031
|
+
un: "un";
|
|
1032
|
+
}>;
|
|
1033
|
+
}, z.core.$strict>>;
|
|
1034
|
+
step: z.ZodNullable<z.ZodObject<{
|
|
1035
|
+
value: z.ZodNumber;
|
|
1036
|
+
unit: z.ZodEnum<{
|
|
1037
|
+
g: "g";
|
|
1038
|
+
kg: "kg";
|
|
1039
|
+
l: "l";
|
|
1040
|
+
ml: "ml";
|
|
1041
|
+
un: "un";
|
|
1042
|
+
}>;
|
|
1043
|
+
}, z.core.$strict>>;
|
|
1044
|
+
}, z.core.$strict>>;
|
|
1045
|
+
estimatedCost: z.ZodNullable<z.ZodObject<{
|
|
1046
|
+
currency: z.ZodLiteral<"EUR">;
|
|
1047
|
+
minorUnits: z.ZodNumber;
|
|
1048
|
+
}, z.core.$strict>>;
|
|
1049
|
+
estimated: z.ZodBoolean;
|
|
1050
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
1051
|
+
code: z.ZodEnum<{
|
|
1052
|
+
browser_unavailable: "browser_unavailable";
|
|
1053
|
+
cache_unavailable: "cache_unavailable";
|
|
1054
|
+
cancelled: "cancelled";
|
|
1055
|
+
cart_change_rejected: "cart_change_rejected";
|
|
1056
|
+
cart_change_unconfirmed: "cart_change_unconfirmed";
|
|
1057
|
+
deadline_exceeded: "deadline_exceeded";
|
|
1058
|
+
invalid_data: "invalid_data";
|
|
1059
|
+
invalid_input: "invalid_input";
|
|
1060
|
+
not_authenticated: "not_authenticated";
|
|
1061
|
+
not_found: "not_found";
|
|
1062
|
+
order_details_unavailable: "order_details_unavailable";
|
|
1063
|
+
quantity_below_minimum: "quantity_below_minimum";
|
|
1064
|
+
queue_full: "queue_full";
|
|
1065
|
+
sale_rules_unknown: "sale_rules_unknown";
|
|
1066
|
+
server_closed: "server_closed";
|
|
1067
|
+
upstream_unavailable: "upstream_unavailable";
|
|
1068
|
+
}>;
|
|
1069
|
+
message: z.ZodString;
|
|
1070
|
+
retryable: z.ZodBoolean;
|
|
1071
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1072
|
+
path: z.ZodString;
|
|
1073
|
+
code: z.ZodString;
|
|
1074
|
+
}, z.core.$strict>>>;
|
|
1075
|
+
}, z.core.$strict>>;
|
|
1076
|
+
}, z.core.$strict>>;
|
|
1077
|
+
estimatedCost: z.ZodNullable<z.ZodObject<{
|
|
1078
|
+
currency: z.ZodLiteral<"EUR">;
|
|
1079
|
+
minorUnits: z.ZodNumber;
|
|
1080
|
+
}, z.core.$strict>>;
|
|
1081
|
+
estimated: z.ZodBoolean;
|
|
1082
|
+
problems: z.ZodNumber;
|
|
1083
|
+
}, z.core.$strict>;
|
|
1084
|
+
export type BasketPreview = z.infer<typeof BasketPreviewSchema>;
|