Skip to content

Commit f448314

Browse files
committed
fix(integrations): type the wealthbox write task test params
1 parent 2ea4034 commit f448314

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎apps/sim/blocks/blocks/wealthbox.test.ts‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,15 @@ function mapParams(params: Record<string, unknown>, context?: { operation: strin
1212
function taskBody(params: Record<string, unknown>) {
1313
const body = wealthboxWriteTaskTool.request.body
1414
if (!body) throw new Error('Write task tool has no request body')
15-
return body(params as Parameters<typeof body>[0])
15+
const optionalString = (value: unknown) => (typeof value === 'string' ? value : undefined)
16+
return body({
17+
accessToken: 'token',
18+
operation: 'write_task',
19+
title: optionalString(params.title),
20+
dueDate: optionalString(params.dueDate),
21+
description: optionalString(params.description),
22+
contactId: optionalString(params.contactId),
23+
})
1624
}
1725

1826
describe('Wealthbox Write Task', () => {

0 commit comments

Comments
 (0)