@orderingstack/ordering-types 1.0.19 → 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.
@@ -1,5 +1,5 @@
1
1
  export * from "./kiosk";
2
- export interface Restaurant {
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 StringBoolean = "true" | "false";
39
+ export type TStringBoolean = "true" | "false";
40
40
  export declare enum EProductKind {
41
41
  GROUP = "3e/group",
42
42
  PRODUCT = "3e/product",
@@ -130,16 +130,13 @@ export interface IProductEmit {
130
130
  export interface IProductFilter {
131
131
  [fltCtx: string]: string[];
132
132
  }
133
- export interface Extra {
134
- [propName: string]: any;
135
- }
136
- export interface User {
133
+ export interface IUser {
137
134
  userId: string;
138
135
  roles: string[];
139
136
  name?: string;
140
137
  phone?: string;
141
138
  email?: string;
142
- extra?: Extra;
139
+ extra?: Record<string, string>;
143
140
  }
144
141
  export declare enum EOrderType {
145
142
  TAKE_AWAY = "TAKE_AWAY",
@@ -159,7 +156,7 @@ export declare enum EOrderType {
159
156
  WOLT_TAKE_AWAY = "WOLT_TAKE_AWAY",
160
157
  WOLT_DINE_IN = "WOLT_DINE_IN"
161
158
  }
162
- export interface OrderDeliveryAddress {
159
+ export interface IOrderDeliveryAddress {
163
160
  street: string;
164
161
  number: string;
165
162
  door?: string;
@@ -180,11 +177,11 @@ export interface IOrder {
180
177
  processingStartedTime?: string;
181
178
  deliveredTime?: string;
182
179
  source: string;
183
- users?: User[];
180
+ users?: IUser[];
184
181
  loyaltyId?: string;
185
182
  coupons?: IOrderCoupon[];
186
183
  orderType: EOrderType;
187
- deliveryAddress?: OrderDeliveryAddress;
184
+ deliveryAddress?: IOrderDeliveryAddress;
188
185
  geoPosition?: {
189
186
  lat: number;
190
187
  lng: number;
@@ -193,10 +190,10 @@ export interface IOrder {
193
190
  editTotal: string;
194
191
  status: EOrderStatus;
195
192
  statusInfo?: string;
196
- comments?: OrderComment[];
193
+ comments?: IOrderComment[];
197
194
  claimCode?: string;
198
195
  buckets: IOrderInBucket[];
199
- payments?: OrderPayment[];
196
+ payments?: IOrderPayment[];
200
197
  fiscal?: IOrderFiscal[];
201
198
  tax: ITaxSummary[];
202
199
  extra?: IOrderExtra;
@@ -233,12 +230,12 @@ export declare enum EOrderStatus {
233
230
  CANCELLED = "CANCELLED",
234
231
  PICKED = "PICKED"
235
232
  }
236
- export interface OrderComment {
233
+ export interface IOrderComment {
237
234
  id: string;
238
235
  creator: string;
239
236
  timestamp?: string;
240
237
  comment: string;
241
- extra?: Extra;
238
+ extra?: Record<string, string>;
242
239
  }
243
240
  export interface IOrderInBucket {
244
241
  venue: string;
@@ -250,7 +247,7 @@ export interface IOrderInBucket {
250
247
  priceList?: string;
251
248
  warehouse?: string;
252
249
  queuePos?: string;
253
- extra?: Extra;
250
+ extra?: Record<string, string>;
254
251
  }
255
252
  export interface IOrderPayment {
256
253
  id: string;
@@ -260,7 +257,7 @@ export interface IOrderPayment {
260
257
  initialAmount?: number;
261
258
  user: string;
262
259
  timestamp?: string;
263
- extra?: Extra;
260
+ extra?: Record<string, string>;
264
261
  }
265
262
  export declare enum EOrderPaymentType {
266
263
  CASH = "CASH",
@@ -274,16 +271,6 @@ export declare enum EOrderPaymentType {
274
271
  RETURN = "RETURN",
275
272
  EXTERNAL = "EXTERNAL"
276
273
  }
277
- export interface OrderPayment {
278
- id: string;
279
- type: EOrderPaymentType;
280
- source: string;
281
- amount: number;
282
- initialAmount?: number;
283
- user: string;
284
- timestamp?: string;
285
- extra?: Extra;
286
- }
287
274
  export interface IOrderFiscal {
288
275
  timestamp: string;
289
276
  user?: string;
@@ -293,11 +280,11 @@ export interface IOrderFiscal {
293
280
  slip: string;
294
281
  taxId?: string;
295
282
  message?: string;
296
- entries: SlipEntry[];
283
+ entries: ISlipEntry[];
297
284
  payments?: {
298
285
  [propName: string]: number;
299
286
  };
300
- subTotalDiscounts?: SubTotalDiscount[];
287
+ subTotalDiscounts?: ISubTotalDiscount[];
301
288
  extra: {
302
289
  [propName: string]: number;
303
290
  };
@@ -325,7 +312,7 @@ export interface ITaxSummary {
325
312
  * @support-order-id {string} order code from aggregator to be used with support and same as seen by customer,
326
313
  */
327
314
  export interface IOrderExtra extends Partial<Record<string, string>> {
328
- "x-source"?: OrderSource;
315
+ "x-source"?: EOrderSource;
329
316
  "x-source-type"?: "INTEGRATOR";
330
317
  "manual-verify"?: string;
331
318
  "x-collect-time"?: string;
@@ -349,11 +336,11 @@ export interface IOrderLog {
349
336
  }
350
337
  export interface IOrderLine {
351
338
  bom?: Object;
352
- comments?: OrderComment[];
339
+ comments?: IOrderComment[];
353
340
  created: string;
354
341
  creator?: string;
355
342
  discounts?: IDiscount[];
356
- extra: Extra;
343
+ extra: Record<string, string>;
357
344
  hash: string;
358
345
  id: string;
359
346
  price: string;
@@ -366,7 +353,7 @@ export interface IOrderLine {
366
353
  total: string;
367
354
  updated: string;
368
355
  }
369
- export interface SlipEntry {
356
+ export interface ISlipEntry {
370
357
  item: string;
371
358
  qty: number;
372
359
  price: number;
@@ -374,12 +361,12 @@ export interface SlipEntry {
374
361
  total: number;
375
362
  vat: string;
376
363
  }
377
- export interface SubTotalDiscount {
364
+ export interface ISubTotalDiscount {
378
365
  name: string;
379
366
  discount: number;
380
367
  vat: string;
381
368
  }
382
- export declare enum OrderSource {
369
+ export declare enum EOrderSource {
383
370
  KIOSK = "KIOSK",
384
371
  WEB = "WEB",
385
372
  JUST_EAT_TAKE_AWAY = "JUSTEATTAKEAWAY",
@@ -397,7 +384,7 @@ export interface IOrderProduct {
397
384
  img: string;
398
385
  quantity: string;
399
386
  price: string;
400
- extra: Extra;
387
+ extra: Record<string, string>;
401
388
  }
402
389
  export declare enum EOrderLineStatus {
403
390
  NEW = "NEW",
@@ -429,7 +416,7 @@ export type TSaleChannelWeek = Partial<Record<TWeekDay, {
429
416
  from: string;
430
417
  to: string;
431
418
  }[]>>;
432
- export interface SaleChannel {
419
+ export interface ISaleChannel {
433
420
  active?: boolean;
434
421
  minDeliveryTime?: string;
435
422
  minOrderValue?: string;
@@ -454,7 +441,7 @@ export interface IVenueConfig {
454
441
  postal: string;
455
442
  street: string;
456
443
  };
457
- channelConstraints: Partial<Record<EChannelName, SaleChannel>>;
444
+ channelConstraints: Partial<Record<EChannelName, ISaleChannel>>;
458
445
  device: Record<string, Record<string, string>>;
459
446
  extra: Record<string, string>;
460
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.OrderSource = exports.EOrderPaymentType = exports.EOrderStatus = exports.EOrderType = exports.EProductKindBucket = exports.EProductKind = exports.ECouponViewType = void 0;
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 OrderSource;
86
- (function (OrderSource) {
87
- OrderSource["KIOSK"] = "KIOSK";
88
- OrderSource["WEB"] = "WEB";
89
- OrderSource["JUST_EAT_TAKE_AWAY"] = "JUSTEATTAKEAWAY";
90
- OrderSource["GLOVO"] = "GLOVO";
91
- OrderSource["PYSZNE"] = "PYSZNE";
92
- OrderSource["WOLT"] = "WOLT";
93
- OrderSource["UBER"] = "UBER";
94
- OrderSource["BOLT"] = "BOLT";
95
- })(OrderSource = exports.OrderSource || (exports.OrderSource = {}));
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";
@@ -1,5 +1,5 @@
1
1
  export * from "./kiosk";
2
- export interface Restaurant {
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 StringBoolean = "true" | "false";
39
+ export type TStringBoolean = "true" | "false";
40
40
  export declare enum EProductKind {
41
41
  GROUP = "3e/group",
42
42
  PRODUCT = "3e/product",
@@ -130,16 +130,13 @@ export interface IProductEmit {
130
130
  export interface IProductFilter {
131
131
  [fltCtx: string]: string[];
132
132
  }
133
- export interface Extra {
134
- [propName: string]: any;
135
- }
136
- export interface User {
133
+ export interface IUser {
137
134
  userId: string;
138
135
  roles: string[];
139
136
  name?: string;
140
137
  phone?: string;
141
138
  email?: string;
142
- extra?: Extra;
139
+ extra?: Record<string, string>;
143
140
  }
144
141
  export declare enum EOrderType {
145
142
  TAKE_AWAY = "TAKE_AWAY",
@@ -159,7 +156,7 @@ export declare enum EOrderType {
159
156
  WOLT_TAKE_AWAY = "WOLT_TAKE_AWAY",
160
157
  WOLT_DINE_IN = "WOLT_DINE_IN"
161
158
  }
162
- export interface OrderDeliveryAddress {
159
+ export interface IOrderDeliveryAddress {
163
160
  street: string;
164
161
  number: string;
165
162
  door?: string;
@@ -180,11 +177,11 @@ export interface IOrder {
180
177
  processingStartedTime?: string;
181
178
  deliveredTime?: string;
182
179
  source: string;
183
- users?: User[];
180
+ users?: IUser[];
184
181
  loyaltyId?: string;
185
182
  coupons?: IOrderCoupon[];
186
183
  orderType: EOrderType;
187
- deliveryAddress?: OrderDeliveryAddress;
184
+ deliveryAddress?: IOrderDeliveryAddress;
188
185
  geoPosition?: {
189
186
  lat: number;
190
187
  lng: number;
@@ -193,10 +190,10 @@ export interface IOrder {
193
190
  editTotal: string;
194
191
  status: EOrderStatus;
195
192
  statusInfo?: string;
196
- comments?: OrderComment[];
193
+ comments?: IOrderComment[];
197
194
  claimCode?: string;
198
195
  buckets: IOrderInBucket[];
199
- payments?: OrderPayment[];
196
+ payments?: IOrderPayment[];
200
197
  fiscal?: IOrderFiscal[];
201
198
  tax: ITaxSummary[];
202
199
  extra?: IOrderExtra;
@@ -233,12 +230,12 @@ export declare enum EOrderStatus {
233
230
  CANCELLED = "CANCELLED",
234
231
  PICKED = "PICKED"
235
232
  }
236
- export interface OrderComment {
233
+ export interface IOrderComment {
237
234
  id: string;
238
235
  creator: string;
239
236
  timestamp?: string;
240
237
  comment: string;
241
- extra?: Extra;
238
+ extra?: Record<string, string>;
242
239
  }
243
240
  export interface IOrderInBucket {
244
241
  venue: string;
@@ -250,7 +247,7 @@ export interface IOrderInBucket {
250
247
  priceList?: string;
251
248
  warehouse?: string;
252
249
  queuePos?: string;
253
- extra?: Extra;
250
+ extra?: Record<string, string>;
254
251
  }
255
252
  export interface IOrderPayment {
256
253
  id: string;
@@ -260,7 +257,7 @@ export interface IOrderPayment {
260
257
  initialAmount?: number;
261
258
  user: string;
262
259
  timestamp?: string;
263
- extra?: Extra;
260
+ extra?: Record<string, string>;
264
261
  }
265
262
  export declare enum EOrderPaymentType {
266
263
  CASH = "CASH",
@@ -274,16 +271,6 @@ export declare enum EOrderPaymentType {
274
271
  RETURN = "RETURN",
275
272
  EXTERNAL = "EXTERNAL"
276
273
  }
277
- export interface OrderPayment {
278
- id: string;
279
- type: EOrderPaymentType;
280
- source: string;
281
- amount: number;
282
- initialAmount?: number;
283
- user: string;
284
- timestamp?: string;
285
- extra?: Extra;
286
- }
287
274
  export interface IOrderFiscal {
288
275
  timestamp: string;
289
276
  user?: string;
@@ -293,11 +280,11 @@ export interface IOrderFiscal {
293
280
  slip: string;
294
281
  taxId?: string;
295
282
  message?: string;
296
- entries: SlipEntry[];
283
+ entries: ISlipEntry[];
297
284
  payments?: {
298
285
  [propName: string]: number;
299
286
  };
300
- subTotalDiscounts?: SubTotalDiscount[];
287
+ subTotalDiscounts?: ISubTotalDiscount[];
301
288
  extra: {
302
289
  [propName: string]: number;
303
290
  };
@@ -325,7 +312,7 @@ export interface ITaxSummary {
325
312
  * @support-order-id {string} order code from aggregator to be used with support and same as seen by customer,
326
313
  */
327
314
  export interface IOrderExtra extends Partial<Record<string, string>> {
328
- "x-source"?: OrderSource;
315
+ "x-source"?: EOrderSource;
329
316
  "x-source-type"?: "INTEGRATOR";
330
317
  "manual-verify"?: string;
331
318
  "x-collect-time"?: string;
@@ -349,11 +336,11 @@ export interface IOrderLog {
349
336
  }
350
337
  export interface IOrderLine {
351
338
  bom?: Object;
352
- comments?: OrderComment[];
339
+ comments?: IOrderComment[];
353
340
  created: string;
354
341
  creator?: string;
355
342
  discounts?: IDiscount[];
356
- extra: Extra;
343
+ extra: Record<string, string>;
357
344
  hash: string;
358
345
  id: string;
359
346
  price: string;
@@ -366,7 +353,7 @@ export interface IOrderLine {
366
353
  total: string;
367
354
  updated: string;
368
355
  }
369
- export interface SlipEntry {
356
+ export interface ISlipEntry {
370
357
  item: string;
371
358
  qty: number;
372
359
  price: number;
@@ -374,12 +361,12 @@ export interface SlipEntry {
374
361
  total: number;
375
362
  vat: string;
376
363
  }
377
- export interface SubTotalDiscount {
364
+ export interface ISubTotalDiscount {
378
365
  name: string;
379
366
  discount: number;
380
367
  vat: string;
381
368
  }
382
- export declare enum OrderSource {
369
+ export declare enum EOrderSource {
383
370
  KIOSK = "KIOSK",
384
371
  WEB = "WEB",
385
372
  JUST_EAT_TAKE_AWAY = "JUSTEATTAKEAWAY",
@@ -397,7 +384,7 @@ export interface IOrderProduct {
397
384
  img: string;
398
385
  quantity: string;
399
386
  price: string;
400
- extra: Extra;
387
+ extra: Record<string, string>;
401
388
  }
402
389
  export declare enum EOrderLineStatus {
403
390
  NEW = "NEW",
@@ -429,7 +416,7 @@ export type TSaleChannelWeek = Partial<Record<TWeekDay, {
429
416
  from: string;
430
417
  to: string;
431
418
  }[]>>;
432
- export interface SaleChannel {
419
+ export interface ISaleChannel {
433
420
  active?: boolean;
434
421
  minDeliveryTime?: string;
435
422
  minOrderValue?: string;
@@ -454,7 +441,7 @@ export interface IVenueConfig {
454
441
  postal: string;
455
442
  street: string;
456
443
  };
457
- channelConstraints: Partial<Record<EChannelName, SaleChannel>>;
444
+ channelConstraints: Partial<Record<EChannelName, ISaleChannel>>;
458
445
  device: Record<string, Record<string, string>>;
459
446
  extra: Record<string, string>;
460
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 OrderSource;
69
- (function (OrderSource) {
70
- OrderSource["KIOSK"] = "KIOSK";
71
- OrderSource["WEB"] = "WEB";
72
- OrderSource["JUST_EAT_TAKE_AWAY"] = "JUSTEATTAKEAWAY";
73
- OrderSource["GLOVO"] = "GLOVO";
74
- OrderSource["PYSZNE"] = "PYSZNE";
75
- OrderSource["WOLT"] = "WOLT";
76
- OrderSource["UBER"] = "UBER";
77
- OrderSource["BOLT"] = "BOLT";
78
- })(OrderSource || (OrderSource = {}));
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orderingstack/ordering-types",
3
- "version": "1.0.19",
3
+ "version": "1.1.0",
4
4
  "description": "Typescript types for @orderingstack",
5
5
  "types": "dist/esm/index.d.ts",
6
6
  "main": "dist/cjs/index.js",