@compassdigital/sdk.typescript 3.70.0 → 3.72.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/.eslintignore +1 -0
- package/lib/base.d.ts +35 -36
- package/lib/base.d.ts.map +1 -1
- package/lib/base.js +66 -68
- package/lib/base.js.map +1 -1
- package/lib/interface/config.d.ts +83 -1
- package/lib/interface/config.d.ts.map +1 -1
- package/lib/interface/promo.d.ts +17 -4
- package/lib/interface/promo.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/base.ts +410 -425
- package/src/interface/config.ts +88 -1
- package/src/interface/promo.ts +18 -5
package/src/interface/config.ts
CHANGED
|
@@ -19,6 +19,93 @@ export interface Success {
|
|
|
19
19
|
success?: boolean;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
export interface PublicBrandConfig {
|
|
23
|
+
global_item_search?: string;
|
|
24
|
+
canadian_calorie_disclaimer?: string;
|
|
25
|
+
email_subscriptions?: string;
|
|
26
|
+
brand_location_description?: string;
|
|
27
|
+
description_label?: {
|
|
28
|
+
en?: string;
|
|
29
|
+
fr?: string;
|
|
30
|
+
};
|
|
31
|
+
description?: string;
|
|
32
|
+
delivery_destinations?: string[];
|
|
33
|
+
display_calories?: boolean;
|
|
34
|
+
pickup_asap?: {
|
|
35
|
+
enabled?: boolean;
|
|
36
|
+
};
|
|
37
|
+
show_instructions?: boolean;
|
|
38
|
+
has_kds?: boolean;
|
|
39
|
+
runner_app_enabled?: boolean;
|
|
40
|
+
show_single_timeslot?: boolean;
|
|
41
|
+
[index: string]: any;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface PublicLocationConfig {
|
|
45
|
+
mealplan?: MealplanConfig[];
|
|
46
|
+
badge_pay?: {
|
|
47
|
+
id?: string;
|
|
48
|
+
type?: string;
|
|
49
|
+
webview?: string;
|
|
50
|
+
name?: string;
|
|
51
|
+
};
|
|
52
|
+
cashless?: {
|
|
53
|
+
id?: string;
|
|
54
|
+
type?: string;
|
|
55
|
+
webview?: string;
|
|
56
|
+
name?: string;
|
|
57
|
+
voucher_webview?: string;
|
|
58
|
+
tenders?: {
|
|
59
|
+
tender_type?: string;
|
|
60
|
+
name?: string;
|
|
61
|
+
tax_exempt?: string;
|
|
62
|
+
}[];
|
|
63
|
+
};
|
|
64
|
+
has_kds?: boolean;
|
|
65
|
+
runner_app_enabled?: boolean;
|
|
66
|
+
show_single_timeslot?: boolean;
|
|
67
|
+
is_checkin_enabled?: boolean;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface AppConfig {
|
|
71
|
+
min?: string;
|
|
72
|
+
url?: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface PrivateConfig {
|
|
76
|
+
payment?: {
|
|
77
|
+
refund?: boolean;
|
|
78
|
+
freedompay?: any;
|
|
79
|
+
};
|
|
80
|
+
loyalty?: {
|
|
81
|
+
provider_id?: string;
|
|
82
|
+
enabled?: boolean;
|
|
83
|
+
loyalty_emails?: {
|
|
84
|
+
email?: string;
|
|
85
|
+
}[];
|
|
86
|
+
};
|
|
87
|
+
mealplan?: MealplanConfig[];
|
|
88
|
+
[index: string]: any;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface MealplanConfig {
|
|
92
|
+
id?: string;
|
|
93
|
+
type?: string;
|
|
94
|
+
name?: string;
|
|
95
|
+
tenders?: {
|
|
96
|
+
max_swipes_per_transaction?: number;
|
|
97
|
+
name?: string;
|
|
98
|
+
rates?: {
|
|
99
|
+
amount?: any;
|
|
100
|
+
hours?: any;
|
|
101
|
+
}[];
|
|
102
|
+
tender_number?: string;
|
|
103
|
+
type?: string;
|
|
104
|
+
id?: string;
|
|
105
|
+
tax_exempt?: boolean;
|
|
106
|
+
}[];
|
|
107
|
+
}
|
|
108
|
+
|
|
22
109
|
// GET /config/appconfig - get appconfig - an object with data for clients including minimum versions apps (boost, thrive, J&J) should be running and a link to the respective app store
|
|
23
110
|
|
|
24
111
|
export interface GetConfigAppconfigQuery {
|
|
@@ -26,7 +113,7 @@ export interface GetConfigAppconfigQuery {
|
|
|
26
113
|
_query?: string;
|
|
27
114
|
}
|
|
28
115
|
|
|
29
|
-
export type GetConfigAppconfigResponse =
|
|
116
|
+
export type GetConfigAppconfigResponse = AppConfig;
|
|
30
117
|
|
|
31
118
|
export interface GetConfigAppconfigRequest
|
|
32
119
|
extends BaseRequest,
|
package/src/interface/promo.ts
CHANGED
|
@@ -146,7 +146,7 @@ export interface PromoValidateRequest {
|
|
|
146
146
|
id?: string;
|
|
147
147
|
date_created?: string;
|
|
148
148
|
};
|
|
149
|
-
|
|
149
|
+
totals?: {
|
|
150
150
|
amount?: number;
|
|
151
151
|
currency?: string;
|
|
152
152
|
};
|
|
@@ -162,8 +162,9 @@ export interface PromoRedeemRequest {
|
|
|
162
162
|
id?: string;
|
|
163
163
|
date_created?: string;
|
|
164
164
|
};
|
|
165
|
-
|
|
165
|
+
totals?: {
|
|
166
166
|
amount?: number;
|
|
167
|
+
discount?: number;
|
|
167
168
|
currency?: string;
|
|
168
169
|
};
|
|
169
170
|
provider_data?: FPValidationData;
|
|
@@ -227,11 +228,23 @@ export interface RedemptionReversal {
|
|
|
227
228
|
// redemption
|
|
228
229
|
original_redemption?: string;
|
|
229
230
|
app?: string;
|
|
231
|
+
[index: string]: any;
|
|
230
232
|
}
|
|
231
233
|
|
|
232
|
-
export interface
|
|
234
|
+
export interface PromoReverseRequest {
|
|
233
235
|
reason?: string;
|
|
234
236
|
app?: string;
|
|
237
|
+
location_brand?: string;
|
|
238
|
+
totals?: {
|
|
239
|
+
amount?: number;
|
|
240
|
+
currency?: string;
|
|
241
|
+
};
|
|
242
|
+
shoppingcart?: {
|
|
243
|
+
id?: string;
|
|
244
|
+
date_created?: string;
|
|
245
|
+
};
|
|
246
|
+
order_request_id?: string;
|
|
247
|
+
redemption?: Redemption;
|
|
235
248
|
}
|
|
236
249
|
|
|
237
250
|
export interface Customer {
|
|
@@ -468,11 +481,11 @@ export interface DeletePromoCustomerRequest extends BaseRequest {
|
|
|
468
481
|
// POST /promo/voucher/{id}/reverse - Reverse a redemption from a promo voucher
|
|
469
482
|
|
|
470
483
|
export interface PostPromoVoucherReversePath {
|
|
471
|
-
//
|
|
484
|
+
// For FP: order request ID (`requestID` from the FP invoice service)
|
|
472
485
|
id: string;
|
|
473
486
|
}
|
|
474
487
|
|
|
475
|
-
export type PostPromoVoucherReverseBody =
|
|
488
|
+
export type PostPromoVoucherReverseBody = PromoReverseRequest;
|
|
476
489
|
|
|
477
490
|
export type PostPromoVoucherReverseResponse = RedemptionReversal;
|
|
478
491
|
|