@compassdigital/sdk.typescript 4.106.0 → 4.108.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 +20 -5
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +20 -3
- package/lib/index.js.map +1 -1
- package/lib/interface/consumer.d.ts +17 -0
- package/lib/interface/consumer.d.ts.map +1 -1
- package/lib/interface/discount.d.ts +0 -11
- package/lib/interface/discount.d.ts.map +1 -1
- package/lib/interface/mealplan.d.ts +2 -0
- package/lib/interface/mealplan.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +22 -2
- package/lib/interface/menu.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +41 -8
- package/src/interface/consumer.ts +31 -0
- package/src/interface/discount.ts +1 -15
- package/src/interface/mealplan.ts +2 -0
- package/src/interface/menu.ts +36 -2
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -967,6 +967,8 @@ import {
|
|
|
967
967
|
DeleteMenuV4StockMenuBusinessUnitResponse,
|
|
968
968
|
GetMenuV4StockBusinessUnitQuery,
|
|
969
969
|
GetMenuV4StockBusinessUnitResponse,
|
|
970
|
+
GetMenuV4StockBusinessUnitUnpublishedChangesQuery,
|
|
971
|
+
GetMenuV4StockBusinessUnitUnpublishedChangesResponse,
|
|
970
972
|
PostMenuV4StockPublishBody,
|
|
971
973
|
PostMenuV4StockPublishResponse,
|
|
972
974
|
PostMenuV4ScheduleMenuBody,
|
|
@@ -1061,6 +1063,8 @@ import {
|
|
|
1061
1063
|
GetCustomerOrdersResponse,
|
|
1062
1064
|
PostReviewOrderItemsBody,
|
|
1063
1065
|
PostReviewOrderItemsResponse,
|
|
1066
|
+
PostHomePageBody,
|
|
1067
|
+
PostHomePageResponse,
|
|
1064
1068
|
} from './interface/consumer';
|
|
1065
1069
|
|
|
1066
1070
|
import {
|
|
@@ -1148,7 +1152,6 @@ import {
|
|
|
1148
1152
|
GetDiscountResponse,
|
|
1149
1153
|
PutDiscountBody,
|
|
1150
1154
|
PutDiscountResponse,
|
|
1151
|
-
DeleteDiscountBody,
|
|
1152
1155
|
DeleteDiscountResponse,
|
|
1153
1156
|
GetDiscountsQuery,
|
|
1154
1157
|
GetDiscountsResponse,
|
|
@@ -10435,6 +10438,28 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
10435
10438
|
);
|
|
10436
10439
|
}
|
|
10437
10440
|
|
|
10441
|
+
/**
|
|
10442
|
+
* GET /menu/v4/stock/business-unit/{business_unit_id}/unpublished-changes
|
|
10443
|
+
*
|
|
10444
|
+
* @param business_unit_id
|
|
10445
|
+
* @param options - additional request options
|
|
10446
|
+
*/
|
|
10447
|
+
get_menu_v4_stock_business_unit_unpublished_changes(
|
|
10448
|
+
business_unit_id: string,
|
|
10449
|
+
options?: {
|
|
10450
|
+
query?: GetMenuV4StockBusinessUnitUnpublishedChangesQuery;
|
|
10451
|
+
} & RequestOptions,
|
|
10452
|
+
): ResponsePromise<GetMenuV4StockBusinessUnitUnpublishedChangesResponse> {
|
|
10453
|
+
return this.request(
|
|
10454
|
+
'menu',
|
|
10455
|
+
'/menu/v4/stock/business-unit/{business_unit_id}/unpublished-changes',
|
|
10456
|
+
'get',
|
|
10457
|
+
`/menu/v4/stock/business-unit/${business_unit_id}/unpublished-changes`,
|
|
10458
|
+
null,
|
|
10459
|
+
options,
|
|
10460
|
+
);
|
|
10461
|
+
}
|
|
10462
|
+
|
|
10438
10463
|
/**
|
|
10439
10464
|
* POST /menu/v4/stock/publish
|
|
10440
10465
|
*
|
|
@@ -11224,6 +11249,19 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
11224
11249
|
);
|
|
11225
11250
|
}
|
|
11226
11251
|
|
|
11252
|
+
/**
|
|
11253
|
+
* POST /consumer/home - Provide the front end all the data required to render the home page
|
|
11254
|
+
*
|
|
11255
|
+
* @param body
|
|
11256
|
+
* @param options - additional request options
|
|
11257
|
+
*/
|
|
11258
|
+
post_home_page(
|
|
11259
|
+
body: PostHomePageBody,
|
|
11260
|
+
options?: RequestOptions,
|
|
11261
|
+
): ResponsePromise<PostHomePageResponse> {
|
|
11262
|
+
return this.request('consumer', '/consumer/home', 'post', `/consumer/home`, body, options);
|
|
11263
|
+
}
|
|
11264
|
+
|
|
11227
11265
|
/**
|
|
11228
11266
|
* POST /ai/language/generate - Generate text from a given prompt
|
|
11229
11267
|
*
|
|
@@ -11802,15 +11840,10 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
11802
11840
|
* DELETE /discount/{id} - delete a discount
|
|
11803
11841
|
*
|
|
11804
11842
|
* @param id - Discount id
|
|
11805
|
-
* @param body
|
|
11806
11843
|
* @param options - additional request options
|
|
11807
11844
|
*/
|
|
11808
|
-
delete_discount(
|
|
11809
|
-
id
|
|
11810
|
-
body: DeleteDiscountBody,
|
|
11811
|
-
options?: RequestOptions,
|
|
11812
|
-
): ResponsePromise<DeleteDiscountResponse> {
|
|
11813
|
-
return this.request('discount', '/discount/{id}', 'delete', `/discount/${id}`, body, options);
|
|
11845
|
+
delete_discount(id: string, options?: RequestOptions): ResponsePromise<DeleteDiscountResponse> {
|
|
11846
|
+
return this.request('discount', '/discount/{id}', 'delete', `/discount/${id}`, null, options);
|
|
11814
11847
|
}
|
|
11815
11848
|
|
|
11816
11849
|
/**
|
|
@@ -762,6 +762,27 @@ export interface PostReviewOrderItemsResponseDTO {
|
|
|
762
762
|
reviews: OrderItemReview[];
|
|
763
763
|
}
|
|
764
764
|
|
|
765
|
+
export interface HomePageRequest {
|
|
766
|
+
// site id
|
|
767
|
+
siteId: string;
|
|
768
|
+
// start date as a long
|
|
769
|
+
start: number;
|
|
770
|
+
// end date as a long
|
|
771
|
+
end: number;
|
|
772
|
+
// current date as a long
|
|
773
|
+
date: number;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
export interface HomePageResponse {
|
|
777
|
+
// valid diverse greeting messages
|
|
778
|
+
greetingMessage: Record<string, any>[];
|
|
779
|
+
// valid hero images
|
|
780
|
+
heroImages: Record<string, any>[];
|
|
781
|
+
orders: Record<string, any>[][];
|
|
782
|
+
// location object for the site
|
|
783
|
+
location: Record<string, any>;
|
|
784
|
+
}
|
|
785
|
+
|
|
765
786
|
// GET /consumer/v1/health-check
|
|
766
787
|
|
|
767
788
|
export interface HealthCheckControllerExecuteQuery {
|
|
@@ -824,3 +845,13 @@ export type PostReviewOrderItemsResponse = PostReviewOrderItemsResponseDTO;
|
|
|
824
845
|
export interface PostReviewOrderItemsRequest extends BaseRequest {
|
|
825
846
|
body: PostReviewOrderItemsBody;
|
|
826
847
|
}
|
|
848
|
+
|
|
849
|
+
// POST /consumer/home - Provide the front end all the data required to render the home page
|
|
850
|
+
|
|
851
|
+
export type PostHomePageBody = HomePageRequest;
|
|
852
|
+
|
|
853
|
+
export type PostHomePageResponse = HomePageResponse;
|
|
854
|
+
|
|
855
|
+
export interface PostHomePageRequest extends BaseRequest {
|
|
856
|
+
body: PostHomePageBody;
|
|
857
|
+
}
|
|
@@ -129,11 +129,6 @@ export type InternalServerErrorException = Record<string, any>;
|
|
|
129
129
|
export interface PutDiscountPublishRequestDTO {
|
|
130
130
|
// user id of most recent update
|
|
131
131
|
updatedBy: string;
|
|
132
|
-
taxonomy?: Record<string, any>;
|
|
133
|
-
name: string;
|
|
134
|
-
status?: DiscountStatus;
|
|
135
|
-
is?: DiscountIs;
|
|
136
|
-
meta?: DiscountMeta;
|
|
137
132
|
}
|
|
138
133
|
|
|
139
134
|
export interface PutDiscountPublishResponseDTO {
|
|
@@ -150,11 +145,6 @@ export interface PutDiscountPublishResponseDTO {
|
|
|
150
145
|
meta?: DiscountMeta;
|
|
151
146
|
}
|
|
152
147
|
|
|
153
|
-
export interface DeleteDiscountRequestDTO {
|
|
154
|
-
id: string;
|
|
155
|
-
meta?: DiscountMeta;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
148
|
export interface DeleteDiscountResponseDTO {
|
|
159
149
|
success: boolean;
|
|
160
150
|
}
|
|
@@ -199,13 +189,9 @@ export interface DeleteDiscountPath {
|
|
|
199
189
|
id: string;
|
|
200
190
|
}
|
|
201
191
|
|
|
202
|
-
export type DeleteDiscountBody = DeleteDiscountRequestDTO;
|
|
203
|
-
|
|
204
192
|
export type DeleteDiscountResponse = DeleteDiscountResponseDTO;
|
|
205
193
|
|
|
206
|
-
export interface DeleteDiscountRequest extends BaseRequest, DeleteDiscountPath {
|
|
207
|
-
body: DeleteDiscountBody;
|
|
208
|
-
}
|
|
194
|
+
export interface DeleteDiscountRequest extends BaseRequest, DeleteDiscountPath {}
|
|
209
195
|
|
|
210
196
|
// GET /discount - Get discounts by taxonomy
|
|
211
197
|
|
|
@@ -217,6 +217,7 @@ export interface DeleteMealplanTenderBody {
|
|
|
217
217
|
type?: string;
|
|
218
218
|
conversion_amount?: number;
|
|
219
219
|
terminal_id?: string;
|
|
220
|
+
card_data?: string;
|
|
220
221
|
drain_order_type?: {
|
|
221
222
|
taxable?: boolean;
|
|
222
223
|
tax_exempt?: boolean;
|
|
@@ -256,6 +257,7 @@ export interface PatchMealplanTenderBody {
|
|
|
256
257
|
// Amount for order paid by user
|
|
257
258
|
transaction_amount?: number;
|
|
258
259
|
terminal_id?: string;
|
|
260
|
+
card_data?: string;
|
|
259
261
|
}
|
|
260
262
|
|
|
261
263
|
export type PatchMealplanTenderResponse = Tender;
|
package/src/interface/menu.ts
CHANGED
|
@@ -921,7 +921,6 @@ export interface StockDTO {
|
|
|
921
921
|
brand_id?: string;
|
|
922
922
|
id?: string;
|
|
923
923
|
business_unit_id?: string;
|
|
924
|
-
item?: Record<string, any>;
|
|
925
924
|
menu?: Record<string, any>;
|
|
926
925
|
brand?: DraftBrandDTO;
|
|
927
926
|
permissions?: Record<string, any>;
|
|
@@ -9406,7 +9405,6 @@ export interface PatchMenuV4StockResponse {
|
|
|
9406
9405
|
deleted_at?: string;
|
|
9407
9406
|
business_unit_id?: string;
|
|
9408
9407
|
version?: number;
|
|
9409
|
-
item?: DraftItemDTO;
|
|
9410
9408
|
menu?: DraftMenuDTO;
|
|
9411
9409
|
brand?: DraftBrandDTO;
|
|
9412
9410
|
permissions?: Record<string, any>;
|
|
@@ -9482,6 +9480,41 @@ export interface GetMenuV4StockBusinessUnitRequest
|
|
|
9482
9480
|
RequestQuery<GetMenuV4StockBusinessUnitQuery>,
|
|
9483
9481
|
GetMenuV4StockBusinessUnitPath {}
|
|
9484
9482
|
|
|
9483
|
+
// GET /menu/v4/stock/business-unit/{business_unit_id}/unpublished-changes
|
|
9484
|
+
|
|
9485
|
+
export interface GetMenuV4StockBusinessUnitUnpublishedChangesPath {
|
|
9486
|
+
business_unit_id: string;
|
|
9487
|
+
}
|
|
9488
|
+
|
|
9489
|
+
export interface GetMenuV4StockBusinessUnitUnpublishedChangesQuery {
|
|
9490
|
+
filter?: string;
|
|
9491
|
+
// If specified, only the selected fields will be returned
|
|
9492
|
+
select?: string[];
|
|
9493
|
+
// List of relationships to load alongside this entity. Can load nested relationships using the pattern 'children.grand_children.foo'
|
|
9494
|
+
relationships?: string[];
|
|
9495
|
+
// Number of records to load per page
|
|
9496
|
+
limit?: number;
|
|
9497
|
+
page?: number;
|
|
9498
|
+
// A field to sort the results based on
|
|
9499
|
+
sort_by?: string;
|
|
9500
|
+
sort_order?: 'DESC' | 'ASC';
|
|
9501
|
+
// How soft deleted records should be shown in the list
|
|
9502
|
+
soft_deleted?: 'include' | 'exclude' | 'only';
|
|
9503
|
+
// Graphql query string
|
|
9504
|
+
_query?: string;
|
|
9505
|
+
}
|
|
9506
|
+
|
|
9507
|
+
export interface GetMenuV4StockBusinessUnitUnpublishedChangesResponse {
|
|
9508
|
+
results: StockDTO[];
|
|
9509
|
+
meta?: ListResponseMetadataDTO;
|
|
9510
|
+
[index: string]: any;
|
|
9511
|
+
}
|
|
9512
|
+
|
|
9513
|
+
export interface GetMenuV4StockBusinessUnitUnpublishedChangesRequest
|
|
9514
|
+
extends BaseRequest,
|
|
9515
|
+
RequestQuery<GetMenuV4StockBusinessUnitUnpublishedChangesQuery>,
|
|
9516
|
+
GetMenuV4StockBusinessUnitUnpublishedChangesPath {}
|
|
9517
|
+
|
|
9485
9518
|
// POST /menu/v4/stock/publish
|
|
9486
9519
|
|
|
9487
9520
|
export interface PostMenuV4StockPublishBody {
|
|
@@ -9538,6 +9571,7 @@ export interface PostMenuV4ScheduleMenuRequest extends BaseRequest {
|
|
|
9538
9571
|
|
|
9539
9572
|
export interface PostMenuV4UnscheduleMenuBody {
|
|
9540
9573
|
menu_id: string;
|
|
9574
|
+
station_id: string;
|
|
9541
9575
|
[index: string]: any;
|
|
9542
9576
|
}
|
|
9543
9577
|
|