@compassdigital/sdk.typescript 3.39.0 → 3.41.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 +3 -3
- package/lib/base.d.ts.map +1 -1
- package/lib/index.d.ts +83 -6
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +86 -3
- package/lib/index.js.map +1 -1
- package/lib/interface/announcement.d.ts +8 -8
- package/lib/interface/announcement.d.ts.map +1 -1
- package/lib/interface/calendar.d.ts +6 -6
- package/lib/interface/calendar.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 +14 -14
- 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/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/kds.d.ts +7 -7
- package/lib/interface/kds.d.ts.map +1 -1
- package/lib/interface/location.d.ts +72 -70
- package/lib/interface/location.d.ts.map +1 -1
- package/lib/interface/loyalty.d.ts +11 -11
- package/lib/interface/loyalty.d.ts.map +1 -1
- package/lib/interface/mealplan.d.ts +15 -9
- package/lib/interface/mealplan.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +144 -36
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/notification.d.ts +7 -7
- package/lib/interface/notification.d.ts.map +1 -1
- package/lib/interface/order.d.ts +19 -16
- package/lib/interface/order.d.ts.map +1 -1
- package/lib/interface/partner.d.ts +451 -420
- package/lib/interface/partner.d.ts.map +1 -1
- package/lib/interface/payment.d.ts +12 -13
- package/lib/interface/payment.d.ts.map +1 -1
- package/lib/interface/permission.d.ts +14 -14
- package/lib/interface/permission.d.ts.map +1 -1
- package/lib/interface/promo.d.ts +25 -25
- package/lib/interface/promo.d.ts.map +1 -1
- package/lib/interface/report.d.ts +9 -9
- package/lib/interface/report.d.ts.map +1 -1
- package/lib/interface/shoppingcart.d.ts +142 -85
- package/lib/interface/shoppingcart.d.ts.map +1 -1
- package/lib/interface/task.d.ts +13 -13
- package/lib/interface/task.d.ts.map +1 -1
- package/lib/interface/user.d.ts +58 -44
- package/lib/interface/user.d.ts.map +1 -1
- package/lib/interface/util.d.ts +1 -1
- package/lib/interface/util.d.ts.map +1 -1
- package/lib/interface/vendor.d.ts +24 -24
- package/lib/interface/vendor.d.ts.map +1 -1
- package/package.json +10 -5
- package/pipeline.yml +13 -0
- package/src/index.ts +219 -5
- package/src/interface/location.ts +8 -6
- package/src/interface/mealplan.ts +12 -1
- package/src/interface/menu.ts +175 -0
- package/src/interface/order.ts +4 -0
- package/src/interface/partner.ts +507 -469
- package/src/interface/payment.ts +2 -4
- package/src/interface/shoppingcart.ts +141 -72
- package/src/interface/user.ts +15 -0
package/src/interface/payment.ts
CHANGED
|
@@ -171,10 +171,8 @@ export interface PostPaymentTransactionRefundPath {
|
|
|
171
171
|
export interface PostPaymentTransactionRefundBody {
|
|
172
172
|
// The amount to refund for the transaction
|
|
173
173
|
amount: string;
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
transaction?: Transaction;
|
|
177
|
-
options?: Options;
|
|
174
|
+
transaction: Transaction;
|
|
175
|
+
options: Options;
|
|
178
176
|
}
|
|
179
177
|
|
|
180
178
|
export type PostPaymentTransactionRefundResponse = Refund;
|
|
@@ -7,79 +7,134 @@ export interface Error {
|
|
|
7
7
|
code?: number;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
export interface
|
|
11
|
-
|
|
10
|
+
export interface ItemsRequest {
|
|
11
|
+
items?: ItemRequest[];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface ItemRequest {
|
|
15
|
+
// item id
|
|
12
16
|
id: string;
|
|
13
|
-
|
|
17
|
+
quantity: Quantity;
|
|
18
|
+
options?: ModifierGroupRequest[];
|
|
14
19
|
_index?: string;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
meta?: {
|
|
21
|
+
brand?: string;
|
|
22
|
+
brand_label?: Label;
|
|
23
|
+
menu?: string;
|
|
24
|
+
[index: string]: any;
|
|
19
25
|
};
|
|
26
|
+
special_instructions?: string;
|
|
27
|
+
amount_off_exclusions?: string[];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface ItemResponse {
|
|
31
|
+
// can be cdl item id or stringified timestamp
|
|
32
|
+
id: string;
|
|
33
|
+
description?: Label;
|
|
34
|
+
// index based on cdl id or stringified timestamp
|
|
35
|
+
_index?: string;
|
|
36
|
+
quantity: Quantity;
|
|
37
|
+
unit?: number;
|
|
38
|
+
price?: Price;
|
|
20
39
|
// Final item price after LTO/Bundle/BOGO etc is applied on the item.
|
|
21
40
|
sale_price?: {
|
|
22
41
|
active?: boolean;
|
|
23
|
-
amount?:
|
|
42
|
+
amount?: MonetaryValue;
|
|
24
43
|
};
|
|
25
44
|
// Subtotal of the item including all options
|
|
26
45
|
_subtotal?: {
|
|
27
|
-
amount?:
|
|
46
|
+
amount?: MonetaryValue;
|
|
28
47
|
};
|
|
29
48
|
// Promo applied to this item
|
|
30
49
|
_promo?: {
|
|
31
|
-
amount?:
|
|
50
|
+
amount?: MonetaryValue;
|
|
51
|
+
};
|
|
52
|
+
// discount applied to this item
|
|
53
|
+
_discount?: {
|
|
54
|
+
amount?: MonetaryValue;
|
|
32
55
|
};
|
|
33
56
|
meta?: {
|
|
34
57
|
// menu id
|
|
35
58
|
menu?: string;
|
|
36
59
|
// brand id
|
|
37
60
|
brand?: string;
|
|
61
|
+
brand_label?: Label;
|
|
62
|
+
taxes?: string[];
|
|
63
|
+
menu_tax_tags?: string[];
|
|
64
|
+
orderable?: boolean;
|
|
65
|
+
volante_id?: string;
|
|
38
66
|
[index: string]: any;
|
|
39
67
|
};
|
|
40
|
-
options?:
|
|
41
|
-
id?: string;
|
|
42
|
-
label?: {
|
|
43
|
-
en?: string;
|
|
44
|
-
};
|
|
45
|
-
meta?: any;
|
|
46
|
-
items?: {
|
|
47
|
-
// option
|
|
48
|
-
id?: string;
|
|
49
|
-
label?: {
|
|
50
|
-
en?: string;
|
|
51
|
-
};
|
|
52
|
-
// index
|
|
53
|
-
_index?: string;
|
|
54
|
-
meta?: any;
|
|
55
|
-
quantity?: number;
|
|
56
|
-
amount_off_exclusions?: string[];
|
|
57
|
-
}[];
|
|
58
|
-
}[];
|
|
68
|
+
options?: ModifierGroupResponse[];
|
|
59
69
|
// Details about discount like BOGO, LTO, Bundle etc.
|
|
60
70
|
item_discount?: any;
|
|
61
71
|
// user specified instructions for the item
|
|
62
72
|
special_instructions?: string;
|
|
63
73
|
amount_off_exclusions?: string[];
|
|
64
74
|
added_on?: string;
|
|
65
|
-
|
|
75
|
+
meal_value?: IntegerValue;
|
|
76
|
+
category?: Label;
|
|
66
77
|
}
|
|
67
78
|
|
|
68
|
-
export interface
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
79
|
+
export interface ModifierGroupRequest {
|
|
80
|
+
label?: Label;
|
|
81
|
+
items?: ModifierRequest[];
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface ModifierGroupResponse {
|
|
85
|
+
id?: string;
|
|
86
|
+
label?: Label;
|
|
87
|
+
meta?: {
|
|
88
|
+
taxes?: string[];
|
|
89
|
+
original_label?: Label;
|
|
90
|
+
[index: string]: any;
|
|
91
|
+
};
|
|
92
|
+
items?: ModifierResponse[];
|
|
93
|
+
is?: {
|
|
94
|
+
disabled?: boolean;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface ModifierRequest {
|
|
99
|
+
// option/modifier
|
|
100
|
+
id?: string;
|
|
101
|
+
label?: Label;
|
|
102
|
+
_index?: string;
|
|
103
|
+
quantity?: Quantity;
|
|
104
|
+
amount_off_exclusions?: string[];
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface ModifierResponse {
|
|
108
|
+
// option/modifier
|
|
109
|
+
id?: string;
|
|
110
|
+
price?: Price;
|
|
111
|
+
quantity?: Quantity;
|
|
112
|
+
label?: Label;
|
|
113
|
+
// index
|
|
114
|
+
_index?: string;
|
|
115
|
+
meta?: {
|
|
116
|
+
sort_number?: number;
|
|
117
|
+
original_label?: Label;
|
|
118
|
+
taxes?: string[];
|
|
77
119
|
[index: string]: any;
|
|
78
120
|
};
|
|
121
|
+
amount_off_exclusions?: string[];
|
|
122
|
+
is?: {
|
|
123
|
+
disabled?: boolean;
|
|
124
|
+
};
|
|
79
125
|
}
|
|
80
126
|
|
|
81
|
-
export interface
|
|
82
|
-
|
|
127
|
+
export interface Taxes {
|
|
128
|
+
amount?: MonetaryValue;
|
|
129
|
+
rate?: MonetaryValue;
|
|
130
|
+
breakdown?: {
|
|
131
|
+
taxable_amount?: MonetaryValue;
|
|
132
|
+
tax_collectable?: MonetaryValue;
|
|
133
|
+
combined_tax_rate?: MonetaryValue;
|
|
134
|
+
gst?: MonetaryValue;
|
|
135
|
+
pst?: MonetaryValue;
|
|
136
|
+
[index: string]: any;
|
|
137
|
+
};
|
|
83
138
|
}
|
|
84
139
|
|
|
85
140
|
export interface Promo {
|
|
@@ -89,7 +144,7 @@ export interface Promo {
|
|
|
89
144
|
|
|
90
145
|
export interface BadgePay {
|
|
91
146
|
id?: string;
|
|
92
|
-
total?:
|
|
147
|
+
total?: MonetaryValue;
|
|
93
148
|
tender?: string;
|
|
94
149
|
name?: string;
|
|
95
150
|
}
|
|
@@ -99,26 +154,25 @@ export interface Payment {
|
|
|
99
154
|
mealplan?: {
|
|
100
155
|
id?: string;
|
|
101
156
|
tender?: string;
|
|
102
|
-
total?:
|
|
157
|
+
total?: MonetaryValue;
|
|
103
158
|
};
|
|
104
159
|
credit_card?: {
|
|
105
160
|
card_type?: string;
|
|
106
161
|
last4?: string;
|
|
107
|
-
total?:
|
|
162
|
+
total?: MonetaryValue;
|
|
108
163
|
};
|
|
109
164
|
digital_wallet_pay?: {
|
|
110
165
|
wallet_type?: string;
|
|
111
|
-
total?:
|
|
166
|
+
total?: MonetaryValue;
|
|
112
167
|
};
|
|
113
168
|
meal_swipes?: {
|
|
114
169
|
id?: string;
|
|
115
170
|
tender?: string;
|
|
116
171
|
tender_type?: string;
|
|
117
172
|
tender_name?: string;
|
|
118
|
-
swipes?:
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
total?: number;
|
|
173
|
+
swipes?: MonetaryValue;
|
|
174
|
+
rate?: MonetaryValue;
|
|
175
|
+
total?: MonetaryValue;
|
|
122
176
|
};
|
|
123
177
|
meal_exchange?: {
|
|
124
178
|
id?: string;
|
|
@@ -174,23 +228,23 @@ export interface ShoppingCartResponse {
|
|
|
174
228
|
// brand
|
|
175
229
|
brand?: string;
|
|
176
230
|
date?: any;
|
|
177
|
-
items?:
|
|
231
|
+
items?: ItemResponse[];
|
|
178
232
|
sub_total?: {
|
|
179
|
-
amount?:
|
|
233
|
+
amount?: MonetaryValue;
|
|
180
234
|
};
|
|
181
235
|
promo?: {
|
|
182
236
|
code?: string;
|
|
183
|
-
amount_off?:
|
|
184
|
-
percent_off?:
|
|
185
|
-
amount?:
|
|
237
|
+
amount_off?: MonetaryValue;
|
|
238
|
+
percent_off?: MonetaryValue;
|
|
239
|
+
amount?: MonetaryValue;
|
|
186
240
|
app?: string;
|
|
187
241
|
};
|
|
188
242
|
//@deprecated
|
|
189
243
|
loyalty?: {
|
|
190
244
|
coupon?: {
|
|
191
245
|
code?: string;
|
|
192
|
-
amount_off?:
|
|
193
|
-
amount?:
|
|
246
|
+
amount_off?: MonetaryValue;
|
|
247
|
+
amount?: MonetaryValue;
|
|
194
248
|
name?: string;
|
|
195
249
|
};
|
|
196
250
|
// Points to be earned for this shopping cart total
|
|
@@ -198,34 +252,34 @@ export interface ShoppingCartResponse {
|
|
|
198
252
|
};
|
|
199
253
|
discount?: {
|
|
200
254
|
code?: string;
|
|
201
|
-
amount_off?:
|
|
202
|
-
percent_off?:
|
|
203
|
-
amount?:
|
|
255
|
+
amount_off?: MonetaryValue;
|
|
256
|
+
percent_off?: MonetaryValue;
|
|
257
|
+
amount?: MonetaryValue;
|
|
204
258
|
};
|
|
205
259
|
payment_method?: {
|
|
206
260
|
email?: string;
|
|
207
261
|
mealplan?: {
|
|
208
262
|
id?: string;
|
|
209
263
|
tender?: string;
|
|
210
|
-
total?:
|
|
264
|
+
total?: MonetaryValue;
|
|
211
265
|
};
|
|
212
266
|
credit_card?: {
|
|
213
267
|
card_type?: string;
|
|
214
268
|
last4?: string;
|
|
215
|
-
total?:
|
|
269
|
+
total?: MonetaryValue;
|
|
216
270
|
};
|
|
217
271
|
digital_wallet_pay?: {
|
|
218
272
|
wallet_type?: string;
|
|
219
|
-
total?:
|
|
273
|
+
total?: MonetaryValue;
|
|
220
274
|
};
|
|
221
275
|
meal_swipes?: {
|
|
222
276
|
id?: string;
|
|
223
277
|
tender?: string;
|
|
224
278
|
tender_type?: string;
|
|
225
279
|
tender_name?: string;
|
|
226
|
-
swipes?:
|
|
227
|
-
rate?:
|
|
228
|
-
total?:
|
|
280
|
+
swipes?: MonetaryValue;
|
|
281
|
+
rate?: MonetaryValue;
|
|
282
|
+
total?: MonetaryValue;
|
|
229
283
|
};
|
|
230
284
|
meal_exchange?: {
|
|
231
285
|
id?: string;
|
|
@@ -233,10 +287,10 @@ export interface ShoppingCartResponse {
|
|
|
233
287
|
};
|
|
234
288
|
badge_pay?: BadgePay;
|
|
235
289
|
};
|
|
236
|
-
taxes?:
|
|
290
|
+
taxes?: Taxes;
|
|
237
291
|
total?: {
|
|
238
|
-
amount?:
|
|
239
|
-
meals?:
|
|
292
|
+
amount?: MonetaryValue;
|
|
293
|
+
meals?: MonetaryValue;
|
|
240
294
|
};
|
|
241
295
|
exemptions?: {
|
|
242
296
|
tax?: boolean;
|
|
@@ -246,10 +300,10 @@ export interface ShoppingCartResponse {
|
|
|
246
300
|
id?: string;
|
|
247
301
|
};
|
|
248
302
|
service_fee?: {
|
|
249
|
-
amount?:
|
|
303
|
+
amount?: MonetaryValue;
|
|
250
304
|
};
|
|
251
305
|
delivery_fee?: {
|
|
252
|
-
amount?:
|
|
306
|
+
amount?: MonetaryValue;
|
|
253
307
|
};
|
|
254
308
|
is?: {
|
|
255
309
|
// Shoppingcart Type: delivery, pickup
|
|
@@ -270,6 +324,21 @@ export interface ShoppingCartResponse {
|
|
|
270
324
|
|
|
271
325
|
export type ShoppingCart = ShoppingCartResponse;
|
|
272
326
|
|
|
327
|
+
export interface Label {
|
|
328
|
+
en?: string;
|
|
329
|
+
fr?: string;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export interface Price {
|
|
333
|
+
amount?: MonetaryValue;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
export type MonetaryValue = number;
|
|
337
|
+
|
|
338
|
+
export type IntegerValue = number;
|
|
339
|
+
|
|
340
|
+
export type Quantity = IntegerValue;
|
|
341
|
+
|
|
273
342
|
// POST /shoppingcart/ - Create a new ShoppingCart
|
|
274
343
|
|
|
275
344
|
export type PostShoppingcartCartBody = ShoppingCartRequest;
|
|
@@ -287,7 +356,7 @@ export interface PutShoppingcartCartItemsPath {
|
|
|
287
356
|
id: string;
|
|
288
357
|
}
|
|
289
358
|
|
|
290
|
-
export type PutShoppingcartCartItemsBody =
|
|
359
|
+
export type PutShoppingcartCartItemsBody = ItemsRequest;
|
|
291
360
|
|
|
292
361
|
export type PutShoppingcartCartItemsResponse = ShoppingCartResponse;
|
|
293
362
|
|
|
@@ -302,7 +371,7 @@ export interface DeleteShoppingcartCartItemsPath {
|
|
|
302
371
|
id: string;
|
|
303
372
|
}
|
|
304
373
|
|
|
305
|
-
export type DeleteShoppingcartCartItemsBody =
|
|
374
|
+
export type DeleteShoppingcartCartItemsBody = ItemsRequest;
|
|
306
375
|
|
|
307
376
|
export type DeleteShoppingcartCartItemsResponse = ShoppingCartResponse;
|
|
308
377
|
|
package/src/interface/user.ts
CHANGED
|
@@ -193,6 +193,7 @@ export interface Checkin {
|
|
|
193
193
|
date_queued?: string;
|
|
194
194
|
// The state of the user association process (attaching). Present for NFC check-ins only
|
|
195
195
|
state?: string;
|
|
196
|
+
meta?: CheckinMeta;
|
|
196
197
|
}
|
|
197
198
|
|
|
198
199
|
export interface PatchCheckin {
|
|
@@ -200,6 +201,20 @@ export interface PatchCheckin {
|
|
|
200
201
|
date_queued?: number;
|
|
201
202
|
// The state of the user association process (attaching). Present for NFC check-ins only
|
|
202
203
|
state?: string;
|
|
204
|
+
meta?: CheckinMeta;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export interface CheckinMeta {
|
|
208
|
+
order_id?: string;
|
|
209
|
+
status?: string;
|
|
210
|
+
logs?: {
|
|
211
|
+
code?: number;
|
|
212
|
+
date?: string;
|
|
213
|
+
message?: string;
|
|
214
|
+
type?: string;
|
|
215
|
+
[index: string]: any;
|
|
216
|
+
}[];
|
|
217
|
+
[index: string]: any;
|
|
203
218
|
}
|
|
204
219
|
|
|
205
220
|
export interface RefreshToken {
|