-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New Components - freshdesk #17764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Components - freshdesk #17764
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
WalkthroughThis update introduces a major expansion of the Freshdesk integration, adding new actions for creating, updating, and listing various Freshdesk resources (agents, contacts, ticket fields, solution articles, etc.), new event sources for polling resource changes, and a shared polling framework. It also refactors existing sources to use this common polling logic and enhances the app module with dynamic prop definitions and paginated API utilities. Several version bumps and constant additions are included. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Action
participant FreshdeskApp
participant FreshdeskAPI
User->>Action: Provide input (e.g., create agent/article)
Action->>FreshdeskApp: Call relevant method with input
FreshdeskApp->>FreshdeskAPI: Make HTTP request (CRUD)
FreshdeskAPI-->>FreshdeskApp: Return API response
FreshdeskApp-->>Action: Return processed result
Action-->>User: Output summary and data
sequenceDiagram
participant Source
participant CommonPolling
participant FreshdeskApp
participant FreshdeskAPI
participant DB
loop On timer
CommonPolling->>DB: Get last checked timestamp
CommonPolling->>FreshdeskApp: Call resourceFn({ updated_since: lastChecked })
FreshdeskApp->>FreshdeskAPI: Fetch paginated resources
FreshdeskAPI-->>FreshdeskApp: Return resource list
FreshdeskApp-->>CommonPolling: Return items
CommonPolling->>Source: Emit events for new/updated items
CommonPolling->>DB: Update last checked timestamp
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
components/freshdesk/actions/create-ticket-field/create-ticket-field.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 8
🧹 Nitpick comments (13)
components/freshdesk/common/utils.mjs (1)
25-49
: Consider adding JSDoc documentation for the utility function.The function would benefit from documentation explaining its purpose, parameters, and behavior, especially regarding JSON parsing fallback.
+/** + * Recursively parses an object, attempting to JSON.parse string values + * @param {any} obj - The object to parse + * @returns {any} The parsed object with JSON strings converted to objects/arrays + */ const parseObject = (obj) => {components/freshdesk/actions/list-all-tickets/list-all-tickets.mjs (1)
8-8
: Version bump looks correct – double-check changelog entryNo functional code touched. Ensure you’ve added a matching entry in the package / integration changelog so the reason for
0.2.5
is captured for users.components/freshdesk/actions/set-ticket-priority/set-ticket-priority.mjs (1)
7-7
: Ticket-priority action bumped to 0.0.4LGTM. Consider scripting these uniform bumps in the future to avoid manual miss-alignments.
components/freshdesk/actions/get-solution-article/get-solution-article.mjs (1)
36-43
: Consider enhancing the summary messageThe current summary message only includes the article ID. Consider including the article title or other descriptive information from the response to make it more informative.
- $.export("$summary", `Successfully retrieved solution article ${this.articleId}`); + $.export("$summary", `Successfully retrieved solution article "${response.title || response.id}"`);components/freshdesk/actions/get-contact/get-contact.mjs (1)
23-24
: Add a safe-fallback in the summary
contact.name
can be empty/undefined (e.g. API returns only an email).
Consider falling back tocontact.id
to avoidundefined
appearing in the UI.-$.export("$summary", `Successfully fetched contact: ${contact.name}`); +$.export( + "$summary", + `Successfully fetched contact: ${contact.name || contact.id}`, +);components/freshdesk/actions/update-ticket-field/update-ticket-field.mjs (2)
43-45
: Minor doc typo
"fieldPosition"
→"field position"
for readability.
66-83
: Consider loosening input types for JSON fields
choices
,dependentFields
, andsectionMappings
are declared asstring[]
, but users often paste raw JSON strings.
Declaring them as simplestring
(orobject
once supported) avoids UI friction and still works withparseObject
.components/freshdesk/sources/ticket-updated/ticket-updated.mjs (1)
19-25
: Consider enriching the event summaryIf the ticket subject is available in the
item
payload, appending it to the summary (e.g.Ticket “${item.subject}” updated (ID: ${item.id})
) makes the event feed far more readable when many tickets are involved.components/freshdesk/sources/new-ticket/new-ticket.mjs (1)
19-24
: Use the ticket subject in the summary for readabilitySame remark as for the Ticket Updated source – including
item.subject
(if present) helps users quickly identify the ticket without having to open it.components/freshdesk/sources/common/polling.mjs (3)
39-43
: Date string trimming is brittle
lastDateChecked.substr(0, (lastDateChecked + "T").indexOf("T"))
relies on the first “T” and falls apart if the stored value ever lacks the time part.
A safer and clearer way is:-const formatedDate = lastDateChecked.substr( - 0, - (lastDateChecked + "T").indexOf("T"), -); +const formattedDate = new Date(lastDateChecked) + .toISOString() + .split("T")[0]; // YYYY-MM-DD
51-59
: Heavy Moment.js usage is unnecessaryThe only need is a simple “is after” comparison. Native
Date
does this without ~170 kB of Moment payload:-if (moment(item[tsField]).isAfter(lastDateChecked)) { - if (moment(item[tsField]).isAfter(maxTs)) { - maxTs = item[tsField]; - } +const itemTs = Date.parse(item[tsField]); +if (itemTs > Date.parse(lastDateChecked)) { + if (itemTs > Date.parse(maxTs)) { + maxTs = item[tsField]; + }This reduces bundle size and cold-start latency.
28-50
: Stream results instead of materialising the full array
data.push(result)
followed bydata.reverse()
means you store the entire result set twice.
You can emit as you iterate (and maintainmaxTs
on the fly) to cut memory and CPU in half, especially on large accounts.components/freshdesk/freshdesk.app.mjs (1)
310-323
: Rename loop variable for clarityInside
filterContacts
you iterate withfor (const ticket of response.results)
, but you are yielding contacts. Rename to avoid future confusion when debugging.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (39)
components/freshdesk/actions/add-note-to-ticket/add-note-to-ticket.mjs
(1 hunks)components/freshdesk/actions/add-ticket-tags/add-ticket-tags.mjs
(1 hunks)components/freshdesk/actions/assign-ticket-to-agent/assign-ticket-to-agent.mjs
(1 hunks)components/freshdesk/actions/assign-ticket-to-group/assign-ticket-to-group.mjs
(1 hunks)components/freshdesk/actions/close-ticket/close-ticket.mjs
(1 hunks)components/freshdesk/actions/create-agent/create-agent.mjs
(1 hunks)components/freshdesk/actions/create-company/create-company.mjs
(1 hunks)components/freshdesk/actions/create-contact/create-contact.mjs
(1 hunks)components/freshdesk/actions/create-solution-article/create-solution-article.mjs
(1 hunks)components/freshdesk/actions/create-ticket-field/create-ticket-field.mjs
(1 hunks)components/freshdesk/actions/create-ticket/create-ticket.mjs
(1 hunks)components/freshdesk/actions/delete-solution-article/delete-solution-article.mjs
(1 hunks)components/freshdesk/actions/get-contact/get-contact.mjs
(1 hunks)components/freshdesk/actions/get-solution-article/get-solution-article.mjs
(1 hunks)components/freshdesk/actions/get-ticket/get-ticket.mjs
(1 hunks)components/freshdesk/actions/list-agents/list-agents.mjs
(1 hunks)components/freshdesk/actions/list-all-tickets/list-all-tickets.mjs
(1 hunks)components/freshdesk/actions/list-category-folders/list-category-folders.mjs
(1 hunks)components/freshdesk/actions/list-folder-articles/list-folder-articles.mjs
(1 hunks)components/freshdesk/actions/list-solution-categories/list-solution-categories.mjs
(1 hunks)components/freshdesk/actions/list-ticket-fields/list-ticket-fields.mjs
(1 hunks)components/freshdesk/actions/remove-ticket-tags/remove-ticket-tags.mjs
(1 hunks)components/freshdesk/actions/set-ticket-priority/set-ticket-priority.mjs
(1 hunks)components/freshdesk/actions/set-ticket-status/set-ticket-status.mjs
(1 hunks)components/freshdesk/actions/set-ticket-tags/set-ticket-tags.mjs
(1 hunks)components/freshdesk/actions/update-agent/update-agent.mjs
(1 hunks)components/freshdesk/actions/update-contact/update-contact.mjs
(1 hunks)components/freshdesk/actions/update-solution-article/update-solution-article.mjs
(1 hunks)components/freshdesk/actions/update-ticket-field/update-ticket-field.mjs
(1 hunks)components/freshdesk/actions/update-ticket/update-ticket.mjs
(1 hunks)components/freshdesk/common/constants.mjs
(1 hunks)components/freshdesk/common/utils.mjs
(1 hunks)components/freshdesk/freshdesk.app.mjs
(5 hunks)components/freshdesk/package.json
(1 hunks)components/freshdesk/sources/common/polling.mjs
(1 hunks)components/freshdesk/sources/contact-updated/contact-updated.mjs
(1 hunks)components/freshdesk/sources/new-contact/new-contact.mjs
(1 hunks)components/freshdesk/sources/new-ticket/new-ticket.mjs
(1 hunks)components/freshdesk/sources/ticket-updated/ticket-updated.mjs
(1 hunks)
🧰 Additional context used
🧠 Learnings (21)
components/freshdesk/actions/create-contact/create-contact.mjs (1)
Learnt from: jcortes
PR: #14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In components/gainsight_px/actions/create-account/create-account.mjs
, the action name should be "Create Account" instead of "Create Memory".
components/freshdesk/package.json (1)
Learnt from: jcortes
PR: #14935
File: components/sailpoint/package.json:15-18
Timestamp: 2024-12-12T19:23:09.039Z
Learning: When developing Pipedream components, do not add built-in Node.js modules like fs
to package.json
dependencies, as they are native modules provided by the Node.js runtime.
components/freshdesk/actions/create-ticket/create-ticket.mjs (1)
Learnt from: jcortes
PR: #14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In components/gainsight_px/actions/create-account/create-account.mjs
, the action name should be "Create Account" instead of "Create Memory".
components/freshdesk/actions/list-agents/list-agents.mjs (4)
Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the run
method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members
action, the correct format is Successfully retrieved ${response.data.length} members
.
Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the run
method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members
action, the correct format is Successfully retrieved ${response.data.length} members
.
Learnt from: jcortes
PR: #14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In components/gainsight_px/actions/create-account/create-account.mjs
, the action name should be "Create Account" instead of "Create Memory".
Learnt from: GTFalcao
PR: #16954
File: components/salesloft/salesloft.app.mjs:14-23
Timestamp: 2025-06-04T17:52:05.780Z
Learning: In the Salesloft API integration (components/salesloft/salesloft.app.mjs), the _makeRequest method returns response.data which directly contains arrays for list endpoints like listPeople, listCadences, listUsers, and listAccounts. The propDefinitions correctly call .map() directly on these responses without needing to destructure a nested data property.
components/freshdesk/actions/create-ticket-field/create-ticket-field.mjs (1)
Learnt from: jcortes
PR: #14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In components/gainsight_px/actions/create-account/create-account.mjs
, the action name should be "Create Account" instead of "Create Memory".
components/freshdesk/actions/create-agent/create-agent.mjs (3)
Learnt from: jcortes
PR: #14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In components/gainsight_px/actions/create-account/create-account.mjs
, the action name should be "Create Account" instead of "Create Memory".
Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the run
method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members
action, the correct format is Successfully retrieved ${response.data.length} members
.
Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the run
method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members
action, the correct format is Successfully retrieved ${response.data.length} members
.
components/freshdesk/actions/create-company/create-company.mjs (1)
Learnt from: jcortes
PR: #14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In components/gainsight_px/actions/create-account/create-account.mjs
, the action name should be "Create Account" instead of "Create Memory".
components/freshdesk/actions/list-solution-categories/list-solution-categories.mjs (2)
Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the run
method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members
action, the correct format is Successfully retrieved ${response.data.length} members
.
Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the run
method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members
action, the correct format is Successfully retrieved ${response.data.length} members
.
components/freshdesk/actions/list-ticket-fields/list-ticket-fields.mjs (2)
Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the run
method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members
action, the correct format is Successfully retrieved ${response.data.length} members
.
Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the run
method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members
action, the correct format is Successfully retrieved ${response.data.length} members
.
components/freshdesk/actions/create-solution-article/create-solution-article.mjs (2)
Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the run
method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members
action, the correct format is Successfully retrieved ${response.data.length} members
.
Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the run
method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members
action, the correct format is Successfully retrieved ${response.data.length} members
.
components/freshdesk/sources/contact-updated/contact-updated.mjs (4)
Learnt from: GTFalcao
PR: #14265
File: components/the_magic_drip/sources/common.mjs:35-43
Timestamp: 2024-10-10T19:18:27.998Z
Learning: In components/the_magic_drip/sources/common.mjs
, when processing items in getAndProcessData
, savedIds
is intentionally updated with IDs of both emitted and non-emitted items to avoid emitting retroactive events upon first deployment and ensure only new events are emitted as they occur.
Learnt from: GTFalcao
PR: #15376
File: components/monday/sources/name-updated/name-updated.mjs:6-6
Timestamp: 2025-01-23T03:55:15.166Z
Learning: Source names in Monday.com components don't need to start with "New" if they emit events for updated items (e.g., "Name Updated", "Column Value Updated") rather than new items. This follows the component guidelines exception where the "New" prefix is only required when emits are limited to new items.
Learnt from: GTFalcao
PR: #12697
File: components/salesforce_rest_api/sources/common-webhook-methods.mjs:1-71
Timestamp: 2024-10-08T15:33:38.240Z
Learning: The common-webhook-methods.mjs
object is designed to be extended, similar to an abstract class, and intentionally does not implement certain methods like generateWebhookMeta
and getEventType
to enforce implementation in subclasses.
Learnt from: GTFalcao
PR: #12697
File: components/salesforce_rest_api/sources/common-webhook-methods.mjs:1-71
Timestamp: 2024-07-24T02:06:47.016Z
Learning: The common-webhook-methods.mjs
object is designed to be extended, similar to an abstract class, and intentionally does not implement certain methods like generateWebhookMeta
and getEventType
to enforce implementation in subclasses.
components/freshdesk/actions/get-solution-article/get-solution-article.mjs (2)
Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the run
method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members
action, the correct format is Successfully retrieved ${response.data.length} members
.
Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the run
method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members
action, the correct format is Successfully retrieved ${response.data.length} members
.
components/freshdesk/sources/ticket-updated/ticket-updated.mjs (5)
Learnt from: GTFalcao
PR: #15376
File: components/monday/sources/name-updated/name-updated.mjs:6-6
Timestamp: 2025-01-23T03:55:15.166Z
Learning: Source names in Monday.com components don't need to start with "New" if they emit events for updated items (e.g., "Name Updated", "Column Value Updated") rather than new items. This follows the component guidelines exception where the "New" prefix is only required when emits are limited to new items.
Learnt from: GTFalcao
PR: #14265
File: components/the_magic_drip/sources/common.mjs:35-43
Timestamp: 2024-10-10T19:18:27.998Z
Learning: In components/the_magic_drip/sources/common.mjs
, when processing items in getAndProcessData
, savedIds
is intentionally updated with IDs of both emitted and non-emitted items to avoid emitting retroactive events upon first deployment and ensure only new events are emitted as they occur.
Learnt from: GTFalcao
PR: #12697
File: components/salesforce_rest_api/sources/common.mjs:97-98
Timestamp: 2024-07-24T02:05:59.531Z
Learning: The processTimerEvent
method in the components/salesforce_rest_api/sources/common.mjs
file is intentionally left unimplemented to enforce that subclasses must implement this method, similar to an abstract class in object-oriented programming.
Learnt from: GTFalcao
PR: #12697
File: components/salesforce_rest_api/sources/common-webhook-methods.mjs:1-71
Timestamp: 2024-10-08T15:33:38.240Z
Learning: The common-webhook-methods.mjs
object is designed to be extended, similar to an abstract class, and intentionally does not implement certain methods like generateWebhookMeta
and getEventType
to enforce implementation in subclasses.
Learnt from: GTFalcao
PR: #12697
File: components/salesforce_rest_api/sources/common-webhook-methods.mjs:1-71
Timestamp: 2024-07-24T02:06:47.016Z
Learning: The common-webhook-methods.mjs
object is designed to be extended, similar to an abstract class, and intentionally does not implement certain methods like generateWebhookMeta
and getEventType
to enforce implementation in subclasses.
components/freshdesk/actions/update-contact/update-contact.mjs (1)
Learnt from: jcortes
PR: #14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In components/gainsight_px/actions/create-account/create-account.mjs
, the action name should be "Create Account" instead of "Create Memory".
components/freshdesk/sources/common/polling.mjs (2)
Learnt from: GTFalcao
PR: #12697
File: components/salesforce_rest_api/sources/common.mjs:97-98
Timestamp: 2024-07-24T02:05:59.531Z
Learning: The processTimerEvent
method in the components/salesforce_rest_api/sources/common.mjs
file is intentionally left unimplemented to enforce that subclasses must implement this method, similar to an abstract class in object-oriented programming.
Learnt from: GTFalcao
PR: #14265
File: components/the_magic_drip/sources/common.mjs:35-43
Timestamp: 2024-10-10T19:18:27.998Z
Learning: In components/the_magic_drip/sources/common.mjs
, when processing items in getAndProcessData
, savedIds
is intentionally updated with IDs of both emitted and non-emitted items to avoid emitting retroactive events upon first deployment and ensure only new events are emitted as they occur.
components/freshdesk/actions/list-category-folders/list-category-folders.mjs (2)
Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the run
method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members
action, the correct format is Successfully retrieved ${response.data.length} members
.
Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the run
method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members
action, the correct format is Successfully retrieved ${response.data.length} members
.
components/freshdesk/sources/new-contact/new-contact.mjs (5)
Learnt from: GTFalcao
PR: #14265
File: components/the_magic_drip/sources/common.mjs:35-43
Timestamp: 2024-10-10T19:18:27.998Z
Learning: In components/the_magic_drip/sources/common.mjs
, when processing items in getAndProcessData
, savedIds
is intentionally updated with IDs of both emitted and non-emitted items to avoid emitting retroactive events upon first deployment and ensure only new events are emitted as they occur.
Learnt from: GTFalcao
PR: #12697
File: components/salesforce_rest_api/sources/common-webhook-methods.mjs:1-71
Timestamp: 2024-10-08T15:33:38.240Z
Learning: The common-webhook-methods.mjs
object is designed to be extended, similar to an abstract class, and intentionally does not implement certain methods like generateWebhookMeta
and getEventType
to enforce implementation in subclasses.
Learnt from: GTFalcao
PR: #12697
File: components/salesforce_rest_api/sources/common-webhook-methods.mjs:1-71
Timestamp: 2024-07-24T02:06:47.016Z
Learning: The common-webhook-methods.mjs
object is designed to be extended, similar to an abstract class, and intentionally does not implement certain methods like generateWebhookMeta
and getEventType
to enforce implementation in subclasses.
Learnt from: GTFalcao
PR: #12697
File: components/salesforce_rest_api/sources/common.mjs:97-98
Timestamp: 2024-07-24T02:05:59.531Z
Learning: The processTimerEvent
method in the components/salesforce_rest_api/sources/common.mjs
file is intentionally left unimplemented to enforce that subclasses must implement this method, similar to an abstract class in object-oriented programming.
Learnt from: GTFalcao
PR: #17538
File: components/aircall/sources/new-sms/new-sms.mjs:19-25
Timestamp: 2025-07-09T18:07:12.426Z
Learning: In Aircall API webhook payloads, the created_at
field is returned as an ISO 8601 string format (e.g., "2020-02-18T20:52:22.000Z"), not as milliseconds since epoch. For Pipedream components, this needs to be converted to milliseconds using Date.parse()
before assigning to the ts
field in generateMeta()
.
components/freshdesk/sources/new-ticket/new-ticket.mjs (5)
Learnt from: GTFalcao
PR: #14265
File: components/the_magic_drip/sources/common.mjs:35-43
Timestamp: 2024-10-10T19:18:27.998Z
Learning: In components/the_magic_drip/sources/common.mjs
, when processing items in getAndProcessData
, savedIds
is intentionally updated with IDs of both emitted and non-emitted items to avoid emitting retroactive events upon first deployment and ensure only new events are emitted as they occur.
Learnt from: GTFalcao
PR: #12697
File: components/salesforce_rest_api/sources/common.mjs:97-98
Timestamp: 2024-07-24T02:05:59.531Z
Learning: The processTimerEvent
method in the components/salesforce_rest_api/sources/common.mjs
file is intentionally left unimplemented to enforce that subclasses must implement this method, similar to an abstract class in object-oriented programming.
Learnt from: GTFalcao
PR: #12697
File: components/salesforce_rest_api/sources/common-webhook-methods.mjs:1-71
Timestamp: 2024-10-08T15:33:38.240Z
Learning: The common-webhook-methods.mjs
object is designed to be extended, similar to an abstract class, and intentionally does not implement certain methods like generateWebhookMeta
and getEventType
to enforce implementation in subclasses.
Learnt from: GTFalcao
PR: #12697
File: components/salesforce_rest_api/sources/common-webhook-methods.mjs:1-71
Timestamp: 2024-07-24T02:06:47.016Z
Learning: The common-webhook-methods.mjs
object is designed to be extended, similar to an abstract class, and intentionally does not implement certain methods like generateWebhookMeta
and getEventType
to enforce implementation in subclasses.
Learnt from: GTFalcao
PR: #17538
File: components/aircall/sources/new-sms/new-sms.mjs:19-25
Timestamp: 2025-07-09T18:07:12.426Z
Learning: In Aircall API webhook payloads, the created_at
field is returned as an ISO 8601 string format (e.g., "2020-02-18T20:52:22.000Z"), not as milliseconds since epoch. For Pipedream components, this needs to be converted to milliseconds using Date.parse()
before assigning to the ts
field in generateMeta()
.
components/freshdesk/actions/update-agent/update-agent.mjs (2)
Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the run
method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members
action, the correct format is Successfully retrieved ${response.data.length} members
.
Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the run
method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members
action, the correct format is Successfully retrieved ${response.data.length} members
.
components/freshdesk/actions/list-folder-articles/list-folder-articles.mjs (2)
Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the run
method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members
action, the correct format is Successfully retrieved ${response.data.length} members
.
Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the run
method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members
action, the correct format is Successfully retrieved ${response.data.length} members
.
components/freshdesk/freshdesk.app.mjs (3)
Learnt from: GTFalcao
PR: #16954
File: components/salesloft/salesloft.app.mjs:14-23
Timestamp: 2025-06-04T17:52:05.780Z
Learning: In the Salesloft API integration (components/salesloft/salesloft.app.mjs), the _makeRequest method returns response.data which directly contains arrays for list endpoints like listPeople, listCadences, listUsers, and listAccounts. The propDefinitions correctly call .map() directly on these responses without needing to destructure a nested data property.
Learnt from: LucBerge
PR: #14080
File: components/nocodb/nocodb.app.mjs:133-133
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When implementing pagination with an offset, incrementing args.params.offset
within the loop ensures correct tracking of the offset, particularly when a maximum count limit (max
) is used.
Learnt from: LucBerge
PR: #14080
File: components/nocodb/nocodb.app.mjs:133-133
Timestamp: 2024-09-25T16:13:11.505Z
Learning: When implementing pagination with an offset, incrementing args.params.offset
within the loop ensures correct tracking of the offset, particularly when a maximum count limit (max
) is used.
🧬 Code Graph Analysis (13)
components/freshdesk/actions/list-agents/list-agents.mjs (3)
components/freshdesk/actions/list-folder-articles/list-folder-articles.mjs (1)
results
(34-41)components/freshdesk/actions/list-ticket-fields/list-ticket-fields.mjs (1)
results
(19-25)components/freshdesk/freshdesk.app.mjs (2)
results
(651-651)results
(666-666)
components/freshdesk/actions/update-solution-article/update-solution-article.mjs (3)
components/freshdesk/actions/create-solution-article/create-solution-article.mjs (1)
response
(58-68)components/freshdesk/freshdesk.app.mjs (5)
response
(13-13)response
(27-31)response
(45-51)response
(293-295)response
(313-315)components/freshdesk/common/utils.mjs (1)
parseObject
(25-49)
components/freshdesk/actions/create-agent/create-agent.mjs (2)
components/freshdesk/actions/update-agent/update-agent.mjs (1)
response
(92-108)components/freshdesk/freshdesk.app.mjs (5)
response
(13-13)response
(27-31)response
(45-51)response
(293-295)response
(313-315)
components/freshdesk/actions/list-ticket-fields/list-ticket-fields.mjs (3)
components/freshdesk/actions/list-agents/list-agents.mjs (1)
results
(47-59)components/freshdesk/actions/list-folder-articles/list-folder-articles.mjs (1)
results
(34-41)components/freshdesk/freshdesk.app.mjs (2)
results
(651-651)results
(666-666)
components/freshdesk/actions/create-solution-article/create-solution-article.mjs (4)
components/freshdesk/actions/list-solution-categories/list-solution-categories.mjs (1)
response
(13-15)components/freshdesk/actions/list-category-folders/list-category-folders.mjs (1)
response
(19-22)components/freshdesk/actions/update-solution-article/update-solution-article.mjs (1)
response
(70-80)components/freshdesk/common/utils.mjs (1)
parseObject
(25-49)
components/freshdesk/actions/get-solution-article/get-solution-article.mjs (4)
components/freshdesk/actions/delete-solution-article/delete-solution-article.mjs (1)
response
(37-40)components/freshdesk/actions/list-solution-categories/list-solution-categories.mjs (1)
response
(13-15)components/freshdesk/actions/list-category-folders/list-category-folders.mjs (1)
response
(19-22)components/freshdesk/freshdesk.app.mjs (5)
response
(13-13)response
(27-31)response
(45-51)response
(293-295)response
(313-315)
components/freshdesk/actions/update-contact/update-contact.mjs (3)
components/freshdesk/actions/create-agent/create-agent.mjs (1)
response
(84-99)components/freshdesk/actions/update-agent/update-agent.mjs (1)
response
(92-108)components/freshdesk/freshdesk.app.mjs (5)
response
(13-13)response
(27-31)response
(45-51)response
(293-295)response
(313-315)
components/freshdesk/sources/common/polling.mjs (4)
components/freshdesk/actions/list-agents/list-agents.mjs (1)
results
(47-59)components/freshdesk/actions/list-folder-articles/list-folder-articles.mjs (1)
results
(34-41)components/freshdesk/actions/list-ticket-fields/list-ticket-fields.mjs (1)
results
(19-25)components/freshdesk/freshdesk.app.mjs (2)
results
(651-651)results
(666-666)
components/freshdesk/actions/list-category-folders/list-category-folders.mjs (2)
components/freshdesk/actions/list-solution-categories/list-solution-categories.mjs (1)
response
(13-15)components/freshdesk/freshdesk.app.mjs (5)
response
(13-13)response
(27-31)response
(45-51)response
(293-295)response
(313-315)
components/freshdesk/actions/delete-solution-article/delete-solution-article.mjs (6)
components/freshdesk/actions/create-solution-article/create-solution-article.mjs (1)
response
(58-68)components/freshdesk/actions/get-solution-article/get-solution-article.mjs (1)
response
(37-40)components/freshdesk/actions/list-solution-categories/list-solution-categories.mjs (1)
response
(13-15)components/freshdesk/actions/list-category-folders/list-category-folders.mjs (1)
response
(19-22)components/freshdesk/actions/update-solution-article/update-solution-article.mjs (1)
response
(70-80)components/freshdesk/freshdesk.app.mjs (5)
response
(13-13)response
(27-31)response
(45-51)response
(293-295)response
(313-315)
components/freshdesk/actions/update-agent/update-agent.mjs (3)
components/freshdesk/actions/create-agent/create-agent.mjs (1)
response
(84-99)components/freshdesk/actions/update-contact/update-contact.mjs (1)
response
(50-60)components/freshdesk/freshdesk.app.mjs (5)
response
(13-13)response
(27-31)response
(45-51)response
(293-295)response
(313-315)
components/freshdesk/actions/update-ticket-field/update-ticket-field.mjs (3)
components/freshdesk/actions/create-ticket-field/create-ticket-field.mjs (1)
response
(90-106)components/freshdesk/freshdesk.app.mjs (5)
response
(13-13)response
(27-31)response
(45-51)response
(293-295)response
(313-315)components/freshdesk/common/utils.mjs (1)
parseObject
(25-49)
components/freshdesk/actions/list-folder-articles/list-folder-articles.mjs (3)
components/freshdesk/actions/list-agents/list-agents.mjs (1)
results
(47-59)components/freshdesk/actions/list-ticket-fields/list-ticket-fields.mjs (1)
results
(19-25)components/freshdesk/freshdesk.app.mjs (2)
results
(651-651)results
(666-666)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Lint Code Base
- GitHub Check: Verify TypeScript components
- GitHub Check: Publish TypeScript components
🔇 Additional comments (32)
components/freshdesk/actions/set-ticket-status/set-ticket-status.mjs (1)
7-7
: Version bump looks good.The coordinated version increment aligns with the broader Freshdesk integration updates in this PR.
components/freshdesk/package.json (1)
3-3
: Appropriate version bump for new features.The minor version increment from 0.3.1 to 0.4.0 correctly reflects the addition of new actions, sources, and utilities described in the PR summary.
components/freshdesk/actions/add-note-to-ticket/add-note-to-ticket.mjs (1)
8-8
: Version bump aligns with coordinated release.The version increment is consistent with other Freshdesk action updates in this PR.
components/freshdesk/actions/remove-ticket-tags/remove-ticket-tags.mjs (1)
9-9
: Version increment is consistent with PR scope.The version bump aligns with the coordinated updates across multiple Freshdesk action modules in this release.
components/freshdesk/actions/create-contact/create-contact.mjs (1)
8-8
: Minor version increment acknowledged
0.0.7
is fine. Confirm that other components depending on this action’s version (docs, tests, examples) don’t hard-code the previous number.components/freshdesk/actions/create-ticket/create-ticket.mjs (1)
7-7
: Create-ticket action version updatedLooks good. Keep an eye on semantic-version alignment with any API surface changes once the new contact / pagination utilities ship.
components/freshdesk/actions/create-company/create-company.mjs (1)
7-7
: Version bump to 0.0.7 acknowledgedNo further feedback.
components/freshdesk/actions/close-ticket/close-ticket.mjs (1)
7-7
: Version bump looks goodThe metadata update from
0.0.3
to0.0.4
keeps the action in sync with the rest of the Freshdesk package releases. No other changes detected.components/freshdesk/actions/get-ticket/get-ticket.mjs (1)
7-7
: Minor version increment acknowledged
0.1.4
→0.1.5
is consistent with the coordinated bumps across sibling actions. Nothing else to flag.components/freshdesk/actions/add-ticket-tags/add-ticket-tags.mjs (1)
9-9
: Metadata update approvedThe shift to
0.0.3
aligns with the other tag-related components. Implementation remains unchanged.components/freshdesk/actions/update-ticket/update-ticket.mjs (1)
8-8
: Patch-level bump verifiedUpdating to
0.0.4
without logic changes is appropriate; no further action required.components/freshdesk/actions/set-ticket-tags/set-ticket-tags.mjs (1)
9-9
: Version sync confirmedIncrementing to
0.0.3
keeps this action in step with the rest of the release set.components/freshdesk/actions/assign-ticket-to-agent/assign-ticket-to-agent.mjs (1)
7-7
: LGTM - Coordinated version updateThe version increment from "0.0.3" to "0.0.4" is consistent with the broader Freshdesk integration updates in this PR.
components/freshdesk/actions/assign-ticket-to-group/assign-ticket-to-group.mjs (1)
7-7
: LGTM - Coordinated version updateThe version increment from "0.0.3" to "0.0.4" aligns with the coordinated release approach across Freshdesk actions in this PR.
components/freshdesk/actions/list-agents/list-agents.mjs (1)
1-66
: LGTM - Well-structured implementation following established patternsThis new action properly implements the agent listing functionality with:
- Consistent use of
getPaginatedResources
pattern matching other Freshdesk actions- Appropriate filter parameters for common agent queries
- Properly formatted summary message following best practices
- Clean prop definitions with helpful descriptions
The implementation aligns well with the broader Freshdesk integration enhancements.
components/freshdesk/actions/get-solution-article/get-solution-article.mjs (1)
9-34
: LGTM - Proper prop dependency structureThe cascading prop dependencies (categoryId → folderId → articleId) correctly implement the hierarchical relationship of Freshdesk solution articles, enabling proper UI selection flow.
components/freshdesk/sources/contact-updated/contact-updated.mjs (1)
1-28
: LGTM - Proper polling source implementationThis source correctly implements the contact update polling pattern with:
- Appropriate extension of the common polling module
- Correct source naming (no "New" prefix for update events, following component guidelines)
- Proper API method usage (
filterContacts
) for polling- Well-structured metadata generation with unique IDs combining contact ID and timestamp
- Appropriate timestamp field selection (
updated_at
)The implementation follows established patterns and best practices for Freshdesk polling sources.
components/freshdesk/common/constants.mjs (1)
40-77
: LGTM! Well-structured constant definitions.The new constant arrays follow the established pattern and provide clear, logical enumeration values for ticket scope, agent types, and article status. The structure is consistent with existing constants in the file.
components/freshdesk/actions/create-agent/create-agent.mjs (1)
1-103
: LGTM! Well-implemented agent creation action.The action follows best practices with:
- Proper naming convention
- Comprehensive prop definitions with appropriate types and descriptions
- Correct usage of constants and prop definitions from the app
- Proper transformation from camelCase props to snake_case API fields
- Well-formatted summary message following established patterns
components/freshdesk/actions/update-solution-article/update-solution-article.mjs (1)
1-84
: Well-structured action with proper hierarchical dependencies.The action correctly implements:
- Hierarchical prop dependencies for category → folder → article navigation
- Proper use of parseObject utility for SEO data handling
- Appropriate use of constants for article status options
- Correct API call pattern
components/freshdesk/actions/update-contact/update-contact.mjs (1)
1-64
: LGTM! Clean and well-implemented contact update action.The action follows established patterns with:
- Proper prop definitions using app-level propDefinitions
- Correct field mapping from camelCase to snake_case for API
- Appropriate optional field handling
- Well-formatted summary message using response data
components/freshdesk/actions/create-solution-article/create-solution-article.mjs (1)
1-72
: LGTM! Well-implemented article creation action.The action follows best practices with:
- Proper hierarchical prop dependencies (category → folder)
- Consistent use of parseObject utility for SEO data handling
- Appropriate required vs optional field designation
- Correct API call pattern matching other actions
- Well-formatted summary message using required title field
components/freshdesk/actions/update-agent/update-agent.mjs (1)
1-113
: LGTM - Well-structured agent update action.The action follows consistent patterns with other Freshdesk actions and properly maps camelCase properties to snake_case API fields. The prop definitions are correctly referenced from the app module.
components/freshdesk/actions/list-category-folders/list-category-folders.mjs (1)
1-29
: LGTM - Clean and consistent implementation.The action follows the established patterns for Freshdesk list actions. The summary message correctly handles pluralization as recommended in the retrieved learnings, and the prop definition usage is appropriate.
components/freshdesk/actions/create-ticket-field/create-ticket-field.mjs (2)
86-88
: Good validation logic for dropdown fields.The validation ensuring choices are provided for custom_dropdown fields is appropriate and prevents runtime errors.
102-104
: Proper use of parseObject utility.The use of
parseObject
for parsing JSON string arrays is correct and handles the complex data structures appropriately.components/freshdesk/actions/delete-solution-article/delete-solution-article.mjs (2)
17-34
: Excellent use of dependent prop definitions.The hierarchical dependency structure (categoryId → folderId → articleId) is well-implemented, providing a good user experience by dynamically filtering options based on previous selections.
36-44
: Clean and focused implementation.The action is appropriately focused on its single responsibility of deleting an article. The summary message correctly uses the articleId for identification.
components/freshdesk/actions/list-solution-categories/list-solution-categories.mjs (1)
1-22
: LGTM - Exemplary simple listing action.This action demonstrates clean, minimal implementation following established patterns. The summary message correctly handles pluralization as recommended in the retrieved learnings, and the overall structure is consistent with other Freshdesk listing actions.
components/freshdesk/actions/list-ticket-fields/list-ticket-fields.mjs (1)
18-30
: Looks good – clean implementationPagination, props, and summary formatting all follow the established pattern for Freshdesk actions. No changes needed.
components/freshdesk/actions/list-folder-articles/list-folder-articles.mjs (1)
34-45
: Implementation approvedUses shared pagination helper and dynamic props correctly; summary pluralization handled.
components/freshdesk/sources/new-contact/new-contact.mjs (1)
19-24
: Source looks solidUses shared polling correctly and converts ISO date to ms with
Date.parse
.
components/freshdesk/actions/create-ticket-field/create-ticket-field.mjs
Outdated
Show resolved
Hide resolved
components/freshdesk/actions/update-solution-article/update-solution-article.mjs
Show resolved
Hide resolved
components/freshdesk/actions/update-ticket-field/update-ticket-field.mjs
Outdated
Show resolved
Hide resolved
components/freshdesk/actions/create-ticket-field/create-ticket-field.mjs
Outdated
Show resolved
Hide resolved
/approve |
Resolves #17427
Summary by CodeRabbit
New Features
Improvements
Bug Fixes
Chores