@compassdigital/sdk.typescript 4.66.0 → 4.68.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.
Files changed (88) hide show
  1. package/lib/index.d.ts +58 -85
  2. package/lib/index.d.ts.map +1 -1
  3. package/lib/index.js +503 -530
  4. package/lib/index.js.map +1 -1
  5. package/lib/interface/ai.d.ts +1 -1
  6. package/lib/interface/ai.d.ts.map +1 -1
  7. package/lib/interface/announcement.d.ts +1 -1
  8. package/lib/interface/announcement.d.ts.map +1 -1
  9. package/lib/interface/auth.d.ts +3 -3
  10. package/lib/interface/auth.d.ts.map +1 -1
  11. package/lib/interface/calendar.d.ts +2 -2
  12. package/lib/interface/calendar.d.ts.map +1 -1
  13. package/lib/interface/centricos.d.ts +11 -11
  14. package/lib/interface/centricos.d.ts.map +1 -1
  15. package/lib/interface/compassconnect.d.ts +1 -1
  16. package/lib/interface/compassconnect.d.ts.map +1 -1
  17. package/lib/interface/config.d.ts +1 -1
  18. package/lib/interface/config.d.ts.map +1 -1
  19. package/lib/interface/datalake.d.ts +1 -1
  20. package/lib/interface/datalake.d.ts.map +1 -1
  21. package/lib/interface/email.d.ts +1 -1
  22. package/lib/interface/email.d.ts.map +1 -1
  23. package/lib/interface/file.d.ts +2 -2
  24. package/lib/interface/file.d.ts.map +1 -1
  25. package/lib/interface/frictionless.d.ts +9 -9
  26. package/lib/interface/frictionless.d.ts.map +1 -1
  27. package/lib/interface/kds.d.ts +1 -1
  28. package/lib/interface/kds.d.ts.map +1 -1
  29. package/lib/interface/location.d.ts +5 -3
  30. package/lib/interface/location.d.ts.map +1 -1
  31. package/lib/interface/mealplan.d.ts +2 -1
  32. package/lib/interface/mealplan.d.ts.map +1 -1
  33. package/lib/interface/menu.d.ts +149 -109
  34. package/lib/interface/menu.d.ts.map +1 -1
  35. package/lib/interface/notification.d.ts +3 -3
  36. package/lib/interface/notification.d.ts.map +1 -1
  37. package/lib/interface/order.d.ts +7 -7
  38. package/lib/interface/order.d.ts.map +1 -1
  39. package/lib/interface/partner.d.ts +10 -10
  40. package/lib/interface/partner.d.ts.map +1 -1
  41. package/lib/interface/payment.d.ts +3 -3
  42. package/lib/interface/payment.d.ts.map +1 -1
  43. package/lib/interface/promo.d.ts +8 -8
  44. package/lib/interface/promo.d.ts.map +1 -1
  45. package/lib/interface/report.d.ts +10 -10
  46. package/lib/interface/report.d.ts.map +1 -1
  47. package/lib/interface/search.d.ts +8 -8
  48. package/lib/interface/search.d.ts.map +1 -1
  49. package/lib/interface/shoppingcart.d.ts +7 -7
  50. package/lib/interface/shoppingcart.d.ts.map +1 -1
  51. package/lib/interface/task.d.ts +8 -8
  52. package/lib/interface/task.d.ts.map +1 -1
  53. package/lib/interface/tax.d.ts +2 -2
  54. package/lib/interface/tax.d.ts.map +1 -1
  55. package/lib/interface/user.d.ts +16 -16
  56. package/lib/interface/user.d.ts.map +1 -1
  57. package/lib/interface/vendor.d.ts +6 -6
  58. package/lib/interface/vendor.d.ts.map +1 -1
  59. package/manifest.json +0 -4
  60. package/package.json +2 -2
  61. package/src/index.ts +10395 -10464
  62. package/src/interface/ai.ts +22 -22
  63. package/src/interface/announcement.ts +60 -60
  64. package/src/interface/auth.ts +68 -68
  65. package/src/interface/calendar.ts +94 -94
  66. package/src/interface/centricos.ts +145 -145
  67. package/src/interface/compassconnect.ts +59 -59
  68. package/src/interface/config.ts +166 -166
  69. package/src/interface/datalake.ts +13 -13
  70. package/src/interface/email.ts +13 -13
  71. package/src/interface/file.ts +18 -18
  72. package/src/interface/frictionless.ts +177 -177
  73. package/src/interface/kds.ts +49 -49
  74. package/src/interface/location.ts +771 -769
  75. package/src/interface/mealplan.ts +155 -154
  76. package/src/interface/menu.ts +4079 -4018
  77. package/src/interface/notification.ts +51 -51
  78. package/src/interface/order.ts +464 -464
  79. package/src/interface/partner.ts +823 -823
  80. package/src/interface/payment.ts +278 -278
  81. package/src/interface/promo.ts +373 -373
  82. package/src/interface/report.ts +348 -348
  83. package/src/interface/search.ts +135 -135
  84. package/src/interface/shoppingcart.ts +429 -429
  85. package/src/interface/task.ts +212 -212
  86. package/src/interface/tax.ts +69 -69
  87. package/src/interface/user.ts +410 -410
  88. package/src/interface/vendor.ts +215 -215
@@ -1,434 +1,434 @@
1
1
  /* eslint-disable */
2
2
  // THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
3
3
 
