mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-09 15:07:55 -05:00
fix(tools): fixed trello and telegram operations (#2332)
* fixed trello output * fixed telegram --------- Co-authored-by: aadamgough <adam@sim.ai>
This commit is contained in:
@@ -381,7 +381,6 @@ export const TrelloBlock: BlockConfig<ToolResponse> = {
|
||||
text: { type: 'string', description: 'Comment text' },
|
||||
},
|
||||
outputs: {
|
||||
success: { type: 'boolean', description: 'Whether the operation was successful' },
|
||||
lists: {
|
||||
type: 'array',
|
||||
description: 'Array of list objects (for list_lists operation)',
|
||||
@@ -404,11 +403,7 @@ export const TrelloBlock: BlockConfig<ToolResponse> = {
|
||||
},
|
||||
count: {
|
||||
type: 'number',
|
||||
description: 'Number of items returned (boards, cards, actions)',
|
||||
},
|
||||
error: {
|
||||
type: 'string',
|
||||
description: 'Error message if operation failed',
|
||||
description: 'Number of items returned (lists, cards, actions)',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -48,10 +48,15 @@ export const telegramSendDocumentTool: ToolConfig<
|
||||
'Content-Type': 'application/json',
|
||||
}),
|
||||
body: (params: TelegramSendDocumentParams) => {
|
||||
let normalizedFiles: unknown[] | null = null
|
||||
if (params.files) {
|
||||
normalizedFiles = Array.isArray(params.files) ? params.files : [params.files]
|
||||
}
|
||||
|
||||
return {
|
||||
botToken: params.botToken,
|
||||
chatId: params.chatId,
|
||||
files: params.files || null,
|
||||
files: normalizedFiles,
|
||||
caption: params.caption,
|
||||
}
|
||||
},
|
||||
|
||||
@@ -86,11 +86,9 @@ export const trelloAddCommentTool: ToolConfig<TrelloAddCommentParams, TrelloAddC
|
||||
},
|
||||
|
||||
outputs: {
|
||||
success: { type: 'boolean', description: 'Whether the comment was added successfully' },
|
||||
comment: {
|
||||
type: 'object',
|
||||
description: 'The created comment object with id, text, date, and member creator',
|
||||
},
|
||||
error: { type: 'string', description: 'Error message if operation failed' },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -119,11 +119,9 @@ export const trelloCreateCardTool: ToolConfig<TrelloCreateCardParams, TrelloCrea
|
||||
},
|
||||
|
||||
outputs: {
|
||||
success: { type: 'boolean', description: 'Whether the card was created successfully' },
|
||||
card: {
|
||||
type: 'object',
|
||||
description: 'The created card object with id, name, desc, url, and other properties',
|
||||
},
|
||||
error: { type: 'string', description: 'Error message if operation failed' },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -102,12 +102,10 @@ export const trelloGetActionsTool: ToolConfig<TrelloGetActionsParams, TrelloGetA
|
||||
},
|
||||
|
||||
outputs: {
|
||||
success: { type: 'boolean', description: 'Whether the operation was successful' },
|
||||
actions: {
|
||||
type: 'array',
|
||||
description: 'Array of action objects with type, date, member, and data',
|
||||
},
|
||||
count: { type: 'number', description: 'Number of actions returned' },
|
||||
error: { type: 'string', description: 'Error message if operation failed' },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -77,13 +77,11 @@ export const trelloListCardsTool: ToolConfig<TrelloListCardsParams, TrelloListCa
|
||||
},
|
||||
|
||||
outputs: {
|
||||
success: { type: 'boolean', description: 'Whether the operation was successful' },
|
||||
cards: {
|
||||
type: 'array',
|
||||
description:
|
||||
'Array of card objects with id, name, desc, url, board/list IDs, labels, and due date',
|
||||
},
|
||||
count: { type: 'number', description: 'Number of cards returned' },
|
||||
error: { type: 'string', description: 'Error message if operation failed' },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -77,12 +77,10 @@ export const trelloListListsTool: ToolConfig<TrelloListListsParams, TrelloListLi
|
||||
},
|
||||
|
||||
outputs: {
|
||||
success: { type: 'boolean', description: 'Whether the operation was successful' },
|
||||
lists: {
|
||||
type: 'array',
|
||||
description: 'Array of list objects with id, name, closed, pos, and idBoard',
|
||||
},
|
||||
count: { type: 'number', description: 'Number of lists returned' },
|
||||
error: { type: 'string', description: 'Error message if operation failed' },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -118,11 +118,9 @@ export const trelloUpdateCardTool: ToolConfig<TrelloUpdateCardParams, TrelloUpda
|
||||
},
|
||||
|
||||
outputs: {
|
||||
success: { type: 'boolean', description: 'Whether the card was updated successfully' },
|
||||
card: {
|
||||
type: 'object',
|
||||
description: 'The updated card object with id, name, desc, url, and other properties',
|
||||
},
|
||||
error: { type: 'string', description: 'Error message if operation failed' },
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user