@compassdigital/sdk.typescript 4.396.0 → 4.398.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 +6 -6
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -4
- package/lib/index.js.map +1 -1
- package/lib/interface/centricos.d.ts +25 -71
- package/lib/interface/centricos.d.ts.map +1 -1
- package/lib/interface/consumer.d.ts +1 -0
- package/lib/interface/consumer.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +9 -9
- package/src/interface/centricos.ts +43 -131
- package/src/interface/consumer.ts +2 -0
|
@@ -76,6 +76,7 @@ export interface ReportGroupConfigResponse {
|
|
|
76
76
|
day_parts: DayPart[];
|
|
77
77
|
is_default: boolean;
|
|
78
78
|
modified: string;
|
|
79
|
+
timezone: string;
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
export type InternalServerErrorException = Record<string, any>;
|
|
@@ -566,18 +567,7 @@ export interface GetDiscountsResponseDTO {
|
|
|
566
567
|
meta: MetaResultsDTO;
|
|
567
568
|
}
|
|
568
569
|
|
|
569
|
-
export interface
|
|
570
|
-
// Header text for the recommendation
|
|
571
|
-
header: string;
|
|
572
|
-
// Description text for the recommendation
|
|
573
|
-
description: string;
|
|
574
|
-
// CTA text for the recommendation
|
|
575
|
-
action: string;
|
|
576
|
-
// Link to relevant CentricOS page
|
|
577
|
-
actionUrl: string;
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
export interface GetRecommendationsResponseDto {
|
|
570
|
+
export interface GetRecommendationsV1ResponseDto {
|
|
581
571
|
// UUID for the recommendation instance
|
|
582
572
|
recommendation_id: string;
|
|
583
573
|
// Start date of the recommendation timeframe
|
|
@@ -586,10 +576,6 @@ export interface GetRecommendationsResponseDto {
|
|
|
586
576
|
end_date: string;
|
|
587
577
|
// Type of recommendation
|
|
588
578
|
rec_type: string;
|
|
589
|
-
// Original raw HTML content of the recommendation
|
|
590
|
-
centric_html: string;
|
|
591
|
-
// Object containing the header, description, action, and actionUrl of the recommendation
|
|
592
|
-
parsed_transcript: Transcript;
|
|
593
579
|
// Link to relevant CentricOS page for action
|
|
594
580
|
url: string;
|
|
595
581
|
// Human-readable timeframe of the recommendation
|
|
@@ -598,117 +584,43 @@ export interface GetRecommendationsResponseDto {
|
|
|
598
584
|
visual: string;
|
|
599
585
|
}
|
|
600
586
|
|
|
601
|
-
export interface
|
|
602
|
-
//
|
|
603
|
-
|
|
604
|
-
//
|
|
605
|
-
|
|
606
|
-
//
|
|
607
|
-
|
|
608
|
-
// Average case price
|
|
609
|
-
avg_case_price: number;
|
|
610
|
-
// Average spend monthly velocity in category
|
|
611
|
-
avg_spend_monthly_velocity_in_category: number;
|
|
612
|
-
// Average spend per customer in category
|
|
613
|
-
avg_spend_per_customer_in_category: number;
|
|
614
|
-
// Cases bought per customer
|
|
615
|
-
cases_bought_per_customer: number;
|
|
616
|
-
// Total number of customers
|
|
617
|
-
total_num_of_customers: number;
|
|
618
|
-
// Spend monthly velocity
|
|
619
|
-
spend_monthly_velocity: number;
|
|
620
|
-
// Spend per customer
|
|
621
|
-
spend_per_customer: number;
|
|
622
|
-
// Items bought per customer
|
|
623
|
-
items_bought_per_customer: number;
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
export interface CpgRecommendation {
|
|
627
|
-
// Complex key
|
|
628
|
-
complex_key: string;
|
|
629
|
-
// Site ID
|
|
630
|
-
p2_site_id: string;
|
|
631
|
-
// Table data for CPG recommendations
|
|
632
|
-
table: CpgTableItem[];
|
|
633
|
-
// Recommendation ID
|
|
634
|
-
recommendation_id: string;
|
|
635
|
-
// Expanded HTML content for recommendations
|
|
636
|
-
expand_html: string;
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
export interface ExpandTableItem {
|
|
640
|
-
// Item category
|
|
641
|
-
item_category: string;
|
|
642
|
-
// Item name
|
|
643
|
-
item: string;
|
|
644
|
-
// Stations offering the item
|
|
645
|
-
stations_offering_item: string;
|
|
646
|
-
// Daily sales revenue
|
|
647
|
-
daily_sales: number;
|
|
648
|
-
// Daily quantity sold
|
|
649
|
-
daily_qty_sold: number;
|
|
650
|
-
// Site average daily sales
|
|
651
|
-
site_avg_daily_sales: number;
|
|
652
|
-
// Site average quantity
|
|
653
|
-
site_avg_qty: number;
|
|
654
|
-
// Potential additional quantity
|
|
655
|
-
potential_additional_qty: number;
|
|
656
|
-
// Potential additional sales
|
|
657
|
-
potential_additional_sales: number;
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
export interface ExpandRecommendation {
|
|
661
|
-
// Complex key
|
|
662
|
-
complex_key: string;
|
|
663
|
-
// Site ID
|
|
664
|
-
p2_site_id: string;
|
|
665
|
-
// Table data for expand recommendations
|
|
666
|
-
table: ExpandTableItem[];
|
|
667
|
-
// Recommendation ID
|
|
668
|
-
recommendation_id: string;
|
|
669
|
-
// Expanded HTML content for the recommendation
|
|
670
|
-
expand_html: string;
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
export interface ReduceTableItem {
|
|
674
|
-
// Item category
|
|
675
|
-
item_category: string;
|
|
676
|
-
// Item name
|
|
677
|
-
item_name: string;
|
|
678
|
-
// Stations offering the item
|
|
679
|
-
stations_offering_item: string;
|
|
680
|
-
// Daily sales revenue
|
|
681
|
-
daily_sales: number;
|
|
682
|
-
// Daily quantity sold
|
|
683
|
-
daily_qty_sold: number;
|
|
684
|
-
// Site average daily sales
|
|
685
|
-
site_avg_daily_sales: number;
|
|
686
|
-
// Site average quantity
|
|
687
|
-
site_avg_qty: number;
|
|
688
|
-
// Revenue conservation
|
|
689
|
-
revenue_conservation: number;
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
export interface ReduceRecommendation {
|
|
693
|
-
// Complex key
|
|
694
|
-
complex_key: string;
|
|
695
|
-
// Platform 2 site ID
|
|
696
|
-
p2_site_id: string;
|
|
697
|
-
// Table data for reduce recommendations
|
|
698
|
-
table: ReduceTableItem[];
|
|
699
|
-
// Recommendation ID
|
|
700
|
-
recommendation_id: string;
|
|
701
|
-
// Expanded HTML content for the recommendation
|
|
702
|
-
expand_html: string;
|
|
587
|
+
export interface VisualDataset {
|
|
588
|
+
// Label for the dataset
|
|
589
|
+
label: string;
|
|
590
|
+
// Unit type for formatting (currency, percent, etc)
|
|
591
|
+
unit: string;
|
|
592
|
+
// Data values for the chart
|
|
593
|
+
data: number[];
|
|
703
594
|
}
|
|
704
595
|
|
|
705
|
-
export interface
|
|
706
|
-
//
|
|
707
|
-
|
|
708
|
-
//
|
|
709
|
-
|
|
710
|
-
//
|
|
711
|
-
|
|
596
|
+
export interface RecommendationVisual {
|
|
597
|
+
// Title for the chart
|
|
598
|
+
plot_title: string;
|
|
599
|
+
// Labels for the chart x-axis
|
|
600
|
+
labels: string[];
|
|
601
|
+
// Datasets for the chart
|
|
602
|
+
datasets: VisualDataset[];
|
|
603
|
+
// Percentage difference for expand/reduce recommendations
|
|
604
|
+
revenue_pct_diff?: number;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
export interface GetRecommendationsResponseDto {
|
|
608
|
+
// Recommendation ID
|
|
609
|
+
rec_id: string;
|
|
610
|
+
// Type of recommendation
|
|
611
|
+
rec_type: string;
|
|
612
|
+
// URL for action in CentricOS
|
|
613
|
+
url: string | null;
|
|
614
|
+
// Human-readable timeframe
|
|
615
|
+
timeframe_subfilter: string;
|
|
616
|
+
// Start date of the recommendation timeframe
|
|
617
|
+
start_date: string;
|
|
618
|
+
// End date of the recommendation timeframe
|
|
619
|
+
end_date: string;
|
|
620
|
+
// Visual/chart data for the recommendation
|
|
621
|
+
visual: RecommendationVisual;
|
|
622
|
+
// Table data for the recommendation (structure varies by rec_type)
|
|
623
|
+
table: Record<string, any>[];
|
|
712
624
|
}
|
|
713
625
|
|
|
714
626
|
export interface ValidateVertexResponse {
|
|
@@ -1031,7 +943,7 @@ export interface GetCentricosDiscountsQuery {
|
|
|
1031
943
|
|
|
1032
944
|
export type GetCentricosDiscountsResponse = GetDiscountsResponseDTO;
|
|
1033
945
|
|
|
1034
|
-
// GET /centricos/recommendations/{siteId} - Get recommendations by site
|
|
946
|
+
// GET /centricos/recommendations/{siteId} - Get recommendations by site (V1 format)
|
|
1035
947
|
|
|
1036
948
|
export interface GetRecommendationsBySitePath {
|
|
1037
949
|
siteId: string;
|
|
@@ -1042,20 +954,20 @@ export interface GetRecommendationsBySiteQuery {
|
|
|
1042
954
|
_query?: string;
|
|
1043
955
|
}
|
|
1044
956
|
|
|
1045
|
-
export type GetRecommendationsBySiteResponse =
|
|
957
|
+
export type GetRecommendationsBySiteResponse = GetRecommendationsV1ResponseDto[];
|
|
1046
958
|
|
|
1047
|
-
// GET /centricos/recommendations/{siteId}
|
|
959
|
+
// GET /centricos/v2/recommendations/{siteId} - Get recommendations by site (V2 format)
|
|
1048
960
|
|
|
1049
|
-
export interface
|
|
961
|
+
export interface GetRecommendationsBySiteV2Path {
|
|
1050
962
|
siteId: string;
|
|
1051
963
|
}
|
|
1052
964
|
|
|
1053
|
-
export interface
|
|
965
|
+
export interface GetRecommendationsBySiteV2Query {
|
|
1054
966
|
// Graphql query string
|
|
1055
967
|
_query?: string;
|
|
1056
968
|
}
|
|
1057
969
|
|
|
1058
|
-
export type
|
|
970
|
+
export type GetRecommendationsBySiteV2Response = GetRecommendationsResponseDto[];
|
|
1059
971
|
|
|
1060
972
|
// POST /centricos/business-unit/{bu_id}/validate-vertex - Validate vertex for business unit
|
|
1061
973
|
|
|
@@ -2882,6 +2882,8 @@ export interface PutConsumerShoppingCartPromoRequestDto {
|
|
|
2882
2882
|
code?: string;
|
|
2883
2883
|
// The email to apply to the shopping cart
|
|
2884
2884
|
email?: string;
|
|
2885
|
+
// The associated brands for the reward code for the reward programs
|
|
2886
|
+
associated_brands?: string[];
|
|
2885
2887
|
}
|
|
2886
2888
|
|
|
2887
2889
|
export interface DeleteConsumerShoppingcartCartItemsBody {
|