@compassdigital/sdk.typescript 4.15.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 +46 -5
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +47 -2
- 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 +1 -1
- 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 +2 -2
- 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 +21 -12
- 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 +255 -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 +26 -18
- 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 +11 -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 +14 -6
- 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 +117 -2
- package/src/interface/ai.ts +3 -3
- package/src/interface/announcement.ts +2 -2
- package/src/interface/calendar.ts +1 -1
- package/src/interface/centricos.ts +76 -4
- package/src/interface/compassconnect.ts +1 -1
- package/src/interface/config.ts +2 -2
- 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 +20 -12
- package/src/interface/mealplan.ts +1 -1
- package/src/interface/menu.ts +254 -249
- package/src/interface/notification.ts +2 -2
- package/src/interface/order.ts +3 -3
- package/src/interface/partner.ts +25 -18
- package/src/interface/payment.ts +1 -1
- package/src/interface/promo.ts +11 -5
- package/src/interface/report.ts +17 -7
- package/src/interface/shoppingcart.ts +11 -8
- package/src/interface/task.ts +13 -12
- 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,7 +18,7 @@ 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;
|
|
@@ -30,7 +30,7 @@ export interface ShoppingCartResponse {
|
|
|
30
30
|
percent_off?: MonetaryValue;
|
|
31
31
|
amount?: MonetaryValue;
|
|
32
32
|
app?: string;
|
|
33
|
-
discount?:
|
|
33
|
+
discount?: any;
|
|
34
34
|
provider_data?: FPValidationData;
|
|
35
35
|
};
|
|
36
36
|
//@deprecated
|
|
@@ -50,7 +50,7 @@ export interface ShoppingCartResponse {
|
|
|
50
50
|
amount_off?: MonetaryValue;
|
|
51
51
|
percent_off?: MonetaryValue;
|
|
52
52
|
amount?: MonetaryValue;
|
|
53
|
-
discount?:
|
|
53
|
+
discount?: any;
|
|
54
54
|
provider_data?: FPValidationData;
|
|
55
55
|
};
|
|
56
56
|
payment_method?: {
|
|
@@ -126,7 +126,7 @@ export interface ShoppingCartResponse {
|
|
|
126
126
|
};
|
|
127
127
|
meta?: {
|
|
128
128
|
// Raw request from any vendor integrated with CDL
|
|
129
|
-
vendor?:
|
|
129
|
+
vendor?: any;
|
|
130
130
|
[index: string]: any;
|
|
131
131
|
};
|
|
132
132
|
}
|
|
@@ -199,7 +199,7 @@ export interface ItemResponse {
|
|
|
199
199
|
};
|
|
200
200
|
}[];
|
|
201
201
|
// Details about discount like BOGO, LTO, Bundle etc.
|
|
202
|
-
item_discount?:
|
|
202
|
+
item_discount?: any;
|
|
203
203
|
// user specified instructions for the item
|
|
204
204
|
special_instructions?: string;
|
|
205
205
|
amount_off_exclusions?: AmountOffExclusion[];
|
|
@@ -225,7 +225,10 @@ export interface FPValidationData {
|
|
|
225
225
|
[index: string]: any;
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
-
|
|
228
|
+
enum AmountOffExclusion {
|
|
229
|
+
DISCOUNT = "discount",
|
|
230
|
+
PROMO = "promo",
|
|
231
|
+
}
|
|
229
232
|
|
|
230
233
|
export interface Label {
|
|
231
234
|
en?: string;
|
|
@@ -276,7 +279,7 @@ export interface LocationGroup {
|
|
|
276
279
|
meta?: {
|
|
277
280
|
[index: string]: any;
|
|
278
281
|
};
|
|
279
|
-
style?:
|
|
282
|
+
style?: any;
|
|
280
283
|
[index: string]: any;
|
|
281
284
|
}
|
|
282
285
|
|
|
@@ -334,8 +337,8 @@ export interface Location {
|
|
|
334
337
|
en?: string;
|
|
335
338
|
fr?: string;
|
|
336
339
|
};
|
|
337
|
-
hours?:
|
|
338
|
-
deliveryHours?:
|
|
340
|
+
hours?: any;
|
|
341
|
+
deliveryHours?: any;
|
|
339
342
|
service_fee?: {
|
|
340
343
|
type?: string;
|
|
341
344
|
value?: number;
|
|
@@ -367,10 +370,10 @@ export interface Brand {
|
|
|
367
370
|
};
|
|
368
371
|
hours?: Hours[];
|
|
369
372
|
deliveryHours?: DeliveryHours[];
|
|
370
|
-
style?:
|
|
373
|
+
style?: any;
|
|
371
374
|
// pos
|
|
372
375
|
pos?: string;
|
|
373
|
-
terminals?:
|
|
376
|
+
terminals?: any[];
|
|
374
377
|
timeslots?: {
|
|
375
378
|
time?: string;
|
|
376
379
|
averagePrepTime?: string;
|
|
@@ -417,8 +420,8 @@ export interface Brand {
|
|
|
417
420
|
// company
|
|
418
421
|
company?: string;
|
|
419
422
|
config?: {
|
|
420
|
-
private?:
|
|
421
|
-
public?:
|
|
423
|
+
private?: any;
|
|
424
|
+
public?: any;
|
|
422
425
|
};
|
|
423
426
|
tax_rate?: number;
|
|
424
427
|
meta?: {
|
|
@@ -608,7 +611,7 @@ export interface Group {
|
|
|
608
611
|
};
|
|
609
612
|
// The number of units that belong to this item. For example, a dozen doughnuts should have a unit value of 12
|
|
610
613
|
unit?: number;
|
|
611
|
-
ingredients?:
|
|
614
|
+
ingredients?: any[];
|
|
612
615
|
amount_off_exclusions?: AmountOffExclusionTypes[];
|
|
613
616
|
nutrition?: {
|
|
614
617
|
kcal?: number;
|
|
@@ -778,7 +781,11 @@ export interface Nutrition {
|
|
|
778
781
|
unit?: string;
|
|
779
782
|
}
|
|
780
783
|
|
|
781
|
-
|
|
784
|
+
enum AmountOffExclusionTypes {
|
|
785
|
+
LOYALTY = "loyalty",
|
|
786
|
+
DISCOUNT = "discount",
|
|
787
|
+
PROMO = "promo",
|
|
788
|
+
}
|
|
782
789
|
|
|
783
790
|
export interface CognitionStore {
|
|
784
791
|
// UUID for external store
|
|
@@ -813,7 +820,7 @@ export interface PostPartnerStandardcognitionShoppingcartBody {
|
|
|
813
820
|
// shoppingcart
|
|
814
821
|
shoppingcart?: string;
|
|
815
822
|
// Meta data from Standard Cognition shoppingcart
|
|
816
|
-
meta?:
|
|
823
|
+
meta?: any;
|
|
817
824
|
}
|
|
818
825
|
|
|
819
826
|
export type PostPartnerStandardcognitionShoppingcartResponse = ShoppingCartResponse;
|
|
@@ -876,7 +883,7 @@ export interface PostPartnerEventPath {
|
|
|
876
883
|
id: string;
|
|
877
884
|
}
|
|
878
885
|
|
|
879
|
-
export type PostPartnerEventBody =
|
|
886
|
+
export type PostPartnerEventBody = any;
|
|
880
887
|
|
|
881
888
|
export type PostPartnerEventResponse = Success;
|
|
882
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;
|
|
@@ -517,7 +517,7 @@ export interface PutReportGroupConfigRequest extends BaseRequest, PutReportGroup
|
|
|
517
517
|
body: PutReportGroupConfigBody;
|
|
518
518
|
}
|
|
519
519
|
|
|
520
|
-
// GET /report/group/{location_group}/config - Get report configuration for a location group
|
|
520
|
+
// GET /report/group/{location_group}/config - Get report configuration for a location group. Times are in UTC.
|
|
521
521
|
|
|
522
522
|
export interface GetReportGroupConfigPath {
|
|
523
523
|
location_group: string;
|
|
@@ -534,3 +534,13 @@ export interface GetReportGroupConfigRequest
|
|
|
534
534
|
extends BaseRequest,
|
|
535
535
|
RequestQuery<GetReportGroupConfigQuery>,
|
|
536
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
|
|
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
|
}
|