Skip to content

Commit d033444

Browse files
authored
Create slow-olives-fix.md
1 parent 4f2109f commit d033444

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.changeset/slow-olives-fix.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
"@trigger.dev/sdk": patch
3+
---
4+
5+
You can add Alerts in the dashboard. One of these is a webhook, which this change greatly improves.
6+
7+
The main change is that there's now an SDK function to verify and parse them (similar to Stripe SDK).
8+
9+
```ts
10+
const event = await webhooks.constructEvent(request, process.env.ALERT_WEBHOOK_SECRET!);
11+
```
12+
13+
If the signature you provide matches the one from the dashboard when you create the webhook, you will get a nicely typed object back for these three types:
14+
- "alert.run.failed"
15+
- "alert.deployment.success"
16+
- "alert.deployment.failed"

0 commit comments

Comments
 (0)