@compassdigital/sdk.typescript 3.42.1 → 3.43.1

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.
@@ -387,15 +387,23 @@ export interface PatchMenuV2ModifierPath {
387
387
  id: string;
388
388
  }
389
389
 
390
+ export type PatchMenuV2ModifierBody = Modifier;
391
+
390
392
  export type PatchMenuV2ModifierResponse = Modifier;
391
393
 
392
- export interface PatchMenuV2ModifierRequest extends BaseRequest, PatchMenuV2ModifierPath {}
394
+ export interface PatchMenuV2ModifierRequest extends BaseRequest, PatchMenuV2ModifierPath {
395
+ body: PatchMenuV2ModifierBody;
396
+ }
393
397
 
394
398
  // POST /menu/v2/modifier
395
399
 
400
+ export type PostMenuV2ModifierBody = Modifier;
401
+
396
402
  export type PostMenuV2ModifierResponse = Modifier;
397
403
 
398
- export interface PostMenuV2ModifierRequest extends BaseRequest {}
404
+ export interface PostMenuV2ModifierRequest extends BaseRequest {
405
+ body: PostMenuV2ModifierBody;
406
+ }
399
407
 
400
408
  // GET /menu/v2/modifier/count
401
409
 
@@ -427,9 +435,13 @@ export interface GetMenuV2ModifierGroupsRequest
427
435
 
428
436
  // POST /menu/v2/modifier-group
429
437
 
430
- export type PostMenuV2ModifierGroupResponse = Modifier;
438
+ export type PostMenuV2ModifierGroupBody = ModifierGroup;
431
439
 
432
- export interface PostMenuV2ModifierGroupRequest extends BaseRequest {}
440
+ export type PostMenuV2ModifierGroupResponse = ModifierGroup;
441
+
442
+ export interface PostMenuV2ModifierGroupRequest extends BaseRequest {
443
+ body: PostMenuV2ModifierGroupBody;
444
+ }
433
445
 
434
446
  // GET /menu/v2/modifier-group/{id}
435
447
 
@@ -442,7 +454,7 @@ export interface GetMenuV2ModifierGroupQuery {
442
454
  _query?: string;
443
455
  }
444
456
 
445
- export type GetMenuV2ModifierGroupResponse = Modifier;
457
+ export type GetMenuV2ModifierGroupResponse = ModifierGroup;
446
458
 
447
459
  export interface GetMenuV2ModifierGroupRequest
448
460
  extends BaseRequest,
@@ -455,11 +467,13 @@ export interface PatchMenuV2ModifierGroupPath {
455
467
  id: string;
456
468
  }
457
469
 
458
- export type PatchMenuV2ModifierGroupResponse = Modifier;
470
+ export type PatchMenuV2ModifierGroupBody = ModifierGroup;
459
471
 
460
- export interface PatchMenuV2ModifierGroupRequest
461
- extends BaseRequest,
462
- PatchMenuV2ModifierGroupPath {}
472
+ export type PatchMenuV2ModifierGroupResponse = ModifierGroup;
473
+
474
+ export interface PatchMenuV2ModifierGroupRequest extends BaseRequest, PatchMenuV2ModifierGroupPath {
475
+ body: PatchMenuV2ModifierGroupBody;
476
+ }
463
477
 
464
478
  // GET /menu/v2/modifier-group/count
465
479
 
@@ -7,7 +7,7 @@ export interface Error {
7
7
  code?: number;
8
8
  }
9
9
 
