feat: update webhook handling and triggering

This commit is contained in:
Mythie
2024-02-27 15:16:14 +11:00
parent 488464e3e7
commit 7dd2bbd8ab
17 changed files with 263 additions and 90 deletions

View File

@@ -0,0 +1,8 @@
/*
Warnings:
- Added the required column `event` to the `WebhookCall` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "WebhookCall" ADD COLUMN "event" "WebhookTriggerEvents" NOT NULL;

View File

@@ -126,16 +126,17 @@ enum WebhookCallStatus {
}
model WebhookCall {
id String @id @default(cuid())
id String @id @default(cuid())
status WebhookCallStatus
url String
event WebhookTriggerEvents
requestBody Json
responseCode Int
responseHeaders Json?
responseBody Json?
createdAt DateTime @default(now())
createdAt DateTime @default(now())
webhookId String
webhook Webhook @relation(fields: [webhookId], references: [id], onDelete: Cascade)
webhook Webhook @relation(fields: [webhookId], references: [id], onDelete: Cascade)
}
enum ApiTokenAlgorithm {