@compassdigital/sdk.typescript 3.77.1 → 4.0.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 (67) hide show
  1. package/lib/index.d.ts +13 -6
  2. package/lib/index.d.ts.map +1 -1
  3. package/lib/index.js +11 -2
  4. package/lib/index.js.map +1 -1
  5. package/lib/interface/calendar.d.ts +1 -1
  6. package/lib/interface/delivery.d.ts +2 -2
  7. package/lib/interface/delivery.d.ts.map +1 -1
  8. package/lib/interface/file.d.ts +1 -1
  9. package/lib/interface/file.d.ts.map +1 -1
  10. package/lib/interface/frictionless.d.ts +3 -3
  11. package/lib/interface/frictionless.d.ts.map +1 -1
  12. package/lib/interface/location.d.ts +15 -6
  13. package/lib/interface/location.d.ts.map +1 -1
  14. package/lib/interface/location.js +12 -0
  15. package/lib/interface/location.js.map +1 -1
  16. package/lib/interface/mealplan.d.ts +6 -5
  17. package/lib/interface/mealplan.d.ts.map +1 -1
  18. package/lib/interface/menu.d.ts +498 -406
  19. package/lib/interface/menu.d.ts.map +1 -1
  20. package/lib/interface/menu.js +6 -0
  21. package/lib/interface/menu.js.map +1 -1
  22. package/lib/interface/notification.d.ts +2 -2
  23. package/lib/interface/notification.d.ts.map +1 -1
  24. package/lib/interface/order.d.ts +6 -6
  25. package/lib/interface/order.d.ts.map +1 -1
  26. package/lib/interface/partner.d.ts +11 -6
  27. package/lib/interface/partner.d.ts.map +1 -1
  28. package/lib/interface/partner.js +6 -0
  29. package/lib/interface/partner.js.map +1 -1
  30. package/lib/interface/payment.d.ts +4 -4
  31. package/lib/interface/payment.d.ts.map +1 -1
  32. package/lib/interface/promo.d.ts +13 -6
  33. package/lib/interface/promo.d.ts.map +1 -1
  34. package/lib/interface/promo.js +8 -0
  35. package/lib/interface/promo.js.map +1 -1
  36. package/lib/interface/report.d.ts +8 -8
  37. package/lib/interface/report.d.ts.map +1 -1
  38. package/lib/interface/shoppingcart.d.ts +14 -9
  39. package/lib/interface/shoppingcart.d.ts.map +1 -1
  40. package/lib/interface/shoppingcart.js +5 -0
  41. package/lib/interface/shoppingcart.js.map +1 -1
  42. package/lib/interface/task.d.ts +14 -14
  43. package/lib/interface/task.d.ts.map +1 -1
  44. package/lib/interface/user.d.ts +16 -21
  45. package/lib/interface/user.d.ts.map +1 -1
  46. package/lib/interface/vendor.d.ts +5 -5
  47. package/lib/interface/vendor.d.ts.map +1 -1
  48. package/package.json +2 -2
  49. package/src/index.ts +26 -5
  50. package/src/interface/announcement.ts +1 -1
  51. package/src/interface/calendar.ts +1 -1
  52. package/src/interface/delivery.ts +15 -2
  53. package/src/interface/file.ts +1 -1
  54. package/src/interface/frictionless.ts +3 -3
  55. package/src/interface/location.ts +16 -8
  56. package/src/interface/mealplan.ts +8 -6
  57. package/src/interface/menu.ts +511 -415
  58. package/src/interface/notification.ts +2 -2
  59. package/src/interface/order.ts +23 -12
  60. package/src/interface/partner.ts +10 -6
  61. package/src/interface/payment.ts +4 -4
  62. package/src/interface/promo.ts +12 -6
  63. package/src/interface/report.ts +8 -8
  64. package/src/interface/shoppingcart.ts +14 -9
  65. package/src/interface/task.ts +26 -14
  66. package/src/interface/user.ts +21 -27
  67. package/src/interface/vendor.ts +5 -5
