mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-12 03:14:12 +08:00
feat: add routing support for v2 sdk session flow (#6763)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
50
crates/hyperswitch_interfaces/src/api/authentication.rs
Normal file
50
crates/hyperswitch_interfaces/src/api/authentication.rs
Normal file
@@ -0,0 +1,50 @@
|
||||
use hyperswitch_domain_models::{
|
||||
router_flow_types::authentication::{
|
||||
Authentication, PostAuthentication, PreAuthentication, PreAuthenticationVersionCall,
|
||||
},
|
||||
router_request_types::authentication::{
|
||||
ConnectorAuthenticationRequestData, ConnectorPostAuthenticationRequestData,
|
||||
PreAuthNRequestData,
|
||||
},
|
||||
router_response_types::AuthenticationResponseData,
|
||||
};
|
||||
|
||||
use crate::api::ConnectorIntegration;
|
||||
|
||||
/// trait ConnectorAuthentication
|
||||
pub trait ConnectorAuthentication:
|
||||
ConnectorIntegration<Authentication, ConnectorAuthenticationRequestData, AuthenticationResponseData>
|
||||
{
|
||||
}
|
||||
|
||||
/// trait ConnectorPreAuthentication
|
||||
pub trait ConnectorPreAuthentication:
|
||||
ConnectorIntegration<PreAuthentication, PreAuthNRequestData, AuthenticationResponseData>
|
||||
{
|
||||
}
|
||||
|
||||
/// trait ConnectorPreAuthenticationVersionCall
|
||||
pub trait ConnectorPreAuthenticationVersionCall:
|
||||
ConnectorIntegration<PreAuthenticationVersionCall, PreAuthNRequestData, AuthenticationResponseData>
|
||||
{
|
||||
}
|
||||
|
||||
/// trait ConnectorPostAuthentication
|
||||
pub trait ConnectorPostAuthentication:
|
||||
ConnectorIntegration<
|
||||
PostAuthentication,
|
||||
ConnectorPostAuthenticationRequestData,
|
||||
AuthenticationResponseData,
|
||||
>
|
||||
{
|
||||
}
|
||||
|
||||
/// trait ExternalAuthentication
|
||||
pub trait ExternalAuthentication:
|
||||
super::ConnectorCommon
|
||||
+ ConnectorAuthentication
|
||||
+ ConnectorPreAuthentication
|
||||
+ ConnectorPreAuthenticationVersionCall
|
||||
+ ConnectorPostAuthentication
|
||||
{
|
||||
}
|
||||
67
crates/hyperswitch_interfaces/src/api/authentication_v2.rs
Normal file
67
crates/hyperswitch_interfaces/src/api/authentication_v2.rs
Normal file
@@ -0,0 +1,67 @@
|
||||
use hyperswitch_domain_models::{
|
||||
router_data_v2::ExternalAuthenticationFlowData,
|
||||
router_flow_types::authentication::{
|
||||
Authentication, PostAuthentication, PreAuthentication, PreAuthenticationVersionCall,
|
||||
},
|
||||
router_request_types::authentication::{
|
||||
ConnectorAuthenticationRequestData, ConnectorPostAuthenticationRequestData,
|
||||
PreAuthNRequestData,
|
||||
},
|
||||
router_response_types::AuthenticationResponseData,
|
||||
};
|
||||
|
||||
use crate::api::ConnectorIntegrationV2;
|
||||
|
||||
/// trait ConnectorAuthenticationV2
|
||||
pub trait ConnectorAuthenticationV2:
|
||||
ConnectorIntegrationV2<
|
||||
Authentication,
|
||||
ExternalAuthenticationFlowData,
|
||||
ConnectorAuthenticationRequestData,
|
||||
AuthenticationResponseData,
|
||||
>
|
||||
{
|
||||
}
|
||||
|
||||
/// trait ConnectorPreAuthenticationV2
|
||||
pub trait ConnectorPreAuthenticationV2:
|
||||
ConnectorIntegrationV2<
|
||||
PreAuthentication,
|
||||
ExternalAuthenticationFlowData,
|
||||
PreAuthNRequestData,
|
||||
AuthenticationResponseData,
|
||||
>
|
||||
{
|
||||
}
|
||||
|
||||
/// trait ConnectorPreAuthenticationVersionCallV2
|
||||
pub trait ConnectorPreAuthenticationVersionCallV2:
|
||||
ConnectorIntegrationV2<
|
||||
PreAuthenticationVersionCall,
|
||||
ExternalAuthenticationFlowData,
|
||||
PreAuthNRequestData,
|
||||
AuthenticationResponseData,
|
||||
>
|
||||
{
|
||||
}
|
||||
|
||||
/// trait ConnectorPostAuthenticationV2
|
||||
pub trait ConnectorPostAuthenticationV2:
|
||||
ConnectorIntegrationV2<
|
||||
PostAuthentication,
|
||||
ExternalAuthenticationFlowData,
|
||||
ConnectorPostAuthenticationRequestData,
|
||||
AuthenticationResponseData,
|
||||
>
|
||||
{
|
||||
}
|
||||
|
||||
/// trait ExternalAuthenticationV2
|
||||
pub trait ExternalAuthenticationV2:
|
||||
super::ConnectorCommon
|
||||
+ ConnectorAuthenticationV2
|
||||
+ ConnectorPreAuthenticationV2
|
||||
+ ConnectorPreAuthenticationVersionCallV2
|
||||
+ ConnectorPostAuthenticationV2
|
||||
{
|
||||
}
|
||||
@@ -39,3 +39,14 @@ pub trait FraudCheckRecordReturn:
|
||||
ConnectorIntegration<RecordReturn, FraudCheckRecordReturnData, FraudCheckResponseData>
|
||||
{
|
||||
}
|
||||
|
||||
/// trait FraudCheck
|
||||
pub trait FraudCheck:
|
||||
super::ConnectorCommon
|
||||
+ FraudCheckSale
|
||||
+ FraudCheckTransaction
|
||||
+ FraudCheckCheckout
|
||||
+ FraudCheckFulfillment
|
||||
+ FraudCheckRecordReturn
|
||||
{
|
||||
}
|
||||
|
||||
@@ -45,3 +45,14 @@ pub trait FraudCheckRecordReturnV2:
|
||||
>
|
||||
{
|
||||
}
|
||||
|
||||
/// trait FraudCheckV2
|
||||
pub trait FraudCheckV2:
|
||||
super::ConnectorCommon
|
||||
+ FraudCheckSaleV2
|
||||
+ FraudCheckTransactionV2
|
||||
+ FraudCheckCheckoutV2
|
||||
+ FraudCheckFulfillmentV2
|
||||
+ FraudCheckRecordReturnV2
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user