10
- export interface ShoppingCart {
10
+ export interface ShoppingCartResponse {
11
11
  // shoppingcart
12
12
  id?: string;
13
13
  // location
@@ -17,23 +17,23 @@ export interface ShoppingCart {
17
17
  // brand
18
18
  brand?: string;
19
19
  date?: any;
20
- items?: Item[];
20
+ items?: ItemResponse[];
21
21
  sub_total?: {
22
- amount?: number;
22
+ amount?: MonetaryValue;
23
23
  };
24
24
  promo?: {
25
25
  code?: string;
26
- amount_off?: number;
27
- percent_off?: number;
28
- amount?: number;
26
+ amount_off?: MonetaryValue;
27
+ percent_off?: MonetaryValue;
28
+ amount?: MonetaryValue;
29
29
  app?: string;
30
30
  };
31
31
  //@deprecated
32
32
  loyalty?: {
33
33
  coupon?: {
34
34
  code?: string;
35
- amount_off?: number;
36
- amount?: number;
35
+ amount_off?: MonetaryValue;
36
+ amount?: MonetaryValue;
37
37
  name?: string;
38
38
  };
39
39
  // Points to be earned for this shopping cart total
@@ -41,34 +41,34 @@ export interface ShoppingCart {
41
41
  };
42
42
  discount?: {
43
43
  code?: string;
44
- amount_off?: number;
45
- percent_off?: number;
46
- amount?: number;
44
+ amount_off?: MonetaryValue;
45
+ percent_off?: MonetaryValue;
46
+ amount?: MonetaryValue;
47
47
  };
48
48
  payment_method?: {
49
49
  email?: string;
50
50
  mealplan?: {
51
51
  id?: string;
52
52
  tender?: string;
53
- total?: number;
53
+ total?: MonetaryValue;
54
54
  };
55
55
  credit_card?: {
56
56
  card_type?: string;
57
57
  last4?: string;
58
- total?: number;
58
+ total?: MonetaryValue;
59
59
  };
60
60
  digital_wallet_pay?: {
61
61
  wallet_type?: string;
62
- total?: number;
62
+ total?: MonetaryValue;
63
63
  };
64
64
  meal_swipes?: {
65
65
  id?: string;
66
66
  tender?: string;
67
67
  tender_type?: string;
68
68
  tender_name?: string;
69
- swipes?: number;
70
- rate?: number;
71
- total?: number;
69
+ swipes?: MonetaryValue;
70
+ rate?: MonetaryValue;
71
+ total?: MonetaryValue;
72
72
  };
73
73
  meal_exchange?: {
74
74
  id?: string;
@@ -76,10 +76,10 @@ export interface ShoppingCart {
76
76
  };
77
77
  badge_pay?: BadgePay;
78
78
  };
79
- taxes?: taxes;
79
+ taxes?: Taxes;
80
80
  total?: {
81
- amount?: number;
82
- meals?: number;
81
+ amount?: MonetaryValue;
82
+ meals?: MonetaryValue;
83
83
  };
84
84
  exemptions?: {
85
85
  tax?: boolean;
@@ -89,10 +89,10 @@ export interface ShoppingCart {
89
89
  id?: string;
90
90
  };
91
91
  service_fee?: {
92
- amount?: number;
92
+ amount?: MonetaryValue;
93
93
  };
94
94
  delivery_fee?: {
95
- amount?: number;
95
+ amount?: MonetaryValue;
96
96
  };
97
97
  is?: {
98
98
  // Shoppingcart Type: delivery, pickup
@@ -111,54 +111,72 @@ export interface ShoppingCart {
111
111
  };
112
112
  }
113
113
 
114
- export interface Item {
115
- // item
114
+ export interface ItemResponse {
115
+ // can be cdl item id or stringified timestamp
116
116
  id: string;
117
- // index
117
+ description?: Label;
118
+ // index based on cdl id or stringified timestamp
118
119
  _index?: string;
119
- quantity: number;
120
+ quantity: Quantity;
120
121
  unit?: number;
121
- price?: {
122
- amount?: number;
123
- };
122
+ price?: Price;
124
123
  // Final item price after LTO/Bundle/BOGO etc is applied on the item.
125
124
  sale_price?: {
126
125
  active?: boolean;
127
- amount?: number;
126
+ amount?: MonetaryValue;
128
127
  };
129
128
  // Subtotal of the item including all options
130
129
  _subtotal?: {
131
- amount?: number;
130
+ amount?: MonetaryValue;
132
131
  };
133
132
  // Promo applied to this item
134
133
  _promo?: {
135
- amount?: number;
134
+ amount?: MonetaryValue;
135
+ };
136
+ // discount applied to this item
137
+ _discount?: {
138
+ amount?: MonetaryValue;
136
139
  };
137
140
  meta?: {
138
141
  // menu id
139
142
  menu?: string;
140
143
  // brand id
141
144
  brand?: string;
145
+ brand_label?: Label;
146
+ taxes?: string[];
147
+ menu_tax_tags?: string[];
148
+ orderable?: boolean;
149
+ volante_id?: string;
142
150
  [index: string]: any;
143
151
  };
144
152
  options?: {
145
153
  id?: string;
146
- label?: {
147
- en?: string;
154
+ label?: Label;
155
+ meta?: {
156
+ taxes?: string[];
157
+ original_label?: Label;
148
158
  };
149
- meta?: any;
150
159
  items?: {
151
- // option
160
+ // option/modifier
152
161
  id?: string;
153
- label?: {
154
- en?: string;
155
- };
162
+ price?: Price;
163
+ quantity?: Quantity;
164
+ label?: Label;
156
165
  // index
157
166
  _index?: string;
158
- meta?: any;
159
- quantity?: number;
167
+ meta?: {
168
+ sort_number?: number;
169
+ original_label?: Label;
170
+ taxes?: string[];
171
+ };
160
172
  amount_off_exclusions?: string[];
173
+ is?: {
174
+ disabled?: boolean;
175
+ };
161
176
  }[];
177
+ is?: {
178
+ disabled?: boolean;
179
+ };
162
180
  }[];
163
181
  // Details about discount like BOGO, LTO, Bundle etc.
164
182
  item_discount?: any;
@@ -166,25 +184,41 @@ export interface Item {
166
184
  special_instructions?: string;
167
185
  amount_off_exclusions?: string[];
168
186
  added_on?: string;
169
- [index: string]: any;
187
+ meal_value?: IntegerValue;
188
+ category?: Label;
189
+ }
190
+
191
+ export type MonetaryValue = number;
192
+
193
+ export interface Label {
194
+ en?: string;
195
+ fr?: string;
196
+ }
197
+
198
+ export type IntegerValue = number;
199
+
200
+ export interface Price {
201
+ amount?: MonetaryValue;
170
202
  }
171
203
 
204
+ export type Quantity = number;
205
+
172
206
  export interface BadgePay {
173
207
  id?: string;
174
- total?: number;
208
+ total?: MonetaryValue;
175
209
  tender?: string;
176
210
  name?: string;
177
211
  }
178
212
 
179
- export interface taxes {
180
- amount?: number;
181
- rate?: number;
213
+ export interface Taxes {
214
+ amount?: MonetaryValue;
215
+ rate?: MonetaryValue;
182
216
  breakdown?: {
183
- taxable_amount?: number;
184
- tax_collectable?: number;
185
- combined_tax_rate?: number;
186
- gst?: number;
187
- pst?: number;
217
+ taxable_amount?: MonetaryValue;
218
+ tax_collectable?: MonetaryValue;
219
+ combined_tax_rate?: MonetaryValue;
220
+ gst?: MonetaryValue;
221
+ pst?: MonetaryValue;
188
222
  [index: string]: any;
189
223
  };
190
224
  }
@@ -454,6 +488,8 @@ export interface WaitTime {
454
488
  max: number;
455
489
  // minimum wait time to the next time slot in minutes
456
490
  min: number;
491
+ // the epoch timestamp of the next available ready time for a station
492
+ ready_time: number;
457
493
  }
458
494
 
459
495
  export interface Menu {
@@ -526,24 +562,21 @@ export interface Group {
526
562
  // The number of units that belong to this item. For example, a dozen doughnuts should have a unit value of 12
527
563
  unit?: number;
528
564
  ingredients?: any[];
529
- amount_off_exclusions?: string[];
565
+ amount_off_exclusions?: AmountOffExclusionTypes[];
530
566
  nutrition?: {
531
567
  kcal?: number;
532
- calories?: any;
533
- serving_size?: any;
534
- total_fat?: any;
535
- saturated_fat?: any;
536
- trans_fat?: any;
537
- cholesterol?: any;
538
- sodium?: {
539
- amount?: number;
540
- unit?: string;
541
- };
542
- total_carbohydrate?: any;
543
- dietary_fiber?: any;
544
- sugars?: any;
545
- protein?: any;
546
- well_being?: any;
568
+ calories?: Nutrition;
569
+ serving_size?: Nutrition;
570
+ total_fat?: Nutrition;
571
+ saturated_fat?: Nutrition;
572
+ trans_fat?: Nutrition;
573
+ cholesterol?: Nutrition;
574
+ sodium?: Nutrition;
575
+ total_carbohydrate?: Nutrition;
576
+ dietary_fiber?: Nutrition;
577
+ sugars?: Nutrition;
578
+ protein?: Nutrition;
579
+ well_being?: Nutrition;
547
580
  [index: string]: any;
548
581
  };
549
582
  certified?: {
@@ -593,7 +626,7 @@ export interface Group {
593
626
  sku?: number;
594
627
  nutrition?: {
595
628
  kcal?: number;
596
- calories?: any;
629
+ calories?: Nutrition;
597
630
  };
598
631
  certified?: {
599
632
  vegan?: boolean;
@@ -614,7 +647,7 @@ export interface Group {
614
647
  hidden?: boolean;
615
648
  out_of_stock?: boolean;
616
649
  };
617
- amount_off_exclusions?: any[];
650
+ amount_off_exclusions?: AmountOffExclusionTypes[];
618
651
  }[];
619
652
  min?: number;
620
653
  max?: number;
@@ -685,6 +718,13 @@ export interface Group {
685
718
  };
686
719
  }
687
720
 
721
+ export interface Nutrition {
722
+ amount?: number;
723
+ unit?: string;
724
+ }
725
+
726
+ export type AmountOffExclusionTypes = string;
727
+
688
728
  export interface CognitionStore {
689
729
  // UUID for external store
690
730
  uuid?: string;
@@ -733,7 +773,7 @@ export interface PostPartnerStandardcognitionShoppingcartBody {
733
773
  meta?: any;
734
774
  }
735
775
 
736
- export type PostPartnerStandardcognitionShoppingcartResponse = ShoppingCart;
776
+ export type PostPartnerStandardcognitionShoppingcartResponse = ShoppingCartResponse;
737
777
 
738
778
  export interface PostPartnerStandardcognitionShoppingcartRequest extends BaseRequest {
739
779
  body: PostPartnerStandardcognitionShoppingcartBody;