@compassdigital/sdk.typescript 4.16.0 → 4.16.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.
Files changed (96) hide show
  1. package/lib/base.d.ts +11 -1
  2. package/lib/base.d.ts.map +1 -1
  3. package/lib/base.js +21 -3
  4. package/lib/base.js.map +1 -1
  5. package/lib/interface/ai.d.ts +3 -3
  6. package/lib/interface/ai.d.ts.map +1 -1
  7. package/lib/interface/announcement.d.ts +2 -2
  8. package/lib/interface/announcement.d.ts.map +1 -1
  9. package/lib/interface/calendar.d.ts +1 -1
  10. package/lib/interface/calendar.d.ts.map +1 -1
  11. package/lib/interface/centricos.d.ts +3 -3
  12. package/lib/interface/centricos.d.ts.map +1 -1
  13. package/lib/interface/compassconnect.d.ts +1 -1
  14. package/lib/interface/compassconnect.d.ts.map +1 -1
  15. package/lib/interface/config.d.ts +2 -2
  16. package/lib/interface/config.d.ts.map +1 -1
  17. package/lib/interface/datalake.d.ts +2 -2
  18. package/lib/interface/datalake.d.ts.map +1 -1
  19. package/lib/interface/delivery.d.ts +1 -1
  20. package/lib/interface/delivery.d.ts.map +1 -1
  21. package/lib/interface/email.d.ts +2 -2
  22. package/lib/interface/email.d.ts.map +1 -1
  23. package/lib/interface/file.d.ts +1 -1
  24. package/lib/interface/file.d.ts.map +1 -1
  25. package/lib/interface/frictionless.d.ts +5 -5
  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 +12 -21
  30. package/lib/interface/location.d.ts.map +1 -1
  31. package/lib/interface/location.js +0 -12
  32. package/lib/interface/location.js.map +1 -1
  33. package/lib/interface/mealplan.d.ts +1 -1
  34. package/lib/interface/mealplan.d.ts.map +1 -1
  35. package/lib/interface/menu.d.ts +249 -254
  36. package/lib/interface/menu.d.ts.map +1 -1
  37. package/lib/interface/menu.js +0 -6
  38. package/lib/interface/menu.js.map +1 -1
  39. package/lib/interface/notification.d.ts +2 -2
  40. package/lib/interface/notification.d.ts.map +1 -1
  41. package/lib/interface/order.d.ts +3 -3
  42. package/lib/interface/order.d.ts.map +1 -1
  43. package/lib/interface/partner.d.ts +18 -26
  44. package/lib/interface/partner.d.ts.map +1 -1
  45. package/lib/interface/partner.js +0 -11
  46. package/lib/interface/partner.js.map +1 -1
  47. package/lib/interface/payment.d.ts +1 -1
  48. package/lib/interface/payment.d.ts.map +1 -1
  49. package/lib/interface/promo.d.ts +5 -12
  50. package/lib/interface/promo.d.ts.map +1 -1
  51. package/lib/interface/promo.js +0 -8
  52. package/lib/interface/promo.js.map +1 -1
  53. package/lib/interface/report.d.ts +1 -1
  54. package/lib/interface/report.d.ts.map +1 -1
  55. package/lib/interface/shoppingcart.d.ts +8 -12
  56. package/lib/interface/shoppingcart.d.ts.map +1 -1
  57. package/lib/interface/shoppingcart.js +0 -5
  58. package/lib/interface/shoppingcart.js.map +1 -1
  59. package/lib/interface/task.d.ts +6 -14
  60. package/lib/interface/task.d.ts.map +1 -1
  61. package/lib/interface/task.js +0 -9
  62. package/lib/interface/task.js.map +1 -1
  63. package/lib/interface/user.d.ts +4 -4
  64. package/lib/interface/user.d.ts.map +1 -1
  65. package/lib/interface/util.d.ts +0 -19
  66. package/lib/interface/util.d.ts.map +1 -1
  67. package/lib/interface/vendor.d.ts +1 -1
  68. package/lib/interface/vendor.d.ts.map +1 -1
  69. package/package.json +2 -2
  70. package/src/base.ts +25 -6
  71. package/src/interface/ai.ts +3 -3
  72. package/src/interface/announcement.ts +2 -2
  73. package/src/interface/calendar.ts +1 -1
  74. package/src/interface/centricos.ts +3 -3
  75. package/src/interface/compassconnect.ts +1 -1
  76. package/src/interface/config.ts +2 -2
  77. package/src/interface/datalake.ts +2 -2
  78. package/src/interface/delivery.ts +1 -1
  79. package/src/interface/email.ts +2 -2
  80. package/src/interface/file.ts +1 -1
  81. package/src/interface/frictionless.ts +5 -5
  82. package/src/interface/kds.ts +1 -1
  83. package/src/interface/location.ts +12 -20
  84. package/src/interface/mealplan.ts +1 -1
  85. package/src/interface/menu.ts +249 -253
  86. package/src/interface/notification.ts +2 -2
  87. package/src/interface/order.ts +3 -3
  88. package/src/interface/partner.ts +18 -25
  89. package/src/interface/payment.ts +1 -1
  90. package/src/interface/promo.ts +5 -11
  91. package/src/interface/report.ts +1 -1
  92. package/src/interface/shoppingcart.ts +8 -11
  93. package/src/interface/task.ts +12 -13
  94. package/src/interface/user.ts +4 -4
  95. package/src/interface/util.ts +0 -21
  96. package/src/interface/vendor.ts +1 -1
