mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 17:19:15 +08:00
feat(events): add APIs to list webhook events and webhook delivery attempts (#4131)
This commit is contained in:
@ -14,6 +14,7 @@ pub mod diesel_exports {
|
||||
DbPaymentMethodIssuerCode as PaymentMethodIssuerCode, DbPaymentType as PaymentType,
|
||||
DbRefundStatus as RefundStatus,
|
||||
DbRequestIncrementalAuthorization as RequestIncrementalAuthorization,
|
||||
DbWebhookDeliveryAttempt as WebhookDeliveryAttempt,
|
||||
};
|
||||
}
|
||||
|
||||
@ -1032,6 +1033,28 @@ impl Currency {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(
|
||||
Clone,
|
||||
Copy,
|
||||
Debug,
|
||||
Eq,
|
||||
PartialEq,
|
||||
serde::Deserialize,
|
||||
serde::Serialize,
|
||||
strum::Display,
|
||||
strum::EnumString,
|
||||
ToSchema,
|
||||
)]
|
||||
#[router_derive::diesel_enum(storage_type = "db_enum")]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[strum(serialize_all = "snake_case")]
|
||||
pub enum EventClass {
|
||||
Payments,
|
||||
Refunds,
|
||||
Disputes,
|
||||
Mandates,
|
||||
}
|
||||
|
||||
#[derive(
|
||||
Clone,
|
||||
Copy,
|
||||
@ -1070,6 +1093,27 @@ pub enum EventType {
|
||||
MandateRevoked,
|
||||
}
|
||||
|
||||
#[derive(
|
||||
Clone,
|
||||
Copy,
|
||||
Debug,
|
||||
Eq,
|
||||
PartialEq,
|
||||
serde::Deserialize,
|
||||
serde::Serialize,
|
||||
strum::Display,
|
||||
strum::EnumString,
|
||||
ToSchema,
|
||||
)]
|
||||
#[router_derive::diesel_enum(storage_type = "db_enum")]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[strum(serialize_all = "snake_case")]
|
||||
pub enum WebhookDeliveryAttempt {
|
||||
InitialAttempt,
|
||||
AutomaticRetry,
|
||||
ManualRetry,
|
||||
}
|
||||
|
||||
// TODO: This decision about using KV mode or not,
|
||||
// should be taken at a top level rather than pushing it down to individual functions via an enum.
|
||||
#[derive(
|
||||
|
||||
Reference in New Issue
Block a user