@compassdigital/sdk.typescript 4.27.0 → 4.29.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 (42) hide show
  1. package/lib/index.d.ts +53 -36
  2. package/lib/index.d.ts.map +1 -1
  3. package/lib/index.js +52 -36
  4. package/lib/index.js.map +1 -1
  5. package/lib/interface/consumer.d.ts +76 -0
  6. package/lib/interface/consumer.d.ts.map +1 -0
  7. package/lib/interface/consumer.js +5 -0
  8. package/lib/interface/consumer.js.map +1 -0
  9. package/lib/interface/frictionless.d.ts +107 -107
  10. package/lib/interface/frictionless.d.ts.map +1 -1
  11. package/lib/interface/location.d.ts +0 -1
  12. package/lib/interface/location.d.ts.map +1 -1
  13. package/lib/interface/mealplan.d.ts +0 -4
  14. package/lib/interface/mealplan.d.ts.map +1 -1
  15. package/lib/interface/menu.d.ts +16 -15
  16. package/lib/interface/menu.d.ts.map +1 -1
  17. package/lib/interface/order.d.ts +3 -1
  18. package/lib/interface/order.d.ts.map +1 -1
  19. package/lib/interface/partner.d.ts +5 -3
  20. package/lib/interface/partner.d.ts.map +1 -1
  21. package/lib/interface/promo.d.ts +10 -3
  22. package/lib/interface/promo.d.ts.map +1 -1
  23. package/lib/interface/task.d.ts +3 -0
  24. package/lib/interface/task.d.ts.map +1 -1
  25. package/lib/interface/user.d.ts +14 -12
  26. package/lib/interface/user.d.ts.map +1 -1
  27. package/lib/interface/vendor.d.ts.map +1 -1
  28. package/manifest.json +5 -1
  29. package/package.json +3 -3
  30. package/pipeline.yml +1 -1
  31. package/src/index.ts +144 -97
  32. package/src/interface/consumer.ts +105 -0
  33. package/src/interface/frictionless.ts +200 -158
  34. package/src/interface/location.ts +4 -2
  35. package/src/interface/mealplan.ts +1 -9
  36. package/src/interface/menu.ts +21 -15
  37. package/src/interface/order.ts +12 -1
  38. package/src/interface/partner.ts +14 -3
  39. package/src/interface/promo.ts +10 -3
  40. package/src/interface/task.ts +4 -0
  41. package/src/interface/user.ts +20 -14
  42. package/src/interface/vendor.ts +0 -1