@@ -6,7 +6,7 @@ import { RequestQuery, BaseRequest } from "./util";
6
6
  export interface Error {
7
7
  error?: string;
8
8
  code?: number;
9
- data?: any;
9
+ data?: Record<string, any>;
10
10
  }
11
11
 
12
12
  export interface Notification {
@@ -33,7 +33,7 @@ export interface PushNotificationBody {
33
33
  text: string;
34
34
  // Recipient of the notifications. Example: specific realm, role or user id
35
35
  target: string;
36
- data?: any;
36
+ data?: Record<string, any>;
37
37
  }
38
38
 
39
39
  export interface NotificationStatus {
@@ -49,7 +49,7 @@ export interface CreateOrder {
49
49
  export interface Error {
50
50
  error?: string;
51
51
  code?: number;
52
- data?: any;
52
+ data?: Record<string, any>;
53
53
  }
54
54
 
55
55
  export interface Issue {
@@ -327,7 +327,7 @@ export interface OrderedItem {
327
327
  id?: string;
328
328
  // index
329
329
  _index?: string;
330
- meta?: any;
330
+ meta?: Record<string, any>;
331
331
  }[];
332
332
  }[];
333
333
  [index: string]: any;
@@ -338,7 +338,7 @@ export interface Orders {
338
338
  lastKey?: string;
339
339
  count?: number;
340
340
  // url to query next set of data
341
- links?: any;
341
+ links?: Record<string, any>;
342
342
  }
343
343
 
344
344
  export interface ItemsWithIssue extends OrderedItem {
@@ -6,7 +6,7 @@ import { RequestQuery, BaseRequest } from "./util";
6
6
  export interface Error {
7
7
  message?: string;
8
8
  code?: number;
9
- data?: any;
9
+ data?: Record<string, any>;
10
10
  }
11
11
 
12
12
  export interface ShoppingCartResponse {
@@ -18,7 +18,7 @@ export interface ShoppingCartResponse {
18
18
  menu?: string;
19
19
  // brand
20
20
  brand?: string;
21
- date?: any;
21
+ date?: Record<string, any>;
22
22
  items?: ItemResponse[];
23
23
  sub_total?: {
24
24
  amount?: MonetaryValue;
@@ -30,7 +30,7 @@ export interface ShoppingCartResponse {
30
30
  percent_off?: MonetaryValue;
31
31
  amount?: MonetaryValue;
32
32
  app?: string;
33
- discount?: any;
33
+ discount?: Record<string, any>;
34
34
  provider_data?: FPValidationData;
35
35
  };
36
36
  //@deprecated
@@ -50,7 +50,7 @@ export interface ShoppingCartResponse {
50
50
  amount_off?: MonetaryValue;
51
51
  percent_off?: MonetaryValue;
52
52
  amount?: MonetaryValue;
53
- discount?: any;
53
+ discount?: Record<string, any>;
54
54
  provider_data?: FPValidationData;
55
55
  };
56
56
  payment_method?: {
@@ -126,7 +126,7 @@ export interface ShoppingCartResponse {
126
126
  };
127
127
  meta?: {
128
128
  // Raw request from any vendor integrated with CDL
129
- vendor?: any;
129
+ vendor?: Record<string, any>;
130
130
  [index: string]: any;
131
131
  };
132
132
  }
@@ -199,7 +199,7 @@ export interface ItemResponse {
199
199
  };
200
200
  }[];
201
201
  // Details about discount like BOGO, LTO, Bundle etc.
202
- item_discount?: any;
202
+ item_discount?: Record<string, any>;
203
203
  // user specified instructions for the item
204
204
  special_instructions?: string;
205
205
  amount_off_exclusions?: AmountOffExclusion[];
@@ -225,10 +225,7 @@ export interface FPValidationData {
225
225
  [index: string]: any;
226
226
  }
227
227
 
228
- enum AmountOffExclusion {
229
- DISCOUNT = "discount",
230
- PROMO = "promo",
231
- }
228
+ export type AmountOffExclusion = "discount" | "promo";
232
229
 
233
230
  export interface Label {
234
231
  en?: string;
@@ -279,7 +276,7 @@ export interface LocationGroup {
279
276
  meta?: {
280
277
  [index: string]: any;
281
278
  };
282
- style?: any;
279
+ style?: Record<string, any>;
283
280
  [index: string]: any;
284
281
  }
285
282
 
@@ -337,8 +334,8 @@ export interface Location {
337
334
  en?: string;
338
335
  fr?: string;
339
336
  };
340
- hours?: any;
341
- deliveryHours?: any;
337
+ hours?: Record<string, any>;
338
+ deliveryHours?: Record<string, any>;
342
339
  service_fee?: {
343
340
  type?: string;
344
341
  value?: number;
@@ -370,10 +367,10 @@ export interface Brand {
370
367
  };
371
368
  hours?: Hours[];
372
369
  deliveryHours?: DeliveryHours[];
373
- style?: any;
370
+ style?: Record<string, any>;
374
371
  // pos
375
372
  pos?: string;
376
- terminals?: any[];
373
+ terminals?: Record<string, any>[];
377
374
  timeslots?: {
378
375
  time?: string;
379
376
  averagePrepTime?: string;
@@ -420,8 +417,8 @@ export interface Brand {
420
417
  // company
421
418
  company?: string;
422
419
  config?: {
423
- private?: any;
424
- public?: any;
420
+ private?: Record<string, any>;
421
+ public?: Record<string, any>;
425
422
  };
426
423
  tax_rate?: number;
427
424
  meta?: {
@@ -611,7 +608,7 @@ export interface Group {
611
608
  };
612
609
  // The number of units that belong to this item. For example, a dozen doughnuts should have a unit value of 12
613
610
  unit?: number;
614
- ingredients?: any[];
611
+ ingredients?: Record<string, any>[];
615
612
  amount_off_exclusions?: AmountOffExclusionTypes[];
616
613
  nutrition?: {
617
614
  kcal?: number;
@@ -781,11 +778,7 @@ export interface Nutrition {
781
778
  unit?: string;
782
779
  }
783
780
 
784
- enum AmountOffExclusionTypes {
785
- LOYALTY = "loyalty",
786
- DISCOUNT = "discount",
787
- PROMO = "promo",
788
- }
781
+ export type AmountOffExclusionTypes = "loyalty" | "discount" | "promo";
789
782
 
790
783
  export interface CognitionStore {
791
784
  // UUID for external store
@@ -820,7 +813,7 @@ export interface PostPartnerStandardcognitionShoppingcartBody {
820
813
  // shoppingcart
821
814
  shoppingcart?: string;
822
815
  // Meta data from Standard Cognition shoppingcart
823
- meta?: any;
816
+ meta?: Record<string, any>;
824
817
  }
825
818
 
826
819
  export type PostPartnerStandardcognitionShoppingcartResponse = ShoppingCartResponse;
@@ -883,7 +876,7 @@ export interface PostPartnerEventPath {
883
876
  id: string;
884
877
  }
885
878
 
886
- export type PostPartnerEventBody = any;
879
+ export type PostPartnerEventBody = Record<string, any>;
887
880
 
888
881
  export type PostPartnerEventResponse = Success;
889
882
 
@@ -149,7 +149,7 @@ export interface Success {
149
149
  export interface Error {
150
150
  error?: string;
151
151
  code?: number;
152
- data?: any;
152
+ data?: Record<string, any>;
153
153
  }
154
154
 
155
155
  export interface CashlessTender {
@@ -6,7 +6,7 @@ import { RequestQuery, BaseRequest } from "./util";
6
6
  export interface Error {
7
7
  message?: string;
8
8
  code?: number;
9
- data?: any;
9
+ data?: Record<string, any>;
10
10
  }
11
11
 
12
12
  export interface PromotionBody {
@@ -58,13 +58,7 @@ export interface Promotion {
58
58
  meta?: PromoMeta;
59
59
  }
60
60
 
61
- enum Status {
62
- ACTIVE = "active",
63
- SCHEDULED = "scheduled",
64
- PAUSED = "paused",
65
- EXPIRED = "expired",
66
- ARCHIVED = "archived",
67
- }
61
+ export type Status = "active" | "scheduled" | "paused" | "expired" | "archived";
68
62
 
69
63
  export interface DatetimeObject {
70
64
  year: number;
@@ -260,10 +254,10 @@ export interface Customer {
260
254
  name?: string;
261
255
  email?: string;
262
256
  description?: string;
263
- address?: any;
257
+ address?: Record<string, any>;
264
258
  phone?: string;
265
- summary?: any;
266
- loyalty?: any;
259
+ summary?: Record<string, any>;
260
+ loyalty?: Record<string, any>;
267
261
  metadata?: {
268
262
  origin?: string;
269
263
  };
@@ -10,7 +10,7 @@ export interface Success {
10
10
  export interface Error {
11
11
  message?: string;
12
12
  code?: number;
13
- data?: any;
13
+ data?: Record<string, any>;
14
14
  }
15
15
 
16
16
  export interface EODReports {
@@ -6,7 +6,7 @@ import { RequestQuery, BaseRequest } from "./util";
6
6
  export interface Error {
7
7
  message?: string;
8
8
  code?: number;
9
- data?: any;
9
+ data?: Record<string, any>;
10
10
  }
11
11
 
12
12
  export interface ItemsRequest {
@@ -69,7 +69,7 @@ export interface ItemResponse {
69
69
  };
70
70
  options?: ModifierGroupResponse[];
71
71
  // Details about discount like BOGO, LTO, Bundle etc.
72
- item_discount?: any;
72
+ item_discount?: Record<string, any>;
73
73
  // user specified instructions for the item
74
74
  special_instructions?: string;
75
75
  amount_off_exclusions?: AmountOffExclusion[];
@@ -239,7 +239,7 @@ export interface ShoppingCartRequest {
239
239
  };
240
240
  meta?: {
241
241
  // Raw request from any vendor integrated with CDL
242
- vendor?: any;
242
+ vendor?: Record<string, any>;
243
243
  [index: string]: any;
244
244
  };
245
245
  }
@@ -253,7 +253,7 @@ export interface ShoppingCartResponse {
253
253
  menu?: string;
254
254
  // brand
255
255
  brand?: string;
256
- date?: any;
256
+ date?: Record<string, any>;
257
257
  items?: ItemResponse[];
258
258
  sub_total?: {
259
259
  amount?: MonetaryValue;
@@ -265,7 +265,7 @@ export interface ShoppingCartResponse {
265
265
  percent_off?: MonetaryValue;
266
266
  amount?: MonetaryValue;
267
267
  app?: string;
268
- discount?: any;
268
+ discount?: Record<string, any>;
269
269
  provider_data?: FPValidationData;
270
270
  };
271
271
  //@deprecated
@@ -285,7 +285,7 @@ export interface ShoppingCartResponse {
285
285
  amount_off?: MonetaryValue;
286
286
  percent_off?: MonetaryValue;
287
287
  amount?: MonetaryValue;
288
- discount?: any;
288
+ discount?: Record<string, any>;
289
289
  provider_data?: FPValidationData;
290
290
  };
291
291
  payment_method?: {
@@ -329,7 +329,7 @@ export interface ShoppingCartResponse {
329
329
  };
330
330
  meta?: {
331
331
  // Raw request from any vendor integrated with CDL
332
- vendor?: any;
332
+ vendor?: Record<string, any>;
333
333
  [index: string]: any;
334
334
  };
335
335
  }
@@ -428,10 +428,7 @@ export interface FPValidationData {
428
428
  [index: string]: any;
429
429
  }
430
430
 
431
- enum AmountOffExclusion {
432
- DISCOUNT = "discount",
433
- PROMO = "promo",
434
- }
431
+ export type AmountOffExclusion = "discount" | "promo";
435
432
 
436
433
  // POST /shoppingcart/ - Create a new ShoppingCart
437
434
 
@@ -15,13 +15,13 @@ export interface TaskLocation {
15
15
  // Pickup or Dropoff time
16
16
  action_time: string;
17
17
  // optional details
18
- details?: any;
18
+ details?: Record<string, any>;
19
19
  }
20
20
 
21
21
  export interface Error {
22
22
  code?: number;
23
23
  message?: string;
24
- data?: any;
24
+ data?: Record<string, any>;
25
25
  }
26
26
 
27
27
  export interface Task {
@@ -131,8 +131,8 @@ export interface ActionResponse {
131
131
  export interface TaskOrder {
132
132
  order_id?: string;
133
133
  customer_id?: string;
134
- customer?: any;
135
- order_details?: any;
134
+ customer?: Record<string, any>;
135
+ order_details?: Record<string, any>;
136
136
  delivery_instructions?: string;
137
137
  issue?: OrderIssue;
138
138
  past_issues?: OrderIssue[];
@@ -146,7 +146,7 @@ export interface OrderIssue {
146
146
  [index: string]: any;
147
147
  };
148
148
  // Array of Items with issues
149
- items?: any[];
149
+ items?: Record<string, any>[];
150
150
  // Optional additional explanation for issue: 5,10,15 for late issues, SOLD_OUT, MODIFICATION, DIETARY_RESTRICTION for see kitchen issues
151
151
  reason?: string;
152
152
  meta?: {
@@ -155,14 +155,13 @@ export interface OrderIssue {
155
155
  };
156
156
  }
157
157
 
158
- enum TaskStatus {
159
- NEW = "new",
160
- IN_PROGRESS = "in_progress",
161
- READY = "ready",
162
- OUT_FOR_DELIVERY = "out_for_delivery",
163
- DELIVERED = "delivered",
164
- ORDER_IS_READY = "order_is_ready",
165
- }
158
+ export type TaskStatus =
159
+ | "new"
160
+ | "in_progress"
161
+ | "ready"
162
+ | "out_for_delivery"
163
+ | "delivered"
164
+ | "order_is_ready";
166
165
 
167
166
  // POST /task/ - Create new Task
168
167
 
@@ -6,7 +6,7 @@ import { RequestQuery, BaseRequest } from "./util";
6
6
  export interface Error {
7
7
  message?: string;
8
8
  code?: number;
9
- data?: any;
9
+ data?: Record<string, any>;
10
10
  }
11
11
 
12
12
  export interface User {
@@ -184,7 +184,7 @@ export interface guestAuthToken {
184
184
  export type Permission = string;
185
185
 
186
186
  export interface KDSToken {
187
- device?: any;
187
+ device?: Record<string, any>;
188
188
  access?: {
189
189
  token?: string;
190
190
  expires?: number;
@@ -512,7 +512,7 @@ export interface PatchUserAuthKdsPath {
512
512
  device_id: string;
513
513
  }
514
514
 
515
- export type PatchUserAuthKdsBody = any;
515
+ export type PatchUserAuthKdsBody = Record<string, any>;
516
516
 
517
517
  export type PatchUserAuthKdsResponse = KDSDevice;
518
518
 
@@ -549,7 +549,7 @@ export interface PostUserAddSecretPath {
549
549
  key: string;
550
550
  }
551
551
 
552
- export type PostUserAddSecretBody = any;
552
+ export type PostUserAddSecretBody = Record<string, any>;
553
553
 
554
554
  export type PostUserAddSecretResponse = Key;
555
555
 
@@ -5,30 +5,9 @@ export type RequestQuery<T extends object> = {
5
5
  [K in keyof T]: T[K] extends number|undefined ? string : T[K];
6
6
  }
7
7
 
8
- /**
9
- * Provider TokenDetails
10
- */
11
- export interface RequestContextSession {
12
- user_id: string;
13
- expiry: Date | null;
14
- iat: Date;
15
- scopes: string;
16
- sub: string;
17
- domain?: string;
18
- }
19
-
20
- /**
21
- * Provider request context.
22
- */
23
- export interface RequestContext {
24
- method?: string;
25
- session?: RequestContextSession;
26
- }
27
-
28
8
  /**
29
9
  * All requests implement this interface.
30
10
  */
31
11
  export interface BaseRequest {
32
- context?: RequestContext;
33
12
  headers?: Record<string, string>;
34
13
  }
@@ -6,7 +6,7 @@ import { RequestQuery, BaseRequest } from "./util";
6
6
  export interface Error {
7
7
  message?: string;
8
8
  code?: number;
9
- data?: any;
9
+ data?: Record<string, any>;
10
10
  }
11
11
 
12
12
  export interface ApplicationPostBody {