@compassdigital/sdk.typescript 3.40.0 → 3.42.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.
package/src/index.ts CHANGED
@@ -264,6 +264,7 @@ import {
264
264
  GetMealplanResponse,
265
265
  DeleteMealplanBody,
266
266
  DeleteMealplanResponse,
267
+ PostMealplanCallbackQuery,
267
268
  PostMealplanCallbackResponse,
268
269
  GetMealplanTenderQuery,
269
270
  GetMealplanTenderResponse,
@@ -456,8 +457,22 @@ import {
456
457
  } from "./interface/file";
457
458
 
458
459
  import {
459
- GetMenuModifierCountQuery,
460
- GetMenuModifierCountResponse,
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,
461
476
  GetMenuClientQuery,
462
477
  GetMenuClientResponse,
463
478
  GetMenusQuery,
@@ -3068,7 +3083,9 @@ export class ServiceClient extends BaseServiceClient {
3068
3083
  */
3069
3084
  post_mealplan_callback(
3070
3085
  id: string,
3071
- options?: RequestOptions
3086
+ options?: {
3087
+ query?: PostMealplanCallbackQuery;
3088
+ } & RequestOptions
3072
3089
  ): ResponsePromise<PostMealplanCallbackResponse> {
3073
3090
  return this.request(
3074
3091
  "mealplan",
@@ -4637,20 +4654,198 @@ export class ServiceClient extends BaseServiceClient {
4637
4654
  }
4638
4655
 
4639
4656
  /**
4640
- * GET /menu/modifier/count
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
4641
4836
  *
4642
4837
  * @param options - additional request options
4643
4838
  */
4644
- get_menu_modifier_count(
4839
+ get_menu_v2_modifier_group_count(
4645
4840
  options?: {
4646
- query?: GetMenuModifierCountQuery;
4841
+ query?: GetMenuV2ModifierGroupCountQuery;
4647
4842
  } & RequestOptions
4648
- ): ResponsePromise<GetMenuModifierCountResponse> {
4843
+ ): ResponsePromise<GetMenuV2ModifierGroupCountResponse> {
4649
4844
  return this.request(
4650
4845
  "menu",
4651
- "get_menu_modifier_count",
4846
+ "get_menu_v2_modifier_group_count",
4652
4847
  "get",
4653
- `/menu/modifier/count`,
4848
+ `/menu/v2/modifier-group/count`,
4654
4849
  null,
4655
4850
  options
4656
4851
  );
@@ -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,57 @@
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
+ is_active?: boolean;
36
+ is_in_stock?: boolean;
37
+ created_at?: string;
38
+ updated_at?: string;
39
+ deleted_at?: string;
40
+ [index: string]: any;
41
+ }
42
+
43
+ export interface ModifierGroup {
44
+ id?: string;
45
+ name?: string;
46
+ label?: string;
47
+ min?: number;
48
+ max?: number;
49
+ is_active?: boolean;
50
+ created_at?: string;
51
+ updated_at?: string;
52
+ deleted_at?: string;
53
+ [index: string]: any;
54
+ }
55
+
5
56
  export interface Menu {
6
57
  // menu
7
58
  id?: string;
@@ -299,20 +350,131 @@ export interface ZippedExcelExport {
299
350
  format?: string;
300
351
  }
301
352
 
302
- // GET /menu/modifier/count
353
+ // GET /menu/v2/modifiers
354
+
355
+ export interface GetMenuV2ModifiersQuery {
356
+ // Graphql query string
357
+ _query?: string;
358
+ }
359
+
360
+ export type GetMenuV2ModifiersResponse = ModifiersListResponse;
361
+
362
+ export interface GetMenuV2ModifiersRequest
363
+ extends BaseRequest,
364
+ RequestQuery<GetMenuV2ModifiersQuery> {}
365
+
366
+ // GET /menu/v2/modifier/{id}
367
+
368
+ export interface GetMenuV2ModifierPath {
369
+ id: string;
370
+ }
371
+
372
+ export interface GetMenuV2ModifierQuery {
373
+ // Graphql query string
374
+ _query?: string;
375
+ }
376
+
377
+ export type GetMenuV2ModifierResponse = Modifier;
378
+
379
+ export interface GetMenuV2ModifierRequest
380
+ extends BaseRequest,
381
+ RequestQuery<GetMenuV2ModifierQuery>,
382
+ GetMenuV2ModifierPath {}
383
+
384
+ // PATCH /menu/v2/modifier/{id}
385
+
386
+ export interface PatchMenuV2ModifierPath {
387
+ id: string;
388
+ }
389
+
390
+ export type PatchMenuV2ModifierResponse = Modifier;
391
+
392
+ export interface PatchMenuV2ModifierRequest extends BaseRequest, PatchMenuV2ModifierPath {}
393
+
394
+ // POST /menu/v2/modifier
395
+
396
+ export type PostMenuV2ModifierResponse = Modifier;
397
+
398
+ export interface PostMenuV2ModifierRequest extends BaseRequest {}
399
+
400
+ // GET /menu/v2/modifier/count
401
+
402
+ export interface GetMenuV2ModifierCountQuery {
403
+ // Graphql query string
404
+ _query?: string;
405
+ }
406
+
407
+ export interface GetMenuV2ModifierCountResponse {
408
+ count?: number;
409
+ }
410
+
411
+ export interface GetMenuV2ModifierCountRequest
412
+ extends BaseRequest,
413
+ RequestQuery<GetMenuV2ModifierCountQuery> {}
414
+
415
+ // GET /menu/v2/modifier-groups
416
+
417
+ export interface GetMenuV2ModifierGroupsQuery {
418
+ // Graphql query string
419
+ _query?: string;
420
+ }
421
+
422
+ export type GetMenuV2ModifierGroupsResponse = ModifierGroupsListResponse;
423
+
424
+ export interface GetMenuV2ModifierGroupsRequest
425
+ extends BaseRequest,
426
+ RequestQuery<GetMenuV2ModifierGroupsQuery> {}
427
+
428
+ // POST /menu/v2/modifier-group
429
+
430
+ export type PostMenuV2ModifierGroupResponse = Modifier;
431
+
432
+ export interface PostMenuV2ModifierGroupRequest extends BaseRequest {}
433
+
434
+ // GET /menu/v2/modifier-group/{id}
435
+
436
+ export interface GetMenuV2ModifierGroupPath {
437
+ id: string;
438
+ }
439
+
440
+ export interface GetMenuV2ModifierGroupQuery {
441
+ // Graphql query string
442
+ _query?: string;
443
+ }
444
+
445
+ export type GetMenuV2ModifierGroupResponse = Modifier;
446
+
447
+ export interface GetMenuV2ModifierGroupRequest
448
+ extends BaseRequest,
449
+ RequestQuery<GetMenuV2ModifierGroupQuery>,
450
+ GetMenuV2ModifierGroupPath {}
451
+
452
+ // PATCH /menu/v2/modifier-group/{id}
453
+
454
+ export interface PatchMenuV2ModifierGroupPath {
455
+ id: string;
456
+ }
457
+
458
+ export type PatchMenuV2ModifierGroupResponse = Modifier;
459
+
460
+ export interface PatchMenuV2ModifierGroupRequest
461
+ extends BaseRequest,
462
+ PatchMenuV2ModifierGroupPath {}
463
+
464
+ // GET /menu/v2/modifier-group/count
303
465
 
304
- export interface GetMenuModifierCountQuery {
466
+ export interface GetMenuV2ModifierGroupCountQuery {
305
467
  // Graphql query string
306
468
  _query?: string;
307
469
  }
308
470
 
309
- export interface GetMenuModifierCountResponse {
471
+ export interface GetMenuV2ModifierGroupCountResponse {
310
472
  count?: number;
311
473
  }
312
474
 
313
- export interface GetMenuModifierCountRequest
475
+ export interface GetMenuV2ModifierGroupCountRequest
314
476
  extends BaseRequest,
315
- RequestQuery<GetMenuModifierCountQuery> {}
477
+ RequestQuery<GetMenuV2ModifierGroupCountQuery> {}
316
478
 
317
479
  // GET /menu/client/{client_id} - Get menu client
318
480
 
@@ -454,8 +454,6 @@ export interface WaitTime {
454
454
  max: number;
455
455
  // minimum wait time to the next time slot in minutes
456
456
  min: number;
457
- // the epoch timestamp of the next available ready time for a station
458
- ready_time: number;
459
457
  }
460
458
 
461
459
  export interface Menu {