From db76782ca92c24b96f153ff9e15e3ca9423d09f0 Mon Sep 17 00:00:00 2001 From: Michelle Bergeron Date: Wed, 23 Jul 2025 17:29:52 -0400 Subject: [PATCH 1/9] new components --- .../actions/create-agent/create-agent.mjs | 103 ++++++ .../create-solution-article.mjs | 72 +++++ .../create-ticket-field.mjs | 110 +++++++ .../delete-solution-article.mjs | 44 +++ .../actions/get-contact/get-contact.mjs | 26 ++ .../get-solution-article.mjs | 44 +++ .../actions/list-agents/list-agents.mjs | 66 ++++ .../list-category-folders.mjs | 28 ++ .../list-folder-articles.mjs | 47 +++ .../list-solution-categories.mjs | 21 ++ .../list-ticket-fields/list-ticket-fields.mjs | 32 ++ .../actions/update-agent/update-agent.mjs | 112 +++++++ .../actions/update-contact/update-contact.mjs | 64 ++++ .../update-solution-article.mjs | 84 +++++ .../update-ticket-field.mjs | 106 +++++++ components/freshdesk/common/constants.mjs | 38 +++ components/freshdesk/common/utils.mjs | 27 ++ components/freshdesk/freshdesk.app.mjs | 298 +++++++++++++++++- components/freshdesk/package.json | 2 +- .../freshdesk/sources/common/polling.mjs | 63 ++++ .../contact-updated/contact-updated.mjs | 28 ++ .../sources/new-contact/new-contact.mjs | 58 ++-- .../sources/new-ticket/new-ticket.mjs | 61 ++-- .../sources/ticket-updated/ticket-updated.mjs | 28 ++ 24 files changed, 1476 insertions(+), 86 deletions(-) create mode 100644 components/freshdesk/actions/create-agent/create-agent.mjs create mode 100644 components/freshdesk/actions/create-solution-article/create-solution-article.mjs create mode 100644 components/freshdesk/actions/create-ticket-field/create-ticket-field.mjs create mode 100644 components/freshdesk/actions/delete-solution-article/delete-solution-article.mjs create mode 100644 components/freshdesk/actions/get-contact/get-contact.mjs create mode 100644 components/freshdesk/actions/get-solution-article/get-solution-article.mjs create mode 100644 components/freshdesk/actions/list-agents/list-agents.mjs create mode 100644 components/freshdesk/actions/list-category-folders/list-category-folders.mjs create mode 100644 components/freshdesk/actions/list-folder-articles/list-folder-articles.mjs create mode 100644 components/freshdesk/actions/list-solution-categories/list-solution-categories.mjs create mode 100644 components/freshdesk/actions/list-ticket-fields/list-ticket-fields.mjs create mode 100644 components/freshdesk/actions/update-agent/update-agent.mjs create mode 100644 components/freshdesk/actions/update-contact/update-contact.mjs create mode 100644 components/freshdesk/actions/update-solution-article/update-solution-article.mjs create mode 100644 components/freshdesk/actions/update-ticket-field/update-ticket-field.mjs create mode 100644 components/freshdesk/sources/common/polling.mjs create mode 100644 components/freshdesk/sources/contact-updated/contact-updated.mjs create mode 100644 components/freshdesk/sources/ticket-updated/ticket-updated.mjs diff --git a/components/freshdesk/actions/create-agent/create-agent.mjs b/components/freshdesk/actions/create-agent/create-agent.mjs new file mode 100644 index 0000000000000..9575454993368 --- /dev/null +++ b/components/freshdesk/actions/create-agent/create-agent.mjs @@ -0,0 +1,103 @@ +import freshdesk from "../../freshdesk.app.mjs"; +import constants from "../../common/constants.mjs"; + +export default { + key: "freshdesk-create-agent", + name: "Create Agent", + description: "Create an agent in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#create_agent)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + email: { + type: "string", + label: "Email", + description: "Email address of the Agent.", + }, + ticketScope: { + type: "integer", + label: "Ticket Scope", + description: "Ticket permission of the agent. Current logged in agent can't update his/her ticket_scope", + options: constants.TICKET_SCOPE, + }, + occasional: { + type: "boolean", + label: "Occasional", + description: "Set to true if this is an occasional agent (true => occasional, false => full-time)", + optional: true, + }, + signature: { + type: "string", + label: "Signature", + description: "Signature of the agent in HTML format", + optional: true, + }, + skillIds: { + propDefinition: [ + freshdesk, + "skillIds", + ], + }, + groupIds: { + propDefinition: [ + freshdesk, + "groupId", + ], + type: "string[]", + label: "Group IDs", + description: "Array of group IDs", + optional: true, + }, + roleIds: { + propDefinition: [ + freshdesk, + "roleIds", + ], + }, + agentType: { + type: "integer", + label: "Agent Type", + description: "Type of the agent", + options: constants.AGENT_TYPE, + optional: true, + }, + language: { + type: "string", + label: "Language", + description: " Language of the Agent. Default language is `en`", + optional: true, + }, + timeZone: { + type: "string", + label: "Time Zone", + description: "Time zone of the agent. Default value is time zone of the domain.", + optional: true, + }, + focusMode: { + type: "boolean", + label: "Focus Mode", + description: "Focus mode of the agent. Default value is `true`", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.freshdesk.createAgent({ + $, + data: { + email: this.email, + ticket_scope: this.ticketScope, + occasional: this.occasional, + signature: this.signature, + skill_ids: this.skillIds, + group_ids: this.groupIds, + role_ids: this.roleIds, + agent_type: this.agentType, + language: this.language, + time_zone: this.timeZone, + focus_mode: this.focusMode, + }, + }); + $.export("$summary", `Agent ${this.email} created successfully`); + return response; + }, +}; diff --git a/components/freshdesk/actions/create-solution-article/create-solution-article.mjs b/components/freshdesk/actions/create-solution-article/create-solution-article.mjs new file mode 100644 index 0000000000000..82518193554cf --- /dev/null +++ b/components/freshdesk/actions/create-solution-article/create-solution-article.mjs @@ -0,0 +1,72 @@ +import freshdesk from "../../freshdesk.app.mjs"; +import constants from "../../common/constants.mjs"; +import { parseObject } from "../../common/utils.mjs"; + +export default { + key: "freshdesk-create-solution-article", + name: "Create Solution Article", + description: "Create a solution article in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#solution_article_attributes)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + categoryId: { + propDefinition: [ + freshdesk, + "categoryId", + ], + }, + folderId: { + propDefinition: [ + freshdesk, + "folderId", + (c) => ({ + categoryId: c.categoryId, + }), + ], + }, + title: { + type: "string", + label: "Title", + description: "Title of the article", + }, + description: { + type: "string", + label: "Description", + description: "Description of the article", + }, + status: { + type: "integer", + label: "Status", + description: "Status of the article", + options: constants.ARTICLE_STATUS, + }, + seoData: { + type: "object", + label: "SEO Data", + description: "Meta data for search engine optimization. Allows meta_title, meta_description and meta_keywords", + optional: true, + }, + tags: { + type: "string[]", + label: "Tags", + description: "Tags for the article", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.freshdesk.createArticle({ + $, + folderId: this.folderId, + data: { + title: this.title, + description: this.description, + status: this.status, + seo_data: parseObject(this.seoData), + tags: this.tags, + }, + }); + $.export("$summary", `Successfully created solution article ${this.title}`); + return response; + }, +}; diff --git a/components/freshdesk/actions/create-ticket-field/create-ticket-field.mjs b/components/freshdesk/actions/create-ticket-field/create-ticket-field.mjs new file mode 100644 index 0000000000000..f0df37382542b --- /dev/null +++ b/components/freshdesk/actions/create-ticket-field/create-ticket-field.mjs @@ -0,0 +1,110 @@ +import freshdesk from "../../freshdesk.app.mjs"; +import { parseObject } from "../../common/utils.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "freshdesk-create-ticket-field", + name: "Create Ticket Field", + description: "Create a ticket field in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#create_ticket_field)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + label: { + type: "string", + label: "Label", + description: "Display the name of the Ticket Field", + }, + labelForCustomers: { + type: "string", + label: "Label for Customers", + description: "The label for the field as seen by customers", + }, + customersCanEdit: { + type: "boolean", + label: "Customers Can Edit", + description: "Whether customers can edit the field", + optional: true, + }, + displayedToCustomers: { + type: "boolean", + label: "Displayed to Customers", + description: "Whether the field is displayed to customers", + optional: true, + }, + position: { + type: "integer", + label: "Position", + description: "The position of the fieldPosition in which the ticket field is displayed in the form. If not given, it will be displayed on top", + optional: true, + }, + type: { + type: "string", + label: "Type", + description: "The type of the field. Can be custom_dropdown, custom_checkbox, custom_text, etc...", + default: "custom_dropdown", + optional: true, + }, + requiredForClusure: { + type: "boolean", + label: "Required for Closure", + description: "Set to `true` if the field is mandatory for closing the ticket", + optional: true, + }, + requiredForAgents: { + type: "boolean", + label: "Required for Agents", + description: "Set to `true` if the field is mandatory for agents", + optional: true, + }, + requiredForCustomers: { + type: "boolean", + label: "Required for Customers", + description: "Set to `true` if the field is mandatory for customers", + optional: true, + }, + choices: { + type: "string[]", + label: "Choices", + description: "Array of key, value pairs containing the value and position of dropdown choices. Example: `[{ \"value\": \"Refund\", \"position\": 1 }, { \"value\": \"FaultyProduct\", \"position\": 2 }]`", + optional: true, + }, + dependentFields: { + type: "string[]", + label: "Dependent Fields", + description: "Applicable only for dependent fields, this contains details of nested fields Example: `[{ \"label\": \"District\", \"label_for_customers\": \"District\", \"level\": 2 }, { \"label\": \"Branch\", \"label_for_customers\": \"Branch\", \"level\": 3 }]`", + optional: true, + }, + sectionMappings: { + type: "string[]", + label: "Section Mappings", + description: "Applicable only if the field is part of a section. This contains the details of a section (ID, position) for which it is been a part of. Example: `[{ \"position\": 3, \"section_id\": 1 }]`", + optional: true, + }, + }, + async run({ $ }) { + if (this.type === "custom_dropdown" && !this.choices) { + throw new ConfigurationError("Choices are required for custom_dropdown fields"); + } + + const response = await this.freshdesk.createTicketField({ + $, + data: { + label: this.label, + customers_can_edit: this.customersCanEdit, + label_for_customers: this.labelForCustomers, + displayed_to_customers: this.displayedToCustomers, + position: this.position, + type: this.type, + required_for_closure: this.requiredForClusure, + required_for_agents: this.requiredForAgents, + required_for_customers: this.requiredForCustomers, + choices: parseObject(this.choices), + dependent_fields: parseObject(this.dependentFields), + section_mappings: parseObject(this.sectionMappings), + }, + }); + $.export("$summary", `Successfully created ticket field: ${response.label}`); + return response; + }, +}; diff --git a/components/freshdesk/actions/delete-solution-article/delete-solution-article.mjs b/components/freshdesk/actions/delete-solution-article/delete-solution-article.mjs new file mode 100644 index 0000000000000..1763cebdd1960 --- /dev/null +++ b/components/freshdesk/actions/delete-solution-article/delete-solution-article.mjs @@ -0,0 +1,44 @@ +import freshdesk from "../../freshdesk.app.mjs"; + +export default { + key: "freshdesk-delete-solution-article", + name: "Delete Solution Article", + description: "Delete a solution article in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#solution_article_attributes)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + categoryId: { + propDefinition: [ + freshdesk, + "categoryId", + ], + }, + folderId: { + propDefinition: [ + freshdesk, + "folderId", + (c) => ({ + categoryId: c.categoryId, + }), + ], + }, + articleId: { + propDefinition: [ + freshdesk, + "articleId", + (c) => ({ + folderId: c.folderId, + }), + ], + }, + }, + async run({ $ }) { + const response = await this.freshdesk.deleteArticle({ + $, + articleId: this.articleId, + }); + $.export("$summary", `Successfully deleted solution article ${this.articleId}`); + return response; + }, +}; diff --git a/components/freshdesk/actions/get-contact/get-contact.mjs b/components/freshdesk/actions/get-contact/get-contact.mjs new file mode 100644 index 0000000000000..4577a0a82ae0d --- /dev/null +++ b/components/freshdesk/actions/get-contact/get-contact.mjs @@ -0,0 +1,26 @@ +import freshdesk from "../../freshdesk.app.mjs"; + +export default { + key: "freshdesk-get-contact", + name: "Get Contact", + description: "Get a contact from Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#view_contact)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + contactId: { + propDefinition: [ + freshdesk, + "contactId", + ], + }, + }, + async run({ $ }) { + const contact = await this.freshdesk.getContact({ + $, + contactId: this.contactId, + }); + $.export("$summary", `Successfully fetched contact: ${contact.name}`); + return contact; + }, +}; diff --git a/components/freshdesk/actions/get-solution-article/get-solution-article.mjs b/components/freshdesk/actions/get-solution-article/get-solution-article.mjs new file mode 100644 index 0000000000000..7bdcb9a4bbbbd --- /dev/null +++ b/components/freshdesk/actions/get-solution-article/get-solution-article.mjs @@ -0,0 +1,44 @@ +import freshdesk from "../../freshdesk.app.mjs"; + +export default { + key: "freshdesk-get-solution-article", + name: "Get Solution Article", + description: "Get a solution article in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#solution_article_attributes)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + categoryId: { + propDefinition: [ + freshdesk, + "categoryId", + ], + }, + folderId: { + propDefinition: [ + freshdesk, + "folderId", + (c) => ({ + categoryId: c.categoryId, + }), + ], + }, + articleId: { + propDefinition: [ + freshdesk, + "articleId", + (c) => ({ + folderId: c.folderId, + }), + ], + }, + }, + async run({ $ }) { + const response = await this.freshdesk.getArticle({ + $, + articleId: this.articleId, + }); + $.export("$summary", `Successfully retrieved solution article ${this.articleId}`); + return response; + }, +}; diff --git a/components/freshdesk/actions/list-agents/list-agents.mjs b/components/freshdesk/actions/list-agents/list-agents.mjs new file mode 100644 index 0000000000000..83613598a5200 --- /dev/null +++ b/components/freshdesk/actions/list-agents/list-agents.mjs @@ -0,0 +1,66 @@ +import freshdesk from "../../freshdesk.app.mjs"; + +export default { + key: "freshdesk-list-agents", + name: "List Agents", + description: "List all agents in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#list_all_agents)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + email: { + type: "string", + label: "Email", + description: "Filter results by email address", + optional: true, + }, + mobile: { + type: "string", + label: "Mobile", + description: "Filter results by mobile number", + optional: true, + }, + phone: { + type: "string", + label: "Phone", + description: "Filter results by phone number", + optional: true, + }, + state: { + type: "string", + label: "State", + description: "Filter results by state", + options: [ + "fulltime", + "occasional", + ], + optional: true, + }, + maxResults: { + propDefinition: [ + freshdesk, + "maxResults", + ], + }, + }, + async run({ $ }) { + const results = await this.freshdesk.getPaginatedResources({ + fn: this.freshdesk.listAgents, + args: { + $, + params: { + email: this.email, + mobile: this.mobile, + phone: this.phone, + state: this.state, + }, + }, + max: this.maxResults, + }); + + $.export("$summary", `Successfully listed ${results.length} agent${results.length === 1 + ? "" + : "s"}`); + return results; + }, +}; diff --git a/components/freshdesk/actions/list-category-folders/list-category-folders.mjs b/components/freshdesk/actions/list-category-folders/list-category-folders.mjs new file mode 100644 index 0000000000000..76cf555e66934 --- /dev/null +++ b/components/freshdesk/actions/list-category-folders/list-category-folders.mjs @@ -0,0 +1,28 @@ +import freshdesk from "../../freshdesk.app.mjs"; + +export default { + key: "freshdesk-list-category-folders", + name: "List Category Folders", + description: "List category folders in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#solution_folder_attributes)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + categoryId: { + propDefinition: [ + freshdesk, + "categoryId", + ], + }, + }, + async run({ $ }) { + const response = await this.freshdesk.listCategoryFolders({ + $, + categoryId: this.categoryId, + }); + $.export("$summary", `Successfully listed ${response.length} solution folder${response.length === 1 + ? "" + : "s"}`); + return response; + }, +}; diff --git a/components/freshdesk/actions/list-folder-articles/list-folder-articles.mjs b/components/freshdesk/actions/list-folder-articles/list-folder-articles.mjs new file mode 100644 index 0000000000000..6ac720ada9fc4 --- /dev/null +++ b/components/freshdesk/actions/list-folder-articles/list-folder-articles.mjs @@ -0,0 +1,47 @@ +import freshdesk from "../../freshdesk.app.mjs"; + +export default { + key: "freshdesk-list-folder-articles", + name: "List Folder Articles", + description: "List folder articles in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#solution_article_attributes)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + categoryId: { + propDefinition: [ + freshdesk, + "categoryId", + ], + }, + folderId: { + propDefinition: [ + freshdesk, + "folderId", + (c) => ({ + categoryId: c.categoryId, + }), + ], + }, + maxResults: { + propDefinition: [ + freshdesk, + "maxResults", + ], + }, + }, + async run({ $ }) { + const results = await this.freshdesk.getPaginatedResources({ + fn: this.freshdesk.listFolderArticles, + args: { + $, + folderId: this.folderId, + }, + max: this.maxResults, + }); + $.export("$summary", `Successfully listed ${results.length} solution article${results.length === 1 + ? "" + : "s"}`); + return results; + }, +}; diff --git a/components/freshdesk/actions/list-solution-categories/list-solution-categories.mjs b/components/freshdesk/actions/list-solution-categories/list-solution-categories.mjs new file mode 100644 index 0000000000000..41c4cfb28344a --- /dev/null +++ b/components/freshdesk/actions/list-solution-categories/list-solution-categories.mjs @@ -0,0 +1,21 @@ +import freshdesk from "../../freshdesk.app.mjs"; + +export default { + key: "freshdesk-list-solution-categories", + name: "List Solution Categories", + description: "List solution categories in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#solution_category_attributes)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + }, + async run({ $ }) { + const response = await this.freshdesk.listSolutionCategories({ + $, + }); + $.export("$summary", `Successfully listed ${response.length} solution category${response.length === 1 + ? "" + : "s"}`); + return response; + }, +}; diff --git a/components/freshdesk/actions/list-ticket-fields/list-ticket-fields.mjs b/components/freshdesk/actions/list-ticket-fields/list-ticket-fields.mjs new file mode 100644 index 0000000000000..8513d8c4b2ce3 --- /dev/null +++ b/components/freshdesk/actions/list-ticket-fields/list-ticket-fields.mjs @@ -0,0 +1,32 @@ +import freshdesk from "../../freshdesk.app.mjs"; + +export default { + key: "freshdesk-list-ticket-fields", + name: "List Ticket Fields", + description: "List all ticket fields in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#list_all_ticket_fields)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + maxResults: { + propDefinition: [ + freshdesk, + "maxResults", + ], + }, + }, + async run({ $ }) { + const results = await this.freshdesk.getPaginatedResources({ + fn: this.freshdesk.listTicketFields, + args: { + $, + }, + max: this.maxResults, + }); + + $.export("$summary", `Successfully listed ${results.length} ticket field${results.length === 1 + ? "" + : "s"}`); + return results; + }, +}; diff --git a/components/freshdesk/actions/update-agent/update-agent.mjs b/components/freshdesk/actions/update-agent/update-agent.mjs new file mode 100644 index 0000000000000..f63e6fe3dfe02 --- /dev/null +++ b/components/freshdesk/actions/update-agent/update-agent.mjs @@ -0,0 +1,112 @@ +import freshdesk from "../../freshdesk.app.mjs"; +import constants from "../../common/constants.mjs"; + +export default { + key: "freshdesk-update-agent", + name: "Update Agent", + description: "Update an agent in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#update_agent)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + agentId: { + propDefinition: [ + freshdesk, + "agentId", + ], + }, + email: { + type: "string", + label: "Email", + description: "Email address of the Agent.", + optional: true, + }, + ticketScope: { + type: "integer", + label: "Ticket Scope", + description: "Ticket permission of the agent. Current logged in agent can't update his/her ticket_scope", + options: constants.TICKET_SCOPE, + optional: true, + }, + occasional: { + type: "boolean", + label: "Occasional", + description: "Set to true if this is an occasional agent (true => occasional, false => full-time)", + optional: true, + }, + signature: { + type: "string", + label: "Signature", + description: "Signature of the agent in HTML format", + optional: true, + }, + skillIds: { + propDefinition: [ + freshdesk, + "skillIds", + ], + }, + groupIds: { + propDefinition: [ + freshdesk, + "groupId", + ], + type: "string[]", + label: "Group IDs", + description: "Array of group IDs", + optional: true, + }, + roleIds: { + propDefinition: [ + freshdesk, + "roleIds", + ], + }, + agentType: { + type: "integer", + label: "Agent Type", + description: "Type of the agent", + options: constants.AGENT_TYPE, + optional: true, + }, + language: { + type: "string", + label: "Language", + description: " Language of the Agent. Default language is `en`", + optional: true, + }, + timeZone: { + type: "string", + label: "Time Zone", + description: "Time zone of the agent. Default value is time zone of the domain.", + optional: true, + }, + focusMode: { + type: "boolean", + label: "Focus Mode", + description: "Focus mode of the agent. Default value is `true`", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.freshdesk.updateAgent({ + $, + agentId: this.agentId, + data: { + email: this.email, + ticket_scope: this.ticketScope, + occasional: this.occasional, + signature: this.signature, + skill_ids: this.skillIds, + group_ids: this.groupIds, + role_ids: this.roleIds, + agent_type: this.agentType, + language: this.language, + time_zone: this.timeZone, + focus_mode: this.focusMode, + }, + }); + $.export("$summary", `Agent ${this.email} updated successfully`); + return response; + }, +}; diff --git a/components/freshdesk/actions/update-contact/update-contact.mjs b/components/freshdesk/actions/update-contact/update-contact.mjs new file mode 100644 index 0000000000000..95255b768fc66 --- /dev/null +++ b/components/freshdesk/actions/update-contact/update-contact.mjs @@ -0,0 +1,64 @@ +import freshdesk from "../../freshdesk.app.mjs"; + +export default { + key: "freshdesk-update-contact", + name: "Update Contact", + description: "Update a contact in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#update_contact)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + contactId: { + propDefinition: [ + freshdesk, + "contactId", + ], + }, + name: { + type: "string", + label: "Name", + description: "Name of the contact.", + optional: true, + }, + email: { + type: "string", + label: "Email Address", + description: "Primary email address of the contact", + optional: true, + }, + otherEmails: { + type: "string[]", + label: "Additional Email Addresses", + description: "One or more additional email addresses for the contact", + optional: true, + }, + phone: { + type: "string", + label: "Phone Number", + description: "Phone number of the contact", + optional: true, + }, + companyId: { + propDefinition: [ + freshdesk, + "companyId", + ], + optional: true, + }, + }, + async run({ $ }) { + const response = await this.freshdesk.updateContact({ + $, + contactId: this.contactId, + data: { + name: this.name, + email: this.email, + other_emails: this.otherEmails, + phone: this.phone, + company_id: this.companyId, + }, + }); + $.export("$summary", `Contact successfully updated: ${response.name}`); + return response; + }, +}; diff --git a/components/freshdesk/actions/update-solution-article/update-solution-article.mjs b/components/freshdesk/actions/update-solution-article/update-solution-article.mjs new file mode 100644 index 0000000000000..8b000841d5800 --- /dev/null +++ b/components/freshdesk/actions/update-solution-article/update-solution-article.mjs @@ -0,0 +1,84 @@ +import freshdesk from "../../freshdesk.app.mjs"; +import constants from "../../common/constants.mjs"; +import { parseObject } from "../../common/utils.mjs"; + +export default { + key: "freshdesk-update-solution-article", + name: "Update Solution Article", + description: "Update a solution article in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#solution_article_attributes)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + categoryId: { + propDefinition: [ + freshdesk, + "categoryId", + ], + }, + folderId: { + propDefinition: [ + freshdesk, + "folderId", + (c) => ({ + categoryId: c.categoryId, + }), + ], + }, + articleId: { + propDefinition: [ + freshdesk, + "articleId", + (c) => ({ + folderId: c.folderId, + }), + ], + }, + title: { + type: "string", + label: "Title", + description: "Title of the article", + optional: true, + }, + description: { + type: "string", + label: "Description", + description: "Description of the article", + optional: true, + }, + status: { + type: "integer", + label: "Status", + description: "Status of the article", + options: constants.ARTICLE_STATUS, + optional: true, + }, + seoData: { + type: "object", + label: "SEO Data", + description: "Meta data for search engine optimization. Allows meta_title, meta_description and meta_keywords", + optional: true, + }, + tags: { + type: "string[]", + label: "Tags", + description: "Tags for the article", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.freshdesk.updateArticle({ + $, + articleId: this.articleId, + data: { + title: this.title, + description: this.description, + status: this.status, + seo_data: parseObject(this.seoData), + tags: this.tags, + }, + }); + $.export("$summary", `Successfully updated solution article ${this.title}`); + return response; + }, +}; diff --git a/components/freshdesk/actions/update-ticket-field/update-ticket-field.mjs b/components/freshdesk/actions/update-ticket-field/update-ticket-field.mjs new file mode 100644 index 0000000000000..a0b54f8989b1f --- /dev/null +++ b/components/freshdesk/actions/update-ticket-field/update-ticket-field.mjs @@ -0,0 +1,106 @@ +import freshdesk from "../../freshdesk.app.mjs"; +import { parseObject } from "../../common/utils.mjs"; + +export default { + key: "freshdesk-update-ticket-field", + name: "Update Ticket Field", + description: "Update a ticket field in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#update_ticket_field)", + version: "0.0.1", + type: "action", + props: { + freshdesk, + ticketFieldId: { + propDefinition: [ + freshdesk, + "ticketFieldId", + ], + }, + label: { + type: "string", + label: "Label", + description: "Display the name of the Ticket Field", + optional: true, + }, + labelForCustomers: { + type: "string", + label: "Label for Customers", + description: "The label for the field as seen by customers", + optional: true, + }, + customersCanEdit: { + type: "boolean", + label: "Customers Can Edit", + description: "Whether customers can edit the field", + optional: true, + }, + displayedToCustomers: { + type: "boolean", + label: "Displayed to Customers", + description: "Whether the field is displayed to customers", + optional: true, + }, + position: { + type: "integer", + label: "Position", + description: "The position of the fieldPosition in which the ticket field is displayed in the form. If not given, it will be displayed on top", + optional: true, + }, + requiredForClusure: { + type: "boolean", + label: "Required for Closure", + description: "Set to `true` if the field is mandatory for closing the ticket", + optional: true, + }, + requiredForAgents: { + type: "boolean", + label: "Required for Agents", + description: "Set to `true` if the field is mandatory for agents", + optional: true, + }, + requiredForCustomers: { + type: "boolean", + label: "Required for Customers", + description: "Set to `true` if the field is mandatory for customers", + optional: true, + }, + choices: { + type: "string[]", + label: "Choices", + description: "Array of key, value pairs containing the value and position of dropdown choices. Example: `[{ \"value\": \"Refund\", \"position\": 1 }, { \"value\": \"FaultyProduct\", \"position\": 2 }]`", + optional: true, + }, + dependentFields: { + type: "string[]", + label: "Dependent Fields", + description: "Applicable only for dependent fields, this contains details of nested fields Example: `[{ \"label\": \"District\", \"label_for_customers\": \"District\", \"level\": 2 }, { \"label\": \"Branch\", \"label_for_customers\": \"Branch\", \"level\": 3 }]`", + optional: true, + }, + sectionMappings: { + type: "string[]", + label: "Section Mappings", + description: "Applicable only if the field is part of a section. This contains the details of a section (ID, position) for which it is been a part of. Example: `[{ \"position\": 3, \"section_id\": 1 }]`", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.freshdesk.updateTicketField({ + $, + ticketFieldId: this.ticketFieldId, + data: { + label: this.label, + label_for_customers: this.labelForCustomers, + customers_can_edit: this.customersCanEdit, + displayed_to_customers: this.displayedToCustomers, + position: this.position, + required_for_closure: this.requiredForClusure, + required_for_agents: this.requiredForAgents, + required_for_customers: this.requiredForCustomers, + choices: parseObject(this.choices), + dependent_fields: parseObject(this.dependentFields), + section_mappings: parseObject(this.sectionMappings), + }, + }); + $.export("$summary", `Successfully updated ticket field: ${response.label}`); + return response; + }, +}; diff --git a/components/freshdesk/common/constants.mjs b/components/freshdesk/common/constants.mjs index afaa9889c90c8..b2247687f33ca 100644 --- a/components/freshdesk/common/constants.mjs +++ b/components/freshdesk/common/constants.mjs @@ -37,4 +37,42 @@ export default { value: 4, }, ], + TICKET_SCOPE: [ + { + label: "Global Access", + value: 1, + }, + { + label: "Group Access", + value: 2, + }, + { + label: "Restricted Access", + value: 3, + }, + ], + AGENT_TYPE: [ + { + label: "Support Agent", + value: 1, + }, + { + label: "Field Agent", + value: 2, + }, + { + label: "Collaborator", + value: 3, + }, + ], + ARTICLE_STATUS: [ + { + label: "Draft", + value: 1, + }, + { + label: "Published", + value: 2, + }, + ], }; diff --git a/components/freshdesk/common/utils.mjs b/components/freshdesk/common/utils.mjs index b62df586026b1..455eb6e600236 100644 --- a/components/freshdesk/common/utils.mjs +++ b/components/freshdesk/common/utils.mjs @@ -22,6 +22,33 @@ const removeNullEntries = (obj) => : acc; }, {}); +const parseObject = (obj) => { + if (!obj) { + return undefined; + } + if (typeof obj === "string") { + try { + return JSON.parse(obj); + } catch (e) { + return obj; + } + } + if (Array.isArray(obj)) { + return obj.map(parseObject); + } + if (typeof obj === "object") { + return Object.fromEntries(Object.entries(obj).map(([ + key, + value, + ]) => [ + key, + parseObject(value), + ])); + } + return obj; +}; + export { removeNullEntries, + parseObject, }; diff --git a/components/freshdesk/freshdesk.app.mjs b/components/freshdesk/freshdesk.app.mjs index a9d816414dacb..c49f18ac474f7 100644 --- a/components/freshdesk/freshdesk.app.mjs +++ b/components/freshdesk/freshdesk.app.mjs @@ -19,7 +19,6 @@ export default { })); }, }, - ticketId: { type: "integer", label: "Ticket ID", @@ -79,7 +78,6 @@ export default { })); }, }, - ticketStatus: { type: "integer", label: "Status", @@ -116,6 +114,138 @@ export default { })); }, }, + contactId: { + type: "string", + label: "Contact ID", + description: "The ID of a contact", + async options({ + companyId, page, + }) { + const contacts = await this.getContacts({ + params: { + company_id: companyId, + page: page + 1, + }, + }); + return contacts + .map(({ + id, name, email, + }) => ({ + label: name || email, + value: id, + })); + }, + }, + ticketFieldId: { + type: "string", + label: "Ticket Field ID", + description: "The ID of a ticket field", + async options({ page }) { + const fields = await this.listTicketFields({ + params: { + page: page + 1, + }, + }); + return fields.map(({ + id, label, + }) => ({ + label: label || id, + value: id, + })); + }, + }, + skillIds: { + type: "string[]", + label: "Skill IDs", + description: "Array of skill IDs", + optional: true, + async options({ page }) { + const skills = await this.listSkills({ + params: { + page: page + 1, + }, + }); + return skills.map(({ + id, name, + }) => ({ + label: name || id, + value: id, + })); + }, + }, + roleIds: { + type: "string[]", + label: "Role IDs", + description: "Array of role IDs", + optional: true, + async options() { + const roles = await this.listRoles(); + return roles.map(({ + id, name, + }) => ({ + label: name || id, + value: id, + })); + }, + }, + categoryId: { + type: "integer", + label: "Category ID", + description: "The ID of a category", + async options() { + const categories = await this.listSolutionCategories(); + return categories.map(({ + id, name, + }) => ({ + label: name || id, + value: id, + })); + }, + }, + folderId: { + type: "integer", + label: "Folder ID", + description: "The ID of a folder", + async options({ categoryId }) { + const folders = await this.listCategoryFolders({ + categoryId, + }); + return folders.map(({ + id, name, + }) => ({ + label: name || id, + value: id, + })); + }, + }, + articleId: { + type: "integer", + label: "Article ID", + description: "The ID of an article", + async options({ + page, folderId, + }) { + const articles = await this.listFolderArticles({ + folderId, + params: { + page: page + 1, + }, + }); + return articles.map(({ + id, title, + }) => ({ + label: title || id, + value: id, + })); + }, + }, + maxResults: { + type: "integer", + label: "Max Results", + description: "The maximum number of results to return", + default: 100, + optional: true, + }, ticketTags: { type: "string[]", label: "Tags", @@ -210,6 +340,14 @@ export default { ...args, }); }, + async getContact({ + contactId, ...args + }) { + return this._makeRequest({ + url: `/contacts/${contactId}`, + ...args, + }); + }, async getContacts(args) { return this._makeRequest({ url: "/contacts", @@ -223,6 +361,15 @@ export default { ...args, }); }, + async updateContact({ + contactId, ...args + }) { + return this._makeRequest({ + url: `/contacts/${contactId}`, + method: "put", + ...args, + }); + }, async createTicket(args) { return this._makeRequest({ url: "/tickets", @@ -250,6 +397,119 @@ export default { ...args, }); }, + async listTicketFields(args) { + return this._makeRequest({ + url: "/ticket_fields", + ...args, + }); + }, + async createTicketField(args) { + return this._makeRequest({ + url: "/admin/ticket_fields", + method: "post", + ...args, + }); + }, + async updateTicketField({ + ticketFieldId, ...args + }) { + return this._makeRequest({ + url: `/admin/ticket_fields/${ticketFieldId}`, + method: "put", + ...args, + }); + }, + async listAgents(args) { + return this._makeRequest({ + url: "/agents", + ...args, + }); + }, + async createAgent(args) { + return this._makeRequest({ + url: "/agents", + method: "post", + ...args, + }); + }, + async updateAgent({ + agentId, ...args + }) { + return this._makeRequest({ + url: `/agents/${agentId}`, + method: "put", + ...args, + }); + }, + async listSkills(args) { + return this._makeRequest({ + url: "/admin/skills", + ...args, + }); + }, + async listRoles(args) { + return this._makeRequest({ + url: "/roles", + ...args, + }); + }, + async listSolutionCategories(args) { + return this._makeRequest({ + url: "/solutions/categories", + ...args, + }); + }, + async listCategoryFolders({ + categoryId, ...args + }) { + return this._makeRequest({ + url: `/solutions/categories/${categoryId}/folders`, + ...args, + }); + }, + async listFolderArticles({ + folderId, ...args + }) { + return this._makeRequest({ + url: `/solutions/folders/${folderId}/articles`, + ...args, + }); + }, + async getArticle({ + articleId, ...args + }) { + return this._makeRequest({ + url: `/solutions/articles/${articleId}`, + ...args, + }); + }, + async createArticle({ + folderId, ...args + }) { + return this._makeRequest({ + url: `/solutions/folders/${folderId}/articles`, + method: "post", + ...args, + }); + }, + async updateArticle({ + articleId, ...args + }) { + return this._makeRequest({ + url: `/solutions/articles/${articleId}`, + method: "put", + ...args, + }); + }, + async deleteArticle({ + articleId, ...args + }) { + return this._makeRequest({ + url: `/solutions/articles/${articleId}`, + method: "delete", + ...args, + }); + }, async listTickets(args) { return this._makeRequest({ url: "/tickets", @@ -375,5 +635,39 @@ export default { ...args, }); }, + async *paginate({ + fn, args, max, + }) { + args = { + ...args, + params: { + ...args?.params, + page: 1, + per_page: 100, + }, + }; + let total, count = 0; + do { + const results = await fn(args); + total = results?.length; + if (!total) { + return; + } + for (const result of results) { + yield result; + } + if (max && ++count >= max) { + return; + } + args.params.page += 1; + } while (total === args.params.per_page); + }, + async getPaginatedResources(opts) { + const results = []; + for await (const result of this.paginate(opts)) { + results.push(result); + } + return results; + }, }, }; diff --git a/components/freshdesk/package.json b/components/freshdesk/package.json index 7b0c3c96ae7af..a37abb1407f9a 100644 --- a/components/freshdesk/package.json +++ b/components/freshdesk/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/freshdesk", - "version": "0.3.1", + "version": "0.4.0", "description": "Pipedream Freshdesk Components", "main": "freshdesk.app.mjs", "keywords": [ diff --git a/components/freshdesk/sources/common/polling.mjs b/components/freshdesk/sources/common/polling.mjs new file mode 100644 index 0000000000000..671f72abdf0af --- /dev/null +++ b/components/freshdesk/sources/common/polling.mjs @@ -0,0 +1,63 @@ +import freshdesk from "../../freshdesk.app.mjs"; +import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; +import moment from "moment"; + +export default { + props: { + freshdesk, + timer: { + type: "$.interface.timer", + default: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + db: "$.service.db", + }, + methods: { + getResourceFn() { + throw new Error("getResourceFn is not implemented"); + }, + getTsField() { + throw new Error("getTsField is not implemented"); + }, + generateMeta() { + throw new Error("generateMeta is not implemented"); + }, + }, + async run() { + const data = []; + let lastDateChecked = this.freshdesk.getLastDateChecked(this.db); + if (!lastDateChecked) { + lastDateChecked = new Date().toISOString(); + this.freshdesk.setLastDateChecked(this.db, lastDateChecked); + } + let maxTs = lastDateChecked; + + const resourceFn = this.getResourceFn(); + const tsField = this.getTsField(); + + const formatedDate = lastDateChecked.substr( + 0, + (lastDateChecked + "T").indexOf("T"), + ); + const results = await resourceFn({ + query: `"${tsField}:>'${formatedDate}'"`, + page: 1, + }); + for await (const result of results) { + data.push(result); + } + + data && + data.reverse().forEach((item) => { + if (moment(item[tsField]).isAfter(lastDateChecked)) { + if (moment(item[tsField]).isAfter(maxTs)) { + maxTs = item[tsField]; + } + this.$emit(item, this.generateMeta(item)); + } + }); + + this.freshdesk.setLastDateChecked(this.db, maxTs); + }, +}; diff --git a/components/freshdesk/sources/contact-updated/contact-updated.mjs b/components/freshdesk/sources/contact-updated/contact-updated.mjs new file mode 100644 index 0000000000000..3857b5d006a99 --- /dev/null +++ b/components/freshdesk/sources/contact-updated/contact-updated.mjs @@ -0,0 +1,28 @@ +import common from "../common/polling.mjs"; + +export default { + ...common, + key: "freshdesk-contact-updated", + name: "Contact Updated", + description: "Emit new event when a contact is updated. [See the documentation](https://developers.freshdesk.com/api/#filter_contacts)", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getResourceFn() { + return this.freshdesk.filterContacts; + }, + getTsField() { + return "updated_at"; + }, + generateMeta(item) { + const ts = Date.parse(item.updated_at); + return { + id: `${item.id}-${ts}`, + summary: `Contact Updated (ID: ${item.id})`, + ts, + }; + }, + }, +}; diff --git a/components/freshdesk/sources/new-contact/new-contact.mjs b/components/freshdesk/sources/new-contact/new-contact.mjs index 3b67fb9814b11..beb5930fcd539 100644 --- a/components/freshdesk/sources/new-contact/new-contact.mjs +++ b/components/freshdesk/sources/new-contact/new-contact.mjs @@ -1,49 +1,27 @@ -import freshdesk from "../../freshdesk.app.mjs"; -import moment from "moment"; -import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; +import common from "../common/polling.mjs"; export default { + ...common, key: "freshdesk-new-contact", name: "New Contact Created", description: "Emit new event when a contact is created. [See the documentation](https://developers.freshdesk.com/api/#filter_contacts)", - version: "0.0.7", + version: "0.0.8", type: "source", - props: { - freshdesk, - timer: { - type: "$.interface.timer", - default: { - intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, - }, - }, - db: "$.service.db", - }, dedupe: "unique", - async run() { - const data = []; - let lastDateChecked = this.freshdesk.getLastDateChecked(this.db); - if (!lastDateChecked) { - lastDateChecked = new Date().toISOString(); - this.freshdesk.setLastDateChecked(this.db, lastDateChecked); - } - const formatedDate = lastDateChecked.substr(0, (lastDateChecked + "T").indexOf("T")); - const contacts = await this.freshdesk.filterContacts({ - query: `"created_at:>'${formatedDate}'"`, - page: 1, - }); - for await (const contact of contacts) { - data.push(contact); - } - data && data.reverse().forEach((contact) => { - this.freshdesk.setLastDateChecked(this.db, contact.created_at); - if (moment(contact.created_at).isAfter(lastDateChecked)) { - this.$emit(contact, - { - id: contact.id, - summary: `New Contact: "${contact.name}"`, - ts: Date.parse(contact.created_at), - }); - } - }); + methods: { + ...common.methods, + getResourceFn() { + return this.freshdesk.filterContacts; + }, + getTsField() { + return "created_at"; + }, + generateMeta(item) { + return { + id: item.id, + summary: `New Contact: "${item.name}"`, + ts: Date.parse(item.created_at), + }; + }, }, }; diff --git a/components/freshdesk/sources/new-ticket/new-ticket.mjs b/components/freshdesk/sources/new-ticket/new-ticket.mjs index 3d9f9ef4fea5e..62700a639a582 100644 --- a/components/freshdesk/sources/new-ticket/new-ticket.mjs +++ b/components/freshdesk/sources/new-ticket/new-ticket.mjs @@ -1,52 +1,27 @@ -import freshdesk from "../../freshdesk.app.mjs"; -import moment from "moment"; -import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; +import common from "../common/polling.mjs"; export default { + ...common, key: "freshdesk-new-ticket", name: "New Ticket Created", description: "Emit new event when a ticket is created. [See the documentation](https://developers.freshdesk.com/api/#filter_tickets)", - version: "0.0.7", + version: "0.0.8", type: "source", - props: { - freshdesk, - timer: { - type: "$.interface.timer", - default: { - intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, - }, - }, - db: "$.service.db", - }, dedupe: "unique", - async run() { - const data = []; - let lastDateChecked = this.freshdesk.getLastDateChecked(this.db); - if (!lastDateChecked) { - lastDateChecked = new Date().toISOString(); - this.freshdesk.setLastDateChecked(this.db, lastDateChecked); - } - const formatedDate = lastDateChecked.substr( - 0, - (lastDateChecked + "T").indexOf("T"), - ); - const tickets = await this.freshdesk.filterTickets({ - query: `"created_at:>'${formatedDate}'"`, - page: 1, - }); - for await (const ticket of tickets) { - data.push(ticket); - } - data && - data.reverse().forEach((ticket) => { - this.freshdesk.setLastDateChecked(this.db, ticket.created_at); - if (moment(ticket.created_at).isAfter(lastDateChecked)) { - this.$emit(ticket, { - id: ticket.id, - summary: `New Ticket (ID: ${ticket.id})`, - ts: Date.parse(ticket.created_at), - }); - } - }); + methods: { + ...common.methods, + getResourceFn() { + return this.freshdesk.filterTickets; + }, + getTsField() { + return "created_at"; + }, + generateMeta(item) { + return { + id: item.id, + summary: `New Ticket (ID: ${item.id})`, + ts: Date.parse(item.created_at), + }; + }, }, }; diff --git a/components/freshdesk/sources/ticket-updated/ticket-updated.mjs b/components/freshdesk/sources/ticket-updated/ticket-updated.mjs new file mode 100644 index 0000000000000..43c6295fe91e7 --- /dev/null +++ b/components/freshdesk/sources/ticket-updated/ticket-updated.mjs @@ -0,0 +1,28 @@ +import common from "../common/polling.mjs"; + +export default { + ...common, + key: "freshdesk-ticket-updated", + name: "Ticket Updated", + description: "Emit new event when a ticket is updated. [See the documentation](https://developers.freshdesk.com/api/#filter_tickets)", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getResourceFn() { + return this.freshdesk.filterTickets; + }, + getTsField() { + return "updated_at"; + }, + generateMeta(item) { + const ts = Date.parse(item.updated_at); + return { + id: `${item.id}-${ts}`, + summary: `Ticket Updated (ID: ${item.id})`, + ts, + }; + }, + }, +}; From 8dd400e55f90f238f4a837bf987eee144d8834f6 Mon Sep 17 00:00:00 2001 From: Michelle Bergeron Date: Wed, 23 Jul 2025 17:30:59 -0400 Subject: [PATCH 2/9] pnpm-lock.yaml --- pnpm-lock.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 914682d319f4c..31e3b1306da74 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -29979,22 +29979,22 @@ packages: superagent@3.8.1: resolution: {integrity: sha512-VMBFLYgFuRdfeNQSMLbxGSLfmXL/xc+OO+BZp41Za/NRDBet/BNbkRJrYzCUu0u4GU0i/ml2dtT8b9qgkw9z6Q==} engines: {node: '>= 4.0'} - deprecated: Please upgrade to superagent v10.2.2+, see release notes at https://github.com/forwardemail/superagent/releases/tag/v10.2.2 - maintenance is supported by Forward Email @ https://forwardemail.net + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net superagent@4.1.0: resolution: {integrity: sha512-FT3QLMasz0YyCd4uIi5HNe+3t/onxMyEho7C3PSqmti3Twgy2rXT4fmkTz6wRL6bTF4uzPcfkUCa8u4JWHw8Ag==} engines: {node: '>= 6.0'} - deprecated: Please upgrade to superagent v10.2.2+, see release notes at https://github.com/forwardemail/superagent/releases/tag/v10.2.2 - maintenance is supported by Forward Email @ https://forwardemail.net + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net superagent@5.3.1: resolution: {integrity: sha512-wjJ/MoTid2/RuGCOFtlacyGNxN9QLMgcpYLDQlWFIhhdJ93kNscFonGvrpAHSCVjRVj++DGCglocF7Aej1KHvQ==} engines: {node: '>= 7.0.0'} - deprecated: Please upgrade to superagent v10.2.2+, see release notes at https://github.com/forwardemail/superagent/releases/tag/v10.2.2 - maintenance is supported by Forward Email @ https://forwardemail.net + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net superagent@7.1.6: resolution: {integrity: sha512-gZkVCQR1gy/oUXr+kxJMLDjla434KmSOKbx5iGD30Ql+AkJQ/YlPKECJy2nhqOsHLjGHzoDTXNSjhnvWhzKk7g==} engines: {node: '>=6.4.0 <13 || >=14'} - deprecated: Please upgrade to superagent v10.2.2+, see release notes at https://github.com/forwardemail/superagent/releases/tag/v10.2.2 - maintenance is supported by Forward Email @ https://forwardemail.net + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net supports-color@2.0.0: resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==} From c4112d312785a47245a7778b41e4058a6a655f8b Mon Sep 17 00:00:00 2001 From: Michelle Bergeron Date: Wed, 23 Jul 2025 17:35:38 -0400 Subject: [PATCH 3/9] versions --- .../freshdesk/actions/add-note-to-ticket/add-note-to-ticket.mjs | 2 +- .../freshdesk/actions/add-ticket-tags/add-ticket-tags.mjs | 2 +- .../actions/assign-ticket-to-agent/assign-ticket-to-agent.mjs | 2 +- .../actions/assign-ticket-to-group/assign-ticket-to-group.mjs | 2 +- components/freshdesk/actions/close-ticket/close-ticket.mjs | 2 +- components/freshdesk/actions/create-company/create-company.mjs | 2 +- components/freshdesk/actions/create-contact/create-contact.mjs | 2 +- components/freshdesk/actions/create-ticket/create-ticket.mjs | 2 +- components/freshdesk/actions/get-ticket/get-ticket.mjs | 2 +- .../freshdesk/actions/list-all-tickets/list-all-tickets.mjs | 2 +- .../freshdesk/actions/remove-ticket-tags/remove-ticket-tags.mjs | 2 +- .../actions/set-ticket-priority/set-ticket-priority.mjs | 2 +- .../freshdesk/actions/set-ticket-status/set-ticket-status.mjs | 2 +- .../freshdesk/actions/set-ticket-tags/set-ticket-tags.mjs | 2 +- components/freshdesk/actions/update-ticket/update-ticket.mjs | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/components/freshdesk/actions/add-note-to-ticket/add-note-to-ticket.mjs b/components/freshdesk/actions/add-note-to-ticket/add-note-to-ticket.mjs index f8fa1cc684abd..a15df6d315641 100644 --- a/components/freshdesk/actions/add-note-to-ticket/add-note-to-ticket.mjs +++ b/components/freshdesk/actions/add-note-to-ticket/add-note-to-ticket.mjs @@ -5,7 +5,7 @@ export default { key: "freshdesk-add-note-to-ticket", name: "Add Note to Ticket", description: "Add a note or conversation to an existing ticket. [See the documentation](https://developers.freshdesk.com/api/#add_note_to_a_ticket).", - version: "0.0.1", + version: "0.0.2", type: "action", props: { freshdesk, diff --git a/components/freshdesk/actions/add-ticket-tags/add-ticket-tags.mjs b/components/freshdesk/actions/add-ticket-tags/add-ticket-tags.mjs index c96706ba9990c..76d31e92a0626 100644 --- a/components/freshdesk/actions/add-ticket-tags/add-ticket-tags.mjs +++ b/components/freshdesk/actions/add-ticket-tags/add-ticket-tags.mjs @@ -6,7 +6,7 @@ export default { name: "Add Ticket Tags", description: "Add tags to a ticket (appends to existing tags). [See the documentation](https://developers.freshdesk.com/api/#update_ticket)", type: "action", - version: "0.0.2", + version: "0.0.3", props: { freshdesk, ticketId: { diff --git a/components/freshdesk/actions/assign-ticket-to-agent/assign-ticket-to-agent.mjs b/components/freshdesk/actions/assign-ticket-to-agent/assign-ticket-to-agent.mjs index 159c2756d867b..d22aa548dc842 100644 --- a/components/freshdesk/actions/assign-ticket-to-agent/assign-ticket-to-agent.mjs +++ b/components/freshdesk/actions/assign-ticket-to-agent/assign-ticket-to-agent.mjs @@ -4,7 +4,7 @@ export default { key: "freshdesk-assign-ticket-to-agent", name: "Assign Ticket to Agent", description: "Assign a Freshdesk ticket to a specific agent. [See the documentation](https://developers.freshdesk.com/api/#update_ticket).", - version: "0.0.3", + version: "0.0.4", type: "action", props: { freshdesk, diff --git a/components/freshdesk/actions/assign-ticket-to-group/assign-ticket-to-group.mjs b/components/freshdesk/actions/assign-ticket-to-group/assign-ticket-to-group.mjs index dab86e1316c0e..1801ecab852a5 100644 --- a/components/freshdesk/actions/assign-ticket-to-group/assign-ticket-to-group.mjs +++ b/components/freshdesk/actions/assign-ticket-to-group/assign-ticket-to-group.mjs @@ -4,7 +4,7 @@ export default { key: "freshdesk-assign-ticket-to-group", name: "Assign Ticket to Group", description: "Assign a Freshdesk ticket to a specific group [See the documentation](https://developers.freshdesk.com/api/#update_ticket).", - version: "0.0.3", + version: "0.0.4", type: "action", props: { freshdesk, diff --git a/components/freshdesk/actions/close-ticket/close-ticket.mjs b/components/freshdesk/actions/close-ticket/close-ticket.mjs index 6697f7e56db1a..7326b78cf33ba 100644 --- a/components/freshdesk/actions/close-ticket/close-ticket.mjs +++ b/components/freshdesk/actions/close-ticket/close-ticket.mjs @@ -4,7 +4,7 @@ export default { key: "freshdesk-close-ticket", name: "Close Ticket", description: "Set a Freshdesk ticket's status to 'Closed'. [See docs](https://developers.freshdesk.com/api/#update_a_ticket)", - version: "0.0.3", + version: "0.0.4", type: "action", props: { freshdesk, diff --git a/components/freshdesk/actions/create-company/create-company.mjs b/components/freshdesk/actions/create-company/create-company.mjs index 77c77ee7a217f..c8d1a041bf3ae 100644 --- a/components/freshdesk/actions/create-company/create-company.mjs +++ b/components/freshdesk/actions/create-company/create-company.mjs @@ -4,7 +4,7 @@ export default { key: "freshdesk-create-company", name: "Create a Company", description: "Create a company. [See the documentation](https://developers.freshdesk.com/api/#create_company)", - version: "0.0.6", + version: "0.0.7", type: "action", props: { freshdesk, diff --git a/components/freshdesk/actions/create-contact/create-contact.mjs b/components/freshdesk/actions/create-contact/create-contact.mjs index c3a092d912504..06a90e47580bb 100644 --- a/components/freshdesk/actions/create-contact/create-contact.mjs +++ b/components/freshdesk/actions/create-contact/create-contact.mjs @@ -5,7 +5,7 @@ export default { key: "freshdesk-create-contact", name: "Create a Contact", description: "Create a contact. [See the documentation](https://developers.freshdesk.com/api/#create_contact)", - version: "0.0.6", + version: "0.0.7", type: "action", props: { freshdesk, diff --git a/components/freshdesk/actions/create-ticket/create-ticket.mjs b/components/freshdesk/actions/create-ticket/create-ticket.mjs index 2ca3a9844b591..c95065f55a6c5 100644 --- a/components/freshdesk/actions/create-ticket/create-ticket.mjs +++ b/components/freshdesk/actions/create-ticket/create-ticket.mjs @@ -4,7 +4,7 @@ export default { key: "freshdesk-create-ticket", name: "Create a Ticket", description: "Create a ticket. [See the documentation](https://developers.freshdesk.com/api/#create_ticket)", - version: "0.0.7", + version: "0.0.8", type: "action", props: { freshdesk, diff --git a/components/freshdesk/actions/get-ticket/get-ticket.mjs b/components/freshdesk/actions/get-ticket/get-ticket.mjs index 2e5b5ed1cca0c..7f24bce4cf03f 100644 --- a/components/freshdesk/actions/get-ticket/get-ticket.mjs +++ b/components/freshdesk/actions/get-ticket/get-ticket.mjs @@ -4,7 +4,7 @@ export default { key: "freshdesk-get-ticket", name: "Get Ticket Details", description: "Get details of a Ticket. [See the documentation](https://developers.freshdesk.com/api/#view_a_ticket)", - version: "0.1.4", + version: "0.1.5", type: "action", props: { freshdesk, diff --git a/components/freshdesk/actions/list-all-tickets/list-all-tickets.mjs b/components/freshdesk/actions/list-all-tickets/list-all-tickets.mjs index 54d1386349165..0a78de2e6b99f 100644 --- a/components/freshdesk/actions/list-all-tickets/list-all-tickets.mjs +++ b/components/freshdesk/actions/list-all-tickets/list-all-tickets.mjs @@ -5,7 +5,7 @@ export default { name: "List Tickets", description: "Fetch up to 100 tickets according to the selected filters. [See the documentation](https://developers.freshdesk.com/api/#list_all_tickets)", - version: "0.2.4", + version: "0.2.5", type: "action", props: { freshdesk, diff --git a/components/freshdesk/actions/remove-ticket-tags/remove-ticket-tags.mjs b/components/freshdesk/actions/remove-ticket-tags/remove-ticket-tags.mjs index 6709bd0269688..16f8f96fc5bfc 100644 --- a/components/freshdesk/actions/remove-ticket-tags/remove-ticket-tags.mjs +++ b/components/freshdesk/actions/remove-ticket-tags/remove-ticket-tags.mjs @@ -6,7 +6,7 @@ export default { name: "Remove Ticket Tags", description: "Remove specific tags from a ticket. [See the documentation](https://developers.freshdesk.com/api/#update_ticket)", type: "action", - version: "0.0.2", + version: "0.0.3", props: { freshdesk, ticketId: { diff --git a/components/freshdesk/actions/set-ticket-priority/set-ticket-priority.mjs b/components/freshdesk/actions/set-ticket-priority/set-ticket-priority.mjs index d995792ab33da..faf78476b4330 100644 --- a/components/freshdesk/actions/set-ticket-priority/set-ticket-priority.mjs +++ b/components/freshdesk/actions/set-ticket-priority/set-ticket-priority.mjs @@ -4,7 +4,7 @@ export default { key: "freshdesk-set-ticket-priority", name: "Set Ticket Priority", description: "Update the priority of a ticket in Freshdesk [See the documentation](https://developers.freshdesk.com/api/#update_ticket).", - version: "0.0.3", + version: "0.0.4", type: "action", props: { freshdesk, diff --git a/components/freshdesk/actions/set-ticket-status/set-ticket-status.mjs b/components/freshdesk/actions/set-ticket-status/set-ticket-status.mjs index 82f40ada10849..538969565d434 100644 --- a/components/freshdesk/actions/set-ticket-status/set-ticket-status.mjs +++ b/components/freshdesk/actions/set-ticket-status/set-ticket-status.mjs @@ -4,7 +4,7 @@ export default { key: "freshdesk-set-ticket-status", name: "Set Ticket Status", description: "Update the status of a ticket in Freshdesk [See the documentation](https://developers.freshdesk.com/api/#update_ticket).", - version: "0.0.3", + version: "0.0.4", type: "action", props: { freshdesk, diff --git a/components/freshdesk/actions/set-ticket-tags/set-ticket-tags.mjs b/components/freshdesk/actions/set-ticket-tags/set-ticket-tags.mjs index a7adcce2437f9..bb77f1f2f6c27 100644 --- a/components/freshdesk/actions/set-ticket-tags/set-ticket-tags.mjs +++ b/components/freshdesk/actions/set-ticket-tags/set-ticket-tags.mjs @@ -6,7 +6,7 @@ export default { name: "Set Ticket Tags", description: "Set tags on a ticket (replaces all existing tags). [See the documentation](https://developers.freshdesk.com/api/#update_ticket)", type: "action", - version: "0.0.2", + version: "0.0.3", props: { freshdesk, ticketId: { diff --git a/components/freshdesk/actions/update-ticket/update-ticket.mjs b/components/freshdesk/actions/update-ticket/update-ticket.mjs index 77e7804dedd2c..3a136b2b13bc5 100644 --- a/components/freshdesk/actions/update-ticket/update-ticket.mjs +++ b/components/freshdesk/actions/update-ticket/update-ticket.mjs @@ -5,7 +5,7 @@ export default { key: "freshdesk-update-ticket", name: "Update a Ticket", description: "Update status, priority, subject, description, agent, group, etc. [See the documentation](https://developers.freshdesk.com/api/#update_ticket).", - version: "0.0.3", + version: "0.0.4", type: "action", props: { freshdesk, From b002d4cf294089cfabd018932e86fde9b1ab17f8 Mon Sep 17 00:00:00 2001 From: Michelle Bergeron Date: Wed, 23 Jul 2025 17:36:11 -0400 Subject: [PATCH 4/9] pnpm-lock.yaml --- pnpm-lock.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 31e3b1306da74..dd441fa06d110 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16153,7 +16153,7 @@ importers: version: 3.1.7 ts-jest: specifier: ^29.2.5 - version: 29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@20.17.30)(babel-plugin-macros@3.1.0))(typescript@5.7.2) + version: 29.2.5(@babel/core@8.0.0-alpha.13)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@8.0.0-alpha.13))(jest@29.7.0(@types/node@20.17.30)(babel-plugin-macros@3.1.0))(typescript@5.7.2) tsup: specifier: ^8.3.6 version: 8.3.6(@microsoft/api-extractor@7.47.12(@types/node@20.17.30))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.4)(typescript@5.7.2)(yaml@2.6.1) @@ -16196,7 +16196,7 @@ importers: version: 3.1.0 jest: specifier: ^29.1.2 - version: 29.7.0(@types/node@20.17.6)(babel-plugin-macros@3.1.0) + version: 29.7.0(@types/node@20.17.30)(babel-plugin-macros@3.1.0) type-fest: specifier: ^4.15.0 version: 4.27.0 @@ -51387,7 +51387,7 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-jest@29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@20.17.30)(babel-plugin-macros@3.1.0))(typescript@5.7.2): + ts-jest@29.2.5(@babel/core@8.0.0-alpha.13)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@8.0.0-alpha.13))(jest@29.7.0(@types/node@20.17.30)(babel-plugin-macros@3.1.0))(typescript@5.7.2): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 @@ -51401,10 +51401,10 @@ snapshots: typescript: 5.7.2 yargs-parser: 21.1.1 optionalDependencies: - '@babel/core': 7.26.0 + '@babel/core': 8.0.0-alpha.13 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.26.0) + babel-jest: 29.7.0(@babel/core@8.0.0-alpha.13) ts-jest@29.2.5(@babel/core@8.0.0-alpha.13)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@8.0.0-alpha.13))(jest@29.7.0(@types/node@20.17.6)(babel-plugin-macros@3.1.0))(typescript@5.6.3): dependencies: From 924eda3a9f5696a94ac7a37c849e027f68ea6691 Mon Sep 17 00:00:00 2001 From: Michelle Bergeron Date: Wed, 23 Jul 2025 17:36:43 -0400 Subject: [PATCH 5/9] pnpm-lock.yaml --- pnpm-lock.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dd441fa06d110..31e3b1306da74 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16153,7 +16153,7 @@ importers: version: 3.1.7 ts-jest: specifier: ^29.2.5 - version: 29.2.5(@babel/core@8.0.0-alpha.13)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@8.0.0-alpha.13))(jest@29.7.0(@types/node@20.17.30)(babel-plugin-macros@3.1.0))(typescript@5.7.2) + version: 29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@20.17.30)(babel-plugin-macros@3.1.0))(typescript@5.7.2) tsup: specifier: ^8.3.6 version: 8.3.6(@microsoft/api-extractor@7.47.12(@types/node@20.17.30))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.4)(typescript@5.7.2)(yaml@2.6.1) @@ -16196,7 +16196,7 @@ importers: version: 3.1.0 jest: specifier: ^29.1.2 - version: 29.7.0(@types/node@20.17.30)(babel-plugin-macros@3.1.0) + version: 29.7.0(@types/node@20.17.6)(babel-plugin-macros@3.1.0) type-fest: specifier: ^4.15.0 version: 4.27.0 @@ -51387,7 +51387,7 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-jest@29.2.5(@babel/core@8.0.0-alpha.13)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@8.0.0-alpha.13))(jest@29.7.0(@types/node@20.17.30)(babel-plugin-macros@3.1.0))(typescript@5.7.2): + ts-jest@29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@20.17.30)(babel-plugin-macros@3.1.0))(typescript@5.7.2): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 @@ -51401,10 +51401,10 @@ snapshots: typescript: 5.7.2 yargs-parser: 21.1.1 optionalDependencies: - '@babel/core': 8.0.0-alpha.13 + '@babel/core': 7.26.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@8.0.0-alpha.13) + babel-jest: 29.7.0(@babel/core@7.26.0) ts-jest@29.2.5(@babel/core@8.0.0-alpha.13)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@8.0.0-alpha.13))(jest@29.7.0(@types/node@20.17.6)(babel-plugin-macros@3.1.0))(typescript@5.6.3): dependencies: From c84aecd5e8d16fa014610a4c335f19a7c6ac0ace Mon Sep 17 00:00:00 2001 From: Michelle Bergeron Date: Wed, 23 Jul 2025 17:37:09 -0400 Subject: [PATCH 6/9] pnpm-lock.yaml --- pnpm-lock.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 31e3b1306da74..a11bbd44c7744 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -37304,8 +37304,6 @@ snapshots: '@putout/operator-filesystem': 5.0.0(putout@36.13.1(eslint@8.57.1)(typescript@5.6.3)) '@putout/operator-json': 2.2.0 putout: 36.13.1(eslint@8.57.1)(typescript@5.6.3) - transitivePeerDependencies: - - supports-color '@putout/operator-regexp@1.0.0(putout@36.13.1(eslint@8.57.1)(typescript@5.6.3))': dependencies: From 21cc7141d8b90ce2805c7d4cf8697df081a3ec39 Mon Sep 17 00:00:00 2001 From: Michelle Bergeron Date: Wed, 23 Jul 2025 17:38:34 -0400 Subject: [PATCH 7/9] pnpm-lock.yaml --- pnpm-lock.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a11bbd44c7744..31e3b1306da74 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -37304,6 +37304,8 @@ snapshots: '@putout/operator-filesystem': 5.0.0(putout@36.13.1(eslint@8.57.1)(typescript@5.6.3)) '@putout/operator-json': 2.2.0 putout: 36.13.1(eslint@8.57.1)(typescript@5.6.3) + transitivePeerDependencies: + - supports-color '@putout/operator-regexp@1.0.0(putout@36.13.1(eslint@8.57.1)(typescript@5.6.3))': dependencies: From 64f28e1952ae66479077740e23a9166625087548 Mon Sep 17 00:00:00 2001 From: Michelle Bergeron Date: Wed, 23 Jul 2025 17:54:04 -0400 Subject: [PATCH 8/9] updates --- .../actions/create-ticket-field/create-ticket-field.mjs | 4 ++-- .../actions/update-ticket-field/update-ticket-field.mjs | 4 ++-- components/freshdesk/freshdesk.app.mjs | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/freshdesk/actions/create-ticket-field/create-ticket-field.mjs b/components/freshdesk/actions/create-ticket-field/create-ticket-field.mjs index f0df37382542b..f8686068b3916 100644 --- a/components/freshdesk/actions/create-ticket-field/create-ticket-field.mjs +++ b/components/freshdesk/actions/create-ticket-field/create-ticket-field.mjs @@ -45,7 +45,7 @@ export default { default: "custom_dropdown", optional: true, }, - requiredForClusure: { + requiredForClosure: { type: "boolean", label: "Required for Closure", description: "Set to `true` if the field is mandatory for closing the ticket", @@ -96,7 +96,7 @@ export default { displayed_to_customers: this.displayedToCustomers, position: this.position, type: this.type, - required_for_closure: this.requiredForClusure, + required_for_closure: this.requiredForClosure, required_for_agents: this.requiredForAgents, required_for_customers: this.requiredForCustomers, choices: parseObject(this.choices), diff --git a/components/freshdesk/actions/update-ticket-field/update-ticket-field.mjs b/components/freshdesk/actions/update-ticket-field/update-ticket-field.mjs index a0b54f8989b1f..3bcd6c374bfc7 100644 --- a/components/freshdesk/actions/update-ticket-field/update-ticket-field.mjs +++ b/components/freshdesk/actions/update-ticket-field/update-ticket-field.mjs @@ -45,7 +45,7 @@ export default { description: "The position of the fieldPosition in which the ticket field is displayed in the form. If not given, it will be displayed on top", optional: true, }, - requiredForClusure: { + requiredForClosure: { type: "boolean", label: "Required for Closure", description: "Set to `true` if the field is mandatory for closing the ticket", @@ -92,7 +92,7 @@ export default { customers_can_edit: this.customersCanEdit, displayed_to_customers: this.displayedToCustomers, position: this.position, - required_for_closure: this.requiredForClusure, + required_for_closure: this.requiredForClosure, required_for_agents: this.requiredForAgents, required_for_customers: this.requiredForCustomers, choices: parseObject(this.choices), diff --git a/components/freshdesk/freshdesk.app.mjs b/components/freshdesk/freshdesk.app.mjs index c49f18ac474f7..d0da926b38256 100644 --- a/components/freshdesk/freshdesk.app.mjs +++ b/components/freshdesk/freshdesk.app.mjs @@ -655,9 +655,9 @@ export default { } for (const result of results) { yield result; - } - if (max && ++count >= max) { - return; + if (max && ++count >= max) { + return; + } } args.params.page += 1; } while (total === args.params.per_page); From e22b5f9ccb77b4e3ed605fe82b83c50aa24a33f0 Mon Sep 17 00:00:00 2001 From: Michelle Bergeron Date: Fri, 25 Jul 2025 12:05:05 -0400 Subject: [PATCH 9/9] update type field --- .../create-ticket-field/create-ticket-field.mjs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/components/freshdesk/actions/create-ticket-field/create-ticket-field.mjs b/components/freshdesk/actions/create-ticket-field/create-ticket-field.mjs index f8686068b3916..7c1cfc4b3da19 100644 --- a/components/freshdesk/actions/create-ticket-field/create-ticket-field.mjs +++ b/components/freshdesk/actions/create-ticket-field/create-ticket-field.mjs @@ -20,6 +20,12 @@ export default { label: "Label for Customers", description: "The label for the field as seen by customers", }, + type: { + type: "string", + label: "Type", + description: "The type of the field. Can be custom_dropdown, custom_checkbox, custom_text, etc...", + default: "custom_text", + }, customersCanEdit: { type: "boolean", label: "Customers Can Edit", @@ -38,13 +44,6 @@ export default { description: "The position of the fieldPosition in which the ticket field is displayed in the form. If not given, it will be displayed on top", optional: true, }, - type: { - type: "string", - label: "Type", - description: "The type of the field. Can be custom_dropdown, custom_checkbox, custom_text, etc...", - default: "custom_dropdown", - optional: true, - }, requiredForClosure: { type: "boolean", label: "Required for Closure",