diff --git a/components/belco/actions/add-note-to-conversation/add-note-to-conversation.mjs b/components/belco/actions/add-note-to-conversation/add-note-to-conversation.mjs index 481c4e78e2ef5..80d4fa05e5740 100644 --- a/components/belco/actions/add-note-to-conversation/add-note-to-conversation.mjs +++ b/components/belco/actions/add-note-to-conversation/add-note-to-conversation.mjs @@ -4,7 +4,7 @@ export default { key: "belco-add-note-to-conversation", name: "Add Note to Conversation", description: "Add a note to a conversation specified by ID. [See the documentation](https://developers.belco.io/reference/put_conversations-conversationid-addnote)", - version: "0.0.2", + version: "0.0.3", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/belco/actions/add-tags-to-conversation/add-tags-to-conversation.mjs b/components/belco/actions/add-tags-to-conversation/add-tags-to-conversation.mjs new file mode 100644 index 0000000000000..73ae65e4c996f --- /dev/null +++ b/components/belco/actions/add-tags-to-conversation/add-tags-to-conversation.mjs @@ -0,0 +1,39 @@ +import belco from "../../belco.app.mjs"; + +export default { + key: "belco-add-tags-to-conversation", + name: "Add Tags to Conversation", + description: "Add tags to a conversation. [See the documentation](https://developers.belco.io/reference/add-tags-to-a-conversation)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: false, + }, + props: { + belco, + conversationId: { + propDefinition: [ + belco, + "conversationId", + ], + }, + tags: { + type: "string[]", + label: "Tags", + description: "The tags to add to the conversation", + }, + }, + async run({ $ }) { + const response = await this.belco.addTagsToConversation({ + $, + conversationId: this.conversationId, + data: { + tags: this.tags, + }, + }); + $.export("$summary", `Successfully added tags to conversation: ${this.conversationId}`); + return response; + }, +}; diff --git a/components/belco/actions/close-conversation/close-conversation.mjs b/components/belco/actions/close-conversation/close-conversation.mjs index c72d16d7b7b6e..8cd17ec77e638 100644 --- a/components/belco/actions/close-conversation/close-conversation.mjs +++ b/components/belco/actions/close-conversation/close-conversation.mjs @@ -4,7 +4,7 @@ export default { key: "belco-close-conversation", name: "Close Conversation", description: "Close a conversation specified by ID. [See the documentation](https://developers.belco.io/reference/put_conversations-conversationid-close)", - version: "0.0.2", + version: "0.0.3", annotations: { destructiveHint: true, openWorldHint: true, diff --git a/components/belco/actions/create-conversation/create-conversation.mjs b/components/belco/actions/create-conversation/create-conversation.mjs index 4698c047f3002..e6855647600b8 100644 --- a/components/belco/actions/create-conversation/create-conversation.mjs +++ b/components/belco/actions/create-conversation/create-conversation.mjs @@ -4,7 +4,7 @@ export default { key: "belco-create-conversation", name: "Create Conversation", description: "Create a conversation from Belco. [See the documentation](https://developers.belco.io/reference/post_conversations)", - version: "0.0.2", + version: "0.0.3", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/belco/actions/list-all-conversations/list-all-conversations.mjs b/components/belco/actions/list-all-conversations/list-all-conversations.mjs index 0cb2db4cede21..5a3d3251d681c 100644 --- a/components/belco/actions/list-all-conversations/list-all-conversations.mjs +++ b/components/belco/actions/list-all-conversations/list-all-conversations.mjs @@ -4,7 +4,7 @@ export default { key: "belco-list-all-conversations", name: "List All Conversations", description: "Get a list of conversations from Belco. [See the documentation](https://developers.belco.io/reference/get_conversations)", - version: "0.0.2", + version: "0.0.3", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/belco/actions/reopen-conversation/reopen-conversation.mjs b/components/belco/actions/reopen-conversation/reopen-conversation.mjs index 3091d78fa81df..ab8374c71cdb6 100644 --- a/components/belco/actions/reopen-conversation/reopen-conversation.mjs +++ b/components/belco/actions/reopen-conversation/reopen-conversation.mjs @@ -4,7 +4,7 @@ export default { key: "belco-reopen-conversation", name: "Reopen Conversation", description: "Reopen a conversation specified by ID. [See the documentation](https://developers.belco.io/reference/put_conversations-conversationid-open)", - version: "0.0.2", + version: "0.0.3", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/belco/actions/reply-to-conversation/reply-to-conversation.mjs b/components/belco/actions/reply-to-conversation/reply-to-conversation.mjs index c24e9bd20e7d7..8070933c8f584 100644 --- a/components/belco/actions/reply-to-conversation/reply-to-conversation.mjs +++ b/components/belco/actions/reply-to-conversation/reply-to-conversation.mjs @@ -4,7 +4,7 @@ export default { key: "belco-reply-to-conversation", name: "Reply to Conversation", description: "Reply to a conversation specified by ID. [See the documentation](https://developers.belco.io/reference/put_conversations-conversationid-reply)", - version: "0.0.2", + version: "0.0.3", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/belco/actions/retrieve-conversation/retrieve-conversation.mjs b/components/belco/actions/retrieve-conversation/retrieve-conversation.mjs index b2aa8818b8ac8..3784e25b82871 100644 --- a/components/belco/actions/retrieve-conversation/retrieve-conversation.mjs +++ b/components/belco/actions/retrieve-conversation/retrieve-conversation.mjs @@ -4,7 +4,7 @@ export default { key: "belco-retrieve-conversation", name: "Retrieve Conversation", description: "Retrieve a conversation specified by ID. [See the documentation](https://developers.belco.io/reference/get_conversations-conversationid)", - version: "0.0.2", + version: "0.0.3", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/belco/actions/send-message/send-message.mjs b/components/belco/actions/send-message/send-message.mjs index 81b33af0d3ac0..50b6a77035a1a 100644 --- a/components/belco/actions/send-message/send-message.mjs +++ b/components/belco/actions/send-message/send-message.mjs @@ -4,7 +4,7 @@ export default { key: "belco-send-message", name: "Send Message", description: "Send a message to a conversation specified by ID. [See the documentation](https://developers.belco.io/reference/post_conversations-sendmessage)", - version: "0.0.2", + version: "0.0.3", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/belco/belco.app.mjs b/components/belco/belco.app.mjs index ca08161e788b8..bb0aafb33447c 100644 --- a/components/belco/belco.app.mjs +++ b/components/belco/belco.app.mjs @@ -237,6 +237,15 @@ export default { ...opts, }); }, + addTagsToConversation({ + conversationId, ...opts + }) { + return this._makeRequest({ + method: "PUT", + path: `/conversations/${conversationId}/tags`, + ...opts, + }); + }, async *paginate({ fn, params = {}, maxResults = null, ...opts }) { diff --git a/components/belco/package.json b/components/belco/package.json index 417e9689a7ea9..26514a0d424b2 100644 --- a/components/belco/package.json +++ b/components/belco/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/belco", - "version": "0.1.0", + "version": "0.2.0", "description": "Pipedream Belco Components", "main": "belco.app.mjs", "keywords": [ diff --git a/components/belco/sources/new-conversation/new-conversation.mjs b/components/belco/sources/new-conversation/new-conversation.mjs index 095b8086d9ca4..fb2218d06bb2e 100644 --- a/components/belco/sources/new-conversation/new-conversation.mjs +++ b/components/belco/sources/new-conversation/new-conversation.mjs @@ -5,7 +5,7 @@ export default { key: "belco-new-conversation", name: "New Conversation", description: "Emit new conversation event when a new conversation is created. [See the documentation](https://developers.belco.io/reference/get_conversations)", - version: "0.0.1", + version: "0.0.2", type: "source", dedupe: "unique", props: {