4
- import { RequestQuery, BaseRequest } from "./util";
4
+ import { RequestQuery, BaseRequest } from './util';
5
5
 
6
6
  export interface Error {
7
- message?: string;
8
- code?: number;
9
- data?: Record<string, any>;
7
+ message?: string;
8
+ code?: number;
9
+ data?: Record<string, any>;
10
10
  }
11
11
 
12
12
  export interface ItemsRequest {
13
- items?: ItemRequest[];
13
+ items?: ItemRequest[];
14
14
  }
15
15
 
16
16
  export interface ItemRequest {
17
- // item id
18
- id: string;
19
- quantity: Quantity;
20
- options?: ModifierGroupRequest[];
21
- _index?: string;
22
- meta?: {
23
- brand?: string;
24
- brand_label?: Label;
25
- menu?: string;
26
- barcodes?: string[];
27
- plu?: string;
28
- [index: string]: any;
29
- };
30
- special_instructions?: string;
31
- amount_off_exclusions?: AmountOffExclusion[];
17
+ // item id
18
+ id: string;
19
+ quantity: Quantity;
20
+ options?: ModifierGroupRequest[];
21
+ _index?: string;
22
+ meta?: {
23
+ brand?: string;
24
+ brand_label?: Label;
25
+ menu?: string;
26
+ barcodes?: string[];
27
+ plu?: string;
28
+ [index: string]: any;
29
+ };
30
+ special_instructions?: string;
31
+ amount_off_exclusions?: AmountOffExclusion[];
32
32
  }
33
33
 
34
34
  export interface ItemResponse {
35
- // can be cdl item id or stringified timestamp
36
- id: string;
37
- description?: Label;
38
- // index based on cdl id or stringified timestamp
39
- _index?: string;
40
- quantity: Quantity;
41
- unit?: number;
42
- price?: Price;
43
- // Final item price after LTO/Bundle/BOGO etc is applied on the item.
44
- sale_price?: {
45
- active?: boolean;
46
- amount?: MonetaryValue;
47
- };
48
- // Subtotal of the item including all options
49
- _subtotal?: {
50
- amount?: MonetaryValue;
51
- };
52
- // Promo applied to this item
53
- _promo?: {
54
- amount?: MonetaryValue;
55
- };
56
- // discount applied to this item
57
- _discount?: {
58
- amount?: MonetaryValue;
59
- };
60
- meta?: {
61
- // menu id
62
- menu?: string;
63
- // brand id
64
- brand?: string;
65
- brand_label?: Label;
66
- taxes?: string[];
67
- tax?: {
68
- tax_tag_code?: string;
69
- tax_rate?: number;
70
- tax_amount?: number;
71
- };
72
- menu_tax_tags?: string[];
73
- orderable?: boolean;
74
- volante_id?: string;
75
- barcodes?: string[];
76
- plu?: string;
77
- [index: string]: any;
78
- };
79
- options?: ModifierGroupResponse[];
80
- // Details about discount like BOGO, LTO, Bundle etc.
81
- item_discount?: Record<string, any>;
82
- // user specified instructions for the item
83
- special_instructions?: string;
84
- amount_off_exclusions?: AmountOffExclusion[];
85
- added_on?: string;
86
- meal_value?: IntegerValue;
87
- category?: Label;
88
- menu_label?: Label;
89
- tax_rate?: MonetaryValue;
90
- label?: Label;
91
- reporting?: {
92
- category?: {
93
- primary?: string;
94
- secondary?: string;
95
- };
96
- };
35
+ // can be cdl item id or stringified timestamp
36
+ id: string;
37
+ description?: Label;
38
+ // index based on cdl id or stringified timestamp
39
+ _index?: string;
40
+ quantity: Quantity;
41
+ unit?: number;
42
+ price?: Price;
43
+ // Final item price after LTO/Bundle/BOGO etc is applied on the item.
44
+ sale_price?: {
45
+ active?: boolean;
46
+ amount?: MonetaryValue;
47
+ };
48
+ // Subtotal of the item including all options
49
+ _subtotal?: {
50
+ amount?: MonetaryValue;
51
+ };
52
+ // Promo applied to this item
53
+ _promo?: {
54
+ amount?: MonetaryValue;
55
+ };
56
+ // discount applied to this item
57
+ _discount?: {
58
+ amount?: MonetaryValue;
59
+ };
60
+ meta?: {
61
+ // menu id
62
+ menu?: string;
63
+ // brand id
64
+ brand?: string;
65
+ brand_label?: Label;
66
+ taxes?: string[];
67
+ tax?: {
68
+ tax_tag_code?: string;
69
+ tax_rate?: number;
70
+ tax_amount?: number;
71
+ };
72
+ menu_tax_tags?: string[];
73
+ orderable?: boolean;
74
+ volante_id?: string;
75
+ barcodes?: string[];
76
+ plu?: string;
77
+ [index: string]: any;
78
+ };
79
+ options?: ModifierGroupResponse[];
80
+ // Details about discount like BOGO, LTO, Bundle etc.
81
+ item_discount?: Record<string, any>;
82
+ // user specified instructions for the item
83
+ special_instructions?: string;
84
+ amount_off_exclusions?: AmountOffExclusion[];
85
+ added_on?: string;
86
+ meal_value?: IntegerValue;
87
+ category?: Label;
88
+ menu_label?: Label;
89
+ tax_rate?: MonetaryValue;
90
+ label?: Label;
91
+ reporting?: {
92
+ category?: {
93
+ primary?: string;
94
+ secondary?: string;
95
+ };
96
+ };
97
97
  }
