@compassdigital/sdk.typescript 3.44.2 → 3.45.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.
@@ -74,6 +74,8 @@ export interface ItemResponse {
74
74
  added_on?: string;
75
75
  meal_value?: IntegerValue;
76
76
  category?: Label;
77
+ tax_rate?: MonetaryValue;
78
+ label?: Label;
77
79
  }
78
80
 
79
81
  export interface ModifierGroupRequest {
@@ -149,35 +151,45 @@ export interface BadgePay {
149
151
  name?: string;
150
152
  }
151
153
 
154
+ export interface Mealplan {
155
+ id?: string;
156
+ tender?: string;
157
+ total?: MonetaryValue;
158
+ }
159
+
160
+ export interface CreditCard {
161
+ card_type?: string;
162
+ last4?: string;
163
+ total?: MonetaryValue;
164
+ }
165
+
166
+ export interface DigitalWalletPay {
167
+ wallet_type?: string;
168
+ total?: MonetaryValue;
169
+ }
170
+
171
+ export interface MealSwipes {
172
+ id?: string;
173
+ tender?: string;
174
+ tender_type?: string;
175
+ tender_name?: string;
176
+ swipes?: MonetaryValue;
177
+ rate?: MonetaryValue;
178
+ total?: MonetaryValue;
179
+ }
180
+
181
+ export interface MealExchange {
182
+ id?: string;
183
+ tender?: string;
184
+ }
185
+
152
186
  export interface Payment {
153
187
  email?: string;
154
- mealplan?: {
155
- id?: string;
156
- tender?: string;
157
- total?: MonetaryValue;
158
- };
159
- credit_card?: {
160
- card_type?: string;
161
- last4?: string;
162
- total?: MonetaryValue;
163
- };
164
- digital_wallet_pay?: {
165
- wallet_type?: string;
166
- total?: MonetaryValue;
167
- };
168
- meal_swipes?: {
169
- id?: string;
170
- tender?: string;
171
- tender_type?: string;
172
- tender_name?: string;
173
- swipes?: MonetaryValue;
174
- rate?: MonetaryValue;
175
- total?: MonetaryValue;
176
- };
177
- meal_exchange?: {
178
- id?: string;
179
- tender?: string;
180
- };
188
+ mealplan?: Mealplan;
189
+ credit_card?: CreditCard;
190
+ digital_wallet_pay?: DigitalWalletPay;
191
+ meal_swipes?: MealSwipes;
192
+ meal_exchange?: MealExchange;
181
193
  badge_pay?: BadgePay;
182
194
  }
183
195
 
@@ -238,6 +250,7 @@ export interface ShoppingCartResponse {
238
250
  percent_off?: MonetaryValue;
239
251
  amount?: MonetaryValue;
240
252
  app?: string;
253
+ discount?: any;
241
254
  };
242
255
  //@deprecated
243
256
  loyalty?: {
@@ -255,36 +268,15 @@ export interface ShoppingCartResponse {
255
268
  amount_off?: MonetaryValue;
256
269
  percent_off?: MonetaryValue;
257
270
  amount?: MonetaryValue;
271
+ discount?: any;
258
272
  };
259
273
  payment_method?: {
260
274
  email?: string;
261
- mealplan?: {
262
- id?: string;
263
- tender?: string;
264
- total?: MonetaryValue;
265
- };
266
- credit_card?: {
267
- card_type?: string;
268
- last4?: string;
269
- total?: MonetaryValue;
270
- };
271
- digital_wallet_pay?: {
272
- wallet_type?: string;
273
- total?: MonetaryValue;
274
- };
275
- meal_swipes?: {
276
- id?: string;
277
- tender?: string;
278
- tender_type?: string;
279
- tender_name?: string;
280
- swipes?: MonetaryValue;
281
- rate?: MonetaryValue;
282
- total?: MonetaryValue;
283
- };
284
- meal_exchange?: {
285
- id?: string;
286
- tender?: string;
287
- };
275
+ mealplan?: Mealplan;
276
+ credit_card?: CreditCard;
277
+ digital_wallet_pay?: DigitalWalletPay;
278
+ meal_swipes?: MealSwipes;
279
+ meal_exchange?: MealExchange;
288
280
  badge_pay?: BadgePay;
289
281
  };
290
282
  taxes?: Taxes;
@@ -324,6 +316,69 @@ export interface ShoppingCartResponse {
324
316
 
325
317
  export type ShoppingCart = ShoppingCartResponse;
326
318
 
319
+ export interface PaymentMethods {
320
+ mealplan: {
321
+ tenders: Tender[];
322
+ };
323
+ badge_pay: {
324
+ tenders: {
325
+ balance?: MonetaryValue;
326
+ id: string;
327
+ // name associated with badgepay tender, stored in site public config
328
+ name?: string;
329
+ is: {
330
+ eligible: boolean;
331
+ };
332
+ }[];
333
+ };
334
+ credit_cards: {
335
+ data: {
336
+ billing_address?: {
337
+ postal_code?: string;
338
+ };
339
+ card_type?: string;
340
+ expiry?: {
341
+ month?: number;
342
+ year?: number;
343
+ };
344
+ is: {
345
+ eligible: boolean;
346
+ preferred?: boolean;
347
+ };
348
+ masked_card_number?: string;
349
+ name_on_card?: string;
350
+ nickname?: string;
351
+ token: string;
352
+ token_expiration_date?: string;
353
+ }[];
354
+ };
355
+ digital_wallet_pay: {
356
+ applewallet: {
357
+ is: {
358
+ eligible: boolean;
359
+ };
360
+ };
361
+ googlewallet: {
362
+ is: {
363
+ eligible: boolean;
364
+ };
365
+ };
366
+ };
367
+ }
368
+
369
+ export interface Tender {
370
+ // tender
371
+ id: string;
372
+ name?: string;
373
+ balance?: MonetaryValue;
374
+ type: string;
375
+ is: {
376
+ eligible: boolean;
377
+ validated?: boolean;
378
+ };
379
+ currency?: string;
380
+ }
381
+
327
382
  export interface Label {
328
383
  en?: string;
329
384
  fr?: string;
@@ -460,6 +515,25 @@ export interface PutShoppingcartCartPaymentRequest
460
515
  body: PutShoppingcartCartPaymentBody;
461
516
  }
462
517
 
518
+ // GET /shoppingcart/{id}/paymentmethods - Get a list of payment methods for cart
519
+
520
+ export interface GetShoppingcartPaymentMethodsPath {
521
+ // Shopping cart ID
522
+ id: string;
523
+ }
524
+
525
+ export interface GetShoppingcartPaymentMethodsQuery {
526
+ // Graphql query string
527
+ _query?: string;
528
+ }
529
+
530
+ export type GetShoppingcartPaymentMethodsResponse = PaymentMethods;
531
+
532
+ export interface GetShoppingcartPaymentMethodsRequest
533
+ extends BaseRequest,
534
+ RequestQuery<GetShoppingcartPaymentMethodsQuery>,
535
+ GetShoppingcartPaymentMethodsPath {}
536
+
463
537
  // PUT /shoppingcart/{id}/order/ - Store information about the order created with this shopping cart
464
538
 
465
539
  export interface PutShoppingcartCartOrderPath {
@@ -482,15 +556,23 @@ export interface PostShoppingcartCloneCartPath {
482
556
  id: string;
483
557
  }
484
558
 
559
+ export interface PostShoppingcartCloneCartQuery {
560
+ // If set to true then all validations will be skipped, requires global write permission
561
+ skip_validation?: boolean;
562
+ }
563
+
485
564
  export interface PostShoppingcartCloneCartBody {
486
565
  menu?: string;
487
566
  order_type?: string;
567
+ // Array of item indexes that should be cloned
568
+ items_to_clone?: string[];
488
569
  }
489
570
 
490
571
  export type PostShoppingcartCloneCartResponse = ShoppingCartResponse;
491
572
 
492
573
  export interface PostShoppingcartCloneCartRequest
493
574
  extends BaseRequest,
575
+ RequestQuery<PostShoppingcartCloneCartQuery>,
494
576
  PostShoppingcartCloneCartPath {
495
577
  body: PostShoppingcartCloneCartBody;
496
578
  }