@orderingstack/ordering-types 0.1.9 → 1.0.8
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 +99 -83
- package/dist/cjs/index.js +66 -66
- package/dist/cjs/kiosk.d.ts +70 -0
- package/dist/cjs/kiosk.js +1 -0
- package/dist/esm/index.d.ts +99 -83
- package/dist/esm/index.js +65 -65
- package/dist/esm/kiosk.d.ts +70 -0
- package/dist/esm/kiosk.js +1 -0
- package/package.json +22 -19
package/dist/cjs/index.d.ts
CHANGED
|
@@ -2,41 +2,41 @@ export * from "./kiosk";
|
|
|
2
2
|
export interface Restaurant {
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
5
|
-
geoPosition:
|
|
6
|
-
address:
|
|
5
|
+
geoPosition: IGeoPosition;
|
|
6
|
+
address: IAddress;
|
|
7
7
|
}
|
|
8
|
-
export interface
|
|
8
|
+
export interface IGeoPosition {
|
|
9
9
|
lat: number;
|
|
10
10
|
lng: number;
|
|
11
11
|
}
|
|
12
|
-
export interface
|
|
12
|
+
export interface IAddress {
|
|
13
13
|
street: string;
|
|
14
14
|
number: string;
|
|
15
15
|
postal: string;
|
|
16
16
|
city: string;
|
|
17
17
|
country: string;
|
|
18
18
|
}
|
|
19
|
-
export declare enum
|
|
19
|
+
export declare enum ECouponViewType {
|
|
20
20
|
CAROUSEL = "carousel",
|
|
21
21
|
NORMAL = "normal",
|
|
22
22
|
IMAGE = "image"
|
|
23
23
|
}
|
|
24
|
-
export interface
|
|
24
|
+
export interface ICoupon {
|
|
25
25
|
id: string;
|
|
26
26
|
img: string;
|
|
27
|
-
viewType?:
|
|
27
|
+
viewType?: ECouponViewType;
|
|
28
28
|
size?: "md" | "lg";
|
|
29
29
|
price?: number;
|
|
30
30
|
name?: string;
|
|
31
31
|
endDate?: string;
|
|
32
32
|
timeToEnd?: any;
|
|
33
33
|
}
|
|
34
|
-
export interface
|
|
34
|
+
export interface ILanguage {
|
|
35
35
|
label: string;
|
|
36
36
|
key: string;
|
|
37
37
|
icon: any;
|
|
38
38
|
}
|
|
39
|
-
export type StringBoolean = "true" | "false";
|
|
39
|
+
export declare type StringBoolean = "true" | "false";
|
|
40
40
|
export declare enum EProductKind {
|
|
41
41
|
GROUP = "3e/group",
|
|
42
42
|
PRODUCT = "3e/product",
|
|
@@ -51,16 +51,17 @@ export declare enum EProductKindBucket {
|
|
|
51
51
|
GROUP = "group",
|
|
52
52
|
PRODUCT = "product"
|
|
53
53
|
}
|
|
54
|
-
export type
|
|
54
|
+
export declare type TLiterals = {
|
|
55
55
|
name: string;
|
|
56
56
|
fiscal?: string;
|
|
57
57
|
"target-product-id"?: string;
|
|
58
|
+
description?: string;
|
|
58
59
|
};
|
|
59
|
-
export type
|
|
60
|
+
export declare type TMedia = {
|
|
60
61
|
url: string;
|
|
61
62
|
name: string;
|
|
62
63
|
};
|
|
63
|
-
export
|
|
64
|
+
export interface IProductAvailability {
|
|
64
65
|
MON?: [string, string];
|
|
65
66
|
TUE?: [string, string];
|
|
66
67
|
WED?: [string, string];
|
|
@@ -68,36 +69,61 @@ export type Availability = {
|
|
|
68
69
|
FRI?: [string, string];
|
|
69
70
|
SAT?: [string, string];
|
|
70
71
|
SUN?: [string, string];
|
|
71
|
-
}
|
|
72
|
-
export
|
|
73
|
-
availability?:
|
|
72
|
+
}
|
|
73
|
+
export interface IProduct {
|
|
74
|
+
availability?: IProductAvailability;
|
|
74
75
|
id: string;
|
|
75
76
|
img?: string;
|
|
76
|
-
items?:
|
|
77
|
+
items?: IProduct[];
|
|
77
78
|
kind: EProductKind | EProductKindBucket;
|
|
78
|
-
literals?:
|
|
79
|
+
literals?: TLiterals;
|
|
79
80
|
details?: {
|
|
80
|
-
literals?:
|
|
81
|
-
media?:
|
|
81
|
+
literals?: TLiterals;
|
|
82
|
+
media?: TMedia[];
|
|
82
83
|
};
|
|
83
|
-
price
|
|
84
|
+
price?: string;
|
|
84
85
|
minPrice?: string;
|
|
85
|
-
quantity
|
|
86
|
-
vat
|
|
86
|
+
quantity?: string;
|
|
87
|
+
vat?: string;
|
|
87
88
|
outsideAvailabilitySlot?: boolean;
|
|
88
|
-
state?:
|
|
89
|
+
state?: IProductState;
|
|
89
90
|
selCtx: string;
|
|
90
|
-
filter?:
|
|
91
|
-
fltCtx?:
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
91
|
+
filter?: IProductFilter;
|
|
92
|
+
fltCtx?: string;
|
|
93
|
+
emit?: IProductEmit;
|
|
94
|
+
qtyMin?: string;
|
|
95
|
+
qtyMax?: string;
|
|
96
|
+
_?: Record<string, string>;
|
|
97
|
+
bom?: Record<string, {
|
|
98
|
+
unit: string;
|
|
99
|
+
qty: string;
|
|
100
|
+
}>;
|
|
101
|
+
attrs?: Record<string, string | boolean>;
|
|
102
|
+
}
|
|
103
|
+
export interface IProductState {
|
|
104
|
+
selected: IProductStateFilter;
|
|
105
|
+
filter: IProductStateFilter;
|
|
106
|
+
}
|
|
107
|
+
export interface IProductStateFilter {
|
|
108
|
+
[flxCtx: string]: {
|
|
109
|
+
[id: string]: string;
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
export interface IProductStateSelected {
|
|
113
|
+
[selCtx: string]: {
|
|
114
|
+
[id: string]: string;
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
export interface IProductEmit {
|
|
118
|
+
[id: string]: string;
|
|
119
|
+
}
|
|
120
|
+
export interface ICategory {
|
|
98
121
|
id: string;
|
|
99
122
|
name: string;
|
|
100
123
|
}
|
|
124
|
+
export interface IProductFilter {
|
|
125
|
+
[fltCtx: string]: string[];
|
|
126
|
+
}
|
|
101
127
|
export interface Extra {
|
|
102
128
|
[propName: string]: any;
|
|
103
129
|
}
|
|
@@ -109,7 +135,7 @@ export interface User {
|
|
|
109
135
|
email?: string;
|
|
110
136
|
extra?: Extra;
|
|
111
137
|
}
|
|
112
|
-
export declare enum
|
|
138
|
+
export declare enum EOrderType {
|
|
113
139
|
TAKE_AWAY = "TAKE_AWAY",
|
|
114
140
|
DELIVERY = "DELIVERY",
|
|
115
141
|
DINE_IN = "DINE_IN",
|
|
@@ -135,7 +161,7 @@ export interface OrderDeliveryAddress {
|
|
|
135
161
|
city: string;
|
|
136
162
|
country: string;
|
|
137
163
|
}
|
|
138
|
-
export interface
|
|
164
|
+
export interface IOrder {
|
|
139
165
|
tenant: string;
|
|
140
166
|
id: string;
|
|
141
167
|
extId?: string;
|
|
@@ -150,8 +176,8 @@ export interface Order {
|
|
|
150
176
|
source: string;
|
|
151
177
|
users?: User[];
|
|
152
178
|
loyaltyId?: string;
|
|
153
|
-
coupons?:
|
|
154
|
-
orderType:
|
|
179
|
+
coupons?: IOrderCoupon[];
|
|
180
|
+
orderType: EOrderType;
|
|
155
181
|
deliveryAddress?: OrderDeliveryAddress;
|
|
156
182
|
geoPosition?: {
|
|
157
183
|
lat: number;
|
|
@@ -159,25 +185,25 @@ export interface Order {
|
|
|
159
185
|
};
|
|
160
186
|
total: string;
|
|
161
187
|
editTotal: string;
|
|
162
|
-
status:
|
|
188
|
+
status: EOrderStatus;
|
|
163
189
|
statusInfo?: string;
|
|
164
190
|
comments?: OrderComment[];
|
|
165
191
|
claimCode?: string;
|
|
166
|
-
buckets:
|
|
192
|
+
buckets: IOrderInBucket[];
|
|
167
193
|
payments?: OrderPayment[];
|
|
168
|
-
fiscal?:
|
|
169
|
-
tax:
|
|
170
|
-
extra?:
|
|
194
|
+
fiscal?: IOrderFiscal[];
|
|
195
|
+
tax: ITaxSummary[];
|
|
196
|
+
extra?: IOrderExtra;
|
|
171
197
|
traces?: {
|
|
172
198
|
[propName: string]: string;
|
|
173
199
|
};
|
|
174
|
-
logs?:
|
|
200
|
+
logs?: IOrderLog[];
|
|
175
201
|
locked?: boolean;
|
|
176
202
|
completed?: boolean;
|
|
177
203
|
verified?: boolean;
|
|
178
204
|
closed?: boolean;
|
|
179
205
|
}
|
|
180
|
-
export interface
|
|
206
|
+
export interface IOrderCoupon {
|
|
181
207
|
coupon: string;
|
|
182
208
|
addedAt: string;
|
|
183
209
|
addedBy: string;
|
|
@@ -190,7 +216,7 @@ export interface OrderCoupon {
|
|
|
190
216
|
userId?: string;
|
|
191
217
|
};
|
|
192
218
|
}
|
|
193
|
-
export declare enum
|
|
219
|
+
export declare enum EOrderStatus {
|
|
194
220
|
NEW = "NEW",
|
|
195
221
|
COMPLETED = "COMPLETED",
|
|
196
222
|
VERIFIED = "VERIFIED",
|
|
@@ -208,13 +234,13 @@ export interface OrderComment {
|
|
|
208
234
|
comment: string;
|
|
209
235
|
extra?: Extra;
|
|
210
236
|
}
|
|
211
|
-
export interface
|
|
237
|
+
export interface IOrderInBucket {
|
|
212
238
|
venue: string;
|
|
213
239
|
sync: boolean;
|
|
214
240
|
syncId: string;
|
|
215
241
|
name: string;
|
|
216
242
|
menu: string;
|
|
217
|
-
lines:
|
|
243
|
+
lines: IOrderLine[];
|
|
218
244
|
priceList?: string;
|
|
219
245
|
warehouse?: string;
|
|
220
246
|
queuePos?: string;
|
|
@@ -222,7 +248,7 @@ export interface OrderInBucket {
|
|
|
222
248
|
}
|
|
223
249
|
export interface IOrderPayment {
|
|
224
250
|
id: string;
|
|
225
|
-
type:
|
|
251
|
+
type: EOrderPaymentType;
|
|
226
252
|
source: string;
|
|
227
253
|
amount: number;
|
|
228
254
|
initialAmount?: number;
|
|
@@ -230,7 +256,7 @@ export interface IOrderPayment {
|
|
|
230
256
|
timestamp?: string;
|
|
231
257
|
extra?: Extra;
|
|
232
258
|
}
|
|
233
|
-
export declare enum
|
|
259
|
+
export declare enum EOrderPaymentType {
|
|
234
260
|
CASH = "CASH",
|
|
235
261
|
CARD = "CARD",
|
|
236
262
|
COD = "COD",
|
|
@@ -244,7 +270,7 @@ export declare enum OrderPaymentType {
|
|
|
244
270
|
}
|
|
245
271
|
export interface OrderPayment {
|
|
246
272
|
id: string;
|
|
247
|
-
type:
|
|
273
|
+
type: EOrderPaymentType;
|
|
248
274
|
source: string;
|
|
249
275
|
amount: number;
|
|
250
276
|
initialAmount?: number;
|
|
@@ -252,7 +278,7 @@ export interface OrderPayment {
|
|
|
252
278
|
timestamp?: string;
|
|
253
279
|
extra?: Extra;
|
|
254
280
|
}
|
|
255
|
-
export interface
|
|
281
|
+
export interface IOrderFiscal {
|
|
256
282
|
timestamp: string;
|
|
257
283
|
user?: string;
|
|
258
284
|
venue?: string;
|
|
@@ -270,7 +296,7 @@ export interface OrderFiscal {
|
|
|
270
296
|
[propName: string]: number;
|
|
271
297
|
};
|
|
272
298
|
}
|
|
273
|
-
export interface
|
|
299
|
+
export interface ITaxSummary {
|
|
274
300
|
rate: string;
|
|
275
301
|
confirmed?: boolean;
|
|
276
302
|
netto: number;
|
|
@@ -280,7 +306,7 @@ export interface TaxSummary {
|
|
|
280
306
|
/**
|
|
281
307
|
* OrderExtra interface
|
|
282
308
|
*
|
|
283
|
-
* @interface
|
|
309
|
+
* @interface IOrderExtra
|
|
284
310
|
* @manual-verify {string} order needs manual verification
|
|
285
311
|
* @x-collect-time {string} estimated pickup time from aggregator
|
|
286
312
|
* @courier-name {string} courier name from aggregator
|
|
@@ -292,7 +318,7 @@ export interface TaxSummary {
|
|
|
292
318
|
* @x-agg-id {string} order ID from aggregator
|
|
293
319
|
* @support-order-id {string} order code from aggregator to be used with support and same as seen by customer,
|
|
294
320
|
*/
|
|
295
|
-
export interface
|
|
321
|
+
export interface IOrderExtra {
|
|
296
322
|
"x-source"?: OrderSource;
|
|
297
323
|
"x-source-type"?: "INTEGRATOR";
|
|
298
324
|
"manual-verify"?: string;
|
|
@@ -305,31 +331,31 @@ export interface OrderExtra {
|
|
|
305
331
|
allergies?: string;
|
|
306
332
|
"x-agg-id"?: string;
|
|
307
333
|
"support-order-id"?: string;
|
|
308
|
-
|
|
334
|
+
"x-pos-id"?: string;
|
|
309
335
|
}
|
|
310
|
-
export interface
|
|
336
|
+
export interface IOrderLog {
|
|
311
337
|
timestamp?: string;
|
|
312
338
|
user?: string;
|
|
313
339
|
ip?: string;
|
|
314
340
|
message?: string;
|
|
315
341
|
lines?: string[];
|
|
316
342
|
}
|
|
317
|
-
export interface
|
|
343
|
+
export interface IOrderLine {
|
|
318
344
|
bom?: Object;
|
|
319
345
|
comments?: OrderComment[];
|
|
320
346
|
created: string;
|
|
321
347
|
creator?: string;
|
|
322
|
-
discounts?:
|
|
348
|
+
discounts?: IDiscount[];
|
|
323
349
|
extra: Extra;
|
|
324
350
|
hash: string;
|
|
325
351
|
id: string;
|
|
326
352
|
price: string;
|
|
327
|
-
product:
|
|
328
|
-
productConfig:
|
|
353
|
+
product: IOrderProduct;
|
|
354
|
+
productConfig: IProductState;
|
|
329
355
|
productId: string;
|
|
330
356
|
quantity: number;
|
|
331
357
|
source: string;
|
|
332
|
-
status:
|
|
358
|
+
status: EOrderLineStatus;
|
|
333
359
|
total: string;
|
|
334
360
|
updated: string;
|
|
335
361
|
}
|
|
@@ -356,27 +382,17 @@ export declare enum OrderSource {
|
|
|
356
382
|
UBER = "UBER",
|
|
357
383
|
BOLT = "BOLT"
|
|
358
384
|
}
|
|
359
|
-
export interface
|
|
360
|
-
id: string;
|
|
361
|
-
kind: OrderProductKind;
|
|
362
|
-
literals: ProductLiterals;
|
|
363
|
-
items?: OrderProduct[];
|
|
364
|
-
img: string;
|
|
365
|
-
quantity: number;
|
|
366
|
-
price: number;
|
|
367
|
-
extra: Extra;
|
|
368
|
-
}
|
|
369
|
-
export interface OrderProduct {
|
|
385
|
+
export interface IOrderProduct {
|
|
370
386
|
id: string;
|
|
371
|
-
kind:
|
|
372
|
-
literals:
|
|
373
|
-
items?:
|
|
387
|
+
kind: EOrderProductKind;
|
|
388
|
+
literals: IProductLiterals;
|
|
389
|
+
items?: IOrderProduct[];
|
|
374
390
|
img: string;
|
|
375
391
|
quantity: number;
|
|
376
392
|
price: number;
|
|
377
393
|
extra: Extra;
|
|
378
394
|
}
|
|
379
|
-
export declare enum
|
|
395
|
+
export declare enum EOrderLineStatus {
|
|
380
396
|
NEW = "NEW",
|
|
381
397
|
TECHNICAL = "TECHNICAL",
|
|
382
398
|
CONFIRMED = "CONFIRMED",
|
|
@@ -385,7 +401,7 @@ export declare enum OrderLineStatus {
|
|
|
385
401
|
VOID = "VOID",
|
|
386
402
|
WASTE = "WASTE"
|
|
387
403
|
}
|
|
388
|
-
export interface
|
|
404
|
+
export interface IDiscount {
|
|
389
405
|
layer: string;
|
|
390
406
|
name?: string;
|
|
391
407
|
discountPrice: number;
|
|
@@ -394,15 +410,15 @@ export interface Discount {
|
|
|
394
410
|
path?: string;
|
|
395
411
|
price: number;
|
|
396
412
|
}
|
|
397
|
-
export declare enum
|
|
413
|
+
export declare enum EOrderProductKind {
|
|
398
414
|
GROUP = "group",
|
|
399
415
|
PRODUCT = "product"
|
|
400
416
|
}
|
|
401
|
-
export interface
|
|
417
|
+
export interface IProductLiterals {
|
|
402
418
|
[propName: string]: any;
|
|
403
419
|
}
|
|
404
|
-
type
|
|
405
|
-
export type
|
|
420
|
+
declare type TWeekDay = "MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN";
|
|
421
|
+
export declare type TSaleChannelWeek = Partial<Record<TWeekDay, {
|
|
406
422
|
from: string;
|
|
407
423
|
to: string;
|
|
408
424
|
}[]>>;
|
|
@@ -410,7 +426,7 @@ export interface SaleChannel {
|
|
|
410
426
|
active?: boolean;
|
|
411
427
|
minDeliveryTime?: string;
|
|
412
428
|
minOrderValue?: string;
|
|
413
|
-
week?:
|
|
429
|
+
week?: TSaleChannelWeek;
|
|
414
430
|
}
|
|
415
431
|
export declare enum EChannelName {
|
|
416
432
|
DINE_IN = "DINE_IN",
|
|
@@ -422,7 +438,7 @@ export declare enum EChannelName {
|
|
|
422
438
|
BOLT_DELIVERY = "BOLT_DELIVERY",
|
|
423
439
|
WOLT_DELIVERY = "WOLT_DELIVERY"
|
|
424
440
|
}
|
|
425
|
-
export interface
|
|
441
|
+
export interface IVenueConfig {
|
|
426
442
|
active: boolean;
|
|
427
443
|
address: {
|
|
428
444
|
city: string;
|
|
@@ -434,7 +450,7 @@ export interface VenueConfig {
|
|
|
434
450
|
channelConstraints: Partial<Record<EChannelName, SaleChannel>>;
|
|
435
451
|
device: Record<string, Record<string, string>>;
|
|
436
452
|
extra: Record<string, string>;
|
|
437
|
-
geoPosition:
|
|
453
|
+
geoPosition: IGeoPosition;
|
|
438
454
|
id: string;
|
|
439
455
|
menu: string;
|
|
440
456
|
name: string;
|
|
@@ -454,7 +470,7 @@ export interface IFiscalEntry {
|
|
|
454
470
|
export interface IFiscalData {
|
|
455
471
|
amount: string;
|
|
456
472
|
entries: IFiscalEntry[];
|
|
457
|
-
payments: Partial<Record<
|
|
473
|
+
payments: Partial<Record<EOrderPaymentType, string>>;
|
|
458
474
|
timestamp: string;
|
|
459
475
|
}
|
|
460
476
|
/**
|
package/dist/cjs/index.js
CHANGED
|
@@ -14,14 +14,14 @@ 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.
|
|
17
|
+
exports.EChannelName = exports.EOrderProductKind = exports.EOrderLineStatus = exports.OrderSource = exports.EOrderPaymentType = exports.EOrderStatus = exports.EOrderType = exports.EProductKindBucket = exports.EProductKind = exports.ECouponViewType = void 0;
|
|
18
18
|
__exportStar(require("./kiosk"), exports);
|
|
19
|
-
var
|
|
20
|
-
(function (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
})(
|
|
19
|
+
var ECouponViewType;
|
|
20
|
+
(function (ECouponViewType) {
|
|
21
|
+
ECouponViewType["CAROUSEL"] = "carousel";
|
|
22
|
+
ECouponViewType["NORMAL"] = "normal";
|
|
23
|
+
ECouponViewType["IMAGE"] = "image";
|
|
24
|
+
})(ECouponViewType = exports.ECouponViewType || (exports.ECouponViewType = {}));
|
|
25
25
|
var EProductKind;
|
|
26
26
|
(function (EProductKind) {
|
|
27
27
|
EProductKind["GROUP"] = "3e/group";
|
|
@@ -38,50 +38,50 @@ var EProductKindBucket;
|
|
|
38
38
|
EProductKindBucket["GROUP"] = "group";
|
|
39
39
|
EProductKindBucket["PRODUCT"] = "product";
|
|
40
40
|
})(EProductKindBucket = exports.EProductKindBucket || (exports.EProductKindBucket = {}));
|
|
41
|
-
var
|
|
42
|
-
(function (
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
})(
|
|
60
|
-
var
|
|
61
|
-
(function (
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
})(
|
|
72
|
-
var
|
|
73
|
-
(function (
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
})(
|
|
41
|
+
var EOrderType;
|
|
42
|
+
(function (EOrderType) {
|
|
43
|
+
EOrderType["TAKE_AWAY"] = "TAKE_AWAY";
|
|
44
|
+
EOrderType["DELIVERY"] = "DELIVERY";
|
|
45
|
+
EOrderType["DINE_IN"] = "DINE_IN";
|
|
46
|
+
EOrderType["DINE_IN_OPEN"] = "DINE_IN_OPEN";
|
|
47
|
+
EOrderType["GLOVO_DELIVERY"] = "GLOVO_DELIVERY";
|
|
48
|
+
EOrderType["GLOVO_TAKE_AWAY"] = "GLOVO_TAKE_AWAY";
|
|
49
|
+
EOrderType["JUSTEAT_DELIVERY"] = "JUSTEAT_DELIVERY";
|
|
50
|
+
EOrderType["JUSTEAT_TAKE_AWAY"] = "JUSTEAT_TAKE_AWAY";
|
|
51
|
+
EOrderType["UBER_DELIVERY"] = "UBER_DELIVERY";
|
|
52
|
+
EOrderType["UBER_TAKE_AWAY"] = "UBER_TAKE_AWAY";
|
|
53
|
+
EOrderType["UBER_DINE_IN"] = "UBER_DINE_IN";
|
|
54
|
+
EOrderType["BOLT_DELIVERY"] = "BOLT_DELIVERY";
|
|
55
|
+
EOrderType["BOLT_TAKE_AWAY"] = "BOLT_TAKE_AWAY";
|
|
56
|
+
EOrderType["WOLT_DELIVERY"] = "WOLT_DELIVERY";
|
|
57
|
+
EOrderType["WOLT_TAKE_AWAY"] = "WOLT_TAKE_AWAY";
|
|
58
|
+
EOrderType["WOLT_DINE_IN"] = "WOLT_DINE_IN";
|
|
59
|
+
})(EOrderType = exports.EOrderType || (exports.EOrderType = {}));
|
|
60
|
+
var EOrderStatus;
|
|
61
|
+
(function (EOrderStatus) {
|
|
62
|
+
EOrderStatus["NEW"] = "NEW";
|
|
63
|
+
EOrderStatus["COMPLETED"] = "COMPLETED";
|
|
64
|
+
EOrderStatus["VERIFIED"] = "VERIFIED";
|
|
65
|
+
EOrderStatus["DELIVER"] = "DELIVER";
|
|
66
|
+
EOrderStatus["DELIVERED"] = "DELIVERED";
|
|
67
|
+
EOrderStatus["CLOSED"] = "CLOSED";
|
|
68
|
+
EOrderStatus["ABANDONED"] = "ABANDONED";
|
|
69
|
+
EOrderStatus["CANCELLED"] = "CANCELLED";
|
|
70
|
+
EOrderStatus["PICKED"] = "PICKED";
|
|
71
|
+
})(EOrderStatus = exports.EOrderStatus || (exports.EOrderStatus = {}));
|
|
72
|
+
var EOrderPaymentType;
|
|
73
|
+
(function (EOrderPaymentType) {
|
|
74
|
+
EOrderPaymentType["CASH"] = "CASH";
|
|
75
|
+
EOrderPaymentType["CARD"] = "CARD";
|
|
76
|
+
EOrderPaymentType["COD"] = "COD";
|
|
77
|
+
EOrderPaymentType["TERMINAL"] = "TERMINAL";
|
|
78
|
+
EOrderPaymentType["EPAYMENT"] = "EPAYMENT";
|
|
79
|
+
EOrderPaymentType["COUPON"] = "COUPON";
|
|
80
|
+
EOrderPaymentType["WALLET"] = "WALLET";
|
|
81
|
+
EOrderPaymentType["PREAUTHORIZED"] = "PREAUTHORIZED";
|
|
82
|
+
EOrderPaymentType["RETURN"] = "RETURN";
|
|
83
|
+
EOrderPaymentType["EXTERNAL"] = "EXTERNAL";
|
|
84
|
+
})(EOrderPaymentType = exports.EOrderPaymentType || (exports.EOrderPaymentType = {}));
|
|
85
85
|
var OrderSource;
|
|
86
86
|
(function (OrderSource) {
|
|
87
87
|
OrderSource["KIOSK"] = "KIOSK";
|
|
@@ -93,21 +93,21 @@ var OrderSource;
|
|
|
93
93
|
OrderSource["UBER"] = "UBER";
|
|
94
94
|
OrderSource["BOLT"] = "BOLT";
|
|
95
95
|
})(OrderSource = exports.OrderSource || (exports.OrderSource = {}));
|
|
96
|
-
var
|
|
97
|
-
(function (
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
})(
|
|
106
|
-
var
|
|
107
|
-
(function (
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
})(
|
|
96
|
+
var EOrderLineStatus;
|
|
97
|
+
(function (EOrderLineStatus) {
|
|
98
|
+
EOrderLineStatus["NEW"] = "NEW";
|
|
99
|
+
EOrderLineStatus["TECHNICAL"] = "TECHNICAL";
|
|
100
|
+
EOrderLineStatus["CONFIRMED"] = "CONFIRMED";
|
|
101
|
+
EOrderLineStatus["PROCESSING"] = "PROCESSING";
|
|
102
|
+
EOrderLineStatus["PROCESSED"] = "PROCESSED";
|
|
103
|
+
EOrderLineStatus["VOID"] = "VOID";
|
|
104
|
+
EOrderLineStatus["WASTE"] = "WASTE";
|
|
105
|
+
})(EOrderLineStatus = exports.EOrderLineStatus || (exports.EOrderLineStatus = {}));
|
|
106
|
+
var EOrderProductKind;
|
|
107
|
+
(function (EOrderProductKind) {
|
|
108
|
+
EOrderProductKind["GROUP"] = "group";
|
|
109
|
+
EOrderProductKind["PRODUCT"] = "product";
|
|
110
|
+
})(EOrderProductKind = exports.EOrderProductKind || (exports.EOrderProductKind = {}));
|
|
111
111
|
var EChannelName;
|
|
112
112
|
(function (EChannelName) {
|
|
113
113
|
EChannelName["DINE_IN"] = "DINE_IN";
|
package/dist/cjs/kiosk.d.ts
CHANGED
|
@@ -1,10 +1,80 @@
|
|
|
1
|
+
import React, { ReactElement } from "react";
|
|
2
|
+
import { IProduct, IOrder } from "./index";
|
|
3
|
+
import { UseTransitionProps } from "react-spring";
|
|
1
4
|
export declare enum EPaymentStatus {
|
|
2
5
|
UNINITIALIZED = "UNINITIALIZED",
|
|
3
6
|
PROCESSING = "PROCESSING",
|
|
4
7
|
PAID = "PAID",
|
|
8
|
+
FAILED = "FAILED",
|
|
5
9
|
PRINTING_RECEIPT = "PRINTING_RECEIPT",
|
|
6
10
|
PRINTING_RECEIPT_SUCCESS = "PRINTING_RECEIPT_SUCCESS",
|
|
7
11
|
SENDING_RECEIPT = "SENDING_RECEIPT",
|
|
8
12
|
SENDING_RECEIPT_SUCCESS = "SENDING_RECEIPT_SUCCESS",
|
|
9
13
|
ERROR = "ERROR"
|
|
10
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Theme interface
|
|
17
|
+
* @interface Theme
|
|
18
|
+
* @
|
|
19
|
+
*/
|
|
20
|
+
export interface ITheme {
|
|
21
|
+
'--color-primary': string;
|
|
22
|
+
'--color-primary-light': string;
|
|
23
|
+
'--color-primary-dark': string;
|
|
24
|
+
'--color-secondary': string;
|
|
25
|
+
'--color-grey-light': string;
|
|
26
|
+
'--color-red': string;
|
|
27
|
+
'--color-red-light': string;
|
|
28
|
+
'--fontFamily': string;
|
|
29
|
+
'--fontFamily-upper': string;
|
|
30
|
+
'--color-background': string;
|
|
31
|
+
'--color-btn-primary': string;
|
|
32
|
+
'--color-btn-secondary': string;
|
|
33
|
+
'--color-btn-disabled': string;
|
|
34
|
+
'--font-color-btn-primary': string;
|
|
35
|
+
'--font-color-btn-secondary': string;
|
|
36
|
+
'--font-color-btn-disabled': string;
|
|
37
|
+
'--product-tile-border-color': string;
|
|
38
|
+
[property: string]: string;
|
|
39
|
+
}
|
|
40
|
+
export interface IMenuProps {
|
|
41
|
+
menu: IProduct[];
|
|
42
|
+
handleSelectProduct: (product: IProduct | string) => void;
|
|
43
|
+
Header?: ReactElement;
|
|
44
|
+
Logo?: ReactElement;
|
|
45
|
+
TopNav?: ReactElement;
|
|
46
|
+
BottomNav?: ReactElement;
|
|
47
|
+
MenuTile?: React.FC<IMenuTileProps>;
|
|
48
|
+
CategorySection?: React.FC<IMenuCategorySectionProps>;
|
|
49
|
+
fallbackImg: string;
|
|
50
|
+
lazyLoadImg?: boolean;
|
|
51
|
+
currency?: string;
|
|
52
|
+
timeZone?: string;
|
|
53
|
+
availabilityMarkOnly?: boolean;
|
|
54
|
+
availabilityCheckInterval?: number;
|
|
55
|
+
cols?: number;
|
|
56
|
+
colsLg?: number;
|
|
57
|
+
stacking: 'vertical' | 'horizontal';
|
|
58
|
+
transitionProps?: UseTransitionProps;
|
|
59
|
+
onMenuCategoryViewed?: (category: IProduct) => void;
|
|
60
|
+
goToCheckout: () => void;
|
|
61
|
+
goToStart: () => void;
|
|
62
|
+
order?: IOrder;
|
|
63
|
+
}
|
|
64
|
+
export interface IMenuTileProps {
|
|
65
|
+
product: IProduct;
|
|
66
|
+
onProductClicked: (product: IProduct | string) => void;
|
|
67
|
+
fallbackImg: string;
|
|
68
|
+
currency?: string;
|
|
69
|
+
lazyLoadImg?: boolean;
|
|
70
|
+
}
|
|
71
|
+
export interface IMenuCategorySectionProps {
|
|
72
|
+
category: IProduct;
|
|
73
|
+
onProductClicked: (IProduct: IProduct | string) => void;
|
|
74
|
+
fallbackImg: string;
|
|
75
|
+
lazyLoadImg?: boolean;
|
|
76
|
+
currency?: string;
|
|
77
|
+
cols?: number;
|
|
78
|
+
colsLg?: number;
|
|
79
|
+
MenuTile?: React.FC<IMenuTileProps>;
|
|
80
|
+
}
|
package/dist/cjs/kiosk.js
CHANGED
|
@@ -6,6 +6,7 @@ var EPaymentStatus;
|
|
|
6
6
|
EPaymentStatus["UNINITIALIZED"] = "UNINITIALIZED";
|
|
7
7
|
EPaymentStatus["PROCESSING"] = "PROCESSING";
|
|
8
8
|
EPaymentStatus["PAID"] = "PAID";
|
|
9
|
+
EPaymentStatus["FAILED"] = "FAILED";
|
|
9
10
|
EPaymentStatus["PRINTING_RECEIPT"] = "PRINTING_RECEIPT";
|
|
10
11
|
EPaymentStatus["PRINTING_RECEIPT_SUCCESS"] = "PRINTING_RECEIPT_SUCCESS";
|
|
11
12
|
EPaymentStatus["SENDING_RECEIPT"] = "SENDING_RECEIPT";
|