@compassdigital/sdk.typescript 3.19.0 → 3.20.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 (71) hide show
  1. package/lib/interface/announcement.d.ts +7 -1
  2. package/lib/interface/announcement.d.ts.map +1 -1
  3. package/lib/interface/calendar.d.ts +9 -2
  4. package/lib/interface/calendar.d.ts.map +1 -1
  5. package/lib/interface/compassconnect.d.ts +2 -1
  6. package/lib/interface/compassconnect.d.ts.map +1 -1
  7. package/lib/interface/config.d.ts +12 -1
  8. package/lib/interface/config.d.ts.map +1 -1
  9. package/lib/interface/datalake.d.ts +5 -1
  10. package/lib/interface/datalake.d.ts.map +1 -1
  11. package/lib/interface/email.d.ts +2 -0
  12. package/lib/interface/email.d.ts.map +1 -1
  13. package/lib/interface/file.d.ts +3 -0
  14. package/lib/interface/file.d.ts.map +1 -1
  15. package/lib/interface/kds.d.ts +9 -2
  16. package/lib/interface/kds.d.ts.map +1 -1
  17. package/lib/interface/location.d.ts +57 -3
  18. package/lib/interface/location.d.ts.map +1 -1
  19. package/lib/interface/mealplan.d.ts +12 -1
  20. package/lib/interface/mealplan.d.ts.map +1 -1
  21. package/lib/interface/menu.d.ts +27 -1
  22. package/lib/interface/menu.d.ts.map +1 -1
  23. package/lib/interface/notification.d.ts +9 -2
  24. package/lib/interface/notification.d.ts.map +1 -1
  25. package/lib/interface/order.d.ts +15 -1
  26. package/lib/interface/order.d.ts.map +1 -1
  27. package/lib/interface/partner.d.ts +16 -4
  28. package/lib/interface/partner.d.ts.map +1 -1
  29. package/lib/interface/payment.d.ts +15 -1
  30. package/lib/interface/payment.d.ts.map +1 -1
  31. package/lib/interface/permission.d.ts +10 -1
  32. package/lib/interface/permission.d.ts.map +1 -1
  33. package/lib/interface/promo.d.ts +19 -2
  34. package/lib/interface/promo.d.ts.map +1 -1
  35. package/lib/interface/report.d.ts +8 -1
  36. package/lib/interface/report.d.ts.map +1 -1
  37. package/lib/interface/shoppingcart.d.ts +15 -0
  38. package/lib/interface/shoppingcart.d.ts.map +1 -1
  39. package/lib/interface/task.d.ts +11 -1
  40. package/lib/interface/task.d.ts.map +1 -1
  41. package/lib/interface/user.d.ts +33 -3
  42. package/lib/interface/user.d.ts.map +1 -1
  43. package/lib/interface/util.d.ts +12 -0
  44. package/lib/interface/util.d.ts.map +1 -1
  45. package/lib/interface/vendor.d.ts +21 -3
  46. package/lib/interface/vendor.d.ts.map +1 -1
  47. package/package.json +2 -2
  48. package/src/interface/announcement.ts +15 -5
  49. package/src/interface/calendar.ts +17 -6
  50. package/src/interface/compassconnect.ts +4 -2
  51. package/src/interface/config.ts +20 -6
  52. package/src/interface/datalake.ts +5 -2
  53. package/src/interface/email.ts +2 -1
  54. package/src/interface/file.ts +3 -1
  55. package/src/interface/kds.ts +15 -5
  56. package/src/interface/location.ts +103 -26
  57. package/src/interface/mealplan.ts +20 -5
  58. package/src/interface/menu.ts +65 -20
  59. package/src/interface/notification.ts +13 -4
  60. package/src/interface/order.ts +33 -10
  61. package/src/interface/partner.ts +18 -6
  62. package/src/interface/payment.ts +25 -6
  63. package/src/interface/permission.ts +18 -5
  64. package/src/interface/promo.ts +29 -7
  65. package/src/interface/report.ts +18 -6
  66. package/src/interface/shoppingcart.ts +23 -5
  67. package/src/interface/sms.ts +1 -1
  68. package/src/interface/task.ts +25 -8
  69. package/src/interface/user.ts +55 -14
  70. package/src/interface/util.ts +14 -1
  71. package/src/interface/vendor.ts +33 -9
