Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import gorgias from "../../gorgias_oauth.app.mjs";

export default {
key: "gorgias_oauth-add-ticket-tags",
name: "Add Ticket Tags",
description: "Add tags to a ticket. [See the documentation](https://developers.gorgias.com/reference/create-ticket-tags)",
version: "0.0.1",
type: "action",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
props: {
gorgias,
ticketId: {
propDefinition: [
gorgias,
"ticketId",
],
},
tagIds: {
propDefinition: [
gorgias,
"tagId",
],
type: "string[]",
label: "Tag IDs",
description: "The IDs of the tags to add to the ticket",
optional: false,
},
},
async run({ $ }) {
const response = await this.gorgias.addTicketTags({
$,
ticketId: this.ticketId,
data: {
ids: this.tagIds,
},
});
$.export("$summary", `Successfully added ${this.tagIds.length} tag${this.tagIds.length === 1
? ""
: "s"} to ticket ${this.ticketId}`);
return response;
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "gorgias_oauth-create-customer",
name: "Create Customer",
description: "Create a new customer. [See the docs](https://developers.gorgias.com/reference/post_api-customers)",
version: "0.0.9",
version: "0.0.10",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "gorgias_oauth-create-macro",
name: "Create Macro",
description: "Create a macro. [See the documentation](https://developers.gorgias.com/reference/create-macro)",
version: "0.0.3",
version: "0.0.4",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
key: "gorgias_oauth-create-ticket-message",
name: "Create Ticket Message",
description: "Create a message for a ticket in the Gorgias system. [See the documentation](https://developers.gorgias.com/reference/create-ticket-message)",
version: "0.0.6",
version: "0.0.7",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "gorgias_oauth-create-ticket",
name: "Create Ticket",
description: "Create a new ticket. [See the docs](https://developers.gorgias.com/reference/post_api-tickets)",
version: "0.0.10",
version: "0.0.11",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "gorgias_oauth-delete-macro",
name: "Delete Macro",
description: "Delete a macro. [See the documentation](https://developers.gorgias.com/reference/delete-macro)",
version: "0.0.3",
version: "0.0.4",
annotations: {
destructiveHint: true,
openWorldHint: true,
Expand Down
31 changes: 31 additions & 0 deletions components/gorgias_oauth/actions/get-macro/get-macro.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import gorgias from "../../gorgias_oauth.app.mjs";

export default {
key: "gorgias_oauth-get-macro",
name: "Get Macro",
description: "Get a macro by ID. [See the documentation](https://developers.gorgias.com/reference/get-macro)",
version: "0.0.1",
type: "action",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
props: {
gorgias,
macroId: {
propDefinition: [
gorgias,
"macroId",
],
},
},
async run({ $ }) {
const response = await this.gorgias.getMacro({
$,
id: this.macroId,
});
$.export("$summary", `Successfully retrieved macro with ID: ${this.macroId}`);
return response;
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
name: "Get Ticket Message",
description: "Get a specific message from a ticket. [See the documentation](https://developers.gorgias.com/reference/get-ticket-message)",
key: "gorgias_oauth-get-ticket-message",
version: "0.0.1",
version: "0.0.2",
type: "action",
annotations: {
destructiveHint: false,
Expand Down
2 changes: 1 addition & 1 deletion components/gorgias_oauth/actions/get-ticket/get-ticket.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "gorgias_oauth-get-ticket",
name: "Get Ticket",
description: "Get a ticket. [See the documentation](https://developers.gorgias.com/reference/get-ticket)",
version: "0.0.3",
version: "0.0.4",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "gorgias_oauth-list-macros",
name: "List Macros",
description: "List all macros. [See the documentation](https://developers.gorgias.com/reference/list-macros)",
version: "0.0.3",
version: "0.0.4",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
name: "List Messages",
description: "List all messages. [See the documentation](https://developers.gorgias.com/reference/list-messages)",
key: "gorgias_oauth-list-messages",
version: "0.0.1",
version: "0.0.2",
type: "action",
annotations: {
destructiveHint: false,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import gorgias from "../../gorgias_oauth.app.mjs";

export default {
key: "gorgias_oauth-list-ticket-field-values",
name: "List Ticket Field Values",
description: "List field values for a ticket. [See the documentation](https://developers.gorgias.com/reference/list-ticket-custom-fields)",
version: "0.0.1",
type: "action",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
props: {
gorgias,
ticketId: {
propDefinition: [
gorgias,
"ticketId",
],
},
},
async run({ $ }) {
const response = await this.gorgias.listTicketFieldValues({
$,
ticketId: this.ticketId,
});
$.export("$summary", `Successfully retrieved ${response?.data?.length ?? 0} field value${response?.data?.length === 1
? ""
: "s"} for ticket ${this.ticketId}`);
return response;
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
name: "List Ticket Messages",
description: "List all messages for a specific ticket. [See the documentation](https://developers.gorgias.com/reference/list-ticket-messages)",
key: "gorgias_oauth-list-ticket-messages",
version: "0.0.1",
version: "0.0.2",
type: "action",
annotations: {
destructiveHint: false,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import gorgias from "../../gorgias_oauth.app.mjs";

export default {
key: "gorgias_oauth-list-ticket-tags",
name: "List Ticket Tags",
description: "List tags for a ticket. [See the documentation](https://developers.gorgias.com/reference/get_api-tickets-ticket-id-tags)",
version: "0.0.1",
type: "action",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
props: {
gorgias,
ticketId: {
propDefinition: [
gorgias,
"ticketId",
],
},
},
async run({ $ }) {
const response = await this.gorgias.listTicketTags({
$,
ticketId: this.ticketId,
});
$.export("$summary", `Successfully retrieved ${response?.data?.length ?? 0} tag${response?.data?.length === 1
? ""
: "s"} for ticket ${this.ticketId}`);
return response;
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "gorgias_oauth-list-tickets",
name: "List Tickets",
description: "List all tickets. [See the docs](https://developers.gorgias.com/reference/get_api-tickets)",
version: "0.0.10",
version: "0.0.11",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "gorgias_oauth-retrieve-customer",
name: "Retrieve a Customer",
description: "Retrieve a customer. [See the docs](https://developers.gorgias.com/reference/get_api-customers-id-)",
version: "0.0.9",
version: "0.0.10",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import gorgias from "../../gorgias_oauth.app.mjs";

export default {
key: "gorgias_oauth-set-ticket-tags",
name: "Set Ticket Tags",
description: "Set tags on a ticket. [See the documentation](https://developers.gorgias.com/reference/update-ticket-tags)",
version: "0.0.1",
type: "action",
annotations: {
destructiveHint: true,
openWorldHint: true,
readOnlyHint: false,
},
props: {
gorgias,
ticketId: {
propDefinition: [
gorgias,
"ticketId",
],
},
tagIds: {
propDefinition: [
gorgias,
"tagId",
],
type: "string[]",
label: "Tag IDs",
description: "The IDs of the tags to set on the ticket",
optional: false,
},
},
async run({ $ }) {
const response = await this.gorgias.setTicketTags({
$,
ticketId: this.ticketId,
data: {
ids: this.tagIds,
},
});
$.export("$summary", `Successfully set ${this.tagIds.length} tag${this.tagIds.length === 1
? ""
: "s"} on ticket ${this.ticketId}`);
return response;
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default {
key: "gorgias_oauth-update-customer",
name: "Update Customer",
description: "Update a customer. [See the docs](https://developers.gorgias.com/reference/put_api-customers-id-)",
version: "0.0.9",
version: "0.0.10",
annotations: {
destructiveHint: true,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "gorgias_oauth-update-macro",
name: "Update Macro",
description: "Update a macro. [See the documentation](https://developers.gorgias.com/reference/update-macro)",
version: "0.0.3",
version: "0.0.4",
annotations: {
destructiveHint: true,
openWorldHint: true,
Expand Down
Loading
Loading