From 650699d6aa5b6aff78d9dfebad2bf8460ea89d75 Mon Sep 17 00:00:00 2001 From: Jorge Cortes Date: Tue, 25 Nov 2025 16:42:29 -0500 Subject: [PATCH] [ACTION] Freshchat - properties --- .../fetch-conversation-details.mjs | 2 +- .../actions/list-agents/list-agents.mjs | 2 +- .../list-all-conversation-properties.mjs | 26 +++++++++++++++++++ .../actions/list-channels/list-channels.mjs | 2 +- .../actions/list-messages/list-messages.mjs | 2 +- .../send-message-in-chat.mjs | 2 +- .../update-conversation-status.mjs | 2 +- components/freshchat/freshchat.app.mjs | 6 +++++ components/freshchat/package.json | 2 +- .../new-conversation-started.mjs | 2 +- .../new-message-received.mjs | 2 +- 11 files changed, 41 insertions(+), 9 deletions(-) create mode 100644 components/freshchat/actions/list-all-conversation-properties/list-all-conversation-properties.mjs diff --git a/components/freshchat/actions/fetch-conversation-details/fetch-conversation-details.mjs b/components/freshchat/actions/fetch-conversation-details/fetch-conversation-details.mjs index d0787899ffceb..c4ab426c0b5b0 100644 --- a/components/freshchat/actions/fetch-conversation-details/fetch-conversation-details.mjs +++ b/components/freshchat/actions/fetch-conversation-details/fetch-conversation-details.mjs @@ -4,7 +4,7 @@ export default { key: "freshchat-fetch-conversation-details", name: "Fetch Conversation Details", description: "Fetches details for a specific conversation. [See the documentation](https://developers.freshchat.com/api/#retrieve_a_conversation)", - version: "0.0.2", + version: "0.0.3", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/freshchat/actions/list-agents/list-agents.mjs b/components/freshchat/actions/list-agents/list-agents.mjs index 49137fc71de41..8cd018176afbc 100644 --- a/components/freshchat/actions/list-agents/list-agents.mjs +++ b/components/freshchat/actions/list-agents/list-agents.mjs @@ -5,7 +5,7 @@ export default { key: "freshchat-list-agents", name: "List Agents", description: "Lists all agents in Freshchat. [See the documentation](https://developers.freshchat.com/api/#list_all_agents)", - version: "0.0.2", + version: "0.0.3", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/freshchat/actions/list-all-conversation-properties/list-all-conversation-properties.mjs b/components/freshchat/actions/list-all-conversation-properties/list-all-conversation-properties.mjs new file mode 100644 index 0000000000000..adf31e80225df --- /dev/null +++ b/components/freshchat/actions/list-all-conversation-properties/list-all-conversation-properties.mjs @@ -0,0 +1,26 @@ +import freshchat from "../../freshchat.app.mjs"; + +export default { + key: "freshchat-list-all-conversation-properties", + name: "List All Conversation Properties", + description: "Retrieves a list of all conversation properties configured in the Freshchat system. [See the documentation](https://developers.freshchat.com/api/#list_all_conversation_properties)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + freshchat, + }, + async run({ $ }) { + const response = await this.freshchat.listConversationProperties({ + $, + }); + $.export("$summary", `Retrieved ${response.length} conversation propert${response.length === 1 + ? "y" + : "ies"}`); + return response; + }, +}; diff --git a/components/freshchat/actions/list-channels/list-channels.mjs b/components/freshchat/actions/list-channels/list-channels.mjs index 25c11fe864bf0..6cfcc852508cf 100644 --- a/components/freshchat/actions/list-channels/list-channels.mjs +++ b/components/freshchat/actions/list-channels/list-channels.mjs @@ -4,7 +4,7 @@ export default { key: "freshchat-list-channels", name: "List Channels", description: "Lists all channels in Freshchat. [See the documentation](https://developers.freshchat.com/api/#channels-(topics))", - version: "0.0.2", + version: "0.0.3", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/freshchat/actions/list-messages/list-messages.mjs b/components/freshchat/actions/list-messages/list-messages.mjs index 9c381a9b2ce25..eb768e21a9d8a 100644 --- a/components/freshchat/actions/list-messages/list-messages.mjs +++ b/components/freshchat/actions/list-messages/list-messages.mjs @@ -5,7 +5,7 @@ export default { name: "List Messages", description: "Lists all messages in a conversation. [See the documentation](https://developers.freshchat.com/api/#list_messages)", type: "action", - version: "0.0.1", + version: "0.0.2", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/freshchat/actions/send-message-in-chat/send-message-in-chat.mjs b/components/freshchat/actions/send-message-in-chat/send-message-in-chat.mjs index 11b824e77f524..a7fb80b497678 100644 --- a/components/freshchat/actions/send-message-in-chat/send-message-in-chat.mjs +++ b/components/freshchat/actions/send-message-in-chat/send-message-in-chat.mjs @@ -5,7 +5,7 @@ export default { key: "freshchat-send-message-in-chat", name: "Send Message in Chat", description: "Sends a message in a specific conversation. [See the documentation](https://developers.freshchat.com/api/#send_message_to_conversation)", - version: "0.0.3", + version: "0.0.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/freshchat/actions/update-conversation-status/update-conversation-status.mjs b/components/freshchat/actions/update-conversation-status/update-conversation-status.mjs index dff5f31a065eb..caa133d51eb99 100644 --- a/components/freshchat/actions/update-conversation-status/update-conversation-status.mjs +++ b/components/freshchat/actions/update-conversation-status/update-conversation-status.mjs @@ -5,7 +5,7 @@ export default { key: "freshchat-update-conversation-status", name: "Update Conversation Status", description: "Updates the status of a specific conversation. [See the documentation](https://developers.freshchat.com/api/#update_a_conversation)", - version: "0.0.2", + version: "0.0.3", annotations: { destructiveHint: true, openWorldHint: true, diff --git a/components/freshchat/freshchat.app.mjs b/components/freshchat/freshchat.app.mjs index 56e4c682458ba..4b17bd107b396 100644 --- a/components/freshchat/freshchat.app.mjs +++ b/components/freshchat/freshchat.app.mjs @@ -183,6 +183,12 @@ export default { ...opts, }); }, + listConversationProperties(opts = {}) { + return this._makeRequest({ + path: "/conversations/fields", + ...opts, + }); + }, sendMessageInChat({ conversationId, ...opts }) { diff --git a/components/freshchat/package.json b/components/freshchat/package.json index 9b9a8d4ea9c87..ad0f031fed3b0 100644 --- a/components/freshchat/package.json +++ b/components/freshchat/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/freshchat", - "version": "0.2.0", + "version": "0.3.0", "description": "Pipedream Freshchat Components", "main": "freshchat.app.mjs", "keywords": [ diff --git a/components/freshchat/sources/new-conversation-started/new-conversation-started.mjs b/components/freshchat/sources/new-conversation-started/new-conversation-started.mjs index a6a66421de11c..4df344b5b18bf 100644 --- a/components/freshchat/sources/new-conversation-started/new-conversation-started.mjs +++ b/components/freshchat/sources/new-conversation-started/new-conversation-started.mjs @@ -6,7 +6,7 @@ export default { key: "freshchat-new-conversation-started", name: "New Conversation Started", description: "Emit new event when a new conversation is started for a user. [See the documentation](https://developers.freshchat.com/api/#retrieve_all_conversation_for_a_user)", - version: "0.0.1", + version: "0.0.2", type: "source", dedupe: "unique", props: { diff --git a/components/freshchat/sources/new-message-received/new-message-received.mjs b/components/freshchat/sources/new-message-received/new-message-received.mjs index ca2af5b2a3ab4..66f0680e796ee 100644 --- a/components/freshchat/sources/new-message-received/new-message-received.mjs +++ b/components/freshchat/sources/new-message-received/new-message-received.mjs @@ -6,7 +6,7 @@ export default { key: "freshchat-new-message-received", name: "New Message Received", description: "Emit new event when a new message is received in a conversation. [See the documentation](https://developers.freshchat.com/api/#list_messages)", - version: "0.0.1", + version: "0.0.2", type: "source", dedupe: "unique", props: {