98
98
 
99
99
  export interface ModifierGroupRequest {
100
- label?: Label;
101
- id?: string;
102
- items?: ModifierRequest[];
100
+ label?: Label;
101
+ id?: string;
102
+ items?: ModifierRequest[];
103
103
  }
104
104
 
105
105
  export interface ModifierGroupResponse {
106
- id?: string;
107
- label?: Label;
108
- meta?: {
109
- taxes?: string[];
110
- original_label?: Label;
111
- [index: string]: any;
112
- };
113
- items?: ModifierResponse[];
114
- is?: {
115
- disabled?: boolean;
116
- };
106
+ id?: string;
107
+ label?: Label;
108
+ meta?: {
109
+ taxes?: string[];
110
+ original_label?: Label;
111
+ [index: string]: any;
112
+ };
113
+ items?: ModifierResponse[];
114
+ is?: {
115
+ disabled?: boolean;
116
+ };
117
117
  }
118
118
 
119
119
  export interface ModifierRequest {
120
- // option/modifier
121
- id?: string;
122
- label?: Label;
123
- _index?: string;
124
- quantity?: Quantity;
125
- amount_off_exclusions?: AmountOffExclusion[];
120
+ // option/modifier
121
+ id?: string;
122
+ label?: Label;
123
+ _index?: string;
124
+ quantity?: Quantity;
125
+ amount_off_exclusions?: AmountOffExclusion[];
126
126
  }
127
127
 
128
128
  export interface ModifierResponse {
129
- // option/modifier
130
- id?: string;
131
- price?: Price;
132
- quantity?: Quantity;
133
- label?: Label;
134
- // index
135
- _index?: string;
136
- meta?: {
137
- sort_number?: number;
138
- original_label?: Label;
139
- taxes?: string[];
140
- [index: string]: any;
141
- };
142
- amount_off_exclusions?: AmountOffExclusion[];
143
- is?: {
144
- disabled?: boolean;
145
- };
129
+ // option/modifier
130
+ id?: string;
131
+ price?: Price;
132
+ quantity?: Quantity;
133
+ label?: Label;
134
+ // index
135
+ _index?: string;
136
+ meta?: {
137
+ sort_number?: number;
138
+ original_label?: Label;
139
+ taxes?: string[];
140
+ [index: string]: any;
141
+ };
142
+ amount_off_exclusions?: AmountOffExclusion[];
143
+ is?: {
144
+ disabled?: boolean;
145
+ };
146
146
  }
147
147
 
148
148
  export interface Taxes {
149
- amount?: MonetaryValue;
150
- rate?: MonetaryValue;
151
- breakdown?: {
152
- taxable_amount?: MonetaryValue;
153
- tax_collectable?: MonetaryValue;
154
- combined_tax_rate?: MonetaryValue;
155
- gst?: MonetaryValue;
156
- pst?: MonetaryValue;
157
- [index: string]: any;
158
- };
149
+ amount?: MonetaryValue;
150
+ rate?: MonetaryValue;
151
+ breakdown?: {
152
+ taxable_amount?: MonetaryValue;
153
+ tax_collectable?: MonetaryValue;
154
+ combined_tax_rate?: MonetaryValue;
155
+ gst?: MonetaryValue;
156
+ pst?: MonetaryValue;
157
+ [index: string]: any;
158
+ };
159
159
  }
160
160
 
161
161
  export interface Promo {
162
- code?: string;
163
- email?: string;
162
+ code?: string;
163
+ email?: string;
164
164
  }
165
165
 
166
166
  export type BadgePay = CashlessTender;
167
167
 
168
168
  export interface CashlessTender {
169
- id?: string;
170
- total?: MonetaryValue;
171
- tender?: string;
172
- name?: string;
173
- type?: PaymentType;
169
+ id?: string;
170
+ total?: MonetaryValue;
171
+ tender?: string;
172
+ name?: string;
173
+ type?: PaymentType;
174
174
  }
175
175
 
176
176
  export interface Mealplan {
177
- id?: string;
178
- tender?: string;
179
- total?: MonetaryValue;
180
- type?: PaymentType;
177
+ id?: string;
178
+ tender?: string;
179
+ total?: MonetaryValue;
180
+ type?: PaymentType;
181
181
  }
182
182
 
183
183
  export interface CreditCard {
184
- card_type?: string;
185
- last4?: string;
186
- total?: MonetaryValue;
187
- type?: PaymentType;
184
+ card_type?: string;
185
+ last4?: string;
186
+ total?: MonetaryValue;
187
+ type?: PaymentType;
188
188
  }
189
189
 
190
190
  export interface DigitalWalletPay {
191
- wallet_type?: string;
192
- total?: MonetaryValue;
193
- type?: PaymentType;
191
+ wallet_type?: string;
192
+ total?: MonetaryValue;
193
+ type?: PaymentType;
194
194
  }
195
195
 
196
196
  export interface MealSwipes {
197
- id?: string;
198
- tender?: string;
199
- tender_type?: string;
200
- tender_name?: string;
201
- swipes?: MonetaryValue;
202
- rate?: MonetaryValue;
203
- total?: MonetaryValue;
204
- type?: PaymentType;
197
+ id?: string;
198
+ tender?: string;
199
+ tender_type?: string;
200
+ tender_name?: string;
201
+ swipes?: MonetaryValue;
202
+ rate?: MonetaryValue;
203
+ total?: MonetaryValue;
204
+ type?: PaymentType;
205
205
  }
