@compassdigital/sdk.typescript 4.472.0 → 4.474.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 +24 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +28 -0
- package/lib/index.js.map +1 -1
- package/lib/interface/centricos.d.ts +56 -29
- package/lib/interface/centricos.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +66 -0
- package/lib/interface/menu.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +67 -0
- package/src/interface/centricos.ts +89 -32
- package/src/interface/menu.ts +81 -0
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -929,6 +929,9 @@ import {
|
|
|
929
929
|
PostMenuV4BrandCategoryAttachItemsResponse,
|
|
930
930
|
PostMenuV4BrandSwapCategoryItemsBody,
|
|
931
931
|
PostMenuV4BrandSwapCategoryItemsResponse,
|
|
932
|
+
GetMenuV4BrandCatalogBackupVersionsResponse,
|
|
933
|
+
PostMenuV4BrandCatalogBackupRestoreBody,
|
|
934
|
+
PostMenuV4BrandCatalogBackupRestoreResponse,
|
|
932
935
|
PostMenuV4BrandPublishResponse,
|
|
933
936
|
PostMenuV4BrandV3ToV4Query,
|
|
934
937
|
PostMenuV4BrandV3ToV4Response,
|
|
@@ -1303,6 +1306,8 @@ import {
|
|
|
1303
1306
|
GetRecommendationsBySiteV2Response,
|
|
1304
1307
|
PostCentricosBusinessUnitValidateVertexResponse,
|
|
1305
1308
|
GetCentricosMenuGlobalMenuGroupsResponse,
|
|
1309
|
+
PostCentricosMenuBrandsFetchBody,
|
|
1310
|
+
PostCentricosMenuBrandsFetchResponse,
|
|
1306
1311
|
} from './interface/centricos';
|
|
1307
1312
|
|
|
1308
1313
|
import { TaxHealthCheckResponse, PostQuoteTaxBody, PostQuoteTaxResponse } from './interface/tax';
|
|
@@ -10762,6 +10767,48 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
10762
10767
|
);
|
|
10763
10768
|
}
|
|
10764
10769
|
|
|
10770
|
+
/**
|
|
10771
|
+
* GET /menu/v4/brand/{id}/catalog-backup/versions
|
|
10772
|
+
*
|
|
10773
|
+
* @param id
|
|
10774
|
+
* @param options - additional request options
|
|
10775
|
+
*/
|
|
10776
|
+
get_menu_v4_brand_catalog_backup_versions(
|
|
10777
|
+
id: string,
|
|
10778
|
+
options?: RequestOptions,
|
|
10779
|
+
): ResponsePromise<GetMenuV4BrandCatalogBackupVersionsResponse> {
|
|
10780
|
+
return this.request(
|
|
10781
|
+
'menu',
|
|
10782
|
+
'/menu/v4/brand/{id}/catalog-backup/versions',
|
|
10783
|
+
'GET',
|
|
10784
|
+
`/menu/v4/brand/${id}/catalog-backup/versions`,
|
|
10785
|
+
null,
|
|
10786
|
+
options,
|
|
10787
|
+
);
|
|
10788
|
+
}
|
|
10789
|
+
|
|
10790
|
+
/**
|
|
10791
|
+
* POST /menu/v4/brand/{id}/catalog-backup/restore
|
|
10792
|
+
*
|
|
10793
|
+
* @param id
|
|
10794
|
+
* @param body
|
|
10795
|
+
* @param options - additional request options
|
|
10796
|
+
*/
|
|
10797
|
+
post_menu_v4_brand_catalog_backup_restore(
|
|
10798
|
+
id: string,
|
|
10799
|
+
body: PostMenuV4BrandCatalogBackupRestoreBody,
|
|
10800
|
+
options?: RequestOptions,
|
|
10801
|
+
): ResponsePromise<PostMenuV4BrandCatalogBackupRestoreResponse> {
|
|
10802
|
+
return this.request(
|
|
10803
|
+
'menu',
|
|
10804
|
+
'/menu/v4/brand/{id}/catalog-backup/restore',
|
|
10805
|
+
'POST',
|
|
10806
|
+
`/menu/v4/brand/${id}/catalog-backup/restore`,
|
|
10807
|
+
body,
|
|
10808
|
+
options,
|
|
10809
|
+
);
|
|
10810
|
+
}
|
|
10811
|
+
|
|
10765
10812
|
/**
|
|
10766
10813
|
* POST /menu/v4/brand/{id}/publish
|
|
10767
10814
|
*
|
|
@@ -14877,6 +14924,26 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
14877
14924
|
);
|
|
14878
14925
|
}
|
|
14879
14926
|
|
|
14927
|
+
/**
|
|
14928
|
+
* POST /centricos/menu/brands/fetch - Fetch menu brands to receive an expanded menu > category > item hierarchy
|
|
14929
|
+
*
|
|
14930
|
+
* @param body
|
|
14931
|
+
* @param options - additional request options
|
|
14932
|
+
*/
|
|
14933
|
+
post_centricos_menu_brands_fetch(
|
|
14934
|
+
body: PostCentricosMenuBrandsFetchBody,
|
|
14935
|
+
options?: RequestOptions,
|
|
14936
|
+
): ResponsePromise<PostCentricosMenuBrandsFetchResponse> {
|
|
14937
|
+
return this.request(
|
|
14938
|
+
'centricos',
|
|
14939
|
+
'/centricos/menu/brands/fetch',
|
|
14940
|
+
'POST',
|
|
14941
|
+
`/centricos/menu/brands/fetch`,
|
|
14942
|
+
body,
|
|
14943
|
+
options,
|
|
14944
|
+
);
|
|
14945
|
+
}
|
|
14946
|
+
|
|
14880
14947
|
/**
|
|
14881
14948
|
* GET /tax/v1/health-check - Health Check
|
|
14882
14949
|
*
|
|
@@ -341,52 +341,64 @@ export interface CentricDiscountChannelConfig {
|
|
|
341
341
|
volante: boolean;
|
|
342
342
|
}
|
|
343
343
|
|
|
344
|
-
export interface
|
|
344
|
+
export interface CentricDiscountEntityBase {
|
|
345
|
+
// The id of the entity
|
|
345
346
|
id: string;
|
|
347
|
+
// The name of the entity
|
|
346
348
|
name: string;
|
|
347
349
|
}
|
|
348
350
|
|
|
349
|
-
export interface
|
|
351
|
+
export interface CentricDiscountMenuCategory {
|
|
352
|
+
// The id of the entity
|
|
350
353
|
id: string;
|
|
354
|
+
// The name of the entity
|
|
351
355
|
name: string;
|
|
352
|
-
items:
|
|
356
|
+
items: CentricDiscountEntityBase[];
|
|
353
357
|
}
|
|
354
358
|
|
|
355
|
-
export interface
|
|
359
|
+
export interface CentricDiscountMenu {
|
|
360
|
+
// The id of the entity
|
|
356
361
|
id: string;
|
|
362
|
+
// The name of the entity
|
|
357
363
|
name: string;
|
|
358
|
-
categories:
|
|
364
|
+
categories: CentricDiscountMenuCategory[];
|
|
359
365
|
}
|
|
360
366
|
|
|
361
|
-
export interface
|
|
367
|
+
export interface CentricDiscountItemConfigStation {
|
|
368
|
+
// The id of the entity
|
|
362
369
|
id: string;
|
|
370
|
+
// The name of the entity
|
|
363
371
|
name: string;
|
|
364
|
-
menus?:
|
|
372
|
+
menus?: CentricDiscountMenu[];
|
|
365
373
|
}
|
|
366
374
|
|
|
367
|
-
export interface
|
|
375
|
+
export interface CentricDiscountItemConfigSite {
|
|
376
|
+
// The id of the entity
|
|
368
377
|
id: string;
|
|
378
|
+
// The name of the entity
|
|
369
379
|
name: string;
|
|
370
|
-
stations:
|
|
380
|
+
stations: CentricDiscountItemConfigStation[];
|
|
371
381
|
}
|
|
372
382
|
|
|
373
|
-
export interface
|
|
383
|
+
export interface CentricDiscountMenuBrand {
|
|
384
|
+
// The id of the entity
|
|
374
385
|
id: string;
|
|
386
|
+
// The name of the entity
|
|
375
387
|
name: string;
|
|
376
|
-
menus:
|
|
388
|
+
menus: CentricDiscountMenu[];
|
|
377
389
|
}
|
|
378
390
|
|
|
379
|
-
export interface
|
|
391
|
+
export interface CentricDiscountItemLevelConfigDetails {
|
|
380
392
|
// minimum number of items to satisfy the bundle
|
|
381
393
|
minimum: number;
|
|
382
394
|
bundleGroupName?: string;
|
|
383
|
-
sites?:
|
|
384
|
-
menuBrands?:
|
|
395
|
+
sites?: CentricDiscountItemConfigSite[];
|
|
396
|
+
menuBrands?: CentricDiscountMenuBrand[];
|
|
385
397
|
}
|
|
386
398
|
|
|
387
|
-
export interface
|
|
399
|
+
export interface CentricDiscountItemLevelConfig {
|
|
388
400
|
// details of the item level config
|
|
389
|
-
details:
|
|
401
|
+
details: CentricDiscountItemLevelConfigDetails[];
|
|
390
402
|
globalMenuGroupId?: string;
|
|
391
403
|
globalMenuGroupName?: string;
|
|
392
404
|
sectorName?: string;
|
|
@@ -423,7 +435,7 @@ export interface PutDiscountVoucherifyRequestDiscount {
|
|
|
423
435
|
// what the discount applies to
|
|
424
436
|
appliesTo: 'order' | 'items';
|
|
425
437
|
// item level config of the discount
|
|
426
|
-
itemLevelConfig?:
|
|
438
|
+
itemLevelConfig?: CentricDiscountItemLevelConfig;
|
|
427
439
|
// Voucherify metadata
|
|
428
440
|
meta?: CentricVoucherifyMetaDataDiscount;
|
|
429
441
|
// discount schedule
|
|
@@ -522,7 +534,7 @@ export interface DiscountResponseDTO {
|
|
|
522
534
|
// type of the discount
|
|
523
535
|
type: 'Total Order' | 'Single Items' | 'Bundle';
|
|
524
536
|
// item level config of the discount
|
|
525
|
-
itemLevelConfig?:
|
|
537
|
+
itemLevelConfig?: CentricDiscountItemLevelConfig;
|
|
526
538
|
// number of sites associated with the discount
|
|
527
539
|
siteCount: number;
|
|
528
540
|
// number of brands associated with the discount
|
|
@@ -560,13 +572,6 @@ export interface CentricDiscountMeta {
|
|
|
560
572
|
provider: CentricMetaProvider;
|
|
561
573
|
}
|
|
562
574
|
|
|
563
|
-
export interface DiscountEntityDTO {
|
|
564
|
-
// The ID of the site
|
|
565
|
-
id: string;
|
|
566
|
-
// The name of the site
|
|
567
|
-
name: string;
|
|
568
|
-
}
|
|
569
|
-
|
|
570
575
|
export interface PutDiscountVoucherifyPublishResponseDTO {
|
|
571
576
|
// user is of discount creator
|
|
572
577
|
createdBy: string;
|
|
@@ -583,7 +588,7 @@ export interface PutDiscountVoucherifyPublishResponseDTO {
|
|
|
583
588
|
// type of the discount
|
|
584
589
|
type: 'Total Order' | 'Single Items' | 'Bundle';
|
|
585
590
|
// item level config of the discount
|
|
586
|
-
itemLevelConfig?:
|
|
591
|
+
itemLevelConfig?: CentricDiscountItemLevelConfig;
|
|
587
592
|
// number of sites associated with the discount
|
|
588
593
|
siteCount: number;
|
|
589
594
|
// number of brands associated with the discount
|
|
@@ -591,7 +596,7 @@ export interface PutDiscountVoucherifyPublishResponseDTO {
|
|
|
591
596
|
// Voucherify metadata
|
|
592
597
|
meta?: CentricDiscountMeta;
|
|
593
598
|
// List of sites where discount is published
|
|
594
|
-
sites?:
|
|
599
|
+
sites?: CentricDiscountEntityBase[];
|
|
595
600
|
id: string;
|
|
596
601
|
createdAt: string;
|
|
597
602
|
updatedAt: string;
|
|
@@ -619,7 +624,7 @@ export interface DiscountDTO {
|
|
|
619
624
|
// type of the discount
|
|
620
625
|
type: 'Total Order' | 'Single Items' | 'Bundle';
|
|
621
626
|
// item level config of the discount
|
|
622
|
-
itemLevelConfig?:
|
|
627
|
+
itemLevelConfig?: CentricDiscountItemLevelConfig;
|
|
623
628
|
// number of sites associated with the discount
|
|
624
629
|
siteCount: number;
|
|
625
630
|
// number of brands associated with the discount
|
|
@@ -636,9 +641,9 @@ export interface GetDiscountResponseDTO {
|
|
|
636
641
|
// The discount information
|
|
637
642
|
discount: DiscountDTO;
|
|
638
643
|
// The sites associated with the discount
|
|
639
|
-
sites:
|
|
644
|
+
sites: CentricDiscountEntityBase[];
|
|
640
645
|
// The brands associated with the discount
|
|
641
|
-
brands:
|
|
646
|
+
brands: CentricDiscountEntityBase[];
|
|
642
647
|
}
|
|
643
648
|
|
|
644
649
|
export interface PostDiscountActiveRequestDTO {
|
|
@@ -662,7 +667,7 @@ export interface PostDiscountActiveResponseDTO {
|
|
|
662
667
|
// type of the discount
|
|
663
668
|
type: 'Total Order' | 'Single Items' | 'Bundle';
|
|
664
669
|
// item level config of the discount
|
|
665
|
-
itemLevelConfig?:
|
|
670
|
+
itemLevelConfig?: CentricDiscountItemLevelConfig;
|
|
666
671
|
// number of sites associated with the discount
|
|
667
672
|
siteCount: number;
|
|
668
673
|
// number of brands associated with the discount
|
|
@@ -691,7 +696,7 @@ export interface GetDiscountsDiscountResponseDTO {
|
|
|
691
696
|
// type of the discount
|
|
692
697
|
type: 'Total Order' | 'Single Items' | 'Bundle';
|
|
693
698
|
// item level config of the discount
|
|
694
|
-
itemLevelConfig?:
|
|
699
|
+
itemLevelConfig?: CentricDiscountItemLevelConfig;
|
|
695
700
|
// number of sites associated with the discount
|
|
696
701
|
siteCount: number;
|
|
697
702
|
// number of brands associated with the discount
|
|
@@ -851,6 +856,52 @@ export interface GetGlobalMenuGroupsResponse {
|
|
|
851
856
|
meta?: MenuListMetadata;
|
|
852
857
|
}
|
|
853
858
|
|
|
859
|
+
export interface PostMenuBrandsFetchRequestDTO {
|
|
860
|
+
// Array of menu brand ids to fetch
|
|
861
|
+
brand_ids: string[];
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
export interface PostMenuBrandsFetchMeta {
|
|
865
|
+
// Number of brands returned
|
|
866
|
+
result_count?: number;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
export interface CentricMenuEntityBaseDTO {
|
|
870
|
+
// The id of the entity
|
|
871
|
+
id: string;
|
|
872
|
+
// The name of the entity
|
|
873
|
+
name: string;
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
export interface CentricMenuCategoryDTO {
|
|
877
|
+
// The id of the entity
|
|
878
|
+
id: string;
|
|
879
|
+
// The name of the entity
|
|
880
|
+
name: string;
|
|
881
|
+
items: CentricMenuEntityBaseDTO[];
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
export interface CentricMenuDTO {
|
|
885
|
+
// The id of the entity
|
|
886
|
+
id: string;
|
|
887
|
+
// The name of the entity
|
|
888
|
+
name: string;
|
|
889
|
+
categories: CentricMenuCategoryDTO[];
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
export interface MenuBrandResultDTO {
|
|
893
|
+
// The id of the entity
|
|
894
|
+
id: string;
|
|
895
|
+
// The name of the entity
|
|
896
|
+
name: string;
|
|
897
|
+
menus: CentricMenuDTO[];
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
export interface PostMenuBrandsFetchResponseDTO {
|
|
901
|
+
meta?: PostMenuBrandsFetchMeta;
|
|
902
|
+
results: MenuBrandResultDTO[];
|
|
903
|
+
}
|
|
904
|
+
|
|
854
905
|
// POST /centricos/ai/item/description - Generate item description
|
|
855
906
|
|
|
856
907
|
export type PostCentricosAiItemDescriptionBody = AIItemDescriptionRequest;
|
|
@@ -1161,3 +1212,9 @@ export type PostCentricosBusinessUnitValidateVertexResponse = ValidateVertexResp
|
|
|
1161
1212
|
// GET /centricos/menu/global-menu-groups - Get a paginated list of global menu groups with filtering, sorting, and relationships
|
|
1162
1213
|
|
|
1163
1214
|
export type GetCentricosMenuGlobalMenuGroupsResponse = GetGlobalMenuGroupsResponse;
|
|
1215
|
+
|
|
1216
|
+
// POST /centricos/menu/brands/fetch - Fetch menu brands to receive an expanded menu > category > item hierarchy
|
|
1217
|
+
|
|
1218
|
+
export type PostCentricosMenuBrandsFetchBody = PostMenuBrandsFetchRequestDTO;
|
|
1219
|
+
|
|
1220
|
+
export type PostCentricosMenuBrandsFetchResponse = PostMenuBrandsFetchResponseDTO;
|
package/src/interface/menu.ts
CHANGED
|
@@ -2053,6 +2053,11 @@ export interface SwappedCategoryDTO {
|
|
|
2053
2053
|
sequence?: number;
|
|
2054
2054
|
}
|
|
2055
2055
|
|
|
2056
|
+
export interface CatalogBackupVersionDTO {
|
|
2057
|
+
version_id?: string;
|
|
2058
|
+
last_modified?: string;
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2056
2061
|
export interface FetchMetaDTO {
|
|
2057
2062
|
result_count?: number;
|
|
2058
2063
|
}
|
|
@@ -8767,6 +8772,82 @@ export interface PostMenuV4BrandSwapCategoryItemsRequest
|
|
|
8767
8772
|
body: PostMenuV4BrandSwapCategoryItemsBody;
|
|
8768
8773
|
}
|
|
8769
8774
|
|
|
8775
|
+
// GET /menu/v4/brand/{id}/catalog-backup/versions
|
|
8776
|
+
|
|
8777
|
+
export interface GetMenuV4BrandCatalogBackupVersionsPath {
|
|
8778
|
+
id: string;
|
|
8779
|
+
}
|
|
8780
|
+
|
|
8781
|
+
export interface GetMenuV4BrandCatalogBackupVersionsResponse {
|
|
8782
|
+
versions?: CatalogBackupVersionDTO[];
|
|
8783
|
+
}
|
|
8784
|
+
|
|
8785
|
+
export interface GetMenuV4BrandCatalogBackupVersionsRequest
|
|
8786
|
+
extends BaseRequest,
|
|
8787
|
+
GetMenuV4BrandCatalogBackupVersionsPath {}
|
|
8788
|
+
|
|
8789
|
+
// POST /menu/v4/brand/{id}/catalog-backup/restore
|
|
8790
|
+
|
|
8791
|
+
export interface PostMenuV4BrandCatalogBackupRestorePath {
|
|
8792
|
+
id: string;
|
|
8793
|
+
}
|
|
8794
|
+
|
|
8795
|
+
export interface PostMenuV4BrandCatalogBackupRestoreBody {
|
|
8796
|
+
version_id: string;
|
|
8797
|
+
[index: string]: any;
|
|
8798
|
+
}
|
|
8799
|
+
|
|
8800
|
+
export interface PostMenuV4BrandCatalogBackupRestoreResponse {
|
|
8801
|
+
parent?: DraftBrandDTO;
|
|
8802
|
+
children?: DraftBrandDTO[];
|
|
8803
|
+
menus?: DraftMenuDTO[];
|
|
8804
|
+
categories?: DraftCategoryDTO[];
|
|
8805
|
+
category_to_item_relationships?: DraftCategoryToItemRelationshipDTO[];
|
|
8806
|
+
items?: DraftItemDTO[];
|
|
8807
|
+
item_to_modifier_group_relationships?: DraftItemToModifierGroupRelationshipDTO[];
|
|
8808
|
+
modifier_groups?: DraftModifierGroupDTO[];
|
|
8809
|
+
modifier_group_to_modifier_relationships?: DraftModifierGroupToModifierRelationshipDTO[];
|
|
8810
|
+
modifiers?: DraftModifierDTO[];
|
|
8811
|
+
statuses?: BrandStatusDTO[];
|
|
8812
|
+
audit_logs?: AuditDTO[];
|
|
8813
|
+
catalog_id?: number;
|
|
8814
|
+
published_catalog_id?: number;
|
|
8815
|
+
stocks?: StockDTO[];
|
|
8816
|
+
id: string;
|
|
8817
|
+
created_at?: string;
|
|
8818
|
+
updated_at?: string;
|
|
8819
|
+
deleted_at?: string;
|
|
8820
|
+
name: string;
|
|
8821
|
+
description?: string;
|
|
8822
|
+
is_active?: boolean;
|
|
8823
|
+
type?: 'global' | 'local';
|
|
8824
|
+
parent_id?: string;
|
|
8825
|
+
local_menu_group_id?: string;
|
|
8826
|
+
global_menu_group_id?: string;
|
|
8827
|
+
posid_segment?: string;
|
|
8828
|
+
auto_push_to_local?: boolean;
|
|
8829
|
+
frictionless_partner?: string;
|
|
8830
|
+
meta?: BrandMeta;
|
|
8831
|
+
supported_languages?: SupportedLanguages;
|
|
8832
|
+
archived_at?: string;
|
|
8833
|
+
applied_diff_snapshot?: Record<string, any>;
|
|
8834
|
+
version?: number;
|
|
8835
|
+
changes?: BrandChangeDTO[];
|
|
8836
|
+
local_menu_group?: LocalMenuGroupDTO;
|
|
8837
|
+
global_menu_group?: GlobalMenuGroupDTO;
|
|
8838
|
+
vendor_metadata?: VendorMetadataDTO[];
|
|
8839
|
+
menu_category_items?: MenuCategoryItemsDTO[];
|
|
8840
|
+
attachments?: FileAttachmentsDTO;
|
|
8841
|
+
permissions?: Record<string, any>;
|
|
8842
|
+
[index: string]: any;
|
|
8843
|
+
}
|
|
8844
|
+
|
|
8845
|
+
export interface PostMenuV4BrandCatalogBackupRestoreRequest
|
|
8846
|
+
extends BaseRequest,
|
|
8847
|
+
PostMenuV4BrandCatalogBackupRestorePath {
|
|
8848
|
+
body: PostMenuV4BrandCatalogBackupRestoreBody;
|
|
8849
|
+
}
|
|
8850
|
+
|
|
8770
8851
|
// POST /menu/v4/brand/{id}/publish
|
|
8771
8852
|
|
|
8772
8853
|
export interface PostMenuV4BrandPublishPath {
|