@compassdigital/sdk.typescript 4.116.0 → 4.118.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/base.d.ts +4 -0
- package/lib/base.d.ts.map +1 -1
- package/lib/base.js +23 -13
- package/lib/base.js.map +1 -1
- package/lib/index.d.ts +69 -21
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +79 -21
- package/lib/index.js.map +1 -1
- package/lib/interface/centricos.d.ts +3 -2
- package/lib/interface/centricos.d.ts.map +1 -1
- package/lib/interface/mealplan.d.ts +57 -19
- package/lib/interface/mealplan.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +129 -37
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/partner.d.ts +48 -1
- package/lib/interface/partner.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/base.ts +24 -17
- package/src/index.ts +194 -52
- package/src/interface/centricos.ts +6 -2
- package/src/interface/mealplan.ts +85 -27
- package/src/interface/menu.ts +172 -47
- package/src/interface/partner.ts +56 -10
- package/test/client.test.ts +6 -1
|
@@ -217,9 +217,6 @@ export interface DeleteMealplanTenderBody {
|
|
|
217
217
|
type?: string;
|
|
218
218
|
conversion_amount?: number;
|
|
219
219
|
terminal_id?: string;
|
|
220
|
-
overrides?: {
|
|
221
|
-
credentials?: string;
|
|
222
|
-
};
|
|
223
220
|
drain_order_type?: {
|
|
224
221
|
taxable?: boolean;
|
|
225
222
|
tax_exempt?: boolean;
|
|
@@ -259,9 +256,6 @@ export interface PatchMealplanTenderBody {
|
|
|
259
256
|
// Amount for order paid by user
|
|
260
257
|
transaction_amount?: number;
|
|
261
258
|
terminal_id?: string;
|
|
262
|
-
overrides?: {
|
|
263
|
-
credentials?: string;
|
|
264
|
-
};
|
|
265
259
|
}
|
|
266
260
|
|
|
267
261
|
export type PatchMealplanTenderResponse = Tender;
|
|
@@ -270,27 +264,6 @@ export interface PatchMealplanTenderRequest extends BaseRequest, PatchMealplanTe
|
|
|
270
264
|
body: PatchMealplanTenderBody;
|
|
271
265
|
}
|
|
272
266
|
|
|
273
|
-
// POST /mealplan/{id}/tender/{tender} - Check the user's tender balance
|
|
274
|
-
|
|
275
|
-
export interface PostMealplanTenderPath {
|
|
276
|
-
// Meal plan ID
|
|
277
|
-
id: string;
|
|
278
|
-
// Tender ID
|
|
279
|
-
tender: string;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
export interface PostMealplanTenderBody {
|
|
283
|
-
overrides?: {
|
|
284
|
-
credentials?: string;
|
|
285
|
-
};
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
export type PostMealplanTenderResponse = Tender;
|
|
289
|
-
|
|
290
|
-
export interface PostMealplanTenderRequest extends BaseRequest, PostMealplanTenderPath {
|
|
291
|
-
body: PostMealplanTenderBody;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
267
|
// POST /mealplan/{id}/verify - Send verification email to user linking a mealplan
|
|
295
268
|
|
|
296
269
|
export interface PostMealplanVerifyPath {
|
|
@@ -357,3 +330,88 @@ export interface PostMealplanAuthorizeResponse {
|
|
|
357
330
|
export interface PostMealplanAuthorizeRequest extends BaseRequest, PostMealplanAuthorizePath {
|
|
358
331
|
body: PostMealplanAuthorizeBody;
|
|
359
332
|
}
|
|
333
|
+
|
|
334
|
+
// POST /mealplan/{id}/internal/tenders - Check the user's tender balance
|
|
335
|
+
|
|
336
|
+
export interface PostMealplanInternalTendersPath {
|
|
337
|
+
// Meal plan ID
|
|
338
|
+
id: string;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
export interface PostMealplanInternalTendersBody {
|
|
342
|
+
credentials: string;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
export interface PostMealplanInternalTendersResponse {
|
|
346
|
+
tenders: Tender[];
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
export interface PostMealplanInternalTendersRequest
|
|
350
|
+
extends BaseRequest,
|
|
351
|
+
PostMealplanInternalTendersPath {
|
|
352
|
+
body: PostMealplanInternalTendersBody;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
// POST /mealplan/{id}/internal/debit - Debit an amount from the tender balance
|
|
356
|
+
|
|
357
|
+
export interface PostMealplanInternalDebitPath {
|
|
358
|
+
// Meal plan ID
|
|
359
|
+
id: string;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
export interface PostMealplanInternalDebitBody {
|
|
363
|
+
credentials: string;
|
|
364
|
+
tender: string;
|
|
365
|
+
amount: number;
|
|
366
|
+
type?: string;
|
|
367
|
+
conversion_amount?: number;
|
|
368
|
+
terminal_id?: string;
|
|
369
|
+
drain_order_type?: {
|
|
370
|
+
taxable?: boolean;
|
|
371
|
+
tax_exempt?: boolean;
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
export interface PostMealplanInternalDebitResponse {
|
|
376
|
+
id?: string;
|
|
377
|
+
name?: string;
|
|
378
|
+
balance?: number;
|
|
379
|
+
is?: TenderIs;
|
|
380
|
+
transaction_id?: string;
|
|
381
|
+
type?: number;
|
|
382
|
+
tender_id?: number;
|
|
383
|
+
currency?: string;
|
|
384
|
+
transaction_amount?: number;
|
|
385
|
+
drained_tender_name?: string;
|
|
386
|
+
drained_tender_breakdown?: DrainedTender[];
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
export interface PostMealplanInternalDebitRequest
|
|
390
|
+
extends BaseRequest,
|
|
391
|
+
PostMealplanInternalDebitPath {
|
|
392
|
+
body: PostMealplanInternalDebitBody;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
// POST /mealplan/{id}/internal/refund - Refund an amount to the tender balance
|
|
396
|
+
|
|
397
|
+
export interface PostMealplanInternalRefundPath {
|
|
398
|
+
// Meal plan ID
|
|
399
|
+
id: string;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
export interface PostMealplanInternalRefundBody {
|
|
403
|
+
credentials: string;
|
|
404
|
+
tender: string;
|
|
405
|
+
amount: number;
|
|
406
|
+
// Amount for order paid by user
|
|
407
|
+
transaction_amount?: number;
|
|
408
|
+
terminal_id?: string;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
export type PostMealplanInternalRefundResponse = Tender;
|
|
412
|
+
|
|
413
|
+
export interface PostMealplanInternalRefundRequest
|
|
414
|
+
extends BaseRequest,
|
|
415
|
+
PostMealplanInternalRefundPath {
|
|
416
|
+
body: PostMealplanInternalRefundBody;
|
|
417
|
+
}
|
package/src/interface/menu.ts
CHANGED
|
@@ -725,7 +725,6 @@ export interface DraftItemToModifierGroupRelationshipDTO {
|
|
|
725
725
|
brand?: DraftBrandDTO;
|
|
726
726
|
changes?: ItemToModifierGroupRelationshipChangeDTO[];
|
|
727
727
|
vendor_metadata?: VendorMetadataDTO[];
|
|
728
|
-
is_global?: boolean;
|
|
729
728
|
permissions?: Record<string, any>;
|
|
730
729
|
[index: string]: any;
|
|
731
730
|
}
|
|
@@ -771,7 +770,6 @@ export interface DraftModifierGroupToModifierRelationshipDTO {
|
|
|
771
770
|
brand?: DraftBrandDTO;
|
|
772
771
|
changes?: ModifierGroupToModifierRelationshipChangeDTO[];
|
|
773
772
|
vendor_metadata?: VendorMetadataDTO[];
|
|
774
|
-
is_global?: boolean;
|
|
775
773
|
permissions?: Record<string, any>;
|
|
776
774
|
[index: string]: any;
|
|
777
775
|
}
|
|
@@ -1096,6 +1094,20 @@ export interface ApplyDiffDTO {
|
|
|
1096
1094
|
[index: string]: any;
|
|
1097
1095
|
}
|
|
1098
1096
|
|
|
1097
|
+
export interface WarningDTO {
|
|
1098
|
+
barcode?: string;
|
|
1099
|
+
brand_id?: string;
|
|
1100
|
+
brand_name?: string;
|
|
1101
|
+
type?: string;
|
|
1102
|
+
items?: WarningItemDTO[];
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
export interface WarningItemDTO {
|
|
1106
|
+
id?: string;
|
|
1107
|
+
item_name?: string;
|
|
1108
|
+
posid?: string;
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1099
1111
|
export interface PublishedMenuDTO {
|
|
1100
1112
|
id?: string;
|
|
1101
1113
|
parent_id?: string;
|
|
@@ -1166,7 +1178,6 @@ export interface PublishedItemToModifierGroupRelationshipDTO {
|
|
|
1166
1178
|
item_id?: string;
|
|
1167
1179
|
brand_id?: string;
|
|
1168
1180
|
sequence?: number;
|
|
1169
|
-
is_global?: boolean;
|
|
1170
1181
|
permissions?: Record<string, any>;
|
|
1171
1182
|
[index: string]: any;
|
|
1172
1183
|
}
|
|
@@ -1196,7 +1207,6 @@ export interface PublishedModifierGroupToModifierRelationshipDTO {
|
|
|
1196
1207
|
modifier_group_id?: string;
|
|
1197
1208
|
brand_id?: string;
|
|
1198
1209
|
sequence?: number;
|
|
1199
|
-
is_global?: boolean;
|
|
1200
1210
|
permissions?: Record<string, any>;
|
|
1201
1211
|
[index: string]: any;
|
|
1202
1212
|
}
|
|
@@ -1231,21 +1241,6 @@ export interface PublishedModifierDTO {
|
|
|
1231
1241
|
[index: string]: any;
|
|
1232
1242
|
}
|
|
1233
1243
|
|
|
1234
|
-
export interface WarningDTO {
|
|
1235
|
-
barcode?: string;
|
|
1236
|
-
type?: string;
|
|
1237
|
-
items?: WarningItemDTO[];
|
|
1238
|
-
}
|
|
1239
|
-
|
|
1240
|
-
export interface WarningItemDTO {
|
|
1241
|
-
id?: string;
|
|
1242
|
-
item_name?: string;
|
|
1243
|
-
barcode?: string;
|
|
1244
|
-
posid?: string;
|
|
1245
|
-
brand_id?: string;
|
|
1246
|
-
brand_name?: string;
|
|
1247
|
-
}
|
|
1248
|
-
|
|
1249
1244
|
export interface GroupStockUpdate {
|
|
1250
1245
|
id: string;
|
|
1251
1246
|
items?: ItemStockUpdate[];
|
|
@@ -3592,6 +3587,26 @@ export interface PostMenuV3DraftBrandImportRequest
|
|
|
3592
3587
|
extends BaseRequest,
|
|
3593
3588
|
PostMenuV3DraftBrandImportPath {}
|
|
3594
3589
|
|
|
3590
|
+
// GET /menu/v3/draft/brand/{id}/verify-publish
|
|
3591
|
+
|
|
3592
|
+
export interface GetMenuV3DraftBrandVerifyPublishPath {
|
|
3593
|
+
id: string;
|
|
3594
|
+
}
|
|
3595
|
+
|
|
3596
|
+
export interface GetMenuV3DraftBrandVerifyPublishQuery {
|
|
3597
|
+
// Graphql query string
|
|
3598
|
+
_query?: string;
|
|
3599
|
+
}
|
|
3600
|
+
|
|
3601
|
+
export interface GetMenuV3DraftBrandVerifyPublishResponse {
|
|
3602
|
+
warnings?: WarningDTO[];
|
|
3603
|
+
}
|
|
3604
|
+
|
|
3605
|
+
export interface GetMenuV3DraftBrandVerifyPublishRequest
|
|
3606
|
+
extends BaseRequest,
|
|
3607
|
+
RequestQuery<GetMenuV3DraftBrandVerifyPublishQuery>,
|
|
3608
|
+
GetMenuV3DraftBrandVerifyPublishPath {}
|
|
3609
|
+
|
|
3595
3610
|
// POST /menu/v3/brand
|
|
3596
3611
|
|
|
3597
3612
|
export interface PostMenuV3BrandQuery {
|
|
@@ -5585,7 +5600,6 @@ export interface PostMenuV3DraftItemRelationshipsModifierGroupBody {
|
|
|
5585
5600
|
brand?: DraftBrandDTO;
|
|
5586
5601
|
changes?: ItemToModifierGroupRelationshipChangeDTO[];
|
|
5587
5602
|
vendor_metadata?: VendorMetadataDTO[];
|
|
5588
|
-
is_global?: boolean;
|
|
5589
5603
|
permissions?: Record<string, any>;
|
|
5590
5604
|
[index: string]: any;
|
|
5591
5605
|
}
|
|
@@ -5642,7 +5656,6 @@ export interface PatchMenuV3DraftItemRelationshipsModifierGroupBody {
|
|
|
5642
5656
|
brand?: DraftBrandDTO;
|
|
5643
5657
|
changes?: ItemToModifierGroupRelationshipChangeDTO[];
|
|
5644
5658
|
vendor_metadata?: VendorMetadataDTO[];
|
|
5645
|
-
is_global?: boolean;
|
|
5646
5659
|
permissions?: Record<string, any>;
|
|
5647
5660
|
[index: string]: any;
|
|
5648
5661
|
}
|
|
@@ -5721,7 +5734,6 @@ export type PostMenuV3DraftItemRelationshipsModifierGroupsBody = {
|
|
|
5721
5734
|
brand?: DraftBrandDTO;
|
|
5722
5735
|
changes?: ItemToModifierGroupRelationshipChangeDTO[];
|
|
5723
5736
|
vendor_metadata?: VendorMetadataDTO[];
|
|
5724
|
-
is_global?: boolean;
|
|
5725
5737
|
permissions?: Record<string, any>;
|
|
5726
5738
|
[index: string]: any;
|
|
5727
5739
|
}[];
|
|
@@ -6223,7 +6235,6 @@ export interface PostMenuV3DraftModifierGroupRelationshipsModifierBody {
|
|
|
6223
6235
|
brand?: DraftBrandDTO;
|
|
6224
6236
|
changes?: ModifierGroupToModifierRelationshipChangeDTO[];
|
|
6225
6237
|
vendor_metadata?: VendorMetadataDTO[];
|
|
6226
|
-
is_global?: boolean;
|
|
6227
6238
|
permissions?: Record<string, any>;
|
|
6228
6239
|
[index: string]: any;
|
|
6229
6240
|
}
|
|
@@ -6280,7 +6291,6 @@ export interface PatchMenuV3DraftModifierGroupRelationshipsModifierBody {
|
|
|
6280
6291
|
brand?: DraftBrandDTO;
|
|
6281
6292
|
changes?: ModifierGroupToModifierRelationshipChangeDTO[];
|
|
6282
6293
|
vendor_metadata?: VendorMetadataDTO[];
|
|
6283
|
-
is_global?: boolean;
|
|
6284
6294
|
permissions?: Record<string, any>;
|
|
6285
6295
|
[index: string]: any;
|
|
6286
6296
|
}
|
|
@@ -6359,7 +6369,6 @@ export type PostMenuV3DraftModifierGroupRelationshipsModifiersBody = {
|
|
|
6359
6369
|
brand?: DraftBrandDTO;
|
|
6360
6370
|
changes?: ModifierGroupToModifierRelationshipChangeDTO[];
|
|
6361
6371
|
vendor_metadata?: VendorMetadataDTO[];
|
|
6362
|
-
is_global?: boolean;
|
|
6363
6372
|
permissions?: Record<string, any>;
|
|
6364
6373
|
[index: string]: any;
|
|
6365
6374
|
}[];
|
|
@@ -8018,27 +8027,6 @@ export interface PostMenuV4BrandMenuDuplicateRequest
|
|
|
8018
8027
|
body: PostMenuV4BrandMenuDuplicateBody;
|
|
8019
8028
|
}
|
|
8020
8029
|
|
|
8021
|
-
// POST /menu/v4/category/{id}/attachment/{name}
|
|
8022
|
-
|
|
8023
|
-
export interface PostMenuV4CategoryAttachmentPath {
|
|
8024
|
-
id: string;
|
|
8025
|
-
name: 'thumbnail';
|
|
8026
|
-
}
|
|
8027
|
-
|
|
8028
|
-
export interface PostMenuV4CategoryAttachmentQuery {
|
|
8029
|
-
'body.data'?: string;
|
|
8030
|
-
'body.brand_id'?: string;
|
|
8031
|
-
}
|
|
8032
|
-
|
|
8033
|
-
export interface PostMenuV4CategoryAttachmentResponse {
|
|
8034
|
-
status?: string;
|
|
8035
|
-
}
|
|
8036
|
-
|
|
8037
|
-
export interface PostMenuV4CategoryAttachmentRequest
|
|
8038
|
-
extends BaseRequest,
|
|
8039
|
-
RequestQuery<PostMenuV4CategoryAttachmentQuery>,
|
|
8040
|
-
PostMenuV4CategoryAttachmentPath {}
|
|
8041
|
-
|
|
8042
8030
|
// POST /menu/v4/item/{id}/attachment/{name}
|
|
8043
8031
|
|
|
8044
8032
|
export interface PostMenuV4ItemAttachmentPath {
|
|
@@ -8601,6 +8589,45 @@ export interface PostMenuV4ItemDuplicateRequest extends BaseRequest, PostMenuV4I
|
|
|
8601
8589
|
body: PostMenuV4ItemDuplicateBody;
|
|
8602
8590
|
}
|
|
8603
8591
|
|
|
8592
|
+
// DELETE /menu/v4/item/{id}/modifier-groups/detach
|
|
8593
|
+
|
|
8594
|
+
export interface DeleteMenuV4ItemModifierGroupsDetachPath {
|
|
8595
|
+
id: string;
|
|
8596
|
+
}
|
|
8597
|
+
|
|
8598
|
+
export type DeleteMenuV4ItemModifierGroupsDetachBody = {
|
|
8599
|
+
parent?: DraftItemToModifierGroupRelationshipDTO;
|
|
8600
|
+
children?: DraftItemToModifierGroupRelationshipDTO[];
|
|
8601
|
+
id: string;
|
|
8602
|
+
created_at?: string;
|
|
8603
|
+
updated_at?: string;
|
|
8604
|
+
deleted_at?: string;
|
|
8605
|
+
parent_id?: string;
|
|
8606
|
+
modifier_group_id: string;
|
|
8607
|
+
item_id: string;
|
|
8608
|
+
brand_id: string;
|
|
8609
|
+
sequence?: number;
|
|
8610
|
+
applied_diff_snapshot?: Record<string, any>;
|
|
8611
|
+
version?: number;
|
|
8612
|
+
item?: DraftItemDTO;
|
|
8613
|
+
modifier_group?: DraftModifierGroupDTO;
|
|
8614
|
+
brand?: DraftBrandDTO;
|
|
8615
|
+
changes?: ItemToModifierGroupRelationshipChangeDTO[];
|
|
8616
|
+
vendor_metadata?: VendorMetadataDTO[];
|
|
8617
|
+
permissions?: Record<string, any>;
|
|
8618
|
+
[index: string]: any;
|
|
8619
|
+
}[];
|
|
8620
|
+
|
|
8621
|
+
export interface DeleteMenuV4ItemModifierGroupsDetachResponse {
|
|
8622
|
+
status?: string;
|
|
8623
|
+
}
|
|
8624
|
+
|
|
8625
|
+
export interface DeleteMenuV4ItemModifierGroupsDetachRequest
|
|
8626
|
+
extends BaseRequest,
|
|
8627
|
+
DeleteMenuV4ItemModifierGroupsDetachPath {
|
|
8628
|
+
body: DeleteMenuV4ItemModifierGroupsDetachBody;
|
|
8629
|
+
}
|
|
8630
|
+
|
|
8604
8631
|
// POST /menu/v4/modifier
|
|
8605
8632
|
|
|
8606
8633
|
export interface PostMenuV4ModifierBody {
|
|
@@ -9303,7 +9330,6 @@ export type PostMenuV4ModifierGroupAttachModifiersBody = {
|
|
|
9303
9330
|
brand?: DraftBrandDTO;
|
|
9304
9331
|
changes?: ModifierGroupToModifierRelationshipChangeDTO[];
|
|
9305
9332
|
vendor_metadata?: VendorMetadataDTO[];
|
|
9306
|
-
is_global?: boolean;
|
|
9307
9333
|
permissions?: Record<string, any>;
|
|
9308
9334
|
[index: string]: any;
|
|
9309
9335
|
}[];
|
|
@@ -9390,6 +9416,45 @@ export interface PostMenuV4ModifierGroupDuplicateRequest
|
|
|
9390
9416
|
body: PostMenuV4ModifierGroupDuplicateBody;
|
|
9391
9417
|
}
|
|
9392
9418
|
|
|
9419
|
+
// DELETE /menu/v4/modifier-group/{id}/modifiers/detach
|
|
9420
|
+
|
|
9421
|
+
export interface DeleteMenuV4ModifierGroupModifiersDetachPath {
|
|
9422
|
+
id: string;
|
|
9423
|
+
}
|
|
9424
|
+
|
|
9425
|
+
export type DeleteMenuV4ModifierGroupModifiersDetachBody = {
|
|
9426
|
+
parent?: DraftModifierGroupToModifierRelationshipDTO;
|
|
9427
|
+
children?: DraftModifierGroupToModifierRelationshipDTO[];
|
|
9428
|
+
id: string;
|
|
9429
|
+
created_at?: string;
|
|
9430
|
+
updated_at?: string;
|
|
9431
|
+
deleted_at?: string;
|
|
9432
|
+
parent_id?: string;
|
|
9433
|
+
modifier_id: string;
|
|
9434
|
+
modifier_group_id: string;
|
|
9435
|
+
brand_id: string;
|
|
9436
|
+
sequence?: number;
|
|
9437
|
+
applied_diff_snapshot?: Record<string, any>;
|
|
9438
|
+
version?: number;
|
|
9439
|
+
modifier?: DraftModifierDTO;
|
|
9440
|
+
modifier_group?: DraftModifierGroupDTO;
|
|
9441
|
+
brand?: DraftBrandDTO;
|
|
9442
|
+
changes?: ModifierGroupToModifierRelationshipChangeDTO[];
|
|
9443
|
+
vendor_metadata?: VendorMetadataDTO[];
|
|
9444
|
+
permissions?: Record<string, any>;
|
|
9445
|
+
[index: string]: any;
|
|
9446
|
+
}[];
|
|
9447
|
+
|
|
9448
|
+
export interface DeleteMenuV4ModifierGroupModifiersDetachResponse {
|
|
9449
|
+
status?: string;
|
|
9450
|
+
}
|
|
9451
|
+
|
|
9452
|
+
export interface DeleteMenuV4ModifierGroupModifiersDetachRequest
|
|
9453
|
+
extends BaseRequest,
|
|
9454
|
+
DeleteMenuV4ModifierGroupModifiersDetachPath {
|
|
9455
|
+
body: DeleteMenuV4ModifierGroupModifiersDetachBody;
|
|
9456
|
+
}
|
|
9457
|
+
|
|
9393
9458
|
// PATCH /menu/v4/stock/business-unit
|
|
9394
9459
|
|
|
9395
9460
|
export interface PatchMenuV4StockBusinessUnitBody {
|
|
@@ -9625,3 +9690,63 @@ export interface PostMenuV4UnscheduleMenuResponse {
|
|
|
9625
9690
|
export interface PostMenuV4UnscheduleMenuRequest extends BaseRequest {
|
|
9626
9691
|
body: PostMenuV4UnscheduleMenuBody;
|
|
9627
9692
|
}
|
|
9693
|
+
|
|
9694
|
+
// POST /menu/v4/category/{id}/attachment/{name}
|
|
9695
|
+
|
|
9696
|
+
export interface PostMenuV4CategoryAttachmentPath {
|
|
9697
|
+
id: string;
|
|
9698
|
+
name: 'thumbnail';
|
|
9699
|
+
}
|
|
9700
|
+
|
|
9701
|
+
export interface PostMenuV4CategoryAttachmentQuery {
|
|
9702
|
+
'body.data'?: string;
|
|
9703
|
+
'body.brand_id'?: string;
|
|
9704
|
+
}
|
|
9705
|
+
|
|
9706
|
+
export interface PostMenuV4CategoryAttachmentResponse {
|
|
9707
|
+
status?: string;
|
|
9708
|
+
}
|
|
9709
|
+
|
|
9710
|
+
export interface PostMenuV4CategoryAttachmentRequest
|
|
9711
|
+
extends BaseRequest,
|
|
9712
|
+
RequestQuery<PostMenuV4CategoryAttachmentQuery>,
|
|
9713
|
+
PostMenuV4CategoryAttachmentPath {}
|
|
9714
|
+
|
|
9715
|
+
// DELETE /menu/v4/category/{id}/detach-items
|
|
9716
|
+
|
|
9717
|
+
export interface DeleteMenuV4CategoryDetachItemsPath {
|
|
9718
|
+
id: string;
|
|
9719
|
+
}
|
|
9720
|
+
|
|
9721
|
+
export type DeleteMenuV4CategoryDetachItemsBody = {
|
|
9722
|
+
parent?: DraftCategoryToItemRelationshipDTO;
|
|
9723
|
+
children?: DraftCategoryToItemRelationshipDTO[];
|
|
9724
|
+
id: string;
|
|
9725
|
+
created_at?: string;
|
|
9726
|
+
updated_at?: string;
|
|
9727
|
+
deleted_at?: string;
|
|
9728
|
+
parent_id?: string;
|
|
9729
|
+
item_id: string;
|
|
9730
|
+
category_id: string;
|
|
9731
|
+
brand_id: string;
|
|
9732
|
+
sequence?: number;
|
|
9733
|
+
applied_diff_snapshot?: Record<string, any>;
|
|
9734
|
+
version?: number;
|
|
9735
|
+
category?: DraftCategoryDTO;
|
|
9736
|
+
item?: DraftItemDTO;
|
|
9737
|
+
brand?: DraftBrandDTO;
|
|
9738
|
+
changes?: CategoryToItemRelationshipChangeDTO[];
|
|
9739
|
+
vendor_metadata?: VendorMetadataDTO[];
|
|
9740
|
+
permissions?: Record<string, any>;
|
|
9741
|
+
[index: string]: any;
|
|
9742
|
+
}[];
|
|
9743
|
+
|
|
9744
|
+
export interface DeleteMenuV4CategoryDetachItemsResponse {
|
|
9745
|
+
status?: string;
|
|
9746
|
+
}
|
|
9747
|
+
|
|
9748
|
+
export interface DeleteMenuV4CategoryDetachItemsRequest
|
|
9749
|
+
extends BaseRequest,
|
|
9750
|
+
DeleteMenuV4CategoryDetachItemsPath {
|
|
9751
|
+
body: DeleteMenuV4CategoryDetachItemsBody;
|
|
9752
|
+
}
|
package/src/interface/partner.ts
CHANGED
|
@@ -62,6 +62,43 @@ export interface ShoppingCartResponse {
|
|
|
62
62
|
order_loyalty_points?: boolean;
|
|
63
63
|
};
|
|
64
64
|
discount?: ShoppingCartResponse['promo'];
|
|
65
|
+
discounts?: {
|
|
66
|
+
id: string;
|
|
67
|
+
// unix epoch timestamp of discount creation in UTC
|
|
68
|
+
createdAt: string;
|
|
69
|
+
// unix epoch timestamp of discount update in UTC
|
|
70
|
+
updatedAt: string;
|
|
71
|
+
// id of the user who created the discount
|
|
72
|
+
createdBy: string;
|
|
73
|
+
// id of the user who updated the discount most recently
|
|
74
|
+
updatedBy: string;
|
|
75
|
+
name: string;
|
|
76
|
+
is?: {
|
|
77
|
+
badgepayPromo?: boolean;
|
|
78
|
+
mealplanPromo?: boolean;
|
|
79
|
+
decliningBalancePromo?: boolean;
|
|
80
|
+
voucherPromo?: boolean;
|
|
81
|
+
};
|
|
82
|
+
status?: {
|
|
83
|
+
live?: boolean;
|
|
84
|
+
publishedTo3rdParty?: boolean;
|
|
85
|
+
readyToPublish?: boolean;
|
|
86
|
+
};
|
|
87
|
+
meta?: {
|
|
88
|
+
provider: {
|
|
89
|
+
// Voucherify metadata
|
|
90
|
+
voucherify?: {
|
|
91
|
+
id?: string;
|
|
92
|
+
code?: string;
|
|
93
|
+
discount?: {
|
|
94
|
+
type: string;
|
|
95
|
+
amountOff?: number;
|
|
96
|
+
percentOff?: number;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
}[];
|
|
65
102
|
payment_method?: {
|
|
66
103
|
// Mealplan payment details
|
|
67
104
|
mealplan?: {
|
|
@@ -373,6 +410,14 @@ export interface LocationGroup {
|
|
|
373
410
|
alt_logo?: string | null;
|
|
374
411
|
};
|
|
375
412
|
timezone?: string;
|
|
413
|
+
device_mapping?: Record<
|
|
414
|
+
string,
|
|
415
|
+
{
|
|
416
|
+
device_type?: string;
|
|
417
|
+
site_device_id?: string;
|
|
418
|
+
name?: string;
|
|
419
|
+
}[]
|
|
420
|
+
>;
|
|
376
421
|
[index: string]: any;
|
|
377
422
|
}
|
|
378
423
|
|
|
@@ -476,7 +521,7 @@ export interface Brand {
|
|
|
476
521
|
{
|
|
477
522
|
device_type: string;
|
|
478
523
|
site_device_id: string;
|
|
479
|
-
business_units
|
|
524
|
+
business_units?: string[];
|
|
480
525
|
}[]
|
|
481
526
|
>;
|
|
482
527
|
timeslots?: {
|
|
@@ -566,11 +611,21 @@ export interface Brand {
|
|
|
566
611
|
jwo?: string;
|
|
567
612
|
time2eat?: {
|
|
568
613
|
enabled?: boolean;
|
|
614
|
+
use_timeslots?: boolean;
|
|
615
|
+
ignore_station_hours?: boolean;
|
|
569
616
|
};
|
|
570
617
|
nextep?: {
|
|
571
618
|
mobile_app?: boolean;
|
|
619
|
+
web?: boolean;
|
|
572
620
|
};
|
|
573
621
|
};
|
|
622
|
+
type_of_kds?: {
|
|
623
|
+
cdl?: boolean;
|
|
624
|
+
nextep?: boolean;
|
|
625
|
+
volante?: boolean;
|
|
626
|
+
agilysys?: boolean;
|
|
627
|
+
[index: string]: any;
|
|
628
|
+
};
|
|
574
629
|
[index: string]: any;
|
|
575
630
|
};
|
|
576
631
|
descriptions?: {
|
|
@@ -658,7 +713,6 @@ export interface WaitTime {
|
|
|
658
713
|
}
|
|
659
714
|
|
|
660
715
|
export interface Menu {
|
|
661
|
-
// menu
|
|
662
716
|
id?: string;
|
|
663
717
|
date?: {
|
|
664
718
|
created?: string;
|
|
@@ -669,13 +723,9 @@ export interface Menu {
|
|
|
669
723
|
en?: string;
|
|
670
724
|
};
|
|
671
725
|
groups?: Group[];
|
|
672
|
-
// menu
|
|
673
726
|
parent_id?: string;
|
|
674
|
-
// brand
|
|
675
727
|
location_brand?: string;
|
|
676
|
-
// company
|
|
677
728
|
company?: string;
|
|
678
|
-
// sector
|
|
679
729
|
sector?: string;
|
|
680
730
|
is?: {
|
|
681
731
|
disabled?: boolean;
|
|
@@ -713,7 +763,6 @@ export interface Menu {
|
|
|
713
763
|
}
|
|
714
764
|
|
|
715
765
|
export interface Group {
|
|
716
|
-
// group
|
|
717
766
|
id?: string;
|
|
718
767
|
name?: string;
|
|
719
768
|
label?: {
|
|
@@ -721,7 +770,6 @@ export interface Group {
|
|
|
721
770
|
fr?: string;
|
|
722
771
|
};
|
|
723
772
|
items?: {
|
|
724
|
-
// item
|
|
725
773
|
id?: string;
|
|
726
774
|
label?: {
|
|
727
775
|
en?: string;
|
|
@@ -791,7 +839,6 @@ export interface Group {
|
|
|
791
839
|
salt_free?: boolean;
|
|
792
840
|
};
|
|
793
841
|
options?: {
|
|
794
|
-
// modifier_group
|
|
795
842
|
id?: string;
|
|
796
843
|
label?: {
|
|
797
844
|
en?: string;
|
|
@@ -799,7 +846,6 @@ export interface Group {
|
|
|
799
846
|
unique_name?: string;
|
|
800
847
|
name?: string;
|
|
801
848
|
items?: {
|
|
802
|
-
// option
|
|
803
849
|
id?: string;
|
|
804
850
|
label?: {
|
|
805
851
|
en?: string;
|
package/test/client.test.ts
CHANGED
|
@@ -49,7 +49,7 @@ describe('ServiceClient', () => {
|
|
|
49
49
|
test('headers get merged', async () => {
|
|
50
50
|
const intercept = jest.fn(interceptor(200));
|
|
51
51
|
const api = new ServiceClient({
|
|
52
|
-
stage: '
|
|
52
|
+
stage: 'dev',
|
|
53
53
|
intercept,
|
|
54
54
|
headers: {
|
|
55
55
|
a: 'a from constructor',
|
|
@@ -114,6 +114,11 @@ describe('ServiceClient', () => {
|
|
|
114
114
|
expect(query).toEqual({ foo: 'test', things: ['1', '2', '3'] });
|
|
115
115
|
});
|
|
116
116
|
|
|
117
|
+
test('client throws if invalid stage is passed', async () => {
|
|
118
|
+
const api = new ServiceClient({ stage: 'invalid', intercept: interceptor(500) });
|
|
119
|
+
await expect(api.get_task('')).rejects.toBeInstanceOf(Error);
|
|
120
|
+
});
|
|
121
|
+
|
|
117
122
|
describe('ServiceError', () => {
|
|
118
123
|
// see: https://github.com/microsoft/TypeScript/issues/13965
|
|
119
124
|
test('is instance of itself', async () => {
|