206
206
 
207
207
  export interface MealExchange {
208
- id?: string;
209
- tender?: string;
210
- type?: PaymentType;
208
+ id?: string;
209
+ tender?: string;
210
+ type?: PaymentType;
211
211
  }
212
212
 
213
213
  export interface Payment {
214
- email?: string;
215
- mealplan?: Mealplan;
216
- credit_card?: CreditCard;
217
- digital_wallet_pay?: DigitalWalletPay;
218
- meal_swipes?: MealSwipes;
219
- meal_exchange?: MealExchange;
220
- badge_pay?: CashlessTender;
221
- stipend?: CashlessTender;
222
- voucher?: CashlessTender;
223
- coupon_voucher?: CashlessTender;
214
+ email?: string;
215
+ mealplan?: Mealplan;
216
+ credit_card?: CreditCard;
217
+ digital_wallet_pay?: DigitalWalletPay;
218
+ meal_swipes?: MealSwipes;
219
+ meal_exchange?: MealExchange;
220
+ badge_pay?: CashlessTender;
221
+ stipend?: CashlessTender;
222
+ voucher?: CashlessTender;
223
+ coupon_voucher?: CashlessTender;
224
224
  }
225
225
 
226
226
  export interface MenuID {
227
- menu?: string;
227
+ menu?: string;
228
228
  }
229
229
 
230
230
  export interface ShoppingCarts {
231
- shoppingcarts?: ShoppingCartResponse[];
231
+ shoppingcarts?: ShoppingCartResponse[];
232
232
  }
233
233
 
234
234
  export interface OrderId {
235
- // order
236
- id?: string;
235
+ // order
236
+ id?: string;
237
237
  }
238
238
 
239
239
  export interface ShoppingCartRequest {
240
- // location
241
- location?: string;
242
- // menu
243
- menu?: string;
244
- // brand
245
- brand?: string;
246
- is?: {
247
- // Shoppingcart Type: delivery, pickup
248
- type?: "delivery" | "pickup" | "scan_and_go" | "frictionless";
249
- // If an order should be paid with meal exchange. If true, this will calculate meals total.
250
- mx_cart?: boolean;
251
- // If a user's email domain is a match in a sites list of tax exempt domains
252
- email_tax_exempt?: boolean;
253
- // Indicates to clients that a tax recalculation is required
254
- tax_calculation_required?: boolean;
255
- // Indicates that the shopping cart is a system 365 shopping cart
256
- system365?: boolean;
257
- };
258
- meta?: {
259
- // Raw request from any vendor integrated with CDL
260
- vendor?: Record<string, any>;
261
- [index: string]: any;
262
- };
240
+ // location
241
+ location?: string;
242
+ // menu
243
+ menu?: string;
244
+ // brand
245
+ brand?: string;
246
+ is?: {
247
+ // Shoppingcart Type: delivery, pickup
248
+ type?: 'delivery' | 'pickup' | 'scan_and_go' | 'frictionless';
249
+ // If an order should be paid with meal exchange. If true, this will calculate meals total.
250
+ mx_cart?: boolean;
251
+ // If a user's email domain is a match in a sites list of tax exempt domains
252
+ email_tax_exempt?: boolean;
253
+ // Indicates to clients that a tax recalculation is required
254
+ tax_calculation_required?: boolean;
255
+ // Indicates that the shopping cart is a system 365 shopping cart
256
+ system365?: boolean;
257
+ };
258
+ meta?: {
259
+ // Raw request from any vendor integrated with CDL
260
+ vendor?: Record<string, any>;
261
+ [index: string]: any;
262
+ };
263
263
  }
264
264
 
