Skip to content

Commit 8baa623

Browse files
committed
fix(agentphone): normalize numeric ids in response transformers
1 parent 73806cd commit 8baa623

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎apps/sim/tools/agentphone/delete_contact.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const agentphoneDeleteContactTool: ToolConfig<
4141
},
4242

4343
transformResponse: async (response, params): Promise<AgentPhoneDeleteContactResult> => {
44-
const contactId = params?.contactId?.trim() ?? ''
44+
const contactId = String(params?.contactId ?? '').trim()
4545

4646
if (!response.ok) {
4747
let errorMessage = 'Failed to delete contact'

‎apps/sim/tools/agentphone/get_call_transcript.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const agentphoneGetCallTranscriptTool: ToolConfig<
4343

4444
transformResponse: async (response, params): Promise<AgentPhoneGetCallTranscriptResult> => {
4545
const data = await response.json()
46-
const callId = params?.callId?.trim() ?? ''
46+
const callId = String(params?.callId ?? '').trim()
4747

4848
if (!response.ok) {
4949
return {

‎apps/sim/tools/agentphone/react_to_message.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const agentphoneReactToMessageTool: ToolConfig<
5050

5151
transformResponse: async (response, params): Promise<AgentPhoneReactToMessageResult> => {
5252
const data = await response.json()
53-
const messageId = params?.messageId?.trim() ?? ''
53+
const messageId = String(params?.messageId ?? '').trim()
5454

5555
if (!response.ok) {
5656
return {

‎apps/sim/tools/agentphone/release_number.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const agentphoneReleaseNumberTool: ToolConfig<
4141
},
4242

4343
transformResponse: async (response, params): Promise<AgentPhoneReleaseNumberResult> => {
44-
const numberId = params?.numberId?.trim() ?? ''
44+
const numberId = String(params?.numberId ?? '').trim()
4545

4646
if (!response.ok) {
4747
let errorMessage = 'Failed to release phone number'

0 commit comments

Comments
 (0)