@techallee/foodverse 1.2.11 → 1.3.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/package.json +1 -1
- package/src/types/api/menu.d.ts +99 -54
package/package.json
CHANGED
package/src/types/api/menu.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
type MenuSource = 'foodverse' | 'lieferando' | 'wolt' | 'uber_eats';
|
|
2
|
+
type LanguageCode = 'de' | 'en' | 'vi'
|
|
2
3
|
|
|
3
4
|
declare interface Menu {
|
|
4
5
|
categories: Category[];
|
|
@@ -13,73 +14,117 @@ declare interface Allergy {
|
|
|
13
14
|
description: string;
|
|
14
15
|
isExtra: boolean;
|
|
15
16
|
restaurantId: string;
|
|
17
|
+
translations?: AllergyTranslation[];
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
declare interface Specification {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
id: string;
|
|
22
|
+
externalId?: string | null;
|
|
23
|
+
source: MenuSource;
|
|
24
|
+
name: string;
|
|
25
|
+
minQuantity: number;
|
|
26
|
+
maxQuantity: number;
|
|
27
|
+
prices: Price;
|
|
28
|
+
attributes: ItemAttributes;
|
|
29
|
+
status: boolean;
|
|
30
|
+
isMultiple: boolean;
|
|
31
|
+
restaurantId: string;
|
|
32
|
+
translations?: SpecificationTranslation[];
|
|
30
33
|
}
|
|
31
34
|
|
|
32
35
|
declare interface OptionGroup {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
id: string;
|
|
37
|
+
externalId?: string | null;
|
|
38
|
+
source: MenuSource;
|
|
39
|
+
name: string;
|
|
40
|
+
isMultiple: boolean;
|
|
41
|
+
restaurantId: string;
|
|
42
|
+
specifications?: Specification[];
|
|
43
|
+
specificationIds?: string[];
|
|
44
|
+
translations?: OptionGroupTranslation[];
|
|
41
45
|
}
|
|
42
46
|
|
|
43
47
|
declare interface Variant {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
id: string;
|
|
49
|
+
externalId?: string | null;
|
|
50
|
+
source: MenuSource;
|
|
51
|
+
code?: string | null;
|
|
52
|
+
name: string;
|
|
53
|
+
shippingTypes: DeliveryType[];
|
|
54
|
+
prices: Price;
|
|
55
|
+
attributes: ItemAttributes;
|
|
56
|
+
status: boolean;
|
|
57
|
+
productId: string;
|
|
58
|
+
translations?: VariantTranslation[];
|
|
54
59
|
}
|
|
55
60
|
|
|
56
61
|
declare interface Product {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
62
|
+
id: string;
|
|
63
|
+
externalId?: string | null;
|
|
64
|
+
source: MenuSource;
|
|
65
|
+
imgUrl: string | null;
|
|
66
|
+
code?: string | null;
|
|
67
|
+
shortName: string;
|
|
68
|
+
name: string;
|
|
69
|
+
description: string;
|
|
70
|
+
allergies: any[];
|
|
71
|
+
extras: any[];
|
|
72
|
+
vatLevel: string; // Replace with VatLevelEnum if defined
|
|
73
|
+
status: boolean;
|
|
74
|
+
discount: any[];
|
|
75
|
+
categoryId: string;
|
|
76
|
+
variants: Variant[];
|
|
77
|
+
optionGroups?: OptionGroup[];
|
|
78
|
+
optionGroupIds?: string[];
|
|
79
|
+
translations?: ProductTranslation[];
|
|
74
80
|
}
|
|
75
81
|
|
|
76
82
|
declare interface Category {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
id: string;
|
|
84
|
+
externalId?: string | null;
|
|
85
|
+
source: MenuSource;
|
|
86
|
+
name: string;
|
|
87
|
+
description: string;
|
|
88
|
+
rank: number;
|
|
89
|
+
restaurantId: string;
|
|
90
|
+
products: Product[];
|
|
91
|
+
translations?: CategoryTranslation[];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
declare interface AllergyTranslation {
|
|
95
|
+
id: string;
|
|
96
|
+
description: string;
|
|
97
|
+
lang: LanguageCode;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
declare interface CategoryTranslation {
|
|
101
|
+
id: string;
|
|
102
|
+
name: string
|
|
103
|
+
description: string;
|
|
104
|
+
lang: LanguageCode;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
declare interface OptionGroupTranslation {
|
|
108
|
+
id: string;
|
|
109
|
+
name: string;
|
|
110
|
+
lang: LanguageCode;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
declare interface ProductTranslation {
|
|
114
|
+
id: string;
|
|
115
|
+
name: string
|
|
116
|
+
description: string;
|
|
117
|
+
lang: LanguageCode;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
declare interface SpecificationTranslation {
|
|
121
|
+
id: string;
|
|
122
|
+
name: string;
|
|
123
|
+
lang: LanguageCode;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
declare interface VariantTranslation {
|
|
127
|
+
id: string;
|
|
128
|
+
name: string;
|
|
129
|
+
lang: LanguageCode;
|
|
85
130
|
}
|