@compassdigital/sdk.typescript 3.39.0 → 3.41.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 (65) hide show
  1. package/lib/base.d.ts +3 -3
  2. package/lib/base.d.ts.map +1 -1
  3. package/lib/index.d.ts +83 -6
  4. package/lib/index.d.ts.map +1 -1
  5. package/lib/index.js +86 -3
  6. package/lib/index.js.map +1 -1
  7. package/lib/interface/announcement.d.ts +8 -8
  8. package/lib/interface/announcement.d.ts.map +1 -1
  9. package/lib/interface/calendar.d.ts +6 -6
  10. package/lib/interface/calendar.d.ts.map +1 -1
  11. package/lib/interface/compassconnect.d.ts +1 -1
  12. package/lib/interface/compassconnect.d.ts.map +1 -1
  13. package/lib/interface/config.d.ts +14 -14
  14. package/lib/interface/config.d.ts.map +1 -1
  15. package/lib/interface/datalake.d.ts +2 -2
  16. package/lib/interface/datalake.d.ts.map +1 -1
  17. package/lib/interface/email.d.ts +2 -2
  18. package/lib/interface/email.d.ts.map +1 -1
  19. package/lib/interface/file.d.ts +1 -1
  20. package/lib/interface/file.d.ts.map +1 -1
  21. package/lib/interface/kds.d.ts +7 -7
  22. package/lib/interface/kds.d.ts.map +1 -1
  23. package/lib/interface/location.d.ts +72 -70
  24. package/lib/interface/location.d.ts.map +1 -1
  25. package/lib/interface/loyalty.d.ts +11 -11
  26. package/lib/interface/loyalty.d.ts.map +1 -1
  27. package/lib/interface/mealplan.d.ts +15 -9
  28. package/lib/interface/mealplan.d.ts.map +1 -1
  29. package/lib/interface/menu.d.ts +144 -36
  30. package/lib/interface/menu.d.ts.map +1 -1
  31. package/lib/interface/notification.d.ts +7 -7
  32. package/lib/interface/notification.d.ts.map +1 -1
  33. package/lib/interface/order.d.ts +19 -16
  34. package/lib/interface/order.d.ts.map +1 -1
  35. package/lib/interface/partner.d.ts +451 -420
  36. package/lib/interface/partner.d.ts.map +1 -1
  37. package/lib/interface/payment.d.ts +12 -13
  38. package/lib/interface/payment.d.ts.map +1 -1
  39. package/lib/interface/permission.d.ts +14 -14
  40. package/lib/interface/permission.d.ts.map +1 -1
  41. package/lib/interface/promo.d.ts +25 -25
  42. package/lib/interface/promo.d.ts.map +1 -1
  43. package/lib/interface/report.d.ts +9 -9
  44. package/lib/interface/report.d.ts.map +1 -1
  45. package/lib/interface/shoppingcart.d.ts +142 -85
  46. package/lib/interface/shoppingcart.d.ts.map +1 -1
  47. package/lib/interface/task.d.ts +13 -13
  48. package/lib/interface/task.d.ts.map +1 -1
  49. package/lib/interface/user.d.ts +58 -44
  50. package/lib/interface/user.d.ts.map +1 -1
  51. package/lib/interface/util.d.ts +1 -1
  52. package/lib/interface/util.d.ts.map +1 -1
  53. package/lib/interface/vendor.d.ts +24 -24
  54. package/lib/interface/vendor.d.ts.map +1 -1
  55. package/package.json +10 -5
  56. package/pipeline.yml +13 -0
  57. package/src/index.ts +219 -5
  58. package/src/interface/location.ts +8 -6
  59. package/src/interface/mealplan.ts +12 -1
  60. package/src/interface/menu.ts +175 -0
  61. package/src/interface/order.ts +4 -0
  62. package/src/interface/partner.ts +507 -469
  63. package/src/interface/payment.ts +2 -4
  64. package/src/interface/shoppingcart.ts +141 -72
  65. package/src/interface/user.ts +15 -0
