@techallee/foodverse 1.4.1 → 1.4.3
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
package/src/types/api/order.d.ts
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
declare type OrderSource =
|
|
1
|
+
declare type OrderSource =
|
|
2
|
+
'foodverse_web'
|
|
3
|
+
| 'foodverse_local'
|
|
4
|
+
| 'foodverse_terminal'
|
|
5
|
+
| 'foodverse_app'
|
|
6
|
+
| 'lieferando'
|
|
7
|
+
| 'wolt'
|
|
8
|
+
| 'uber_eats';
|
|
2
9
|
declare type PrintStatus = 'pending' | 'success' | 'error';
|
|
3
10
|
declare type OrderStatus = 'created' | 'confirmed' | 'prepared' | 'delivered' | 'cancelled'
|
|
4
11
|
declare type DeliveryType = 'service' | 'in_house' | 'pickup' | 'delivery';
|
|
5
12
|
declare type PaymentType = 'cash' | 'online' | 'card';
|
|
13
|
+
declare type DiscountType = 'percentage' | 'amount';
|
|
6
14
|
|
|
7
15
|
declare interface Price {
|
|
8
16
|
price: number;
|
|
@@ -10,6 +18,13 @@ declare interface Price {
|
|
|
10
18
|
deliveryPrice: number;
|
|
11
19
|
}
|
|
12
20
|
|
|
21
|
+
declare interface Discount {
|
|
22
|
+
discountType: DiscountType;
|
|
23
|
+
value: number;
|
|
24
|
+
startDate: string;
|
|
25
|
+
endDate: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
13
28
|
declare interface ItemAttributes {
|
|
14
29
|
depositAmount?: string;
|
|
15
30
|
volume?: string;
|
|
@@ -23,90 +38,95 @@ declare interface ItemAttributes {
|
|
|
23
38
|
}
|
|
24
39
|
|
|
25
40
|
declare interface OrderSpecification {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
41
|
+
name: string;
|
|
42
|
+
quantity: number;
|
|
43
|
+
done: number;
|
|
44
|
+
price: number;
|
|
29
45
|
}
|
|
30
46
|
|
|
31
47
|
declare interface OrderProduct {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
48
|
+
id: string;
|
|
49
|
+
name: string;
|
|
50
|
+
categoryName: string;
|
|
51
|
+
shortName?: string | null;
|
|
52
|
+
code?: string | null;
|
|
53
|
+
quantity: number;
|
|
54
|
+
done: number;
|
|
55
|
+
price: number;
|
|
56
|
+
totalPrice: number;
|
|
57
|
+
remarks?: string | null;
|
|
58
|
+
specifications: OrderSpecification[];
|
|
59
|
+
discount: Discount;
|
|
40
60
|
}
|
|
41
61
|
|
|
42
62
|
declare interface OrderPrices {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
63
|
+
deliveryFee: number;
|
|
64
|
+
discountTotal: number;
|
|
65
|
+
subTotal: number;
|
|
66
|
+
totalPrice: number;
|
|
47
67
|
}
|
|
48
68
|
|
|
49
69
|
declare interface Address {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
70
|
+
id: string;
|
|
71
|
+
fullName: string;
|
|
72
|
+
street: string | null;
|
|
73
|
+
houseNumber: string | null;
|
|
74
|
+
postcode: string | null;
|
|
75
|
+
city: string | null;
|
|
76
|
+
extra: string;
|
|
77
|
+
companyName: string | null;
|
|
78
|
+
phoneNumber: string | null;
|
|
79
|
+
phonePinCode: string | null;
|
|
80
|
+
latitude: number | null;
|
|
81
|
+
longitude: number | null;
|
|
82
|
+
distance: number | null;
|
|
83
|
+
route: [number, number][] | null;
|
|
84
|
+
bbox: [[number, number], [number, number]] | null;
|
|
85
|
+
userId: string | null;
|
|
66
86
|
}
|
|
67
87
|
|
|
68
88
|
declare interface Order {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
89
|
+
id: string;
|
|
90
|
+
externalId?: string | null;
|
|
91
|
+
placedDate: string;
|
|
92
|
+
orderPlaced?: string | null;
|
|
93
|
+
orderDelivered?: string | null;
|
|
94
|
+
orderPickedUp?: string | null;
|
|
95
|
+
requestedTime?: string | null;
|
|
96
|
+
remarks: string;
|
|
97
|
+
remarksEn: string;
|
|
98
|
+
remarksVi: string;
|
|
99
|
+
publicReference: string;
|
|
100
|
+
dayReference: string;
|
|
101
|
+
source: OrderSource;
|
|
102
|
+
products: OrderProduct[];
|
|
103
|
+
separatedProducts: OrderProduct[];
|
|
104
|
+
prices: OrderPrices;
|
|
105
|
+
inKitchen: boolean;
|
|
106
|
+
isPending: boolean;
|
|
107
|
+
printStatus: PrintStatus;
|
|
108
|
+
basket: string;
|
|
109
|
+
paymentType: PaymentType;
|
|
110
|
+
deliveryType: DeliveryType;
|
|
111
|
+
status: OrderStatus;
|
|
112
|
+
areaId?: string | null;
|
|
113
|
+
customerId: string;
|
|
114
|
+
userId?: string | null;
|
|
115
|
+
restaurantId: string;
|
|
116
|
+
staffId?: string | null;
|
|
117
|
+
deliveredAt?: string | null;
|
|
118
|
+
arrivedAt?: string | null;
|
|
99
119
|
|
|
100
|
-
|
|
120
|
+
customer: Address,
|
|
101
121
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
122
|
+
remainingTime: number | null;
|
|
123
|
+
printedPrinterIds?: string[];
|
|
124
|
+
moving: boolean | null;
|
|
125
|
+
hidden: boolean | null;
|
|
126
|
+
tooltip: string | null;
|
|
127
|
+
size: [number, number];
|
|
128
|
+
anchor: [number, number];
|
|
129
|
+
icon: IconCollection;
|
|
110
130
|
|
|
111
|
-
|
|
131
|
+
staff?: Staff | null
|
|
112
132
|
}
|