@@ -22,6 +22,7 @@ export interface CreateOrder {
22
22
  // user
23
23
  customer?: string;
24
24
  is?: {
25
+ //@deprecated
25
26
  accepted?: boolean;
26
27
  in_progress?: boolean;
27
28
  ready?: boolean;
@@ -31,7 +32,9 @@ export interface CreateOrder {
31
32
  source?: "web" | "mobile";
32
33
  [index: string]: any;
33
34
  };
35
+ //@deprecated
34
36
  pickup?: string;
37
+ //@deprecated
35
38
  pickup_name?: string;
36
39
  requested_date?: string;
37
40
  details?: {
@@ -56,6 +59,7 @@ export interface Issue {
56
59
  // issue
57
60
  id?: string;
58
61
  type?: string;
62
+ //@deprecated
59
63
  item?: {
60
64
  [index: string]: any;
61
65
  };
@@ -108,6 +112,7 @@ export interface Order {
108
112
  // user
109
113
  customer?: string;
110
114
  is?: {
115
+ //@deprecated
111
116
  accepted?: boolean;
112
117
  in_progress?: boolean;
113
118
  ready?: boolean;
@@ -142,8 +147,11 @@ export interface Order {
142
147
  // For delivery orders - date order was picked up from station for delivery(out_for_delivery)
143
148
  pickup?: string;
144
149
  };
150
+ //@deprecated
145
151
  pickup?: string;
152
+ //@deprecated
146
153
  pickup_name?: string;
154
+ //@deprecated
147
155
  pickup_id?: string;
148
156
  requested_date?: string;
149
157
  details?: {
@@ -287,6 +295,7 @@ export interface MealPlan {
287
295
  export interface OrderIssue {
288
296
  // Type of issue
289
297
  type?: string;
298
+ //@deprecated
290
299
  item?: {
291
300
  [index: string]: any;
292
301
  };
@@ -339,7 +348,9 @@ export interface Orders {
339
348
  lastKey?: string;
340
349
  count?: number;
341
350
  // url to query next set of data
342
- links?: Record<string, any>;
351
+ links?: {
352
+ next?: string;
353
+ };
343
354
  }
344
355
 
345
356
  export interface ItemsWithIssue extends OrderedItem {
@@ -277,6 +277,7 @@ export interface LocationGroup {
277
277
  [index: string]: any;
278
278
  };
279
279
  style?: Record<string, any>;
280
+ timezone?: string;
280
281
  [index: string]: any;
281
282
  }
282
283
 
@@ -357,7 +358,9 @@ export interface Brand {
357
358
  };
358
359
  timezone?: string;
359
360
  description?: string;
361
+ //@deprecated
360
362
  latitude?: number;
363
+ //@deprecated
361
364
  longitude?: number;
362
365
  address?: Address;
363
366
  menus?: MenuHours[];
@@ -413,6 +416,7 @@ export interface Brand {
413
416
  group?: string;
414
417
  // payment
415
418
  payment_provider?: string;
419
+ //@deprecated
416
420
  location_description?: string;
417
421
  // company
418
422
  company?: string;
@@ -611,6 +615,7 @@ export interface Group {
611
615
  ingredients?: Record<string, any>[];
612
616
  amount_off_exclusions?: AmountOffExclusionTypes[];
613
617
  nutrition?: {
618
+ //@deprecated
614
619
  kcal?: number;
615
620
  calories?: Nutrition;
616
621
  serving_size?: Nutrition;
@@ -676,6 +681,7 @@ export interface Group {
676
681
  };
677
682
  sku?: number;
678
683
  nutrition?: {
684
+ //@deprecated
679
685
  kcal?: number;
680
686
  calories?: Nutrition;
681
687
  };
@@ -734,6 +740,8 @@ export interface Group {
734
740
  sort_number?: number;
735
741
  // menu sort order
736
742
  menu_sort_number?: number;
743
+ // barcodes of the item
744
+ barcodes?: string[];
737
745
  };
738
746
  category?: {
739
747
  en?: string;
@@ -748,6 +756,7 @@ export interface Group {
748
756
  unit?: string;
749
757
  amount?: number;
750
758
  };
759
+ //@deprecated
751
760
  is_deleted?: boolean;
752
761
  is?: {
753
762
  disabled?: boolean;
@@ -758,7 +767,9 @@ export interface Group {
758
767
  featured?: boolean;
759
768
  };
760
769
  }[];
770
+ //@deprecated
761
771
  is_disabled?: boolean;
772
+ //@deprecated
762
773
  name?: string;
763
774
  is?: {
764
775
  disabled?: boolean;
@@ -804,12 +815,12 @@ export interface Success {
804
815
  // POST /partner/standardcognition/shoppingcart - Calculates a shoppingcart
805
816
 
806
817
  export interface PostPartnerStandardcognitionShoppingcartBody {
807
- items?: {
818
+ items: {
808
819
  sku?: string;
809
820
  quantity?: number;
810
821
  }[];
811
822
  // brand
812
- location_brand?: string;
823
+ location_brand: string;
813
824
  // shoppingcart
814
825
  shoppingcart?: string;
815
826
  // Meta data from Standard Cognition shoppingcart
@@ -844,7 +855,7 @@ export interface GetPartnerStandardcognitionStoresQuery {
844
855
  _query?: string;
845
856
  }
846
857
 
847
- export type GetPartnerStandardcognitionStoresResponse = CognitionStore;
858
+ export type GetPartnerStandardcognitionStoresResponse = CognitionStore[];
848
859
 
849
860
  export interface GetPartnerStandardcognitionStoresRequest
850
861
  extends BaseRequest,
@@ -254,12 +254,19 @@ export interface Customer {
254
254
  name?: string;
255
255
  email?: string;
256
256
  description?: string;
257
- address?: Record<string, any>;
257
+ address?: {
258
+ [index: string]: any;
259
+ };
258
260
  phone?: string;
259
- summary?: Record<string, any>;
260
- loyalty?: Record<string, any>;
261
+ summary?: {
262
+ [index: string]: any;
263
+ };
264
+ loyalty?: {
265
+ [index: string]: any;
266
+ };
261
267
  metadata?: {
262
268
  origin?: string;
269
+ [index: string]: any;
263
270
  };
264
271
  created_at?: string;
265
272
  updated_at?: string;
@@ -16,6 +16,7 @@ export interface TaskLocation {
16
16
  action_time: string;
17
17
  // optional details
18
18
  details?: Record<string, any>;
19
+ [index: string]: any;
19
20
  }
20
21
 
21
22
  export interface Error {
@@ -136,12 +137,14 @@ export interface TaskOrder {
136
137
  delivery_instructions?: string;
137
138
  issue?: OrderIssue;
138
139
  past_issues?: OrderIssue[];
140
+ [index: string]: any;
139
141
  }
140
142
 
141
143
  export interface OrderIssue {
142
144
  // issue
143
145
  id?: string;
144
146
  type?: string;
147
+ //@deprecated
145
148
  item?: {
146
149
  [index: string]: any;
147
150
  };
@@ -153,6 +156,7 @@ export interface OrderIssue {
153
156
  created_at?: string;
154
157
  [index: string]: any;
155
158
  };
159
+ [index: string]: any;
156
160
  }
157
161
 
158
162
  export type TaskStatus =
@@ -50,7 +50,7 @@ export interface User {
50
50
  attempts?: number;
51
51
  first_attempted?: string;
52
52
  };
53
- // phone verification details
53
+ //@deprecated
54
54
  phone_verification?: {
55
55
  verification_code?: string;
56
56
  date_generated?: number;
@@ -71,7 +71,7 @@ export interface User {
71
71
  locked_out?: boolean;
72
72
  // If the users email is verified
73
73
  verified?: boolean;
74
- // User phone number verification
74
+ //@deprecated
75
75
  phone_verified?: boolean;
76
76
  // User deleted status
77
77
  deleted?: boolean;
@@ -130,6 +130,7 @@ export interface success {
130
130
  }
131
131
 
132
132
  export interface auth {
133
+ //@deprecated
133
134
  token?: string;
134
135
  access?: {
135
136
  token?: string;
@@ -145,6 +146,7 @@ export interface auth {
145
146
  }
146
147
 
147
148
  export interface guestAuth {
149
+ //@deprecated
148
150
  token?: string;
149
151
  access?: {
150
152
  token?: string;
@@ -174,6 +176,7 @@ export interface omsauth {
174
176
  }
175
177
 
176
178
  export interface guestAuthToken {
179
+ //@deprecated
177
180
  token?: string;
178
181
  access?: {
179
182
  token?: string;
@@ -184,7 +187,7 @@ export interface guestAuthToken {
184
187
  export type Permission = string;
185
188
 
186
189
  export interface KDSToken {
187
- device?: Record<string, any>;
190
+ device?: KDSDevice;
188
191
  access?: {
189
192
  token?: string;
190
193
  expires?: number;
@@ -196,15 +199,13 @@ export interface KDSDevices {
196
199
  }
197
200
 
198
201
  export interface KDSDevice {
199
- device?: {
200
- id?: string;
201
- lat?: string;
202
- long?: string;
203
- location_group?: string;
204
- is?: {
205
- authorized?: boolean;
206
- deleted?: boolean;
207
- };
202
+ id?: string;
203
+ lat?: string;
204
+ long?: string;
205
+ location_group?: string;
206
+ is?: {
207
+ authorized?: boolean;
208
+ deleted?: boolean;
208
209
  };
209
210
  }
210
211
 
@@ -512,9 +513,14 @@ export interface PatchUserAuthKdsPath {
512
513
  device_id: string;
513
514
  }
514
515
 
515
- export type PatchUserAuthKdsBody = Record<string, any>;
516
+ export interface PatchUserAuthKdsBody {
517
+ // Location group of the device
518
+ location_group?: string;
519
+ }
516
520
 
517
- export type PatchUserAuthKdsResponse = KDSDevice;
521
+ export interface PatchUserAuthKdsResponse {
522
+ device?: KDSDevice;
523
+ }
518
524
 
519
525
  export interface PatchUserAuthKdsRequest extends BaseRequest, PatchUserAuthKdsPath {
520
526
  body: PatchUserAuthKdsBody;
@@ -227,7 +227,6 @@ export interface GetVendorApplicationRequest
227
227
  // PATCH /vendor/application/{id} - Update an application (or update status)
228
228
 
229
229
  export interface PatchVendorApplicationPath {
230
- // TODO: add parameter to swagger.json
231
230
  id: string;
232
231
  }
233
232