-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(*): Introduce WebhookEventPayload<TWebhookEventType> for extract…
…ing typed webhook payloads
- Loading branch information
1 parent
54a3b5b
commit cb6533b
Showing
9 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
'@clerk/tanstack-start': minor | ||
'@clerk/react-router': minor | ||
'@clerk/backend': minor | ||
'@clerk/nextjs': minor | ||
'@clerk/astro': minor | ||
'@clerk/remix': minor | ||
'@clerk/express': minor | ||
'@clerk/fastify': minor | ||
'@clerk/nuxt': minor | ||
--- | ||
|
||
Introduces `WebhookEventPayload<TWebhookEventType>`, a utility type that allows to infer webhook payloads based on event types. | ||
|
||
Usage: | ||
```ts | ||
type UserCreatedPayload = WebhookEventPayload<"user.created">; | ||
// ^? { | ||
// object: "event"; | ||
// data: UserJSON; | ||
// type: "user.created"; | ||
// } | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters