Skip to content

Commit 3761486

Browse files
Adam Goughwaleed
authored andcommitted
build fix
1 parent 8f6310b commit 3761486

10 files changed

Lines changed: 17 additions & 25 deletions

File tree

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/components/webhook/webhook.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ export interface MicrosoftTeamsConfig {
9393
hmacSecret: string
9494
}
9595

96+
export interface HubSpotConfig {
97+
triggerId?: string
98+
}
99+
96100
// Union type for all provider configurations
97101
export type ProviderConfig =
98102
| WhatsAppConfig
@@ -105,6 +109,7 @@ export type ProviderConfig =
105109
| GmailConfig
106110
| OutlookConfig
107111
| MicrosoftTeamsConfig
112+
| HubSpotConfig
108113
| Record<string, never>
109114

110115
// Define available webhook providers

apps/sim/background/webhook-execution.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -329,19 +329,6 @@ async function executeWebhookJobInternal(
329329

330330
const input = await formatWebhookInput(actualWebhook, mockWorkflow, payload.body, mockRequest)
331331

332-
// Log HubSpot webhook input for debugging
333-
if (payload.provider === 'hubspot') {
334-
logger.info(`[${requestId}] HubSpot webhook input formatted`, {
335-
workflowId: payload.workflowId,
336-
executionId,
337-
eventType: input?.eventType,
338-
objectId: input?.objectId,
339-
portalId: input?.portalId,
340-
triggerId: actualWebhook.providerConfig?.triggerId,
341-
hasInput: !!input,
342-
})
343-
}
344-
345332
if (!input && payload.provider === 'whatsapp') {
346333
logger.info(`[${requestId}] No messages in WhatsApp payload, skipping execution`)
347334
await loggingSession.safeComplete({

apps/sim/tools/hubspot/create_company.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const hubspotCreateCompanyTool: ToolConfig<
6464
body.associations = params.associations
6565
}
6666

67-
return JSON.stringify(body)
67+
return body
6868
},
6969
},
7070

apps/sim/tools/hubspot/create_contact.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export const hubspotCreateContactTool: ToolConfig<
6767
body.associations = params.associations
6868
}
6969

70-
return JSON.stringify(body)
70+
return body
7171
},
7272
},
7373

apps/sim/tools/hubspot/search_companies.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export const hubspotSearchCompaniesTool: ToolConfig<
103103
body.after = params.after
104104
}
105105

106-
return JSON.stringify(body)
106+
return body
107107
},
108108
},
109109

apps/sim/tools/hubspot/search_contacts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export const hubspotSearchContactsTool: ToolConfig<
103103
body.after = params.after
104104
}
105105

106-
return JSON.stringify(body)
106+
return body
107107
},
108108
},
109109

apps/sim/tools/hubspot/update_company.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ export const hubspotUpdateCompanyTool: ToolConfig<
6969
}
7070
},
7171
body: (params) => {
72-
return JSON.stringify({
72+
return {
7373
properties: params.properties,
74-
})
74+
}
7575
},
7676
},
7777

apps/sim/tools/hubspot/update_contact.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ export const hubspotUpdateContactTool: ToolConfig<
6969
}
7070
},
7171
body: (params) => {
72-
return JSON.stringify({
72+
return {
7373
properties: params.properties,
74-
})
74+
}
7575
},
7676
},
7777

apps/sim/tools/salesforce/contacts.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export const salesforceGetContactsTool: ToolConfig<
149149
}
150150

151151
// Single contact response
152-
if (params.contactId) {
152+
if (params?.contactId) {
153153
return {
154154
success: true,
155155
output: {
@@ -552,7 +552,7 @@ export const salesforceUpdateContactTool: ToolConfig<
552552
return {
553553
success: true,
554554
output: {
555-
id: params.contactId,
555+
id: params?.contactId || '',
556556
updated: true,
557557
metadata: { operation: 'update_contact' as const },
558558
},
@@ -636,7 +636,7 @@ export const salesforceDeleteContactTool: ToolConfig<
636636
return {
637637
success: true,
638638
output: {
639-
id: params.contactId,
639+
id: params?.contactId || '',
640640
deleted: true,
641641
metadata: { operation: 'delete_contact' as const },
642642
},

apps/sim/tools/salesforce/delete_account.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export const salesforceDeleteAccountTool: ToolConfig<
121121
return {
122122
success: true,
123123
output: {
124-
id: params.accountId,
124+
id: params?.accountId || '',
125125
deleted: true,
126126
metadata: {
127127
operation: 'delete_account' as const,

0 commit comments

Comments
 (0)