Skip to content

Commit 377aee7

Browse files
fix(webhook): add missing webhook types.
1 parent 43be7c5 commit 377aee7

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

src/types/webhook.ts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { TriggeredBy } from './execution'
22

33
export const WEBHOOK_EVENTS = [
4+
'all',
45
'item/created',
56
'item/updated',
67
'item/error',
@@ -9,7 +10,15 @@ export const WEBHOOK_EVENTS = [
910
'item/login_succeeded',
1011
'connector/status_updated',
1112
'transactions/deleted',
12-
'all',
13+
'connector/status_updated',
14+
'payment_intent/created',
15+
'payment_intent/completed',
16+
'payment_intent/waiting_payer_authorization',
17+
'payment_intent/error',
18+
'scheduled_payment/created',
19+
'scheduled_payment/completed',
20+
'scheduled_payment/error',
21+
'scheduled_payment/canceled',
1322
] as const
1423
/**
1524
* @typedef WebhookEvent
@@ -104,4 +113,13 @@ export type WebhookEventPayload = {
104113
paymentIntentId: string
105114
paymentRequestId: string
106115
}
116+
| {
117+
event:
118+
| 'scheduled_payment/created'
119+
| 'scheduled_payment/completed'
120+
| 'scheduled_payment/error'
121+
| 'scheduled_payment/canceled'
122+
paymentRequestId: string
123+
scheduledPaymentId: string
124+
}
107125
)

0 commit comments

Comments
 (0)