From d7d685469f7ce7558ecf28dbaaccee8bb11e6dad Mon Sep 17 00:00:00 2001 From: waleed Date: Tue, 6 Jan 2026 14:34:41 -0800 Subject: [PATCH 1/3] fix(build): fix type assertion --- apps/sim/tools/http/request.ts | 8 ++++---- apps/sim/tools/http/webhook_request.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/sim/tools/http/request.ts b/apps/sim/tools/http/request.ts index dfb26dd24d..ab3188b980 100644 --- a/apps/sim/tools/http/request.ts +++ b/apps/sim/tools/http/request.ts @@ -70,7 +70,7 @@ export const requestTool: ToolConfig = { return allHeaders }, - body: (params: RequestParams) => { + body: ((params: RequestParams) => { if (params.formData) { const formData = new FormData() Object.entries(params.formData).forEach(([key, value]) => { @@ -90,7 +90,7 @@ export const requestTool: ToolConfig = { ) { // Convert JSON object to URL-encoded string const urlencoded = new URLSearchParams() - Object.entries(params.body).forEach(([key, value]) => { + Object.entries(params.body as Record).forEach(([key, value]) => { if (value !== undefined && value !== null) { urlencoded.append(key, String(value)) } @@ -98,11 +98,11 @@ export const requestTool: ToolConfig = { return urlencoded.toString() } - return params.body + return params.body as Record } return undefined - }, + }) as (params: RequestParams) => Record | string, }, transformResponse: async (response: Response) => { diff --git a/apps/sim/tools/http/webhook_request.ts b/apps/sim/tools/http/webhook_request.ts index b873a939b7..f04da4c1f8 100644 --- a/apps/sim/tools/http/webhook_request.ts +++ b/apps/sim/tools/http/webhook_request.ts @@ -68,7 +68,7 @@ export const webhookRequestTool: ToolConfig params.body, + body: (params: WebhookRequestParams) => params.body as Record, }, transformResponse: async (response: Response) => { From 89c4e37c097438c84f388e148877f95356d7ce12 Mon Sep 17 00:00:00 2001 From: waleed Date: Tue, 6 Jan 2026 14:38:35 -0800 Subject: [PATCH 2/3] ack PR comment --- apps/sim/tools/http/request.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/sim/tools/http/request.ts b/apps/sim/tools/http/request.ts index ab3188b980..db47883f50 100644 --- a/apps/sim/tools/http/request.ts +++ b/apps/sim/tools/http/request.ts @@ -102,7 +102,7 @@ export const requestTool: ToolConfig = { } return undefined - }) as (params: RequestParams) => Record | string, + }) as (params: RequestParams) => Record | string | FormData | undefined, }, transformResponse: async (response: Response) => { From ceb8c802952dcafb5d1b7d628d576493fd17a1ca Mon Sep 17 00:00:00 2001 From: waleed Date: Tue, 6 Jan 2026 14:48:22 -0800 Subject: [PATCH 3/3] more --- apps/sim/tools/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/sim/tools/types.ts b/apps/sim/tools/types.ts index 324f254e09..36f7cf366a 100644 --- a/apps/sim/tools/types.ts +++ b/apps/sim/tools/types.ts @@ -93,7 +93,7 @@ export interface ToolConfig

{ url: string | ((params: P) => string) method: HttpMethod | ((params: P) => HttpMethod) headers: (params: P) => Record - body?: (params: P) => Record | string + body?: (params: P) => Record | string | FormData | undefined } // Post-processing (optional) - allows additional processing after the initial request