@@ -1,6 +1,6 @@
1
1
  // THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
2
2
 
3
- import { RequestQuery } from "./util";
3
+ import { RequestQuery, RequestContext } from "./util";
4
4
 
5
5
  export interface Error {
6
6
  message?: string;
@@ -227,7 +227,9 @@ export interface GetUserAuthQuery {
227
227
 
228
228
  export type GetUserAuthResponse = auth;
229
229
 
230
- export interface GetUserAuthRequest extends RequestQuery<GetUserAuthQuery> {}
230
+ export interface GetUserAuthRequest extends RequestQuery<GetUserAuthQuery> {
231
+ context?: RequestContext;
232
+ }
231
233
 
232
234
  // POST /user/auth - Use refresh token to generate a new access token and refresh token
233
235
 
@@ -237,6 +239,7 @@ export type PostUserAuthResponse = auth;
237
239
 
238
240
  export interface PostUserAuthRequest {
239
241
  body: PostUserAuthBody;
242
+ context?: RequestContext;
240
243
  }
241
244
 
242
245
  // GET /user/zendesk - Get zendesk JWT token to allow web widget to search restricted articles
@@ -245,7 +248,9 @@ export interface GetUserZendeskResponse {
245
248
  token: string;
246
249
  }
247
250
 
248
- export type GetUserZendeskRequest = {};
251
+ export interface GetUserZendeskRequest {
252
+ context?: RequestContext;
253
+ }
249
254
 
250
255
  // POST /user - Create an User
251
256
 
@@ -260,6 +265,7 @@ export type PostUserResponse = User;
260
265
 
261
266
  export interface PostUserRequest extends RequestQuery<PostUserQuery> {
262
267
  body: PostUserBody;
268
+ context?: RequestContext;
263
269
  }
264
270
 
265
271
  // GET /user/{id} - Get an individual user
@@ -276,7 +282,9 @@ export interface GetUserQuery {
276
282
 
277
283
  export type GetUserResponse = User;
278
284
 
279
- export interface GetUserRequest extends RequestQuery<GetUserQuery>, GetUserPath {}
285
+ export interface GetUserRequest extends RequestQuery<GetUserQuery>, GetUserPath {
286
+ context?: RequestContext;
287
+ }
280
288
 
281
289
  // PUT /user/{id} - Update an individual user
282
290
 
@@ -296,6 +304,7 @@ export type PutUserResponse = User;
296
304
 
297
305
  export interface PutUserRequest extends RequestQuery<PutUserQuery>, PutUserPath {
298
306
  body: PutUserBody;
307
+ context?: RequestContext;
299
308
  }
300
309
 
301
310
  // PATCH /user/{id} - Update an individual user
@@ -316,6 +325,7 @@ export type PatchUserResponse = User;
316
325
 
317
326
  export interface PatchUserRequest extends RequestQuery<PatchUserQuery>, PatchUserPath {
318
327
  body: PatchUserBody;
328
+ context?: RequestContext;
319
329
  }
320
330
 
321
331
  // DELETE /user/{id} - delete an individual user
@@ -332,7 +342,9 @@ export interface DeleteUserQuery {
332
342
 
333
343
  export type DeleteUserResponse = success;
334
344
 
335
- export interface DeleteUserRequest extends RequestQuery<DeleteUserQuery>, DeleteUserPath {}
345
+ export interface DeleteUserRequest extends RequestQuery<DeleteUserQuery>, DeleteUserPath {
346
+ context?: RequestContext;
347
+ }
336
348
 
337
349
  // POST /user/device/auth - Endpoint for generating/retrieving KDS device token
338
350
 
@@ -342,6 +354,7 @@ export type PostUserKdsTokenResponse = KDSToken;
342
354
 
343
355
  export interface PostUserKdsTokenRequest {
344
356
  body: PostUserKdsTokenBody;
357
+ context?: RequestContext;
345
358
  }
346
359
 
347
360
  // GET /user/device/auth - Endpoint retrieving KDS device token
@@ -352,7 +365,9 @@ export interface GetUserKdsTokenQuery {
352
365
 
353
366
  export type GetUserKdsTokenResponse = KDSDevices;
354
367
 
355
- export interface GetUserKdsTokenRequest extends RequestQuery<GetUserKdsTokenQuery> {}
368
+ export interface GetUserKdsTokenRequest extends RequestQuery<GetUserKdsTokenQuery> {
369
+ context?: RequestContext;
370
+ }
356
371
 
357
372
  // DELETE /user/device/auth/{device_id} - Endpoint for deleting a device by specified device_id
358
373
 
@@ -363,7 +378,9 @@ export interface DeleteUserDeviceAuthPath {
363
378
 
364
379
  export type DeleteUserDeviceAuthResponse = Error;
365
380
 
366
- export interface DeleteUserDeviceAuthRequest extends DeleteUserDeviceAuthPath {}
381
+ export interface DeleteUserDeviceAuthRequest extends DeleteUserDeviceAuthPath {
382
+ context?: RequestContext;
383
+ }
367
384
 
368
385
  // PATCH /user/device/auth/{device_id} - Endpoint for authorizing device to retrieve valid kds token
369
386
 
@@ -374,7 +391,9 @@ export interface PatchUserAuthKdsPath {
374
391
 
375
392
  export type PatchUserAuthKdsResponse = KDSDevice;
376
393
 
377
- export interface PatchUserAuthKdsRequest extends PatchUserAuthKdsPath {}
394
+ export interface PatchUserAuthKdsRequest extends PatchUserAuthKdsPath {
395
+ context?: RequestContext;
396
+ }
378
397
 
379
398
  // POST /user/{id}/changepassword - Change the users password
380
399
 
@@ -389,13 +408,16 @@ export type PostUserChangePasswordResponse = User;
389
408
 
390
409
  export interface PostUserChangePasswordRequest extends PostUserChangePasswordPath {
391
410
  body: PostUserChangePasswordBody;
411
+ context?: RequestContext;
392
412
  }
393
413
 
394
414
  // DELETE /user/logout - Logs out current user
395
415
 
396
416
  export type DeleteUserLogoutResponse = success;
397
417
 
398
- export type DeleteUserLogoutRequest = {};
418
+ export interface DeleteUserLogoutRequest {
419
+ context?: RequestContext;
420
+ }
399
421
 
400
422
  // POST /user/{id}/secret/{key} - Add a secret key
401
423
 
@@ -411,6 +433,7 @@ export type PostUserAddSecretResponse = Key;
411
433
 
412
434
  export interface PostUserAddSecretRequest extends PostUserAddSecretPath {
413
435
  body: PostUserAddSecretBody;
436
+ context?: RequestContext;
414
437
  }
415
438
 
416
439
  // GET /user/{id}/secret/{key} - Get back a secret key
@@ -425,7 +448,9 @@ export interface GetUserSecretResponse {
425
448
  [index: string]: any;
426
449
  }
427
450
 
428
- export interface GetUserSecretRequest extends GetUserSecretPath {}
451
+ export interface GetUserSecretRequest extends GetUserSecretPath {
452
+ context?: RequestContext;
453
+ }
429
454
 
430
455
  // POST /user/forgotpassword - Reset the users password
431
456
 
@@ -442,6 +467,7 @@ export type PostUserResetPasswordResponse = success;
442
467
 
443
468
  export interface PostUserResetPasswordRequest extends RequestQuery<PostUserResetPasswordQuery> {
444
469
  body: PostUserResetPasswordBody;
470
+ context?: RequestContext;
445
471
  }
446
472
 
447
473
  // POST /user/{id}/resetpassword - Reset the users password using a reset token
@@ -464,6 +490,7 @@ export interface PostUserResetPasswordTokenRequest
464
490
  extends RequestQuery<PostUserResetPasswordTokenQuery>,
465
491
  PostUserResetPasswordTokenPath {
466
492
  body: PostUserResetPasswordTokenBody;
493
+ context?: RequestContext;
467
494
  }
468
495
 
469
496
  // GET /user/realm/{realm} - Get all the users in a realm
@@ -486,7 +513,9 @@ export type GetUserRealmUsersResponse = Users;
486
513
 
487
514
  export interface GetUserRealmUsersRequest
488
515
  extends RequestQuery<GetUserRealmUsersQuery>,
489
- GetUserRealmUsersPath {}
516
+ GetUserRealmUsersPath {
517
+ context?: RequestContext;
518
+ }
490
519
 
491
520
  // GET /user/{id}/permissions - Get user permissions
492
521
 
@@ -504,7 +533,9 @@ export type GetUserPermissionsResponse = User;
504
533
 
505
534
  export interface GetUserPermissionsRequest
506
535
  extends RequestQuery<GetUserPermissionsQuery>,
507
- GetUserPermissionsPath {}
536
+ GetUserPermissionsPath {
537
+ context?: RequestContext;
538
+ }
508
539
 
509
540
  // PUT /user/{id}/permissions - Update user permissions
510
541
 
@@ -528,6 +559,7 @@ export interface PutUserPermissionsRequest
528
559
  extends RequestQuery<PutUserPermissionsQuery>,
529
560
  PutUserPermissionsPath {
530
561
  body: PutUserPermissionsBody;
562
+ context?: RequestContext;
531
563
  }
532
564
 
533
565
  // POST /user/{id}/checkin - Create check-in for user
@@ -543,6 +575,7 @@ export type PostUserCheckInResponse = Checkin;
543
575
 
544
576
  export interface PostUserCheckInRequest extends PostUserCheckInPath {
545
577
  body: PostUserCheckInBody;
578
+ context?: RequestContext;
546
579
  }
547
580
 
548
581
  // PATCH /user/{id}/checkin/{checkin_id} - Update check-in
@@ -560,6 +593,7 @@ export type PatchUserCheckinResponse = Checkin;
560
593
 
561
594
  export interface PatchUserCheckinRequest extends PatchUserCheckinPath {
562
595
  body: PatchUserCheckinBody;
596
+ context?: RequestContext;
563
597
  }
564
598
 
565
599
  // GET /user/checkin/search - Search check-in
@@ -573,7 +607,9 @@ export interface GetUserSearchCheckInQuery {
573
607
 
574
608
  export type GetUserSearchCheckInResponse = Checkin;
575
609
 
576
- export interface GetUserSearchCheckInRequest extends RequestQuery<GetUserSearchCheckInQuery> {}
610
+ export interface GetUserSearchCheckInRequest extends RequestQuery<GetUserSearchCheckInQuery> {
611
+ context?: RequestContext;
612
+ }
577
613
 
578
614
  // POST /user/{id}/verification - Send email verification to user
579
615
 
@@ -584,7 +620,9 @@ export interface PostUserSendEmailVerificationPath {
584
620
 
585
621
  export type PostUserSendEmailVerificationResponse = success;
586
622
 
587
- export interface PostUserSendEmailVerificationRequest extends PostUserSendEmailVerificationPath {}
623
+ export interface PostUserSendEmailVerificationRequest extends PostUserSendEmailVerificationPath {
624
+ context?: RequestContext;
625
+ }
588
626
 
589
627
  // PUT /user/{id}/verification/confirm - Verify a users email
590
628
 
@@ -599,6 +637,7 @@ export type PutUserVerifyUserEmailResponse = success;
599
637
 
600
638
  export interface PutUserVerifyUserEmailRequest extends PutUserVerifyUserEmailPath {
601
639
  body: PutUserVerifyUserEmailBody;
640
+ context?: RequestContext;
602
641
  }
603
642
 
604
643
  // POST /user/{id}/verification/phone - Send phone verification to user
@@ -623,6 +662,7 @@ export interface PostUserVerificationPhoneRequest
623
662
  extends RequestQuery<PostUserVerificationPhoneQuery>,
624
663
  PostUserVerificationPhonePath {
625
664
  body: PostUserVerificationPhoneBody;
665
+ context?: RequestContext;
626
666
  }
627
667
 
628
668
  // PUT /user/{id}/verification/phone - Attempt phone verification for user
@@ -641,4 +681,5 @@ export type PutUserVerificationPhoneResponse = success;
641
681
 
642
682
  export interface PutUserVerificationPhoneRequest extends PutUserVerificationPhonePath {
643
683
  body: PutUserVerificationPhoneBody;
684
+ context?: RequestContext;
644
685
  }
@@ -2,5 +2,18 @@
2
2
  * Convert number query parameters to string.
3
3
  */
4
4
  export type RequestQuery<T extends object> = {
5
- [K in keyof T]: T[K] extends number|undefined ? string : T[K];
5
+ [K in keyof T]: T[K] extends number|undefined ? string : T[K];
6
+ }
7
+
8
+ /**
9
+ * Provider request context
10
+ */
11
+ export interface RequestContext {
12
+ subject: string;
13
+ user_id: string;
14
+ expiry: Date | null;
15
+ iat: Date;
16
+ scopes: string;
17
+ sub: string;
18
+ domain?: string;
6
19
  }
@@ -1,6 +1,6 @@
1
1
  // THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
2
2
 
3
- import { RequestQuery } from "./util";
3
+ import { RequestQuery, RequestContext } from "./util";
4
4
 
5
5
  export interface Error {
6
6
  message?: string;
@@ -204,6 +204,7 @@ export type PostVendorApplicationResponse = Application;
204
204
 
205
205
  export interface PostVendorApplicationRequest {
206
206
  body: PostVendorApplicationBody;
207
+ context?: RequestContext;
207
208
  }
208
209
 
209
210
  // GET /vendor/application - Get a list of all applications
@@ -216,7 +217,9 @@ export interface GetVendorApplicationQuery {
216
217
 
217
218
  export type GetVendorApplicationResponse = Applications;
218
219
 
219
- export interface GetVendorApplicationRequest extends RequestQuery<GetVendorApplicationQuery> {}
220
+ export interface GetVendorApplicationRequest extends RequestQuery<GetVendorApplicationQuery> {
221
+ context?: RequestContext;
222
+ }
220
223
 
221
224
  // PATCH /vendor/application/{id} - Update an application (or update status)
222
225
 
@@ -231,6 +234,7 @@ export type PatchVendorApplicationResponse = Application;
231
234
 
232
235
  export interface PatchVendorApplicationRequest extends PatchVendorApplicationPath {
233
236
  body: PatchVendorApplicationBody;
237
+ context?: RequestContext;
234
238
  }
235
239
 
236
240
  // POST /vendor - Create new vendor
@@ -241,13 +245,16 @@ export type PostVendorResponse = Vendor;
241
245
 
242
246
  export interface PostVendorRequest {
243
247
  body: PostVendorBody;
248
+ context?: RequestContext;
244
249
  }
245
250
 
246
251
  // GET /vendor - Get all Vendors
247
252
 
248
253
  export type GetVendorsResponse = Vendors;
249
254
 
250
- export type GetVendorsRequest = {};
255
+ export interface GetVendorsRequest {
256
+ context?: RequestContext;
257
+ }
251
258
 
252
259
  // GET /vendor/{id} - Get info about the Vendor
253
260
 
@@ -258,7 +265,9 @@ export interface GetVendorPath {
258
265
 
259
266
  export type GetVendorResponse = Vendor;
260
267
 
261
- export interface GetVendorRequest extends GetVendorPath {}
268
+ export interface GetVendorRequest extends GetVendorPath {
269
+ context?: RequestContext;
270
+ }
262
271
 
263
272
  // PATCH /vendor/{id} - Update info about the Vendor
264
273
 
@@ -273,13 +282,16 @@ export type PatchVendorResponse = Vendor;
273
282
 
274
283
  export interface PatchVendorRequest extends PatchVendorPath {
275
284
  body: PatchVendorBody;
285
+ context?: RequestContext;
276
286
  }
277
287
 
278
288
  // GET /vendor/auth - Get access/refresh tokens for accessing our APIs
279
289
 
280
290
  export type GetVendorAuthResponse = Auth;
281
291
 
282
- export type GetVendorAuthRequest = {};
292
+ export interface GetVendorAuthRequest {
293
+ context?: RequestContext;
294
+ }
283
295
 
284
296
  // POST /vendor/auth - Get new access token using refresh token and previous token
285
297
 
@@ -289,6 +301,7 @@ export type PostVendorAuthResponse = Auth;
289
301
 
290
302
  export interface PostVendorAuthRequest {
291
303
  body: PostVendorAuthBody;
304
+ context?: RequestContext;
292
305
  }
293
306
 
294
307
  // GET /vendor/{id}/key - Get list of Vendor keys
@@ -300,7 +313,9 @@ export interface GetVendorKeysPath {
300
313
 
301
314
  export type GetVendorKeysResponse = Keys;
302
315
 
303
- export interface GetVendorKeysRequest extends GetVendorKeysPath {}
316
+ export interface GetVendorKeysRequest extends GetVendorKeysPath {
317
+ context?: RequestContext;
318
+ }
304
319
 
305
320
  // POST /vendor/{id}/key - Create new key for the vendor
306
321
 
@@ -315,6 +330,7 @@ export type PostVendorKeyResponse = Key;
315
330
 
316
331
  export interface PostVendorKeyRequest extends PostVendorKeyPath {
317
332
  body: PostVendorKeyBody;
333
+ context?: RequestContext;
318
334
  }
319
335
 
320
336
  // GET /vendor/{id}/key/{key} - Get info about vendor key
@@ -333,7 +349,9 @@ export interface GetVendorKeyQuery {
333
349
 
334
350
  export type GetVendorKeyResponse = Key;
335
351
 
336
- export interface GetVendorKeyRequest extends RequestQuery<GetVendorKeyQuery>, GetVendorKeyPath {}
352
+ export interface GetVendorKeyRequest extends RequestQuery<GetVendorKeyQuery>, GetVendorKeyPath {
353
+ context?: RequestContext;
354
+ }
337
355
 
338
356
  // PATCH /vendor/{id}/key/{key} - Update info for vendor key
339
357
 
@@ -350,6 +368,7 @@ export type PatchVendorKeyResponse = Key;
350
368
 
351
369
  export interface PatchVendorKeyRequest extends PatchVendorKeyPath {
352
370
  body: PatchVendorKeyBody;
371
+ context?: RequestContext;
353
372
  }
354
373
 
355
374
  // DELETE /vendor/{id}/key/{key} - Mark key as expired
@@ -363,7 +382,9 @@ export interface DeleteVendorKeyPath {
363
382
 
364
383
  export type DeleteVendorKeyResponse = Key;
365
384
 
366
- export interface DeleteVendorKeyRequest extends DeleteVendorKeyPath {}
385
+ export interface DeleteVendorKeyRequest extends DeleteVendorKeyPath {
386
+ context?: RequestContext;
387
+ }
367
388
 
368
389
  // POST /vendor/{id}/key/{key}/rotate - Rotate vendor key
369
390
 
@@ -382,7 +403,9 @@ export type PostVendorKeyRotateResponse = Success;
382
403
 
383
404
  export interface PostVendorKeyRotateRequest
384
405
  extends RequestQuery<PostVendorKeyRotateQuery>,
385
- PostVendorKeyRotatePath {}
406
+ PostVendorKeyRotatePath {
407
+ context?: RequestContext;
408
+ }
386
409
 
387
410
  // POST /vendor/{id}/reset/password - Reset the existing password for vendor
388
411
 
@@ -397,4 +420,5 @@ export type PostVendorResetPasswordResponse = Success;
397
420
 
398
421
  export interface PostVendorResetPasswordRequest extends PostVendorResetPasswordPath {
399
422
  body: PostVendorResetPasswordBody;
423
+ context?: RequestContext;
400
424
  }