From 74efa1f86ee259e6ca0e4f4535d10b57f32bab75 Mon Sep 17 00:00:00 2001 From: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com> Date: Thu, 19 May 2022 16:35:25 +0530 Subject: [PATCH 1/3] Updates Webhook pick --- lib/validations/webhook.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/validations/webhook.ts b/lib/validations/webhook.ts index 0340f8d707..fe9fe1533a 100644 --- a/lib/validations/webhook.ts +++ b/lib/validations/webhook.ts @@ -36,8 +36,9 @@ export const schemaWebhookReadPublic = Webhook.pick({ id: true, userId: true, eventTypeId: true, - uid: true, - title: true, - startTime: true, - endTime: true, + payloadTemplate: true, + eventTriggers: true, + eventType: true, + app: true, + appId: true, }); From bc844f29bacb09d817eed14d53f49773ec2e0850 Mon Sep 17 00:00:00 2001 From: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com> Date: Thu, 19 May 2022 16:38:44 +0530 Subject: [PATCH 2/3] Updates Webhook edit params --- lib/validations/webhook.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/validations/webhook.ts b/lib/validations/webhook.ts index fe9fe1533a..a543fcfec1 100644 --- a/lib/validations/webhook.ts +++ b/lib/validations/webhook.ts @@ -23,10 +23,9 @@ export const schemaWebhookCreateBodyParams = schemaWebhookBaseBodyParams.merge(s const schemaWebhookEditParams = z .object({ - uid: z.string().optional(), - title: z.string().optional(), - startTime: z.date().optional(), - endTime: z.date().optional(), + payloadTemplate: z.string().optional(), + eventTriggers: z.string().optional(), + subscriberUrl: z.date().optional(), }) .strict(); From 95a1e32454fd728a826b36553af278f05c9d5f76 Mon Sep 17 00:00:00 2001 From: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com> Date: Thu, 19 May 2022 16:40:27 +0530 Subject: [PATCH 3/3] Fixes subscriber URL z type --- lib/validations/webhook.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/validations/webhook.ts b/lib/validations/webhook.ts index a543fcfec1..dc8f8bb41f 100644 --- a/lib/validations/webhook.ts +++ b/lib/validations/webhook.ts @@ -25,7 +25,7 @@ const schemaWebhookEditParams = z .object({ payloadTemplate: z.string().optional(), eventTriggers: z.string().optional(), - subscriberUrl: z.date().optional(), + subscriberUrl: z.string().optional(), }) .strict();