@compassdigital/sdk.typescript 3.50.0 → 3.51.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 +663 -182
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +748 -225
- package/lib/index.js.map +1 -1
- package/lib/interface/menu.d.ts +2514 -669
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/partner.d.ts +19 -1
- package/lib/interface/partner.d.ts.map +1 -1
- package/lib/interface/payment.d.ts +20 -18
- package/lib/interface/payment.d.ts.map +1 -1
- package/lib/interface/report.d.ts +19 -0
- package/lib/interface/report.d.ts.map +1 -1
- package/lib/interface/shoppingcart.d.ts +1 -0
- package/lib/interface/shoppingcart.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +1915 -542
- package/src/interface/menu.ts +3839 -1378
- package/src/interface/partner.ts +34 -2
- package/src/interface/payment.ts +27 -23
- package/src/interface/report.ts +36 -0
- package/src/interface/shoppingcart.ts +1 -0
package/src/interface/partner.ts
CHANGED
|
@@ -28,6 +28,7 @@ export interface ShoppingCartResponse {
|
|
|
28
28
|
percent_off?: MonetaryValue;
|
|
29
29
|
amount?: MonetaryValue;
|
|
30
30
|
app?: string;
|
|
31
|
+
discount?: any;
|
|
31
32
|
};
|
|
32
33
|
//@deprecated
|
|
33
34
|
loyalty?: {
|
|
@@ -45,23 +46,28 @@ export interface ShoppingCartResponse {
|
|
|
45
46
|
amount_off?: MonetaryValue;
|
|
46
47
|
percent_off?: MonetaryValue;
|
|
47
48
|
amount?: MonetaryValue;
|
|
49
|
+
discount?: any;
|
|
48
50
|
};
|
|
49
51
|
payment_method?: {
|
|
50
52
|
email?: string;
|
|
53
|
+
// Mealplan payment details
|
|
51
54
|
mealplan?: {
|
|
52
55
|
id?: string;
|
|
53
56
|
tender?: string;
|
|
54
57
|
total?: MonetaryValue;
|
|
55
58
|
};
|
|
59
|
+
// Credit Cart payment details
|
|
56
60
|
credit_card?: {
|
|
57
61
|
card_type?: string;
|
|
58
62
|
last4?: string;
|
|
59
63
|
total?: MonetaryValue;
|
|
60
64
|
};
|
|
65
|
+
// Digital Wallet Pay payment details
|
|
61
66
|
digital_wallet_pay?: {
|
|
62
67
|
wallet_type?: string;
|
|
63
68
|
total?: MonetaryValue;
|
|
64
69
|
};
|
|
70
|
+
// Meal Swipes payment details
|
|
65
71
|
meal_swipes?: {
|
|
66
72
|
id?: string;
|
|
67
73
|
tender?: string;
|
|
@@ -71,6 +77,7 @@ export interface ShoppingCartResponse {
|
|
|
71
77
|
rate?: MonetaryValue;
|
|
72
78
|
total?: MonetaryValue;
|
|
73
79
|
};
|
|
80
|
+
// Meal Exchange payment details
|
|
74
81
|
meal_exchange?: {
|
|
75
82
|
id?: string;
|
|
76
83
|
tender?: string;
|
|
@@ -188,6 +195,7 @@ export interface ItemResponse {
|
|
|
188
195
|
meal_value?: IntegerValue;
|
|
189
196
|
category?: Label;
|
|
190
197
|
tax_rate?: MonetaryValue;
|
|
198
|
+
label?: Label;
|
|
191
199
|
}
|
|
192
200
|
|
|
193
201
|
export type MonetaryValue = number;
|
|
@@ -806,8 +814,6 @@ export interface PostPartnerStandardcognitionMenuBody {
|
|
|
806
814
|
sector: string;
|
|
807
815
|
// CDL location brand ID
|
|
808
816
|
location_brand: string;
|
|
809
|
-
// jsonfile
|
|
810
|
-
jsonfile?: string;
|
|
811
817
|
// Link for S3 menu file provided by Standard Cognition
|
|
812
818
|
s3_link: string;
|
|
813
819
|
}
|
|
@@ -847,3 +853,29 @@ export interface GetPartnerSwaggerResponse {
|
|
|
847
853
|
export interface GetPartnerSwaggerRequest
|
|
848
854
|
extends BaseRequest,
|
|
849
855
|
RequestQuery<GetPartnerSwaggerQuery> {}
|
|
856
|
+
|
|
857
|
+
// POST /partner/{id}/menu - Create a Partner menu from files(only xls for now)
|
|
858
|
+
|
|
859
|
+
export interface PostPartnerMenuPath {
|
|
860
|
+
// partner
|
|
861
|
+
id: string;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
export interface PostPartnerMenuBody {
|
|
865
|
+
// Link for S3 menu file(file is uploaded to S3 before it gets processed)
|
|
866
|
+
s3_link: string;
|
|
867
|
+
// CDL Id of a location group units of which being updated
|
|
868
|
+
location_group: string;
|
|
869
|
+
// Should make items visible in local menu by default
|
|
870
|
+
default_items_visible?: boolean;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
export interface PostPartnerMenuResponse {
|
|
874
|
+
menus?: {
|
|
875
|
+
id: string;
|
|
876
|
+
}[];
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
export interface PostPartnerMenuRequest extends BaseRequest, PostPartnerMenuPath {
|
|
880
|
+
body: PostPartnerMenuBody;
|
|
881
|
+
}
|
package/src/interface/payment.ts
CHANGED
|
@@ -139,14 +139,18 @@ export interface Error {
|
|
|
139
139
|
code?: number;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
export interface
|
|
142
|
+
export interface CashlessTender {
|
|
143
143
|
balance?: number;
|
|
144
144
|
// ID('payment', '<provider>', 'tender', <timestamp via Data.now()>
|
|
145
145
|
id?: string;
|
|
146
146
|
// name associated with badgepay tender, stored in site public config
|
|
147
147
|
name?: string;
|
|
148
|
+
// account type associated with badgepay tender, stored in site public config
|
|
149
|
+
type?: string;
|
|
148
150
|
}
|
|
149
151
|
|
|
152
|
+
export type BadgePayTender = CashlessTender;
|
|
153
|
+
|
|
150
154
|
// POST /payment/{id}/transaction
|
|
151
155
|
|
|
152
156
|
export interface PostPaymentTransactionPath {
|
|
@@ -396,63 +400,63 @@ export interface GetPaymentHpcResponse {
|
|
|
396
400
|
|
|
397
401
|
export interface GetPaymentHpcRequest extends BaseRequest, RequestQuery<GetPaymentHpcQuery> {}
|
|
398
402
|
|
|
399
|
-
// GET /payment/{id}/
|
|
403
|
+
// GET /payment/{id}/cashless
|
|
400
404
|
|
|
401
|
-
export interface
|
|
405
|
+
export interface GetPaymentCashlessPath {
|
|
402
406
|
// TODO: add parameter to swagger.json
|
|
403
407
|
id: string;
|
|
404
408
|
}
|
|
405
409
|
|
|
406
|
-
export interface
|
|
410
|
+
export interface GetPaymentCashlessQuery {
|
|
407
411
|
// Graphql query string
|
|
408
412
|
_query?: string;
|
|
409
413
|
}
|
|
410
414
|
|
|
411
|
-
export interface
|
|
412
|
-
tenders?:
|
|
415
|
+
export interface GetPaymentCashlessResponse {
|
|
416
|
+
tenders?: CashlessTender[];
|
|
413
417
|
}
|
|
414
418
|
|
|
415
|
-
export interface
|
|
419
|
+
export interface GetPaymentCashlessRequest
|
|
416
420
|
extends BaseRequest,
|
|
417
|
-
RequestQuery<
|
|
418
|
-
|
|
421
|
+
RequestQuery<GetPaymentCashlessQuery>,
|
|
422
|
+
GetPaymentCashlessPath {}
|
|
419
423
|
|
|
420
|
-
// POST /payment/{id}/
|
|
424
|
+
// POST /payment/{id}/cashless
|
|
421
425
|
|
|
422
|
-
export interface
|
|
426
|
+
export interface PostPaymentCashlessPath {
|
|
423
427
|
// TODO: add parameter to swagger.json
|
|
424
428
|
id: string;
|
|
425
429
|
}
|
|
426
430
|
|
|
427
|
-
export interface
|
|
431
|
+
export interface PostPaymentCashlessBody {
|
|
428
432
|
// The reference ID returned from FP account confirmation
|
|
429
433
|
token: string;
|
|
430
434
|
}
|
|
431
435
|
|
|
432
|
-
export interface
|
|
433
|
-
tenders?:
|
|
436
|
+
export interface PostPaymentCashlessResponse {
|
|
437
|
+
tenders?: CashlessTender[];
|
|
434
438
|
}
|
|
435
439
|
|
|
436
|
-
export interface
|
|
437
|
-
body:
|
|
440
|
+
export interface PostPaymentCashlessRequest extends BaseRequest, PostPaymentCashlessPath {
|
|
441
|
+
body: PostPaymentCashlessBody;
|
|
438
442
|
}
|
|
439
443
|
|
|
440
|
-
// DELETE /payment/{id}/
|
|
444
|
+
// DELETE /payment/{id}/cashless
|
|
441
445
|
|
|
442
|
-
export interface
|
|
446
|
+
export interface DeletePaymentCashlessPath {
|
|
443
447
|
// TODO: add parameter to swagger.json
|
|
444
448
|
id: string;
|
|
445
449
|
}
|
|
446
450
|
|
|
447
|
-
export interface
|
|
451
|
+
export interface DeletePaymentCashlessBody {
|
|
448
452
|
// An optional array of tenders to delete
|
|
449
453
|
tenders?: string[];
|
|
450
454
|
}
|
|
451
455
|
|
|
452
|
-
export interface
|
|
453
|
-
tenders?:
|
|
456
|
+
export interface DeletePaymentCashlessResponse {
|
|
457
|
+
tenders?: CashlessTender[];
|
|
454
458
|
}
|
|
455
459
|
|
|
456
|
-
export interface
|
|
457
|
-
body:
|
|
460
|
+
export interface DeletePaymentCashlessRequest extends BaseRequest, DeletePaymentCashlessPath {
|
|
461
|
+
body: DeletePaymentCashlessBody;
|
|
458
462
|
}
|
package/src/interface/report.ts
CHANGED
|
@@ -306,6 +306,13 @@ export interface P2AnalyticsReport {
|
|
|
306
306
|
}[];
|
|
307
307
|
}
|
|
308
308
|
|
|
309
|
+
export interface EODItemReport {
|
|
310
|
+
// Base64 encoded file
|
|
311
|
+
file?: string;
|
|
312
|
+
// Base64 encoded file format
|
|
313
|
+
format?: string;
|
|
314
|
+
}
|
|
315
|
+
|
|
309
316
|
// GET /report/analytics/group/{location_group}/{report_type}
|
|
310
317
|
|
|
311
318
|
export interface GetReportAnalyticsGroupPath {
|
|
@@ -443,3 +450,32 @@ export interface PutReportEodGroupSubscribersRequest
|
|
|
443
450
|
PutReportEodGroupSubscribersPath {
|
|
444
451
|
body: PutReportEodGroupSubscribersBody;
|
|
445
452
|
}
|
|
453
|
+
|
|
454
|
+
// GET /report/eod/group/{id}/items - Get items sales report for selected location group
|
|
455
|
+
|
|
456
|
+
export interface GetReportEodGroupItemsPath {
|
|
457
|
+
id: string;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
export interface GetReportEodGroupItemsQuery {
|
|
461
|
+
// Report start date in ISO 8601 format
|
|
462
|
+
start: string;
|
|
463
|
+
// Report end date in ISO 8601 format
|
|
464
|
+
end: string;
|
|
465
|
+
// Output format
|
|
466
|
+
format: string;
|
|
467
|
+
// Partner name for specific formatting
|
|
468
|
+
partner: string;
|
|
469
|
+
// Location IDs, comma-separated
|
|
470
|
+
locations: string;
|
|
471
|
+
// Graphql query string
|
|
472
|
+
_query?: string;
|
|
473
|
+
nocache?: boolean;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
export type GetReportEodGroupItemsResponse = EODItemReport;
|
|
477
|
+
|
|
478
|
+
export interface GetReportEodGroupItemsRequest
|
|
479
|
+
extends BaseRequest,
|
|
480
|
+
RequestQuery<GetReportEodGroupItemsQuery>,
|
|
481
|
+
GetReportEodGroupItemsPath {}
|