@@ -7281,19 +7281,32 @@ pub struct EventAnalyticsFilter {
72817281 pub metadata_filter : Option < String > ,
72827282}
72837283
7284- #[ derive( Debug , Serialize , Deserialize , ToSchema , Clone , Display ) ]
7284+ #[ derive( Debug , Serialize , Deserialize , ToSchema , Clone , Display , PartialEq , PartialOrd ) ]
72857285#[ serde( rename_all = "snake_case" ) ]
72867286pub enum EventTypesFilter {
7287- #[ display( fmt = "add_to_cart" ) ]
7288- AddToCart ,
7289- #[ display( fmt = "purchase" ) ]
7290- Purchase ,
72917287 #[ display( fmt = "view" ) ]
72927288 View ,
7293- #[ display( fmt = "click" ) ]
7294- Click ,
72957289 #[ display( fmt = "filter_clicked" ) ]
72967290 FilterClicked ,
7291+ #[ display( fmt = "click" ) ]
7292+ Click ,
7293+ #[ display( fmt = "add_to_cart" ) ]
7294+ AddToCart ,
7295+ #[ display( fmt = "purchase" ) ]
7296+ Purchase ,
7297+ }
7298+
7299+ impl EventTypesFilter {
7300+ pub fn from_string ( value : & str ) -> EventTypesFilter {
7301+ match value {
7302+ "view" => EventTypesFilter :: View ,
7303+ "filter_clicked" => EventTypesFilter :: FilterClicked ,
7304+ "click" => EventTypesFilter :: Click ,
7305+ "add_to_cart" => EventTypesFilter :: AddToCart ,
7306+ "purchase" => EventTypesFilter :: Purchase ,
7307+ _ => EventTypesFilter :: View ,
7308+ }
7309+ }
72977310}
72987311
72997312#[ derive( Debug , Serialize , Deserialize , ToSchema , Clone ) ]
@@ -8040,7 +8053,6 @@ pub struct SearchAverageRatingResponse {
80408053#[ derive( Debug , Row , Serialize , Deserialize , ToSchema ) ]
80418054pub struct TopicQueriesResponse {
80428055 pub topics : Vec < ClickhouseTopicAnalyticsSummary > ,
8043- pub events : Vec < EventData > ,
80448056}
80458057
80468058#[ derive( Debug , Row , Serialize , Deserialize , ToSchema ) ]
@@ -8060,6 +8072,7 @@ pub struct TopicAnalyticsSummaryClickhouse {
80608072 pub avg_hallucination_score : f64 ,
80618073 pub avg_query_rating : Option < f64 > ,
80628074 pub products_shown : u64 ,
8075+ pub status : String ,
80638076}
80648077
80658078#[ derive( Debug , Serialize , Deserialize , ToSchema ) ]
@@ -8075,6 +8088,7 @@ pub struct ClickhouseTopicAnalyticsSummary {
80758088 pub avg_hallucination_score : f64 ,
80768089 pub avg_query_rating : Option < f64 > ,
80778090 pub products_shown : u64 ,
8091+ pub status : String ,
80788092}
80798093
80808094impl From < TopicAnalyticsSummaryClickhouse > for ClickhouseTopicAnalyticsSummary {
@@ -8091,6 +8105,7 @@ impl From<TopicAnalyticsSummaryClickhouse> for ClickhouseTopicAnalyticsSummary {
80918105 avg_hallucination_score : value. avg_hallucination_score ,
80928106 avg_query_rating : value. avg_query_rating ,
80938107 products_shown : value. products_shown ,
8108+ status : value. status ,
80948109 }
80958110 }
80968111}
0 commit comments