mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 19:42:27 +08:00
feat(analytics): Add refund sessionized metrics for Analytics V2 dashboard (#6616)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -16,7 +16,9 @@ use super::{
|
||||
distribution::PaymentDistributionRow, filters::PaymentFilterRow, metrics::PaymentMetricRow,
|
||||
},
|
||||
query::{Aggregate, ToSql, Window},
|
||||
refunds::{filters::RefundFilterRow, metrics::RefundMetricRow},
|
||||
refunds::{
|
||||
distribution::RefundDistributionRow, filters::RefundFilterRow, metrics::RefundMetricRow,
|
||||
},
|
||||
sdk_events::{filters::SdkEventFilter, metrics::SdkEventMetricRow},
|
||||
types::{AnalyticsCollection, AnalyticsDataSource, LoadRow, QueryExecutionError},
|
||||
};
|
||||
@ -170,6 +172,7 @@ impl super::payment_intents::filters::PaymentIntentFilterAnalytics for Clickhous
|
||||
impl super::payment_intents::metrics::PaymentIntentMetricAnalytics for ClickhouseClient {}
|
||||
impl super::refunds::metrics::RefundMetricAnalytics for ClickhouseClient {}
|
||||
impl super::refunds::filters::RefundFilterAnalytics for ClickhouseClient {}
|
||||
impl super::refunds::distribution::RefundDistributionAnalytics for ClickhouseClient {}
|
||||
impl super::frm::metrics::FrmMetricAnalytics for ClickhouseClient {}
|
||||
impl super::frm::filters::FrmFilterAnalytics for ClickhouseClient {}
|
||||
impl super::sdk_events::filters::SdkEventFilterAnalytics for ClickhouseClient {}
|
||||
@ -300,6 +303,16 @@ impl TryInto<RefundFilterRow> for serde_json::Value {
|
||||
}
|
||||
}
|
||||
|
||||
impl TryInto<RefundDistributionRow> for serde_json::Value {
|
||||
type Error = Report<ParsingError>;
|
||||
|
||||
fn try_into(self) -> Result<RefundDistributionRow, Self::Error> {
|
||||
serde_json::from_value(self).change_context(ParsingError::StructParseFailure(
|
||||
"Failed to parse RefundDistributionRow in clickhouse results",
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
impl TryInto<FrmMetricRow> for serde_json::Value {
|
||||
type Error = Report<ParsingError>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user