265
265
  export interface ShoppingCartResponse {
266
- // shoppingcart
267
- id?: string;
268
- // location
269
- location?: string;
270
- // menu
271
- menu?: string;
272
- // brand
273
- brand?: string;
274
- date?: Record<string, any>;
275
- items?: ItemResponse[];
276
- sub_total?: {
277
- amount?: MonetaryValue;
278
- };
279
- promo?: {
280
- code?: string;
281
- provider?: "fp" | "voucherify";
282
- amount_off?: MonetaryValue;
283
- percent_off?: MonetaryValue;
284
- amount?: MonetaryValue;
285
- app?: string;
286
- discount?: Record<string, any>;
287
- provider_data?: FPValidationData;
288
- order?: PromoOrder;
289
- };
290
- //@deprecated
291
- loyalty?: {
292
- coupon?: {
293
- code?: string;
294
- amount_off?: MonetaryValue;
295
- amount?: MonetaryValue;
296
- name?: string;
297
- };
298
- // Points to be earned for this shopping cart total
299
- order_loyalty_points?: boolean;
300
- };
301
- discount?: {
302
- code?: string;
303
- provider?: "fp" | "voucherify";
304
- amount_off?: MonetaryValue;
305
- percent_off?: MonetaryValue;
306
- amount?: MonetaryValue;
307
- discount?: Record<string, any>;
308
- provider_data?: FPValidationData;
309
- };
310
- payment_method?: {
311
- mealplan?: Mealplan;
312
- credit_card?: CreditCard;
313
- digital_wallet_pay?: DigitalWalletPay;
314
- meal_swipes?: MealSwipes;
315
- meal_exchange?: MealExchange;
316
- badge_pay?: CashlessTender;
317
- stipend?: CashlessTender;
318
- voucher?: CashlessTender;
319
- coupon_voucher?: CashlessTender;
320
- };
321
- taxes?: Taxes;
322
- total?: {
323
- amount?: MonetaryValue;
324
- meals?: MonetaryValue;
325
- };
326
- exemptions?: {
327
- tax?: boolean;
328
- };
329
- order?: {
330
- // order
331
- id?: string;
332
- };
333
- service_fee?: {
334
- amount?: MonetaryValue;
335
- };
336
- delivery_fee?: {
337
- amount?: MonetaryValue;
338
- };
339
- is?: {
340
- // Shoppingcart Type: delivery, pickup
341
- type?: "delivery" | "pickup" | "scan_and_go" | "frictionless";
342
- // If an order should be paid with meal exchange. If true, this will calculate meals total.
343
- mx_cart?: boolean;
344
- // If a user's email or email domain is a match in a sites list of tax exempt emails or domains
345
- email_tax_exempt?: boolean;
346
- // Indicates to clients that a tax recalculation is required
347
- tax_calculation_required?: boolean;
348
- // Indicates that the shopping cart is a system 365 shopping cart
349
- system365?: boolean;
350
- };
351
- meta?: {
352
- // Raw request from any vendor integrated with CDL
353
- vendor?: Record<string, any>;
354
- drain_order_type?: DrainOrderType;
355
- [index: string]: any;
356
- };
266
+ // shoppingcart
267
+ id?: string;
268
+ // location
269
+ location?: string;
270
+ // menu
271
+ menu?: string;
272
+ // brand
273
+ brand?: string;
274
+ date?: Record<string, any>;
275
+ items?: ItemResponse[];
276
+ sub_total?: {
277
+ amount?: MonetaryValue;
278
+ };
279
+ promo?: {
280
+ code?: string;
281
+ provider?: 'fp' | 'voucherify';
282
+ amount_off?: MonetaryValue;
283
+ percent_off?: MonetaryValue;
284
+ amount?: MonetaryValue;
285
+ app?: string;
286
+ discount?: Record<string, any>;
287
+ provider_data?: FPValidationData;
288
+ order?: PromoOrder;
289
+ };
290
+ //@deprecated
291
+ loyalty?: {
292
+ coupon?: {
293
+ code?: string;
294
+ amount_off?: MonetaryValue;
295
+ amount?: MonetaryValue;
296
+ name?: string;
297
+ };
298
+ // Points to be earned for this shopping cart total
299
+ order_loyalty_points?: boolean;
300
+ };
301
+ discount?: {
302
+ code?: string;
303
+ provider?: 'fp' | 'voucherify';
304
+ amount_off?: MonetaryValue;
305
+ percent_off?: MonetaryValue;
306
+ amount?: MonetaryValue;
307
+ discount?: Record<string, any>;
308
+ provider_data?: FPValidationData;
309
+ };
310
+ payment_method?: {
311
+ mealplan?: Mealplan;
312
+ credit_card?: CreditCard;
313
+ digital_wallet_pay?: DigitalWalletPay;
314
+ meal_swipes?: MealSwipes;
315
+ meal_exchange?: MealExchange;
316
+ badge_pay?: CashlessTender;
317
+ stipend?: CashlessTender;
318
+ voucher?: CashlessTender;
319
+ coupon_voucher?: CashlessTender;
320
+ };
321
+ taxes?: Taxes;
322
+ total?: {
323
+ amount?: MonetaryValue;
324
+ meals?: MonetaryValue;
325
+ };
326
+ exemptions?: {
327
+ tax?: boolean;
328
+ };
329
+ order?: {
330
+ // order
331
+ id?: string;
332
+ };
333
+ service_fee?: {
334
+ amount?: MonetaryValue;
335
+ };
336
+ delivery_fee?: {
337
+ amount?: MonetaryValue;
338
+ };
339
+ is?: {
340
+ // Shoppingcart Type: delivery, pickup
341
+ type?: 'delivery' | 'pickup' | 'scan_and_go' | 'frictionless';
342
+ // If an order should be paid with meal exchange. If true, this will calculate meals total.
343
+ mx_cart?: boolean;
344
+ // If a user's email or email domain is a match in a sites list of tax exempt emails or domains
345
+ email_tax_exempt?: boolean;
346
+ // Indicates to clients that a tax recalculation is required
347
+ tax_calculation_required?: boolean;
348
+ // Indicates that the shopping cart is a system 365 shopping cart
349
+ system365?: boolean;
350
+ };
351
+ meta?: {
352
+ // Raw request from any vendor integrated with CDL
353
+ vendor?: Record<string, any>;
354
+ drain_order_type?: DrainOrderType;
355
+ [index: string]: any;
356
+ };
357
357
  }
358
358
 
359
359
  export type ShoppingCart = ShoppingCartResponse;
360
360
 
