@orderingstack/ordering-types 1.12.1 → 1.12.2
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/api.d.ts +45 -1712
- package/dist/cjs/api.js +10 -667
- package/dist/esm/api.d.ts +45 -1712
- package/dist/esm/api.js +9 -664
- package/package.json +1 -1
package/dist/cjs/api.d.ts
CHANGED
|
@@ -1,92 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
/** Bill of material for product */
|
|
36
|
-
export interface BomEntry {
|
|
37
|
-
/** Unit of measure for this product */
|
|
38
|
-
unit: "l" | "m" | "m2" | "m3" | "kg" | "pcs";
|
|
39
|
-
/**
|
|
40
|
-
* Quantity in units of measure
|
|
41
|
-
* @min 0
|
|
42
|
-
* @exclusiveMin false
|
|
43
|
-
*/
|
|
44
|
-
qty: number;
|
|
45
|
-
/**
|
|
46
|
-
* Optional tags to categorize products in BoM
|
|
47
|
-
* @uniqueItems true
|
|
48
|
-
*/
|
|
49
|
-
cat?: string[];
|
|
50
|
-
}
|
|
51
|
-
/** Coupon data */
|
|
52
|
-
export interface CouponData {
|
|
53
|
-
/** @format uuid */
|
|
54
|
-
userId?: string;
|
|
55
|
-
/**
|
|
56
|
-
* @minLength 0
|
|
57
|
-
* @maxLength 128
|
|
58
|
-
* @pattern [a-zA-Z0-9_.-]+
|
|
59
|
-
*/
|
|
60
|
-
couponKey?: string;
|
|
61
|
-
/**
|
|
62
|
-
* @minLength 0
|
|
63
|
-
* @maxLength 128
|
|
64
|
-
* @pattern [a-zA-Z0-9_.-]+
|
|
65
|
-
*/
|
|
66
|
-
enableKey?: string;
|
|
67
|
-
/**
|
|
68
|
-
* @minLength 0
|
|
69
|
-
* @maxLength 128
|
|
70
|
-
* @pattern [a-zA-Z0-9_.-]+
|
|
71
|
-
*/
|
|
72
|
-
productId?: string;
|
|
73
|
-
/**
|
|
74
|
-
* @minLength 0
|
|
75
|
-
* @maxLength 128
|
|
76
|
-
* @pattern [a-zA-Z0-9_.-]+
|
|
77
|
-
*/
|
|
78
|
-
categoryId?: string;
|
|
79
|
-
/**
|
|
80
|
-
* @minLength 0
|
|
81
|
-
* @maxLength 64
|
|
82
|
-
* @pattern [a-zA-Z0-9_.-]+
|
|
83
|
-
*/
|
|
84
|
-
campaign?: string;
|
|
85
|
-
/** Extra params */
|
|
86
|
-
extra?: Record<string, string>;
|
|
1
|
+
import { EOrderPaymentType, EOrderStatus, EOrderType, IProductState, IStringKeyRecord } from "./index";
|
|
2
|
+
export declare const aggregators: readonly ["GLOVO", "JUSTEAT", "UBER", "WOLT", "BOLT", "TAZZ", "_ANY_"];
|
|
3
|
+
export type TAggregator = typeof aggregators[number];
|
|
4
|
+
type TOrderDir = "DESC" | "ASC";
|
|
5
|
+
interface ApiParams {
|
|
6
|
+
query?: any;
|
|
7
|
+
headers?: IStringKeyRecord<string>;
|
|
8
|
+
data?: any;
|
|
9
|
+
}
|
|
10
|
+
export interface IOrderApiGetListParams extends ApiParams {
|
|
11
|
+
query: {
|
|
12
|
+
_sort?: string;
|
|
13
|
+
_order?: TOrderDir;
|
|
14
|
+
_start?: number;
|
|
15
|
+
_end?: number;
|
|
16
|
+
id?: string;
|
|
17
|
+
extId?: string;
|
|
18
|
+
status?: EOrderStatus;
|
|
19
|
+
type?: EOrderType;
|
|
20
|
+
completed?: boolean;
|
|
21
|
+
closed?: boolean;
|
|
22
|
+
phone?: string;
|
|
23
|
+
mail?: string;
|
|
24
|
+
createdFrom?: string;
|
|
25
|
+
createdTo?: string;
|
|
26
|
+
completedFrom?: string;
|
|
27
|
+
completedTo?: string;
|
|
28
|
+
venue?: string;
|
|
29
|
+
aggregator?: TAggregator;
|
|
30
|
+
payment?: EOrderPaymentType;
|
|
31
|
+
};
|
|
32
|
+
headers: {
|
|
33
|
+
"x-tenant"?: string;
|
|
34
|
+
};
|
|
87
35
|
}
|
|
88
|
-
|
|
89
|
-
export interface Discount {
|
|
36
|
+
interface IDiscount {
|
|
90
37
|
/**
|
|
91
38
|
* Discount layer. It is used to distinguish discounts from loyalty, manual discounts, etc.
|
|
92
39
|
* @pattern [a-zA-Z0-9_.-]+
|
|
@@ -101,553 +48,22 @@ export interface Discount {
|
|
|
101
48
|
/** Discount price (subtracted from line total) */
|
|
102
49
|
discountPrice: number;
|
|
103
50
|
/** Extra params */
|
|
104
|
-
extra?:
|
|
51
|
+
extra?: IStringKeyRecord<string>;
|
|
105
52
|
type: string;
|
|
106
53
|
}
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* @minLength 1
|
|
110
|
-
* @maxLength 128
|
|
111
|
-
*/
|
|
112
|
-
product: string;
|
|
113
|
-
/**
|
|
114
|
-
* @minLength 1
|
|
115
|
-
* @maxLength 128
|
|
116
|
-
*/
|
|
117
|
-
path?: string;
|
|
118
|
-
/**
|
|
119
|
-
* @min 0
|
|
120
|
-
* @exclusiveMin false
|
|
121
|
-
*/
|
|
122
|
-
price: number;
|
|
123
|
-
};
|
|
124
|
-
/** Geo position for delivery */
|
|
125
|
-
export interface GeoPosition {
|
|
126
|
-
/** @format double */
|
|
127
|
-
lat: number;
|
|
128
|
-
/** @format double */
|
|
129
|
-
lng: number;
|
|
130
|
-
}
|
|
131
|
-
export type GroupDescription = ItemDescription;
|
|
132
|
-
/** Structures that describe products in placed orders. Only chosen options and subproducts are added in description. */
|
|
133
|
-
export interface ItemDescription {
|
|
134
|
-
id?: string;
|
|
135
|
-
literals?: Record<string, string>;
|
|
136
|
-
img?: string;
|
|
137
|
-
name?: string;
|
|
138
|
-
extra?: Record<string, string>;
|
|
139
|
-
kind: string;
|
|
140
|
-
}
|
|
141
|
-
export type LiteralsMap = Record<string, string>;
|
|
142
|
-
export interface Order {
|
|
143
|
-
/**
|
|
144
|
-
* Tenant identifier
|
|
145
|
-
* @format uuid
|
|
146
|
-
*/
|
|
147
|
-
tenant: string;
|
|
148
|
-
/**
|
|
149
|
-
* Order identifier
|
|
150
|
-
* @format uuid
|
|
151
|
-
*/
|
|
152
|
-
id: string;
|
|
153
|
-
/** Additional identifier */
|
|
154
|
-
extId?: string;
|
|
155
|
-
/**
|
|
156
|
-
* Timestamp of creation
|
|
157
|
-
* @format date-time
|
|
158
|
-
*/
|
|
159
|
-
created: string;
|
|
160
|
-
/**
|
|
161
|
-
* Timestamp of order due (for future orders)
|
|
162
|
-
* @format date-time
|
|
163
|
-
*/
|
|
164
|
-
due?: string;
|
|
165
|
-
/**
|
|
166
|
-
* Estimated Time of Fulfilment, defined as max(due, now + minDeliveryTime)
|
|
167
|
-
* @format date-time
|
|
168
|
-
*/
|
|
169
|
-
etf?: string;
|
|
170
|
-
/**
|
|
171
|
-
* Timestamp of closing order
|
|
172
|
-
* @format date-time
|
|
173
|
-
*/
|
|
174
|
-
closedDate?: string;
|
|
175
|
-
/**
|
|
176
|
-
* Timestamp of last update
|
|
177
|
-
* @format date-time
|
|
178
|
-
*/
|
|
179
|
-
lastChanged?: string;
|
|
180
|
-
/**
|
|
181
|
-
* Timestamp of order completion
|
|
182
|
-
* @format date-time
|
|
183
|
-
*/
|
|
184
|
-
completedTime?: string;
|
|
185
|
-
/**
|
|
186
|
-
* Timestamp of order verification
|
|
187
|
-
* @format date-time
|
|
188
|
-
*/
|
|
189
|
-
verifiedTime?: string;
|
|
190
|
-
/**
|
|
191
|
-
* Timestamp of order processing started (when first line got status above CONFIRMED)
|
|
192
|
-
* @format date-time
|
|
193
|
-
*/
|
|
194
|
-
processingStartedTime?: string;
|
|
195
|
-
/**
|
|
196
|
-
* Timestamp of delivery
|
|
197
|
-
* @format date-time
|
|
198
|
-
*/
|
|
199
|
-
deliveredTime?: string;
|
|
200
|
-
/** Internal system param */
|
|
201
|
-
source: string;
|
|
202
|
-
/** Users involved in this order */
|
|
203
|
-
users?: OrderUser[];
|
|
204
|
-
/** Loyalty card id */
|
|
205
|
-
loyaltyId?: string;
|
|
206
|
-
/** Coupons */
|
|
207
|
-
coupons?: OrderCoupon[];
|
|
208
|
-
/** Order type */
|
|
209
|
-
orderType: "DELIVERY" | "TAKE_AWAY" | "DINE_IN_OPEN" | "DINE_IN" | "GLOVO_DELIVERY" | "GLOVO_TAKE_AWAY" | "JUSTEAT_DELIVERY" | "JUSTEAT_TAKE_AWAY" | "UBER_DELIVERY" | "UBER_TAKE_AWAY" | "UBER_DINE_IN" | "WOLT_DELIVERY" | "WOLT_TAKE_AWAY" | "WOLT_DINE_IN" | "BOLT_DELIVERY" | "BOLT_TAKE_AWAY" | "BOLT_DINE_IN" | "TAZZ_DELIVERY" | "TAZZ_TAKE_AWAY";
|
|
210
|
-
/** Delivery address */
|
|
211
|
-
deliveryAddress?: Address;
|
|
212
|
-
/** Geo position for delivery */
|
|
213
|
-
geoPosition?: GeoPosition;
|
|
214
|
-
/** Order total */
|
|
215
|
-
total: number;
|
|
216
|
-
/** Editing total (including lines that are not confirmed) */
|
|
217
|
-
editTotal: number;
|
|
218
|
-
/** Order status */
|
|
219
|
-
status: string;
|
|
220
|
-
/** Additional status info */
|
|
221
|
-
statusInfo?: string;
|
|
222
|
-
/** Comments */
|
|
223
|
-
comments?: OrderComment[];
|
|
224
|
-
/** Secret code for order claims */
|
|
225
|
-
claimCode?: string;
|
|
226
|
-
/** Buckets with order lines */
|
|
227
|
-
buckets?: OrderBucket[];
|
|
228
|
-
/** Payments for this order */
|
|
229
|
-
payments?: OrderPayment[];
|
|
230
|
-
/** Printed fiscal slips */
|
|
231
|
-
fiscal?: OrderFiscal[];
|
|
232
|
-
/**
|
|
233
|
-
* Tax summary
|
|
234
|
-
* @maxItems 128
|
|
235
|
-
* @minItems 0
|
|
236
|
-
*/
|
|
237
|
-
tax?: TaxSummary[];
|
|
238
|
-
/** Extra params */
|
|
239
|
-
extra?: Record<string, string>;
|
|
240
|
-
/** Traces */
|
|
241
|
-
traces?: Record<string, string>;
|
|
242
|
-
/** Logs */
|
|
243
|
-
logs?: OrderLog[];
|
|
244
|
-
locked?: boolean;
|
|
245
|
-
completed?: boolean;
|
|
246
|
-
verified?: boolean;
|
|
247
|
-
closed?: boolean;
|
|
248
|
-
}
|
|
249
|
-
/** Buckets with order lines */
|
|
250
|
-
export interface OrderBucket {
|
|
251
|
-
/**
|
|
252
|
-
* Venue identifier
|
|
253
|
-
* @pattern [\p{L}\p{N}_.-]+
|
|
254
|
-
*/
|
|
255
|
-
venue: string;
|
|
256
|
-
/** Whether venue is synchronized */
|
|
257
|
-
sync?: boolean;
|
|
258
|
-
/** SynchId of symnchronized venue */
|
|
259
|
-
syncId?: string;
|
|
260
|
-
/** Venue name */
|
|
261
|
-
name?: string;
|
|
262
|
-
/**
|
|
263
|
-
* Menu identifier as set in venue configuration
|
|
264
|
-
* @pattern [\p{L}\p{N}_.-]+
|
|
265
|
-
*/
|
|
266
|
-
menu?: string;
|
|
267
|
-
/** Pricelist as set in venue configuration */
|
|
268
|
-
priceList?: string;
|
|
269
|
-
/**
|
|
270
|
-
* Warehouse id as set in venue configuration
|
|
271
|
-
* @pattern [\p{L}\p{N}_.-]+
|
|
272
|
-
*/
|
|
273
|
-
warehouse?: string;
|
|
274
|
-
/** Order lines for this venue */
|
|
275
|
-
lines?: OrderLine[];
|
|
276
|
-
/** Queue number */
|
|
277
|
-
queuePos?: string;
|
|
278
|
-
/** Extra params */
|
|
279
|
-
extra?: Record<string, string>;
|
|
280
|
-
}
|
|
281
|
-
/** Comments */
|
|
282
|
-
export interface OrderComment {
|
|
283
|
-
/**
|
|
284
|
-
* Comment identifier
|
|
285
|
-
* @format uuid
|
|
286
|
-
*/
|
|
287
|
-
id: string;
|
|
288
|
-
/**
|
|
289
|
-
* Id of user that created comment
|
|
290
|
-
* @format uuid
|
|
291
|
-
*/
|
|
292
|
-
creator: string;
|
|
293
|
-
/**
|
|
294
|
-
* Timestamp of creation
|
|
295
|
-
* @format date-time
|
|
296
|
-
*/
|
|
297
|
-
timestamp?: string;
|
|
298
|
-
/** Comment body */
|
|
299
|
-
comment: string;
|
|
300
|
-
/** Extra params */
|
|
301
|
-
extra?: Record<string, string>;
|
|
302
|
-
}
|
|
303
|
-
/** Coupons */
|
|
304
|
-
export interface OrderCoupon {
|
|
305
|
-
/** @format uuid */
|
|
306
|
-
id: string;
|
|
307
|
-
/**
|
|
308
|
-
* Coupon
|
|
309
|
-
* @minLength 0
|
|
310
|
-
* @maxLength 32
|
|
311
|
-
* @pattern [\p{L}\p{N}_.-]+
|
|
312
|
-
*/
|
|
313
|
-
coupon: string;
|
|
314
|
-
/** @format date-time */
|
|
315
|
-
addedAt: string;
|
|
316
|
-
/** @format uuid */
|
|
317
|
-
addedBy: string;
|
|
318
|
-
/** Coupon data */
|
|
319
|
-
data?: CouponData;
|
|
320
|
-
}
|
|
321
|
-
/** Printed fiscal slips */
|
|
322
|
-
export interface OrderFiscal {
|
|
323
|
-
/** @format date-time */
|
|
324
|
-
timestamp: string;
|
|
325
|
-
/** @format uuid */
|
|
326
|
-
user?: string;
|
|
327
|
-
/** @pattern [\p{L}\p{N}_.-]+ */
|
|
328
|
-
venue?: string;
|
|
329
|
-
amount: number;
|
|
330
|
-
/**
|
|
331
|
-
* @minLength 3
|
|
332
|
-
* @maxLength 64
|
|
333
|
-
*/
|
|
334
|
-
printer: string;
|
|
335
|
-
/**
|
|
336
|
-
* @minLength 3
|
|
337
|
-
* @maxLength 64
|
|
338
|
-
*/
|
|
339
|
-
slip: string;
|
|
340
|
-
/**
|
|
341
|
-
* @minLength 0
|
|
342
|
-
* @maxLength 32
|
|
343
|
-
*/
|
|
344
|
-
taxId?: string;
|
|
345
|
-
/**
|
|
346
|
-
* @minLength 0
|
|
347
|
-
* @maxLength 64
|
|
348
|
-
*/
|
|
349
|
-
message?: string;
|
|
350
|
-
entries?: SlipEntry[];
|
|
351
|
-
payments?: Record<string, number>;
|
|
352
|
-
/**
|
|
353
|
-
* @maxItems 24
|
|
354
|
-
* @minItems 0
|
|
355
|
-
*/
|
|
356
|
-
subTotalDiscounts?: SubTotalDiscount[];
|
|
357
|
-
extra?: Record<string, string>;
|
|
358
|
-
}
|
|
359
|
-
/** Order lines for this venue */
|
|
360
|
-
export interface OrderLine {
|
|
361
|
-
/**
|
|
362
|
-
* Line identifier
|
|
363
|
-
* @format uuid
|
|
364
|
-
*/
|
|
365
|
-
id: string;
|
|
366
|
-
/**
|
|
367
|
-
* User that created line
|
|
368
|
-
* @format uuid
|
|
369
|
-
*/
|
|
370
|
-
creator?: string;
|
|
371
|
-
/**
|
|
372
|
-
* Timestamp of creation
|
|
373
|
-
* @format date-time
|
|
374
|
-
*/
|
|
375
|
-
created: string;
|
|
376
|
-
/**
|
|
377
|
-
* Timestamp of last update
|
|
378
|
-
* @format date-time
|
|
379
|
-
*/
|
|
380
|
-
updated: string;
|
|
381
|
-
source: string;
|
|
382
|
-
/**
|
|
383
|
-
* Quantity of this line
|
|
384
|
-
* @format int32
|
|
385
|
-
* @min 1
|
|
386
|
-
* @max 100000
|
|
387
|
-
*/
|
|
388
|
-
quantity: number;
|
|
389
|
-
/** Item price */
|
|
390
|
-
price?: number;
|
|
391
|
-
/**
|
|
392
|
-
* Identifier of product
|
|
393
|
-
* @pattern [\p{L}\p{N}_.-]+
|
|
394
|
-
*/
|
|
395
|
-
productId: string;
|
|
396
|
-
/** Product description */
|
|
397
|
-
product?: ProductDescription;
|
|
398
|
-
/** Product config */
|
|
399
|
-
productConfig?: object;
|
|
400
|
-
/** Bill of material for product */
|
|
401
|
-
bom?: Record<string, BomEntry>;
|
|
402
|
-
/** Line status */
|
|
403
|
-
status: "NEW" | "TECHNICAL" | "CONFIRMED" | "PROCESSING" | "PROCESSED" | "VOID" | "WASTE";
|
|
404
|
-
/** Comments */
|
|
405
|
-
comments?: OrderComment[];
|
|
54
|
+
interface ILineDiscount {
|
|
406
55
|
/** Applied discounts */
|
|
407
|
-
|
|
408
|
-
/** Extra params. They may come from product definition or can be set with API */
|
|
409
|
-
extra?: Record<string, string>;
|
|
410
|
-
/** Hash of this line. This value allows to merge lines with same product identifier, product config, price and status */
|
|
411
|
-
hash?: string;
|
|
412
|
-
/** Line total. It equals: (price * quantity) - sum(discounts) */
|
|
413
|
-
total?: number;
|
|
414
|
-
}
|
|
415
|
-
/** Logs */
|
|
416
|
-
export interface OrderLog {
|
|
417
|
-
/** @format date-time */
|
|
418
|
-
timestamp?: string;
|
|
419
|
-
/** @format uuid */
|
|
420
|
-
user?: string;
|
|
421
|
-
ip?: string;
|
|
422
|
-
message?: string;
|
|
423
|
-
lines?: string[];
|
|
424
|
-
}
|
|
425
|
-
/** Payments for this order */
|
|
426
|
-
export interface OrderPayment {
|
|
427
|
-
/**
|
|
428
|
-
* Identifier
|
|
429
|
-
* @format uuid
|
|
430
|
-
*/
|
|
431
|
-
id: string;
|
|
432
|
-
/** Payment type */
|
|
433
|
-
type: "CASH" | "CARD" | "COD" | "TERMINAL" | "EPAYMENT" | "COUPON" | "WALLET" | "PREAUTHORIZED" | "RETURN" | "EXTERNAL";
|
|
434
|
-
/**
|
|
435
|
-
* Source of payment
|
|
436
|
-
* @pattern [\p{L}\p{N}_.-]+
|
|
437
|
-
*/
|
|
438
|
-
source: string;
|
|
439
|
-
/** Amount of paid money */
|
|
440
|
-
amount: number;
|
|
441
|
-
/** Initial amount of paid money */
|
|
442
|
-
initialAmount?: number;
|
|
443
|
-
/**
|
|
444
|
-
* User that provided this payment
|
|
445
|
-
* @format uuid
|
|
446
|
-
*/
|
|
447
|
-
user: string;
|
|
448
|
-
/**
|
|
449
|
-
* Timestamp of creation
|
|
450
|
-
* @format date-time
|
|
451
|
-
*/
|
|
452
|
-
timestamp?: string;
|
|
453
|
-
/** Extra params */
|
|
454
|
-
extra?: Record<string, string>;
|
|
455
|
-
}
|
|
456
|
-
/** Users involved in this order */
|
|
457
|
-
export interface OrderUser {
|
|
458
|
-
/**
|
|
459
|
-
* User identifier
|
|
460
|
-
* @format uuid
|
|
461
|
-
*/
|
|
462
|
-
userId: string;
|
|
463
|
-
/**
|
|
464
|
-
* Roles in this order
|
|
465
|
-
* @uniqueItems true
|
|
466
|
-
*/
|
|
467
|
-
roles?: ("CREATOR" | "CUSTOMER" | "COUPON" | "KIOSK" | "WAITER" | "MANAGER" | "VIEWER" | "DRIVER" | "STAFF")[];
|
|
468
|
-
/** User name */
|
|
469
|
-
name?: string;
|
|
470
|
-
/** Phone (contact) */
|
|
471
|
-
phone?: string;
|
|
472
|
-
/** Email (contact) */
|
|
473
|
-
email?: string;
|
|
474
|
-
/** Extra params */
|
|
475
|
-
extra?: Record<string, string>;
|
|
476
|
-
}
|
|
477
|
-
/** Product description */
|
|
478
|
-
export interface ProductDescription {
|
|
479
|
-
id?: string;
|
|
480
|
-
literals?: Record<string, string>;
|
|
481
|
-
img?: string;
|
|
482
|
-
items?: ItemDescription[];
|
|
483
|
-
quantity?: number;
|
|
484
|
-
price?: number;
|
|
485
|
-
vat?: string;
|
|
486
|
-
name?: string;
|
|
487
|
-
extra?: Record<string, string>;
|
|
488
|
-
}
|
|
489
|
-
export interface SlipEntry {
|
|
490
|
-
/**
|
|
491
|
-
* @minLength 1
|
|
492
|
-
* @maxLength 64
|
|
493
|
-
*/
|
|
494
|
-
item: string;
|
|
495
|
-
qty: number;
|
|
496
|
-
price: number;
|
|
497
|
-
discount?: number;
|
|
498
|
-
total: number;
|
|
499
|
-
/**
|
|
500
|
-
* @minLength 1
|
|
501
|
-
* @maxLength 16
|
|
502
|
-
*/
|
|
503
|
-
vat: string;
|
|
504
|
-
}
|
|
505
|
-
export interface SubTotalDiscount {
|
|
506
|
-
/**
|
|
507
|
-
* @minLength 1
|
|
508
|
-
* @maxLength 64
|
|
509
|
-
*/
|
|
510
|
-
name: string;
|
|
511
|
-
/**
|
|
512
|
-
* @max 0
|
|
513
|
-
* @exclusiveMax true
|
|
514
|
-
*/
|
|
515
|
-
discount: number;
|
|
516
|
-
/**
|
|
517
|
-
* @minLength 1
|
|
518
|
-
* @maxLength 16
|
|
519
|
-
*/
|
|
520
|
-
vat: string;
|
|
521
|
-
}
|
|
522
|
-
/** Tax summary */
|
|
523
|
-
export interface TaxSummary {
|
|
524
|
-
/**
|
|
525
|
-
* @minLength 1
|
|
526
|
-
* @maxLength 32
|
|
527
|
-
* @pattern [A-Za-z0-9.]+
|
|
528
|
-
*/
|
|
529
|
-
rate: string;
|
|
530
|
-
confirmed?: boolean;
|
|
531
|
-
/**
|
|
532
|
-
* @min 0
|
|
533
|
-
* @exclusiveMin false
|
|
534
|
-
*/
|
|
535
|
-
netto: number;
|
|
536
|
-
/**
|
|
537
|
-
* @min 0
|
|
538
|
-
* @exclusiveMin false
|
|
539
|
-
*/
|
|
540
|
-
tax: number;
|
|
541
|
-
/**
|
|
542
|
-
* @min 0
|
|
543
|
-
* @exclusiveMin false
|
|
544
|
-
*/
|
|
545
|
-
brutto: number;
|
|
546
|
-
}
|
|
547
|
-
export interface OrdersFilter {
|
|
548
|
-
/**
|
|
549
|
-
* Order by columns
|
|
550
|
-
* @maxItems 16
|
|
551
|
-
* @minItems 0
|
|
552
|
-
*/
|
|
553
|
-
_sort?: string[];
|
|
554
|
-
/**
|
|
555
|
-
* Order directions (ASC/DESC)
|
|
556
|
-
* @maxItems 16
|
|
557
|
-
* @minItems 0
|
|
558
|
-
*/
|
|
559
|
-
_order?: ("ASC" | "DESC")[];
|
|
560
|
-
/**
|
|
561
|
-
* Page start
|
|
562
|
-
* @format int32
|
|
563
|
-
* @min 0
|
|
564
|
-
*/
|
|
565
|
-
_start?: number;
|
|
566
|
-
/**
|
|
567
|
-
* Page end. In some cases it is possible to provide -1 to export all records without pagination.
|
|
568
|
-
* @format int32
|
|
569
|
-
* @min -1
|
|
570
|
-
*/
|
|
571
|
-
_end?: number;
|
|
572
|
-
/** @format uuid */
|
|
573
|
-
id?: string;
|
|
574
|
-
/**
|
|
575
|
-
* @minLength 3
|
|
576
|
-
* @maxLength 16
|
|
577
|
-
* @pattern [a-zA-Z0-9./-]+
|
|
578
|
-
*/
|
|
579
|
-
extId?: string;
|
|
580
|
-
/**
|
|
581
|
-
* @minLength 3
|
|
582
|
-
* @maxLength 32
|
|
583
|
-
* @pattern [a-zA-Z0-9_.-]+
|
|
584
|
-
*/
|
|
585
|
-
status?: string;
|
|
586
|
-
type?: "DELIVERY" | "TAKE_AWAY" | "DINE_IN_OPEN" | "DINE_IN" | "GLOVO_DELIVERY" | "GLOVO_TAKE_AWAY" | "JUSTEAT_DELIVERY" | "JUSTEAT_TAKE_AWAY" | "UBER_DELIVERY" | "UBER_TAKE_AWAY" | "UBER_DINE_IN" | "WOLT_DELIVERY" | "WOLT_TAKE_AWAY" | "WOLT_DINE_IN" | "BOLT_DELIVERY" | "BOLT_TAKE_AWAY" | "BOLT_DINE_IN" | "TAZZ_DELIVERY" | "TAZZ_TAKE_AWAY";
|
|
587
|
-
completed?: boolean;
|
|
588
|
-
closed?: boolean;
|
|
589
|
-
/**
|
|
590
|
-
* @minLength 0
|
|
591
|
-
* @maxLength 32
|
|
592
|
-
* @pattern [0-9 ()+-]+
|
|
593
|
-
*/
|
|
594
|
-
phone?: string;
|
|
595
|
-
/**
|
|
596
|
-
* @minLength 0
|
|
597
|
-
* @maxLength 128
|
|
598
|
-
*/
|
|
599
|
-
mail?: string;
|
|
600
|
-
/** @format date-time */
|
|
601
|
-
createdFrom?: string;
|
|
56
|
+
discount: IDiscount;
|
|
602
57
|
/** @format date-time */
|
|
603
|
-
|
|
604
|
-
/** @format date-time */
|
|
605
|
-
completedFrom?: string;
|
|
606
|
-
/** @format date-time */
|
|
607
|
-
completedTo?: string;
|
|
608
|
-
/**
|
|
609
|
-
* @minLength 0
|
|
610
|
-
* @maxLength 255
|
|
611
|
-
* @pattern [a-zA-Z0-9_.-]+
|
|
612
|
-
*/
|
|
613
|
-
venue?: string;
|
|
614
|
-
aggregator?: "_ANY_" | "GLOVO" | "JUSTEAT" | "UBER" | "WOLT" | "BOLT" | "TAZZ";
|
|
615
|
-
payment?: "CASH" | "CARD" | "COD" | "TERMINAL" | "EPAYMENT" | "COUPON" | "WALLET" | "PREAUTHORIZED" | "RETURN" | "EXTERNAL";
|
|
616
|
-
}
|
|
617
|
-
export interface ApiResponse {
|
|
618
|
-
/** @format uuid */
|
|
619
|
-
correlationId?: string;
|
|
620
|
-
/** @format uuid */
|
|
621
|
-
orderId?: string;
|
|
622
|
-
}
|
|
623
|
-
export interface QueuePosRequest {
|
|
624
|
-
/**
|
|
625
|
-
* @minLength 1
|
|
626
|
-
* @maxLength 128
|
|
627
|
-
* @pattern [\p{L}\p{N}_.-]+
|
|
628
|
-
*/
|
|
629
|
-
venue: string;
|
|
630
|
-
/**
|
|
631
|
-
* @minLength 1
|
|
632
|
-
* @maxLength 32
|
|
633
|
-
* @pattern [a-zA-Z0-9_.-]+
|
|
634
|
-
*/
|
|
635
|
-
queuePos: string;
|
|
636
|
-
}
|
|
637
|
-
export interface AppendedBucket {
|
|
58
|
+
expires?: string;
|
|
638
59
|
/**
|
|
639
60
|
* @minLength 0
|
|
640
61
|
* @maxLength 128
|
|
641
|
-
* @pattern [a-zA-Z0-9_
|
|
642
|
-
*/
|
|
643
|
-
venue: string;
|
|
644
|
-
/**
|
|
645
|
-
* @maxItems 32
|
|
646
|
-
* @minItems 0
|
|
62
|
+
* @pattern [a-zA-Z0-9_. -]+
|
|
647
63
|
*/
|
|
648
|
-
|
|
64
|
+
sign: string;
|
|
649
65
|
}
|
|
650
|
-
export interface
|
|
66
|
+
export interface IAppendedLine {
|
|
651
67
|
/**
|
|
652
68
|
* @format int32
|
|
653
69
|
* @min 1
|
|
@@ -663,7 +79,7 @@ export interface AppendedLine {
|
|
|
663
79
|
/** @pattern [a-zA-Z0-9_.-]+ */
|
|
664
80
|
productId: string;
|
|
665
81
|
/** Configuration of product */
|
|
666
|
-
productConfig?:
|
|
82
|
+
productConfig?: IProductState;
|
|
667
83
|
/** @default "NEW" */
|
|
668
84
|
status: "NEW" | "CONFIRMED";
|
|
669
85
|
/**
|
|
@@ -675,1090 +91,7 @@ export interface AppendedLine {
|
|
|
675
91
|
* @maxItems 10
|
|
676
92
|
* @minItems 0
|
|
677
93
|
*/
|
|
678
|
-
discounts?:
|
|
679
|
-
extra?:
|
|
680
|
-
}
|
|
681
|
-
export interface ContactRequest {
|
|
682
|
-
/**
|
|
683
|
-
* Name to be stored as user contact information
|
|
684
|
-
* @minLength 0
|
|
685
|
-
* @maxLength 64
|
|
686
|
-
*/
|
|
687
|
-
name?: string;
|
|
688
|
-
/**
|
|
689
|
-
* Phone to be stored as user contact information
|
|
690
|
-
* @minLength 0
|
|
691
|
-
* @maxLength 32
|
|
692
|
-
* @pattern [0-9]+
|
|
693
|
-
*/
|
|
694
|
-
phone?: string;
|
|
695
|
-
/**
|
|
696
|
-
* Email to be stored as user contact information
|
|
697
|
-
* @minLength 0
|
|
698
|
-
* @maxLength 128
|
|
699
|
-
*/
|
|
700
|
-
mail?: string;
|
|
701
|
-
}
|
|
702
|
-
export interface LineDiscount {
|
|
703
|
-
/** Applied discounts */
|
|
704
|
-
discount: Discount;
|
|
705
|
-
/** @format date-time */
|
|
706
|
-
expires?: string;
|
|
707
|
-
/**
|
|
708
|
-
* @minLength 0
|
|
709
|
-
* @maxLength 128
|
|
710
|
-
* @pattern [a-zA-Z0-9_. -]+
|
|
711
|
-
*/
|
|
712
|
-
sign: string;
|
|
713
|
-
}
|
|
714
|
-
export interface NewAggregatorOrderRequest {
|
|
715
|
-
orderType: "DELIVERY" | "TAKE_AWAY" | "DINE_IN_OPEN" | "DINE_IN" | "GLOVO_DELIVERY" | "GLOVO_TAKE_AWAY" | "JUSTEAT_DELIVERY" | "JUSTEAT_TAKE_AWAY" | "UBER_DELIVERY" | "UBER_TAKE_AWAY" | "UBER_DINE_IN" | "WOLT_DELIVERY" | "WOLT_TAKE_AWAY" | "WOLT_DINE_IN" | "BOLT_DELIVERY" | "BOLT_TAKE_AWAY" | "BOLT_DINE_IN" | "TAZZ_DELIVERY" | "TAZZ_TAKE_AWAY";
|
|
716
|
-
/** @format date-time */
|
|
717
|
-
due?: string;
|
|
718
|
-
/** Delivery address */
|
|
719
|
-
address?: Address;
|
|
720
|
-
/**
|
|
721
|
-
* @maxItems 5
|
|
722
|
-
* @minItems 0
|
|
723
|
-
*/
|
|
724
|
-
buckets?: AppendedBucket[];
|
|
725
|
-
/**
|
|
726
|
-
* Whether lines referencing invalid products should be discarded and order containing rest of lines should be created (when true) or whole order should be rejected if some lines do not validate (false). Can be used to post historical order again and have all still valid products added.
|
|
727
|
-
* @default false
|
|
728
|
-
*/
|
|
729
|
-
discardInvalidLines?: boolean;
|
|
730
|
-
contact?: ContactRequest;
|
|
731
|
-
extra?: Record<string, string>;
|
|
732
|
-
/**
|
|
733
|
-
* @minLength 0
|
|
734
|
-
* @maxLength 255
|
|
735
|
-
*/
|
|
736
|
-
loyaltyCard?: string;
|
|
737
|
-
payment: Payment;
|
|
738
|
-
/**
|
|
739
|
-
* @minLength 3
|
|
740
|
-
* @maxLength 255
|
|
741
|
-
*/
|
|
742
|
-
comment?: string;
|
|
743
|
-
}
|
|
744
|
-
export interface Payment {
|
|
745
|
-
type: "CASH" | "CARD" | "COD" | "TERMINAL" | "EPAYMENT" | "COUPON" | "WALLET" | "PREAUTHORIZED" | "RETURN" | "EXTERNAL";
|
|
746
|
-
/** @pattern [\p{L}\p{N}_.-]+ */
|
|
747
|
-
source: string;
|
|
748
|
-
extra?: Record<string, string>;
|
|
749
|
-
}
|
|
750
|
-
export interface ApiLinesResponse {
|
|
751
|
-
/** @format uuid */
|
|
752
|
-
correlationId?: string;
|
|
753
|
-
/** @format uuid */
|
|
754
|
-
orderId?: string;
|
|
755
|
-
lines?: string[];
|
|
756
|
-
}
|
|
757
|
-
export interface DueRequest {
|
|
758
|
-
/**
|
|
759
|
-
* Due timestamp of order. Allows to place future orders. Some conditions depending on tenant configuration must be met on how soon or late this timestamp can be.
|
|
760
|
-
* @format date-time
|
|
761
|
-
*/
|
|
762
|
-
due?: string;
|
|
763
|
-
}
|
|
764
|
-
export interface NewOrderRequest {
|
|
765
|
-
orderType: "DELIVERY" | "TAKE_AWAY" | "DINE_IN_OPEN" | "DINE_IN" | "GLOVO_DELIVERY" | "GLOVO_TAKE_AWAY" | "JUSTEAT_DELIVERY" | "JUSTEAT_TAKE_AWAY" | "UBER_DELIVERY" | "UBER_TAKE_AWAY" | "UBER_DINE_IN" | "WOLT_DELIVERY" | "WOLT_TAKE_AWAY" | "WOLT_DINE_IN" | "BOLT_DELIVERY" | "BOLT_TAKE_AWAY" | "BOLT_DINE_IN" | "TAZZ_DELIVERY" | "TAZZ_TAKE_AWAY";
|
|
766
|
-
/** @format date-time */
|
|
767
|
-
due?: string;
|
|
768
|
-
/** Delivery address */
|
|
769
|
-
address?: Address;
|
|
770
|
-
/**
|
|
771
|
-
* @maxItems 5
|
|
772
|
-
* @minItems 0
|
|
773
|
-
*/
|
|
774
|
-
buckets?: AppendedBucket[];
|
|
775
|
-
/**
|
|
776
|
-
* Whether lines referencing invalid products should be discarded and order containing rest of lines should be created (when true) or whole order should be rejected if some lines do not validate (false). Can be used to post historical order again and have all still valid products added.
|
|
777
|
-
* @default false
|
|
778
|
-
*/
|
|
779
|
-
discardInvalidLines?: boolean;
|
|
780
|
-
contact?: ContactRequest;
|
|
781
|
-
extra?: Record<string, string>;
|
|
782
|
-
/**
|
|
783
|
-
* @minLength 0
|
|
784
|
-
* @maxLength 255
|
|
785
|
-
*/
|
|
786
|
-
loyaltyCard?: string;
|
|
787
|
-
}
|
|
788
|
-
export interface AbandonOrderRequest {
|
|
789
|
-
/**
|
|
790
|
-
* @minLength 0
|
|
791
|
-
* @maxLength 128
|
|
792
|
-
*/
|
|
793
|
-
statusInfo?: string;
|
|
794
|
-
}
|
|
795
|
-
export interface CancelOrderRequest {
|
|
796
|
-
/**
|
|
797
|
-
* @minLength 0
|
|
798
|
-
* @maxLength 128
|
|
799
|
-
*/
|
|
800
|
-
statusInfo?: string;
|
|
801
|
-
}
|
|
802
|
-
export interface AbstractOrderEventCommand {
|
|
803
|
-
class: string;
|
|
804
|
-
}
|
|
805
|
-
export interface WebhookRequest {
|
|
806
|
-
commandClass?: string;
|
|
807
|
-
command?: AbstractOrderEventCommand;
|
|
808
|
-
order: Order;
|
|
809
|
-
}
|
|
810
|
-
export interface Details {
|
|
811
|
-
/** Contains literals as hashmap (name='product name', description='product description'). Values which keys match 'some-name-LANGUAGE' are treated as translations and overwrite 'some-name' entry. */
|
|
812
|
-
literals?: Record<string, string>;
|
|
813
|
-
/**
|
|
814
|
-
* Media library with images and other external files. Files should be placed in some CDN.
|
|
815
|
-
* @maxItems 64
|
|
816
|
-
* @minItems 0
|
|
817
|
-
*/
|
|
818
|
-
media?: Media[];
|
|
819
|
-
}
|
|
820
|
-
/** Media library with images and other external files. Files should be placed in some CDN. */
|
|
821
|
-
export interface Media {
|
|
822
|
-
/**
|
|
823
|
-
* @minLength 0
|
|
824
|
-
* @maxLength 256
|
|
825
|
-
*/
|
|
826
|
-
url?: string;
|
|
827
|
-
/**
|
|
828
|
-
* @minLength 1
|
|
829
|
-
* @maxLength 64
|
|
830
|
-
* @pattern [a-zA-Z0-9_.-]+
|
|
831
|
-
*/
|
|
832
|
-
name: string;
|
|
833
|
-
}
|
|
834
|
-
export interface PushUpsellRequest {
|
|
835
|
-
/**
|
|
836
|
-
* @maxItems 8
|
|
837
|
-
* @minItems 0
|
|
838
|
-
*/
|
|
839
|
-
roles?: ("CREATOR" | "CUSTOMER" | "COUPON" | "KIOSK" | "WAITER" | "MANAGER" | "VIEWER" | "DRIVER" | "STAFF")[];
|
|
840
|
-
details?: Details;
|
|
841
|
-
showAs: "ANY" | "POPUP" | "SIDE" | "BASKET";
|
|
842
|
-
/**
|
|
843
|
-
* @maxItems 2147483647
|
|
844
|
-
* @minItems 1
|
|
845
|
-
*/
|
|
846
|
-
items: string[];
|
|
847
|
-
}
|
|
848
|
-
export interface PushMessageRequest {
|
|
849
|
-
/**
|
|
850
|
-
* @maxItems 8
|
|
851
|
-
* @minItems 0
|
|
852
|
-
*/
|
|
853
|
-
roles?: ("CREATOR" | "CUSTOMER" | "COUPON" | "KIOSK" | "WAITER" | "MANAGER" | "VIEWER" | "DRIVER" | "STAFF")[];
|
|
854
|
-
details?: Details;
|
|
855
|
-
/**
|
|
856
|
-
* @minLength 0
|
|
857
|
-
* @maxLength 128
|
|
858
|
-
* @pattern [\p{L}\p{N}_.-]+
|
|
859
|
-
*/
|
|
860
|
-
code?: string;
|
|
861
|
-
/**
|
|
862
|
-
* @minLength 0
|
|
863
|
-
* @maxLength 1024
|
|
864
|
-
*/
|
|
865
|
-
message?: string;
|
|
866
|
-
/**
|
|
867
|
-
* @maxItems 32
|
|
868
|
-
* @minItems 0
|
|
869
|
-
*/
|
|
870
|
-
args?: string[];
|
|
871
|
-
}
|
|
872
|
-
export interface UpsellRequest {
|
|
873
|
-
order?: Order;
|
|
874
|
-
appliedCommands?: string[];
|
|
875
|
-
}
|
|
876
|
-
export interface UpsellResponse {
|
|
877
|
-
details: Details;
|
|
878
|
-
showAs: "ANY" | "POPUP" | "SIDE" | "BASKET";
|
|
879
|
-
/**
|
|
880
|
-
* @maxItems 32
|
|
881
|
-
* @minItems 0
|
|
882
|
-
*/
|
|
883
|
-
items: string[];
|
|
884
|
-
}
|
|
885
|
-
export interface UpsellResponses {
|
|
886
|
-
empty?: boolean;
|
|
887
|
-
}
|
|
888
|
-
export interface SignDiscount {
|
|
889
|
-
/** @pattern [a-zA-Z0-9_.-]+ */
|
|
890
|
-
productId: string;
|
|
891
|
-
discount: LineDiscount;
|
|
892
|
-
}
|
|
893
|
-
export interface SignLineDiscountRequest {
|
|
894
|
-
discounts: Record<string, SignDiscount>;
|
|
895
|
-
}
|
|
896
|
-
export interface LoyaltyRequest {
|
|
897
|
-
order?: Order;
|
|
898
|
-
appliedCommands?: string[];
|
|
899
|
-
}
|
|
900
|
-
export interface AlterPrice {
|
|
901
|
-
/**
|
|
902
|
-
* @minLength 1
|
|
903
|
-
* @maxLength 64
|
|
904
|
-
*/
|
|
905
|
-
description: string;
|
|
906
|
-
/**
|
|
907
|
-
* @minLength 1
|
|
908
|
-
* @maxLength 128
|
|
909
|
-
*/
|
|
910
|
-
product: string;
|
|
911
|
-
/**
|
|
912
|
-
* @minLength 1
|
|
913
|
-
* @maxLength 128
|
|
914
|
-
*/
|
|
915
|
-
path?: string;
|
|
916
|
-
/**
|
|
917
|
-
* @min 0
|
|
918
|
-
* @exclusiveMin false
|
|
919
|
-
*/
|
|
920
|
-
price: number;
|
|
921
|
-
}
|
|
922
|
-
export interface LoyaltyResponse {
|
|
923
|
-
discounts?: Record<string, Discount[]>;
|
|
924
|
-
prices?: Record<string, AlterPrice[]>;
|
|
925
|
-
}
|
|
926
|
-
export interface PaymentRequest {
|
|
927
|
-
type: "CASH" | "CARD" | "COD" | "TERMINAL" | "EPAYMENT" | "COUPON" | "WALLET" | "PREAUTHORIZED" | "RETURN" | "EXTERNAL";
|
|
928
|
-
/** @pattern [\p{L}\p{N}_.-]+ */
|
|
929
|
-
source: string;
|
|
930
|
-
/**
|
|
931
|
-
* @min 0
|
|
932
|
-
* @exclusiveMin false
|
|
933
|
-
*/
|
|
934
|
-
amount: number;
|
|
935
|
-
extra?: Record<string, string>;
|
|
936
|
-
}
|
|
937
|
-
export interface ApiPaymentResponse {
|
|
938
|
-
/** @format uuid */
|
|
939
|
-
correlationId?: string;
|
|
940
|
-
/** @format uuid */
|
|
941
|
-
orderId?: string;
|
|
942
|
-
/** @format uuid */
|
|
943
|
-
paymentId?: string;
|
|
944
|
-
}
|
|
945
|
-
export interface PaymentUpdateRequest {
|
|
946
|
-
/** @format uuid */
|
|
947
|
-
paymentId: string;
|
|
948
|
-
/**
|
|
949
|
-
* Can be NULL then it is not altered in payment record.
|
|
950
|
-
* @min 0
|
|
951
|
-
* @exclusiveMin false
|
|
952
|
-
*/
|
|
953
|
-
amount?: number;
|
|
954
|
-
/** Additional (extra) data. */
|
|
955
|
-
extra?: Record<string, string>;
|
|
956
|
-
}
|
|
957
|
-
export interface ClaimRequest {
|
|
958
|
-
/**
|
|
959
|
-
* Name to be stored as user contact information
|
|
960
|
-
* @minLength 0
|
|
961
|
-
* @maxLength 64
|
|
962
|
-
*/
|
|
963
|
-
name?: string;
|
|
964
|
-
/**
|
|
965
|
-
* Phone to be stored as user contact information
|
|
966
|
-
* @minLength 0
|
|
967
|
-
* @maxLength 32
|
|
968
|
-
* @pattern [0-9]+
|
|
969
|
-
*/
|
|
970
|
-
phone?: string;
|
|
971
|
-
/**
|
|
972
|
-
* Email to be stored as user contact information
|
|
973
|
-
* @minLength 0
|
|
974
|
-
* @maxLength 128
|
|
975
|
-
*/
|
|
976
|
-
mail?: string;
|
|
977
|
-
/**
|
|
978
|
-
* Claim code. Must match code in order.
|
|
979
|
-
* @minLength 0
|
|
980
|
-
* @maxLength 32
|
|
981
|
-
* @pattern [0-9]{0,16}
|
|
982
|
-
* @example ""123456""
|
|
983
|
-
*/
|
|
984
|
-
code: string;
|
|
985
|
-
}
|
|
986
|
-
export interface AttachUserRequest {
|
|
987
|
-
/**
|
|
988
|
-
* Name to be stored as user contact information
|
|
989
|
-
* @minLength 0
|
|
990
|
-
* @maxLength 64
|
|
991
|
-
*/
|
|
992
|
-
name?: string;
|
|
993
|
-
/**
|
|
994
|
-
* Phone to be stored as user contact information
|
|
995
|
-
* @minLength 0
|
|
996
|
-
* @maxLength 32
|
|
997
|
-
* @pattern [0-9]+
|
|
998
|
-
*/
|
|
999
|
-
phone?: string;
|
|
1000
|
-
/**
|
|
1001
|
-
* Email to be stored as user contact information
|
|
1002
|
-
* @minLength 0
|
|
1003
|
-
* @maxLength 128
|
|
1004
|
-
*/
|
|
1005
|
-
mail?: string;
|
|
1006
|
-
/**
|
|
1007
|
-
* User to be attached
|
|
1008
|
-
* @format uuid
|
|
1009
|
-
*/
|
|
1010
|
-
user: string;
|
|
1011
|
-
/**
|
|
1012
|
-
* Roles. Not all roles can be set this way.
|
|
1013
|
-
* @maxItems 10
|
|
1014
|
-
* @minItems 1
|
|
1015
|
-
* @uniqueItems true
|
|
1016
|
-
*/
|
|
1017
|
-
roles: ("CREATOR" | "CUSTOMER" | "COUPON" | "KIOSK" | "WAITER" | "MANAGER" | "VIEWER" | "DRIVER" | "STAFF")[];
|
|
1018
|
-
}
|
|
1019
|
-
export interface ChangeOrderTypeRequest {
|
|
1020
|
-
orderType: "DELIVERY" | "TAKE_AWAY" | "DINE_IN_OPEN" | "DINE_IN" | "GLOVO_DELIVERY" | "GLOVO_TAKE_AWAY" | "JUSTEAT_DELIVERY" | "JUSTEAT_TAKE_AWAY" | "UBER_DELIVERY" | "UBER_TAKE_AWAY" | "UBER_DINE_IN" | "WOLT_DELIVERY" | "WOLT_TAKE_AWAY" | "WOLT_DINE_IN" | "BOLT_DELIVERY" | "BOLT_TAKE_AWAY" | "BOLT_DINE_IN" | "TAZZ_DELIVERY" | "TAZZ_TAKE_AWAY";
|
|
1021
|
-
}
|
|
1022
|
-
export interface AlterOrderExtraRequest {
|
|
1023
|
-
/**
|
|
1024
|
-
* Extra params to add as name:value pairs. Only names starting with 'X-' are allowed.
|
|
1025
|
-
* @example {"X-PARAM":"value"}
|
|
1026
|
-
*/
|
|
1027
|
-
store?: Record<string, string>;
|
|
1028
|
-
/**
|
|
1029
|
-
* Names of extra params to remove
|
|
1030
|
-
* @maxItems 64
|
|
1031
|
-
* @minItems 0
|
|
1032
|
-
* @example "{"X-PARAM"}"
|
|
1033
|
-
*/
|
|
1034
|
-
remove?: string[];
|
|
1035
|
-
}
|
|
1036
|
-
export interface AppendOrderLinesRequest {
|
|
1037
|
-
venue: string;
|
|
1038
|
-
/**
|
|
1039
|
-
* @maxItems 32
|
|
1040
|
-
* @minItems 1
|
|
1041
|
-
*/
|
|
1042
|
-
lines: AppendedLine[];
|
|
1043
|
-
}
|
|
1044
|
-
export interface SetAddressRequest {
|
|
1045
|
-
/** Delivery address */
|
|
1046
|
-
address: Address;
|
|
1047
|
-
}
|
|
1048
|
-
export interface LineQuantity {
|
|
1049
|
-
/** @format uuid */
|
|
1050
|
-
line: string;
|
|
1051
|
-
/**
|
|
1052
|
-
* @format int32
|
|
1053
|
-
* @min 1
|
|
1054
|
-
* @max 100000
|
|
1055
|
-
*/
|
|
1056
|
-
quantity?: number;
|
|
1057
|
-
}
|
|
1058
|
-
export interface OrderLinesQuantitiesRequest {
|
|
1059
|
-
lines: LineQuantity[];
|
|
1060
|
-
}
|
|
1061
|
-
export interface LineSplit {
|
|
1062
|
-
/** @format uuid */
|
|
1063
|
-
line: string;
|
|
1064
|
-
split?: SplitData[];
|
|
1065
|
-
}
|
|
1066
|
-
export interface LinesSplitRequest {
|
|
1067
|
-
/**
|
|
1068
|
-
* @maxItems 2147483647
|
|
1069
|
-
* @minItems 1
|
|
1070
|
-
*/
|
|
1071
|
-
lines: LineSplit[];
|
|
1072
|
-
}
|
|
1073
|
-
export interface SplitData {
|
|
1074
|
-
/** @format uuid */
|
|
1075
|
-
lineId?: string;
|
|
1076
|
-
/**
|
|
1077
|
-
* @format int32
|
|
1078
|
-
* @min 1
|
|
1079
|
-
*/
|
|
1080
|
-
quantity?: number;
|
|
1081
|
-
}
|
|
1082
|
-
export interface LinesAlterExtraRequest {
|
|
1083
|
-
/** Incremental change of extra params in lines */
|
|
1084
|
-
lines: LinesExtra[];
|
|
1085
|
-
}
|
|
1086
|
-
/** Incremental change of extra params in lines */
|
|
1087
|
-
export interface LinesExtra {
|
|
1088
|
-
/**
|
|
1089
|
-
* Line identifier
|
|
1090
|
-
* @format uuid
|
|
1091
|
-
*/
|
|
1092
|
-
line: string;
|
|
1093
|
-
/**
|
|
1094
|
-
* Extra params to add as name:value pairs. Only names starting with 'X-' are allowed.
|
|
1095
|
-
* @example {"X-PARAM":"value"}
|
|
1096
|
-
*/
|
|
1097
|
-
store?: Record<string, string>;
|
|
1098
|
-
/**
|
|
1099
|
-
* Names of extra params to remove
|
|
1100
|
-
* @example "{"X-PARAM"}"
|
|
1101
|
-
*/
|
|
1102
|
-
remove?: string[];
|
|
1103
|
-
}
|
|
1104
|
-
export interface InviteRequest {
|
|
1105
|
-
/**
|
|
1106
|
-
* User id.
|
|
1107
|
-
* @format uuid
|
|
1108
|
-
*/
|
|
1109
|
-
id: string;
|
|
1110
|
-
/**
|
|
1111
|
-
* @minLength 0
|
|
1112
|
-
* @maxLength 128
|
|
1113
|
-
*/
|
|
1114
|
-
name?: string;
|
|
1115
|
-
}
|
|
1116
|
-
export interface SteeringRequest {
|
|
1117
|
-
/**
|
|
1118
|
-
* @minLength 1
|
|
1119
|
-
* @maxLength 32
|
|
1120
|
-
* @pattern [\p{L}\p{N}_.-]+
|
|
1121
|
-
*/
|
|
1122
|
-
command: string;
|
|
1123
|
-
/**
|
|
1124
|
-
* @minLength 1
|
|
1125
|
-
* @maxLength 128
|
|
1126
|
-
* @pattern [\p{L}\p{N}_.-]+
|
|
1127
|
-
*/
|
|
1128
|
-
venue: string;
|
|
1129
|
-
properties?: Record<string, string>;
|
|
1130
|
-
}
|
|
1131
|
-
export interface SteeringCommand {
|
|
1132
|
-
/** @format uuid */
|
|
1133
|
-
correlationId: string;
|
|
1134
|
-
/** @format uuid */
|
|
1135
|
-
tenant: string;
|
|
1136
|
-
command: string;
|
|
1137
|
-
venue?: string;
|
|
1138
|
-
properties?: Record<string, string>;
|
|
1139
|
-
}
|
|
1140
|
-
export interface VerifyOrderPaymentRequest {
|
|
1141
|
-
type: "CASH" | "CARD" | "COD" | "TERMINAL" | "EPAYMENT" | "COUPON" | "WALLET" | "PREAUTHORIZED" | "RETURN" | "EXTERNAL";
|
|
1142
|
-
/** @pattern [\p{L}\p{N}_.-]+ */
|
|
1143
|
-
source: string;
|
|
1144
|
-
amount: number;
|
|
1145
|
-
}
|
|
1146
|
-
/** Error codes when validation unsuccessful */
|
|
1147
|
-
export interface ErrorCode {
|
|
1148
|
-
/** Error code that may be used to localize message */
|
|
1149
|
-
code: string;
|
|
1150
|
-
/** Default message */
|
|
1151
|
-
message: string;
|
|
1152
|
-
/** Additional parameters to clarify */
|
|
1153
|
-
args?: string[];
|
|
1154
|
-
}
|
|
1155
|
-
export interface VerifyOrderPaymentResponse {
|
|
1156
|
-
result: boolean;
|
|
1157
|
-
order?: Order;
|
|
1158
|
-
/** Error codes when validation unsuccessful */
|
|
1159
|
-
codes?: ErrorCode[];
|
|
1160
|
-
}
|
|
1161
|
-
export type QueryParamsType = Record<string | number, any>;
|
|
1162
|
-
export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
|
|
1163
|
-
export interface FullRequestParams extends Omit<RequestInit, "body"> {
|
|
1164
|
-
/** set parameter to `true` for call `securityWorker` for this request */
|
|
1165
|
-
secure?: boolean;
|
|
1166
|
-
/** request path */
|
|
1167
|
-
path: string;
|
|
1168
|
-
/** content type of request body */
|
|
1169
|
-
type?: ContentType;
|
|
1170
|
-
/** query params */
|
|
1171
|
-
query?: QueryParamsType;
|
|
1172
|
-
/** format of response (i.e. response.json() -> format: "json") */
|
|
1173
|
-
format?: ResponseFormat;
|
|
1174
|
-
/** request body */
|
|
1175
|
-
body?: unknown;
|
|
1176
|
-
/** base url */
|
|
1177
|
-
baseUrl?: string;
|
|
1178
|
-
/** request cancellation token */
|
|
1179
|
-
cancelToken?: CancelToken;
|
|
1180
|
-
}
|
|
1181
|
-
export type RequestParams = Omit<FullRequestParams, "body" | "method" | "query" | "path">;
|
|
1182
|
-
export interface ApiConfig<SecurityDataType = unknown> {
|
|
1183
|
-
baseUrl?: string;
|
|
1184
|
-
baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
|
|
1185
|
-
securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
|
|
1186
|
-
customFetch?: typeof fetch;
|
|
1187
|
-
}
|
|
1188
|
-
export interface HttpResponse<D extends unknown, E extends unknown = unknown> extends Response {
|
|
1189
|
-
data: D;
|
|
1190
|
-
error: E;
|
|
1191
|
-
}
|
|
1192
|
-
type CancelToken = Symbol | string | number;
|
|
1193
|
-
export declare enum ContentType {
|
|
1194
|
-
Json = "application/json",
|
|
1195
|
-
FormData = "multipart/form-data",
|
|
1196
|
-
UrlEncoded = "application/x-www-form-urlencoded",
|
|
1197
|
-
Text = "text/plain"
|
|
1198
|
-
}
|
|
1199
|
-
export declare class HttpClient<SecurityDataType = unknown> {
|
|
1200
|
-
baseUrl: string;
|
|
1201
|
-
private securityData;
|
|
1202
|
-
private securityWorker?;
|
|
1203
|
-
private abortControllers;
|
|
1204
|
-
private customFetch;
|
|
1205
|
-
private baseApiParams;
|
|
1206
|
-
constructor(apiConfig?: ApiConfig<SecurityDataType>);
|
|
1207
|
-
setSecurityData: (data: SecurityDataType | null) => void;
|
|
1208
|
-
protected encodeQueryParam(key: string, value: any): string;
|
|
1209
|
-
protected addQueryParam(query: QueryParamsType, key: string): string;
|
|
1210
|
-
protected addArrayQueryParam(query: QueryParamsType, key: string): any;
|
|
1211
|
-
protected toQueryString(rawQuery?: QueryParamsType): string;
|
|
1212
|
-
protected addQueryParams(rawQuery?: QueryParamsType): string;
|
|
1213
|
-
private contentFormatters;
|
|
1214
|
-
protected mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams;
|
|
1215
|
-
protected createAbortSignal: (cancelToken: CancelToken) => AbortSignal | undefined;
|
|
1216
|
-
abortRequest: (cancelToken: CancelToken) => void;
|
|
1217
|
-
request: <T = any, E = any>({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise<HttpResponse<T, E>>;
|
|
1218
|
-
}
|
|
1219
|
-
/**
|
|
1220
|
-
* @title Ordering API
|
|
1221
|
-
* @version 1.0
|
|
1222
|
-
* @baseUrl https://ordering.3e.pl
|
|
1223
|
-
*
|
|
1224
|
-
* OrderingStack ordering API
|
|
1225
|
-
*/
|
|
1226
|
-
export declare class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
|
1227
|
-
orderingApi: {
|
|
1228
|
-
/**
|
|
1229
|
-
* @description Get paginated list of orders. This endpoint is compatible with React AdminOnRest framework to provide DataSource.
|
|
1230
|
-
*
|
|
1231
|
-
* @tags order, administration
|
|
1232
|
-
* @name GetList
|
|
1233
|
-
* @request GET:/ordering-api/api/orders
|
|
1234
|
-
* @secure
|
|
1235
|
-
*/
|
|
1236
|
-
getList: (query: {
|
|
1237
|
-
filter: OrdersFilter;
|
|
1238
|
-
}, params?: RequestParams) => Promise<HttpResponse<any, Order[]>>;
|
|
1239
|
-
/**
|
|
1240
|
-
* @description Add comment to order.
|
|
1241
|
-
*
|
|
1242
|
-
* @tags order, comments
|
|
1243
|
-
* @name CommentOrder
|
|
1244
|
-
* @request POST:/ordering-api/api/order/{uid}/comment
|
|
1245
|
-
* @secure
|
|
1246
|
-
*/
|
|
1247
|
-
commentOrder: (uid: string, data: string, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1248
|
-
/**
|
|
1249
|
-
* @description Add comment to order line.
|
|
1250
|
-
*
|
|
1251
|
-
* @tags order, comments
|
|
1252
|
-
* @name CommentOrderLine
|
|
1253
|
-
* @request POST:/ordering-api/api/order/{uid}/{lid}/comment
|
|
1254
|
-
* @secure
|
|
1255
|
-
*/
|
|
1256
|
-
commentOrderLine: (uid: string, lid: string, data: string, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1257
|
-
/**
|
|
1258
|
-
* @description Sync order from external source. It acts as snaptshot and all required order structures must be filled.
|
|
1259
|
-
*
|
|
1260
|
-
* @tags internal
|
|
1261
|
-
* @name SyncOrder
|
|
1262
|
-
* @request POST:/ordering-api/api/order/sync
|
|
1263
|
-
* @secure
|
|
1264
|
-
*/
|
|
1265
|
-
syncOrder: (data: Order, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1266
|
-
/**
|
|
1267
|
-
* @description Manually set queue pos for order. Tenant configuration must allow it.
|
|
1268
|
-
*
|
|
1269
|
-
* @tags order
|
|
1270
|
-
* @name SetQueuePos
|
|
1271
|
-
* @request POST:/ordering-api/api/order/{uid}/queuePos
|
|
1272
|
-
* @secure
|
|
1273
|
-
*/
|
|
1274
|
-
setQueuePos: (uid: string, data: QueuePosRequest, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1275
|
-
/**
|
|
1276
|
-
* @description Track order visibility on KDS.
|
|
1277
|
-
*
|
|
1278
|
-
* @tags order, kds
|
|
1279
|
-
* @name KdsTraceView
|
|
1280
|
-
* @request POST:/ordering-api/api/order/{uid}/kds-trace-view
|
|
1281
|
-
* @secure
|
|
1282
|
-
*/
|
|
1283
|
-
kdsTraceView: (uid: string, query?: {
|
|
1284
|
-
/** KDS config */
|
|
1285
|
-
config?: string;
|
|
1286
|
-
}, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1287
|
-
/**
|
|
1288
|
-
* @description Mark order as verified.
|
|
1289
|
-
*
|
|
1290
|
-
* @tags order
|
|
1291
|
-
* @name VerifyOrder
|
|
1292
|
-
* @request POST:/ordering-api/api/order/{uid}/verify
|
|
1293
|
-
* @secure
|
|
1294
|
-
*/
|
|
1295
|
-
verifyOrder: (uid: string, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1296
|
-
/**
|
|
1297
|
-
* @description Create new order from aggregator (already paid).
|
|
1298
|
-
*
|
|
1299
|
-
* @tags order
|
|
1300
|
-
* @name NewAggregatorOrder
|
|
1301
|
-
* @request POST:/ordering-api/api/order/aggregator-new
|
|
1302
|
-
* @secure
|
|
1303
|
-
*/
|
|
1304
|
-
newAggregatorOrder: (data: NewAggregatorOrderRequest, params?: RequestParams) => Promise<HttpResponse<ApiLinesResponse, any>>;
|
|
1305
|
-
/**
|
|
1306
|
-
* @description Mark order as deliver ready (before it is delivered).
|
|
1307
|
-
*
|
|
1308
|
-
* @tags order
|
|
1309
|
-
* @name DeliverReadyOrder
|
|
1310
|
-
* @request POST:/ordering-api/api/order/{uid}/deliverReady
|
|
1311
|
-
* @secure
|
|
1312
|
-
*/
|
|
1313
|
-
deliverReadyOrder: (uid: string, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1314
|
-
/**
|
|
1315
|
-
* @description Mark order as delivered.
|
|
1316
|
-
*
|
|
1317
|
-
* @tags order
|
|
1318
|
-
* @name DeliverOrder
|
|
1319
|
-
* @request POST:/ordering-api/api/order/{uid}/deliver
|
|
1320
|
-
* @secure
|
|
1321
|
-
*/
|
|
1322
|
-
deliverOrder: (uid: string, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1323
|
-
/**
|
|
1324
|
-
* @description Set due timestamp for order.
|
|
1325
|
-
*
|
|
1326
|
-
* @tags order
|
|
1327
|
-
* @name SetDue
|
|
1328
|
-
* @request POST:/ordering-api/api/order/{uid}/due
|
|
1329
|
-
* @secure
|
|
1330
|
-
*/
|
|
1331
|
-
setDue: (uid: string, data: DueRequest, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1332
|
-
/**
|
|
1333
|
-
* @description Create new order.
|
|
1334
|
-
*
|
|
1335
|
-
* @tags order
|
|
1336
|
-
* @name NewOrder
|
|
1337
|
-
* @request POST:/ordering-api/api/order/new
|
|
1338
|
-
* @secure
|
|
1339
|
-
*/
|
|
1340
|
-
newOrder: (data: NewOrderRequest, params?: RequestParams) => Promise<HttpResponse<ApiLinesResponse, any>>;
|
|
1341
|
-
/**
|
|
1342
|
-
* @description Abandon order. Only not completed orders can be abandoned this way.
|
|
1343
|
-
*
|
|
1344
|
-
* @tags order
|
|
1345
|
-
* @name AbandonOrder
|
|
1346
|
-
* @request POST:/ordering-api/api/order/{uid}/abandon
|
|
1347
|
-
* @secure
|
|
1348
|
-
*/
|
|
1349
|
-
abandonOrder: (uid: string, data: AbandonOrderRequest, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1350
|
-
/**
|
|
1351
|
-
* @description Cancel order. Cancelling is available for restaurant staff. Involves e-payments refund. If refund fails - cancelling does not take place.
|
|
1352
|
-
*
|
|
1353
|
-
* @tags order
|
|
1354
|
-
* @name CancelOrder
|
|
1355
|
-
* @request POST:/ordering-api/api/order/{uid}/cancel
|
|
1356
|
-
* @secure
|
|
1357
|
-
*/
|
|
1358
|
-
cancelOrder: (uid: string, data: CancelOrderRequest, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1359
|
-
/**
|
|
1360
|
-
* @description QSR flow - lock the order for further editing if it is valid. Validation re-checks venue cluster (with due time), delivery area, products availability.
|
|
1361
|
-
*
|
|
1362
|
-
* @tags order
|
|
1363
|
-
* @name LockIfValid
|
|
1364
|
-
* @request POST:/ordering-api/api/order/{uid}/lock-if-valid
|
|
1365
|
-
* @secure
|
|
1366
|
-
*/
|
|
1367
|
-
lockIfValid: (uid: string, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1368
|
-
/**
|
|
1369
|
-
* @description Mark order line as processed/prepared.
|
|
1370
|
-
*
|
|
1371
|
-
* @tags order, lines
|
|
1372
|
-
* @name ProcessedLineOrder
|
|
1373
|
-
* @request POST:/ordering-api/api/order/{uid}/lines/processed
|
|
1374
|
-
* @secure
|
|
1375
|
-
*/
|
|
1376
|
-
processedLineOrder: (uid: string, data: string[], params?: RequestParams) => Promise<HttpResponse<ApiLinesResponse, any>>;
|
|
1377
|
-
/**
|
|
1378
|
-
* @description Mark order lines as preparing/processing.
|
|
1379
|
-
*
|
|
1380
|
-
* @tags order, lines
|
|
1381
|
-
* @name ProcessingLineOrder
|
|
1382
|
-
* @request POST:/ordering-api/api/order/{uid}/lines/processing
|
|
1383
|
-
* @secure
|
|
1384
|
-
*/
|
|
1385
|
-
processingLineOrder: (uid: string, data: string[], params?: RequestParams) => Promise<HttpResponse<ApiLinesResponse, any>>;
|
|
1386
|
-
/**
|
|
1387
|
-
* @description Mark order lines as voided.
|
|
1388
|
-
*
|
|
1389
|
-
* @tags order, lines
|
|
1390
|
-
* @name VoidLineOrder
|
|
1391
|
-
* @request POST:/ordering-api/api/order/{uid}/lines/void
|
|
1392
|
-
* @secure
|
|
1393
|
-
*/
|
|
1394
|
-
voidLineOrder: (uid: string, data: string[], params?: RequestParams) => Promise<HttpResponse<ApiLinesResponse, any>>;
|
|
1395
|
-
/**
|
|
1396
|
-
* @description Mark order lines as confirmed.
|
|
1397
|
-
*
|
|
1398
|
-
* @tags order, lines
|
|
1399
|
-
* @name ConfirmLineOrder
|
|
1400
|
-
* @request POST:/ordering-api/api/order/{uid}/lines/confirm
|
|
1401
|
-
* @secure
|
|
1402
|
-
*/
|
|
1403
|
-
confirmLineOrder: (uid: string, data: string[], params?: RequestParams) => Promise<HttpResponse<ApiLinesResponse, any>>;
|
|
1404
|
-
/**
|
|
1405
|
-
* @description Mark order as picked by carrier.
|
|
1406
|
-
*
|
|
1407
|
-
* @tags order
|
|
1408
|
-
* @name PickedOrder
|
|
1409
|
-
* @request POST:/ordering-api/api/order/{uid}/picked
|
|
1410
|
-
* @secure
|
|
1411
|
-
*/
|
|
1412
|
-
pickedOrder: (uid: string, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1413
|
-
/**
|
|
1414
|
-
* @description Simple loyalty wallet update callback. It computes order total for non-technical items, multiplicates with 'mul' parametr (0.1 by default) and adds points calculated this way to users wallet. Points are rounded to whole numbers (round=true) and expire in one year (expire=365).
|
|
1415
|
-
*
|
|
1416
|
-
* @tags loyalty
|
|
1417
|
-
* @name LoyaltyWallet
|
|
1418
|
-
* @request POST:/ordering-api/loyalty-wallet
|
|
1419
|
-
* @secure
|
|
1420
|
-
*/
|
|
1421
|
-
loyaltyWallet: (data: WebhookRequest, query?: {
|
|
1422
|
-
/** @default 0.1 */
|
|
1423
|
-
mul?: number;
|
|
1424
|
-
/** @default true */
|
|
1425
|
-
round?: boolean;
|
|
1426
|
-
/**
|
|
1427
|
-
* @format int32
|
|
1428
|
-
* @default 365
|
|
1429
|
-
*/
|
|
1430
|
-
expire?: number;
|
|
1431
|
-
notify?: string;
|
|
1432
|
-
}, params?: RequestParams) => Promise<HttpResponse<string, any>>;
|
|
1433
|
-
/**
|
|
1434
|
-
* @description Simple loyalty wallet update callback (wallet2-api). It computes order total for non-technical items, multiplicates with 'mul' parametr (0.1 by default) and adds points calculated this way to users wallet. Points are rounded to whole numbers (round=true) and expire in one year (expire=365).
|
|
1435
|
-
*
|
|
1436
|
-
* @tags loyalty
|
|
1437
|
-
* @name LoyaltyWallet2
|
|
1438
|
-
* @request POST:/ordering-api/loyalty-wallet2
|
|
1439
|
-
* @secure
|
|
1440
|
-
*/
|
|
1441
|
-
loyaltyWallet2: (data: WebhookRequest, query?: {
|
|
1442
|
-
/** @default 0.1 */
|
|
1443
|
-
mul?: number;
|
|
1444
|
-
/** @default true */
|
|
1445
|
-
round?: boolean;
|
|
1446
|
-
/**
|
|
1447
|
-
* @format int32
|
|
1448
|
-
* @default 365
|
|
1449
|
-
*/
|
|
1450
|
-
expire?: number;
|
|
1451
|
-
notify?: string;
|
|
1452
|
-
}, params?: RequestParams) => Promise<HttpResponse<string, any>>;
|
|
1453
|
-
/**
|
|
1454
|
-
* @description Push upsell message to users of order.
|
|
1455
|
-
*
|
|
1456
|
-
* @tags push
|
|
1457
|
-
* @name PushUpsell
|
|
1458
|
-
* @request POST:/ordering-api/api/order/{uid}/push-upsell
|
|
1459
|
-
* @secure
|
|
1460
|
-
*/
|
|
1461
|
-
pushUpsell: (uid: string, data: PushUpsellRequest, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1462
|
-
/**
|
|
1463
|
-
* @description Push message to users of order.
|
|
1464
|
-
*
|
|
1465
|
-
* @tags push
|
|
1466
|
-
* @name PushMessage
|
|
1467
|
-
* @request POST:/ordering-api/api/order/{uid}/push-message
|
|
1468
|
-
* @secure
|
|
1469
|
-
*/
|
|
1470
|
-
pushMessage: (uid: string, data: PushMessageRequest, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1471
|
-
/**
|
|
1472
|
-
* @description Simple upsell implementation. Uses 'category' extra tag in menu-api service to link categories that should co-exist in order. Configuration is in tenant as 'upselCfg' and consist of list of pairs: 'category1=category2|cat3=cat4|fallback'. Which means that if product from 'category1' is present in order, there should also be product from 'category2'. If it is missing upsell suggests 3 products from 'category2'. 'fallback' is a category to suggest in case no other matches were found. If 'upsellLastLine' is set to true in tenant config additionally it is looking for 'upsell' extra params in recently added line and produces popup upsell from it.
|
|
1473
|
-
*
|
|
1474
|
-
* @tags upsell
|
|
1475
|
-
* @name SimpleUpsell
|
|
1476
|
-
* @request POST:/ordering-api/simple-upsell
|
|
1477
|
-
* @secure
|
|
1478
|
-
*/
|
|
1479
|
-
simpleUpsell: (data: UpsellRequest, params?: RequestParams) => Promise<HttpResponse<{
|
|
1480
|
-
empty?: boolean | undefined;
|
|
1481
|
-
}, any>>;
|
|
1482
|
-
/**
|
|
1483
|
-
* @description Sign line discounts.
|
|
1484
|
-
*
|
|
1485
|
-
* @tags secret
|
|
1486
|
-
* @name SignLineDiscounts
|
|
1487
|
-
* @request POST:/ordering-api/api/sign-line-discounts
|
|
1488
|
-
* @secure
|
|
1489
|
-
*/
|
|
1490
|
-
signLineDiscounts: (data: SignLineDiscountRequest, params?: RequestParams) => Promise<HttpResponse<Record<string, LineDiscount>, any>>;
|
|
1491
|
-
/**
|
|
1492
|
-
* @description Simple loyalty implementation with '3-parts sets 10% off' and 'every third item - half price'. It uses product extra tags 'PART' which should take one of values: 'main', 'side', 'drink'. This endpoint counts every value and tries to combine them in sets (one 'main', one 'size', one 'drink'). There is also 'BULK3' tag which works as a 'third product of this kind (id) for half price'.
|
|
1493
|
-
*
|
|
1494
|
-
* @tags loyalty
|
|
1495
|
-
* @name SimpleLoyalty
|
|
1496
|
-
* @request POST:/ordering-api/simple-loyalty
|
|
1497
|
-
* @secure
|
|
1498
|
-
*/
|
|
1499
|
-
simpleLoyalty: (data: LoyaltyRequest, params?: RequestParams) => Promise<HttpResponse<LoyaltyResponse, any>>;
|
|
1500
|
-
/**
|
|
1501
|
-
* @description Add payment information to order.
|
|
1502
|
-
*
|
|
1503
|
-
* @tags order, payment
|
|
1504
|
-
* @name PayOrder
|
|
1505
|
-
* @request POST:/ordering-api/api/order/{uid}/payment
|
|
1506
|
-
* @secure
|
|
1507
|
-
*/
|
|
1508
|
-
payOrder: (uid: string, data: PaymentRequest, params?: RequestParams) => Promise<HttpResponse<ApiPaymentResponse, any>>;
|
|
1509
|
-
/**
|
|
1510
|
-
* @description Update payment information in order.
|
|
1511
|
-
*
|
|
1512
|
-
* @tags order, payment
|
|
1513
|
-
* @name PaymentUpdate
|
|
1514
|
-
* @request POST:/ordering-api/api/order/{uid}/payment-update
|
|
1515
|
-
* @secure
|
|
1516
|
-
*/
|
|
1517
|
-
paymentUpdate: (uid: string, data: PaymentUpdateRequest, params?: RequestParams) => Promise<HttpResponse<ApiPaymentResponse, any>>;
|
|
1518
|
-
/**
|
|
1519
|
-
* @description Claim order. This is used to attach additional user to order. User can be just another user, waiter or technical account for kiosk, etc.
|
|
1520
|
-
*
|
|
1521
|
-
* @tags order
|
|
1522
|
-
* @name ClaimOrder
|
|
1523
|
-
* @request POST:/ordering-api/api/order/{uid}/claim
|
|
1524
|
-
* @secure
|
|
1525
|
-
*/
|
|
1526
|
-
claimOrder: (uid: string, data: ClaimRequest, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1527
|
-
/**
|
|
1528
|
-
* @description Set contact information for user.
|
|
1529
|
-
*
|
|
1530
|
-
* @tags order
|
|
1531
|
-
* @name Contact
|
|
1532
|
-
* @request POST:/ordering-api/api/order/{uid}/contact
|
|
1533
|
-
* @secure
|
|
1534
|
-
*/
|
|
1535
|
-
contact: (uid: string, data: ContactRequest, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1536
|
-
/**
|
|
1537
|
-
* @description Attach user to order with specified role(s).
|
|
1538
|
-
*
|
|
1539
|
-
* @tags order
|
|
1540
|
-
* @name AttachUser
|
|
1541
|
-
* @request POST:/ordering-api/api/order/{uid}/attach-user
|
|
1542
|
-
* @secure
|
|
1543
|
-
*/
|
|
1544
|
-
attachUser: (uid: string, data: AttachUserRequest, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1545
|
-
/**
|
|
1546
|
-
* @description Change order type.
|
|
1547
|
-
*
|
|
1548
|
-
* @tags order
|
|
1549
|
-
* @name ChangeOrderType
|
|
1550
|
-
* @request POST:/ordering-api/api/order/{uid}/change-order-type
|
|
1551
|
-
* @secure
|
|
1552
|
-
*/
|
|
1553
|
-
changeOrderType: (uid: string, data: ChangeOrderTypeRequest, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1554
|
-
/**
|
|
1555
|
-
* @description Change extra params in order.
|
|
1556
|
-
*
|
|
1557
|
-
* @tags order
|
|
1558
|
-
* @name AlterExtra
|
|
1559
|
-
* @request POST:/ordering-api/api/order/{uid}/extra
|
|
1560
|
-
* @secure
|
|
1561
|
-
*/
|
|
1562
|
-
alterExtra: (uid: string, data: AlterOrderExtraRequest, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1563
|
-
/**
|
|
1564
|
-
* @description Set venues (buckets) in order.
|
|
1565
|
-
*
|
|
1566
|
-
* @tags order
|
|
1567
|
-
* @name ChangeVenues
|
|
1568
|
-
* @request POST:/ordering-api/api/order/{uid}/venues
|
|
1569
|
-
* @secure
|
|
1570
|
-
*/
|
|
1571
|
-
changeVenues: (uid: string, query?: {
|
|
1572
|
-
/**
|
|
1573
|
-
* Venue id(s)
|
|
1574
|
-
* @maxItems 64
|
|
1575
|
-
* @minItems 1
|
|
1576
|
-
*/
|
|
1577
|
-
venue?: string[];
|
|
1578
|
-
}, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1579
|
-
/**
|
|
1580
|
-
* @description Add order line to order.
|
|
1581
|
-
*
|
|
1582
|
-
* @tags order, lines
|
|
1583
|
-
* @name AppendLineOrder
|
|
1584
|
-
* @request POST:/ordering-api/api/order/{uid}/append
|
|
1585
|
-
* @secure
|
|
1586
|
-
*/
|
|
1587
|
-
appendLineOrder: (uid: string, data: AppendOrderLinesRequest, params?: RequestParams) => Promise<HttpResponse<ApiLinesResponse, any>>;
|
|
1588
|
-
/**
|
|
1589
|
-
* @description Set delivery address for order.
|
|
1590
|
-
*
|
|
1591
|
-
* @tags order
|
|
1592
|
-
* @name SetAddress
|
|
1593
|
-
* @request POST:/ordering-api/api/order/{uid}/address
|
|
1594
|
-
* @secure
|
|
1595
|
-
*/
|
|
1596
|
-
setAddress: (uid: string, data: SetAddressRequest, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1597
|
-
/**
|
|
1598
|
-
* @description Change lines quantity.
|
|
1599
|
-
*
|
|
1600
|
-
* @tags order, lines
|
|
1601
|
-
* @name ChangeQuantities
|
|
1602
|
-
* @request POST:/ordering-api/api/order/{uid}/quantity
|
|
1603
|
-
* @secure
|
|
1604
|
-
*/
|
|
1605
|
-
changeQuantities: (uid: string, data: OrderLinesQuantitiesRequest, params?: RequestParams) => Promise<HttpResponse<ApiLinesResponse, any>>;
|
|
1606
|
-
/**
|
|
1607
|
-
* @description Split order lines. Makes copies of existing order line with smaller quantities. Sum of quantities must match.
|
|
1608
|
-
*
|
|
1609
|
-
* @tags order, lines
|
|
1610
|
-
* @name SplitLines
|
|
1611
|
-
* @request POST:/ordering-api/api/order/{uid}/lines/split
|
|
1612
|
-
* @secure
|
|
1613
|
-
*/
|
|
1614
|
-
splitLines: (uid: string, data: LinesSplitRequest, params?: RequestParams) => Promise<HttpResponse<ApiLinesResponse, any>>;
|
|
1615
|
-
/**
|
|
1616
|
-
* @description Change extra params in order.
|
|
1617
|
-
*
|
|
1618
|
-
* @tags order, lines
|
|
1619
|
-
* @name AlterLinesExtra
|
|
1620
|
-
* @request POST:/ordering-api/api/order/{uid}/lines/extra
|
|
1621
|
-
* @secure
|
|
1622
|
-
*/
|
|
1623
|
-
alterLinesExtra: (uid: string, data: LinesAlterExtraRequest, params?: RequestParams) => Promise<HttpResponse<ApiLinesResponse, any>>;
|
|
1624
|
-
/**
|
|
1625
|
-
* @description Remove order line. Whether line can be removed depends on its state.
|
|
1626
|
-
*
|
|
1627
|
-
* @tags order, lines
|
|
1628
|
-
* @name RemoveLineOrder
|
|
1629
|
-
* @request POST:/ordering-api/api/order/{uid}/lines/remove
|
|
1630
|
-
* @secure
|
|
1631
|
-
*/
|
|
1632
|
-
removeLineOrder: (uid: string, data: string[], params?: RequestParams) => Promise<HttpResponse<ApiLinesResponse, any>>;
|
|
1633
|
-
/**
|
|
1634
|
-
* @description Invite another user to this order. This is used to attach additional user to order.
|
|
1635
|
-
*
|
|
1636
|
-
* @tags order
|
|
1637
|
-
* @name InviteUser
|
|
1638
|
-
* @request POST:/ordering-api/api/order/{uid}/invite-user
|
|
1639
|
-
* @secure
|
|
1640
|
-
*/
|
|
1641
|
-
inviteUser: (uid: string, data: InviteRequest, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1642
|
-
/**
|
|
1643
|
-
* @description Post steering message.
|
|
1644
|
-
*
|
|
1645
|
-
* @tags steering
|
|
1646
|
-
* @name PostSteering
|
|
1647
|
-
* @request POST:/ordering-api/api/steering
|
|
1648
|
-
* @secure
|
|
1649
|
-
*/
|
|
1650
|
-
postSteering: (data: SteeringRequest, params?: RequestParams) => Promise<HttpResponse<SteeringCommand, any>>;
|
|
1651
|
-
/**
|
|
1652
|
-
* @description Attach loyalty ID to order.
|
|
1653
|
-
*
|
|
1654
|
-
* @tags order, loyalty
|
|
1655
|
-
* @name Attach
|
|
1656
|
-
* @request POST:/ordering-api/api/order/{uid}/attachLoyaltyCard
|
|
1657
|
-
* @secure
|
|
1658
|
-
*/
|
|
1659
|
-
attach: (uid: string, data: string, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1660
|
-
/**
|
|
1661
|
-
* @description Detach loyalty ID from order.
|
|
1662
|
-
*
|
|
1663
|
-
* @tags order, loyalty
|
|
1664
|
-
* @name Detach
|
|
1665
|
-
* @request POST:/ordering-api/api/order/{uid}/detachLoyaltyCard
|
|
1666
|
-
* @secure
|
|
1667
|
-
*/
|
|
1668
|
-
detach: (uid: string, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1669
|
-
/**
|
|
1670
|
-
* @description Add coupon to order.
|
|
1671
|
-
*
|
|
1672
|
-
* @tags order, loyalty
|
|
1673
|
-
* @name AddCoupon
|
|
1674
|
-
* @request POST:/ordering-api/api/order/{uid}/addCoupon
|
|
1675
|
-
* @secure
|
|
1676
|
-
*/
|
|
1677
|
-
addCoupon: (uid: string, data: string, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1678
|
-
/**
|
|
1679
|
-
* @description Remove coupon from order.
|
|
1680
|
-
*
|
|
1681
|
-
* @tags order, loyalty
|
|
1682
|
-
* @name RemoveCoupon
|
|
1683
|
-
* @request POST:/ordering-api/api/order/{uid}/removeCoupon
|
|
1684
|
-
* @secure
|
|
1685
|
-
*/
|
|
1686
|
-
removeCoupon: (uid: string, data: string, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1687
|
-
/**
|
|
1688
|
-
* @description Add fiscal information to order. This should reflect printed fiscal strip.
|
|
1689
|
-
*
|
|
1690
|
-
* @tags order, fiscal
|
|
1691
|
-
* @name AddFiscalize
|
|
1692
|
-
* @request POST:/ordering-api/api/order/{uid}/fiscalize
|
|
1693
|
-
* @secure
|
|
1694
|
-
*/
|
|
1695
|
-
addFiscalize: (uid: string, data: OrderFiscal, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1696
|
-
/**
|
|
1697
|
-
* @description Request fiscal data for order. Data is returnet through websocket.
|
|
1698
|
-
*
|
|
1699
|
-
* @tags order, fiscal
|
|
1700
|
-
* @name RequestFiscal
|
|
1701
|
-
* @request POST:/ordering-api/api/order/{uid}/requestFiscalData
|
|
1702
|
-
* @secure
|
|
1703
|
-
*/
|
|
1704
|
-
requestFiscal: (uid: string, params?: RequestParams) => Promise<HttpResponse<ApiResponse, any>>;
|
|
1705
|
-
/**
|
|
1706
|
-
* @description Verify order by ID if it can be paid.
|
|
1707
|
-
*
|
|
1708
|
-
* @tags verification, order, fetch
|
|
1709
|
-
* @name VerifyOrderPayment
|
|
1710
|
-
* @request POST:/ordering-api/api/order/{uid}/verifyPayment
|
|
1711
|
-
* @secure
|
|
1712
|
-
*/
|
|
1713
|
-
verifyOrderPayment: (uid: string, data: VerifyOrderPaymentRequest, query?: {
|
|
1714
|
-
/** @default true */
|
|
1715
|
-
returnOrder?: boolean;
|
|
1716
|
-
}, params?: RequestParams) => Promise<HttpResponse<VerifyOrderPaymentResponse, any>>;
|
|
1717
|
-
/**
|
|
1718
|
-
* @description Get single order by ID.
|
|
1719
|
-
*
|
|
1720
|
-
* @tags order, fetch
|
|
1721
|
-
* @name Get
|
|
1722
|
-
* @request GET:/ordering-api/api/orders/{uid}
|
|
1723
|
-
* @secure
|
|
1724
|
-
*/
|
|
1725
|
-
get: (uid: string, params?: RequestParams) => Promise<HttpResponse<Order, any>>;
|
|
1726
|
-
/**
|
|
1727
|
-
* @description Check order existence by ID.
|
|
1728
|
-
*
|
|
1729
|
-
* @tags order, fetch
|
|
1730
|
-
* @name Exists
|
|
1731
|
-
* @request GET:/ordering-api/api/orders/{uid}/exists
|
|
1732
|
-
* @secure
|
|
1733
|
-
*/
|
|
1734
|
-
exists: (uid: string, params?: RequestParams) => Promise<HttpResponse<Order, any>>;
|
|
1735
|
-
/**
|
|
1736
|
-
* @description Get opened orders for user.
|
|
1737
|
-
*
|
|
1738
|
-
* @tags order, fetch
|
|
1739
|
-
* @name ListOpened
|
|
1740
|
-
* @request GET:/ordering-api/api/orders/opened
|
|
1741
|
-
* @secure
|
|
1742
|
-
*/
|
|
1743
|
-
listOpened: (params?: RequestParams) => Promise<HttpResponse<Order[], any>>;
|
|
1744
|
-
/**
|
|
1745
|
-
* @description Get last orders for user (all states included).
|
|
1746
|
-
*
|
|
1747
|
-
* @tags order, fetch
|
|
1748
|
-
* @name ListLast
|
|
1749
|
-
* @request GET:/ordering-api/api/orders/last
|
|
1750
|
-
* @secure
|
|
1751
|
-
*/
|
|
1752
|
-
listLast: (params?: RequestParams) => Promise<HttpResponse<Order[], any>>;
|
|
1753
|
-
/**
|
|
1754
|
-
* @description Get opened orders in venue. Used by KDS, queue displays etc.
|
|
1755
|
-
*
|
|
1756
|
-
* @tags order, fetch
|
|
1757
|
-
* @name ListOpenedVenue
|
|
1758
|
-
* @request GET:/ordering-api/api/orders/venue/{uid}
|
|
1759
|
-
* @secure
|
|
1760
|
-
*/
|
|
1761
|
-
listOpenedVenue: (uid: string, params?: RequestParams) => Promise<HttpResponse<Order[], any>>;
|
|
1762
|
-
};
|
|
94
|
+
discounts?: ILineDiscount[];
|
|
95
|
+
extra?: IStringKeyRecord<string>;
|
|
1763
96
|
}
|
|
1764
97
|
export {};
|