@compassdigital/sdk.typescript 4.94.1 → 4.94.2

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.
@@ -23,11 +23,10 @@ export interface AnnouncementPostRequestBody {
23
23
  // True if all the sites are linked
24
24
  is_global?: boolean;
25
25
  allowed_resources?: string[];
26
- position: number;
26
+ position?: number;
27
27
  //@deprecated
28
28
  active?: boolean;
29
- // Status of the announcement
30
- status?: 'draft' | 'active' | 'disabled';
29
+ status?: Status;
31
30
  // Announcement Properties
32
31
  info?: {
33
32
  en?: AnnouncementInfo;
@@ -87,7 +86,7 @@ export interface Announcement {
87
86
  name: string;
88
87
  // Announcement Type
89
88
  type: string;
90
- key: string;
89
+ key?: string;
91
90
  // App name
92
91
  app: 'Boost' | 'Thrive' | 'Nourish' | 'JJKitchen' | 'Rogers';
93
92
  // True if all the sites are linked
@@ -97,7 +96,7 @@ export interface Announcement {
97
96
  active: boolean;
98
97
  // Status of the announcement
99
98
  status?: 'draft' | 'active' | 'disabled';
100
- schedule: Schedule;
99
+ schedule?: Schedule;
101
100
  // Date created
102
101
  created_at: string;
103
102
  // Date modified
@@ -121,9 +120,9 @@ export interface Announcements {
121
120
 
122
121
  export interface AnnouncementInfo {
123
122
  image_url?: string;
124
- title: string;
125
- description: string;
126
- sub_text: string;
123
+ title?: string;
124
+ description?: string;
125
+ sub_text?: string;
127
126
  button_text?: string;
128
127
  }
129
128
 
@@ -155,13 +154,20 @@ export interface Schedule {
155
154
  }[];
156
155
  }
157
156
 
157
+ export type Status = 'draft' | 'active' | 'disabled';
158
+
158
159
  // POST /announcement - Create Announcement
159
160
 
161
+ export interface PostAnnouncementQuery {
162
+ // Bypasses the default schedule creation logic
163
+ no_default_schedule?: boolean;
164
+ }
165
+
160
166
  export type PostAnnouncementBody = AnnouncementPostRequestBody;
161
167
 
162
168
  export type PostAnnouncementResponse = Announcement;
163
169
 
164
- export interface PostAnnouncementRequest extends BaseRequest {
170
+ export interface PostAnnouncementRequest extends BaseRequest, RequestQuery<PostAnnouncementQuery> {
165
171
  body: PostAnnouncementBody;
166
172
  }
167
173
 
@@ -199,6 +205,8 @@ export interface GetAnnouncementsQuery {
199
205
  sort_by?: string;
200
206
  // Sort order (ASC or DESC)
201
207
  sort_order?: string;
208
+ // Filter by status - 'active', 'draft', 'disabled'
209
+ status?: string;
202
210
  // Graphql query string
203
211
  _query?: string;
204
212
  }
@@ -233,11 +241,19 @@ export interface PutAnnouncementPath {
233
241
  id: string;
234
242
  }
235
243
 
244
+ export interface PutAnnouncementQuery {
245
+ // Bypasses the default schedule creation logic
246
+ no_default_schedule?: boolean;
247
+ }
248
+
236
249
  export type PutAnnouncementBody = AnnouncementPutRequestBody;
237
250
 
238
251
  export type PutAnnouncementResponse = Announcement;
239
252
 
240
- export interface PutAnnouncementRequest extends BaseRequest, PutAnnouncementPath {
253
+ export interface PutAnnouncementRequest
254
+ extends BaseRequest,
255
+ RequestQuery<PutAnnouncementQuery>,
256
+ PutAnnouncementPath {
241
257
  body: PutAnnouncementBody;
242
258
  }
243
259
 
@@ -3,7 +3,7 @@
3
3
 
4
4
  import { RequestQuery, BaseRequest } from './util';
5
5
 
6
- export interface IsStatus {
6
+ export interface PaymentMethodIsStatus {
7
7
  eligible: boolean;
8
8
  validated?: boolean;
9
9
  preferred?: boolean;
@@ -16,7 +16,7 @@ export interface Tender {
16
16
  type?: string;
17
17
  currency?: string;
18
18
  tender_number?: string;
19
- is: IsStatus;
19
+ is: PaymentMethodIsStatus;
20
20
  }
21
21
 
22
22
  export interface TenderList {
@@ -36,7 +36,7 @@ export interface CreditCard {
36
36
  billing_address?: BillingAddress;
37
37
  card_type?: string;
38
38
  expiry?: ExpiryDate;
39
- is: IsStatus;
39
+ is: PaymentMethodIsStatus;
40
40
  masked_card_number?: string;
41
41
  name_on_card?: string;
42
42
  nickname?: string;
@@ -49,7 +49,7 @@ export interface CreditCardData {
49
49
  }
50
50
 
51
51
  export interface DigitalWalletFlavor {
52
- is: IsStatus;
52
+ is: PaymentMethodIsStatus;
53
53
  }
54
54
 
55
55
  export interface DigitalWallet {
@@ -76,6 +76,182 @@ export interface NotFoundErrorDTO {
76
76
  data: Record<string, any>;
77
77
  }
78
78
 
79
+ export interface Brand {
80
+ id: string;
81
+ name?: string;
82
+ }
83
+
84
+ export interface OrderDate {
85
+ accepted?: string;
86
+ created?: string;
87
+ modified?: string;
88
+ should_start?: string;
89
+ completion_warning?: string;
90
+ ready?: string;
91
+ started?: string;
92
+ show_as_active_until?: string;
93
+ no_show?: string;
94
+ collected?: string;
95
+ delivered?: string;
96
+ pickup?: string;
97
+ cancelled?: string;
98
+ }
99
+
100
+ export interface OrderDetails {
101
+ name?: string;
102
+ display_id?: string;
103
+ contact_number?: string;
104
+ country_code?: string;
105
+ order_type?: string;
106
+ duration?: string;
107
+ destination?: string;
108
+ instructions?: string;
109
+ }
110
+
111
+ export interface Price {
112
+ amount?: number;
113
+ }
114
+
115
+ export interface RefundItem {
116
+ id?: string;
117
+ _index?: string;
118
+ quantity?: number;
119
+ price?: Price;
120
+ reason?: string;
121
+ }
122
+
123
+ export interface OrderIsStatus {
124
+ accepted?: boolean;
125
+ in_progress?: boolean;
126
+ ready?: boolean;
127
+ out_for_delivery?: boolean;
128
+ delivered?: boolean;
129
+ checkin_order?: boolean;
130
+ dining_hall_order?: boolean;
131
+ no_show?: boolean;
132
+ collected?: boolean;
133
+ cancelled?: boolean;
134
+ }
135
+
136
+ export interface CartTotal {
137
+ amount?: number;
138
+ meals?: number;
139
+ }
140
+
141
+ export interface Label {
142
+ en?: string;
143
+ fr?: string;
144
+ }
145
+
146
+ export interface QuantityByWeight {
147
+ unit?: string;
148
+ value?: number;
149
+ }
150
+
151
+ export interface SalePrice {
152
+ active?: boolean;
153
+ amount?: number;
154
+ }
155
+
156
+ export interface Modifier {
157
+ id: string;
158
+ price?: Price;
159
+ quantity?: number;
160
+ label?: Label;
161
+ _index?: string;
162
+ }
163
+
164
+ export interface ModifierGroup {
165
+ id: string;
166
+ label?: Label;
167
+ items?: Modifier[];
168
+ }
169
+
170
+ export interface CartItemRating {
171
+ id: string;
172
+ item: string;
173
+ score: number;
174
+ comment?: string;
175
+ tags?: string[];
176
+ }
177
+
178
+ export interface CartItem {
179
+ id: string;
180
+ description?: Label;
181
+ _index?: string;
182
+ quantity: number;
183
+ quantity_by_weight?: QuantityByWeight;
184
+ price?: Price;
185
+ sale_price?: SalePrice;
186
+ weighed_price?: Price;
187
+ _subtotal?: Price;
188
+ options?: ModifierGroup[];
189
+ label?: Label;
190
+ name?: string;
191
+ review: CartItemRating;
192
+ }
193
+
194
+ export interface ShoppingCart {
195
+ id: string;
196
+ total?: CartTotal;
197
+ items?: CartItem[];
198
+ }
199
+
200
+ export interface Order {
201
+ id?: string;
202
+ reorder_eligibility?:
203
+ | 'eligible'
204
+ | 'order_type_ineligible'
205
+ | 'location_ineligible'
206
+ | 'active_order'
207
+ | 'old_order'
208
+ | 'marketplace_order'
209
+ | 'duplicate_order'
210
+ | 'brand_unavailable'
211
+ | 'menu_unavailable'
212
+ | 'items_unavailable'
213
+ | 'refunded_order'
214
+ | 'modifiers_unavailable'
215
+ | 'modified_items'
216
+ | 'cancelled_order';
217
+ location_brand?: Brand;
218
+ location?: string;
219
+ date?: OrderDate;
220
+ details?: OrderDetails;
221
+ pickup?: string;
222
+ requested_date?: string;
223
+ refunds?: RefundItem[];
224
+ pickup_id?: string;
225
+ is?: OrderIsStatus;
226
+ shoppingcart?: ShoppingCart;
227
+ }
228
+
229
+ export interface GetCustomerOrdersResponseDTO {
230
+ orders: Order[];
231
+ }
232
+
233
+ export interface BadRequestErrorDTO {
234
+ message: string;
235
+ code: number;
236
+ data: Record<string, any>;
237
+ }
238
+
239
+ export interface NewCartItemRating {
240
+ item: string;
241
+ score: number;
242
+ comment?: string;
243
+ tags?: string[];
244
+ }
245
+
246
+ export interface PostOrderItemRatingsRequestDTO {
247
+ orderId: string;
248
+ reviews: NewCartItemRating[];
249
+ }
250
+
251
+ export interface PostOrderItemRatingsResponseDTO {
252
+ reviews: CartItemRating[];
253
+ }
254
+
79
255
  // GET /consumer/v1/health-check
80
256
 
81
257
  export interface HealthCheckControllerExecuteQuery {
@@ -105,3 +281,30 @@ export type GetPaymentListByBrandResponse = ListAvailablePaymentsResponseDTO;
105
281
  export interface GetPaymentListByBrandRequest
106
282
  extends BaseRequest,
107
283
  RequestQuery<GetPaymentListByBrandQuery> {}
284
+
285
+ // GET /consumer/customer-orders - Get customer orders
286
+
287
+ export interface GetCustomerOrdersQuery {
288
+ // Filter orders by their requested date. Only return orders that have a date greater than or equal to the date. Default is the current time in milliseconds.
289
+ start?: number;
290
+ // Filter orders by their requested date. Only return orders that have a date less than or equal to the date. Default is 24 hours from the current time in milliseconds.
291
+ end?: number;
292
+ // Graphql query string
293
+ _query?: string;
294
+ }
295
+
296
+ export type GetCustomerOrdersResponse = GetCustomerOrdersResponseDTO;
297
+
298
+ export interface GetCustomerOrdersRequest
299
+ extends BaseRequest,
300
+ RequestQuery<GetCustomerOrdersQuery> {}
301
+
302
+ // POST /consumer/review/order/item-ratings - Submit order reviews
303
+
304
+ export type PostOrderReviewsBody = PostOrderItemRatingsRequestDTO;
305
+
306
+ export type PostOrderReviewsResponse = PostOrderItemRatingsResponseDTO;
307
+
308
+ export interface PostOrderReviewsRequest extends BaseRequest {
309
+ body: PostOrderReviewsBody;
310
+ }
@@ -10,7 +10,6 @@ export interface Error {
10
10
  }
11
11
 
12
12
  export interface Notification {
13
- // notification
14
13
  id: string;
15
14
  title?: string;
16
15
  text: string;
@@ -146,6 +146,8 @@ export interface Order {
146
146
  pickup?: string;
147
147
  // Date order was cancelled
148
148
  cancelled?: string;
149
+ // Date order was polled for kds
150
+ polled?: string;
149
151
  };
150
152
  //@deprecated
151
153
  pickup?: string;
@@ -564,6 +564,9 @@ export interface Brand {
564
564
  software_integrations?: {
565
565
  system365?: string;
566
566
  jwo?: string;
567
+ time2eat?: {
568
+ enabled?: boolean;
569
+ };
567
570
  nextep?: {
568
571
  mobile_app?: boolean;
569
572
  };
@@ -29,7 +29,6 @@ export interface ApplicationPostBody {
29
29
  }
30
30
 
31
31
  export interface ApplicationPatchBody {
32
- // application
33
32
  id?: string;
34
33
  name?: string;
35
34
  description?: string;
@@ -50,7 +49,6 @@ export interface ApplicationPatchBody {
50
49
  }
51
50
 
52
51
  export interface Application {
53
- // application
54
52
  id?: string;
55
53
  date_created?: string;
56
54
  date_modified?: string;
@@ -67,7 +65,6 @@ export interface Application {
67
65
  last_name?: string;
68
66
  phone_number?: string;
69
67
  };
70
- // vendor
71
68
  vendor_id?: string;
72
69
  [index: string]: any;
73
70
  };
@@ -80,7 +77,6 @@ export interface Applications {
80
77
  }
81
78
 
82
79
  export interface Vendor {
83
- // vendor
84
80
  id?: string;
85
81
  name?: string;
86
82
  description?: string;
@@ -136,7 +132,6 @@ export interface Vendors {
136
132
  }
137
133
 
138
134
  export interface Key {
139
- // key
140
135
  id: string;
141
136
  date_created?: string;
142
137
  date_modified?: string;
@@ -154,7 +149,6 @@ export interface Key {
154
149
  }
155
150
 
156
151
  export interface KeyPostBody {
157
- // vendor
158
152
  vendor_id: string;
159
153
  // Date the key becomes expired
160
154
  date_expires: string;