@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.
@@ -2,41 +2,41 @@ export * from "./kiosk";
2
2
  export interface Restaurant {
3
3
  id: string;
4
4
  name: string;
5
- geoPosition: GeoPosition;
6
- address: Address;
5
+ geoPosition: IGeoPosition;
6
+ address: IAddress;
7
7
  }
8
- export interface GeoPosition {
8
+ export interface IGeoPosition {
9
9
  lat: number;
10
10
  lng: number;
11
11
  }
12
- export interface Address {
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 CouponViewType {
19
+ export declare enum ECouponViewType {
20
20
  CAROUSEL = "carousel",
21
21
  NORMAL = "normal",
22
22
  IMAGE = "image"
23
23
  }
24
- export interface Coupon {
24
+ export interface ICoupon {
25
25
  id: string;
26
26
  img: string;
27
- viewType?: CouponViewType;
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 Language {
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 Literals = {
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 Media = {
60
+ export declare type TMedia = {
60
61
  url: string;
61
62
  name: string;
62
63
  };
63
- export type Availability = {
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 type Product = {
73
- availability?: Availability;
72
+ }
73
+ export interface IProduct {
74
+ availability?: IProductAvailability;
74
75
  id: string;
75
76
  img?: string;
76
- items?: Product[];
77
+ items?: IProduct[];
77
78
  kind: EProductKind | EProductKindBucket;
78
- literals?: Literals;
79
+ literals?: TLiterals;
79
80
  details?: {
80
- literals?: Literals;
81
- media?: Media[];
81
+ literals?: TLiterals;
82
+ media?: TMedia[];
82
83
  };
83
- price: string;
84
+ price?: string;
84
85
  minPrice?: string;
85
- quantity: string;
86
- vat: string;
86
+ quantity?: string;
87
+ vat?: string;
87
88
  outsideAvailabilitySlot?: boolean;
88
- state?: ProductConfig;
89
+ state?: IProductState;
89
90
  selCtx: string;
90
- filter?: any;
91
- fltCtx?: any;
92
- };
93
- export type ProductConfig = {
94
- selected: any;
95
- filter: any;
96
- };
97
- export interface Category {
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 OrderType {
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 Order {
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?: OrderCoupon[];
154
- orderType: 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: OrderStatus;
188
+ status: EOrderStatus;
163
189
  statusInfo?: string;
164
190
  comments?: OrderComment[];
165
191
  claimCode?: string;
166
- buckets: OrderInBucket[];
192
+ buckets: IOrderInBucket[];
167
193
  payments?: OrderPayment[];
168
- fiscal?: OrderFiscal[];
169
- tax: TaxSummary[];
170
- extra?: OrderExtra;
194
+ fiscal?: IOrderFiscal[];
195
+ tax: ITaxSummary[];
196
+ extra?: IOrderExtra;
171
197
  traces?: {
172
198
  [propName: string]: string;
173
199
  };
174
- logs?: OrderLog[];
200
+ logs?: IOrderLog[];
175
201
  locked?: boolean;
176
202
  completed?: boolean;
177
203
  verified?: boolean;
178
204
  closed?: boolean;
179
205
  }
180
- export interface OrderCoupon {
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 OrderStatus {
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 OrderInBucket {
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: OrderLine[];
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: OrderPaymentType;
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 OrderPaymentType {
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: OrderPaymentType;
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 OrderFiscal {
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 TaxSummary {
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 OrderExtra
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 OrderExtra {
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
- 'x-pos-id'?: string;
334
+ "x-pos-id"?: string;
309
335
  }
310
- export interface OrderLog {
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 OrderLine {
343
+ export interface IOrderLine {
318
344
  bom?: Object;
319
345
  comments?: OrderComment[];
320
346
  created: string;
321
347
  creator?: string;
322
- discounts?: Discount[];
348
+ discounts?: IDiscount[];
323
349
  extra: Extra;
324
350
  hash: string;
325
351
  id: string;
326
352
  price: string;
327
- product: OrderProduct;
328
- productConfig: ProductConfig;
353
+ product: IOrderProduct;
354
+ productConfig: IProductState;
329
355
  productId: string;
330
356
  quantity: number;
331
357
  source: string;
332
- status: OrderLineStatus;
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 OrderProduct {
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: OrderProductKind;
372
- literals: ProductLiterals;
373
- items?: OrderProduct[];
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 OrderLineStatus {
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 Discount {
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 OrderProductKind {
413
+ export declare enum EOrderProductKind {
398
414
  GROUP = "group",
399
415
  PRODUCT = "product"
400
416
  }
401
- export interface ProductLiterals {
417
+ export interface IProductLiterals {
402
418
  [propName: string]: any;
403
419
  }
404
- type WeekDay = "MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN";
405
- export type SaleChannelWeek = Partial<Record<WeekDay, {
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?: SaleChannelWeek;
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 VenueConfig {
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: 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<OrderPaymentType, string>>;
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.OrderProductKind = exports.OrderLineStatus = exports.OrderSource = exports.OrderPaymentType = exports.OrderStatus = exports.OrderType = exports.EProductKindBucket = exports.EProductKind = exports.CouponViewType = void 0;
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 CouponViewType;
20
- (function (CouponViewType) {
21
- CouponViewType["CAROUSEL"] = "carousel";
22
- CouponViewType["NORMAL"] = "normal";
23
- CouponViewType["IMAGE"] = "image";
24
- })(CouponViewType = exports.CouponViewType || (exports.CouponViewType = {}));
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 OrderType;
42
- (function (OrderType) {
43
- OrderType["TAKE_AWAY"] = "TAKE_AWAY";
44
- OrderType["DELIVERY"] = "DELIVERY";
45
- OrderType["DINE_IN"] = "DINE_IN";
46
- OrderType["DINE_IN_OPEN"] = "DINE_IN_OPEN";
47
- OrderType["GLOVO_DELIVERY"] = "GLOVO_DELIVERY";
48
- OrderType["GLOVO_TAKE_AWAY"] = "GLOVO_TAKE_AWAY";
49
- OrderType["JUSTEAT_DELIVERY"] = "JUSTEAT_DELIVERY";
50
- OrderType["JUSTEAT_TAKE_AWAY"] = "JUSTEAT_TAKE_AWAY";
51
- OrderType["UBER_DELIVERY"] = "UBER_DELIVERY";
52
- OrderType["UBER_TAKE_AWAY"] = "UBER_TAKE_AWAY";
53
- OrderType["UBER_DINE_IN"] = "UBER_DINE_IN";
54
- OrderType["BOLT_DELIVERY"] = "BOLT_DELIVERY";
55
- OrderType["BOLT_TAKE_AWAY"] = "BOLT_TAKE_AWAY";
56
- OrderType["WOLT_DELIVERY"] = "WOLT_DELIVERY";
57
- OrderType["WOLT_TAKE_AWAY"] = "WOLT_TAKE_AWAY";
58
- OrderType["WOLT_DINE_IN"] = "WOLT_DINE_IN";
59
- })(OrderType = exports.OrderType || (exports.OrderType = {}));
60
- var OrderStatus;
61
- (function (OrderStatus) {
62
- OrderStatus["NEW"] = "NEW";
63
- OrderStatus["COMPLETED"] = "COMPLETED";
64
- OrderStatus["VERIFIED"] = "VERIFIED";
65
- OrderStatus["DELIVER"] = "DELIVER";
66
- OrderStatus["DELIVERED"] = "DELIVERED";
67
- OrderStatus["CLOSED"] = "CLOSED";
68
- OrderStatus["ABANDONED"] = "ABANDONED";
69
- OrderStatus["CANCELLED"] = "CANCELLED";
70
- OrderStatus["PICKED"] = "PICKED";
71
- })(OrderStatus = exports.OrderStatus || (exports.OrderStatus = {}));
72
- var OrderPaymentType;
73
- (function (OrderPaymentType) {
74
- OrderPaymentType["CASH"] = "CASH";
75
- OrderPaymentType["CARD"] = "CARD";
76
- OrderPaymentType["COD"] = "COD";
77
- OrderPaymentType["TERMINAL"] = "TERMINAL";
78
- OrderPaymentType["EPAYMENT"] = "EPAYMENT";
79
- OrderPaymentType["COUPON"] = "COUPON";
80
- OrderPaymentType["WALLET"] = "WALLET";
81
- OrderPaymentType["PREAUTHORIZED"] = "PREAUTHORIZED";
82
- OrderPaymentType["RETURN"] = "RETURN";
83
- OrderPaymentType["EXTERNAL"] = "EXTERNAL";
84
- })(OrderPaymentType = exports.OrderPaymentType || (exports.OrderPaymentType = {}));
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 OrderLineStatus;
97
- (function (OrderLineStatus) {
98
- OrderLineStatus["NEW"] = "NEW";
99
- OrderLineStatus["TECHNICAL"] = "TECHNICAL";
100
- OrderLineStatus["CONFIRMED"] = "CONFIRMED";
101
- OrderLineStatus["PROCESSING"] = "PROCESSING";
102
- OrderLineStatus["PROCESSED"] = "PROCESSED";
103
- OrderLineStatus["VOID"] = "VOID";
104
- OrderLineStatus["WASTE"] = "WASTE";
105
- })(OrderLineStatus = exports.OrderLineStatus || (exports.OrderLineStatus = {}));
106
- var OrderProductKind;
107
- (function (OrderProductKind) {
108
- OrderProductKind["GROUP"] = "group";
109
- OrderProductKind["PRODUCT"] = "product";
110
- })(OrderProductKind = exports.OrderProductKind || (exports.OrderProductKind = {}));
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";
@@ -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";