diff --git a/components/zoho_desk/actions/add-ticket-attachment/add-ticket-attachment.mjs b/components/zoho_desk/actions/add-ticket-attachment/add-ticket-attachment.mjs index 5596dc8a2790a..601503a5f64be 100644 --- a/components/zoho_desk/actions/add-ticket-attachment/add-ticket-attachment.mjs +++ b/components/zoho_desk/actions/add-ticket-attachment/add-ticket-attachment.mjs @@ -7,7 +7,7 @@ export default { name: "Add Ticket Attachment", description: "Attaches a file to a ticket. [See the docs here](https://desk.zoho.com/DeskAPIDocument#TicketAttachments#TicketAttachments_CreateTicketattachment)", type: "action", - version: "0.1.6", + version: "0.1.7", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/zoho_desk/actions/add-ticket-comment/add-ticket-comment.mjs b/components/zoho_desk/actions/add-ticket-comment/add-ticket-comment.mjs index bca5d1fe5508b..81d4ff27455c0 100644 --- a/components/zoho_desk/actions/add-ticket-comment/add-ticket-comment.mjs +++ b/components/zoho_desk/actions/add-ticket-comment/add-ticket-comment.mjs @@ -5,7 +5,7 @@ export default { name: "Add Ticket Comment", description: "Adds a comment to a ticket. [See the docs here](https://desk.zoho.com/DeskAPIDocument#TicketsComments#TicketsComments_Createticketcomment)", type: "action", - version: "0.0.7", + version: "0.0.8", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/zoho_desk/actions/create-account/create-account.mjs b/components/zoho_desk/actions/create-account/create-account.mjs index 11b2e75ebed1d..6d92efdde0a48 100644 --- a/components/zoho_desk/actions/create-account/create-account.mjs +++ b/components/zoho_desk/actions/create-account/create-account.mjs @@ -5,7 +5,7 @@ export default { name: "Create Account", description: "Creates an account in your help desk portal. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Accounts#Accounts_CreateAccount)", type: "action", - version: "0.0.7", + version: "0.0.8", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/zoho_desk/actions/create-contact/create-contact.mjs b/components/zoho_desk/actions/create-contact/create-contact.mjs index ed18e39291adf..74346737567fd 100644 --- a/components/zoho_desk/actions/create-contact/create-contact.mjs +++ b/components/zoho_desk/actions/create-contact/create-contact.mjs @@ -5,7 +5,7 @@ export default { name: "Create Contact", description: "Creates a contact in your help desk portal. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Contacts#Contacts_CreateContact)", type: "action", - version: "0.0.7", + version: "0.0.8", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/zoho_desk/actions/create-ticket/create-ticket.mjs b/components/zoho_desk/actions/create-ticket/create-ticket.mjs index f52e36066ec47..f2a6f691540f5 100644 --- a/components/zoho_desk/actions/create-ticket/create-ticket.mjs +++ b/components/zoho_desk/actions/create-ticket/create-ticket.mjs @@ -5,7 +5,7 @@ export default { name: "Create Ticket", description: "Creates a ticket in your helpdesk. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Tickets#Tickets_Createaticket)", type: "action", - version: "0.0.7", + version: "0.0.8", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/zoho_desk/actions/find-contact/find-contact.mjs b/components/zoho_desk/actions/find-contact/find-contact.mjs index 5b141302b2eb1..197b33b099772 100644 --- a/components/zoho_desk/actions/find-contact/find-contact.mjs +++ b/components/zoho_desk/actions/find-contact/find-contact.mjs @@ -5,7 +5,7 @@ export default { name: "Find Contact", description: "Searches for contacts in your help desk portal. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Search#Search_SearchContacts)", type: "action", - version: "0.0.7", + version: "0.0.8", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/zoho_desk/actions/find-or-create-contact/find-or-create-contact.mjs b/components/zoho_desk/actions/find-or-create-contact/find-or-create-contact.mjs index 3b1828e867822..8f35fe819fd0b 100644 --- a/components/zoho_desk/actions/find-or-create-contact/find-or-create-contact.mjs +++ b/components/zoho_desk/actions/find-or-create-contact/find-or-create-contact.mjs @@ -5,7 +5,7 @@ export default { name: "Find or Create Contact", description: "Finds or create a contact. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Contacts#Contacts_CreateContact)", type: "action", - version: "0.0.7", + version: "0.0.8", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/zoho_desk/actions/get-article/get-article.mjs b/components/zoho_desk/actions/get-article/get-article.mjs index 25776fea755a7..b8ad19028e7fd 100644 --- a/components/zoho_desk/actions/get-article/get-article.mjs +++ b/components/zoho_desk/actions/get-article/get-article.mjs @@ -5,7 +5,7 @@ export default { name: "Get Article", description: "Retrieves the details of a knowledge base article. [See the documentation](https://desk.zoho.com/portal/APIDocument.do#KnowledgeBase_Getarticle)", type: "action", - version: "0.0.3", + version: "0.0.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/zoho_desk/actions/get-thread-details/get-thread-details.mjs b/components/zoho_desk/actions/get-thread-details/get-thread-details.mjs new file mode 100644 index 0000000000000..d2ea5c8eaa886 --- /dev/null +++ b/components/zoho_desk/actions/get-thread-details/get-thread-details.mjs @@ -0,0 +1,64 @@ +import zohoDesk from "../../zoho_desk.app.mjs"; + +export default { + key: "zoho_desk-get-thread-details", + name: "Get Thread Details", + description: "Retrieve details for a specific thread belonging to a ticket. [See the documentation](https://desk.zoho.com/DeskAPIDocument#Threads_Getathread)", + type: "action", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + zohoDesk, + orgId: { + propDefinition: [ + zohoDesk, + "orgId", + ], + }, + ticketId: { + propDefinition: [ + zohoDesk, + "ticketId", + ({ orgId }) => ({ + orgId, + }), + ], + }, + threadId: { + propDefinition: [ + zohoDesk, + "threadId", + ({ + orgId, ticketId, + }) => ({ + orgId, + ticketId, + }), + ], + }, + }, + async run({ $ }) { + const { + orgId, + ticketId, + threadId, + } = this; + + const response = await this.zohoDesk.getThreadDetails({ + $, + ticketId, + threadId, + headers: { + orgId, + }, + }); + + $.export("$summary", `Successfully retrieved thread details for thread ID ${threadId}`); + + return response.data || response; + }, +}; diff --git a/components/zoho_desk/actions/get-ticket-details/get-ticket-details.mjs b/components/zoho_desk/actions/get-ticket-details/get-ticket-details.mjs new file mode 100644 index 0000000000000..e0bb5b89d8a2a --- /dev/null +++ b/components/zoho_desk/actions/get-ticket-details/get-ticket-details.mjs @@ -0,0 +1,51 @@ +import zohoDesk from "../../zoho_desk.app.mjs"; + +export default { + key: "zoho_desk-get-ticket-details", + name: "Get Ticket Details", + description: "Retrieve details for a specified ticket. [See the documentation](https://desk.zoho.com/DeskAPIDocument#Tickets_Getaticket)", + type: "action", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + zohoDesk, + orgId: { + propDefinition: [ + zohoDesk, + "orgId", + ], + }, + ticketId: { + propDefinition: [ + zohoDesk, + "ticketId", + ({ orgId }) => ({ + orgId, + }), + ], + }, + }, + async run({ $ }) { + const { + orgId, + ticketId, + } = this; + + const response = await this.zohoDesk.getTicketDetails({ + $, + ticketId, + headers: { + orgId, + }, + }); + + $.export("$summary", `Successfully retrieved ticket details for ticket ID ${ticketId}`); + + return response.data || response; + }, +}; + diff --git a/components/zoho_desk/actions/list-articles/list-articles.mjs b/components/zoho_desk/actions/list-articles/list-articles.mjs index 5fedfe01f2c6d..a44b6b87fb4ff 100644 --- a/components/zoho_desk/actions/list-articles/list-articles.mjs +++ b/components/zoho_desk/actions/list-articles/list-articles.mjs @@ -4,7 +4,7 @@ export default { name: "List Articles", description: "Lists knowledge base articles for a help center. [See the documentation](https://desk.zoho.com/portal/APIDocument.do#KnowledgeBase#KnowledgeBase_Listarticles)", type: "action", - version: "0.0.3", + version: "0.0.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/zoho_desk/actions/list-help-centers/list-help-centers.mjs b/components/zoho_desk/actions/list-help-centers/list-help-centers.mjs index 9685b94706d8d..6295f7f349d4d 100644 --- a/components/zoho_desk/actions/list-help-centers/list-help-centers.mjs +++ b/components/zoho_desk/actions/list-help-centers/list-help-centers.mjs @@ -5,7 +5,7 @@ export default { name: "List Help Centers", description: "Lists the help centers configured in an organization. [See the documentation](https://desk.zoho.com/portal/APIDocument.do#HelpCenters_Listhelpcenters)", type: "action", - version: "0.0.3", + version: "0.0.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/zoho_desk/actions/list-root-categories/list-root-categories.mjs b/components/zoho_desk/actions/list-root-categories/list-root-categories.mjs index 8364b485dbc44..d070086faf301 100644 --- a/components/zoho_desk/actions/list-root-categories/list-root-categories.mjs +++ b/components/zoho_desk/actions/list-root-categories/list-root-categories.mjs @@ -4,7 +4,7 @@ export default { name: "List Root Categories", description: "Lists root knowledge base categories for a help center. [See the documentation](https://desk.zoho.com/portal/APIDocument.do#KnowledgeBase_Listallrootcategoriesofthehelpcenter)", type: "action", - version: "0.0.3", + version: "0.0.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/zoho_desk/actions/list-ticket-attachments/list-ticket-attachments.mjs b/components/zoho_desk/actions/list-ticket-attachments/list-ticket-attachments.mjs new file mode 100644 index 0000000000000..cfac1e9d1a451 --- /dev/null +++ b/components/zoho_desk/actions/list-ticket-attachments/list-ticket-attachments.mjs @@ -0,0 +1,52 @@ +import zohoDesk from "../../zoho_desk.app.mjs"; + +export default { + key: "zoho_desk-list-ticket-attachments", + name: "List Ticket Attachments", + description: "List attachments for a specific ticket. [See the documentation](https://desk.zoho.com/DeskAPIDocument#TicketAttachments_Listticketattachments)", + type: "action", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + zohoDesk, + orgId: { + propDefinition: [ + zohoDesk, + "orgId", + ], + }, + ticketId: { + propDefinition: [ + zohoDesk, + "ticketId", + ({ orgId }) => ({ + orgId, + }), + ], + }, + }, + async run({ $ }) { + const { + orgId, + ticketId, + } = this; + + const response = await this.zohoDesk.getTicketAttachments({ + $, + ticketId, + headers: { + orgId, + }, + }); + + const attachments = response.data || []; + $.export("$summary", `Successfully retrieved ${attachments.length} attachment(s)`); + + return attachments; + }, +}; + diff --git a/components/zoho_desk/actions/list-ticket-threads/list-ticket-threads.mjs b/components/zoho_desk/actions/list-ticket-threads/list-ticket-threads.mjs new file mode 100644 index 0000000000000..0854692a88154 --- /dev/null +++ b/components/zoho_desk/actions/list-ticket-threads/list-ticket-threads.mjs @@ -0,0 +1,70 @@ +import zohoDesk from "../../zoho_desk.app.mjs"; + +export default { + key: "zoho_desk-list-ticket-threads", + name: "List Ticket Threads", + description: "Get a list of threads for a specified ticket. [See the documentation](https://desk.zoho.com/DeskAPIDocument#Threads#Threads_Listallthreads)", + type: "action", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + zohoDesk, + orgId: { + propDefinition: [ + zohoDesk, + "orgId", + ], + }, + ticketId: { + propDefinition: [ + zohoDesk, + "ticketId", + ({ orgId }) => ({ + orgId, + }), + ], + }, + from: { + propDefinition: [ + zohoDesk, + "from", + ], + }, + limit: { + propDefinition: [ + zohoDesk, + "limit", + ], + }, + }, + async run({ $ }) { + const { + orgId, + ticketId, + from, + limit, + } = this; + + const params = {}; + if (from) params.from = from; + if (limit) params.limit = limit; + + const response = await this.zohoDesk.getTicketThreads({ + $, + ticketId, + headers: { + orgId, + }, + params, + }); + + const threads = response.data || []; + $.export("$summary", `Successfully retrieved ${threads.length} thread(s)`); + + return threads; + }, +}; diff --git a/components/zoho_desk/actions/list-tickets/list-tickets.mjs b/components/zoho_desk/actions/list-tickets/list-tickets.mjs index 7f0d620cf054f..4a7f5a507f2fb 100644 --- a/components/zoho_desk/actions/list-tickets/list-tickets.mjs +++ b/components/zoho_desk/actions/list-tickets/list-tickets.mjs @@ -5,7 +5,7 @@ export default { name: "List Tickets", description: "Lists all tickets in your help desk with optional filtering. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Tickets#Tickets_Listalltickets)", type: "action", - version: "0.0.1", + version: "0.0.2", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/zoho_desk/actions/search-articles/search-articles.mjs b/components/zoho_desk/actions/search-articles/search-articles.mjs index 08709832d8b4a..64c2fa96a75f2 100644 --- a/components/zoho_desk/actions/search-articles/search-articles.mjs +++ b/components/zoho_desk/actions/search-articles/search-articles.mjs @@ -4,7 +4,7 @@ export default { name: "Search Articles", description: "Searches for knowledge base articles. [See the documentation](https://desk.zoho.com/portal/APIDocument.do#KnowledgeBase_Searcharticles)", type: "action", - version: "0.0.3", + version: "0.0.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/zoho_desk/actions/search-ticket/search-ticket.mjs b/components/zoho_desk/actions/search-ticket/search-ticket.mjs index d07e2af9e1100..0c03975956603 100644 --- a/components/zoho_desk/actions/search-ticket/search-ticket.mjs +++ b/components/zoho_desk/actions/search-ticket/search-ticket.mjs @@ -5,7 +5,7 @@ export default { name: "Search Ticket", description: "Searches for tickets in your help desk. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Search_TicketsSearchAPI)", type: "action", - version: "0.0.7", + version: "0.0.8", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/zoho_desk/actions/send-email-reply/send-email-reply.mjs b/components/zoho_desk/actions/send-email-reply/send-email-reply.mjs index c1763fe1fe2f3..2b7214e45ada9 100644 --- a/components/zoho_desk/actions/send-email-reply/send-email-reply.mjs +++ b/components/zoho_desk/actions/send-email-reply/send-email-reply.mjs @@ -5,7 +5,7 @@ export default { name: "Send E-Mail Reply", description: "Sends an email reply. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Threads#Threads_SendEmailReply)", type: "action", - version: "0.0.7", + version: "0.0.8", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/zoho_desk/actions/update-contact/update-contact.mjs b/components/zoho_desk/actions/update-contact/update-contact.mjs index 68bb673c2037d..c9b8b469510ab 100644 --- a/components/zoho_desk/actions/update-contact/update-contact.mjs +++ b/components/zoho_desk/actions/update-contact/update-contact.mjs @@ -5,7 +5,7 @@ export default { name: "Update Contact", description: "Updates details of an existing contact. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Contacts#Contacts_Updateacontact)", type: "action", - version: "0.0.7", + version: "0.0.8", annotations: { destructiveHint: true, openWorldHint: true, diff --git a/components/zoho_desk/actions/update-ticket/update-ticket.mjs b/components/zoho_desk/actions/update-ticket/update-ticket.mjs index 8239f4cba55ad..efd62ef71476e 100644 --- a/components/zoho_desk/actions/update-ticket/update-ticket.mjs +++ b/components/zoho_desk/actions/update-ticket/update-ticket.mjs @@ -5,7 +5,7 @@ export default { name: "Update Ticket", description: "Updates an existing ticket. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Tickets#Tickets_Updateaticket)", type: "action", - version: "0.0.7", + version: "0.0.8", annotations: { destructiveHint: true, openWorldHint: true, diff --git a/components/zoho_desk/package.json b/components/zoho_desk/package.json index 8a490fdb17e35..50d06eff2d6b3 100644 --- a/components/zoho_desk/package.json +++ b/components/zoho_desk/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/zoho_desk", - "version": "0.3.3", + "version": "0.3.4", "description": "Pipedream Zoho_desk Components", "main": "zoho_desk.app.mjs", "keywords": [ diff --git a/components/zoho_desk/sources/changed-ticket-status/changed-ticket-status.mjs b/components/zoho_desk/sources/changed-ticket-status/changed-ticket-status.mjs index f17757fcb870b..b19fb518e1c96 100644 --- a/components/zoho_desk/sources/changed-ticket-status/changed-ticket-status.mjs +++ b/components/zoho_desk/sources/changed-ticket-status/changed-ticket-status.mjs @@ -6,7 +6,7 @@ export default { name: "New Ticket Status Change", description: "Emit new event when a status ticket is changed. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Tickets#Tickets_Listalltickets)", type: "source", - version: "0.0.8", + version: "0.0.9", dedupe: "unique", props: { ...common.props, diff --git a/components/zoho_desk/sources/deleted-article-instant/deleted-article-instant.mjs b/components/zoho_desk/sources/deleted-article-instant/deleted-article-instant.mjs index b3d0655649c6c..f2dc1453ad911 100644 --- a/components/zoho_desk/sources/deleted-article-instant/deleted-article-instant.mjs +++ b/components/zoho_desk/sources/deleted-article-instant/deleted-article-instant.mjs @@ -7,7 +7,7 @@ export default { name: "Deleted Article (Instant)", description: "Emit new event when an article is deleted from the recycle bin", type: "source", - version: "0.0.4", + version: "0.0.5", dedupe: "unique", methods: { ...common.methods, diff --git a/components/zoho_desk/sources/new-account/new-account.mjs b/components/zoho_desk/sources/new-account/new-account.mjs index 4e834fb57bc3a..de9acac8a401c 100644 --- a/components/zoho_desk/sources/new-account/new-account.mjs +++ b/components/zoho_desk/sources/new-account/new-account.mjs @@ -6,7 +6,7 @@ export default { name: "New Account", description: "Emit new event when a new account is created. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Accounts#Accounts_Listaccounts)", type: "source", - version: "0.0.8", + version: "0.0.9", dedupe: "unique", props: { ...common.props, diff --git a/components/zoho_desk/sources/new-agent/new-agent.mjs b/components/zoho_desk/sources/new-agent/new-agent.mjs index ec17f416355c7..11f90313495c4 100644 --- a/components/zoho_desk/sources/new-agent/new-agent.mjs +++ b/components/zoho_desk/sources/new-agent/new-agent.mjs @@ -6,7 +6,7 @@ export default { name: "New Agent", description: "Emit new event when a new agent is created. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Agents#Agents_Listagents)", type: "source", - version: "0.0.8", + version: "0.0.9", dedupe: "unique", props: { ...common.props, diff --git a/components/zoho_desk/sources/new-article-instant/new-article-instant.mjs b/components/zoho_desk/sources/new-article-instant/new-article-instant.mjs index da3f6f1c34856..89d71f97dee06 100644 --- a/components/zoho_desk/sources/new-article-instant/new-article-instant.mjs +++ b/components/zoho_desk/sources/new-article-instant/new-article-instant.mjs @@ -7,7 +7,7 @@ export default { name: "New Article (Instant)", description: "Emit new event when a new article is created", type: "source", - version: "0.0.4", + version: "0.0.5", dedupe: "unique", methods: { ...common.methods, diff --git a/components/zoho_desk/sources/new-contact/new-contact.mjs b/components/zoho_desk/sources/new-contact/new-contact.mjs index f048ba9669cd3..11cddc3c3c080 100644 --- a/components/zoho_desk/sources/new-contact/new-contact.mjs +++ b/components/zoho_desk/sources/new-contact/new-contact.mjs @@ -6,7 +6,7 @@ export default { name: "New Contact", description: "Emit new event when a new contact is created. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Contacts#Contacts_Listcontacts)", type: "source", - version: "0.0.8", + version: "0.0.9", dedupe: "unique", props: { ...common.props, diff --git a/components/zoho_desk/sources/new-ticket-attachment/new-ticket-attachment.mjs b/components/zoho_desk/sources/new-ticket-attachment/new-ticket-attachment.mjs index 89ac004779c95..76d558a678dba 100644 --- a/components/zoho_desk/sources/new-ticket-attachment/new-ticket-attachment.mjs +++ b/components/zoho_desk/sources/new-ticket-attachment/new-ticket-attachment.mjs @@ -8,7 +8,7 @@ export default { name: "New Ticket Attachment", description: "Emit new event when a new ticket attachment is created. [See the docs here](https://desk.zoho.com/DeskAPIDocument#TicketAttachments#TicketAttachments_Listticketattachments)", type: "source", - version: "0.1.3", + version: "0.1.4", dedupe: "unique", props: { ...common.props, diff --git a/components/zoho_desk/sources/new-ticket-comment/new-ticket-comment.mjs b/components/zoho_desk/sources/new-ticket-comment/new-ticket-comment.mjs index 930d2bb30cb52..8e2f12f7c1fb6 100644 --- a/components/zoho_desk/sources/new-ticket-comment/new-ticket-comment.mjs +++ b/components/zoho_desk/sources/new-ticket-comment/new-ticket-comment.mjs @@ -6,7 +6,7 @@ export default { name: "New Ticket Comment", description: "Emit new event when a new ticket comment is created. [See the docs here](https://desk.zoho.com/DeskAPIDocument#TicketsComments#TicketsComments_Listallticketcomments)", type: "source", - version: "0.0.8", + version: "0.0.9", dedupe: "unique", props: { ...common.props, diff --git a/components/zoho_desk/sources/new-ticket-message/new-ticket-message.mjs b/components/zoho_desk/sources/new-ticket-message/new-ticket-message.mjs index 0dd6836c43344..ef0eaaae75c38 100644 --- a/components/zoho_desk/sources/new-ticket-message/new-ticket-message.mjs +++ b/components/zoho_desk/sources/new-ticket-message/new-ticket-message.mjs @@ -6,7 +6,7 @@ export default { name: "New Ticket Message", description: "Emit new event when a message ticket is created. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Threads#Threads_Listallthreads)", type: "source", - version: "0.0.8", + version: "0.0.9", dedupe: "unique", props: { ...common.props, diff --git a/components/zoho_desk/sources/new-ticket/new-ticket.mjs b/components/zoho_desk/sources/new-ticket/new-ticket.mjs index fb155a713e9a4..3fc9852dd5093 100644 --- a/components/zoho_desk/sources/new-ticket/new-ticket.mjs +++ b/components/zoho_desk/sources/new-ticket/new-ticket.mjs @@ -6,7 +6,7 @@ export default { name: "New Ticket", description: "Emit new event when a new ticket is created. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Tickets#Tickets_Listalltickets)", type: "source", - version: "0.0.8", + version: "0.0.9", dedupe: "unique", props: { ...common.props, diff --git a/components/zoho_desk/sources/updated-article-instant/updated-article-instant.mjs b/components/zoho_desk/sources/updated-article-instant/updated-article-instant.mjs index 2846ab6962ebe..13ec69da048a0 100644 --- a/components/zoho_desk/sources/updated-article-instant/updated-article-instant.mjs +++ b/components/zoho_desk/sources/updated-article-instant/updated-article-instant.mjs @@ -7,7 +7,7 @@ export default { name: "Updated Article (Instant)", description: "Emit new event when an article is updated", type: "source", - version: "0.0.4", + version: "0.0.5", dedupe: "unique", methods: { ...common.methods, diff --git a/components/zoho_desk/sources/updated-ticket/updated-ticket.mjs b/components/zoho_desk/sources/updated-ticket/updated-ticket.mjs index cae164908451b..7a81778e524d2 100644 --- a/components/zoho_desk/sources/updated-ticket/updated-ticket.mjs +++ b/components/zoho_desk/sources/updated-ticket/updated-ticket.mjs @@ -6,7 +6,7 @@ export default { name: "New Updated Ticket", description: "Emit new event when a ticket is updated. [See the docs here](https://desk.zoho.com/DeskAPIDocument#Tickets#Tickets_Listalltickets)", type: "source", - version: "0.0.8", + version: "0.0.9", dedupe: "unique", props: { ...common.props, diff --git a/components/zoho_desk/zoho_desk.app.mjs b/components/zoho_desk/zoho_desk.app.mjs index dd99ac00ebe7a..d995291514175 100644 --- a/components/zoho_desk/zoho_desk.app.mjs +++ b/components/zoho_desk/zoho_desk.app.mjs @@ -97,6 +97,48 @@ export default { }); }, }, + threadId: { + type: "string", + label: "Thread ID", + description: "The ID of the thread", + async options({ + ticketId, orgId, prevContext, + }) { + if (!ticketId) { + return []; + } + const { from = 1 } = prevContext || {}; + if (from === null) { + return []; + } + const { data: threads = [] } = + await this.getTicketThreads({ + ticketId, + headers: { + orgId, + }, + params: { + from, + limit: constants.DEFAULT_LIMIT, + }, + }); + const currentLen = threads?.length; + const options = threads?.map(({ + id: value, summary: label, + }) => ({ + value, + label: label || value, + })); + return { + options: options || [], + context: { + from: currentLen + ? currentLen + from + : null, + }, + }; + }, + }, supportEmailAddress: { type: "string", label: "Support Email Address", @@ -674,6 +716,14 @@ export default { ...args, }); }, + getTicketDetails({ + ticketId, ...args + } = {}) { + return this.makeRequest({ + path: `/tickets/${ticketId}`, + ...args, + }); + }, getTicketThreads({ ticketId, ...args } = {}) { @@ -682,6 +732,14 @@ export default { ...args, }); }, + getThreadDetails({ + ticketId, threadId, ...args + } = {}) { + return this.makeRequest({ + path: `/tickets/${ticketId}/threads/${threadId}`, + ...args, + }); + }, getContacts(args = {}) { return this.makeRequest({ path: "/contacts",