@compassdigital/sdk.typescript 4.97.0 → 4.99.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +115 -17
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +132 -22
- package/lib/index.js.map +1 -1
- package/lib/interface/announcement.d.ts +2 -2
- package/lib/interface/announcement.d.ts.map +1 -1
- package/lib/interface/centricos.d.ts +1 -1
- package/lib/interface/centricos.d.ts.map +1 -1
- package/lib/interface/consumer.d.ts +430 -62
- package/lib/interface/consumer.d.ts.map +1 -1
- package/lib/interface/mealplan.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +559 -67
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/order.d.ts +22 -0
- package/lib/interface/order.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +321 -46
- package/src/interface/announcement.ts +2 -2
- package/src/interface/centricos.ts +1 -1
- package/src/interface/consumer.ts +567 -70
- package/src/interface/mealplan.ts +0 -3
- package/src/interface/menu.ts +649 -80
- package/src/interface/order.ts +25 -24
package/src/interface/order.ts
CHANGED
|
@@ -4,11 +4,8 @@
|
|
|
4
4
|
import { RequestQuery, BaseRequest } from './util';
|
|
5
5
|
|
|
6
6
|
export interface CreateOrder {
|
|
7
|
-
// brand
|
|
8
7
|
location_brand?: string;
|
|
9
|
-
// location
|
|
10
8
|
location?: string;
|
|
11
|
-
// shoppingcart
|
|
12
9
|
shoppingcart?: string;
|
|
13
10
|
payment?: {
|
|
14
11
|
token?: string;
|
|
@@ -19,7 +16,6 @@ export interface CreateOrder {
|
|
|
19
16
|
coupon_voucher?: CashlessPayment;
|
|
20
17
|
};
|
|
21
18
|
mealplan?: MealPlan;
|
|
22
|
-
// user
|
|
23
19
|
customer?: string;
|
|
24
20
|
is?: {
|
|
25
21
|
in_progress?: boolean;
|
|
@@ -56,7 +52,6 @@ export interface Error {
|
|
|
56
52
|
}
|
|
57
53
|
|
|
58
54
|
export interface Issue {
|
|
59
|
-
// issue
|
|
60
55
|
id?: string;
|
|
61
56
|
type?: string;
|
|
62
57
|
//@deprecated
|
|
@@ -72,16 +67,11 @@ export interface Issue {
|
|
|
72
67
|
}
|
|
73
68
|
|
|
74
69
|
export interface Order {
|
|
75
|
-
// order
|
|
76
70
|
id?: string;
|
|
77
|
-
// brand
|
|
78
71
|
location_brand?: string;
|
|
79
|
-
// location
|
|
80
72
|
location?: string;
|
|
81
|
-
// shoppingcart
|
|
82
73
|
shoppingcart?: string;
|
|
83
74
|
payment?: {
|
|
84
|
-
// payment
|
|
85
75
|
token?: string;
|
|
86
76
|
credit_card?: CreditCard;
|
|
87
77
|
digital_wallet_pay?: string;
|
|
@@ -91,23 +81,18 @@ export interface Order {
|
|
|
91
81
|
coupon_voucher?: CashlessPayment;
|
|
92
82
|
};
|
|
93
83
|
mealplan?: {
|
|
94
|
-
// mealplan
|
|
95
84
|
id?: string;
|
|
96
|
-
// tender
|
|
97
85
|
tender?: string;
|
|
98
86
|
name?: string;
|
|
99
87
|
};
|
|
100
88
|
meal_swipes?: {
|
|
101
|
-
// mealplan
|
|
102
89
|
id?: string;
|
|
103
|
-
// tender
|
|
104
90
|
tender?: string;
|
|
105
91
|
tender_name?: string;
|
|
106
92
|
swipes?: number;
|
|
107
93
|
total?: number;
|
|
108
94
|
};
|
|
109
95
|
meal_exchange?: MealPlan;
|
|
110
|
-
// user
|
|
111
96
|
customer?: string;
|
|
112
97
|
is?: {
|
|
113
98
|
accepted?: boolean;
|
|
@@ -203,7 +188,6 @@ export interface Order {
|
|
|
203
188
|
active_override?: boolean;
|
|
204
189
|
// Delivery details
|
|
205
190
|
delivery?: {
|
|
206
|
-
// provider
|
|
207
191
|
provider?: string;
|
|
208
192
|
tracker_url?: string;
|
|
209
193
|
loading_code?: string;
|
|
@@ -219,6 +203,12 @@ export interface Order {
|
|
|
219
203
|
type_of_kds?: string;
|
|
220
204
|
// Indicate whether the order is eligible for cancellation
|
|
221
205
|
cancel_eligible?: boolean;
|
|
206
|
+
pickup_instruction?: MultiLanguageLabel;
|
|
207
|
+
market_place_label?: MultiLanguageLabel;
|
|
208
|
+
market_place_description?: MultiLanguageLabel;
|
|
209
|
+
apex_code?: string;
|
|
210
|
+
apex_qr?: string;
|
|
211
|
+
apex_codes?: ApexCodes;
|
|
222
212
|
[index: string]: any;
|
|
223
213
|
};
|
|
224
214
|
issue?: Issue;
|
|
@@ -255,10 +245,8 @@ export interface Cancel {
|
|
|
255
245
|
}
|
|
256
246
|
|
|
257
247
|
export interface RefundTransaction {
|
|
258
|
-
// shoppingcart
|
|
259
248
|
original_shoppingcart?: string;
|
|
260
249
|
refund_date?: string;
|
|
261
|
-
// user
|
|
262
250
|
issued_by?: string;
|
|
263
251
|
amount?: number;
|
|
264
252
|
refund_amount?: number;
|
|
@@ -302,9 +290,7 @@ export interface CashlessPayment {
|
|
|
302
290
|
}
|
|
303
291
|
|
|
304
292
|
export interface MealPlan {
|
|
305
|
-
// mealplan
|
|
306
293
|
id?: string;
|
|
307
|
-
// tender
|
|
308
294
|
tender?: string;
|
|
309
295
|
name?: string;
|
|
310
296
|
}
|
|
@@ -323,9 +309,7 @@ export interface OrderIssue {
|
|
|
323
309
|
}
|
|
324
310
|
|
|
325
311
|
export interface OrderedItem {
|
|
326
|
-
// item
|
|
327
312
|
id: string;
|
|
328
|
-
// index
|
|
329
313
|
_index: string;
|
|
330
314
|
quantity?: number;
|
|
331
315
|
unit?: number;
|
|
@@ -346,9 +330,7 @@ export interface OrderedItem {
|
|
|
346
330
|
en?: string;
|
|
347
331
|
};
|
|
348
332
|
items?: {
|
|
349
|
-
// option
|
|
350
333
|
id?: string;
|
|
351
|
-
// index
|
|
352
334
|
_index?: string;
|
|
353
335
|
meta?: Record<string, any>;
|
|
354
336
|
}[];
|
|
@@ -389,6 +371,25 @@ export interface SNSMessage {
|
|
|
389
371
|
UnsubscribeURL?: string;
|
|
390
372
|
}
|
|
391
373
|
|
|
374
|
+
export interface MultiLanguageLabel {
|
|
375
|
+
en?: string;
|
|
376
|
+
fr?: string;
|
|
377
|
+
es?: string;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
export interface ApexCodeProperties {
|
|
381
|
+
codeType: string;
|
|
382
|
+
codeValue: string;
|
|
383
|
+
qrImage: string;
|
|
384
|
+
qrExpiryDate?: string;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
export interface ApexCodes {
|
|
388
|
+
operator_code: ApexCodeProperties;
|
|
389
|
+
customer_code: ApexCodeProperties;
|
|
390
|
+
reclaim_code: ApexCodeProperties;
|
|
391
|
+
}
|
|
392
|
+
|
|
392
393
|
// POST /order - Create an Order
|
|
393
394
|
|
|
394
395
|
export interface PostOrderQuery {
|