@orderingstack/ordering-types 1.0.17 → 1.1.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/dist/cjs/index.d.ts +37 -39
- package/dist/cjs/index.js +12 -12
- package/dist/cjs/kiosk.d.ts +8 -0
- package/dist/esm/index.d.ts +37 -39
- package/dist/esm/index.js +11 -11
- package/dist/esm/kiosk.d.ts +8 -0
- package/package.json +1 -1
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from "./kiosk";
|
|
2
|
-
export interface
|
|
2
|
+
export interface IRestaurant {
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
5
5
|
geoPosition: IGeoPosition;
|
|
@@ -36,7 +36,7 @@ export interface ILanguage {
|
|
|
36
36
|
key: string;
|
|
37
37
|
icon: any;
|
|
38
38
|
}
|
|
39
|
-
export type
|
|
39
|
+
export type TStringBoolean = "true" | "false";
|
|
40
40
|
export declare enum EProductKind {
|
|
41
41
|
GROUP = "3e/group",
|
|
42
42
|
PRODUCT = "3e/product",
|
|
@@ -70,6 +70,16 @@ export interface IProductAvailability {
|
|
|
70
70
|
SAT?: [string, string];
|
|
71
71
|
SUN?: [string, string];
|
|
72
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* IProductExtra interface
|
|
75
|
+
*
|
|
76
|
+
* @interface IProductExtra
|
|
77
|
+
* @related {string} comma separated related products IDs
|
|
78
|
+
*/
|
|
79
|
+
export interface IProductExtra extends Partial<Record<string, string>> {
|
|
80
|
+
related?: string;
|
|
81
|
+
category?: string;
|
|
82
|
+
}
|
|
73
83
|
export interface IProduct {
|
|
74
84
|
availability?: IProductAvailability;
|
|
75
85
|
id: string;
|
|
@@ -93,7 +103,7 @@ export interface IProduct {
|
|
|
93
103
|
emit?: IProductEmit;
|
|
94
104
|
qtyMin?: string;
|
|
95
105
|
qtyMax?: string;
|
|
96
|
-
_?:
|
|
106
|
+
_?: IProductExtra;
|
|
97
107
|
bom?: Record<string, {
|
|
98
108
|
unit: string;
|
|
99
109
|
qty: string;
|
|
@@ -120,16 +130,13 @@ export interface IProductEmit {
|
|
|
120
130
|
export interface IProductFilter {
|
|
121
131
|
[fltCtx: string]: string[];
|
|
122
132
|
}
|
|
123
|
-
export interface
|
|
124
|
-
[propName: string]: any;
|
|
125
|
-
}
|
|
126
|
-
export interface User {
|
|
133
|
+
export interface IUser {
|
|
127
134
|
userId: string;
|
|
128
135
|
roles: string[];
|
|
129
136
|
name?: string;
|
|
130
137
|
phone?: string;
|
|
131
138
|
email?: string;
|
|
132
|
-
extra?:
|
|
139
|
+
extra?: Record<string, string>;
|
|
133
140
|
}
|
|
134
141
|
export declare enum EOrderType {
|
|
135
142
|
TAKE_AWAY = "TAKE_AWAY",
|
|
@@ -149,7 +156,7 @@ export declare enum EOrderType {
|
|
|
149
156
|
WOLT_TAKE_AWAY = "WOLT_TAKE_AWAY",
|
|
150
157
|
WOLT_DINE_IN = "WOLT_DINE_IN"
|
|
151
158
|
}
|
|
152
|
-
export interface
|
|
159
|
+
export interface IOrderDeliveryAddress {
|
|
153
160
|
street: string;
|
|
154
161
|
number: string;
|
|
155
162
|
door?: string;
|
|
@@ -170,11 +177,11 @@ export interface IOrder {
|
|
|
170
177
|
processingStartedTime?: string;
|
|
171
178
|
deliveredTime?: string;
|
|
172
179
|
source: string;
|
|
173
|
-
users?:
|
|
180
|
+
users?: IUser[];
|
|
174
181
|
loyaltyId?: string;
|
|
175
182
|
coupons?: IOrderCoupon[];
|
|
176
183
|
orderType: EOrderType;
|
|
177
|
-
deliveryAddress?:
|
|
184
|
+
deliveryAddress?: IOrderDeliveryAddress;
|
|
178
185
|
geoPosition?: {
|
|
179
186
|
lat: number;
|
|
180
187
|
lng: number;
|
|
@@ -183,10 +190,10 @@ export interface IOrder {
|
|
|
183
190
|
editTotal: string;
|
|
184
191
|
status: EOrderStatus;
|
|
185
192
|
statusInfo?: string;
|
|
186
|
-
comments?:
|
|
193
|
+
comments?: IOrderComment[];
|
|
187
194
|
claimCode?: string;
|
|
188
195
|
buckets: IOrderInBucket[];
|
|
189
|
-
payments?:
|
|
196
|
+
payments?: IOrderPayment[];
|
|
190
197
|
fiscal?: IOrderFiscal[];
|
|
191
198
|
tax: ITaxSummary[];
|
|
192
199
|
extra?: IOrderExtra;
|
|
@@ -223,12 +230,12 @@ export declare enum EOrderStatus {
|
|
|
223
230
|
CANCELLED = "CANCELLED",
|
|
224
231
|
PICKED = "PICKED"
|
|
225
232
|
}
|
|
226
|
-
export interface
|
|
233
|
+
export interface IOrderComment {
|
|
227
234
|
id: string;
|
|
228
235
|
creator: string;
|
|
229
236
|
timestamp?: string;
|
|
230
237
|
comment: string;
|
|
231
|
-
extra?:
|
|
238
|
+
extra?: Record<string, string>;
|
|
232
239
|
}
|
|
233
240
|
export interface IOrderInBucket {
|
|
234
241
|
venue: string;
|
|
@@ -240,7 +247,7 @@ export interface IOrderInBucket {
|
|
|
240
247
|
priceList?: string;
|
|
241
248
|
warehouse?: string;
|
|
242
249
|
queuePos?: string;
|
|
243
|
-
extra?:
|
|
250
|
+
extra?: Record<string, string>;
|
|
244
251
|
}
|
|
245
252
|
export interface IOrderPayment {
|
|
246
253
|
id: string;
|
|
@@ -250,7 +257,7 @@ export interface IOrderPayment {
|
|
|
250
257
|
initialAmount?: number;
|
|
251
258
|
user: string;
|
|
252
259
|
timestamp?: string;
|
|
253
|
-
extra?:
|
|
260
|
+
extra?: Record<string, string>;
|
|
254
261
|
}
|
|
255
262
|
export declare enum EOrderPaymentType {
|
|
256
263
|
CASH = "CASH",
|
|
@@ -264,16 +271,6 @@ export declare enum EOrderPaymentType {
|
|
|
264
271
|
RETURN = "RETURN",
|
|
265
272
|
EXTERNAL = "EXTERNAL"
|
|
266
273
|
}
|
|
267
|
-
export interface OrderPayment {
|
|
268
|
-
id: string;
|
|
269
|
-
type: EOrderPaymentType;
|
|
270
|
-
source: string;
|
|
271
|
-
amount: number;
|
|
272
|
-
initialAmount?: number;
|
|
273
|
-
user: string;
|
|
274
|
-
timestamp?: string;
|
|
275
|
-
extra?: Extra;
|
|
276
|
-
}
|
|
277
274
|
export interface IOrderFiscal {
|
|
278
275
|
timestamp: string;
|
|
279
276
|
user?: string;
|
|
@@ -283,11 +280,11 @@ export interface IOrderFiscal {
|
|
|
283
280
|
slip: string;
|
|
284
281
|
taxId?: string;
|
|
285
282
|
message?: string;
|
|
286
|
-
entries:
|
|
283
|
+
entries: ISlipEntry[];
|
|
287
284
|
payments?: {
|
|
288
285
|
[propName: string]: number;
|
|
289
286
|
};
|
|
290
|
-
subTotalDiscounts?:
|
|
287
|
+
subTotalDiscounts?: ISubTotalDiscount[];
|
|
291
288
|
extra: {
|
|
292
289
|
[propName: string]: number;
|
|
293
290
|
};
|
|
@@ -314,8 +311,8 @@ export interface ITaxSummary {
|
|
|
314
311
|
* @x-agg-id {string} order ID from aggregator
|
|
315
312
|
* @support-order-id {string} order code from aggregator to be used with support and same as seen by customer,
|
|
316
313
|
*/
|
|
317
|
-
export interface IOrderExtra {
|
|
318
|
-
"x-source"?:
|
|
314
|
+
export interface IOrderExtra extends Partial<Record<string, string>> {
|
|
315
|
+
"x-source"?: EOrderSource;
|
|
319
316
|
"x-source-type"?: "INTEGRATOR";
|
|
320
317
|
"manual-verify"?: string;
|
|
321
318
|
"x-collect-time"?: string;
|
|
@@ -328,6 +325,7 @@ export interface IOrderExtra {
|
|
|
328
325
|
"x-agg-id"?: string;
|
|
329
326
|
"support-order-id"?: string;
|
|
330
327
|
"x-pos-id"?: string;
|
|
328
|
+
"company-tax-id"?: string;
|
|
331
329
|
}
|
|
332
330
|
export interface IOrderLog {
|
|
333
331
|
timestamp?: string;
|
|
@@ -338,11 +336,11 @@ export interface IOrderLog {
|
|
|
338
336
|
}
|
|
339
337
|
export interface IOrderLine {
|
|
340
338
|
bom?: Object;
|
|
341
|
-
comments?:
|
|
339
|
+
comments?: IOrderComment[];
|
|
342
340
|
created: string;
|
|
343
341
|
creator?: string;
|
|
344
342
|
discounts?: IDiscount[];
|
|
345
|
-
extra:
|
|
343
|
+
extra: Record<string, string>;
|
|
346
344
|
hash: string;
|
|
347
345
|
id: string;
|
|
348
346
|
price: string;
|
|
@@ -355,7 +353,7 @@ export interface IOrderLine {
|
|
|
355
353
|
total: string;
|
|
356
354
|
updated: string;
|
|
357
355
|
}
|
|
358
|
-
export interface
|
|
356
|
+
export interface ISlipEntry {
|
|
359
357
|
item: string;
|
|
360
358
|
qty: number;
|
|
361
359
|
price: number;
|
|
@@ -363,12 +361,12 @@ export interface SlipEntry {
|
|
|
363
361
|
total: number;
|
|
364
362
|
vat: string;
|
|
365
363
|
}
|
|
366
|
-
export interface
|
|
364
|
+
export interface ISubTotalDiscount {
|
|
367
365
|
name: string;
|
|
368
366
|
discount: number;
|
|
369
367
|
vat: string;
|
|
370
368
|
}
|
|
371
|
-
export declare enum
|
|
369
|
+
export declare enum EOrderSource {
|
|
372
370
|
KIOSK = "KIOSK",
|
|
373
371
|
WEB = "WEB",
|
|
374
372
|
JUST_EAT_TAKE_AWAY = "JUSTEATTAKEAWAY",
|
|
@@ -386,7 +384,7 @@ export interface IOrderProduct {
|
|
|
386
384
|
img: string;
|
|
387
385
|
quantity: string;
|
|
388
386
|
price: string;
|
|
389
|
-
extra:
|
|
387
|
+
extra: Record<string, string>;
|
|
390
388
|
}
|
|
391
389
|
export declare enum EOrderLineStatus {
|
|
392
390
|
NEW = "NEW",
|
|
@@ -418,7 +416,7 @@ export type TSaleChannelWeek = Partial<Record<TWeekDay, {
|
|
|
418
416
|
from: string;
|
|
419
417
|
to: string;
|
|
420
418
|
}[]>>;
|
|
421
|
-
export interface
|
|
419
|
+
export interface ISaleChannel {
|
|
422
420
|
active?: boolean;
|
|
423
421
|
minDeliveryTime?: string;
|
|
424
422
|
minOrderValue?: string;
|
|
@@ -443,7 +441,7 @@ export interface IVenueConfig {
|
|
|
443
441
|
postal: string;
|
|
444
442
|
street: string;
|
|
445
443
|
};
|
|
446
|
-
channelConstraints: Partial<Record<EChannelName,
|
|
444
|
+
channelConstraints: Partial<Record<EChannelName, ISaleChannel>>;
|
|
447
445
|
device: Record<string, Record<string, string>>;
|
|
448
446
|
extra: Record<string, string>;
|
|
449
447
|
geoPosition: IGeoPosition;
|
package/dist/cjs/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.EChannelName = exports.EOrderProductKind = exports.EOrderLineStatus = exports.
|
|
17
|
+
exports.EChannelName = exports.EOrderProductKind = exports.EOrderLineStatus = exports.EOrderSource = exports.EOrderPaymentType = exports.EOrderStatus = exports.EOrderType = exports.EProductKindBucket = exports.EProductKind = exports.ECouponViewType = void 0;
|
|
18
18
|
__exportStar(require("./kiosk"), exports);
|
|
19
19
|
var ECouponViewType;
|
|
20
20
|
(function (ECouponViewType) {
|
|
@@ -82,17 +82,17 @@ var EOrderPaymentType;
|
|
|
82
82
|
EOrderPaymentType["RETURN"] = "RETURN";
|
|
83
83
|
EOrderPaymentType["EXTERNAL"] = "EXTERNAL";
|
|
84
84
|
})(EOrderPaymentType = exports.EOrderPaymentType || (exports.EOrderPaymentType = {}));
|
|
85
|
-
var
|
|
86
|
-
(function (
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
})(
|
|
85
|
+
var EOrderSource;
|
|
86
|
+
(function (EOrderSource) {
|
|
87
|
+
EOrderSource["KIOSK"] = "KIOSK";
|
|
88
|
+
EOrderSource["WEB"] = "WEB";
|
|
89
|
+
EOrderSource["JUST_EAT_TAKE_AWAY"] = "JUSTEATTAKEAWAY";
|
|
90
|
+
EOrderSource["GLOVO"] = "GLOVO";
|
|
91
|
+
EOrderSource["PYSZNE"] = "PYSZNE";
|
|
92
|
+
EOrderSource["WOLT"] = "WOLT";
|
|
93
|
+
EOrderSource["UBER"] = "UBER";
|
|
94
|
+
EOrderSource["BOLT"] = "BOLT";
|
|
95
|
+
})(EOrderSource = exports.EOrderSource || (exports.EOrderSource = {}));
|
|
96
96
|
var EOrderLineStatus;
|
|
97
97
|
(function (EOrderLineStatus) {
|
|
98
98
|
EOrderLineStatus["NEW"] = "NEW";
|
package/dist/cjs/kiosk.d.ts
CHANGED
|
@@ -89,6 +89,13 @@ export interface IMenuBottomNavProps {
|
|
|
89
89
|
fallbackImg?: string;
|
|
90
90
|
changeQuantity: (line: IOrderLine, quantity: number) => void;
|
|
91
91
|
}
|
|
92
|
+
export interface IMenuUpsizeProps {
|
|
93
|
+
show: boolean;
|
|
94
|
+
onClose: () => void;
|
|
95
|
+
products?: IProduct[];
|
|
96
|
+
onProductClicked: (prod: IProduct) => void;
|
|
97
|
+
currency: string;
|
|
98
|
+
}
|
|
92
99
|
export interface IMenuComponents {
|
|
93
100
|
TopNav?: React.FC<IMenuTopNavProps>;
|
|
94
101
|
BottomNav?: React.FC<IMenuBottomNavProps>;
|
|
@@ -96,6 +103,7 @@ export interface IMenuComponents {
|
|
|
96
103
|
CategorySection?: React.FC<IMenuCategorySectionProps>;
|
|
97
104
|
Header?: ReactElement;
|
|
98
105
|
Logo?: ReactElement;
|
|
106
|
+
Upsize?: React.FC<IMenuUpsizeProps>;
|
|
99
107
|
}
|
|
100
108
|
export interface IProductConfiguratorProps {
|
|
101
109
|
product: IProduct;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from "./kiosk";
|
|
2
|
-
export interface
|
|
2
|
+
export interface IRestaurant {
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
5
5
|
geoPosition: IGeoPosition;
|
|
@@ -36,7 +36,7 @@ export interface ILanguage {
|
|
|
36
36
|
key: string;
|
|
37
37
|
icon: any;
|
|
38
38
|
}
|
|
39
|
-
export type
|
|
39
|
+
export type TStringBoolean = "true" | "false";
|
|
40
40
|
export declare enum EProductKind {
|
|
41
41
|
GROUP = "3e/group",
|
|
42
42
|
PRODUCT = "3e/product",
|
|
@@ -70,6 +70,16 @@ export interface IProductAvailability {
|
|
|
70
70
|
SAT?: [string, string];
|
|
71
71
|
SUN?: [string, string];
|
|
72
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* IProductExtra interface
|
|
75
|
+
*
|
|
76
|
+
* @interface IProductExtra
|
|
77
|
+
* @related {string} comma separated related products IDs
|
|
78
|
+
*/
|
|
79
|
+
export interface IProductExtra extends Partial<Record<string, string>> {
|
|
80
|
+
related?: string;
|
|
81
|
+
category?: string;
|
|
82
|
+
}
|
|
73
83
|
export interface IProduct {
|
|
74
84
|
availability?: IProductAvailability;
|
|
75
85
|
id: string;
|
|
@@ -93,7 +103,7 @@ export interface IProduct {
|
|
|
93
103
|
emit?: IProductEmit;
|
|
94
104
|
qtyMin?: string;
|
|
95
105
|
qtyMax?: string;
|
|
96
|
-
_?:
|
|
106
|
+
_?: IProductExtra;
|
|
97
107
|
bom?: Record<string, {
|
|
98
108
|
unit: string;
|
|
99
109
|
qty: string;
|
|
@@ -120,16 +130,13 @@ export interface IProductEmit {
|
|
|
120
130
|
export interface IProductFilter {
|
|
121
131
|
[fltCtx: string]: string[];
|
|
122
132
|
}
|
|
123
|
-
export interface
|
|
124
|
-
[propName: string]: any;
|
|
125
|
-
}
|
|
126
|
-
export interface User {
|
|
133
|
+
export interface IUser {
|
|
127
134
|
userId: string;
|
|
128
135
|
roles: string[];
|
|
129
136
|
name?: string;
|
|
130
137
|
phone?: string;
|
|
131
138
|
email?: string;
|
|
132
|
-
extra?:
|
|
139
|
+
extra?: Record<string, string>;
|
|
133
140
|
}
|
|
134
141
|
export declare enum EOrderType {
|
|
135
142
|
TAKE_AWAY = "TAKE_AWAY",
|
|
@@ -149,7 +156,7 @@ export declare enum EOrderType {
|
|
|
149
156
|
WOLT_TAKE_AWAY = "WOLT_TAKE_AWAY",
|
|
150
157
|
WOLT_DINE_IN = "WOLT_DINE_IN"
|
|
151
158
|
}
|
|
152
|
-
export interface
|
|
159
|
+
export interface IOrderDeliveryAddress {
|
|
153
160
|
street: string;
|
|
154
161
|
number: string;
|
|
155
162
|
door?: string;
|
|
@@ -170,11 +177,11 @@ export interface IOrder {
|
|
|
170
177
|
processingStartedTime?: string;
|
|
171
178
|
deliveredTime?: string;
|
|
172
179
|
source: string;
|
|
173
|
-
users?:
|
|
180
|
+
users?: IUser[];
|
|
174
181
|
loyaltyId?: string;
|
|
175
182
|
coupons?: IOrderCoupon[];
|
|
176
183
|
orderType: EOrderType;
|
|
177
|
-
deliveryAddress?:
|
|
184
|
+
deliveryAddress?: IOrderDeliveryAddress;
|
|
178
185
|
geoPosition?: {
|
|
179
186
|
lat: number;
|
|
180
187
|
lng: number;
|
|
@@ -183,10 +190,10 @@ export interface IOrder {
|
|
|
183
190
|
editTotal: string;
|
|
184
191
|
status: EOrderStatus;
|
|
185
192
|
statusInfo?: string;
|
|
186
|
-
comments?:
|
|
193
|
+
comments?: IOrderComment[];
|
|
187
194
|
claimCode?: string;
|
|
188
195
|
buckets: IOrderInBucket[];
|
|
189
|
-
payments?:
|
|
196
|
+
payments?: IOrderPayment[];
|
|
190
197
|
fiscal?: IOrderFiscal[];
|
|
191
198
|
tax: ITaxSummary[];
|
|
192
199
|
extra?: IOrderExtra;
|
|
@@ -223,12 +230,12 @@ export declare enum EOrderStatus {
|
|
|
223
230
|
CANCELLED = "CANCELLED",
|
|
224
231
|
PICKED = "PICKED"
|
|
225
232
|
}
|
|
226
|
-
export interface
|
|
233
|
+
export interface IOrderComment {
|
|
227
234
|
id: string;
|
|
228
235
|
creator: string;
|
|
229
236
|
timestamp?: string;
|
|
230
237
|
comment: string;
|
|
231
|
-
extra?:
|
|
238
|
+
extra?: Record<string, string>;
|
|
232
239
|
}
|
|
233
240
|
export interface IOrderInBucket {
|
|
234
241
|
venue: string;
|
|
@@ -240,7 +247,7 @@ export interface IOrderInBucket {
|
|
|
240
247
|
priceList?: string;
|
|
241
248
|
warehouse?: string;
|
|
242
249
|
queuePos?: string;
|
|
243
|
-
extra?:
|
|
250
|
+
extra?: Record<string, string>;
|
|
244
251
|
}
|
|
245
252
|
export interface IOrderPayment {
|
|
246
253
|
id: string;
|
|
@@ -250,7 +257,7 @@ export interface IOrderPayment {
|
|
|
250
257
|
initialAmount?: number;
|
|
251
258
|
user: string;
|
|
252
259
|
timestamp?: string;
|
|
253
|
-
extra?:
|
|
260
|
+
extra?: Record<string, string>;
|
|
254
261
|
}
|
|
255
262
|
export declare enum EOrderPaymentType {
|
|
256
263
|
CASH = "CASH",
|
|
@@ -264,16 +271,6 @@ export declare enum EOrderPaymentType {
|
|
|
264
271
|
RETURN = "RETURN",
|
|
265
272
|
EXTERNAL = "EXTERNAL"
|
|
266
273
|
}
|
|
267
|
-
export interface OrderPayment {
|
|
268
|
-
id: string;
|
|
269
|
-
type: EOrderPaymentType;
|
|
270
|
-
source: string;
|
|
271
|
-
amount: number;
|
|
272
|
-
initialAmount?: number;
|
|
273
|
-
user: string;
|
|
274
|
-
timestamp?: string;
|
|
275
|
-
extra?: Extra;
|
|
276
|
-
}
|
|
277
274
|
export interface IOrderFiscal {
|
|
278
275
|
timestamp: string;
|
|
279
276
|
user?: string;
|
|
@@ -283,11 +280,11 @@ export interface IOrderFiscal {
|
|
|
283
280
|
slip: string;
|
|
284
281
|
taxId?: string;
|
|
285
282
|
message?: string;
|
|
286
|
-
entries:
|
|
283
|
+
entries: ISlipEntry[];
|
|
287
284
|
payments?: {
|
|
288
285
|
[propName: string]: number;
|
|
289
286
|
};
|
|
290
|
-
subTotalDiscounts?:
|
|
287
|
+
subTotalDiscounts?: ISubTotalDiscount[];
|
|
291
288
|
extra: {
|
|
292
289
|
[propName: string]: number;
|
|
293
290
|
};
|
|
@@ -314,8 +311,8 @@ export interface ITaxSummary {
|
|
|
314
311
|
* @x-agg-id {string} order ID from aggregator
|
|
315
312
|
* @support-order-id {string} order code from aggregator to be used with support and same as seen by customer,
|
|
316
313
|
*/
|
|
317
|
-
export interface IOrderExtra {
|
|
318
|
-
"x-source"?:
|
|
314
|
+
export interface IOrderExtra extends Partial<Record<string, string>> {
|
|
315
|
+
"x-source"?: EOrderSource;
|
|
319
316
|
"x-source-type"?: "INTEGRATOR";
|
|
320
317
|
"manual-verify"?: string;
|
|
321
318
|
"x-collect-time"?: string;
|
|
@@ -328,6 +325,7 @@ export interface IOrderExtra {
|
|
|
328
325
|
"x-agg-id"?: string;
|
|
329
326
|
"support-order-id"?: string;
|
|
330
327
|
"x-pos-id"?: string;
|
|
328
|
+
"company-tax-id"?: string;
|
|
331
329
|
}
|
|
332
330
|
export interface IOrderLog {
|
|
333
331
|
timestamp?: string;
|
|
@@ -338,11 +336,11 @@ export interface IOrderLog {
|
|
|
338
336
|
}
|
|
339
337
|
export interface IOrderLine {
|
|
340
338
|
bom?: Object;
|
|
341
|
-
comments?:
|
|
339
|
+
comments?: IOrderComment[];
|
|
342
340
|
created: string;
|
|
343
341
|
creator?: string;
|
|
344
342
|
discounts?: IDiscount[];
|
|
345
|
-
extra:
|
|
343
|
+
extra: Record<string, string>;
|
|
346
344
|
hash: string;
|
|
347
345
|
id: string;
|
|
348
346
|
price: string;
|
|
@@ -355,7 +353,7 @@ export interface IOrderLine {
|
|
|
355
353
|
total: string;
|
|
356
354
|
updated: string;
|
|
357
355
|
}
|
|
358
|
-
export interface
|
|
356
|
+
export interface ISlipEntry {
|
|
359
357
|
item: string;
|
|
360
358
|
qty: number;
|
|
361
359
|
price: number;
|
|
@@ -363,12 +361,12 @@ export interface SlipEntry {
|
|
|
363
361
|
total: number;
|
|
364
362
|
vat: string;
|
|
365
363
|
}
|
|
366
|
-
export interface
|
|
364
|
+
export interface ISubTotalDiscount {
|
|
367
365
|
name: string;
|
|
368
366
|
discount: number;
|
|
369
367
|
vat: string;
|
|
370
368
|
}
|
|
371
|
-
export declare enum
|
|
369
|
+
export declare enum EOrderSource {
|
|
372
370
|
KIOSK = "KIOSK",
|
|
373
371
|
WEB = "WEB",
|
|
374
372
|
JUST_EAT_TAKE_AWAY = "JUSTEATTAKEAWAY",
|
|
@@ -386,7 +384,7 @@ export interface IOrderProduct {
|
|
|
386
384
|
img: string;
|
|
387
385
|
quantity: string;
|
|
388
386
|
price: string;
|
|
389
|
-
extra:
|
|
387
|
+
extra: Record<string, string>;
|
|
390
388
|
}
|
|
391
389
|
export declare enum EOrderLineStatus {
|
|
392
390
|
NEW = "NEW",
|
|
@@ -418,7 +416,7 @@ export type TSaleChannelWeek = Partial<Record<TWeekDay, {
|
|
|
418
416
|
from: string;
|
|
419
417
|
to: string;
|
|
420
418
|
}[]>>;
|
|
421
|
-
export interface
|
|
419
|
+
export interface ISaleChannel {
|
|
422
420
|
active?: boolean;
|
|
423
421
|
minDeliveryTime?: string;
|
|
424
422
|
minOrderValue?: string;
|
|
@@ -443,7 +441,7 @@ export interface IVenueConfig {
|
|
|
443
441
|
postal: string;
|
|
444
442
|
street: string;
|
|
445
443
|
};
|
|
446
|
-
channelConstraints: Partial<Record<EChannelName,
|
|
444
|
+
channelConstraints: Partial<Record<EChannelName, ISaleChannel>>;
|
|
447
445
|
device: Record<string, Record<string, string>>;
|
|
448
446
|
extra: Record<string, string>;
|
|
449
447
|
geoPosition: IGeoPosition;
|
package/dist/esm/index.js
CHANGED
|
@@ -65,17 +65,17 @@ export var EOrderPaymentType;
|
|
|
65
65
|
EOrderPaymentType["RETURN"] = "RETURN";
|
|
66
66
|
EOrderPaymentType["EXTERNAL"] = "EXTERNAL";
|
|
67
67
|
})(EOrderPaymentType || (EOrderPaymentType = {}));
|
|
68
|
-
export var
|
|
69
|
-
(function (
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
})(
|
|
68
|
+
export var EOrderSource;
|
|
69
|
+
(function (EOrderSource) {
|
|
70
|
+
EOrderSource["KIOSK"] = "KIOSK";
|
|
71
|
+
EOrderSource["WEB"] = "WEB";
|
|
72
|
+
EOrderSource["JUST_EAT_TAKE_AWAY"] = "JUSTEATTAKEAWAY";
|
|
73
|
+
EOrderSource["GLOVO"] = "GLOVO";
|
|
74
|
+
EOrderSource["PYSZNE"] = "PYSZNE";
|
|
75
|
+
EOrderSource["WOLT"] = "WOLT";
|
|
76
|
+
EOrderSource["UBER"] = "UBER";
|
|
77
|
+
EOrderSource["BOLT"] = "BOLT";
|
|
78
|
+
})(EOrderSource || (EOrderSource = {}));
|
|
79
79
|
export var EOrderLineStatus;
|
|
80
80
|
(function (EOrderLineStatus) {
|
|
81
81
|
EOrderLineStatus["NEW"] = "NEW";
|
package/dist/esm/kiosk.d.ts
CHANGED
|
@@ -89,6 +89,13 @@ export interface IMenuBottomNavProps {
|
|
|
89
89
|
fallbackImg?: string;
|
|
90
90
|
changeQuantity: (line: IOrderLine, quantity: number) => void;
|
|
91
91
|
}
|
|
92
|
+
export interface IMenuUpsizeProps {
|
|
93
|
+
show: boolean;
|
|
94
|
+
onClose: () => void;
|
|
95
|
+
products?: IProduct[];
|
|
96
|
+
onProductClicked: (prod: IProduct) => void;
|
|
97
|
+
currency: string;
|
|
98
|
+
}
|
|
92
99
|
export interface IMenuComponents {
|
|
93
100
|
TopNav?: React.FC<IMenuTopNavProps>;
|
|
94
101
|
BottomNav?: React.FC<IMenuBottomNavProps>;
|
|
@@ -96,6 +103,7 @@ export interface IMenuComponents {
|
|
|
96
103
|
CategorySection?: React.FC<IMenuCategorySectionProps>;
|
|
97
104
|
Header?: ReactElement;
|
|
98
105
|
Logo?: ReactElement;
|
|
106
|
+
Upsize?: React.FC<IMenuUpsizeProps>;
|
|
99
107
|
}
|
|
100
108
|
export interface IProductConfiguratorProps {
|
|
101
109
|
product: IProduct;
|