361
361
  export interface PaymentMethods {
362
- mealplan: {
363
- tenders: Tender[];
364
- };
365
- cashless: {
366
- tenders: {
367
- balance?: MonetaryValue;
368
- id: string;
369
- // name associated with badgepay tender, stored in site public config
370
- name?: string;
371
- is: {
372
- eligible: boolean;
373
- };
374
- }[];
375
- };
376
- credit_cards: {
377
- data: {
378
- billing_address?: {
379
- postal_code?: string;
380
- };
381
- card_type?: string;
382
- expiry?: {
383
- month?: number;
384
- year?: number;
385
- };
386
- is: {
387
- eligible: boolean;
388
- preferred?: boolean;
389
- };
390
- masked_card_number?: string;
391
- name_on_card?: string;
392
- nickname?: string;
393
- token: string;
394
- token_expiration_date?: string;
395
- }[];
396
- };
397
- digital_wallet_pay: {
398
- applewallet: {
399
- is: {
400
- eligible: boolean;
401
- };
402
- };
403
- googlewallet: {
404
- is: {
405
- eligible: boolean;
406
- };
407
- };
408
- };
362
+ mealplan: {
363
+ tenders: Tender[];
364
+ };
365
+ cashless: {
366
+ tenders: {
367
+ balance?: MonetaryValue;
368
+ id: string;
369
+ // name associated with badgepay tender, stored in site public config
370
+ name?: string;
371
+ is: {
372
+ eligible: boolean;
373
+ };
374
+ }[];
375
+ };
376
+ credit_cards: {
377
+ data: {
378
+ billing_address?: {
379
+ postal_code?: string;
380
+ };
381
+ card_type?: string;
382
+ expiry?: {
383
+ month?: number;
384
+ year?: number;
385
+ };
386
+ is: {
387
+ eligible: boolean;
388
+ preferred?: boolean;
389
+ };
390
+ masked_card_number?: string;
391
+ name_on_card?: string;
392
+ nickname?: string;
393
+ token: string;
394
+ token_expiration_date?: string;
395
+ }[];
396
+ };
397
+ digital_wallet_pay: {
398
+ applewallet: {
399
+ is: {
400
+ eligible: boolean;
401
+ };
402
+ };
403
+ googlewallet: {
404
+ is: {
405
+ eligible: boolean;
406
+ };
407
+ };
408
+ };
409
409
  }
410
410
 
411
411
  export interface Tender {
412
- id: string;
413
- name?: string;
414
- balance?: MonetaryValue;
415
- type: "declining_balance" | "meal_equivalent" | "meal_exchange";
416
- is: {
417
- eligible: boolean;
418
- validated?: boolean;
419
- };
420
- currency?: string;
421
- // tender
422
- tender_number?: string;
412
+ id: string;
413
+ name?: string;
414
+ balance?: MonetaryValue;
415
+ type: 'declining_balance' | 'meal_equivalent' | 'meal_exchange';
416
+ is: {
417
+ eligible: boolean;
418
+ validated?: boolean;
419
+ };
420
+ currency?: string;
421
+ // tender
422
+ tender_number?: string;
423
423
  }
424
424
 
425
425
  export interface Label {
426
- en?: string;
427
- fr?: string;
426
+ en?: string;
427
+ fr?: string;
428
428
  }
429
429
 
430
430
  export interface Price {
431
- amount?: MonetaryValue;
431
+ amount?: MonetaryValue;
432
432
  }
433
433
 
434
434
  export type MonetaryValue = number;
@@ -440,41 +440,41 @@ export type Quantity = number;
440
440
  export type PaymentType = string;
441
441
 
442
442
  export interface FPValidationData {
443
- discountIncentives?: {
444
- id?: string;
445
- program?: {
446
- code?: string;
447
- };
448
- [index: string]: any;
449
- }[];
450
- [index: string]: any;
443
+ discountIncentives?: {
444
+ id?: string;
445
+ program?: {
446
+ code?: string;
447
+ };
448
+ [index: string]: any;
449
+ }[];
450
+ [index: string]: any;
451
451
  }
452
452
 
453
- export type AmountOffExclusion = "discount" | "promo";
453
+ export type AmountOffExclusion = 'discount' | 'promo';
454
454
 
455
455
  export interface PromoOrder {
456
- items_applied_discount_amount?: number;
457
- amount?: number;
458
- items_discount_amount?: number;
459
- total_amount?: number;
460
- total_applied_discount_amount?: number;
461
- total_discount_amount?: number;
462
- items?: PromoItem[];
456
+ items_applied_discount_amount?: number;
457
+ amount?: number;
458
+ items_discount_amount?: number;
459
+ total_amount?: number;
460
+ total_applied_discount_amount?: number;
461
+ total_discount_amount?: number;
462
+ items?: PromoItem[];
463
463
  }
464
464
 
465
465
  export interface PromoItem {
466
- applied_discount_amount?: number;
467
- amount?: number;
468
- discount_amount?: number;
469
- price?: number;
470
- quantity?: number;
471
- source_id?: string;
472
- subtotal_amount?: number;
466
+ applied_discount_amount?: number;
467
+ amount?: number;
468
+ discount_amount?: number;
469
+ price?: number;
470
+ quantity?: number;
471
+ source_id?: string;
472
+ subtotal_amount?: number;
473
473
  }
474
474
 
475
475
  export interface DrainOrderType {
476
- taxable?: boolean;
477
- tax_exempt?: boolean;
476
+ taxable?: boolean;
477
+ tax_exempt?: boolean;
478
478
  }
479
479
 
480
480
  // POST /shoppingcart - Create a new ShoppingCart
@@ -484,14 +484,14 @@ export type PostShoppingcartCartBody = ShoppingCartRequest;
484
484
  export type PostShoppingcartCartResponse = ShoppingCartResponse;
485
485
 
486
486
  export interface PostShoppingcartCartRequest extends BaseRequest {
487
- body: PostShoppingcartCartBody;
487
+ body: PostShoppingcartCartBody;
488
488
  }
489
489
 
490
490
  // PUT /shoppingcart/{id} - Put a menu item into a ShoppingCart
