-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Gorgias ticket messages functionality #19027
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
AdminAdi
wants to merge
17
commits into
PipedreamHQ:master
Choose a base branch
from
AdminAdi:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
ffcd7a4
Sage CRM implementation
AdminAdi f403cec
Improved Sage CRM
AdminAdi 2dfcf03
Pr
AdminAdi 3ddbadc
Merge branch 'master' into master
AdminAdi eb01363
Merge branch 'master' into master
AdminAdi 4dac419
update pr
AdminAdi 37da06e
Merge branch 'master' of https://github.com/AdminAdi/pipedream
AdminAdi 47412d2
Merge branch 'master' into master
AdminAdi 3d8b871
Gorgias ticket messages functionality
AdminAdi 85f09e1
Merge branch 'master' into master
AdminAdi a6a11d3
Merge branch 'master' into master
AdminAdi dc7d6bf
Updated Pr
AdminAdi 74cb107
Merge branch 'master' of https://github.com/AdminAdi/pipedream
AdminAdi f4135c8
remove unecessary files
michelle0927 6703b0e
updates
michelle0927 c4ef295
versions
michelle0927 670ef52
updates
michelle0927 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
components/gorgias_oauth/actions/get-ticket-message/get-ticket-message.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| import gorgiasOAuth from "../../gorgias_oauth.app.mjs"; | ||
|
|
||
| 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", | ||
| type: "action", | ||
| annotations: { | ||
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: true, | ||
| }, | ||
| props: { | ||
| gorgiasOAuth, | ||
| ticketId: { | ||
| propDefinition: [ | ||
| gorgiasOAuth, | ||
| "ticketId", | ||
| ], | ||
| }, | ||
| messageId: { | ||
| type: "integer", | ||
| label: "Message ID", | ||
| description: "The ID of the message to retrieve", | ||
| async options({ prevContext }) { | ||
| const { | ||
| data: messages, | ||
| meta, | ||
| } = await this.gorgiasOAuth.listTicketMessages({ | ||
| ticketId: this.ticketId, | ||
| params: { | ||
| cursor: prevContext.nextCursor, | ||
| }, | ||
| }); | ||
| return { | ||
| options: messages.map(({ id }) => id), | ||
| context: { | ||
| nextCursor: meta.next_cursor, | ||
| }, | ||
| }; | ||
| }, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.gorgiasOAuth.getTicketMessage({ | ||
| $, | ||
| ticketId: this.ticketId, | ||
| messageId: this.messageId, | ||
| }); | ||
|
|
||
michelle0927 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| $.export("$summary", `Successfully retrieved message ${this.messageId} from ticket ${this.ticketId}`); | ||
|
|
||
| return response; | ||
| }, | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
components/gorgias_oauth/actions/list-messages/list-messages.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| import gorgiasOAuth from "../../gorgias_oauth.app.mjs"; | ||
|
|
||
| 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", | ||
| type: "action", | ||
| annotations: { | ||
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: true, | ||
| }, | ||
| props: { | ||
| gorgiasOAuth, | ||
| limit: { | ||
| type: "integer", | ||
| label: "Limit", | ||
| description: "Maximum number of messages to return (1-100)", | ||
| min: 1, | ||
| max: 100, | ||
| default: 50, | ||
| }, | ||
| cursor: { | ||
| type: "string", | ||
| label: "Cursor", | ||
| description: "Cursor for pagination (get from the meta.next_cursor of the previous response)", | ||
| optional: true, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const params = { | ||
| limit: this.limit, | ||
| }; | ||
|
|
||
| if (this.cursor) { | ||
| params.cursor = this.cursor; | ||
| } | ||
|
|
||
| const response = await this.gorgiasOAuth.listMessages({ | ||
| $, | ||
| params, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully retrieved ${response.data.length} message${response.data.length === 1 | ||
| ? "" | ||
| : "s"}`); | ||
|
|
||
| // Return the data and pagination info | ||
| return { | ||
| data: response.data, | ||
| meta: response.meta, | ||
| }; | ||
| }, | ||
| }; |
62 changes: 62 additions & 0 deletions
62
components/gorgias_oauth/actions/list-ticket-messages/list-ticket-messages.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| import gorgiasOAuth from "../../gorgias_oauth.app.mjs"; | ||
|
|
||
| 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", | ||
| type: "action", | ||
| annotations: { | ||
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: true, | ||
| }, | ||
| props: { | ||
| gorgiasOAuth, | ||
| ticketId: { | ||
| propDefinition: [ | ||
| gorgiasOAuth, | ||
| "ticketId", | ||
| ], | ||
| }, | ||
| limit: { | ||
| type: "integer", | ||
| label: "Limit", | ||
| description: "Maximum number of messages to return (1-100)", | ||
| min: 1, | ||
| max: 100, | ||
| default: 50, | ||
| }, | ||
| cursor: { | ||
| type: "string", | ||
| label: "Cursor", | ||
| description: "Cursor for pagination (get from the meta.next_cursor of the previous response)", | ||
| optional: true, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const params = { | ||
| limit: this.limit, | ||
| }; | ||
|
|
||
| if (this.cursor) { | ||
| params.cursor = this.cursor; | ||
| } | ||
|
|
||
| const response = await this.gorgiasOAuth.listTicketMessages({ | ||
| $, | ||
| ticketId: this.ticketId, | ||
| params, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully retrieved ${response.data.length} message${response.data.length === 1 | ||
| ? "" | ||
| : "s"}`); | ||
|
|
||
| // Return the data and pagination info | ||
| return { | ||
| data: response.data, | ||
| meta: response.meta, | ||
| }; | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }, | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.