@compassdigital/sdk.typescript 4.334.0 → 4.336.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 +10 -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 +67 -0
- package/lib/interface/centricos.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +14 -0
- package/lib/interface/menu.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +24 -0
- package/src/interface/centricos.ts +126 -0
- package/src/interface/menu.ts +24 -0
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1316,6 +1316,8 @@ import {
|
|
|
1316
1316
|
GetCentricosDiscountsResponse,
|
|
1317
1317
|
GetRecommendationsBySiteQuery,
|
|
1318
1318
|
GetRecommendationsBySiteResponse,
|
|
1319
|
+
GetExpandedRecommendationsBySiteQuery,
|
|
1320
|
+
GetExpandedRecommendationsBySiteResponse,
|
|
1319
1321
|
PostCentricosBusinessUnitValidateVertexResponse,
|
|
1320
1322
|
} from './interface/centricos';
|
|
1321
1323
|
|
|
@@ -14354,6 +14356,28 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
14354
14356
|
);
|
|
14355
14357
|
}
|
|
14356
14358
|
|
|
14359
|
+
/**
|
|
14360
|
+
* GET /centricos/recommendations/{siteId}/details - Get expanded recommendations by site
|
|
14361
|
+
*
|
|
14362
|
+
* @param siteId
|
|
14363
|
+
* @param options - additional request options
|
|
14364
|
+
*/
|
|
14365
|
+
get_expanded_recommendations_by_site(
|
|
14366
|
+
siteId: string,
|
|
14367
|
+
options?: {
|
|
14368
|
+
query?: GetExpandedRecommendationsBySiteQuery;
|
|
14369
|
+
} & RequestOptions,
|
|
14370
|
+
): ResponsePromise<GetExpandedRecommendationsBySiteResponse> {
|
|
14371
|
+
return this.request(
|
|
14372
|
+
'centricos',
|
|
14373
|
+
'/centricos/recommendations/{siteId}/details',
|
|
14374
|
+
'GET',
|
|
14375
|
+
`/centricos/recommendations/${siteId}/details`,
|
|
14376
|
+
null,
|
|
14377
|
+
options,
|
|
14378
|
+
);
|
|
14379
|
+
}
|
|
14380
|
+
|
|
14357
14381
|
/**
|
|
14358
14382
|
* POST /centricos/business-unit/{bu_id}/validate-vertex - Validate vertex for business unit
|
|
14359
14383
|
*
|
|
@@ -572,6 +572,119 @@ export interface GetRecommendationsResponseDto {
|
|
|
572
572
|
visual: string;
|
|
573
573
|
}
|
|
574
574
|
|
|
575
|
+
export interface CpgTableItem {
|
|
576
|
+
// Manufacturer name
|
|
577
|
+
manufacturer: string;
|
|
578
|
+
// Product name
|
|
579
|
+
product: string;
|
|
580
|
+
// Quarter over quarter sales growth percentage
|
|
581
|
+
qoq_growth: number;
|
|
582
|
+
// Average case price
|
|
583
|
+
avg_case_price: number;
|
|
584
|
+
// Average spend monthly velocity in category
|
|
585
|
+
avg_spend_monthly_velocity_in_category: number;
|
|
586
|
+
// Average spend per customer in category
|
|
587
|
+
avg_spend_per_customer_in_category: number;
|
|
588
|
+
// Cases bought per customer
|
|
589
|
+
cases_bought_per_customer: number;
|
|
590
|
+
// Total number of customers
|
|
591
|
+
total_num_of_customers: number;
|
|
592
|
+
// Spend monthly velocity
|
|
593
|
+
spend_monthly_velocity: number;
|
|
594
|
+
// Spend per customer
|
|
595
|
+
spend_per_customer: number;
|
|
596
|
+
// Items bought per customer
|
|
597
|
+
items_bought_per_customer: number;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
export interface CpgRecommendation {
|
|
601
|
+
// Complex key
|
|
602
|
+
complex_key: string;
|
|
603
|
+
// Site ID
|
|
604
|
+
p2_site_id: string;
|
|
605
|
+
// Table data for CPG recommendations
|
|
606
|
+
table: CpgTableItem[];
|
|
607
|
+
// Recommendation ID
|
|
608
|
+
recommendation_id: string;
|
|
609
|
+
// Expanded HTML content for recommendations
|
|
610
|
+
expand_html: string;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
export interface ExpandTableItem {
|
|
614
|
+
// Item category
|
|
615
|
+
item_category: string;
|
|
616
|
+
// Item name
|
|
617
|
+
item: string;
|
|
618
|
+
// Stations offering the item
|
|
619
|
+
stations_offering_item: string;
|
|
620
|
+
// Daily sales revenue
|
|
621
|
+
daily_sales: number;
|
|
622
|
+
// Daily quantity sold
|
|
623
|
+
daily_qty_sold: number;
|
|
624
|
+
// Site average daily sales
|
|
625
|
+
site_avg_daily_sales: number;
|
|
626
|
+
// Site average quantity
|
|
627
|
+
site_avg_qty: number;
|
|
628
|
+
// Potential additional quantity
|
|
629
|
+
potential_additional_qty: number;
|
|
630
|
+
// Potential additional sales
|
|
631
|
+
potential_additional_sales: number;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
export interface ExpandRecommendation {
|
|
635
|
+
// Complex key
|
|
636
|
+
complex_key: string;
|
|
637
|
+
// Site ID
|
|
638
|
+
p2_site_id: string;
|
|
639
|
+
// Table data for expand recommendations
|
|
640
|
+
table: ExpandTableItem[];
|
|
641
|
+
// Recommendation ID
|
|
642
|
+
recommendation_id: string;
|
|
643
|
+
// Expanded HTML content for the recommendation
|
|
644
|
+
expand_html: string;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
export interface ReduceTableItem {
|
|
648
|
+
// Item category
|
|
649
|
+
item_category: string;
|
|
650
|
+
// Item name
|
|
651
|
+
item_name: string;
|
|
652
|
+
// Stations offering the item
|
|
653
|
+
stations_offering_item: string;
|
|
654
|
+
// Daily sales revenue
|
|
655
|
+
daily_sales: number;
|
|
656
|
+
// Daily quantity sold
|
|
657
|
+
daily_qty_sold: number;
|
|
658
|
+
// Site average daily sales
|
|
659
|
+
site_avg_daily_sales: number;
|
|
660
|
+
// Site average quantity
|
|
661
|
+
site_avg_qty: number;
|
|
662
|
+
// Revenue conservation
|
|
663
|
+
revenue_conservation: number;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
export interface ReduceRecommendation {
|
|
667
|
+
// Complex key
|
|
668
|
+
complex_key: string;
|
|
669
|
+
// Platform 2 site ID
|
|
670
|
+
p2_site_id: string;
|
|
671
|
+
// Table data for reduce recommendations
|
|
672
|
+
table: ReduceTableItem[];
|
|
673
|
+
// Recommendation ID
|
|
674
|
+
recommendation_id: string;
|
|
675
|
+
// Expanded HTML content for the recommendation
|
|
676
|
+
expand_html: string;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
export interface GetExpandedRecommendationsResponseDto {
|
|
680
|
+
// CPG recommendation data
|
|
681
|
+
cpg?: CpgRecommendation;
|
|
682
|
+
// Expand recommendation data
|
|
683
|
+
expand?: ExpandRecommendation;
|
|
684
|
+
// Reduce recommendation data
|
|
685
|
+
reduce?: ReduceRecommendation;
|
|
686
|
+
}
|
|
687
|
+
|
|
575
688
|
export interface ValidateVertexResponse {
|
|
576
689
|
// Whether the vertex validation was successful
|
|
577
690
|
valid: boolean;
|
|
@@ -903,6 +1016,19 @@ export interface GetRecommendationsBySiteQuery {
|
|
|
903
1016
|
|
|
904
1017
|
export type GetRecommendationsBySiteResponse = GetRecommendationsResponseDto[];
|
|
905
1018
|
|
|
1019
|
+
// GET /centricos/recommendations/{siteId}/details - Get expanded recommendations by site
|
|
1020
|
+
|
|
1021
|
+
export interface GetExpandedRecommendationsBySitePath {
|
|
1022
|
+
siteId: string;
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
export interface GetExpandedRecommendationsBySiteQuery {
|
|
1026
|
+
// Graphql query string
|
|
1027
|
+
_query?: string;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
export type GetExpandedRecommendationsBySiteResponse = GetExpandedRecommendationsResponseDto;
|
|
1031
|
+
|
|
906
1032
|
// POST /centricos/business-unit/{bu_id}/validate-vertex - Validate vertex for business unit
|
|
907
1033
|
|
|
908
1034
|
export interface PostCentricosBusinessUnitValidateVertexPath {
|
package/src/interface/menu.ts
CHANGED
|
@@ -593,6 +593,28 @@ export interface GetOneOptionsDTO {
|
|
|
593
593
|
[index: string]: any;
|
|
594
594
|
}
|
|
595
595
|
|
|
596
|
+
export interface LocalMenuLabelGroupDTO {
|
|
597
|
+
// Global menu group ID
|
|
598
|
+
gmg_id: string;
|
|
599
|
+
// Global menu group name
|
|
600
|
+
gmg_name: string;
|
|
601
|
+
// Menu labels array
|
|
602
|
+
labels: MenuLabelItemDTO[];
|
|
603
|
+
[index: string]: any;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
export interface MenuLabelItemDTO {
|
|
607
|
+
// Menu label ID
|
|
608
|
+
id?: string;
|
|
609
|
+
// Menu label text
|
|
610
|
+
text: string;
|
|
611
|
+
// S3 link for menu label image
|
|
612
|
+
s3_link?: string;
|
|
613
|
+
// Base64 image data
|
|
614
|
+
image_data?: string;
|
|
615
|
+
[index: string]: any;
|
|
616
|
+
}
|
|
617
|
+
|
|
596
618
|
export interface NotFoundErrorDTO {
|
|
597
619
|
number: number;
|
|
598
620
|
message: string;
|
|
@@ -2523,6 +2545,8 @@ export interface GetMenuV3LocalMenuGroupQuery {
|
|
|
2523
2545
|
export interface GetMenuV3LocalMenuGroupResponse {
|
|
2524
2546
|
// GMG IDs currently in use by child brands
|
|
2525
2547
|
global_menu_groups_in_use?: string[];
|
|
2548
|
+
// Menu labels inherited from global menu groups in use
|
|
2549
|
+
menu_labels?: LocalMenuLabelGroupDTO[];
|
|
2526
2550
|
name: string;
|
|
2527
2551
|
is_active?: boolean;
|
|
2528
2552
|
allowed_global_menu_groups?: GlobalMenuGroupDTO[];
|