@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@techallee/foodverse",
3
- "version": "1.2.11",
3
+ "version": "1.3.0",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "index.d.ts",
@@ -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
- id: string;
20
- externalId?: string | null;
21
- source: MenuSource;
22
- name: string;
23
- minQuantity: number;
24
- maxQuantity: number;
25
- prices: Price;
26
- attributes: ItemAttributes;
27
- status: boolean;
28
- isMultiple: boolean;
29
- restaurantId: string;
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
- id: string;
34
- externalId?: string | null;
35
- source: MenuSource;
36
- name: string;
37
- isMultiple: boolean;
38
- restaurantId: string;
39
- specifications?: Specification[];
40
- specificationIds?: string[];
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
- id: string;
45
- externalId?: string | null;
46
- source: MenuSource;
47
- code?: string | null;
48
- name: string;
49
- shippingTypes: DeliveryType[];
50
- prices: Price;
51
- attributes: ItemAttributes;
52
- status: boolean;
53
- productId: string;
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
- id: string;
58
- externalId?: string | null;
59
- source: MenuSource;
60
- imgUrl: string| null;
61
- code?: string | null;
62
- shortName: string;
63
- name: string;
64
- description: string;
65
- allergies: any[];
66
- extras: any[];
67
- vatLevel: string; // Replace with VatLevelEnum if defined
68
- status: boolean;
69
- discount: any[];
70
- categoryId: string;
71
- variants: Variant[];
72
- optionGroups?: OptionGroup[];
73
- optionGroupIds?: string[];
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
- id: string;
78
- externalId?: string | null;
79
- source: MenuSource;
80
- name: string;
81
- description: string;
82
- rank: number;
83
- restaurantId: string;
84
- products: Product[];
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
  }