@compassdigital/sdk.typescript 3.50.0 → 3.52.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/.editorconfig +0 -1
- package/lib/index.d.ts +885 -295
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +958 -316
- package/lib/index.js.map +1 -1
- package/lib/interface/announcement.d.ts +1 -0
- package/lib/interface/announcement.d.ts.map +1 -1
- package/lib/interface/calendar.d.ts +1 -0
- package/lib/interface/calendar.d.ts.map +1 -1
- package/lib/interface/compassconnect.d.ts +1 -0
- package/lib/interface/compassconnect.d.ts.map +1 -1
- package/lib/interface/config.d.ts +1 -0
- package/lib/interface/config.d.ts.map +1 -1
- package/lib/interface/datalake.d.ts +1 -0
- package/lib/interface/datalake.d.ts.map +1 -1
- package/lib/interface/delivery.d.ts +19 -0
- package/lib/interface/delivery.d.ts.map +1 -1
- package/lib/interface/email.d.ts +1 -0
- package/lib/interface/email.d.ts.map +1 -1
- package/lib/interface/file.d.ts +1 -0
- package/lib/interface/file.d.ts.map +1 -1
- package/lib/interface/kds.d.ts +1 -0
- package/lib/interface/kds.d.ts.map +1 -1
- package/lib/interface/location.d.ts +1 -0
- package/lib/interface/location.d.ts.map +1 -1
- package/lib/interface/mealplan.d.ts +1 -0
- package/lib/interface/mealplan.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +3289 -802
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/notification.d.ts +1 -0
- package/lib/interface/notification.d.ts.map +1 -1
- package/lib/interface/order.d.ts +1 -0
- package/lib/interface/order.d.ts.map +1 -1
- package/lib/interface/partner.d.ts +20 -1
- package/lib/interface/partner.d.ts.map +1 -1
- package/lib/interface/payment.d.ts +21 -18
- package/lib/interface/payment.d.ts.map +1 -1
- package/lib/interface/permission.d.ts +1 -0
- package/lib/interface/permission.d.ts.map +1 -1
- package/lib/interface/promo.d.ts +1 -0
- package/lib/interface/promo.d.ts.map +1 -1
- package/lib/interface/report.d.ts +20 -0
- package/lib/interface/report.d.ts.map +1 -1
- package/lib/interface/shoppingcart.d.ts +13 -4
- package/lib/interface/shoppingcart.d.ts.map +1 -1
- package/lib/interface/task.d.ts +1 -0
- package/lib/interface/task.d.ts.map +1 -1
- package/lib/interface/user.d.ts +1 -0
- package/lib/interface/user.d.ts.map +1 -1
- package/lib/interface/vendor.d.ts +1 -0
- package/lib/interface/vendor.d.ts.map +1 -1
- package/manifest.json +39 -39
- package/package.json +3 -3
- package/src/index.ts +2291 -613
- package/src/interface/announcement.ts +1 -0
- package/src/interface/calendar.ts +1 -0
- package/src/interface/compassconnect.ts +1 -0
- package/src/interface/config.ts +1 -0
- package/src/interface/datalake.ts +1 -0
- package/src/interface/delivery.ts +28 -0
- package/src/interface/email.ts +1 -0
- package/src/interface/file.ts +1 -0
- package/src/interface/kds.ts +1 -0
- package/src/interface/location.ts +1 -0
- package/src/interface/mealplan.ts +1 -0
- package/src/interface/menu.ts +4281 -1043
- package/src/interface/notification.ts +1 -0
- package/src/interface/order.ts +1 -0
- package/src/interface/partner.ts +35 -2
- package/src/interface/payment.ts +28 -23
- package/src/interface/permission.ts +1 -0
- package/src/interface/promo.ts +1 -0
- package/src/interface/report.ts +37 -0
- package/src/interface/shoppingcart.ts +14 -4
- package/src/interface/task.ts +1 -0
- package/src/interface/user.ts +1 -0
- package/src/interface/vendor.ts +1 -0
package/src/interface/order.ts
CHANGED
package/src/interface/partner.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { RequestQuery, BaseRequest } from "./util";
|
|
|
6
6
|
export interface Error {
|
|
7
7
|
message?: string;
|
|
8
8
|
code?: number;
|
|
9
|
+
data?: any;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
export interface ShoppingCartResponse {
|
|
@@ -28,6 +29,7 @@ export interface ShoppingCartResponse {
|
|
|
28
29
|
percent_off?: MonetaryValue;
|
|
29
30
|
amount?: MonetaryValue;
|
|
30
31
|
app?: string;
|
|
32
|
+
discount?: any;
|
|
31
33
|
};
|
|
32
34
|
//@deprecated
|
|
33
35
|
loyalty?: {
|
|
@@ -45,23 +47,28 @@ export interface ShoppingCartResponse {
|
|
|
45
47
|
amount_off?: MonetaryValue;
|
|
46
48
|
percent_off?: MonetaryValue;
|
|
47
49
|
amount?: MonetaryValue;
|
|
50
|
+
discount?: any;
|
|
48
51
|
};
|
|
49
52
|
payment_method?: {
|
|
50
53
|
email?: string;
|
|
54
|
+
// Mealplan payment details
|
|
51
55
|
mealplan?: {
|
|
52
56
|
id?: string;
|
|
53
57
|
tender?: string;
|
|
54
58
|
total?: MonetaryValue;
|
|
55
59
|
};
|
|
60
|
+
// Credit Cart payment details
|
|
56
61
|
credit_card?: {
|
|
57
62
|
card_type?: string;
|
|
58
63
|
last4?: string;
|
|
59
64
|
total?: MonetaryValue;
|
|
60
65
|
};
|
|
66
|
+
// Digital Wallet Pay payment details
|
|
61
67
|
digital_wallet_pay?: {
|
|
62
68
|
wallet_type?: string;
|
|
63
69
|
total?: MonetaryValue;
|
|
64
70
|
};
|
|
71
|
+
// Meal Swipes payment details
|
|
65
72
|
meal_swipes?: {
|
|
66
73
|
id?: string;
|
|
67
74
|
tender?: string;
|
|
@@ -71,6 +78,7 @@ export interface ShoppingCartResponse {
|
|
|
71
78
|
rate?: MonetaryValue;
|
|
72
79
|
total?: MonetaryValue;
|
|
73
80
|
};
|
|
81
|
+
// Meal Exchange payment details
|
|
74
82
|
meal_exchange?: {
|
|
75
83
|
id?: string;
|
|
76
84
|
tender?: string;
|
|
@@ -188,6 +196,7 @@ export interface ItemResponse {
|
|
|
188
196
|
meal_value?: IntegerValue;
|
|
189
197
|
category?: Label;
|
|
190
198
|
tax_rate?: MonetaryValue;
|
|
199
|
+
label?: Label;
|
|
191
200
|
}
|
|
192
201
|
|
|
193
202
|
export type MonetaryValue = number;
|
|
@@ -806,8 +815,6 @@ export interface PostPartnerStandardcognitionMenuBody {
|
|
|
806
815
|
sector: string;
|
|
807
816
|
// CDL location brand ID
|
|
808
817
|
location_brand: string;
|
|
809
|
-
// jsonfile
|
|
810
|
-
jsonfile?: string;
|
|
811
818
|
// Link for S3 menu file provided by Standard Cognition
|
|
812
819
|
s3_link: string;
|
|
813
820
|
}
|
|
@@ -847,3 +854,29 @@ export interface GetPartnerSwaggerResponse {
|
|
|
847
854
|
export interface GetPartnerSwaggerRequest
|
|
848
855
|
extends BaseRequest,
|
|
849
856
|
RequestQuery<GetPartnerSwaggerQuery> {}
|
|
857
|
+
|
|
858
|
+
// POST /partner/{id}/menu - Create a Partner menu from files(only xls for now)
|
|
859
|
+
|
|
860
|
+
export interface PostPartnerMenuPath {
|
|
861
|
+
// partner
|
|
862
|
+
id: string;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
export interface PostPartnerMenuBody {
|
|
866
|
+
// Link for S3 menu file(file is uploaded to S3 before it gets processed)
|
|
867
|
+
s3_link: string;
|
|
868
|
+
// CDL Id of a location group units of which being updated
|
|
869
|
+
location_group: string;
|
|
870
|
+
// Should make items visible in local menu by default
|
|
871
|
+
default_items_visible?: boolean;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
export interface PostPartnerMenuResponse {
|
|
875
|
+
menus?: {
|
|
876
|
+
id: string;
|
|
877
|
+
}[];
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
export interface PostPartnerMenuRequest extends BaseRequest, PostPartnerMenuPath {
|
|
881
|
+
body: PostPartnerMenuBody;
|
|
882
|
+
}
|
package/src/interface/payment.ts
CHANGED
|
@@ -137,16 +137,21 @@ export interface Success {
|
|
|
137
137
|
export interface Error {
|
|
138
138
|
error?: string;
|
|
139
139
|
code?: number;
|
|
140
|
+
data?: any;
|
|
140
141
|
}
|
|
141
142
|
|
|
142
|
-
export interface
|
|
143
|
+
export interface CashlessTender {
|
|
143
144
|
balance?: number;
|
|
144
145
|
// ID('payment', '<provider>', 'tender', <timestamp via Data.now()>
|
|
145
146
|
id?: string;
|
|
146
147
|
// name associated with badgepay tender, stored in site public config
|
|
147
148
|
name?: string;
|
|
149
|
+
// account type associated with badgepay tender, stored in site public config
|
|
150
|
+
type?: string;
|
|
148
151
|
}
|
|
149
152
|
|
|
153
|
+
export type BadgePayTender = CashlessTender;
|
|
154
|
+
|
|
150
155
|
// POST /payment/{id}/transaction
|
|
151
156
|
|
|
152
157
|
export interface PostPaymentTransactionPath {
|
|
@@ -396,63 +401,63 @@ export interface GetPaymentHpcResponse {
|
|
|
396
401
|
|
|
397
402
|
export interface GetPaymentHpcRequest extends BaseRequest, RequestQuery<GetPaymentHpcQuery> {}
|
|
398
403
|
|
|
399
|
-
// GET /payment/{id}/
|
|
404
|
+
// GET /payment/{id}/cashless
|
|
400
405
|
|
|
401
|
-
export interface
|
|
406
|
+
export interface GetPaymentCashlessPath {
|
|
402
407
|
// TODO: add parameter to swagger.json
|
|
403
408
|
id: string;
|
|
404
409
|
}
|
|
405
410
|
|
|
406
|
-
export interface
|
|
411
|
+
export interface GetPaymentCashlessQuery {
|
|
407
412
|
// Graphql query string
|
|
408
413
|
_query?: string;
|
|
409
414
|
}
|
|
410
415
|
|
|
411
|
-
export interface
|
|
412
|
-
tenders?:
|
|
416
|
+
export interface GetPaymentCashlessResponse {
|
|
417
|
+
tenders?: CashlessTender[];
|
|
413
418
|
}
|
|
414
419
|
|
|
415
|
-
export interface
|
|
420
|
+
export interface GetPaymentCashlessRequest
|
|
416
421
|
extends BaseRequest,
|
|
417
|
-
RequestQuery<
|
|
418
|
-
|
|
422
|
+
RequestQuery<GetPaymentCashlessQuery>,
|
|
423
|
+
GetPaymentCashlessPath {}
|
|
419
424
|
|
|
420
|
-
// POST /payment/{id}/
|
|
425
|
+
// POST /payment/{id}/cashless
|
|
421
426
|
|
|
422
|
-
export interface
|
|
427
|
+
export interface PostPaymentCashlessPath {
|
|
423
428
|
// TODO: add parameter to swagger.json
|
|
424
429
|
id: string;
|
|
425
430
|
}
|
|
426
431
|
|
|
427
|
-
export interface
|
|
432
|
+
export interface PostPaymentCashlessBody {
|
|
428
433
|
// The reference ID returned from FP account confirmation
|
|
429
434
|
token: string;
|
|
430
435
|
}
|
|
431
436
|
|
|
432
|
-
export interface
|
|
433
|
-
tenders?:
|
|
437
|
+
export interface PostPaymentCashlessResponse {
|
|
438
|
+
tenders?: CashlessTender[];
|
|
434
439
|
}
|
|
435
440
|
|
|
436
|
-
export interface
|
|
437
|
-
body:
|
|
441
|
+
export interface PostPaymentCashlessRequest extends BaseRequest, PostPaymentCashlessPath {
|
|
442
|
+
body: PostPaymentCashlessBody;
|
|
438
443
|
}
|
|
439
444
|
|
|
440
|
-
// DELETE /payment/{id}/
|
|
445
|
+
// DELETE /payment/{id}/cashless
|
|
441
446
|
|
|
442
|
-
export interface
|
|
447
|
+
export interface DeletePaymentCashlessPath {
|
|
443
448
|
// TODO: add parameter to swagger.json
|
|
444
449
|
id: string;
|
|
445
450
|
}
|
|
446
451
|
|
|
447
|
-
export interface
|
|
452
|
+
export interface DeletePaymentCashlessBody {
|
|
448
453
|
// An optional array of tenders to delete
|
|
449
454
|
tenders?: string[];
|
|
450
455
|
}
|
|
451
456
|
|
|
452
|
-
export interface
|
|
453
|
-
tenders?:
|
|
457
|
+
export interface DeletePaymentCashlessResponse {
|
|
458
|
+
tenders?: CashlessTender[];
|
|
454
459
|
}
|
|
455
460
|
|
|
456
|
-
export interface
|
|
457
|
-
body:
|
|
461
|
+
export interface DeletePaymentCashlessRequest extends BaseRequest, DeletePaymentCashlessPath {
|
|
462
|
+
body: DeletePaymentCashlessBody;
|
|
458
463
|
}
|
package/src/interface/promo.ts
CHANGED
package/src/interface/report.ts
CHANGED
|
@@ -10,6 +10,7 @@ export interface Success {
|
|
|
10
10
|
export interface Error {
|
|
11
11
|
message?: string;
|
|
12
12
|
code?: number;
|
|
13
|
+
data?: any;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
export interface EODReports {
|
|
@@ -306,6 +307,13 @@ export interface P2AnalyticsReport {
|
|
|
306
307
|
}[];
|
|
307
308
|
}
|
|
308
309
|
|
|
310
|
+
export interface EODItemReport {
|
|
311
|
+
// Base64 encoded file
|
|
312
|
+
file?: string;
|
|
313
|
+
// Base64 encoded file format
|
|
314
|
+
format?: string;
|
|
315
|
+
}
|
|
316
|
+
|
|
309
317
|
// GET /report/analytics/group/{location_group}/{report_type}
|
|
310
318
|
|
|
311
319
|
export interface GetReportAnalyticsGroupPath {
|
|
@@ -443,3 +451,32 @@ export interface PutReportEodGroupSubscribersRequest
|
|
|
443
451
|
PutReportEodGroupSubscribersPath {
|
|
444
452
|
body: PutReportEodGroupSubscribersBody;
|
|
445
453
|
}
|
|
454
|
+
|
|
455
|
+
// GET /report/eod/group/{id}/items - Get items sales report for selected location group
|
|
456
|
+
|
|
457
|
+
export interface GetReportEodGroupItemsPath {
|
|
458
|
+
id: string;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
export interface GetReportEodGroupItemsQuery {
|
|
462
|
+
// Report start date in ISO 8601 format
|
|
463
|
+
start: string;
|
|
464
|
+
// Report end date in ISO 8601 format
|
|
465
|
+
end: string;
|
|
466
|
+
// Output format
|
|
467
|
+
format: string;
|
|
468
|
+
// Partner name for specific formatting
|
|
469
|
+
partner: string;
|
|
470
|
+
// Location IDs, comma-separated
|
|
471
|
+
locations: string;
|
|
472
|
+
// Graphql query string
|
|
473
|
+
_query?: string;
|
|
474
|
+
nocache?: boolean;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
export type GetReportEodGroupItemsResponse = EODItemReport;
|
|
478
|
+
|
|
479
|
+
export interface GetReportEodGroupItemsRequest
|
|
480
|
+
extends BaseRequest,
|
|
481
|
+
RequestQuery<GetReportEodGroupItemsQuery>,
|
|
482
|
+
GetReportEodGroupItemsPath {}
|
|
@@ -6,6 +6,7 @@ import { RequestQuery, BaseRequest } from "./util";
|
|
|
6
6
|
export interface Error {
|
|
7
7
|
message?: string;
|
|
8
8
|
code?: number;
|
|
9
|
+
data?: any;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
export interface ItemsRequest {
|
|
@@ -81,6 +82,7 @@ export interface ItemResponse {
|
|
|
81
82
|
|
|
82
83
|
export interface ModifierGroupRequest {
|
|
83
84
|
label?: Label;
|
|
85
|
+
id?: string;
|
|
84
86
|
items?: ModifierRequest[];
|
|
85
87
|
}
|
|
86
88
|
|
|
@@ -145,7 +147,9 @@ export interface Promo {
|
|
|
145
147
|
email?: string;
|
|
146
148
|
}
|
|
147
149
|
|
|
148
|
-
export
|
|
150
|
+
export type BadgePay = CashlessTender;
|
|
151
|
+
|
|
152
|
+
export interface CashlessTender {
|
|
149
153
|
id?: string;
|
|
150
154
|
total?: MonetaryValue;
|
|
151
155
|
tender?: string;
|
|
@@ -191,7 +195,10 @@ export interface Payment {
|
|
|
191
195
|
digital_wallet_pay?: DigitalWalletPay;
|
|
192
196
|
meal_swipes?: MealSwipes;
|
|
193
197
|
meal_exchange?: MealExchange;
|
|
194
|
-
badge_pay?:
|
|
198
|
+
badge_pay?: CashlessTender;
|
|
199
|
+
stipend?: CashlessTender;
|
|
200
|
+
voucher?: CashlessTender;
|
|
201
|
+
coupon_voucher?: CashlessTender;
|
|
195
202
|
}
|
|
196
203
|
|
|
197
204
|
export interface MenuID {
|
|
@@ -278,7 +285,10 @@ export interface ShoppingCartResponse {
|
|
|
278
285
|
digital_wallet_pay?: DigitalWalletPay;
|
|
279
286
|
meal_swipes?: MealSwipes;
|
|
280
287
|
meal_exchange?: MealExchange;
|
|
281
|
-
badge_pay?:
|
|
288
|
+
badge_pay?: CashlessTender;
|
|
289
|
+
stipend?: CashlessTender;
|
|
290
|
+
voucher?: CashlessTender;
|
|
291
|
+
coupon_voucher?: CashlessTender;
|
|
282
292
|
};
|
|
283
293
|
taxes?: Taxes;
|
|
284
294
|
total?: {
|
|
@@ -321,7 +331,7 @@ export interface PaymentMethods {
|
|
|
321
331
|
mealplan: {
|
|
322
332
|
tenders: Tender[];
|
|
323
333
|
};
|
|
324
|
-
|
|
334
|
+
cashless: {
|
|
325
335
|
tenders: {
|
|
326
336
|
balance?: MonetaryValue;
|
|
327
337
|
id: string;
|
package/src/interface/task.ts
CHANGED
package/src/interface/user.ts
CHANGED