@compassdigital/sdk.typescript 3.77.1 → 4.1.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 (68) hide show
  1. package/lib/base.js.map +1 -1
  2. package/lib/index.d.ts +13 -6
  3. package/lib/index.d.ts.map +1 -1
  4. package/lib/index.js +11 -2
  5. package/lib/index.js.map +1 -1
  6. package/lib/interface/calendar.d.ts +1 -1
  7. package/lib/interface/delivery.d.ts +2 -2
  8. package/lib/interface/delivery.d.ts.map +1 -1
  9. package/lib/interface/file.d.ts +1 -1
  10. package/lib/interface/file.d.ts.map +1 -1
  11. package/lib/interface/frictionless.d.ts +3 -3
  12. package/lib/interface/frictionless.d.ts.map +1 -1
  13. package/lib/interface/location.d.ts +15 -6
  14. package/lib/interface/location.d.ts.map +1 -1
  15. package/lib/interface/location.js +12 -0
  16. package/lib/interface/location.js.map +1 -1
  17. package/lib/interface/mealplan.d.ts +6 -5
  18. package/lib/interface/mealplan.d.ts.map +1 -1
  19. package/lib/interface/menu.d.ts +498 -406
  20. package/lib/interface/menu.d.ts.map +1 -1
  21. package/lib/interface/menu.js +6 -0
  22. package/lib/interface/menu.js.map +1 -1
  23. package/lib/interface/notification.d.ts +2 -2
  24. package/lib/interface/notification.d.ts.map +1 -1
  25. package/lib/interface/order.d.ts +8 -6
  26. package/lib/interface/order.d.ts.map +1 -1
  27. package/lib/interface/partner.d.ts +11 -6
  28. package/lib/interface/partner.d.ts.map +1 -1
  29. package/lib/interface/partner.js +6 -0
  30. package/lib/interface/partner.js.map +1 -1
  31. package/lib/interface/payment.d.ts +23 -18
  32. package/lib/interface/payment.d.ts.map +1 -1
  33. package/lib/interface/promo.d.ts +13 -6
  34. package/lib/interface/promo.d.ts.map +1 -1
  35. package/lib/interface/promo.js +8 -0
  36. package/lib/interface/promo.js.map +1 -1
  37. package/lib/interface/report.d.ts +8 -8
  38. package/lib/interface/report.d.ts.map +1 -1
  39. package/lib/interface/shoppingcart.d.ts +14 -9
  40. package/lib/interface/shoppingcart.d.ts.map +1 -1
  41. package/lib/interface/shoppingcart.js +5 -0
  42. package/lib/interface/shoppingcart.js.map +1 -1
  43. package/lib/interface/task.d.ts +14 -14
  44. package/lib/interface/task.d.ts.map +1 -1
  45. package/lib/interface/user.d.ts +16 -21
  46. package/lib/interface/user.d.ts.map +1 -1
  47. package/lib/interface/vendor.d.ts +5 -5
  48. package/lib/interface/vendor.d.ts.map +1 -1
  49. package/package.json +2 -2
  50. package/src/index.ts +26 -5
  51. package/src/interface/announcement.ts +1 -1
  52. package/src/interface/calendar.ts +1 -1
  53. package/src/interface/delivery.ts +15 -2
  54. package/src/interface/file.ts +1 -1
  55. package/src/interface/frictionless.ts +3 -3
  56. package/src/interface/location.ts +16 -8
  57. package/src/interface/mealplan.ts +8 -6
  58. package/src/interface/menu.ts +511 -415
  59. package/src/interface/notification.ts +2 -2
  60. package/src/interface/order.ts +27 -12
  61. package/src/interface/partner.ts +10 -6
  62. package/src/interface/payment.ts +26 -18
  63. package/src/interface/promo.ts +12 -6
  64. package/src/interface/report.ts +8 -8
  65. package/src/interface/shoppingcart.ts +14 -9
  66. package/src/interface/task.ts +26 -14
  67. package/src/interface/user.ts +21 -27
  68. package/src/interface/vendor.ts +5 -5
@@ -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