491
491
 
492
492
  export interface PutShoppingcartCartItemsPath {
493
- // Shopping cart ID
494
- id: string;
493
+ // Shopping cart ID
494
+ id: string;
495
495
  }
496
496
 
497
497
  export type PutShoppingcartCartItemsBody = ItemsRequest;
@@ -499,14 +499,14 @@ export type PutShoppingcartCartItemsBody = ItemsRequest;
499
499
  export type PutShoppingcartCartItemsResponse = ShoppingCartResponse;
500
500
 
501
501
  export interface PutShoppingcartCartItemsRequest extends BaseRequest, PutShoppingcartCartItemsPath {
502
- body: PutShoppingcartCartItemsBody;
502
+ body: PutShoppingcartCartItemsBody;
503
503
  }
504
504
 
505
505
  // DELETE /shoppingcart/{id} - Delete a menu item from a ShoppingCart
506
506
 
507
507
  export interface DeleteShoppingcartCartItemsPath {
508
- // Shopping cart ID
509
- id: string;
508
+ // Shopping cart ID
509
+ id: string;
510
510
  }
511
511
 
512
512
  export type DeleteShoppingcartCartItemsBody = ItemsRequest;
@@ -514,35 +514,35 @@ export type DeleteShoppingcartCartItemsBody = ItemsRequest;
514
514
  export type DeleteShoppingcartCartItemsResponse = ShoppingCartResponse;
515
515
 
516
516
  export interface DeleteShoppingcartCartItemsRequest
