Skip to content

Commit c0c3b7c

Browse files
authored
Gorgias - new components (#19274)
* new components * versions * update
1 parent 8e09c15 commit c0c3b7c

File tree

29 files changed

+358
-24
lines changed

29 files changed

+358
-24
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import gorgias from "../../gorgias_oauth.app.mjs";
2+
3+
export default {
4+
key: "gorgias_oauth-add-ticket-tags",
5+
name: "Add Ticket Tags",
6+
description: "Add tags to a ticket. [See the documentation](https://developers.gorgias.com/reference/create-ticket-tags)",
7+
version: "0.0.1",
8+
type: "action",
9+
annotations: {
10+
destructiveHint: false,
11+
openWorldHint: true,
12+
readOnlyHint: false,
13+
},
14+
props: {
15+
gorgias,
16+
ticketId: {
17+
propDefinition: [
18+
gorgias,
19+
"ticketId",
20+
],
21+
},
22+
tagIds: {
23+
propDefinition: [
24+
gorgias,
25+
"tagId",
26+
],
27+
type: "string[]",
28+
label: "Tag IDs",
29+
description: "The IDs of the tags to add to the ticket",
30+
optional: false,
31+
},
32+
},
33+
async run({ $ }) {
34+
const response = await this.gorgias.addTicketTags({
35+
$,
36+
ticketId: this.ticketId,
37+
data: {
38+
ids: this.tagIds,
39+
},
40+
});
41+
$.export("$summary", `Successfully added ${this.tagIds.length} tag${this.tagIds.length === 1
42+
? ""
43+
: "s"} to ticket ${this.ticketId}`);
44+
return response;
45+
},
46+
};

components/gorgias_oauth/actions/create-customer/create-customer.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "gorgias_oauth-create-customer",
66
name: "Create Customer",
77
description: "Create a new customer. [See the docs](https://developers.gorgias.com/reference/post_api-customers)",
8-
version: "0.0.9",
8+
version: "0.0.10",
99
annotations: {
1010
destructiveHint: false,
1111
openWorldHint: true,

components/gorgias_oauth/actions/create-macro/create-macro.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
key: "gorgias_oauth-create-macro",
77
name: "Create Macro",
88
description: "Create a macro. [See the documentation](https://developers.gorgias.com/reference/create-macro)",
9-
version: "0.0.3",
9+
version: "0.0.4",
1010
annotations: {
1111
destructiveHint: false,
1212
openWorldHint: true,

components/gorgias_oauth/actions/create-ticket-message/create-ticket-message.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
key: "gorgias_oauth-create-ticket-message",
88
name: "Create Ticket Message",
99
description: "Create a message for a ticket in the Gorgias system. [See the documentation](https://developers.gorgias.com/reference/create-ticket-message)",
10-
version: "0.0.6",
10+
version: "0.0.7",
1111
annotations: {
1212
destructiveHint: false,
1313
openWorldHint: true,

components/gorgias_oauth/actions/create-ticket/create-ticket.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "gorgias_oauth-create-ticket",
55
name: "Create Ticket",
66
description: "Create a new ticket. [See the docs](https://developers.gorgias.com/reference/post_api-tickets)",
7-
version: "0.0.10",
7+
version: "0.0.11",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

components/gorgias_oauth/actions/delete-macro/delete-macro.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "gorgias_oauth-delete-macro",
55
name: "Delete Macro",
66
description: "Delete a macro. [See the documentation](https://developers.gorgias.com/reference/delete-macro)",
7-
version: "0.0.3",
7+
version: "0.0.4",
88
annotations: {
99
destructiveHint: true,
1010
openWorldHint: true,
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import gorgias from "../../gorgias_oauth.app.mjs";
2+
3+
export default {
4+
key: "gorgias_oauth-get-macro",
5+
name: "Get Macro",
6+
description: "Get a macro by ID. [See the documentation](https://developers.gorgias.com/reference/get-macro)",
7+
version: "0.0.1",
8+
type: "action",
9+
annotations: {
10+
destructiveHint: false,
11+
openWorldHint: true,
12+
readOnlyHint: true,
13+
},
14+
props: {
15+
gorgias,
16+
macroId: {
17+
propDefinition: [
18+
gorgias,
19+
"macroId",
20+
],
21+
},
22+
},
23+
async run({ $ }) {
24+
const response = await this.gorgias.getMacro({
25+
$,
26+
id: this.macroId,
27+
});
28+
$.export("$summary", `Successfully retrieved macro with ID: ${this.macroId}`);
29+
return response;
30+
},
31+
};

components/gorgias_oauth/actions/get-ticket-message/get-ticket-message.mjs

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

components/gorgias_oauth/actions/get-ticket/get-ticket.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "gorgias_oauth-get-ticket",
55
name: "Get Ticket",
66
description: "Get a ticket. [See the documentation](https://developers.gorgias.com/reference/get-ticket)",
7-
version: "0.0.3",
7+
version: "0.0.4",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

components/gorgias_oauth/actions/list-macros/list-macros.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "gorgias_oauth-list-macros",
55
name: "List Macros",
66
description: "List all macros. [See the documentation](https://developers.gorgias.com/reference/list-macros)",
7-
version: "0.0.3",
7+
version: "0.0.4",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

0 commit comments

Comments
 (0)