Skip to content

Commit e78a749

Browse files
authored
[ACTION] trengo - close ticket (#19278)
1 parent e98033e commit e78a749

File tree

27 files changed

+99
-25
lines changed

27 files changed

+99
-25
lines changed

components/trengo/actions/attach-label/attach-label.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "trengo-attach-label",
55
name: "Attach Label",
66
description: "Attach a label to a ticket. [See the documentation](https://developers.trengo.com/reference/apply-a-label)",
7-
version: "0.0.2",
7+
version: "0.0.3",
88
type: "action",
99
annotations: {
1010
destructiveHint: false,
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import app from "../../trengo.app.mjs";
2+
3+
export default {
4+
key: "trengo-close-ticket",
5+
name: "Close Ticket",
6+
description: "Close a ticket. [See the documentation](https://developers.trengo.com/reference/close-a-ticket)",
7+
version: "0.0.1",
8+
type: "action",
9+
annotations: {
10+
destructiveHint: true,
11+
openWorldHint: true,
12+
readOnlyHint: false,
13+
},
14+
props: {
15+
app,
16+
ticketId: {
17+
propDefinition: [
18+
app,
19+
"ticketId",
20+
],
21+
},
22+
ticketResultId: {
23+
propDefinition: [
24+
app,
25+
"ticketResultId",
26+
],
27+
},
28+
},
29+
async run({ $ }) {
30+
const response = await this.app.closeTicket({
31+
$,
32+
ticketId: this.ticketId,
33+
data: {
34+
ticket_result_id: this.ticketResultId,
35+
},
36+
});
37+
38+
$.export("$summary", "Successfully closed ticket");
39+
40+
return response;
41+
},
42+
};

components/trengo/actions/create-contact/create-contact.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import app from "../../trengo.app.mjs";
33
export default {
44
type: "action",
55
key: "trengo-create-contact",
6-
version: "0.0.7",
6+
version: "0.0.8",
77
annotations: {
88
destructiveHint: false,
99
openWorldHint: true,

components/trengo/actions/find-contacts/find-contacts.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import app from "../../trengo.app.mjs";
44
export default {
55
type: "action",
66
key: "trengo-find-contacts",
7-
version: "0.0.7",
7+
version: "0.0.8",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

components/trengo/actions/get-label/get-label.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "trengo-get-label",
55
name: "Get Label",
66
description: "Get a label by ID. [See the documentation](https://developers.trengo.com/reference/get-a-label)",
7-
version: "0.0.2",
7+
version: "0.0.3",
88
type: "action",
99
annotations: {
1010
destructiveHint: false,

components/trengo/actions/get-message/get-message.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "trengo-get-message",
55
name: "Get Message",
66
description: "Get a message by ID. [See the documentation](https://developers.trengo.com/reference/fetch-a-message)",
7-
version: "0.0.2",
7+
version: "0.0.3",
88
type: "action",
99
annotations: {
1010
destructiveHint: false,

components/trengo/actions/list-articles/list-articles.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import app from "../../trengo.app.mjs";
44
export default {
55
type: "action",
66
key: "trengo-list-articles",
7-
version: "0.0.5",
7+
version: "0.0.6",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

components/trengo/actions/list-labels/list-labels.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "trengo-list-labels",
66
name: "List Labels",
77
description: "List all labels. [See the documentation](https://developers.trengo.com/reference/list-all-labels)",
8-
version: "0.0.2",
8+
version: "0.0.3",
99
type: "action",
1010
annotations: {
1111
destructiveHint: false,

components/trengo/actions/list-messages/list-messages.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "trengo-list-messages",
66
name: "List Messages",
77
description: "List messages from a ticket. [See the documentation](https://developers.trengo.com/reference/list-all-messages)",
8-
version: "0.0.4",
8+
version: "0.0.5",
99
annotations: {
1010
destructiveHint: false,
1111
openWorldHint: true,

components/trengo/actions/list-tickets/list-tickets.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "trengo-list-tickets",
66
name: "List Tickets",
77
description: "List tickets according to the specified criteria. [See the documentation](https://developers.trengo.com/reference/list-all-tickets)",
8-
version: "0.0.4",
8+
version: "0.0.5",
99
annotations: {
1010
destructiveHint: false,
1111
openWorldHint: true,

0 commit comments

Comments
 (0)