@compassdigital/sdk.typescript 3.44.3 → 3.45.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.
@@ -17,11 +17,31 @@ export interface ItemsListResponse {
17
17
  results?: LocalItem[];
18
18
  }
19
19
 
20
+ export interface MenuV2ListResponse {
21
+ meta?: Meta;
22
+ results?: MenuV2[];
23
+ }
24
+
25
+ export interface LayoutListResponse {
26
+ meta?: Meta;
27
+ results?: Layout[];
28
+ }
29
+
30
+ export interface CategoryListResponse {
31
+ meta?: Meta;
32
+ results?: Category[];
33
+ }
34
+
20
35
  export interface ItemToModifierGroupRelationshipListResponse {
21
36
  meta?: Meta;
22
37
  results?: ItemToModifierGroupRelationship[];
23
38
  }
24
39
 
40
+ export interface CategoryToItemRelationshipListResponse {
41
+ meta?: Meta;
42
+ results?: CategoryToItemRelationship[];
43
+ }
44
+
25
45
  export interface ModifierGroupToModifierRelationshipListResponse {
26
46
  meta?: Meta;
27
47
  results?: ModifierGroupToModifierRelationship[];
@@ -87,6 +107,36 @@ export interface LocalItem {
87
107
  [index: string]: any;
88
108
  }
89
109
 
110
+ export interface MenuV2 {
111
+ id?: string;
112
+ name?: string;
113
+ created_at?: string;
114
+ updated_at?: string;
115
+ deleted_at?: string;
116
+ [index: string]: any;
117
+ }
118
+
119
+ export interface Layout {
120
+ id?: string;
121
+ name?: string;
122
+ created_at?: string;
123
+ updated_at?: string;
124
+ deleted_at?: string;
125
+ [index: string]: any;
126
+ }
127
+
128
+ export interface Category {
129
+ id?: string;
130
+ name?: string;
131
+ label?: string;
132
+ sequence?: number;
133
+ is_active?: boolean;
134
+ created_at?: string;
135
+ updated_at?: string;
136
+ deleted_at?: string;
137
+ [index: string]: any;
138
+ }
139
+
90
140
  export interface ItemToModifierGroupRelationship {
91
141
  id?: string;
92
142
  item?: Item;
@@ -100,6 +150,19 @@ export interface ItemToModifierGroupRelationship {
100
150
  [index: string]: any;
101
151
  }
102
152
 
153
+ export interface CategoryToItemRelationship {
154
+ id?: string;
155
+ item?: Item;
156
+ item_id?: string;
157
+ category?: Category;
158
+ category_id?: string;
159
+ sequence?: number;
160
+ created_at?: string;
161
+ updated_at?: string;
162
+ deleted_at?: string;
163
+ [index: string]: any;
164
+ }
165
+
103
166
  export interface ModifierGroupToModifierRelationship {
104
167
  id?: string;
105
168
  modifier?: Modifier;
@@ -731,6 +794,293 @@ export interface DeleteMenuV2ItemRelationshipsModifierGroupRequest
731
794
  extends BaseRequest,
732
795
  DeleteMenuV2ItemRelationshipsModifierGroupPath {}
733
796
 
797
+ // GET /menu/v2/menus
798
+
799
+ export interface GetMenuV2MenusQuery {
800
+ // Graphql query string
801
+ _query?: string;
802
+ }
803
+
804
+ export type GetMenuV2MenusResponse = MenuV2ListResponse;
805
+
806
+ export interface GetMenuV2MenusRequest extends BaseRequest, RequestQuery<GetMenuV2MenusQuery> {}
807
+
808
+ // GET /menu/v2/menu/{id}
809
+
810
+ export interface GetMenuV2MenuPath {
811
+ id: string;
812
+ }
813
+
814
+ export interface GetMenuV2MenuQuery {
815
+ // Graphql query string
816
+ _query?: string;
817
+ }
818
+
819
+ export type GetMenuV2MenuResponse = MenuV2;
820
+
821
+ export interface GetMenuV2MenuRequest
822
+ extends BaseRequest,
823
+ RequestQuery<GetMenuV2MenuQuery>,
824
+ GetMenuV2MenuPath {}
825
+
826
+ // PATCH /menu/v2/menu/{id}
827
+
828
+ export interface PatchMenuV2MenuPath {
829
+ id: string;
830
+ }
831
+
832
+ export type PatchMenuV2MenuBody = MenuV2;
833
+
834
+ export type PatchMenuV2MenuResponse = MenuV2;
835
+
836
+ export interface PatchMenuV2MenuRequest extends BaseRequest, PatchMenuV2MenuPath {
837
+ body: PatchMenuV2MenuBody;
838
+ }
839
+
840
+ // DELETE /menu/v2/menu/{id}
841
+
842
+ export interface DeleteMenuV2MenuPath {
843
+ id: string;
844
+ }
845
+
846
+ export type DeleteMenuV2MenuResponse = MenuV2;
847
+
848
+ export interface DeleteMenuV2MenuRequest extends BaseRequest, DeleteMenuV2MenuPath {}
849
+
850
+ // POST /menu/v2/menu
851
+
852
+ export type PostMenuV2MenuBody = MenuV2;
853
+
854
+ export type PostMenuV2MenuResponse = MenuV2;
855
+
856
+ export interface PostMenuV2MenuRequest extends BaseRequest {
857
+ body: PostMenuV2MenuBody;
858
+ }
859
+
860
+ // GET /menu/v2/menus/count
861
+
862
+ export interface GetMenuV2MenusCountQuery {
863
+ // Graphql query string
864
+ _query?: string;
865
+ }
866
+
867
+ export interface GetMenuV2MenusCountResponse {
868
+ count?: number;
869
+ }
870
+
871
+ export interface GetMenuV2MenusCountRequest
872
+ extends BaseRequest,
873
+ RequestQuery<GetMenuV2MenusCountQuery> {}
874
+
875
+ // GET /menu/v2/layouts
876
+
877
+ export interface GetMenuV2LayoutsQuery {
878
+ // Graphql query string
879
+ _query?: string;
880
+ }
881
+
882
+ export type GetMenuV2LayoutsResponse = LayoutListResponse;
883
+
884
+ export interface GetMenuV2LayoutsRequest extends BaseRequest, RequestQuery<GetMenuV2LayoutsQuery> {}
885
+
886
+ // GET /menu/v2/layout/{id}
887
+
888
+ export interface GetMenuV2LayoutPath {
889
+ id: string;
890
+ }
891
+
892
+ export interface GetMenuV2LayoutQuery {
893
+ // Graphql query string
894
+ _query?: string;
895
+ }
896
+
897
+ export type GetMenuV2LayoutResponse = Layout;
898
+
899
+ export interface GetMenuV2LayoutRequest
900
+ extends BaseRequest,
901
+ RequestQuery<GetMenuV2LayoutQuery>,
902
+ GetMenuV2LayoutPath {}
903
+
904
+ // PATCH /menu/v2/layout/{id}
905
+
906
+ export interface PatchMenuV2LayoutPath {
907
+ id: string;
908
+ }
909
+
910
+ export type PatchMenuV2LayoutBody = Layout;
911
+
912
+ export type PatchMenuV2LayoutResponse = Layout;
913
+
914
+ export interface PatchMenuV2LayoutRequest extends BaseRequest, PatchMenuV2LayoutPath {
915
+ body: PatchMenuV2LayoutBody;
916
+ }
917
+
918
+ // DELETE /menu/v2/layout/{id}
919
+
920
+ export interface DeleteMenuV2LayoutPath {
921
+ id: string;
922
+ }
923
+
924
+ export type DeleteMenuV2LayoutResponse = Layout;
925
+
926
+ export interface DeleteMenuV2LayoutRequest extends BaseRequest, DeleteMenuV2LayoutPath {}
927
+
928
+ // POST /menu/v2/layout
929
+
930
+ export type PostMenuV2LayoutBody = Layout;
931
+
932
+ export type PostMenuV2LayoutResponse = Layout;
933
+
934
+ export interface PostMenuV2LayoutRequest extends BaseRequest {
935
+ body: PostMenuV2LayoutBody;
936
+ }
937
+
938
+ // GET /menu/v2/layouts/count
939
+
940
+ export interface GetMenuV2LayoutsCountQuery {
941
+ // Graphql query string
942
+ _query?: string;
943
+ }
944
+
945
+ export interface GetMenuV2LayoutsCountResponse {
946
+ count?: number;
947
+ }
948
+
949
+ export interface GetMenuV2LayoutsCountRequest
950
+ extends BaseRequest,
951
+ RequestQuery<GetMenuV2LayoutsCountQuery> {}
952
+
953
+ // GET /menu/v2/categories
954
+
955
+ export interface GetMenuV2CategoriesQuery {
956
+ // Graphql query string
957
+ _query?: string;
958
+ }
959
+
960
+ export type GetMenuV2CategoriesResponse = CategoryListResponse;
961
+
962
+ export interface GetMenuV2CategoriesRequest
963
+ extends BaseRequest,
964
+ RequestQuery<GetMenuV2CategoriesQuery> {}
965
+
966
+ // GET /menu/v2/category/{id}
967
+
968
+ export interface GetMenuV2CategoryPath {
969
+ id: string;
970
+ }
971
+
972
+ export interface GetMenuV2CategoryQuery {
973
+ // Graphql query string
974
+ _query?: string;
975
+ }
976
+
977
+ export type GetMenuV2CategoryResponse = Category;
978
+
979
+ export interface GetMenuV2CategoryRequest
980
+ extends BaseRequest,
981
+ RequestQuery<GetMenuV2CategoryQuery>,
982
+ GetMenuV2CategoryPath {}
983
+
984
+ // PATCH /menu/v2/category/{id}
985
+
986
+ export interface PatchMenuV2CategoryPath {
987
+ id: string;
988
+ }
989
+
990
+ export type PatchMenuV2CategoryBody = Category;
991
+
992
+ export type PatchMenuV2CategoryResponse = Category;
993
+
994
+ export interface PatchMenuV2CategoryRequest extends BaseRequest, PatchMenuV2CategoryPath {
995
+ body: PatchMenuV2CategoryBody;
996
+ }
997
+
998
+ // DELETE /menu/v2/category/{id}
999
+
1000
+ export interface DeleteMenuV2CategoryPath {
1001
+ id: string;
1002
+ }
1003
+
1004
+ export type DeleteMenuV2CategoryResponse = Category;
1005
+
1006
+ export interface DeleteMenuV2CategoryRequest extends BaseRequest, DeleteMenuV2CategoryPath {}
1007
+
1008
+ // POST /menu/v2/category
1009
+
1010
+ export type PostMenuV2CategoryBody = Category;
1011
+
1012
+ export type PostMenuV2CategoryResponse = Category;
1013
+
1014
+ export interface PostMenuV2CategoryRequest extends BaseRequest {
1015
+ body: PostMenuV2CategoryBody;
1016
+ }
1017
+
1018
+ // GET /menu/v2/categories/count
1019
+
1020
+ export interface GetMenuV2CategoriesCountQuery {
1021
+ // Graphql query string
1022
+ _query?: string;
1023
+ }
1024
+
1025
+ export interface GetMenuV2CategoriesCountResponse {
1026
+ count?: number;
1027
+ }
1028
+
1029
+ export interface GetMenuV2CategoriesCountRequest
1030
+ extends BaseRequest,
1031
+ RequestQuery<GetMenuV2CategoriesCountQuery> {}
1032
+
1033
+ // GET /menu/v2/category/relationships/items
1034
+
1035
+ export interface GetMenuV2CategoryRelationshipsItemsQuery {
1036
+ // Graphql query string
1037
+ _query?: string;
1038
+ }
1039
+
1040
+ export type GetMenuV2CategoryRelationshipsItemsResponse = CategoryToItemRelationshipListResponse;
1041
+
1042
+ export interface GetMenuV2CategoryRelationshipsItemsRequest
1043
+ extends BaseRequest,
1044
+ RequestQuery<GetMenuV2CategoryRelationshipsItemsQuery> {}
1045
+
1046
+ // POST /menu/v2/category/relationships/item
1047
+
1048
+ export type PostMenuV2CategoryRelationshipsItemBody = CategoryToItemRelationship;
1049
+
1050
+ export type PostMenuV2CategoryRelationshipsItemResponse = CategoryToItemRelationship;
1051
+
1052
+ export interface PostMenuV2CategoryRelationshipsItemRequest extends BaseRequest {
1053
+ body: PostMenuV2CategoryRelationshipsItemBody;
1054
+ }
1055
+
1056
+ // PATCH /menu/v2/category/relationships/item/{id}
1057
+
1058
+ export interface PatchMenuV2CategoryRelationshipsItemPath {
1059
+ id: string;
1060
+ }
1061
+
1062
+ export type PatchMenuV2CategoryRelationshipsItemBody = CategoryToItemRelationship;
1063
+
1064
+ export type PatchMenuV2CategoryRelationshipsItemResponse = CategoryToItemRelationship;
1065
+
1066
+ export interface PatchMenuV2CategoryRelationshipsItemRequest
1067
+ extends BaseRequest,
1068
+ PatchMenuV2CategoryRelationshipsItemPath {
1069
+ body: PatchMenuV2CategoryRelationshipsItemBody;
1070
+ }
1071
+
1072
+ // DELETE /menu/v2/category/relationships/item/{id}
1073
+
1074
+ export interface DeleteMenuV2CategoryRelationshipsItemPath {
1075
+ id: string;
1076
+ }
1077
+
1078
+ export type DeleteMenuV2CategoryRelationshipsItemResponse = CategoryToItemRelationship;
1079
+
1080
+ export interface DeleteMenuV2CategoryRelationshipsItemRequest
1081
+ extends BaseRequest,
1082
+ DeleteMenuV2CategoryRelationshipsItemPath {}
1083
+
734
1084
  // GET /menu/client/{client_id} - Get menu client
735
1085
 
736
1086
  export interface GetMenuClientPath {
@@ -186,6 +186,7 @@ export interface ItemResponse {
186
186
  added_on?: string;
187
187
  meal_value?: IntegerValue;
188
188
  category?: Label;
189
+ tax_rate?: MonetaryValue;
189
190
  }
190
191
 
191
192
  export type MonetaryValue = number;
@@ -742,22 +743,10 @@ export interface CognitionStore {
742
743
  longitude?: number;
743
744
  }
744
745
 
745
- export interface CoolrLocations {
746
- // location
747
- id?: string;
748
- name?: string;
749
- code?: string;
750
- timezone?: string;
751
- address?: string;
752
- date?: {
753
- created?: string;
754
- modified?: string;
755
- };
756
- [index: string]: any;
746
+ export interface Success {
747
+ success?: boolean;
757
748
  }
758
749
 
759
- export type CoolrImages = any[];
760
-
761
750
  // POST /partner/standardcognition/shoppingcart - Calculates a shoppingcart
762
751
 
763
752
  export interface PostPartnerStandardcognitionShoppingcartBody {
@@ -828,6 +817,21 @@ export interface PostPartnerStandardcognitionMenuRequest extends BaseRequest {
828
817
  body: PostPartnerStandardcognitionMenuBody;
829
818
  }
830
819
 
820
+ // POST /partner/event/{id} - Send an event from 3rd party to our system
821
+
822
+ export interface PostPartnerEventPath {
823
+ // provider
824
+ id: string;
825
+ }
826
+
827
+ export type PostPartnerEventBody = any;
828
+
829
+ export type PostPartnerEventResponse = Success;
830
+
831
+ export interface PostPartnerEventRequest extends BaseRequest, PostPartnerEventPath {
832
+ body: PostPartnerEventBody;
833
+ }
834
+
831
835
  // GET /partner/swagger.json
832
836
 
833
837
  export interface GetPartnerSwaggerQuery {
@@ -75,6 +75,7 @@ export interface ItemResponse {
75
75
  meal_value?: IntegerValue;
76
76
  category?: Label;
77
77
  tax_rate?: MonetaryValue;
78
+ label?: Label;
78
79
  }
79
80
 
80
81
  export interface ModifierGroupRequest {
@@ -150,35 +151,45 @@ export interface BadgePay {
150
151
  name?: string;
151
152
  }
152
153
 
154
+ export interface Mealplan {
155
+ id?: string;
156
+ tender?: string;
157
+ total?: MonetaryValue;
158
+ }
159
+
160
+ export interface CreditCard {
161
+ card_type?: string;
162
+ last4?: string;
163
+ total?: MonetaryValue;
164
+ }
165
+
166
+ export interface DigitalWalletPay {
167
+ wallet_type?: string;
168
+ total?: MonetaryValue;
169
+ }
170
+
171
+ export interface MealSwipes {
172
+ id?: string;
173
+ tender?: string;
174
+ tender_type?: string;
175
+ tender_name?: string;
176
+ swipes?: MonetaryValue;
177
+ rate?: MonetaryValue;
178
+ total?: MonetaryValue;
179
+ }
180
+
181
+ export interface MealExchange {
182
+ id?: string;
183
+ tender?: string;
184
+ }
185
+
153
186
  export interface Payment {
154
187
  email?: string;
155
- mealplan?: {
156
- id?: string;
157
- tender?: string;
158
- total?: MonetaryValue;
159
- };
160
- credit_card?: {
161
- card_type?: string;
162
- last4?: string;
163
- total?: MonetaryValue;
164
- };
165
- digital_wallet_pay?: {
166
- wallet_type?: string;
167
- total?: MonetaryValue;
168
- };
169
- meal_swipes?: {
170
- id?: string;
171
- tender?: string;
172
- tender_type?: string;
173
- tender_name?: string;
174
- swipes?: MonetaryValue;
175
- rate?: MonetaryValue;
176
- total?: MonetaryValue;
177
- };
178
- meal_exchange?: {
179
- id?: string;
180
- tender?: string;
181
- };
188
+ mealplan?: Mealplan;
189
+ credit_card?: CreditCard;
190
+ digital_wallet_pay?: DigitalWalletPay;
191
+ meal_swipes?: MealSwipes;
192
+ meal_exchange?: MealExchange;
182
193
  badge_pay?: BadgePay;
183
194
  }
184
195
 
@@ -239,6 +250,7 @@ export interface ShoppingCartResponse {
239
250
  percent_off?: MonetaryValue;
240
251
  amount?: MonetaryValue;
241
252
  app?: string;
253
+ discount?: any;
242
254
  };
243
255
  //@deprecated
244
256
  loyalty?: {
@@ -256,36 +268,15 @@ export interface ShoppingCartResponse {
256
268
  amount_off?: MonetaryValue;
257
269
  percent_off?: MonetaryValue;
258
270
  amount?: MonetaryValue;
271
+ discount?: any;
259
272
  };
260
273
  payment_method?: {
261
274
  email?: string;
262
- mealplan?: {
263
- id?: string;
264
- tender?: string;
265
- total?: MonetaryValue;
266
- };
267
- credit_card?: {
268
- card_type?: string;
269
- last4?: string;
270
- total?: MonetaryValue;
271
- };
272
- digital_wallet_pay?: {
273
- wallet_type?: string;
274
- total?: MonetaryValue;
275
- };
276
- meal_swipes?: {
277
- id?: string;
278
- tender?: string;
279
- tender_type?: string;
280
- tender_name?: string;
281
- swipes?: MonetaryValue;
282
- rate?: MonetaryValue;
283
- total?: MonetaryValue;
284
- };
285
- meal_exchange?: {
286
- id?: string;
287
- tender?: string;
288
- };
275
+ mealplan?: Mealplan;
276
+ credit_card?: CreditCard;
277
+ digital_wallet_pay?: DigitalWalletPay;
278
+ meal_swipes?: MealSwipes;
279
+ meal_exchange?: MealExchange;
289
280
  badge_pay?: BadgePay;
290
281
  };
291
282
  taxes?: Taxes;
@@ -325,6 +316,69 @@ export interface ShoppingCartResponse {
325
316
 
326
317
  export type ShoppingCart = ShoppingCartResponse;
327
318
 
319
+ export interface PaymentMethods {
320
+ mealplan: {
321
+ tenders: Tender[];
322
+ };
323
+ badge_pay: {
324
+ tenders: {
325
+ balance?: MonetaryValue;
326
+ id: string;
327
+ // name associated with badgepay tender, stored in site public config
328
+ name?: string;
329
+ is: {
330
+ eligible: boolean;
331
+ };
332
+ }[];
333
+ };
334
+ credit_cards: {
335
+ data: {
336
+ billing_address?: {
337
+ postal_code?: string;
338
+ };
339
+ card_type?: string;
340
+ expiry?: {
341
+ month?: number;
342
+ year?: number;
343
+ };
344
+ is: {
345
+ eligible: boolean;
346
+ preferred?: boolean;
347
+ };
348
+ masked_card_number?: string;
349
+ name_on_card?: string;
350
+ nickname?: string;
351
+ token: string;
352
+ token_expiration_date?: string;
353
+ }[];
354
+ };
355
+ digital_wallet_pay: {
356
+ applewallet: {
357
+ is: {
358
+ eligible: boolean;
359
+ };
360
+ };
361
+ googlewallet: {
362
+ is: {
363
+ eligible: boolean;
364
+ };
365
+ };
366
+ };
367
+ }
368
+
369
+ export interface Tender {
370
+ // tender
371
+ id: string;
372
+ name?: string;
373
+ balance?: MonetaryValue;
374
+ type: string;
375
+ is: {
376
+ eligible: boolean;
377
+ validated?: boolean;
378
+ };
379
+ currency?: string;
380
+ }
381
+
328
382
  export interface Label {
329
383
  en?: string;
330
384
  fr?: string;
@@ -461,6 +515,25 @@ export interface PutShoppingcartCartPaymentRequest
461
515
  body: PutShoppingcartCartPaymentBody;
462
516
  }
463
517
 
518
+ // GET /shoppingcart/{id}/paymentmethods - Get a list of payment methods for cart
519
+
520
+ export interface GetShoppingcartPaymentMethodsPath {
521
+ // Shopping cart ID
522
+ id: string;
523
+ }
524
+
525
+ export interface GetShoppingcartPaymentMethodsQuery {
526
+ // Graphql query string
527
+ _query?: string;
528
+ }
529
+
530
+ export type GetShoppingcartPaymentMethodsResponse = PaymentMethods;
531
+
532
+ export interface GetShoppingcartPaymentMethodsRequest
533
+ extends BaseRequest,
534
+ RequestQuery<GetShoppingcartPaymentMethodsQuery>,
535
+ GetShoppingcartPaymentMethodsPath {}
536
+
464
537
  // PUT /shoppingcart/{id}/order/ - Store information about the order created with this shopping cart
465
538
 
466
539
  export interface PutShoppingcartCartOrderPath {