Skip to content

Commit 1f43a7d

Browse files
authored
Belco - Add Tags to Conversation action (#19276)
* add-tags-to-conversation * versions
1 parent 99b2a46 commit 1f43a7d

File tree

12 files changed

+58
-10
lines changed

12 files changed

+58
-10
lines changed

components/belco/actions/add-note-to-conversation/add-note-to-conversation.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "belco-add-note-to-conversation",
55
name: "Add Note to Conversation",
66
description: "Add a note to a conversation specified by ID. [See the documentation](https://developers.belco.io/reference/put_conversations-conversationid-addnote)",
7-
version: "0.0.2",
7+
version: "0.0.3",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import belco from "../../belco.app.mjs";
2+
3+
export default {
4+
key: "belco-add-tags-to-conversation",
5+
name: "Add Tags to Conversation",
6+
description: "Add tags to a conversation. [See the documentation](https://developers.belco.io/reference/add-tags-to-a-conversation)",
7+
version: "0.0.1",
8+
type: "action",
9+
annotations: {
10+
destructiveHint: false,
11+
openWorldHint: true,
12+
readOnlyHint: false,
13+
},
14+
props: {
15+
belco,
16+
conversationId: {
17+
propDefinition: [
18+
belco,
19+
"conversationId",
20+
],
21+
},
22+
tags: {
23+
type: "string[]",
24+
label: "Tags",
25+
description: "The tags to add to the conversation",
26+
},
27+
},
28+
async run({ $ }) {
29+
const response = await this.belco.addTagsToConversation({
30+
$,
31+
conversationId: this.conversationId,
32+
data: {
33+
tags: this.tags,
34+
},
35+
});
36+
$.export("$summary", `Successfully added tags to conversation: ${this.conversationId}`);
37+
return response;
38+
},
39+
};

components/belco/actions/close-conversation/close-conversation.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "belco-close-conversation",
55
name: "Close Conversation",
66
description: "Close a conversation specified by ID. [See the documentation](https://developers.belco.io/reference/put_conversations-conversationid-close)",
7-
version: "0.0.2",
7+
version: "0.0.3",
88
annotations: {
99
destructiveHint: true,
1010
openWorldHint: true,

components/belco/actions/create-conversation/create-conversation.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "belco-create-conversation",
55
name: "Create Conversation",
66
description: "Create a conversation from Belco. [See the documentation](https://developers.belco.io/reference/post_conversations)",
7-
version: "0.0.2",
7+
version: "0.0.3",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

components/belco/actions/list-all-conversations/list-all-conversations.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "belco-list-all-conversations",
55
name: "List All Conversations",
66
description: "Get a list of conversations from Belco. [See the documentation](https://developers.belco.io/reference/get_conversations)",
7-
version: "0.0.2",
7+
version: "0.0.3",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

components/belco/actions/reopen-conversation/reopen-conversation.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "belco-reopen-conversation",
55
name: "Reopen Conversation",
66
description: "Reopen a conversation specified by ID. [See the documentation](https://developers.belco.io/reference/put_conversations-conversationid-open)",
7-
version: "0.0.2",
7+
version: "0.0.3",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

components/belco/actions/reply-to-conversation/reply-to-conversation.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "belco-reply-to-conversation",
55
name: "Reply to Conversation",
66
description: "Reply to a conversation specified by ID. [See the documentation](https://developers.belco.io/reference/put_conversations-conversationid-reply)",
7-
version: "0.0.2",
7+
version: "0.0.3",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

components/belco/actions/retrieve-conversation/retrieve-conversation.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "belco-retrieve-conversation",
55
name: "Retrieve Conversation",
66
description: "Retrieve a conversation specified by ID. [See the documentation](https://developers.belco.io/reference/get_conversations-conversationid)",
7-
version: "0.0.2",
7+
version: "0.0.3",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

components/belco/actions/send-message/send-message.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "belco-send-message",
55
name: "Send Message",
66
description: "Send a message to a conversation specified by ID. [See the documentation](https://developers.belco.io/reference/post_conversations-sendmessage)",
7-
version: "0.0.2",
7+
version: "0.0.3",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

components/belco/belco.app.mjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,15 @@ export default {
237237
...opts,
238238
});
239239
},
240+
addTagsToConversation({
241+
conversationId, ...opts
242+
}) {
243+
return this._makeRequest({
244+
method: "PUT",
245+
path: `/conversations/${conversationId}/tags`,
246+
...opts,
247+
});
248+
},
240249
async *paginate({
241250
fn, params = {}, maxResults = null, ...opts
242251
}) {

0 commit comments

Comments
 (0)