From 5e8932001c35548101295642dff289b9895aa521 Mon Sep 17 00:00:00 2001
From: nitin <142569587+ehconitin@users.noreply.github.com>
Date: Tue, 23 Jun 2026 20:22:44 +0530
Subject: [PATCH] Simplify Recall webhook logic function config (#22026)
---
.../src/logic-functions/recall-webhook.ts | 30 ++-----------------
1 file changed, 3 insertions(+), 27 deletions(-)
diff --git a/packages/twenty-apps/internal/twenty-meeting-bot/src/logic-functions/recall-webhook.ts b/packages/twenty-apps/internal/twenty-meeting-bot/src/logic-functions/recall-webhook.ts
index 4a9c817dd3..770989bab1 100644
--- a/packages/twenty-apps/internal/twenty-meeting-bot/src/logic-functions/recall-webhook.ts
+++ b/packages/twenty-apps/internal/twenty-meeting-bot/src/logic-functions/recall-webhook.ts
@@ -1,10 +1,6 @@
import { isNull, isUndefined } from '@sniptt/guards';
import { CoreApiClient } from 'twenty-client-sdk/core';
-import {
- defineLogicFunction,
- type LogicFunctionConfig,
- type RoutePayload,
-} from 'twenty-sdk/define';
+import { defineLogicFunction, type RoutePayload } from 'twenty-sdk/define';
import { Response } from 'twenty-sdk/logic-function';
import { RECALL_WEBHOOK_LOGIC_FUNCTION_UNIVERSAL_IDENTIFIER } from 'src/constants/recall-webhook-logic-function-universal-identifier';
@@ -15,18 +11,6 @@ import { verifyRecallWebhookSignature } from 'src/logic-functions/recall-api/ver
import { getApplicationVariableValue } from 'src/logic-functions/utils/get-application-variable-value.util';
import { isNonEmptyString } from 'src/logic-functions/utils/is-non-empty-string.util';
-type ServerWebhookTriggerSettings = {
- workspaceIdResolver: {
- source: 'body' | 'query' | 'header';
- path: string;
- };
- forwardedRequestHeaders?: string[];
-};
-
-type RecallWebhookLogicFunctionConfig = LogicFunctionConfig & {
- serverWebhookTriggerSettings: ServerWebhookTriggerSettings;
-};
-
// Non-2xx makes Svix retry; a returned plain object would 200-ack permanently.
const rejectWebhook = (status: number, error: string): Response => {
console.error(`[twenty-meeting-bot] webhook rejected: ${error}`);
@@ -80,7 +64,7 @@ export const recallWebhookRouteHandler = async (
});
};
-const recallWebhookLogicFunctionConfig = {
+export default defineLogicFunction({
universalIdentifier: RECALL_WEBHOOK_LOGIC_FUNCTION_UNIVERSAL_IDENTIFIER,
name: 'recall-webhook',
description:
@@ -101,12 +85,4 @@ const recallWebhookLogicFunctionConfig = {
'svix-signature',
],
},
-} satisfies RecallWebhookLogicFunctionConfig;
-
-const recallWebhookLogicFunction = defineLogicFunction(
- recallWebhookLogicFunctionConfig,
-) as ReturnType & {
- config: RecallWebhookLogicFunctionConfig;
-};
-
-export default recallWebhookLogicFunction;
+});