Skip to content

Commit

Permalink
fix(webhook): add missing webhook types.
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasMontone committed Oct 15, 2024
1 parent 43be7c5 commit 377aee7
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/types/webhook.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { TriggeredBy } from './execution'

export const WEBHOOK_EVENTS = [
'all',
'item/created',
'item/updated',
'item/error',
Expand All @@ -9,7 +10,15 @@ export const WEBHOOK_EVENTS = [
'item/login_succeeded',
'connector/status_updated',
'transactions/deleted',
'all',
'connector/status_updated',
'payment_intent/created',
'payment_intent/completed',
'payment_intent/waiting_payer_authorization',
'payment_intent/error',
'scheduled_payment/created',
'scheduled_payment/completed',
'scheduled_payment/error',
'scheduled_payment/canceled',
] as const
/**
* @typedef WebhookEvent
Expand Down Expand Up @@ -104,4 +113,13 @@ export type WebhookEventPayload = {
paymentIntentId: string
paymentRequestId: string
}
| {
event:
| 'scheduled_payment/created'
| 'scheduled_payment/completed'
| 'scheduled_payment/error'
| 'scheduled_payment/canceled'
paymentRequestId: string
scheduledPaymentId: string
}
)

0 comments on commit 377aee7

Please sign in to comment.