The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
add featureFlag
Kiran K0116bca26633
diff --git a/apps/web/app/api/webhooks/[webhookId]/events/route.ts b/apps/web/app/api/webhooks/[webhookId]/events/route.tsindex 1da2d3e04a..95e398dcb8 100644--- a/apps/web/app/api/webhooks/[webhookId]/events/route.ts+++ b/apps/web/app/api/webhooks/[webhookId]/events/route.ts@@ -25,5 +25,6 @@ export const GET = withWorkspace(},{requiredPermissions: ["webhooks.read"],+ featureFlag: "webhooks",},);diff --git a/apps/web/app/api/webhooks/[webhookId]/route.ts b/apps/web/app/api/webhooks/[webhookId]/route.tsindex 24a7e65052..b470664f0e 100644--- a/apps/web/app/api/webhooks/[webhookId]/route.ts+++ b/apps/web/app/api/webhooks/[webhookId]/route.ts@@ -20,6 +20,7 @@ export const GET = withWorkspace(},{requiredPermissions: ["webhooks.read"],+ featureFlag: "webhooks",},);@@ -48,6 +49,7 @@ export const PATCH = withWorkspace(},{requiredPermissions: ["webhooks.write"],+ featureFlag: "webhooks",},);@@ -87,5 +89,6 @@ export const DELETE = withWorkspace(},{requiredPermissions: ["webhooks.write"],+ featureFlag: "webhooks",},);diff --git a/apps/web/app/api/webhooks/callback/route.ts b/apps/web/app/api/webhooks/callback/route.tsindex 6921860c4d..31e2eb7867 100644--- a/apps/web/app/api/webhooks/callback/route.ts+++ b/apps/web/app/api/webhooks/callback/route.ts@@ -12,7 +12,7 @@ export const POST = async (req: Request) => {await verifyQstashSignature(req, rawBody);- const { url, status, body, sourceBody, createdAt, sourceMessageId } =+ const { url, status, body, sourceBody, sourceMessageId } =webhookCallbackSchema.parse(rawBody);const request = Buffer.from(sourceBody, "base64").toString("utf-8");diff --git a/apps/web/app/api/webhooks/route.ts b/apps/web/app/api/webhooks/route.tsindex 40d647dcc5..7e508ccebf 100644--- a/apps/web/app/api/webhooks/route.ts+++ b/apps/web/app/api/webhooks/route.ts@@ -20,6 +20,7 @@ export const GET = withWorkspace(},{requiredPermissions: ["webhooks.read"],+ featureFlag: "webhooks",},);@@ -75,5 +76,6 @@ export const POST = withWorkspace(},{requiredPermissions: ["webhooks.write"],+ featureFlag: "webhooks",},);diff --git a/apps/web/lib/zod/schemas/webhooks.ts b/apps/web/lib/zod/schemas/webhooks.tsindex 804c4ad59e..86a033a42c 100644--- a/apps/web/lib/zod/schemas/webhooks.ts+++ b/apps/web/lib/zod/schemas/webhooks.ts@@ -36,7 +36,7 @@ export const webhookEventSchemaTB = z.object({response_body: z.string(),});-// Schema of the payload sent to the webhook endpoint+// Schema of the payload sent to the webhook endpoint by Dubexport const webhookPayloadSchema = z.object({event: z.enum(WEBHOOK_TRIGGERS),webhookId: z.string(),@@ -44,7 +44,7 @@ export const webhookPayloadSchema = z.object({data: z.any(),});-// Schema of the payload sent to /webhooks/callback endpoint from QStash+// Schema of response sent to the webhook callback URL by QStashexport const webhookCallbackSchema = z.object({status: z.number(),url: z.string(),