-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Frontapp new components #17689
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
Frontapp new components #17689
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
""" WalkthroughThis update introduces multiple new actions and sources for the FrontApp integration, including creating inboxes, message templates, and updating teammates, as well as listing and deleting message templates. New event sources for conversation and message template creation are added. The app module is extended with new prop definitions and methods to support these features. Several existing actions and sources have updated metadata and version increments. The common base source is enhanced to support event filtering. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Action
participant FrontAppClient
participant API
User->>Action: Trigger (e.g., Create Message Template)
Action->>FrontAppClient: Call method (e.g., createMessageTemplate)
FrontAppClient->>API: POST /message_templates
API-->>FrontAppClient: Response
FrontAppClient-->>Action: Result
Action-->>User: Summary and API response
sequenceDiagram
participant Source
participant FrontAppClient
participant API
participant EventStream
Source->>FrontAppClient: Call list API (e.g., listMessageTemplates)
FrontAppClient->>API: GET /message_templates
API-->>FrontAppClient: Paginated results
FrontAppClient-->>Source: Items
Source->>EventStream: Emit new event(s)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~90 minutes Suggested labels
Suggested reviewers
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/frontapp/sources/common/base.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs components/frontapp/sources/new-message-template-created/new-message-template-created.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs components/frontapp/sources/new-conversation-created/new-conversation-created.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 (3)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ 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). (4)
✨ 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: 1
🧹 Nitpick comments (2)
components/frontapp/actions/reply-to-conversation/reply-to-conversation.mjs (1)
7-9
: Update summary string to match action intentThe action now only updates metadata, but the
$summary
emitted byrun()
still says “updated conversation” instead of “replied to conversation”, which can confuse users.-$.export("$summary", `Successfully updated conversation with ID ${conversationId}`); +$.export("$summary", `Successfully replied to conversation with ID ${conversationId}`);Also applies to: 164-165
components/frontapp/frontapp.app.mjs (1)
548-591
: Use consistent HTTP method constants.The new methods are well-implemented but use inconsistent HTTP method specification. Some methods use lowercase strings while others use
constants.METHOD
.Apply this diff to maintain consistency:
async updateTeammate({ teammateId, ...args } = {}) { return this.makeRequest({ - method: "patch", + method: constants.METHOD.PATCH, path: `/teammates/${teammateId}`, ...args, }); }, async createInbox(args = {}) { return this.makeRequest({ - method: "post", + method: constants.METHOD.POST, path: "/inboxes", ...args, }); }, async createMessageTemplate(args = {}) { return this.makeRequest({ - method: "post", + method: constants.METHOD.POST, path: "/message_templates", ...args, }); }, async deleteMessageTemplate({ messageTemplateId, ...args } = {}) { return this.makeRequest({ - method: "delete", + method: constants.METHOD.DELETE, path: `/message_templates/${messageTemplateId}`, ...args, }); },
📜 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 (13)
components/frontapp/actions/create-inbox/create-inbox.mjs
(1 hunks)components/frontapp/actions/create-message-template/create-message-template.mjs
(1 hunks)components/frontapp/actions/delete-message-template/delete-message-template.mjs
(1 hunks)components/frontapp/actions/import-message/import-message.mjs
(1 hunks)components/frontapp/actions/list-message-templates/list-message-templates.mjs
(1 hunks)components/frontapp/actions/receive-custom-messages/receive-custom-messages.mjs
(1 hunks)components/frontapp/actions/reply-to-conversation/reply-to-conversation.mjs
(1 hunks)components/frontapp/actions/send-new-message/send-new-message.mjs
(1 hunks)components/frontapp/actions/update-conversation/update-conversation.mjs
(1 hunks)components/frontapp/actions/update-teammate/update-teammate.mjs
(1 hunks)components/frontapp/frontapp.app.mjs
(2 hunks)components/frontapp/package.json
(2 hunks)components/frontapp/sources/new-conversation-state-change/new-conversation-state-change.mjs
(1 hunks)
🧰 Additional context used
🧠 Learnings (13)
components/frontapp/sources/new-conversation-state-change/new-conversation-state-change.mjs (1)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#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.
components/frontapp/actions/import-message/import-message.mjs (5)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#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: PipedreamHQ/pipedream#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: jcortes
PR: PipedreamHQ/pipedream#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: PipedreamHQ/pipedream#14229
File: components/americommerce/actions/change-order-status/change-order-status.mjs:6-6
Timestamp: 2024-10-08T16:43:04.167Z
Learning: When providing action descriptions in the AmeriCommerce components, avoid unnecessary details and include a link to the relevant documentation instead.
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#15376
File: components/monday/sources/column-value-updated/column-value-updated.mjs:17-24
Timestamp: 2025-01-23T03:55:51.998Z
Learning: Alert props in Pipedream components are a special case that do not require a label property, and use the 'content' property as a replacement for description.
components/frontapp/package.json (1)
Learnt from: jcortes
PR: PipedreamHQ/pipedream#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/frontapp/actions/create-message-template/create-message-template.mjs (3)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#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: PipedreamHQ/pipedream#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: jcortes
PR: PipedreamHQ/pipedream#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/frontapp/actions/reply-to-conversation/reply-to-conversation.mjs (3)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#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: PipedreamHQ/pipedream#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: PipedreamHQ/pipedream#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/frontapp/actions/delete-message-template/delete-message-template.mjs (2)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#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: PipedreamHQ/pipedream#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/frontapp/actions/update-conversation/update-conversation.mjs (3)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#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: PipedreamHQ/pipedream#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: PipedreamHQ/pipedream#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/frontapp/actions/receive-custom-messages/receive-custom-messages.mjs (4)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#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: PipedreamHQ/pipedream#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: PipedreamHQ/pipedream#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: PipedreamHQ/pipedream#15376
File: components/monday/sources/column-value-updated/column-value-updated.mjs:17-24
Timestamp: 2025-01-23T03:55:51.998Z
Learning: Alert props in Pipedream components are a special case that do not require a label property, and use the 'content' property as a replacement for description.
components/frontapp/actions/send-new-message/send-new-message.mjs (3)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#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: PipedreamHQ/pipedream#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: jcortes
PR: PipedreamHQ/pipedream#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/frontapp/actions/update-teammate/update-teammate.mjs (2)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#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: PipedreamHQ/pipedream#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/frontapp/actions/list-message-templates/list-message-templates.mjs (2)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#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: PipedreamHQ/pipedream#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/frontapp/actions/create-inbox/create-inbox.mjs (1)
Learnt from: jcortes
PR: PipedreamHQ/pipedream#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/frontapp/frontapp.app.mjs (1)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#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.
🧬 Code Graph Analysis (2)
components/frontapp/actions/delete-message-template/delete-message-template.mjs (2)
components/frontapp/actions/list-message-templates/list-message-templates.mjs (1)
response
(45-48)components/frontapp/actions/create-message-template/create-message-template.mjs (1)
response
(100-104)
components/frontapp/actions/list-message-templates/list-message-templates.mjs (7)
components/frontapp/actions/delete-message-template/delete-message-template.mjs (1)
response
(25-28)components/frontapp/actions/create-inbox/create-inbox.mjs (1)
response
(39-42)components/frontapp/actions/import-message/import-message.mjs (1)
response
(186-190)components/frontapp/actions/receive-custom-messages/receive-custom-messages.mjs (1)
response
(137-137)components/frontapp/actions/send-new-message/send-new-message.mjs (1)
response
(154-154)components/frontapp/actions/create-message-template/create-message-template.mjs (1)
response
(100-104)components/frontapp/actions/tag-conversation/tag-conversation.mjs (1)
frontApp
(30-33)
🔇 Additional comments (16)
components/frontapp/actions/import-message/import-message.mjs (1)
7-8
: Consistent wording update – no further action requiredThe switch from “docs” to “documentation” brings this description in line with the rest of the FrontApp components. No functional impact.
components/frontapp/package.json (1)
3-4
: Confirmed: @pipedream/platform v3.1.0 is published
Verified that version 3.1.0 exists in the npm registry. No further action required.• components/frontapp/package.json (dependency ^3.1.0)
components/frontapp/sources/new-conversation-state-change/new-conversation-state-change.mjs (1)
9-11
: Metadata touch-up looks goodDescription wording and version bump are fine; no logic affected.
Also applies to: 18-19
components/frontapp/actions/update-conversation/update-conversation.mjs (1)
7-9
: Description/version bump is fineNo functional changes. Implementation already exports an accurate summary and correct payload.
components/frontapp/actions/delete-message-template/delete-message-template.mjs (2)
1-33
: LGTM! Clean implementation of delete action.The action follows established patterns correctly with proper imports, metadata, prop definitions, and API method usage. The implementation is concise and appropriate for a delete operation.
30-30
: Summary message format is correct.The summary message follows the proper format as indicated in the retrieved learnings, using a template string with the relevant identifier.
components/frontapp/actions/receive-custom-messages/receive-custom-messages.mjs (1)
7-8
: LGTM! Consistent metadata updates.The description standardization from "docs" to "documentation" and version increment align with the broader PR pattern of updating FrontApp action metadata.
components/frontapp/actions/send-new-message/send-new-message.mjs (1)
7-8
: LGTM! Consistent metadata updates.The description standardization from "docs" to "documentation" and version increment follow the same pattern as other FrontApp actions in this PR.
components/frontapp/actions/create-message-template/create-message-template.mjs (3)
1-3
: LGTM! Proper imports for file handling.The imports correctly include FormData and getFileStreamAndMetadata for handling file attachments in the message template creation.
67-88
: Well-implemented attachment handling.The conditional FormData usage for attachments is properly implemented with correct stream handling and metadata extraction. The fallback to JSON for requests without attachments is appropriate.
106-106
: Summary message format is correct.The summary message uses the template name variable and follows the proper format consistent with the retrieved learnings.
components/frontapp/actions/create-inbox/create-inbox.mjs (2)
1-47
: LGTM! Clean and straightforward inbox creation action.The implementation follows established patterns correctly with proper metadata, prop definitions, and API method usage. The action is well-structured and appropriate for inbox creation functionality.
44-44
: Summary message format is correct.The summary message properly uses the inbox name variable and follows the expected format pattern.
components/frontapp/actions/update-teammate/update-teammate.mjs (1)
1-78
: LGTM! Well-structured action implementation.The action is correctly implemented with proper prop definitions, data transformation, and API integration. The summary message formatting follows the established pattern from the learnings.
components/frontapp/actions/list-message-templates/list-message-templates.mjs (1)
1-55
: LGTM! Proper implementation of list action with pagination support.The action correctly implements listing with optional sorting parameters, proper response handling for paginated results, and follows the established summary message format from the learnings.
components/frontapp/frontapp.app.mjs (1)
276-310
: LGTM! Well-implemented propDefinitions with proper pagination support.The new
messageTemplateId
andfolderId
propDefinitions follow the established pattern with async options loading and proper mapping functions.
components/frontapp/actions/create-message-template/create-message-template.mjs
Outdated
Show resolved
Hide resolved
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: 0
🧹 Nitpick comments (1)
components/frontapp/sources/common/polling-ids.mjs (1)
15-45
: Verify the abstract method pattern is documented.This common module follows an abstract class pattern where extending modules must implement
getItems()
,getItemId()
, andgenerateMeta()
methods. Consider adding JSDoc comments to document these required methods for better developer experience.methods: { + /** + * Abstract methods that must be implemented by extending modules: + * - async getItems(savedIds): Fetch items from the API + * - getItemId(item): Extract unique ID from an item + * - generateMeta(item): Generate event metadata for an item + */ _getSavedIds() {Consider adding error handling for API calls.
The
startEvent
method assumesthis.getItems()
will always succeed. Consider wrapping the API call in try-catch to handle potential failures gracefully.async startEvent(maxItems) { const savedIds = this._getSavedIds(); - const items = await this.getItems(savedIds); + try { + const items = await this.getItems(savedIds); + // ... rest of the logic + } catch (error) { + console.error("Error fetching items:", error); + return; + }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
components/frontapp/sources/common/polling-ids.mjs
(1 hunks)components/frontapp/sources/new-conversation-created/new-conversation-created.mjs
(1 hunks)components/frontapp/sources/new-conversation-created/test-event.mjs
(1 hunks)components/frontapp/sources/new-message-template-created/new-message-template-created.mjs
(1 hunks)components/frontapp/sources/new-message-template-created/test-event.mjs
(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- components/frontapp/sources/new-message-template-created/test-event.mjs
- components/frontapp/sources/new-conversation-created/test-event.mjs
🧰 Additional context used
🧠 Learnings (3)
components/frontapp/sources/common/polling-ids.mjs (2)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#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: PipedreamHQ/pipedream#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.
components/frontapp/sources/new-message-template-created/new-message-template-created.mjs (4)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#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: PipedreamHQ/pipedream#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: PipedreamHQ/pipedream#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: PipedreamHQ/pipedream#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/frontapp/sources/new-conversation-created/new-conversation-created.mjs (4)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#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: PipedreamHQ/pipedream#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: PipedreamHQ/pipedream#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: PipedreamHQ/pipedream#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.
🧬 Code Graph Analysis (2)
components/frontapp/sources/new-message-template-created/new-message-template-created.mjs (2)
components/heygen/actions/create-video-from-template/create-video-from-template.mjs (1)
template
(70-73)components/frontapp/sources/new-conversation-created/new-conversation-created.mjs (1)
response
(25-30)
components/frontapp/sources/new-conversation-created/new-conversation-created.mjs (1)
components/frontapp/sources/new-message-template-created/new-message-template-created.mjs (1)
response
(25-30)
🔇 Additional comments (6)
components/frontapp/sources/common/polling-ids.mjs (2)
1-14
: LGTM! Clean module structure.The imports and props configuration follow Pipedream source conventions correctly.
47-54
: LGTM! Follows Pipedream polling source best practices.The
run()
method anddeploy()
hook implementation correctly limits initial emissions to 5 items during deployment, preventing overwhelming users with historical data.components/frontapp/sources/new-conversation-created/new-conversation-created.mjs (3)
1-11
: LGTM! Proper source configuration.The imports, naming, and metadata follow Pipedream source conventions correctly. The "New" prefix is appropriate since this source emits events only for new conversations.
35-35
: LGTM! Sample emit inclusion follows best practices.Including sample emit data supports proper testing and development workflow.
12-33
: Confirm correctsort_by
field for listing conversationsI wasn’t able to find any examples in the codebase indicating whether the FrontApp API expects
sort_by: "date"
orsort_by: "created_at"
when callinglistConversations
. Please verify against the official FrontApp documentation and update if needed:
- File: components/frontapp/sources/new-conversation-created/new-conversation-created.mjs
Method: getItems (around line 32)The fallback to
response._results || []
is good to keep.components/frontapp/sources/new-message-template-created/new-message-template-created.mjs (1)
1-36
: LGTM! Consistent implementation with appropriate field mappings.This source correctly follows the same pattern as the conversation source with appropriate field adaptations:
- Uses
template.name
for summary (vsconversation.subject
)- Uses
"created_at"
for sorting (vs"date"
)- Maintains consistent error handling with
response._results || []
fallbackThe implementation properly extends the common polling module and follows Pipedream source conventions.
frontApp, | ||
sortBy: { | ||
type: "string", | ||
label: "Sort By", |
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.
Note: the docs do not mention a page or per_page parameter for this endpoint at all
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.
The docs show it uses a page_token
instead. This action should have a maxResults
prop and return a paginated list as the result. Note: You can look at how the messageTemplateId
prop uses pagination.
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.
Hi @GTFalcao, LGTM! Ready for QA!
attachments: { | ||
propDefinition: [ | ||
frontApp, | ||
"attachments", | ||
], | ||
}, |
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.
I believe we're supposed to be adding syncDir
to components that work with the /tmp directory.
attachments: { | |
propDefinition: [ | |
frontApp, | |
"attachments", | |
], | |
}, | |
attachments: { | |
propDefinition: [ | |
frontApp, | |
"attachments", | |
], | |
}, | |
syncDir: { | |
type: "dir", | |
accessMode: "write", | |
sync: true, | |
}, |
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.
The syncDir
prop has to do with File Stash. https://pipedream.com/docs/connect/components/files
frontApp, | ||
sortBy: { | ||
type: "string", | ||
label: "Sort By", |
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.
The docs show it uses a page_token
instead. This action should have a maxResults
prop and return a paginated list as the result. Note: You can look at how the messageTemplateId
prop uses pagination.
_getSavedIds() { | ||
return this.db.get("savedIds") || []; | ||
}, | ||
_setSavedIds(ids) { | ||
this.db.set("savedIds", ids); | ||
}, |
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.
Would it be simpler to use a timestamp to check the events, rather than storing all the ID's?
If that's not an option, storing the ID's in an object (e.g. { 123: true, 456: true }) would reduce execution time. Checking whether savedIds[id] is true
is faster than using savedIds.includes().
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.
Thanks for the suggeston, I've changed the two sources to adhere to the timestamp format, with a few modifications to the base file to support them
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
components/frontapp/sources/common/base.mjs
(2 hunks)components/frontapp/sources/new-conversation-created/new-conversation-created.mjs
(1 hunks)components/frontapp/sources/new-message-template-created/new-message-template-created.mjs
(1 hunks)
🧠 Learnings (1)
components/frontapp/sources/common/base.mjs (2)
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.
🚧 Files skipped from review as they are similar to previous changes (2)
- components/frontapp/sources/new-message-template-created/new-message-template-created.mjs
- components/frontapp/sources/new-conversation-created/new-conversation-created.mjs
🧰 Additional context used
🧠 Learnings (1)
components/frontapp/sources/common/base.mjs (2)
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.
🔇 Additional comments (2)
components/frontapp/sources/common/base.mjs (2)
22-22
: Good enhancement to support filtering functionality.The addition of the optional
filterFn
parameter maintains backward compatibility while enabling flexible filtering for different source types.
33-37
: Clean filtering implementation.The conditional filtering logic is well-implemented and preserves the existing behavior when no filter function is provided.
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.
Just a couple questions/comments.
components/frontapp/actions/list-message-templates/list-message-templates.mjs
Show resolved
Hide resolved
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: 2
🧹 Nitpick comments (2)
components/frontapp/actions/list-message-templates/list-message-templates.mjs (2)
27-42
: Provide a sane default forsortOrder
Most list endpoints default to either ascending or descending; making the default explicit (
"desc"
is typical forcreated_at
) avoids undefined being sent to the API and removes an extra decision for users.
61-69
: Potential large-memory load whenmaxResults
is highAccumulating all templates into
results
may exhaust memory for organisations with thousands of templates. If callers don’t need the full array, stream or chunk results instead of buffering the whole list.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
components/frontapp/actions/list-message-templates/list-message-templates.mjs
(1 hunks)
🧠 Learnings (2)
📓 Common learnings
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#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.
components/frontapp/actions/list-message-templates/list-message-templates.mjs (8)
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: GTFalcao
PR: #14137
File: components/tricentis_qtest/tricentis_qtest.app.mjs:39-54
Timestamp: 2024-10-08T15:33:38.240Z
Learning: The Tricentis qTest API endpoint used for fetching requirements does not support pagination, so pagination is unnecessary in the options
method for requirementId
.
Learnt from: GTFalcao
PR: #14137
File: components/tricentis_qtest/tricentis_qtest.app.mjs:39-54
Timestamp: 2024-09-29T22:37:26.269Z
Learning: The Tricentis qTest API endpoint used for fetching requirements does not support pagination, so pagination is unnecessary in the options
method for requirementId
.
Learnt from: GTFalcao
PR: #14137
File: components/tricentis_qtest/tricentis_qtest.app.mjs:60-88
Timestamp: 2024-09-29T22:37:18.597Z
Learning: The Tricentis qTest API's getDefects
endpoint does not support pagination.
Learnt from: GTFalcao
PR: #14137
File: components/tricentis_qtest/tricentis_qtest.app.mjs:60-88
Timestamp: 2024-10-12T16:05:49.624Z
Learning: The Tricentis qTest API's getDefects
endpoint does not support pagination.
Learnt from: GTFalcao
PR: #14289
File: components/motion/actions/get-schedules/get-schedules.mjs:9-11
Timestamp: 2024-10-15T17:39:12.981Z
Learning: In the Motion API's 'Get Schedules' endpoint, specifying the date is not an option.
Learnt from: js07
PR: #17375
File: components/zerobounce/actions/get-validation-results-file/get-validation-results-file.mjs:23-27
Timestamp: 2025-07-01T17:07:48.193Z
Learning: For "dir" props in Pipedream components, whether to mark them as optional depends on the action's file I/O behavior - if an action always writes files as output, the "dir" prop should not be marked as optional.
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#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.
components/frontapp/actions/list-message-templates/list-message-templates.mjs (8)
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: GTFalcao
PR: #14137
File: components/tricentis_qtest/tricentis_qtest.app.mjs:39-54
Timestamp: 2024-10-08T15:33:38.240Z
Learning: The Tricentis qTest API endpoint used for fetching requirements does not support pagination, so pagination is unnecessary in the options
method for requirementId
.
Learnt from: GTFalcao
PR: #14137
File: components/tricentis_qtest/tricentis_qtest.app.mjs:39-54
Timestamp: 2024-09-29T22:37:26.269Z
Learning: The Tricentis qTest API endpoint used for fetching requirements does not support pagination, so pagination is unnecessary in the options
method for requirementId
.
Learnt from: GTFalcao
PR: #14137
File: components/tricentis_qtest/tricentis_qtest.app.mjs:60-88
Timestamp: 2024-09-29T22:37:18.597Z
Learning: The Tricentis qTest API's getDefects
endpoint does not support pagination.
Learnt from: GTFalcao
PR: #14137
File: components/tricentis_qtest/tricentis_qtest.app.mjs:60-88
Timestamp: 2024-10-12T16:05:49.624Z
Learning: The Tricentis qTest API's getDefects
endpoint does not support pagination.
Learnt from: GTFalcao
PR: #14289
File: components/motion/actions/get-schedules/get-schedules.mjs:9-11
Timestamp: 2024-10-15T17:39:12.981Z
Learning: In the Motion API's 'Get Schedules' endpoint, specifying the date is not an option.
Learnt from: js07
PR: #17375
File: components/zerobounce/actions/get-validation-results-file/get-validation-results-file.mjs:23-27
Timestamp: 2025-07-01T17:07:48.193Z
Learning: For "dir" props in Pipedream components, whether to mark them as optional depends on the action's file I/O behavior - if an action always writes files as output, the "dir" prop should not be marked as optional.
⏰ 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). (4)
- GitHub Check: Lint Code Base
- GitHub Check: pnpm publish
- GitHub Check: Verify TypeScript components
- GitHub Check: Publish TypeScript components
components/frontapp/actions/list-message-templates/list-message-templates.mjs
Show resolved
Hide resolved
components/frontapp/actions/list-message-templates/list-message-templates.mjs
Show resolved
Hide resolved
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.
LGTM!
/approve |
Closes #17465
Summary by CodeRabbit
New Features
Improvements
Bug Fixes