517
- extends BaseRequest,
518
- DeleteShoppingcartCartItemsPath {
519
- body: DeleteShoppingcartCartItemsBody;
517
+ extends BaseRequest,
518
+ DeleteShoppingcartCartItemsPath {
519
+ body: DeleteShoppingcartCartItemsBody;
520
520
  }
521
521
 
522
522
  // GET /shoppingcart/{id} - Get an individual ShoppingCart
523
523
 
524
524
  export interface GetShoppingcartCartPath {
525
- // Shopping cart ID
526
- id: string;
525
+ // Shopping cart ID
526
+ id: string;
527
527
  }
528
528
 
529
529
  export interface GetShoppingcartCartQuery {
530
- // Graphql query string
531
- _query?: string;
530
+ // Graphql query string
531
+ _query?: string;
532
532
  }
533
533
 
534
534
  export type GetShoppingcartCartResponse = ShoppingCartResponse;
535
535
 
536
536
  export interface GetShoppingcartCartRequest
537
- extends BaseRequest,
538
- RequestQuery<GetShoppingcartCartQuery>,
539
- GetShoppingcartCartPath {}
537
+ extends BaseRequest,
538
+ RequestQuery<GetShoppingcartCartQuery>,
539
+ GetShoppingcartCartPath {}
540
540
 
541
541
  // PATCH /shoppingcart/{id} - Update a ShoppingCart
542
542
 
543
543
  export interface PatchShoppingcartCartPath {
544
- // Shopping cart ID
545
- id: string;
544
+ // Shopping cart ID
545
+ id: string;
546
546
  }
547
547
 
548
548
  export type PatchShoppingcartCartBody = ShoppingCartResponse;
@@ -550,14 +550,14 @@ export type PatchShoppingcartCartBody = ShoppingCartResponse;
550
550
  export type PatchShoppingcartCartResponse = ShoppingCartResponse;
551
551
 
552
552
  export interface PatchShoppingcartCartRequest extends BaseRequest, PatchShoppingcartCartPath {
553
- body: PatchShoppingcartCartBody;
553
+ body: PatchShoppingcartCartBody;
554
554
  }
555
555
 
556
556
  // PUT /shoppingcart/{id}/promo - Put a promo in a ShoppingCart
557
557
 
558
558
  export interface PutShoppingcartCartPromoPath {
559
- // Shopping cart ID
560
- id: string;
559
+ // Shopping cart ID
560
+ id: string;
561
561
  }
562
562
 
563
563
  export type PutShoppingcartCartPromoBody = Promo;
@@ -565,27 +565,27 @@ export type PutShoppingcartCartPromoBody = Promo;
565
565
  export type PutShoppingcartCartPromoResponse = ShoppingCartResponse;
566
566
 
567
567
  export interface PutShoppingcartCartPromoRequest extends BaseRequest, PutShoppingcartCartPromoPath {
568
- body: PutShoppingcartCartPromoBody;
568
+ body: PutShoppingcartCartPromoBody;
569
569
  }
570
570
 
571
571
  // DELETE /shoppingcart/{id}/promo - Delete the promo in a ShoppingCart
572
572
 
573
573
  export interface DeleteShoppingcartCartPromoPath {
574
- // Shopping cart ID
575
- id: string;
574
+ // Shopping cart ID
575
+ id: string;
576
576
  }
577
577
 
578
578
  export type DeleteShoppingcartCartPromoResponse = ShoppingCartResponse;
579
579
 
580
580
  export interface DeleteShoppingcartCartPromoRequest
581
- extends BaseRequest,
582
- DeleteShoppingcartCartPromoPath {}
581
+ extends BaseRequest,
582
+ DeleteShoppingcartCartPromoPath {}
583
583
 
584
584
  // PUT /shoppingcart/{id}/paymentmethod - Change payment method used in shopping cart
585
585
 
586
586
  export interface PutShoppingcartCartPaymentPath {
587
- // Shopping cart ID
588
- id: string;
587
+ // Shopping cart ID
588
+ id: string;
589
589
  }
590
590
 
591
591
  export type PutShoppingcartCartPaymentBody = Payment;
@@ -593,35 +593,35 @@ export type PutShoppingcartCartPaymentBody = Payment;
593
593
  export type PutShoppingcartCartPaymentResponse = ShoppingCartResponse;
594
594
 
595
595
  export interface PutShoppingcartCartPaymentRequest
596
- extends BaseRequest,
597
- PutShoppingcartCartPaymentPath {
598
- body: PutShoppingcartCartPaymentBody;
596
+ extends BaseRequest,
597
+ PutShoppingcartCartPaymentPath {
598
+ body: PutShoppingcartCartPaymentBody;
599
599
  }
600
600
 
601
601
  // GET /shoppingcart/{id}/paymentmethods - Get a list of payment methods for cart
602
602
 
603
603
  export interface GetShoppingcartPaymentMethodsPath {
604
- // Shopping cart ID
605
- id: string;
604
+ // Shopping cart ID
605
+ id: string;
606
606
  }
607
607
 
608
608
  export interface GetShoppingcartPaymentMethodsQuery {
609
- // Graphql query string
610
- _query?: string;
609
+ // Graphql query string
610
+ _query?: string;
611
611
  }
612
612
 
613
613
  export type GetShoppingcartPaymentMethodsResponse = PaymentMethods;
614
614
 
615
615
  export interface GetShoppingcartPaymentMethodsRequest
616
- extends BaseRequest,
617
- RequestQuery<GetShoppingcartPaymentMethodsQuery>,
618
- GetShoppingcartPaymentMethodsPath {}
616
+ extends BaseRequest,
617
+ RequestQuery<GetShoppingcartPaymentMethodsQuery>,
618
+ GetShoppingcartPaymentMethodsPath {}
619
619
 
620
620
  // PUT /shoppingcart/{id}/order - Store information about the order created with this shopping cart
621
621
 
622
622
  export interface PutShoppingcartCartOrderPath {
623
- // Shopping cart ID
624
- id: string;
623
+ // Shopping cart ID
624
+ id: string;
625
625
  }
626
626
 
627
627
  export type PutShoppingcartCartOrderBody = OrderId;
@@ -629,42 +629,42 @@ export type PutShoppingcartCartOrderBody = OrderId;
629
629
  export type PutShoppingcartCartOrderResponse = ShoppingCartResponse;
630
630
 
631
631
  export interface PutShoppingcartCartOrderRequest extends BaseRequest, PutShoppingcartCartOrderPath {
632
- body: PutShoppingcartCartOrderBody;
632
+ body: PutShoppingcartCartOrderBody;
633
633
  }
634
634
 
635
635
  // POST /shoppingcart/{id}/clone - Create a shopping cart from existing shopping cart
636
636
 
637
637
  export interface PostShoppingcartCloneCartPath {
638
- // Shopping cart ID
639
- id: string;
638
+ // Shopping cart ID
639
+ id: string;
640
640
  }
641
641
 
642
642
  export interface PostShoppingcartCloneCartQuery {
643
- // If set to true then all validations will be skipped, requires global write permission
644
- skip_validation?: boolean;
643
+ // If set to true then all validations will be skipped, requires global write permission
644
+ skip_validation?: boolean;
645
645
  }
646
646
 
647
647
  export interface PostShoppingcartCloneCartBody {
648
- menu?: string;
649
- order_type?: string;
650
- // Array of item indexes that should be cloned
651
- items_to_clone?: string[];
648
+ menu?: string;
649
+ order_type?: string;
650
+ // Array of item indexes that should be cloned
651
+ items_to_clone?: string[];
652
652
  }
653
653
 
654
654
  export type PostShoppingcartCloneCartResponse = ShoppingCartResponse;
655
655
 
656
656
  export interface PostShoppingcartCloneCartRequest
657
- extends BaseRequest,
658
- RequestQuery<PostShoppingcartCloneCartQuery>,
659
- PostShoppingcartCloneCartPath {
660
- body: PostShoppingcartCloneCartBody;
657
+ extends BaseRequest,
658
+ RequestQuery<PostShoppingcartCloneCartQuery>,
659
+ PostShoppingcartCloneCartPath {
660
+ body: PostShoppingcartCloneCartBody;
661
661
  }
662
662
 
663
663
  // PUT /shoppingcart/{id}/checkout - handle ui checkout flow and call taxjar for full tax breakdown
664
664
 
665
665
  export interface PutShoppingcartCheckoutPath {
666
- // Shopping cart ID
667
- id: string;
666
+ // Shopping cart ID
667
+ id: string;
668
668
  }
669
669
 
670
670
  export type PutShoppingcartCheckoutResponse = ShoppingCartResponse;
@@ -674,11 +674,11 @@ export interface PutShoppingcartCheckoutRequest extends BaseRequest, PutShopping
674
674
  // POST /shoppingcart/bulk - Get multiple ShoppingCarts
675
675
 
676
676
  export interface PostShoppingcartBulkBody {
677
- ids: string[];
677
+ ids: string[];
678
678
  }
679
679
 
680
680
  export type PostShoppingcartBulkResponse = ShoppingCarts;
681
681
 
682
682
  export interface PostShoppingcartBulkRequest extends BaseRequest {
683
- body: PostShoppingcartBulkBody;
683
+ body: PostShoppingcartBulkBody;
684
684
  }