@@ -22,7 +22,7 @@ export interface Notification {
22
22
  export interface NotificationBody {
23
23
  title?: string;
24
24
  text: string;
25
- realm: string;
25
+ realm: "cdl" | "boost" | "thrive" | "nourish" | "rogers" | "jjkitchen";
26
26
  // Recipient of the notifications. Example: specific realm, role or user id
27
27
  target: string;
28
28
  release_date?: string;
@@ -49,7 +49,7 @@ export interface Success {
49
49
 
50
50
  export interface GetNotificationsQuery {
51
51
  // Realm of notifications
52
- realm: string;
52
+ realm: "cdl" | "boost" | "thrive" | "nourish" | "rogers" | "jjkitchen";
53
53
  // Recipient of the notifications. Can be the whole realm, role or user id
54
54
  target: string;
55
55
  // Start date of the notifications. If not provided will default to 90 days ago.
@@ -24,7 +24,7 @@ export interface CreateOrder {
24
24
  };
25
25
  meta?: {
26
26
  // which ui the order was placed on
27
- source?: string;
27
+ source?: "web" | "mobile";
28
28
  [index: string]: any;
29
29
  };
30
30
  pickup?: string;
@@ -158,7 +158,7 @@ export interface Order {
158
158
  checkin_uuid?: string;
159
159
  refunds?: RefundTransaction[];
160
160
  // which ui the order was placed on
161
- source?: string;
161
+ source?: "web" | "mobile";
162
162
  // details pertaining to the amount charged on the order
163
163
  transaction?: {
164
164
  // used in mx orders - cart totals in dollars and meal exchange value (meals)
@@ -203,7 +203,18 @@ export interface Order {
203
203
  past_issues?: Issue[];
204
204
  // Delivery user
205
205
  runner?: string;
206
- reorder_eligibility?: string;
206
+ reorder_eligibility?:
207
+ | "eligible"
208
+ | "order_type_ineligible"
209
+ | "location_ineligible"
210
+ | "active_order"
211
+ | "old_order"
212
+ | "marketplace_order"
213
+ | "duplicate_order"
214
+ | "brand_unavailable"
215
+ | "menu_unavailable"
216
+ | "items_unavailable"
217
+ | "modifiers_unavailable";
207
218
  [index: string]: any;
208
219
  }
209
220
 
@@ -445,9 +456,9 @@ export interface GetOrderCustomerOrdersPath {
445
456
  export interface GetOrderCustomerOrdersQuery {
446
457
  // Sort the customers order by order created date, pickup date or requested date. Possible values: created, pickup. Default is created.
447
458
  sort?: string;
448
- // Filter orders by their pickup date. Only return orders that have a date greater than or equal to the date. Default is the current time in milliseconds.
459
+ //@deprecated
449
460
  pickup_start?: number;
450
- // Filter orders by their pickup 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.
461
+ //@deprecated
451
462
  pickup_end?: number;
452
463
  // 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.
453
464
  end?: number;
@@ -497,9 +508,9 @@ export interface GetOrderLocationBrandPath {
497
508
  }
498
509
 
499
510
  export interface GetOrderLocationBrandQuery {
500
- // Filter orders by their pickup date. Only return orders that have a date greater than or equal to the date in milliseconds.
511
+ //@deprecated
501
512
  pickup_start?: number;
502
- // Filter orders by their pickup date. Only return orders that have a date less than or equal to the date in milliseconds.
513
+ //@deprecated
503
514
  pickup_end?: number;
504
515
  // Filter orders to just those with this ready state
505
516
  ready?: boolean;
@@ -532,9 +543,9 @@ export interface GetOrderLocationOrdersPath {
532
543
  }
533
544
 
534
545
  export interface GetOrderLocationOrdersQuery {
535
- // Filter orders by their pickup date. Only return orders that have a date greater than or equal to the date in milliseconds.
546
+ //@deprecated
536
547
  pickup_start?: number;
537
- // Filter orders by their pickup date. Only return orders that have a date less than or equal to the date in milliseconds.
548
+ //@deprecated
538
549
  pickup_end?: number;
539
550
  // Filter orders to just those with this ready state
540
551
  ready?: boolean;
@@ -566,13 +577,13 @@ export interface GetOrderGroupOrdersPath {
566
577
 
567
578
  export interface GetOrderGroupOrdersQuery {
568
579
  // Filter orders by their status.
569
- status?: string;
580
+ status?: "accepted" | "in_progress" | "ready" | "out_for_delivery" | "delivered";
570
581
  // Filter orders by their requested date. Only return orders that have a date greater than or equal to the date. Default is all orders
571
582
  start?: number;
572
583
  // Filter orders by their requested date. Only return orders that have a date less than or equal to the date. Default is the current time in milliseconds.
573
584
  end?: number;
574
585
  // Filter orders by their order type
575
- order_type?: string;
586
+ order_type?: "delivery" | "pickup";
576
587
  // Filter orders by brand ID. Only return orders that involve brand ID, either as the only brand, or as part of a market place order.
577
588
  brand?: string;
578
589
  // show additional hidden properties/entities
@@ -599,7 +610,7 @@ export interface GetOrderUserOrdersPath {
599
610
 
600
611
  export interface GetOrderUserOrdersQuery {
601
612
  // Filter orders by their status.
602
- status?: string;
613
+ status?: "accepted" | "in_progress" | "ready" | "out_for_delivery" | "delivered";
603
614
  // Filter orders by their requested date. Only return orders that have a date greater than or equal to the date. Default is all orders
604
615
  start?: number;
605
616
  // Filter orders by their requested date. Only return orders that have a date less than or equal to the date. Default is the current time in milliseconds.
@@ -107,7 +107,7 @@ export interface ShoppingCartResponse {
107
107
  };
108
108
  is?: {
109
109
  // Shoppingcart Type: delivery, pickup
110
- type?: string;
110
+ type?: "delivery" | "pickup" | "scan_and_go" | "frictionless";
111
111
  // If an order should be paid with meal exchange. If true, this will calculate meals total.
112
112
  mx_cart?: boolean;
113
113
  // If a user's email or email domain is a match in a sites list of tax exempt emails or domains
@@ -180,7 +180,7 @@ export interface ItemResponse {
180
180
  original_label?: Label;
181
181
  taxes?: string[];
182
182
  };
183
- amount_off_exclusions?: string[];
183
+ amount_off_exclusions?: "promo"[];
184
184
  is?: {
185
185
  disabled?: boolean;
186
186
  };
@@ -193,7 +193,7 @@ export interface ItemResponse {
193
193
  item_discount?: any;
194
194
  // user specified instructions for the item
195
195
  special_instructions?: string;
196
- amount_off_exclusions?: string[];
196
+ amount_off_exclusions?: ("discount" | "promo")[];
197
197
  added_on?: string;
198
198
  meal_value?: IntegerValue;
199
199
  category?: Label;
@@ -420,7 +420,7 @@ export interface Brand {
420
420
  business_number?: number;
421
421
  website?: string;
422
422
  cuisine_types?: string[];
423
- status?: string;
423
+ status?: "await_partner" | "await_scout" | "completed";
424
424
  active?: boolean;
425
425
  max_showcase_items?: number;
426
426
  jde_category?: string;
@@ -475,7 +475,7 @@ export interface MenuHours {
475
475
  is_delivery?: boolean;
476
476
  is_frictionless?: boolean;
477
477
  // Identifies a brand or menu state, i.e open, closed or accepting preorders
478
- state?: string;
478
+ state?: "open" | "closed" | "preorder";
479
479
  }
480
480
 
481
481
  export interface Hours {
@@ -751,7 +751,11 @@ export interface Nutrition {
751
751
  unit?: string;
752
752
  }
753
753
 
754
- export type AmountOffExclusionTypes = string;
754
+ enum AmountOffExclusionTypes {
755
+ LOYALTY = "loyalty",
756
+ DISCOUNT = "discount",
757
+ PROMO = "promo",
758
+ }
755
759
 
756
760
  export interface CognitionStore {
757
761
  // UUID for external store
@@ -137,7 +137,7 @@ export interface Options {
137
137
  pickup_id?: string;
138
138
  // user_id
139
139
  user_id?: string;
140
- payment_type?: string;
140
+ payment_type?: "credit_card" | "badge_pay" | "stipend" | "voucher" | "coupon_voucher";
141
141
  // ID('payment', '<provider>', 'tender', <timestamp via Data.now()>
142
142
  tender?: string;
143
143
  digital_wallet_pay?: DigitalWalletPay;
@@ -160,7 +160,7 @@ export interface CashlessTender {
160
160
  // name associated with badgepay tender, stored in site public config
161
161
  name?: string;
162
162
  // account type associated with badgepay tender, stored in site public config
163
- type?: string;
163
+ type?: "badge_pay" | "stipend" | "voucher" | "coupon_voucher";
164
164
  }
165
165
 
166
166
  export type BadgePayTender = CashlessTender;
@@ -342,7 +342,7 @@ export interface GetPaymentTokenQuery {
342
342
  // Session key
343
343
  sessionKey: string;
344
344
  // CDL Site Id
345
- siteId: any[];
345
+ siteId: string;
346
346
  // name on card
347
347
  nameOnCard: string;
348
348
  // Graphql query string
@@ -402,7 +402,7 @@ export interface DeletePaymentTokenRequest extends BaseRequest {
402
402
 
403
403
  export interface GetPaymentMethodsQuery {
404
404
  // CDL Site Id
405
- siteId: any[];
405
+ siteId: string;
406
406
  // Graphql query string
407
407
  _query?: string;
408
408
  }
@@ -22,7 +22,7 @@ export interface PromotionBody {
22
22
  fr?: string;
23
23
  };
24
24
  multigroup: string;
25
- type: string;
25
+ type: "bogo" | "bundle" | "lto";
26
26
  items: PromotionItems;
27
27
  status: Status;
28
28
  location_group_ids: string[];
@@ -49,7 +49,7 @@ export interface Promotion {
49
49
  fr?: string;
50
50
  };
51
51
  multigroup?: string;
52
- type: string;
52
+ type: "bogo" | "bundle" | "lto";
53
53
  items: PromotionItems;
54
54
  status: Status;
55
55
  location_group_ids?: string[];
@@ -58,7 +58,13 @@ export interface Promotion {
58
58
  meta?: PromoMeta;
59
59
  }
60
60
 
61
- export type Status = string;
61
+ enum Status {
62
+ ACTIVE = "active",
63
+ SCHEDULED = "scheduled",
64
+ PAUSED = "paused",
65
+ EXPIRED = "expired",
66
+ ARCHIVED = "archived",
67
+ }
62
68
 
63
69
  export interface DatetimeObject {
64
70
  year: number;
@@ -74,7 +80,7 @@ export interface DatetimeObject {
74
80
 
75
81
  export interface Event {
76
82
  data?: {
77
- calendar?: string;
83
+ calendar?: "hours" | "holidays";
78
84
  [index: string]: any;
79
85
  };
80
86
  schedule?: {
@@ -84,7 +90,7 @@ export interface Event {
84
90
  // Is used to calculate the time event will end (times[0]+duration)
85
91
  duration?: number;
86
92
  // Defines the type of duration property
87
- durationUnit?: string;
93
+ durationUnit?: "minutes" | "hours" | "days";
88
94
  dayOfWeek?: number[];
89
95
  dayOfMonth?: number[];
90
96
  dayOfYear?: number[];
@@ -186,7 +192,7 @@ export interface UpdateVoucher {
186
192
  }
187
193
 
188
194
  export interface Voucher {
189
- provider?: string;
195
+ provider?: "fp" | "voucherify";
190
196
  code?: string;
191
197
  valid?: boolean;
192
198
  discount?: AppliedDiscount;
@@ -318,7 +318,7 @@ export interface EODItemReport {
318
318
 
319
319
  export interface GetReportAnalyticsGroupPath {
320
320
  location_group: string;
321
- report_type: string;
321
+ report_type: "bills" | "sales" | "transactions" | "top-items";
322
322
  }
323
323
 
324
324
  export interface GetReportAnalyticsGroupQuery {
@@ -326,8 +326,8 @@ export interface GetReportAnalyticsGroupQuery {
326
326
  brand_ids?: string;
327
327
  start_date: string;
328
328
  end_date: string;
329
- time_frame: string;
330
- order_type?: string;
329
+ time_frame: "week" | "month" | "day";
330
+ order_type?: "delivery" | "pickup" | "frictionless";
331
331
  // Graphql query string
332
332
  _query?: string;
333
333
  }
@@ -350,8 +350,8 @@ export interface GetReportAnalyticsCombinedGroupQuery {
350
350
  brand_ids?: string;
351
351
  start_date: string;
352
352
  end_date: string;
353
- time_frame: string;
354
- order_type?: string;
353
+ time_frame: "week" | "month" | "day";
354
+ order_type?: "delivery" | "pickup" | "frictionless";
355
355
  // Graphql query string
356
356
  _query?: string;
357
357
  }
@@ -375,7 +375,7 @@ export interface GetReportEodGroupQuery {
375
375
  // Report end date in ISO 8601 format
376
376
  end?: string;
377
377
  // Output format
378
- format?: string;
378
+ format?: "json" | "xslx";
379
379
  // Location IDs, comma-separated
380
380
  locations?: string;
381
381
  // Graphql query string
@@ -464,9 +464,9 @@ export interface GetReportEodGroupItemsQuery {
464
464
  // Report end date in ISO 8601 format
465
465
  end: string;
466
466
  // Output format
467
- format: string;
467
+ format: "xslx";
468
468
  // Partner name for specific formatting
469
- partner: string;
469
+ partner: "onemarket";
470
470
  // Location IDs, comma-separated
471
471
  locations: string;
472
472
  // Graphql query string
@@ -26,7 +26,7 @@ export interface ItemRequest {
26
26
  [index: string]: any;
27
27
  };
28
28
  special_instructions?: string;
29
- amount_off_exclusions?: string[];
29
+ amount_off_exclusions?: AmountOffExclusion[];
30
30
  }
31
31
 
32
32
  export interface ItemResponse {
@@ -72,7 +72,7 @@ export interface ItemResponse {
72
72
  item_discount?: any;
73
73
  // user specified instructions for the item
74
74
  special_instructions?: string;
75
- amount_off_exclusions?: string[];
75
+ amount_off_exclusions?: AmountOffExclusion[];
76
76
  added_on?: string;
77
77
  meal_value?: IntegerValue;
78
78
  category?: Label;
@@ -106,7 +106,7 @@ export interface ModifierRequest {
106
106
  label?: Label;
107
107
  _index?: string;
108
108
  quantity?: Quantity;
109
- amount_off_exclusions?: string[];
109
+ amount_off_exclusions?: AmountOffExclusion[];
110
110
  }
111
111
 
112
112
  export interface ModifierResponse {
@@ -123,7 +123,7 @@ export interface ModifierResponse {
123
123
  taxes?: string[];
124
124
  [index: string]: any;
125
125
  };
126
- amount_off_exclusions?: string[];
126
+ amount_off_exclusions?: AmountOffExclusion[];
127
127
  is?: {
128
128
  disabled?: boolean;
129
129
  };
@@ -229,7 +229,7 @@ export interface ShoppingCartRequest {
229
229
  brand?: string;
230
230
  is?: {
231
231
  // Shoppingcart Type: delivery, pickup
232
- type?: string;
232
+ type?: "delivery" | "pickup" | "scan_and_go";
233
233
  // If an order should be paid with meal exchange. If true, this will calculate meals total.
234
234
  mx_cart?: boolean;
235
235
  // If a user's email domain is a match in a sites list of tax exempt domains
@@ -260,7 +260,7 @@ export interface ShoppingCartResponse {
260
260
  };
261
261
  promo?: {
262
262
  code?: string;
263
- provider?: string;
263
+ provider?: "fp" | "voucherify";
264
264
  amount_off?: MonetaryValue;
265
265
  percent_off?: MonetaryValue;
266
266
  amount?: MonetaryValue;
@@ -281,7 +281,7 @@ export interface ShoppingCartResponse {
281
281
  };
282
282
  discount?: {
283
283
  code?: string;
284
- provider?: string;
284
+ provider?: "fp" | "voucherify";
285
285
  amount_off?: MonetaryValue;
286
286
  percent_off?: MonetaryValue;
287
287
  amount?: MonetaryValue;
@@ -319,7 +319,7 @@ export interface ShoppingCartResponse {
319
319
  };
320
320
  is?: {
321
321
  // Shoppingcart Type: delivery, pickup
322
- type?: string;
322
+ type?: "delivery" | "pickup" | "scan_and_go" | "frictionless";
323
323
  // If an order should be paid with meal exchange. If true, this will calculate meals total.
324
324
  mx_cart?: boolean;
325
325
  // If a user's email or email domain is a match in a sites list of tax exempt emails or domains
@@ -390,7 +390,7 @@ export interface Tender {
390
390
  id: string;
391
391
  name?: string;
392
392
  balance?: MonetaryValue;
393
- type: string;
393
+ type: "declining_balance" | "meal_equivalent" | "meal_exchange";
394
394
  is: {
395
395
  eligible: boolean;
396
396
  validated?: boolean;
@@ -428,6 +428,11 @@ export interface FPValidationData {
428
428
  [index: string]: any;
429
429
  }
430
430
 
431
+ enum AmountOffExclusion {
432
+ DISCOUNT = "discount",
433
+ PROMO = "promo",
434
+ }
435
+
431
436
  // POST /shoppingcart/ - Create a new ShoppingCart
432
437
 
433
438
  export type PostShoppingcartCartBody = ShoppingCartRequest;
@@ -36,12 +36,12 @@ export interface Task {
36
36
  // location id for this task
37
37
  location_id?: string;
38
38
  // type of location id
39
- location_type?: string;
39
+ location_type?: "brand" | "group";
40
40
  order?: TaskOrder;
41
41
  pickup_details?: TaskLocation;
42
42
  dropoff_details?: TaskLocation;
43
43
  // Task Status
44
- status?: string;
44
+ status?: "new" | "in_progress" | "ready" | "out_for_delivery" | "delivered" | "order_is_ready";
45
45
  // Any related metadata information about this Task
46
46
  meta?: {
47
47
  [index: string]: any;
@@ -61,7 +61,7 @@ export interface Task {
61
61
  // runnerid
62
62
  assignee?: string;
63
63
  // Task Type
64
- type?: string;
64
+ type?: "bolter" | "kds";
65
65
  }
66
66
 
67
67
  export interface Tasks {
@@ -78,18 +78,24 @@ export interface TaskCreate {
78
78
  // location id for this task
79
79
  location_id: string;
80
80
  // type of location id
81
- location_type: string;
81
+ location_type: "brand" | "group";
82
82
  order: TaskOrder;
83
83
  pickup_details: TaskLocation;
84
84
  dropoff_details: TaskLocation;
85
85
  // Task Status
86
- status: string;
86
+ status:
87
+ | "accepted"
88
+ | "in_progress"
89
+ | "ready"
90
+ | "out_for_delivery"
91
+ | "delivered"
92
+ | "order_is_ready";
87
93
  // Any related metadata information about this Task
88
94
  meta?: {
89
95
  [index: string]: any;
90
96
  };
91
97
  // Task Type
92
- type: string;
98
+ type: "bolter" | "kds";
93
99
  }
94
100
 
95
101
  export interface TaskUpdate {
@@ -101,12 +107,18 @@ export interface TaskUpdate {
101
107
  location_id?: string;
102
108
  unit_id?: string;
103
109
  // type of location id
104
- location_type?: string;
110
+ location_type?: "brand" | "group";
105
111
  order?: TaskOrder;
106
112
  pickup_details?: TaskLocation;
107
113
  dropoff_details?: TaskLocation;
108
114
  // Task Status
109
- status?: string;
115
+ status?:
116
+ | "accepted"
117
+ | "in_progress"
118
+ | "ready"
119
+ | "out_for_delivery"
120
+ | "delivered"
121
+ | "order_is_ready";
110
122
  // Any related metadata information about this Task
111
123
  meta?: {
112
124
  [index: string]: any;
@@ -115,7 +127,7 @@ export interface TaskUpdate {
115
127
 
116
128
  export interface OrderUpdate {
117
129
  // This is the new status of the order that you are trying to update
118
- order_status: string;
130
+ order_status: "ready";
119
131
  }
120
132
 
121
133
  export interface ActionResponse {
@@ -263,7 +275,7 @@ export interface GetTaskAssigneePath {
263
275
 
264
276
  export interface GetTaskAssigneeQuery {
265
277
  // Task Status
266
- status?: string;
278
+ status?: "new" | "in_progress" | "ready" | "out_for_delivery" | "delivered" | "order_is_ready";
267
279
  // Task Location ID
268
280
  location_id?: string;
269
281
  // Filter tasks by their created date. Only return tasks that have a date greater than or equal to the date.
@@ -292,7 +304,7 @@ export interface GetTaskLocationBrandPath {
292
304
 
293
305
  export interface GetTaskLocationBrandQuery {
294
306
  // Task Status
295
- status?: string;
307
+ status?: "new" | "in_progress" | "ready" | "out_for_delivery" | "delivered" | "order_is_ready";
296
308
  // Task Location ID
297
309
  location_id?: string;
298
310
  // Filter tasks by their created date. Only return tasks that have a date greater than or equal to the date.
@@ -304,7 +316,7 @@ export interface GetTaskLocationBrandQuery {
304
316
  // Filter tasks by the action_time in pickup_details. Only return tasks that have a pickup_time date greater than or equal to the date.
305
317
  pickup_time?: number;
306
318
  // The type of task that will be searched on. The default is: 'bolter'
307
- query_type?: string;
319
+ query_type?: "kds" | "bolter";
308
320
  // Graphql query string
309
321
  _query?: string;
310
322
  }
@@ -325,7 +337,7 @@ export interface GetTaskLocationGroupPath {
325
337
 
326
338
  export interface GetTaskLocationGroupQuery {
327
339
  // Task Status
328
- status?: string;
340
+ status?: "new" | "in_progress" | "ready" | "out_for_delivery" | "delivered" | "order_is_ready";
329
341
  // Task Location ID
330
342
  location_id?: string;
331
343
  // Filter tasks by their created date. Only return tasks that have a date greater than or equal to the date.
@@ -337,7 +349,7 @@ export interface GetTaskLocationGroupQuery {
337
349
  // Filter tasks by the action_time in pickup_details. Only return tasks that have a pickup_time date greater than or equal to the date.
338
350
  pickup_time?: number;
339
351
  // The type of task that will be searched on. The default is: 'bolter'
340
- query_type?: string;
352
+ query_type?: "kds" | "bolter";
341
353
  // Graphql query string
342
354
  _query?: string;
343
355
  }
@@ -29,11 +29,11 @@ export interface User {
29
29
  phone_country_code?: string;
30
30
  // realm
31
31
  realm?: string;
32
- gender?: string;
32
+ gender?: "male" | "female" | "non-binary";
33
33
  meta?: {
34
34
  marketing_opt_in?: boolean;
35
35
  marketing_opt_in_date?: string;
36
- marketing_opt_in_source?: string;
36
+ marketing_opt_in_source?: "App" | "Web";
37
37
  // Stores notification preference for order status, opt-in/opt-out from receiving order status update notifications
38
38
  order_status_notification?: {
39
39
  send_emails?: boolean;
@@ -106,7 +106,7 @@ export interface Changepassword {
106
106
 
107
107
  export interface Forgotpassword {
108
108
  email: string;
109
- type?: string;
109
+ type?: "forgot_password" | "new_user";
110
110
  }
111
111
 
112
112
  export interface Resetpassword {
@@ -230,7 +230,7 @@ export interface Checkin {
230
230
  user_id?: string;
231
231
  date_queued?: string;
232
232
  // The state of the user association process (attaching). Present for NFC check-ins only
233
- state?: string;
233
+ state?: "new" | "unconfirmed" | "associated" | "failed";
234
234
  meta?: CheckinMeta;
235
235
  }
236
236
 
@@ -238,41 +238,23 @@ export interface PatchCheckin {
238
238
  // Date when the checkin was put into the queue to be processed.
239
239
  date_queued?: number;
240
240
  // The state of the user association process (attaching). Present for NFC check-ins only
241
- state?: string;
241
+ state?: "new" | "unconfirmed" | "associated" | "failed";
242
242
  meta?: CheckinMeta;
243
243
  }
244
244
 
245
245
  export interface CheckinMeta {
246
246
  order_id?: string;
247
- status?: string;
247
+ status?: "processed" | "failed";
248
248
  logs?: {
249
249
  code?: number;
250
250
  date?: string;
251
251
  message?: string;
252
- type?: string;
252
+ type?: "error" | "log";
253
253
  [index: string]: any;
254
254
  }[];
255
255
  [index: string]: any;
256
256
  }
257
257
 
258
- export interface postOMS {
259
- in?: any;
260
- name?: any;
261
- required?: any;
262
- schema?: postOMSBody;
263
- }
264
-
265
- export interface postOMSBody {
266
- // OMS code from commpass sso
267
- code?: string;
268
- // the oms url for compass
269
- oms_url?: string;
270
- // the return uri for compassconnect
271
- callback_uri?: string;
272
- // the id of the application for compassconnect
273
- client_id?: string;
274
- }
275
-
276
258
  export interface RefreshToken {
277
259
  refresh_token?: string;
278
260
  }
@@ -358,7 +340,16 @@ export interface PostUserAuthRequest extends BaseRequest {
358
340
 
359
341
  // POST /user/oauth - Fetches a jwt token containing a compass token
360
342
 
361
- export type PostUserOauthBody = postOMS;
343
+ export interface PostUserOauthBody {
344
+ // OMS code from commpass sso
345
+ code?: string;
346
+ // the oms url for compass
347
+ oms_url?: string;
348
+ // the return uri for compassconnect
349
+ callback_uri?: string;
350
+ // the id of the application for compassconnect
351
+ client_id?: string;
352
+ }
362
353
 
363
354
  export type PostUserOauthResponse = omsauth;
364
355
 
@@ -790,7 +781,10 @@ export interface PostUserGuestTokenRequest extends BaseRequest {
790
781
 
791
782
  // POST /user/looker/embedurl - Create looker embed url
792
783
 
793
- export type PostUserEmbedurlBody = any;
784
+ export interface PostUserEmbedurlBody {
785
+ // Url to be embedded
786
+ url?: string;
787
+ }
794
788
 
795
789
  export interface PostUserEmbedurlResponse {
796
790
  // Embed url
@@ -46,7 +46,7 @@ export interface ApplicationPatchBody {
46
46
  };
47
47
  [index: string]: any;
48
48
  };
49
- status?: string;
49
+ status?: "pending" | "approved" | "rejected";
50
50
  }
51
51
 
52
52
  export interface Application {
@@ -71,7 +71,7 @@ export interface Application {
71
71
  vendor_id?: string;
72
72
  [index: string]: any;
73
73
  };
74
- status?: string;
74
+ status?: "pending" | "approved" | "rejected";
75
75
  }
76
76
 
77
77
  export interface Applications {
@@ -146,7 +146,7 @@ export interface Key {
146
146
  client_password?: string;
147
147
  // Date the key becomes expired
148
148
  date_expires?: string;
149
- environment?: string;
149
+ environment?: "dev" | "staging" | "v1";
150
150
  permissions?: string[];
151
151
  // Flag identifying if the key is latest
152
152
  active?: boolean;
@@ -158,7 +158,7 @@ export interface KeyPostBody {
158
158
  vendor_id: string;
159
159
  // Date the key becomes expired
160
160
  date_expires: string;
161
- environment: string;
161
+ environment: "dev" | "staging" | "v1";
162
162
  permissions: string[];
163
163
  }
164
164
 
@@ -211,7 +211,7 @@ export interface PostVendorApplicationRequest extends BaseRequest {
211
211
  // GET /vendor/application - Get a list of all applications
212
212
 
213
213
  export interface GetVendorApplicationQuery {
214
- status?: string;
214
+ status?: "pending" | "approved" | "rejected";
215
215
  // Pagination token to start query from
216
216
  last_evaluated_key?: string;
217
217
  // Graphql query string