@compassdigital/sdk.typescript 4.14.0 → 4.16.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/base.d.ts +1 -11
- package/lib/base.d.ts.map +1 -1
- package/lib/base.js +3 -21
- package/lib/base.js.map +1 -1
- package/lib/index.d.ts +54 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +55 -1
- package/lib/index.js.map +1 -1
- package/lib/interface/ai.d.ts +3 -3
- package/lib/interface/ai.d.ts.map +1 -1
- package/lib/interface/announcement.d.ts +2 -2
- package/lib/interface/announcement.d.ts.map +1 -1
- package/lib/interface/calendar.d.ts +2 -2
- package/lib/interface/calendar.d.ts.map +1 -1
- package/lib/interface/centricos.d.ts +46 -4
- package/lib/interface/centricos.d.ts.map +1 -1
- package/lib/interface/compassconnect.d.ts +1 -1
- package/lib/interface/compassconnect.d.ts.map +1 -1
- package/lib/interface/config.d.ts +3 -5
- package/lib/interface/config.d.ts.map +1 -1
- package/lib/interface/datalake.d.ts +2 -2
- package/lib/interface/datalake.d.ts.map +1 -1
- package/lib/interface/delivery.d.ts +1 -1
- package/lib/interface/delivery.d.ts.map +1 -1
- package/lib/interface/email.d.ts +2 -2
- package/lib/interface/email.d.ts.map +1 -1
- package/lib/interface/file.d.ts +1 -1
- package/lib/interface/file.d.ts.map +1 -1
- package/lib/interface/frictionless.d.ts +26 -7
- package/lib/interface/frictionless.d.ts.map +1 -1
- package/lib/interface/kds.d.ts +1 -1
- package/lib/interface/kds.d.ts.map +1 -1
- package/lib/interface/location.d.ts +27 -16
- package/lib/interface/location.d.ts.map +1 -1
- package/lib/interface/location.js +12 -0
- package/lib/interface/location.js.map +1 -1
- package/lib/interface/mealplan.d.ts +1 -1
- package/lib/interface/mealplan.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +264 -249
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/menu.js +6 -0
- package/lib/interface/menu.js.map +1 -1
- package/lib/interface/notification.d.ts +2 -2
- package/lib/interface/notification.d.ts.map +1 -1
- package/lib/interface/order.d.ts +3 -3
- package/lib/interface/order.d.ts.map +1 -1
- package/lib/interface/partner.d.ts +51 -19
- package/lib/interface/partner.d.ts.map +1 -1
- package/lib/interface/partner.js +11 -0
- package/lib/interface/partner.js.map +1 -1
- package/lib/interface/payment.d.ts +1 -1
- package/lib/interface/payment.d.ts.map +1 -1
- package/lib/interface/promo.d.ts +12 -5
- package/lib/interface/promo.d.ts.map +1 -1
- package/lib/interface/promo.js +8 -0
- package/lib/interface/promo.js.map +1 -1
- package/lib/interface/report.d.ts +20 -5
- package/lib/interface/report.d.ts.map +1 -1
- package/lib/interface/shoppingcart.d.ts +12 -8
- package/lib/interface/shoppingcart.d.ts.map +1 -1
- package/lib/interface/shoppingcart.js +5 -0
- package/lib/interface/shoppingcart.js.map +1 -1
- package/lib/interface/task.d.ts +19 -11
- package/lib/interface/task.d.ts.map +1 -1
- package/lib/interface/task.js +9 -0
- package/lib/interface/task.js.map +1 -1
- package/lib/interface/user.d.ts +4 -4
- package/lib/interface/user.d.ts.map +1 -1
- package/lib/interface/util.d.ts +19 -0
- package/lib/interface/util.d.ts.map +1 -1
- package/lib/interface/vendor.d.ts +1 -1
- package/lib/interface/vendor.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/base.ts +6 -25
- package/src/index.ts +140 -1
- package/src/interface/ai.ts +3 -3
- package/src/interface/announcement.ts +2 -2
- package/src/interface/calendar.ts +2 -2
- package/src/interface/centricos.ts +76 -4
- package/src/interface/compassconnect.ts +1 -1
- package/src/interface/config.ts +3 -5
- package/src/interface/datalake.ts +2 -2
- package/src/interface/delivery.ts +1 -1
- package/src/interface/email.ts +2 -2
- package/src/interface/file.ts +1 -1
- package/src/interface/frictionless.ts +49 -7
- package/src/interface/kds.ts +1 -1
- package/src/interface/location.ts +26 -16
- package/src/interface/mealplan.ts +1 -1
- package/src/interface/menu.ts +263 -249
- package/src/interface/notification.ts +2 -2
- package/src/interface/order.ts +3 -3
- package/src/interface/partner.ts +53 -19
- package/src/interface/payment.ts +1 -1
- package/src/interface/promo.ts +11 -5
- package/src/interface/report.ts +34 -6
- package/src/interface/shoppingcart.ts +11 -8
- package/src/interface/task.ts +18 -17
- package/src/interface/user.ts +4 -4
- package/src/interface/util.ts +21 -0
- package/src/interface/vendor.ts +1 -1
|
@@ -6,7 +6,7 @@ import { RequestQuery, BaseRequest } from "./util";
|
|
|
6
6
|
export interface Error {
|
|
7
7
|
error?: string;
|
|
8
8
|
code?: number;
|
|
9
|
-
data?:
|
|
9
|
+
data?: any;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export interface Notification {
|
|
@@ -33,7 +33,7 @@ export interface PushNotificationBody {
|
|
|
33
33
|
text: string;
|
|
34
34
|
// Recipient of the notifications. Example: specific realm, role or user id
|
|
35
35
|
target: string;
|
|
36
|
-
data?:
|
|
36
|
+
data?: any;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
export interface NotificationStatus {
|
package/src/interface/order.ts
CHANGED
|
@@ -49,7 +49,7 @@ export interface CreateOrder {
|
|
|
49
49
|
export interface Error {
|
|
50
50
|
error?: string;
|
|
51
51
|
code?: number;
|
|
52
|
-
data?:
|
|
52
|
+
data?: any;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
export interface Issue {
|
|
@@ -327,7 +327,7 @@ export interface OrderedItem {
|
|
|
327
327
|
id?: string;
|
|
328
328
|
// index
|
|
329
329
|
_index?: string;
|
|
330
|
-
meta?:
|
|
330
|
+
meta?: any;
|
|
331
331
|
}[];
|
|
332
332
|
}[];
|
|
333
333
|
[index: string]: any;
|
|
@@ -338,7 +338,7 @@ export interface Orders {
|
|
|
338
338
|
lastKey?: string;
|
|
339
339
|
count?: number;
|
|
340
340
|
// url to query next set of data
|
|
341
|
-
links?:
|
|
341
|
+
links?: any;
|
|
342
342
|
}
|
|
343
343
|
|
|
344
344
|
export interface ItemsWithIssue extends OrderedItem {
|
package/src/interface/partner.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { RequestQuery, BaseRequest } from "./util";
|
|
|
6
6
|
export interface Error {
|
|
7
7
|
message?: string;
|
|
8
8
|
code?: number;
|
|
9
|
-
data?:
|
|
9
|
+
data?: any;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export interface ShoppingCartResponse {
|
|
@@ -18,18 +18,20 @@ export interface ShoppingCartResponse {
|
|
|
18
18
|
menu?: string;
|
|
19
19
|
// brand
|
|
20
20
|
brand?: string;
|
|
21
|
-
date?:
|
|
21
|
+
date?: any;
|
|
22
22
|
items?: ItemResponse[];
|
|
23
23
|
sub_total?: {
|
|
24
24
|
amount?: MonetaryValue;
|
|
25
25
|
};
|
|
26
26
|
promo?: {
|
|
27
27
|
code?: string;
|
|
28
|
+
provider?: "fp" | "voucherify";
|
|
28
29
|
amount_off?: MonetaryValue;
|
|
29
30
|
percent_off?: MonetaryValue;
|
|
30
31
|
amount?: MonetaryValue;
|
|
31
32
|
app?: string;
|
|
32
|
-
discount?:
|
|
33
|
+
discount?: any;
|
|
34
|
+
provider_data?: FPValidationData;
|
|
33
35
|
};
|
|
34
36
|
//@deprecated
|
|
35
37
|
loyalty?: {
|
|
@@ -44,10 +46,12 @@ export interface ShoppingCartResponse {
|
|
|
44
46
|
};
|
|
45
47
|
discount?: {
|
|
46
48
|
code?: string;
|
|
49
|
+
provider?: "fp" | "voucherify";
|
|
47
50
|
amount_off?: MonetaryValue;
|
|
48
51
|
percent_off?: MonetaryValue;
|
|
49
52
|
amount?: MonetaryValue;
|
|
50
|
-
discount?:
|
|
53
|
+
discount?: any;
|
|
54
|
+
provider_data?: FPValidationData;
|
|
51
55
|
};
|
|
52
56
|
payment_method?: {
|
|
53
57
|
// Mealplan payment details
|
|
@@ -55,17 +59,20 @@ export interface ShoppingCartResponse {
|
|
|
55
59
|
id?: string;
|
|
56
60
|
tender?: string;
|
|
57
61
|
total?: MonetaryValue;
|
|
62
|
+
type?: PaymentType;
|
|
58
63
|
};
|
|
59
64
|
// Credit Cart payment details
|
|
60
65
|
credit_card?: {
|
|
61
66
|
card_type?: string;
|
|
62
67
|
last4?: string;
|
|
63
68
|
total?: MonetaryValue;
|
|
69
|
+
type?: PaymentType;
|
|
64
70
|
};
|
|
65
71
|
// Digital Wallet Pay payment details
|
|
66
72
|
digital_wallet_pay?: {
|
|
67
73
|
wallet_type?: string;
|
|
68
74
|
total?: MonetaryValue;
|
|
75
|
+
type?: PaymentType;
|
|
69
76
|
};
|
|
70
77
|
// Meal Swipes payment details
|
|
71
78
|
meal_swipes?: {
|
|
@@ -76,11 +83,13 @@ export interface ShoppingCartResponse {
|
|
|
76
83
|
swipes?: MonetaryValue;
|
|
77
84
|
rate?: MonetaryValue;
|
|
78
85
|
total?: MonetaryValue;
|
|
86
|
+
type?: PaymentType;
|
|
79
87
|
};
|
|
80
88
|
// Meal Exchange payment details
|
|
81
89
|
meal_exchange?: {
|
|
82
90
|
id?: string;
|
|
83
91
|
tender?: string;
|
|
92
|
+
type?: PaymentType;
|
|
84
93
|
};
|
|
85
94
|
badge_pay?: CashlessTender;
|
|
86
95
|
stipend?: CashlessTender;
|
|
@@ -117,7 +126,7 @@ export interface ShoppingCartResponse {
|
|
|
117
126
|
};
|
|
118
127
|
meta?: {
|
|
119
128
|
// Raw request from any vendor integrated with CDL
|
|
120
|
-
vendor?:
|
|
129
|
+
vendor?: any;
|
|
121
130
|
[index: string]: any;
|
|
122
131
|
};
|
|
123
132
|
}
|
|
@@ -180,7 +189,7 @@ export interface ItemResponse {
|
|
|
180
189
|
original_label?: Label;
|
|
181
190
|
taxes?: string[];
|
|
182
191
|
};
|
|
183
|
-
amount_off_exclusions?:
|
|
192
|
+
amount_off_exclusions?: AmountOffExclusion[];
|
|
184
193
|
is?: {
|
|
185
194
|
disabled?: boolean;
|
|
186
195
|
};
|
|
@@ -190,10 +199,10 @@ export interface ItemResponse {
|
|
|
190
199
|
};
|
|
191
200
|
}[];
|
|
192
201
|
// Details about discount like BOGO, LTO, Bundle etc.
|
|
193
|
-
item_discount?:
|
|
202
|
+
item_discount?: any;
|
|
194
203
|
// user specified instructions for the item
|
|
195
204
|
special_instructions?: string;
|
|
196
|
-
amount_off_exclusions?:
|
|
205
|
+
amount_off_exclusions?: AmountOffExclusion[];
|
|
197
206
|
added_on?: string;
|
|
198
207
|
meal_value?: IntegerValue;
|
|
199
208
|
category?: Label;
|
|
@@ -203,6 +212,24 @@ export interface ItemResponse {
|
|
|
203
212
|
|
|
204
213
|
export type MonetaryValue = number;
|
|
205
214
|
|
|
215
|
+
export type PaymentType = string;
|
|
216
|
+
|
|
217
|
+
export interface FPValidationData {
|
|
218
|
+
discountIncentives?: {
|
|
219
|
+
id?: string;
|
|
220
|
+
program?: {
|
|
221
|
+
code?: string;
|
|
222
|
+
};
|
|
223
|
+
[index: string]: any;
|
|
224
|
+
}[];
|
|
225
|
+
[index: string]: any;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
enum AmountOffExclusion {
|
|
229
|
+
DISCOUNT = "discount",
|
|
230
|
+
PROMO = "promo",
|
|
231
|
+
}
|
|
232
|
+
|
|
206
233
|
export interface Label {
|
|
207
234
|
en?: string;
|
|
208
235
|
fr?: string;
|
|
@@ -221,6 +248,7 @@ export interface CashlessTender {
|
|
|
221
248
|
total?: MonetaryValue;
|
|
222
249
|
tender?: string;
|
|
223
250
|
name?: string;
|
|
251
|
+
type?: PaymentType;
|
|
224
252
|
}
|
|
225
253
|
|
|
226
254
|
export interface Taxes {
|
|
@@ -251,7 +279,7 @@ export interface LocationGroup {
|
|
|
251
279
|
meta?: {
|
|
252
280
|
[index: string]: any;
|
|
253
281
|
};
|
|
254
|
-
style?:
|
|
282
|
+
style?: any;
|
|
255
283
|
[index: string]: any;
|
|
256
284
|
}
|
|
257
285
|
|
|
@@ -309,8 +337,8 @@ export interface Location {
|
|
|
309
337
|
en?: string;
|
|
310
338
|
fr?: string;
|
|
311
339
|
};
|
|
312
|
-
hours?:
|
|
313
|
-
deliveryHours?:
|
|
340
|
+
hours?: any;
|
|
341
|
+
deliveryHours?: any;
|
|
314
342
|
service_fee?: {
|
|
315
343
|
type?: string;
|
|
316
344
|
value?: number;
|
|
@@ -342,10 +370,10 @@ export interface Brand {
|
|
|
342
370
|
};
|
|
343
371
|
hours?: Hours[];
|
|
344
372
|
deliveryHours?: DeliveryHours[];
|
|
345
|
-
style?:
|
|
373
|
+
style?: any;
|
|
346
374
|
// pos
|
|
347
375
|
pos?: string;
|
|
348
|
-
terminals?:
|
|
376
|
+
terminals?: any[];
|
|
349
377
|
timeslots?: {
|
|
350
378
|
time?: string;
|
|
351
379
|
averagePrepTime?: string;
|
|
@@ -370,6 +398,8 @@ export interface Brand {
|
|
|
370
398
|
promo_exemptions_enabled?: boolean;
|
|
371
399
|
local_images_enabled?: boolean;
|
|
372
400
|
hidden?: boolean;
|
|
401
|
+
show_in_kiosk?: boolean;
|
|
402
|
+
show_in_pos?: boolean;
|
|
373
403
|
item_desc_edit_enabled?: boolean;
|
|
374
404
|
scan_and_go_supported?: boolean;
|
|
375
405
|
calories_edit_enabled?: boolean;
|
|
@@ -390,8 +420,8 @@ export interface Brand {
|
|
|
390
420
|
// company
|
|
391
421
|
company?: string;
|
|
392
422
|
config?: {
|
|
393
|
-
private?:
|
|
394
|
-
public?:
|
|
423
|
+
private?: any;
|
|
424
|
+
public?: any;
|
|
395
425
|
};
|
|
396
426
|
tax_rate?: number;
|
|
397
427
|
meta?: {
|
|
@@ -581,7 +611,7 @@ export interface Group {
|
|
|
581
611
|
};
|
|
582
612
|
// The number of units that belong to this item. For example, a dozen doughnuts should have a unit value of 12
|
|
583
613
|
unit?: number;
|
|
584
|
-
ingredients?:
|
|
614
|
+
ingredients?: any[];
|
|
585
615
|
amount_off_exclusions?: AmountOffExclusionTypes[];
|
|
586
616
|
nutrition?: {
|
|
587
617
|
kcal?: number;
|
|
@@ -751,7 +781,11 @@ export interface Nutrition {
|
|
|
751
781
|
unit?: string;
|
|
752
782
|
}
|
|
753
783
|
|
|
754
|
-
|
|
784
|
+
enum AmountOffExclusionTypes {
|
|
785
|
+
LOYALTY = "loyalty",
|
|
786
|
+
DISCOUNT = "discount",
|
|
787
|
+
PROMO = "promo",
|
|
788
|
+
}
|
|
755
789
|
|
|
756
790
|
export interface CognitionStore {
|
|
757
791
|
// UUID for external store
|
|
@@ -786,7 +820,7 @@ export interface PostPartnerStandardcognitionShoppingcartBody {
|
|
|
786
820
|
// shoppingcart
|
|
787
821
|
shoppingcart?: string;
|
|
788
822
|
// Meta data from Standard Cognition shoppingcart
|
|
789
|
-
meta?:
|
|
823
|
+
meta?: any;
|
|
790
824
|
}
|
|
791
825
|
|
|
792
826
|
export type PostPartnerStandardcognitionShoppingcartResponse = ShoppingCartResponse;
|
|
@@ -849,7 +883,7 @@ export interface PostPartnerEventPath {
|
|
|
849
883
|
id: string;
|
|
850
884
|
}
|
|
851
885
|
|
|
852
|
-
export type PostPartnerEventBody =
|
|
886
|
+
export type PostPartnerEventBody = any;
|
|
853
887
|
|
|
854
888
|
export type PostPartnerEventResponse = Success;
|
|
855
889
|
|
package/src/interface/payment.ts
CHANGED
package/src/interface/promo.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { RequestQuery, BaseRequest } from "./util";
|
|
|
6
6
|
export interface Error {
|
|
7
7
|
message?: string;
|
|
8
8
|
code?: number;
|
|
9
|
-
data?:
|
|
9
|
+
data?: any;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export interface PromotionBody {
|
|
@@ -58,7 +58,13 @@ export interface Promotion {
|
|
|
58
58
|
meta?: PromoMeta;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
enum Status {
|
|
62
|
+
ACTIVE = "active",
|
|
63
|
+
SCHEDULED = "scheduled",
|
|
64
|
+
PAUSED = "paused",
|
|
65
|
+
EXPIRED = "expired",
|
|
66
|
+
ARCHIVED = "archived",
|
|
67
|
+
}
|
|
62
68
|
|
|
63
69
|
export interface DatetimeObject {
|
|
64
70
|
year: number;
|
|
@@ -254,10 +260,10 @@ export interface Customer {
|
|
|
254
260
|
name?: string;
|
|
255
261
|
email?: string;
|
|
256
262
|
description?: string;
|
|
257
|
-
address?:
|
|
263
|
+
address?: any;
|
|
258
264
|
phone?: string;
|
|
259
|
-
summary?:
|
|
260
|
-
loyalty?:
|
|
265
|
+
summary?: any;
|
|
266
|
+
loyalty?: any;
|
|
261
267
|
metadata?: {
|
|
262
268
|
origin?: string;
|
|
263
269
|
};
|
package/src/interface/report.ts
CHANGED
|
@@ -10,7 +10,7 @@ export interface Success {
|
|
|
10
10
|
export interface Error {
|
|
11
11
|
message?: string;
|
|
12
12
|
code?: number;
|
|
13
|
-
data?:
|
|
13
|
+
data?: any;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export interface EODReports {
|
|
@@ -329,11 +329,11 @@ export interface ReportGroupConfigRequest {
|
|
|
329
329
|
}
|
|
330
330
|
|
|
331
331
|
export interface ReportGroupConfigResponse {
|
|
332
|
-
location_group_id
|
|
332
|
+
location_group_id: string;
|
|
333
333
|
// Time in 24-hour format (HH:MM).
|
|
334
|
-
day_start
|
|
335
|
-
day_parts
|
|
336
|
-
is_default
|
|
334
|
+
day_start: string;
|
|
335
|
+
day_parts: DayPartConfig;
|
|
336
|
+
is_default: boolean;
|
|
337
337
|
}
|
|
338
338
|
|
|
339
339
|
// GET /report/analytics/group/{location_group}/{report_type}
|
|
@@ -503,7 +503,7 @@ export interface GetReportEodGroupItemsRequest
|
|
|
503
503
|
RequestQuery<GetReportEodGroupItemsQuery>,
|
|
504
504
|
GetReportEodGroupItemsPath {}
|
|
505
505
|
|
|
506
|
-
// PUT /report/group/{location_group}/config - Update report configuration for a location group
|
|
506
|
+
// PUT /report/group/{location_group}/config - Update report configuration for a location group. Times are in UTC.
|
|
507
507
|
|
|
508
508
|
export interface PutReportGroupConfigPath {
|
|
509
509
|
location_group: string;
|
|
@@ -516,3 +516,31 @@ export type PutReportGroupConfigResponse = ReportGroupConfigResponse;
|
|
|
516
516
|
export interface PutReportGroupConfigRequest extends BaseRequest, PutReportGroupConfigPath {
|
|
517
517
|
body: PutReportGroupConfigBody;
|
|
518
518
|
}
|
|
519
|
+
|
|
520
|
+
// GET /report/group/{location_group}/config - Get report configuration for a location group. Times are in UTC.
|
|
521
|
+
|
|
522
|
+
export interface GetReportGroupConfigPath {
|
|
523
|
+
location_group: string;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
export interface GetReportGroupConfigQuery {
|
|
527
|
+
// Graphql query string
|
|
528
|
+
_query?: string;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
export type GetReportGroupConfigResponse = ReportGroupConfigResponse;
|
|
532
|
+
|
|
533
|
+
export interface GetReportGroupConfigRequest
|
|
534
|
+
extends BaseRequest,
|
|
535
|
+
RequestQuery<GetReportGroupConfigQuery>,
|
|
536
|
+
GetReportGroupConfigPath {}
|
|
537
|
+
|
|
538
|
+
// DELETE /report/group/{location_group}/config - Delete report configuration for a location group
|
|
539
|
+
|
|
540
|
+
export interface DeleteReportGroupConfigPath {
|
|
541
|
+
location_group: string;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
export type DeleteReportGroupConfigResponse = ReportGroupConfigResponse;
|
|
545
|
+
|
|
546
|
+
export interface DeleteReportGroupConfigRequest extends BaseRequest, DeleteReportGroupConfigPath {}
|
|
@@ -6,7 +6,7 @@ import { RequestQuery, BaseRequest } from "./util";
|
|
|
6
6
|
export interface Error {
|
|
7
7
|
message?: string;
|
|
8
8
|
code?: number;
|
|
9
|
-
data?:
|
|
9
|
+
data?: any;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export interface ItemsRequest {
|
|
@@ -69,7 +69,7 @@ export interface ItemResponse {
|
|
|
69
69
|
};
|
|
70
70
|
options?: ModifierGroupResponse[];
|
|
71
71
|
// Details about discount like BOGO, LTO, Bundle etc.
|
|
72
|
-
item_discount?:
|
|
72
|
+
item_discount?: any;
|
|
73
73
|
// user specified instructions for the item
|
|
74
74
|
special_instructions?: string;
|
|
75
75
|
amount_off_exclusions?: AmountOffExclusion[];
|
|
@@ -239,7 +239,7 @@ export interface ShoppingCartRequest {
|
|
|
239
239
|
};
|
|
240
240
|
meta?: {
|
|
241
241
|
// Raw request from any vendor integrated with CDL
|
|
242
|
-
vendor?:
|
|
242
|
+
vendor?: any;
|
|
243
243
|
[index: string]: any;
|
|
244
244
|
};
|
|
245
245
|
}
|
|
@@ -253,7 +253,7 @@ export interface ShoppingCartResponse {
|
|
|
253
253
|
menu?: string;
|
|
254
254
|
// brand
|
|
255
255
|
brand?: string;
|
|
256
|
-
date?:
|
|
256
|
+
date?: any;
|
|
257
257
|
items?: ItemResponse[];
|
|
258
258
|
sub_total?: {
|
|
259
259
|
amount?: MonetaryValue;
|
|
@@ -265,7 +265,7 @@ export interface ShoppingCartResponse {
|
|
|
265
265
|
percent_off?: MonetaryValue;
|
|
266
266
|
amount?: MonetaryValue;
|
|
267
267
|
app?: string;
|
|
268
|
-
discount?:
|
|
268
|
+
discount?: any;
|
|
269
269
|
provider_data?: FPValidationData;
|
|
270
270
|
};
|
|
271
271
|
//@deprecated
|
|
@@ -285,7 +285,7 @@ export interface ShoppingCartResponse {
|
|
|
285
285
|
amount_off?: MonetaryValue;
|
|
286
286
|
percent_off?: MonetaryValue;
|
|
287
287
|
amount?: MonetaryValue;
|
|
288
|
-
discount?:
|
|
288
|
+
discount?: any;
|
|
289
289
|
provider_data?: FPValidationData;
|
|
290
290
|
};
|
|
291
291
|
payment_method?: {
|
|
@@ -329,7 +329,7 @@ export interface ShoppingCartResponse {
|
|
|
329
329
|
};
|
|
330
330
|
meta?: {
|
|
331
331
|
// Raw request from any vendor integrated with CDL
|
|
332
|
-
vendor?:
|
|
332
|
+
vendor?: any;
|
|
333
333
|
[index: string]: any;
|
|
334
334
|
};
|
|
335
335
|
}
|
|
@@ -428,7 +428,10 @@ export interface FPValidationData {
|
|
|
428
428
|
[index: string]: any;
|
|
429
429
|
}
|
|
430
430
|
|
|
431
|
-
|
|
431
|
+
enum AmountOffExclusion {
|
|
432
|
+
DISCOUNT = "discount",
|
|
433
|
+
PROMO = "promo",
|
|
434
|
+
}
|
|
432
435
|
|
|
433
436
|
// POST /shoppingcart/ - Create a new ShoppingCart
|
|
434
437
|
|
package/src/interface/task.ts
CHANGED
|
@@ -15,13 +15,13 @@ export interface TaskLocation {
|
|
|
15
15
|
// Pickup or Dropoff time
|
|
16
16
|
action_time: string;
|
|
17
17
|
// optional details
|
|
18
|
-
details?:
|
|
18
|
+
details?: any;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export interface Error {
|
|
22
22
|
code?: number;
|
|
23
23
|
message?: string;
|
|
24
|
-
data?:
|
|
24
|
+
data?: any;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
export interface Task {
|
|
@@ -131,8 +131,8 @@ export interface ActionResponse {
|
|
|
131
131
|
export interface TaskOrder {
|
|
132
132
|
order_id?: string;
|
|
133
133
|
customer_id?: string;
|
|
134
|
-
customer?:
|
|
135
|
-
order_details?:
|
|
134
|
+
customer?: any;
|
|
135
|
+
order_details?: any;
|
|
136
136
|
delivery_instructions?: string;
|
|
137
137
|
issue?: OrderIssue;
|
|
138
138
|
past_issues?: OrderIssue[];
|
|
@@ -146,7 +146,7 @@ export interface OrderIssue {
|
|
|
146
146
|
[index: string]: any;
|
|
147
147
|
};
|
|
148
148
|
// Array of Items with issues
|
|
149
|
-
items?:
|
|
149
|
+
items?: any[];
|
|
150
150
|
// Optional additional explanation for issue: 5,10,15 for late issues, SOLD_OUT, MODIFICATION, DIETARY_RESTRICTION for see kitchen issues
|
|
151
151
|
reason?: string;
|
|
152
152
|
meta?: {
|
|
@@ -155,13 +155,14 @@ export interface OrderIssue {
|
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
158
|
+
enum TaskStatus {
|
|
159
|
+
NEW = "new",
|
|
160
|
+
IN_PROGRESS = "in_progress",
|
|
161
|
+
READY = "ready",
|
|
162
|
+
OUT_FOR_DELIVERY = "out_for_delivery",
|
|
163
|
+
DELIVERED = "delivered",
|
|
164
|
+
ORDER_IS_READY = "order_is_ready",
|
|
165
|
+
}
|
|
165
166
|
|
|
166
167
|
// POST /task/ - Create new Task
|
|
167
168
|
|
|
@@ -277,7 +278,7 @@ export interface GetTaskAssigneePath {
|
|
|
277
278
|
|
|
278
279
|
export interface GetTaskAssigneeQuery {
|
|
279
280
|
// Task Status
|
|
280
|
-
status?:
|
|
281
|
+
status?: string;
|
|
281
282
|
// Task Location ID
|
|
282
283
|
location_id?: string;
|
|
283
284
|
// Filter tasks by their created date. Only return tasks that have a date greater than or equal to the date.
|
|
@@ -306,7 +307,7 @@ export interface GetTaskLocationBrandPath {
|
|
|
306
307
|
|
|
307
308
|
export interface GetTaskLocationBrandQuery {
|
|
308
309
|
// Task Status
|
|
309
|
-
status?:
|
|
310
|
+
status?: string;
|
|
310
311
|
// Task Location ID
|
|
311
312
|
location_id?: string;
|
|
312
313
|
// Filter tasks by their created date. Only return tasks that have a date greater than or equal to the date.
|
|
@@ -318,7 +319,7 @@ export interface GetTaskLocationBrandQuery {
|
|
|
318
319
|
// Filter tasks by the action_time in pickup_details. Only return tasks that have a pickup_time date greater than or equal to the date.
|
|
319
320
|
pickup_time?: number;
|
|
320
321
|
// The type of task that will be searched on. The default is: 'bolter'
|
|
321
|
-
query_type?:
|
|
322
|
+
query_type?: string;
|
|
322
323
|
// Graphql query string
|
|
323
324
|
_query?: string;
|
|
324
325
|
}
|
|
@@ -339,7 +340,7 @@ export interface GetTaskLocationGroupPath {
|
|
|
339
340
|
|
|
340
341
|
export interface GetTaskLocationGroupQuery {
|
|
341
342
|
// Task Status
|
|
342
|
-
status?:
|
|
343
|
+
status?: string;
|
|
343
344
|
// Task Location ID
|
|
344
345
|
location_id?: string;
|
|
345
346
|
// Filter tasks by their created date. Only return tasks that have a date greater than or equal to the date.
|
|
@@ -351,7 +352,7 @@ export interface GetTaskLocationGroupQuery {
|
|
|
351
352
|
// Filter tasks by the action_time in pickup_details. Only return tasks that have a pickup_time date greater than or equal to the date.
|
|
352
353
|
pickup_time?: number;
|
|
353
354
|
// The type of task that will be searched on. The default is: 'bolter'
|
|
354
|
-
query_type?:
|
|
355
|
+
query_type?: string;
|
|
355
356
|
// Graphql query string
|
|
356
357
|
_query?: string;
|
|
357
358
|
}
|
package/src/interface/user.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { RequestQuery, BaseRequest } from "./util";
|
|
|
6
6
|
export interface Error {
|
|
7
7
|
message?: string;
|
|
8
8
|
code?: number;
|
|
9
|
-
data?:
|
|
9
|
+
data?: any;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export interface User {
|
|
@@ -184,7 +184,7 @@ export interface guestAuthToken {
|
|
|
184
184
|
export type Permission = string;
|
|
185
185
|
|
|
186
186
|
export interface KDSToken {
|
|
187
|
-
device?:
|
|
187
|
+
device?: any;
|
|
188
188
|
access?: {
|
|
189
189
|
token?: string;
|
|
190
190
|
expires?: number;
|
|
@@ -512,7 +512,7 @@ export interface PatchUserAuthKdsPath {
|
|
|
512
512
|
device_id: string;
|
|
513
513
|
}
|
|
514
514
|
|
|
515
|
-
export type PatchUserAuthKdsBody =
|
|
515
|
+
export type PatchUserAuthKdsBody = any;
|
|
516
516
|
|
|
517
517
|
export type PatchUserAuthKdsResponse = KDSDevice;
|
|
518
518
|
|
|
@@ -549,7 +549,7 @@ export interface PostUserAddSecretPath {
|
|
|
549
549
|
key: string;
|
|
550
550
|
}
|
|
551
551
|
|
|
552
|
-
export type PostUserAddSecretBody =
|
|
552
|
+
export type PostUserAddSecretBody = any;
|
|
553
553
|
|
|
554
554
|
export type PostUserAddSecretResponse = Key;
|
|
555
555
|
|
package/src/interface/util.ts
CHANGED
|
@@ -5,9 +5,30 @@ export type RequestQuery<T extends object> = {
|
|
|
5
5
|
[K in keyof T]: T[K] extends number|undefined ? string : T[K];
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Provider TokenDetails
|
|
10
|
+
*/
|
|
11
|
+
export interface RequestContextSession {
|
|
12
|
+
user_id: string;
|
|
13
|
+
expiry: Date | null;
|
|
14
|
+
iat: Date;
|
|
15
|
+
scopes: string;
|
|
16
|
+
sub: string;
|
|
17
|
+
domain?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Provider request context.
|
|
22
|
+
*/
|
|
23
|
+
export interface RequestContext {
|
|
24
|
+
method?: string;
|
|
25
|
+
session?: RequestContextSession;
|
|
26
|
+
}
|
|
27
|
+
|
|
8
28
|
/**
|
|
9
29
|
* All requests implement this interface.
|
|
10
30
|
*/
|
|
11
31
|
export interface BaseRequest {
|
|
32
|
+
context?: RequestContext;
|
|
12
33
|
headers?: Record<string, string>;
|
|
13
34
|
}
|