@compassdigital/sdk.typescript 4.94.2 → 4.95.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/lib/index.d.ts +84 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +96 -2
- package/lib/index.js.map +1 -1
- package/lib/interface/compassconnect.d.ts +0 -6
- package/lib/interface/compassconnect.d.ts.map +1 -1
- package/lib/interface/consumer.d.ts +17 -15
- package/lib/interface/consumer.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +319 -1
- package/lib/interface/menu.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +234 -6
- package/src/interface/compassconnect.ts +0 -9
- package/src/interface/consumer.ts +29 -16
- package/src/interface/menu.ts +385 -1
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -534,6 +534,8 @@ import {
|
|
|
534
534
|
GetMenuV3LocalMenuGroupAllowedGlobalBrandsResponse,
|
|
535
535
|
PostMenuV3LocalMenuGroupImportBrandsQuery,
|
|
536
536
|
PostMenuV3LocalMenuGroupImportBrandsResponse,
|
|
537
|
+
PostMenuV4LocalMenuGroupImportBrandsQuery,
|
|
538
|
+
PostMenuV4LocalMenuGroupImportBrandsResponse,
|
|
537
539
|
GetMenuV3LocalMenuGroupSiteQuery,
|
|
538
540
|
GetMenuV3LocalMenuGroupSiteResponse,
|
|
539
541
|
GetMenuV3LocalMenuGroupMenuGroupQuery,
|
|
@@ -607,6 +609,10 @@ import {
|
|
|
607
609
|
PostMenuV3DraftBrandGlobalDiffsApplyResponse,
|
|
608
610
|
PostMenuV3DraftBrandAttachmentQuery,
|
|
609
611
|
PostMenuV3DraftBrandAttachmentResponse,
|
|
612
|
+
GetMenuV3DraftBrandExportQuery,
|
|
613
|
+
GetMenuV3DraftBrandExportResponse,
|
|
614
|
+
GetMenuV3DraftBrandImportLinkQuery,
|
|
615
|
+
GetMenuV3DraftBrandImportLinkResponse,
|
|
610
616
|
PostMenuV3BrandQuery,
|
|
611
617
|
PostMenuV3BrandBody,
|
|
612
618
|
PostMenuV3BrandResponse,
|
|
@@ -881,6 +887,8 @@ import {
|
|
|
881
887
|
GetMenuV4BrandResponse,
|
|
882
888
|
PostMenuV4BrandMenuBody,
|
|
883
889
|
PostMenuV4BrandMenuResponse,
|
|
890
|
+
PatchMenuV4BrandMenuBody,
|
|
891
|
+
PatchMenuV4BrandMenuResponse,
|
|
884
892
|
GetMenuV4BrandItemsQuery,
|
|
885
893
|
GetMenuV4BrandItemsResponse,
|
|
886
894
|
GetMenuV4BrandModifierGroupsQuery,
|
|
@@ -897,24 +905,30 @@ import {
|
|
|
897
905
|
PostMenuV4BrandCategoryAttachItemsResponse,
|
|
898
906
|
PostMenuV4BrandPublishResponse,
|
|
899
907
|
PostMenuV4BrandV3ToV4Response,
|
|
908
|
+
DeleteMenuV4BrandResponse,
|
|
909
|
+
DeleteMenuV4BrandMenuResponse,
|
|
910
|
+
DeleteMenuV4BrandCategoryResponse,
|
|
900
911
|
PostMenuV4ItemBody,
|
|
901
912
|
PostMenuV4ItemResponse,
|
|
902
913
|
GetMenuV4ItemQuery,
|
|
903
914
|
GetMenuV4ItemResponse,
|
|
904
915
|
PatchMenuV4ItemBody,
|
|
905
916
|
PatchMenuV4ItemResponse,
|
|
917
|
+
DeleteMenuV4ItemResponse,
|
|
906
918
|
PostMenuV4ModifierBody,
|
|
907
919
|
PostMenuV4ModifierResponse,
|
|
908
920
|
GetMenuV4ModifierQuery,
|
|
909
921
|
GetMenuV4ModifierResponse,
|
|
910
922
|
PatchMenuV4ModifierBody,
|
|
911
923
|
PatchMenuV4ModifierResponse,
|
|
924
|
+
DeleteMenuV4ModifierResponse,
|
|
912
925
|
PostMenuV4ModifierGroupBody,
|
|
913
926
|
PostMenuV4ModifierGroupResponse,
|
|
914
927
|
GetMenuV4ModifierGroupQuery,
|
|
915
928
|
GetMenuV4ModifierGroupResponse,
|
|
916
929
|
PatchMenuV4ModifierGroupBody,
|
|
917
930
|
PatchMenuV4ModifierGroupResponse,
|
|
931
|
+
DeleteMenuV4ModifierGroupResponse,
|
|
918
932
|
PostMenuV4ModifierGroupAttachModifiersBody,
|
|
919
933
|
PostMenuV4ModifierGroupAttachModifiersResponse,
|
|
920
934
|
} from './interface/menu';
|
|
@@ -1003,8 +1017,8 @@ import {
|
|
|
1003
1017
|
GetPaymentListByBrandResponse,
|
|
1004
1018
|
GetCustomerOrdersQuery,
|
|
1005
1019
|
GetCustomerOrdersResponse,
|
|
1006
|
-
|
|
1007
|
-
|
|
1020
|
+
PostReviewOrderItemRatingsBody,
|
|
1021
|
+
PostReviewOrderItemRatingsResponse,
|
|
1008
1022
|
} from './interface/consumer';
|
|
1009
1023
|
|
|
1010
1024
|
import {
|
|
@@ -5646,6 +5660,28 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
5646
5660
|
);
|
|
5647
5661
|
}
|
|
5648
5662
|
|
|
5663
|
+
/**
|
|
5664
|
+
* POST /menu/v4/local-menu-group/{id}/import-brands
|
|
5665
|
+
*
|
|
5666
|
+
* @param id
|
|
5667
|
+
* @param options - additional request options
|
|
5668
|
+
*/
|
|
5669
|
+
post_menu_v4_local_menu_group_import_brands(
|
|
5670
|
+
id: string,
|
|
5671
|
+
options?: {
|
|
5672
|
+
query?: PostMenuV4LocalMenuGroupImportBrandsQuery;
|
|
5673
|
+
} & RequestOptions,
|
|
5674
|
+
): ResponsePromise<PostMenuV4LocalMenuGroupImportBrandsResponse> {
|
|
5675
|
+
return this.request(
|
|
5676
|
+
'menu',
|
|
5677
|
+
'/menu/v4/local-menu-group/{id}/import-brands',
|
|
5678
|
+
'post',
|
|
5679
|
+
`/menu/v4/local-menu-group/${id}/import-brands`,
|
|
5680
|
+
null,
|
|
5681
|
+
options,
|
|
5682
|
+
);
|
|
5683
|
+
}
|
|
5684
|
+
|
|
5649
5685
|
/**
|
|
5650
5686
|
* GET /menu/v3/local-menu-group/{id}/site
|
|
5651
5687
|
*
|
|
@@ -6458,6 +6494,50 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
6458
6494
|
);
|
|
6459
6495
|
}
|
|
6460
6496
|
|
|
6497
|
+
/**
|
|
6498
|
+
* GET /menu/v3/draft/brand/{id}/export
|
|
6499
|
+
*
|
|
6500
|
+
* @param id
|
|
6501
|
+
* @param options - additional request options
|
|
6502
|
+
*/
|
|
6503
|
+
get_menu_v3_draft_brand_export(
|
|
6504
|
+
id: string,
|
|
6505
|
+
options?: {
|
|
6506
|
+
query?: GetMenuV3DraftBrandExportQuery;
|
|
6507
|
+
} & RequestOptions,
|
|
6508
|
+
): ResponsePromise<GetMenuV3DraftBrandExportResponse> {
|
|
6509
|
+
return this.request(
|
|
6510
|
+
'menu',
|
|
6511
|
+
'/menu/v3/draft/brand/{id}/export',
|
|
6512
|
+
'get',
|
|
6513
|
+
`/menu/v3/draft/brand/${id}/export`,
|
|
6514
|
+
null,
|
|
6515
|
+
options,
|
|
6516
|
+
);
|
|
6517
|
+
}
|
|
6518
|
+
|
|
6519
|
+
/**
|
|
6520
|
+
* GET /menu/v3/draft/brand/{id}/import/link
|
|
6521
|
+
*
|
|
6522
|
+
* @param id
|
|
6523
|
+
* @param options - additional request options
|
|
6524
|
+
*/
|
|
6525
|
+
get_menu_v3_draft_brand_import_link(
|
|
6526
|
+
id: string,
|
|
6527
|
+
options?: {
|
|
6528
|
+
query?: GetMenuV3DraftBrandImportLinkQuery;
|
|
6529
|
+
} & RequestOptions,
|
|
6530
|
+
): ResponsePromise<GetMenuV3DraftBrandImportLinkResponse> {
|
|
6531
|
+
return this.request(
|
|
6532
|
+
'menu',
|
|
6533
|
+
'/menu/v3/draft/brand/{id}/import/link',
|
|
6534
|
+
'get',
|
|
6535
|
+
`/menu/v3/draft/brand/${id}/import/link`,
|
|
6536
|
+
null,
|
|
6537
|
+
options,
|
|
6538
|
+
);
|
|
6539
|
+
}
|
|
6540
|
+
|
|
6461
6541
|
/**
|
|
6462
6542
|
* POST /menu/v3/brand
|
|
6463
6543
|
*
|
|
@@ -9346,6 +9426,30 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
9346
9426
|
);
|
|
9347
9427
|
}
|
|
9348
9428
|
|
|
9429
|
+
/**
|
|
9430
|
+
* PATCH /menu/v4/brand/{brand_id}/menu/{menu_id}
|
|
9431
|
+
*
|
|
9432
|
+
* @param brand_id
|
|
9433
|
+
* @param menu_id
|
|
9434
|
+
* @param body
|
|
9435
|
+
* @param options - additional request options
|
|
9436
|
+
*/
|
|
9437
|
+
patch_menu_v4_brand_menu(
|
|
9438
|
+
brand_id: string,
|
|
9439
|
+
menu_id: string,
|
|
9440
|
+
body: PatchMenuV4BrandMenuBody,
|
|
9441
|
+
options?: RequestOptions,
|
|
9442
|
+
): ResponsePromise<PatchMenuV4BrandMenuResponse> {
|
|
9443
|
+
return this.request(
|
|
9444
|
+
'menu',
|
|
9445
|
+
'/menu/v4/brand/{brand_id}/menu/{menu_id}',
|
|
9446
|
+
'patch',
|
|
9447
|
+
`/menu/v4/brand/${brand_id}/menu/${menu_id}`,
|
|
9448
|
+
body,
|
|
9449
|
+
options,
|
|
9450
|
+
);
|
|
9451
|
+
}
|
|
9452
|
+
|
|
9349
9453
|
/**
|
|
9350
9454
|
* GET /menu/v4/brand/{id}/items
|
|
9351
9455
|
*
|
|
@@ -9544,6 +9648,70 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
9544
9648
|
);
|
|
9545
9649
|
}
|
|
9546
9650
|
|
|
9651
|
+
/**
|
|
9652
|
+
* DELETE menu/v4/brand/{id}
|
|
9653
|
+
*
|
|
9654
|
+
* @param id
|
|
9655
|
+
* @param options - additional request options
|
|
9656
|
+
*/
|
|
9657
|
+
delete_menu_v4_brand(
|
|
9658
|
+
id: string,
|
|
9659
|
+
options?: RequestOptions,
|
|
9660
|
+
): ResponsePromise<DeleteMenuV4BrandResponse> {
|
|
9661
|
+
return this.request(
|
|
9662
|
+
'menu',
|
|
9663
|
+
'menu/v4/brand/{id}',
|
|
9664
|
+
'delete',
|
|
9665
|
+
`menu/v4/brand/${id}`,
|
|
9666
|
+
null,
|
|
9667
|
+
options,
|
|
9668
|
+
);
|
|
9669
|
+
}
|
|
9670
|
+
|
|
9671
|
+
/**
|
|
9672
|
+
* DELETE menu/v4/brand/{brand_id}/menu/{menu_id}
|
|
9673
|
+
*
|
|
9674
|
+
* @param brand_id
|
|
9675
|
+
* @param menu_id
|
|
9676
|
+
* @param options - additional request options
|
|
9677
|
+
*/
|
|
9678
|
+
delete_menu_v4_brand_menu(
|
|
9679
|
+
brand_id: string,
|
|
9680
|
+
menu_id: string,
|
|
9681
|
+
options?: RequestOptions,
|
|
9682
|
+
): ResponsePromise<DeleteMenuV4BrandMenuResponse> {
|
|
9683
|
+
return this.request(
|
|
9684
|
+
'menu',
|
|
9685
|
+
'menu/v4/brand/{brand_id}/menu/{menu_id}',
|
|
9686
|
+
'delete',
|
|
9687
|
+
`menu/v4/brand/${brand_id}/menu/${menu_id}`,
|
|
9688
|
+
null,
|
|
9689
|
+
options,
|
|
9690
|
+
);
|
|
9691
|
+
}
|
|
9692
|
+
|
|
9693
|
+
/**
|
|
9694
|
+
* DELETE menu/v4/brand/{brand_id}/category/{category_id}
|
|
9695
|
+
*
|
|
9696
|
+
* @param brand_id
|
|
9697
|
+
* @param category_id
|
|
9698
|
+
* @param options - additional request options
|
|
9699
|
+
*/
|
|
9700
|
+
delete_menu_v4_brand_category(
|
|
9701
|
+
brand_id: string,
|
|
9702
|
+
category_id: string,
|
|
9703
|
+
options?: RequestOptions,
|
|
9704
|
+
): ResponsePromise<DeleteMenuV4BrandCategoryResponse> {
|
|
9705
|
+
return this.request(
|
|
9706
|
+
'menu',
|
|
9707
|
+
'menu/v4/brand/{brand_id}/category/{category_id}',
|
|
9708
|
+
'delete',
|
|
9709
|
+
`menu/v4/brand/${brand_id}/category/${category_id}`,
|
|
9710
|
+
null,
|
|
9711
|
+
options,
|
|
9712
|
+
);
|
|
9713
|
+
}
|
|
9714
|
+
|
|
9547
9715
|
/**
|
|
9548
9716
|
* POST /menu/v4/item
|
|
9549
9717
|
*
|
|
@@ -9594,6 +9762,26 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
9594
9762
|
);
|
|
9595
9763
|
}
|
|
9596
9764
|
|
|
9765
|
+
/**
|
|
9766
|
+
* DELETE /menu/v4/item/{id}
|
|
9767
|
+
*
|
|
9768
|
+
* @param id
|
|
9769
|
+
* @param options - additional request options
|
|
9770
|
+
*/
|
|
9771
|
+
delete_menu_v4_item(
|
|
9772
|
+
id: string,
|
|
9773
|
+
options?: RequestOptions,
|
|
9774
|
+
): ResponsePromise<DeleteMenuV4ItemResponse> {
|
|
9775
|
+
return this.request(
|
|
9776
|
+
'menu',
|
|
9777
|
+
'/menu/v4/item/{id}',
|
|
9778
|
+
'delete',
|
|
9779
|
+
`/menu/v4/item/${id}`,
|
|
9780
|
+
null,
|
|
9781
|
+
options,
|
|
9782
|
+
);
|
|
9783
|
+
}
|
|
9784
|
+
|
|
9597
9785
|
/**
|
|
9598
9786
|
* POST /menu/v4/modifier
|
|
9599
9787
|
*
|
|
@@ -9651,6 +9839,26 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
9651
9839
|
);
|
|
9652
9840
|
}
|
|
9653
9841
|
|
|
9842
|
+
/**
|
|
9843
|
+
* DELETE /menu/v4/modifier/{id}
|
|
9844
|
+
*
|
|
9845
|
+
* @param id
|
|
9846
|
+
* @param options - additional request options
|
|
9847
|
+
*/
|
|
9848
|
+
delete_menu_v4_modifier(
|
|
9849
|
+
id: string,
|
|
9850
|
+
options?: RequestOptions,
|
|
9851
|
+
): ResponsePromise<DeleteMenuV4ModifierResponse> {
|
|
9852
|
+
return this.request(
|
|
9853
|
+
'menu',
|
|
9854
|
+
'/menu/v4/modifier/{id}',
|
|
9855
|
+
'delete',
|
|
9856
|
+
`/menu/v4/modifier/${id}`,
|
|
9857
|
+
null,
|
|
9858
|
+
options,
|
|
9859
|
+
);
|
|
9860
|
+
}
|
|
9861
|
+
|
|
9654
9862
|
/**
|
|
9655
9863
|
* POST /menu/v4/modifier-group
|
|
9656
9864
|
*
|
|
@@ -9715,6 +9923,26 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
9715
9923
|
);
|
|
9716
9924
|
}
|
|
9717
9925
|
|
|
9926
|
+
/**
|
|
9927
|
+
* DELETE /menu/v4/modifier-group/{id}
|
|
9928
|
+
*
|
|
9929
|
+
* @param id
|
|
9930
|
+
* @param options - additional request options
|
|
9931
|
+
*/
|
|
9932
|
+
delete_menu_v4_modifier_group(
|
|
9933
|
+
id: string,
|
|
9934
|
+
options?: RequestOptions,
|
|
9935
|
+
): ResponsePromise<DeleteMenuV4ModifierGroupResponse> {
|
|
9936
|
+
return this.request(
|
|
9937
|
+
'menu',
|
|
9938
|
+
'/menu/v4/modifier-group/{id}',
|
|
9939
|
+
'delete',
|
|
9940
|
+
`/menu/v4/modifier-group/${id}`,
|
|
9941
|
+
null,
|
|
9942
|
+
options,
|
|
9943
|
+
);
|
|
9944
|
+
}
|
|
9945
|
+
|
|
9718
9946
|
/**
|
|
9719
9947
|
* POST /menu/v4/modifier-group/{id}/attach-modifiers
|
|
9720
9948
|
*
|
|
@@ -10445,15 +10673,15 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
10445
10673
|
}
|
|
10446
10674
|
|
|
10447
10675
|
/**
|
|
10448
|
-
* POST /consumer/review/order/item-ratings - Submit order
|
|
10676
|
+
* POST /consumer/review/order/item-ratings - Submit review containing order item ratings
|
|
10449
10677
|
*
|
|
10450
10678
|
* @param body
|
|
10451
10679
|
* @param options - additional request options
|
|
10452
10680
|
*/
|
|
10453
|
-
|
|
10454
|
-
body:
|
|
10681
|
+
post_review_order_item_ratings(
|
|
10682
|
+
body: PostReviewOrderItemRatingsBody,
|
|
10455
10683
|
options?: RequestOptions,
|
|
10456
|
-
): ResponsePromise<
|
|
10684
|
+
): ResponsePromise<PostReviewOrderItemRatingsResponse> {
|
|
10457
10685
|
return this.request(
|
|
10458
10686
|
'consumer',
|
|
10459
10687
|
'/consumer/review/order/item-ratings',
|
|
@@ -55,15 +55,6 @@ export interface Auth {
|
|
|
55
55
|
refresh_token?: string;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
export interface Compassconnect {
|
|
59
|
-
// compassconnect
|
|
60
|
-
id: string;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export interface Compassconnects {
|
|
64
|
-
compassconnects: Compassconnect[];
|
|
65
|
-
}
|
|
66
|
-
|
|
67
58
|
// GET /compassconnect/oms_token - Gets an OMS token
|
|
68
59
|
|
|
69
60
|
export interface GetCompassconnectOmsTokenQuery {
|
|
@@ -167,12 +167,19 @@ export interface ModifierGroup {
|
|
|
167
167
|
items?: Modifier[];
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
-
export interface
|
|
170
|
+
export interface OrderItemRating {
|
|
171
|
+
// order id
|
|
171
172
|
id: string;
|
|
173
|
+
// menu id
|
|
174
|
+
menu: string;
|
|
175
|
+
// item id
|
|
172
176
|
item: string;
|
|
177
|
+
// rating score
|
|
173
178
|
score: number;
|
|
174
|
-
comment
|
|
175
|
-
|
|
179
|
+
// review comment
|
|
180
|
+
comment: string;
|
|
181
|
+
// review tags
|
|
182
|
+
reason: string[];
|
|
176
183
|
}
|
|
177
184
|
|
|
178
185
|
export interface CartItem {
|
|
@@ -188,7 +195,7 @@ export interface CartItem {
|
|
|
188
195
|
options?: ModifierGroup[];
|
|
189
196
|
label?: Label;
|
|
190
197
|
name?: string;
|
|
191
|
-
review:
|
|
198
|
+
review: OrderItemRating;
|
|
192
199
|
}
|
|
193
200
|
|
|
194
201
|
export interface ShoppingCart {
|
|
@@ -236,20 +243,26 @@ export interface BadRequestErrorDTO {
|
|
|
236
243
|
data: Record<string, any>;
|
|
237
244
|
}
|
|
238
245
|
|
|
239
|
-
export interface
|
|
246
|
+
export interface ReviewOrderItemRatings {
|
|
247
|
+
// menu id
|
|
248
|
+
menu: string;
|
|
249
|
+
// item id
|
|
240
250
|
item: string;
|
|
251
|
+
// rating score
|
|
241
252
|
score: number;
|
|
242
|
-
comment
|
|
243
|
-
|
|
253
|
+
// review comment
|
|
254
|
+
comment: string;
|
|
255
|
+
// review tags
|
|
256
|
+
reason: string[];
|
|
244
257
|
}
|
|
245
258
|
|
|
246
|
-
export interface
|
|
259
|
+
export interface PostReviewOrderItemRatingsRequestDTO {
|
|
247
260
|
orderId: string;
|
|
248
|
-
reviews:
|
|
261
|
+
reviews: ReviewOrderItemRatings[];
|
|
249
262
|
}
|
|
250
263
|
|
|
251
|
-
export interface
|
|
252
|
-
reviews:
|
|
264
|
+
export interface PostReviewOrderItemRatingsResponseDTO {
|
|
265
|
+
reviews: OrderItemRating[];
|
|
253
266
|
}
|
|
254
267
|
|
|
255
268
|
// GET /consumer/v1/health-check
|
|
@@ -299,12 +312,12 @@ export interface GetCustomerOrdersRequest
|
|
|
299
312
|
extends BaseRequest,
|
|
300
313
|
RequestQuery<GetCustomerOrdersQuery> {}
|
|
301
314
|
|
|
302
|
-
// POST /consumer/review/order/item-ratings - Submit order
|
|
315
|
+
// POST /consumer/review/order/item-ratings - Submit review containing order item ratings
|
|
303
316
|
|
|
304
|
-
export type
|
|
317
|
+
export type PostReviewOrderItemRatingsBody = PostReviewOrderItemRatingsRequestDTO;
|
|
305
318
|
|
|
306
|
-
export type
|
|
319
|
+
export type PostReviewOrderItemRatingsResponse = PostReviewOrderItemRatingsResponseDTO;
|
|
307
320
|
|
|
308
|
-
export interface
|
|
309
|
-
body:
|
|
321
|
+
export interface PostReviewOrderItemRatingsRequest extends BaseRequest {
|
|
322
|
+
body: PostReviewOrderItemRatingsBody;
|
|
310
323
|
}
|