@compassdigital/sdk.typescript 4.475.0 → 4.477.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 +8 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +9 -0
- package/lib/index.js.map +1 -1
- package/lib/interface/centricos.d.ts +36 -2
- package/lib/interface/centricos.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +0 -79
- package/lib/interface/menu.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +19 -0
- package/src/interface/centricos.ts +65 -2
- package/src/interface/menu.ts +0 -79
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1308,6 +1308,8 @@ import {
|
|
|
1308
1308
|
GetCentricosMenuGlobalMenuGroupsResponse,
|
|
1309
1309
|
PostCentricosMenuBrandsFetchBody,
|
|
1310
1310
|
PostCentricosMenuBrandsFetchResponse,
|
|
1311
|
+
ListSwapsBody,
|
|
1312
|
+
ListSwapsResponse,
|
|
1311
1313
|
} from './interface/centricos';
|
|
1312
1314
|
|
|
1313
1315
|
import { TaxHealthCheckResponse, PostQuoteTaxBody, PostQuoteTaxResponse } from './interface/tax';
|
|
@@ -14944,6 +14946,23 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
14944
14946
|
);
|
|
14945
14947
|
}
|
|
14946
14948
|
|
|
14949
|
+
/**
|
|
14950
|
+
* POST /centricos/swaps/list - Fetch swap recommendations for a Centric brand
|
|
14951
|
+
*
|
|
14952
|
+
* @param body - Brand and site IDs
|
|
14953
|
+
* @param options - additional request options
|
|
14954
|
+
*/
|
|
14955
|
+
list_swaps(body: ListSwapsBody, options?: RequestOptions): ResponsePromise<ListSwapsResponse> {
|
|
14956
|
+
return this.request(
|
|
14957
|
+
'centricos',
|
|
14958
|
+
'/centricos/swaps/list',
|
|
14959
|
+
'POST',
|
|
14960
|
+
`/centricos/swaps/list`,
|
|
14961
|
+
body,
|
|
14962
|
+
options,
|
|
14963
|
+
);
|
|
14964
|
+
}
|
|
14965
|
+
|
|
14947
14966
|
/**
|
|
14948
14967
|
* GET /tax/v1/health-check - Health Check
|
|
14949
14968
|
*
|
|
@@ -878,7 +878,7 @@ export interface CentricMenuCategoryDTO {
|
|
|
878
878
|
id: string;
|
|
879
879
|
// The name of the entity
|
|
880
880
|
name: string;
|
|
881
|
-
items
|
|
881
|
+
items?: CentricMenuEntityBaseDTO[];
|
|
882
882
|
}
|
|
883
883
|
|
|
884
884
|
export interface CentricMenuDTO {
|
|
@@ -898,10 +898,66 @@ export interface MenuBrandResultDTO {
|
|
|
898
898
|
}
|
|
899
899
|
|
|
900
900
|
export interface PostMenuBrandsFetchResponseDTO {
|
|
901
|
-
meta
|
|
901
|
+
meta: PostMenuBrandsFetchMeta;
|
|
902
902
|
results: MenuBrandResultDTO[];
|
|
903
903
|
}
|
|
904
904
|
|
|
905
|
+
export interface SwapListRequestDto {
|
|
906
|
+
// Menu Brand ID
|
|
907
|
+
brand_id: string;
|
|
908
|
+
// Site ID
|
|
909
|
+
site_id: string;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
export interface ProjectedRevenue {
|
|
913
|
+
// Revenue last 30 days
|
|
914
|
+
revenue: number;
|
|
915
|
+
// Projected revenue if selected swaps are not published
|
|
916
|
+
projected_revenue: number;
|
|
917
|
+
// Projected revenue if selected swaps are published
|
|
918
|
+
swaps_published_revenue: number;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
export interface RevenueImpact {
|
|
922
|
+
// Extra revenue per month if this swap is applied
|
|
923
|
+
extra_revenue_per_month: number;
|
|
924
|
+
// Percentage increase in revenue if this swap is applied
|
|
925
|
+
percentage_increase: number;
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
export interface SwapItem {
|
|
929
|
+
// Centric item ID
|
|
930
|
+
item_id: string;
|
|
931
|
+
// Centric item name
|
|
932
|
+
name: string;
|
|
933
|
+
// Centric item POSID
|
|
934
|
+
posid: string;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
export interface SwapRecommendation {
|
|
938
|
+
// Unique swap recommendation identifier
|
|
939
|
+
recommendation_id: string;
|
|
940
|
+
// Revenue impact if this swap is applied
|
|
941
|
+
revenue_impact: RevenueImpact;
|
|
942
|
+
// Centric Brand ID
|
|
943
|
+
brand_id: string;
|
|
944
|
+
// Centric Menu ID
|
|
945
|
+
menu_id: string;
|
|
946
|
+
// IDs of the categories where this swap will be applied
|
|
947
|
+
categories: string[];
|
|
948
|
+
// Category item to swap out
|
|
949
|
+
swap_out: SwapItem;
|
|
950
|
+
// Category item to swap in
|
|
951
|
+
swap_in: SwapItem;
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
export interface SwapListResponseDto {
|
|
955
|
+
// Projected revenue metrics if this swap is applied
|
|
956
|
+
projected_revenue: ProjectedRevenue;
|
|
957
|
+
// List of swap recommendations
|
|
958
|
+
swaps: SwapRecommendation[];
|
|
959
|
+
}
|
|
960
|
+
|
|
905
961
|
// POST /centricos/ai/item/description - Generate item description
|
|
906
962
|
|
|
907
963
|
export type PostCentricosAiItemDescriptionBody = AIItemDescriptionRequest;
|
|
@@ -1039,6 +1095,7 @@ export interface GetCentricosSitesQuery {
|
|
|
1039
1095
|
page: number;
|
|
1040
1096
|
sortOrder: 'ASC' | 'DESC';
|
|
1041
1097
|
sortBy?: string;
|
|
1098
|
+
sector_name?: string;
|
|
1042
1099
|
}
|
|
1043
1100
|
|
|
1044
1101
|
export type GetCentricosSitesResponse = GetSitesResponse;
|
|
@@ -1218,3 +1275,9 @@ export type GetCentricosMenuGlobalMenuGroupsResponse = GetGlobalMenuGroupsRespon
|
|
|
1218
1275
|
export type PostCentricosMenuBrandsFetchBody = PostMenuBrandsFetchRequestDTO;
|
|
1219
1276
|
|
|
1220
1277
|
export type PostCentricosMenuBrandsFetchResponse = PostMenuBrandsFetchResponseDTO;
|
|
1278
|
+
|
|
1279
|
+
// POST /centricos/swaps/list - Fetch swap recommendations for a Centric brand
|
|
1280
|
+
|
|
1281
|
+
export type ListSwapsBody = SwapListRequestDto;
|
|
1282
|
+
|
|
1283
|
+
export type ListSwapsResponse = SwapListResponseDto;
|