feat(core): Implement 3ds decision manger for V2 (#7022)

This commit is contained in:
Swangi Kumari
2025-02-05 19:07:46 +05:30
committed by GitHub
parent 67ea754e38
commit 1900959778
22 changed files with 364 additions and 155 deletions

View File

@ -1,4 +1,4 @@
use std::fmt;
use std::{collections::HashMap, fmt};
use serde::Serialize;
@ -159,3 +159,25 @@ pub enum ValueType {
EnumVariants(Vec<EuclidValue>),
Number,
}
impl EuclidAnalysable for common_enums::AuthenticationType {
fn get_dir_value_for_analysis(&self, rule_name: String) -> Vec<(dir::DirValue, Metadata)> {
let auth = self.to_string();
let dir_value = match self {
Self::ThreeDs => dir::DirValue::AuthenticationType(Self::ThreeDs),
Self::NoThreeDs => dir::DirValue::AuthenticationType(Self::NoThreeDs),
};
vec![(
dir_value,
HashMap::from_iter([(
"AUTHENTICATION_TYPE".to_string(),
serde_json::json!({
"rule_name": rule_name,
"Authentication_type": auth,
}),
)]),
)]
}
}