feat(router): add external authentication webhooks flow (#4339)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Sai Harsha Vardhan
2024-04-16 15:54:46 +05:30
committed by GitHub
parent d4dbaadb06
commit 00cd96d097
22 changed files with 512 additions and 95 deletions

View File

@ -38,6 +38,7 @@ pub enum IncomingWebhookEvent {
MandateActive,
MandateRevoked,
EndpointVerification,
ExternalAuthenticationARes,
}
pub enum WebhookFlow {
@ -48,6 +49,7 @@ pub enum WebhookFlow {
ReturnResponse,
BankTransfer,
Mandate,
ExternalAuthentication,
}
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
@ -116,6 +118,7 @@ impl From<IncomingWebhookEvent> for WebhookFlow {
IncomingWebhookEvent::EndpointVerification => Self::ReturnResponse,
IncomingWebhookEvent::SourceChargeable
| IncomingWebhookEvent::SourceTransactionCreated => Self::BankTransfer,
IncomingWebhookEvent::ExternalAuthenticationARes => Self::ExternalAuthentication,
}
}
}
@ -134,11 +137,18 @@ pub enum MandateIdType {
ConnectorMandateId(String),
}
#[derive(Clone)]
pub enum AuthenticationIdType {
AuthenticationId(String),
ConnectorAuthenticationId(String),
}
#[derive(Clone)]
pub enum ObjectReferenceId {
PaymentId(payments::PaymentIdType),
RefundId(RefundIdType),
MandateId(MandateIdType),
ExternalAuthenticationID(AuthenticationIdType),
}
pub struct IncomingWebhookDetails {