package/src/index.ts CHANGED
@@ -154,7 +154,6 @@ import {
154
154
  GetLocationBrandResponse,
155
155
  PatchLocationBrandBody,
156
156
  PatchLocationBrandResponse,
157
- DeleteLocationBrandBody,
158
157
  DeleteLocationBrandResponse,
159
158
  PutLocationBrandBody,
160
159
  PutLocationBrandResponse,
@@ -265,6 +264,7 @@ import {
265
264
  GetMealplanResponse,
266
265
  DeleteMealplanBody,
267
266
  DeleteMealplanResponse,
267
+ PostMealplanCallbackQuery,
268
268
  PostMealplanCallbackResponse,
269
269
  GetMealplanTenderQuery,
270
270
  GetMealplanTenderResponse,
@@ -457,6 +457,22 @@ import {
457
457
  } from "./interface/file";
458
458
 
459
459
  import {
460
+ GetMenuV2ModifiersQuery,
461
+ GetMenuV2ModifiersResponse,
462
+ GetMenuV2ModifierQuery,
463
+ GetMenuV2ModifierResponse,
464
+ PatchMenuV2ModifierResponse,
465
+ PostMenuV2ModifierResponse,
466
+ GetMenuV2ModifierCountQuery,
467
+ GetMenuV2ModifierCountResponse,
468
+ GetMenuV2ModifierGroupsQuery,
469
+ GetMenuV2ModifierGroupsResponse,
470
+ PostMenuV2ModifierGroupResponse,
471
+ GetMenuV2ModifierGroupQuery,
472
+ GetMenuV2ModifierGroupResponse,
473
+ PatchMenuV2ModifierGroupResponse,
474
+ GetMenuV2ModifierGroupCountQuery,
475
+ GetMenuV2ModifierGroupCountResponse,
460
476
  GetMenuClientQuery,
461
477
  GetMenuClientResponse,
462
478
  GetMenusQuery,
@@ -2112,12 +2128,10 @@ export class ServiceClient extends BaseServiceClient {
2112
2128
  * DELETE /location/brand/{id} - Delete data from a Brand
2113
2129
  *
2114
2130
  * @param id - Brand ID
2115
- * @param body
2116
2131
  * @param options - additional request options
2117
2132
  */
2118
2133
  delete_location_brand(
2119
2134
  id: string,
2120
- body: DeleteLocationBrandBody,
2121
2135
  options?: RequestOptions
2122
2136
  ): ResponsePromise<DeleteLocationBrandResponse> {
2123
2137
  return this.request(
@@ -2125,7 +2139,7 @@ export class ServiceClient extends BaseServiceClient {
2125
2139
  "delete_location_brand",
2126
2140
  "delete",
2127
2141
  `/location/brand/${id}`,
2128
- body,
2142
+ null,
2129
2143
  options
2130
2144
  );
2131
2145
  }
@@ -3069,7 +3083,9 @@ export class ServiceClient extends BaseServiceClient {
3069
3083
  */
3070
3084
  post_mealplan_callback(
3071
3085
  id: string,
3072
- options?: RequestOptions
3086
+ options?: {
3087
+ query?: PostMealplanCallbackQuery;
3088
+ } & RequestOptions
3073
3089
  ): ResponsePromise<PostMealplanCallbackResponse> {
3074
3090
  return this.request(
3075
3091
  "mealplan",
@@ -4637,6 +4653,204 @@ export class ServiceClient extends BaseServiceClient {
4637
4653
  return this.request("file", "delete_file", "delete", `/file`, body, options);
4638
4654
  }
4639
4655
 
4656
+ /**
4657
+ * GET /menu/v2/modifiers
4658
+ *
4659
+ * @param options - additional request options
4660
+ */
4661
+ get_menu_v2_modifiers(
4662
+ options?: {
4663
+ query?: GetMenuV2ModifiersQuery;
4664
+ } & RequestOptions
4665
+ ): ResponsePromise<GetMenuV2ModifiersResponse> {
4666
+ return this.request(
4667
+ "menu",
4668
+ "get_menu_v2_modifiers",
4669
+ "get",
4670
+ `/menu/v2/modifiers`,
4671
+ null,
4672
+ options
4673
+ );
4674
+ }
4675
+
4676
+ /**
4677
+ * GET /menu/v2/modifier/{id}
4678
+ *
4679
+ * @param id
4680
+ * @param options - additional request options
4681
+ */
4682
+ get_menu_v2_modifier(
4683
+ id: string,
4684
+ options?: {
4685
+ query?: GetMenuV2ModifierQuery;
4686
+ } & RequestOptions
4687
+ ): ResponsePromise<GetMenuV2ModifierResponse> {
4688
+ return this.request(
4689
+ "menu",
4690
+ "get_menu_v2_modifier",
4691
+ "get",
4692
+ `/menu/v2/modifier/${id}`,
4693
+ null,
4694
+ options
4695
+ );
4696
+ }
4697
+
4698
+ /**
4699
+ * PATCH /menu/v2/modifier/{id}
4700
+ *
4701
+ * @param id
4702
+ * @param options - additional request options
4703
+ */
4704
+ patch_menu_v2_modifier(
4705
+ id: string,
4706
+ options?: RequestOptions
4707
+ ): ResponsePromise<PatchMenuV2ModifierResponse> {
4708
+ return this.request(
4709
+ "menu",
4710
+ "patch_menu_v2_modifier",
4711
+ "patch",
4712
+ `/menu/v2/modifier/${id}`,
4713
+ null,
4714
+ options
4715
+ );
4716
+ }
4717
+
4718
+ /**
4719
+ * POST /menu/v2/modifier
4720
+ *
4721
+ * @param options - additional request options
4722
+ */
4723
+ post_menu_v2_modifier(options?: RequestOptions): ResponsePromise<PostMenuV2ModifierResponse> {
4724
+ return this.request(
4725
+ "menu",
4726
+ "post_menu_v2_modifier",
4727
+ "post",
4728
+ `/menu/v2/modifier`,
4729
+ null,
4730
+ options
4731
+ );
4732
+ }
4733
+
4734
+ /**
4735
+ * GET /menu/v2/modifier/count
4736
+ *
4737
+ * @param options - additional request options
4738
+ */
4739
+ get_menu_v2_modifier_count(
4740
+ options?: {
4741
+ query?: GetMenuV2ModifierCountQuery;
4742
+ } & RequestOptions
4743
+ ): ResponsePromise<GetMenuV2ModifierCountResponse> {
4744
+ return this.request(
4745
+ "menu",
4746
+ "get_menu_v2_modifier_count",
4747
+ "get",
4748
+ `/menu/v2/modifier/count`,
4749
+ null,
4750
+ options
4751
+ );
4752
+ }
4753
+
4754
+ /**
4755
+ * GET /menu/v2/modifier-groups
4756
+ *
4757
+ * @param options - additional request options
4758
+ */
4759
+ get_menu_v2_modifier_groups(
4760
+ options?: {
4761
+ query?: GetMenuV2ModifierGroupsQuery;
4762
+ } & RequestOptions
4763
+ ): ResponsePromise<GetMenuV2ModifierGroupsResponse> {
4764
+ return this.request(
4765
+ "menu",
4766
+ "get_menu_v2_modifier_groups",
4767
+ "get",
4768
+ `/menu/v2/modifier-groups`,
4769
+ null,
4770
+ options
4771
+ );
4772
+ }
4773
+
4774
+ /**
4775
+ * POST /menu/v2/modifier-group
4776
+ *
4777
+ * @param options - additional request options
4778
+ */
4779
+ post_menu_v2_modifier_group(
4780
+ options?: RequestOptions
4781
+ ): ResponsePromise<PostMenuV2ModifierGroupResponse> {
4782
+ return this.request(
4783
+ "menu",
4784
+ "post_menu_v2_modifier_group",
4785
+ "post",
4786
+ `/menu/v2/modifier-group`,
4787
+ null,
4788
+ options
4789
+ );
4790
+ }
4791
+
4792
+ /**
4793
+ * GET /menu/v2/modifier-group/{id}
4794
+ *
4795
+ * @param id
4796
+ * @param options - additional request options
4797
+ */
4798
+ get_menu_v2_modifier_group(
4799
+ id: string,
4800
+ options?: {
4801
+ query?: GetMenuV2ModifierGroupQuery;
4802
+ } & RequestOptions
4803
+ ): ResponsePromise<GetMenuV2ModifierGroupResponse> {
4804
+ return this.request(
4805
+ "menu",
4806
+ "get_menu_v2_modifier_group",
4807
+ "get",
4808
+ `/menu/v2/modifier-group/${id}`,
4809
+ null,
4810
+ options
4811
+ );
4812
+ }
4813
+
4814
+ /**
4815
+ * PATCH /menu/v2/modifier-group/{id}
4816
+ *
4817
+ * @param id
4818
+ * @param options - additional request options
4819
+ */
4820
+ patch_menu_v2_modifier_group(
4821
+ id: string,
4822
+ options?: RequestOptions
4823
+ ): ResponsePromise<PatchMenuV2ModifierGroupResponse> {
4824
+ return this.request(
4825
+ "menu",
4826
+ "patch_menu_v2_modifier_group",
4827
+ "patch",
4828
+ `/menu/v2/modifier-group/${id}`,
4829
+ null,
4830
+ options
4831
+ );
4832
+ }
4833
+
4834
+ /**
4835
+ * GET /menu/v2/modifier-group/count
4836
+ *
4837
+ * @param options - additional request options
4838
+ */
4839
+ get_menu_v2_modifier_group_count(
4840
+ options?: {
4841
+ query?: GetMenuV2ModifierGroupCountQuery;
4842
+ } & RequestOptions
4843
+ ): ResponsePromise<GetMenuV2ModifierGroupCountResponse> {
4844
+ return this.request(
4845
+ "menu",
4846
+ "get_menu_v2_modifier_group_count",
4847
+ "get",
4848
+ `/menu/v2/modifier-group/count`,
4849
+ null,
4850
+ options
4851
+ );
4852
+ }
4853
+
4640
4854
  /**
4641
4855
  * GET /menu/client/{client_id} - Get menu client
4642
4856
  *
@@ -309,6 +309,10 @@ export interface MultiGroup {
309
309
  [index: string]: any;
310
310
  }
311
311
 
312
+ export interface success {
313
+ success?: boolean;
314
+ }
315
+
312
316
  export interface Error {
313
317
  error?: string;
314
318
  code?: number;
@@ -437,6 +441,8 @@ export interface WaitTime {
437
441
  max: number;
438
442
  // minimum wait time to the next time slot in minutes
439
443
  min: number;
444
+ // the epoch timestamp of the next available ready time for a station
445
+ ready_time: number;
440
446
  }
441
447
 
442
448
  // POST /location - Create a new location
@@ -1234,13 +1240,9 @@ export interface DeleteLocationBrandPath {
1234
1240
  id: string;
1235
1241
  }
1236
1242
 
1237
- export type DeleteLocationBrandBody = Brand;
1243
+ export type DeleteLocationBrandResponse = success;
1238
1244
 
1239
- export type DeleteLocationBrandResponse = Brand;
1240
-
1241
- export interface DeleteLocationBrandRequest extends BaseRequest, DeleteLocationBrandPath {
1242
- body: DeleteLocationBrandBody;
1243
- }
1245
+ export interface DeleteLocationBrandRequest extends BaseRequest, DeleteLocationBrandPath {}
1244
1246
 
1245
1247
  // PUT /location/brand/{id} - Update location brand
1246
1248
 
@@ -5,6 +5,9 @@ import { RequestQuery, BaseRequest } from "./util";
5
5
  export interface Error {
6
6
  code?: number;
7
7
  message?: string;
8
+ headers?: {
9
+ Location?: string;
10
+ };
8
11
  }
9
12
 
10
13
  export interface Tender {
@@ -142,13 +145,21 @@ export interface PostMealplanCallbackPath {
142
145
  id: string;
143
146
  }
144
147
 
148
+ export interface PostMealplanCallbackQuery {
149
+ // Determines whether the request originates from a web client or not
150
+ web?: boolean;
151
+ }
152
+
145
153
  export interface PostMealplanCallbackResponse {
146
154
  token?: string;
147
155
  // DH 1.0 format for returning the token
148
156
  cardNumber?: string;
149
157
  }
150
158
 
151
- export interface PostMealplanCallbackRequest extends BaseRequest, PostMealplanCallbackPath {}
159
+ export interface PostMealplanCallbackRequest
160
+ extends BaseRequest,
161
+ RequestQuery<PostMealplanCallbackQuery>,
162
+ PostMealplanCallbackPath {}
152
163
 
153
164
  // GET /mealplan/{id}/tender/{tender} - Check the user's tender balance
154
165
 
@@ -2,6 +2,55 @@
2
2
 
3
3
  import { RequestQuery, BaseRequest } from "./util";
4
4
 
5
+ export interface ModifiersListResponse {
6
+ meta?: Meta;
7
+ results?: Modifier[];
8
+ }
9
+
10
+ export interface ModifierGroupsListResponse {
11
+ meta?: Meta;
12
+ results?: ModifierGroup[];
13
+ }
14
+
15
+ export interface Meta {
16
+ limit?: number;
17
+ page?: number;
18
+ sort_by?: string;
19
+ sort_order?: string;
20
+ search?: string;
21
+ total_results?: number;
22
+ total_pages?: number;
23
+ result_count?: number;
24
+ [index: string]: any;
25
+ }
26
+
27
+ export interface Modifier {
28
+ id?: string;
29
+ name?: string;
30
+ description?: string;
31
+ price?: number;
32
+ calories?: number;
33
+ posid?: string;
34
+ tax_tags?: string[];
35
+ barcode?: string;
36
+ is_active?: boolean;
37
+ is_in_stock?: boolean;
38
+ created_at?: string;
39
+ updated_at?: string;
40
+ deleted_at?: string;
41
+ [index: string]: any;
42
+ }
43
+
44
+ export interface ModifierGroup {
45
+ id?: string;
46
+ name?: string;
47
+ label?: string;
48
+ created_at?: string;
49
+ updated_at?: string;
50
+ deleted_at?: string;
51
+ [index: string]: any;
52
+ }
53
+
5
54
  export interface Menu {
6
55
  // menu
7
56
  id?: string;
@@ -299,6 +348,132 @@ export interface ZippedExcelExport {
299
348
  format?: string;
300
349
  }
301
350
 
351
+ // GET /menu/v2/modifiers
352
+
353
+ export interface GetMenuV2ModifiersQuery {
354
+ // Graphql query string
355
+ _query?: string;
356
+ }
357
+
358
+ export type GetMenuV2ModifiersResponse = ModifiersListResponse;
359
+
360
+ export interface GetMenuV2ModifiersRequest
361
+ extends BaseRequest,
362
+ RequestQuery<GetMenuV2ModifiersQuery> {}
363
+
364
+ // GET /menu/v2/modifier/{id}
365
+
366
+ export interface GetMenuV2ModifierPath {
367
+ id: string;
368
+ }
369
+
370
+ export interface GetMenuV2ModifierQuery {
371
+ // Graphql query string
372
+ _query?: string;
373
+ }
374
+
375
+ export type GetMenuV2ModifierResponse = Modifier;
376
+
377
+ export interface GetMenuV2ModifierRequest
378
+ extends BaseRequest,
379
+ RequestQuery<GetMenuV2ModifierQuery>,
380
+ GetMenuV2ModifierPath {}
381
+
382
+ // PATCH /menu/v2/modifier/{id}
383
+
384
+ export interface PatchMenuV2ModifierPath {
385
+ id: string;
386
+ }
387
+
388
+ export type PatchMenuV2ModifierResponse = Modifier;
389
+
390
+ export interface PatchMenuV2ModifierRequest extends BaseRequest, PatchMenuV2ModifierPath {}
391
+
392
+ // POST /menu/v2/modifier
393
+
394
+ export type PostMenuV2ModifierResponse = Modifier;
395
+
396
+ export interface PostMenuV2ModifierRequest extends BaseRequest {}
397
+
398
+ // GET /menu/v2/modifier/count
399
+
400
+ export interface GetMenuV2ModifierCountQuery {
401
+ // Graphql query string
402
+ _query?: string;
403
+ }
404
+
405
+ export interface GetMenuV2ModifierCountResponse {
406
+ count?: number;
407
+ }
408
+
409
+ export interface GetMenuV2ModifierCountRequest
410
+ extends BaseRequest,
411
+ RequestQuery<GetMenuV2ModifierCountQuery> {}
412
+
413
+ // GET /menu/v2/modifier-groups
414
+
415
+ export interface GetMenuV2ModifierGroupsQuery {
416
+ // Graphql query string
417
+ _query?: string;
418
+ }
419
+
420
+ export type GetMenuV2ModifierGroupsResponse = ModifierGroupsListResponse;
421
+
422
+ export interface GetMenuV2ModifierGroupsRequest
423
+ extends BaseRequest,
424
+ RequestQuery<GetMenuV2ModifierGroupsQuery> {}
425
+
426
+ // POST /menu/v2/modifier-group
427
+
428
+ export type PostMenuV2ModifierGroupResponse = Modifier;
429
+
430
+ export interface PostMenuV2ModifierGroupRequest extends BaseRequest {}
431
+
432
+ // GET /menu/v2/modifier-group/{id}
433
+
434
+ export interface GetMenuV2ModifierGroupPath {
435
+ id: string;
436
+ }
437
+
438
+ export interface GetMenuV2ModifierGroupQuery {
439
+ // Graphql query string
440
+ _query?: string;
441
+ }
442
+
443
+ export type GetMenuV2ModifierGroupResponse = Modifier;
444
+
445
+ export interface GetMenuV2ModifierGroupRequest
446
+ extends BaseRequest,
447
+ RequestQuery<GetMenuV2ModifierGroupQuery>,
448
+ GetMenuV2ModifierGroupPath {}
449
+
450
+ // PATCH /menu/v2/modifier-group/{id}
451
+
452
+ export interface PatchMenuV2ModifierGroupPath {
453
+ id: string;
454
+ }
455
+
456
+ export type PatchMenuV2ModifierGroupResponse = Modifier;
457
+
458
+ export interface PatchMenuV2ModifierGroupRequest
459
+ extends BaseRequest,
460
+ PatchMenuV2ModifierGroupPath {}
461
+
462
+ // GET /menu/v2/modifier-group/count
463
+
464
+ export interface GetMenuV2ModifierGroupCountQuery {
465
+ // Graphql query string
466
+ _query?: string;
467
+ }
468
+
469
+ export interface GetMenuV2ModifierGroupCountResponse {
470
+ count?: number;
471
+ }
472
+
473
+ export interface GetMenuV2ModifierGroupCountRequest
474
+ extends BaseRequest,
475
+ RequestQuery<GetMenuV2ModifierGroupCountQuery> {}
476
+
302
477
  // GET /menu/client/{client_id} - Get menu client
303
478
 
304
479
  export interface GetMenuClientPath {
@@ -144,6 +144,8 @@ export interface Order {
144
144
  amount?: number;
145
145
  meals?: number;
146
146
  };
147
+ // the amount remaining on the transaction after refund - remaining amount available for refund
148
+ transaction_remainder_amount?: number;
147
149
  [index: string]: any;
148
150
  };
149
151
  // Shoppingcart details
@@ -172,6 +174,8 @@ export interface RefundTransaction {
172
174
  refund_date?: string;
173
175
  // user
174
176
  issued_by?: string;
177
+ amount?: number;
178
+ refund_amount?: number;
175
179
  [index: string]: any;
176
180
  }
177
181