-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New Components - smashsend #17511
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 - smashsend #17511
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
WalkthroughThis update introduces a comprehensive SmashSend integration, adding core app logic, utility parsing, and a suite of actions for contact management (create/update, delete, list, search). It also implements real-time event sources for contact lifecycle events (created, updated, deleted, subscribed/unsubscribed), each with sample payloads and webhook handling. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Action
participant SmashSendApp
participant SmashSendAPI
User->>Action: Trigger (e.g., Create or Update Contact)
Action->>SmashSendApp: Call method (e.g., createContact)
SmashSendApp->>SmashSendAPI: HTTP request (authenticated)
SmashSendAPI-->>SmashSendApp: API response
SmashSendApp-->>Action: Return result
Action-->>User: Output summary and data
sequenceDiagram
participant SmashSend
participant WebhookSource
participant SmashSendApp
participant UserWorkflow
SmashSend-->>WebhookSource: Event webhook (e.g., CONTACT_CREATED)
WebhookSource->>SmashSendApp: Validate/process event
WebhookSource-->>UserWorkflow: Emit event with metadata
Assessment against linked issues
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/smashsend/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 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous 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). (4)
✨ Finishing Touches
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 (4)
components/smashsend/sources/new-contact-created/test-event.mjs (1)
1-25
: Fixture OK – only a minor stylistic noteEverything parses correctly. If you want absolute consistency with the other samples, consider using
null
(instead of""
) forfirstName
/lastName
, but that’s purely cosmetic.components/smashsend/package.json (1)
1-18
: Consider adding missing metadataA
license
(and optionallyrepository
) field keeps the package manifest consistent with other first-party components."homepage": "https://pipedream.com/apps/smashsend", "author": "Pipedream <[email protected]> (https://pipedream.com/)", + "license": "MIT", "publishConfig": {components/smashsend/common/utils.mjs (1)
15-23
: Improve object type checking to handle special objects safely.The current implementation processes all non-array objects with
Object.entries
, which could lead to unexpected behavior with special objects likeDate
,RegExp
, orFunction
instances. Consider adding a check for plain objects only.Apply this diff to handle only plain objects:
if (typeof obj === "object") { + // Only process plain objects, not special objects like Date, RegExp, etc. + if (obj.constructor !== Object) { + return obj; + } return Object.fromEntries(Object.entries(obj).map(([ key, value, ]) => [ key, parseObject(value), ])); }components/smashsend/smashsend.app.mjs (1)
98-123
: Consider refactoring the pagination loop for clarity.While the
do-while(true)
pattern works, it triggers static analysis warnings. Consider using a more explicit loop condition.async *paginate({ fn, params = {}, resourceKey, max, }) { let count = 0; + let hasMore = true; - do { + while (hasMore) { const response = await fn({ params, }); const { - cursor, hasMore, items, + cursor, hasMore: continueLoop, items, } = response[resourceKey]; + hasMore = continueLoop; if (!items?.length) { return; } for (const item of items) { yield item; if (max && ++count >= max) { return; } } if (!hasMore) { return; } params.cursor = cursor; - } while (true); + } },
📜 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 (18)
components/smashsend/actions/create-or-update-contact/create-or-update-contact.mjs
(1 hunks)components/smashsend/actions/delete-contact/delete-contact.mjs
(1 hunks)components/smashsend/actions/list-contacts/list-contacts.mjs
(1 hunks)components/smashsend/actions/search-contacts/search-contacts.mjs
(1 hunks)components/smashsend/common/utils.mjs
(1 hunks)components/smashsend/package.json
(2 hunks)components/smashsend/smashsend.app.mjs
(1 hunks)components/smashsend/sources/common/base.mjs
(1 hunks)components/smashsend/sources/contact-deleted/contact-deleted.mjs
(1 hunks)components/smashsend/sources/contact-deleted/test-event.mjs
(1 hunks)components/smashsend/sources/contact-resubscribed/contact-resubscribed.mjs
(1 hunks)components/smashsend/sources/contact-resubscribed/test-event.mjs
(1 hunks)components/smashsend/sources/contact-unsubscribed/contact-unsubscribed.mjs
(1 hunks)components/smashsend/sources/contact-unsubscribed/test-event.mjs
(1 hunks)components/smashsend/sources/contact-updated/contact-updated.mjs
(1 hunks)components/smashsend/sources/contact-updated/test-event.mjs
(1 hunks)components/smashsend/sources/new-contact-created/new-contact-created.mjs
(1 hunks)components/smashsend/sources/new-contact-created/test-event.mjs
(1 hunks)
🧰 Additional context used
🧠 Learnings (17)
components/smashsend/sources/contact-deleted/test-event.mjs (1)
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.
components/smashsend/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/smashsend/sources/contact-updated/test-event.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#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/smashsend/sources/contact-resubscribed/test-event.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/smashsend/sources/new-contact-created/test-event.mjs (1)
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.
components/smashsend/sources/contact-unsubscribed/test-event.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/smashsend/actions/delete-contact/delete-contact.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/smashsend/actions/list-contacts/list-contacts.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: 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.
components/smashsend/sources/contact-updated/contact-updated.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/smashsend/actions/create-or-update-contact/create-or-update-contact.mjs (3)
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#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/smashsend/actions/search-contacts/search-contacts.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/smashsend/sources/contact-resubscribed/contact-resubscribed.mjs (5)
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.
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/smashsend/sources/contact-unsubscribed/contact-unsubscribed.mjs (5)
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-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.
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.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/smashsend/sources/contact-deleted/contact-deleted.mjs (3)
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-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/smashsend/sources/new-contact-created/new-contact-created.mjs (4)
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#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-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/smashsend/smashsend.app.mjs (4)
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.
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.
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#16954
File: components/salesloft/salesloft.app.mjs:14-23
Timestamp: 2025-06-04T17:52:05.780Z
Learning: The Salesloft API list endpoints (listPeople, listCadences, listUsers, listAccounts) return arrays directly in the response body, not wrapped in a metadata object with a nested data property. The _makeRequest method correctly returns response.data which contains the arrays that can be mapped over directly in propDefinitions.
components/smashsend/sources/common/base.mjs (2)
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.
🪛 Biome (1.9.4)
components/smashsend/smashsend.app.mjs
[error] 122-122: Unexpected constant condition.
(lint/correctness/noConstantCondition)
⏰ 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: Publish TypeScript components
- GitHub Check: Verify TypeScript components
- GitHub Check: pnpm publish
🔇 Additional comments (15)
components/smashsend/sources/contact-unsubscribed/test-event.mjs (1)
1-25
: Sample fixture looks goodStructure, ISO‐8601 timestamps, and field names conform to the other SmashSend fixtures, so this sample should load fine in the platform UI.
components/smashsend/sources/contact-resubscribed/test-event.mjs (1)
1-25
: LGTMConsistent with the event schema and other fixtures. No issues found.
components/smashsend/sources/contact-deleted/test-event.mjs (1)
1-26
: Fixture approvedWell-formed sample, including
tags
array that may be useful for downstream tests. No changes needed.components/smashsend/package.json (1)
15-17
: Verify dependency version before merge
@pipedream/platform
is pinned to^3.1.0
. Double-check that
a) 3.1.x is published, and
b) no breaking changes between 3.0 and 3.1 impact these components.If uncertain, run an
npm info @pipedream/platform version
(or equivalent CI check) before publishing.components/smashsend/sources/contact-updated/test-event.mjs (1)
1-25
: Test event structure looks appropriate.The test event payload has a well-structured format with realistic contact data, properly formatted timestamps, and appropriate null values for optional fields. This should provide good test coverage for the contact-updated webhook handling.
components/smashsend/actions/delete-contact/delete-contact.mjs (1)
1-26
: Action implementation follows best practices.The delete contact action is well-structured with proper metadata, uses propDefinition for contact selection, and follows the standard Pipedream action pattern. The summary message clearly communicates the action result.
components/smashsend/actions/list-contacts/list-contacts.mjs (1)
1-62
: Comprehensive contact listing action with good filtering options.The action provides well-designed filtering capabilities including sort, search, status, and result limits. The pagination handling using
getPaginatedResources
is appropriate, and the summary message correctly handles singular/plural formatting.components/smashsend/actions/create-or-update-contact/create-or-update-contact.mjs (2)
65-65
: Good use of parseObject utility for flexible properties.The integration of the
parseObject
utility to handle additional properties is well-implemented, allowing users to pass complex property structures that will be properly parsed and merged.
69-73
: Confirm reliability of create vs update detection logicThe action currently uses the presence of
contact.updatedAt
to decide whether a contact was “updated” versus “created.” Since it always callscreateContact
(which may upsert existing contacts),updatedAt
could be set on both new and existing records, making this check unreliable.• There’s no
updateContact
call in this file—onlycreateContact
—soupdatedAt
alone isn’t a definitive indicator.
• Consider comparingcontact.createdAt
tocontact.updatedAt
to tell if the record was newly created.
• Alternatively, look for an explicit response field that denotes operation type or check existence before calling the API.Please verify the actual SmashSend API response structure or documentation to choose the correct detection approach.
components/smashsend/sources/contact-deleted/contact-deleted.mjs (1)
4-24
: LGTM: Consistent architecture pattern.The source component follows the established pattern for webhook-based event sources, with proper extension of the base class and appropriate configuration for contact deletion events.
components/smashsend/sources/contact-unsubscribed/contact-unsubscribed.mjs (1)
4-24
: LGTM: Consistent architecture pattern.The source component follows the established pattern for webhook-based event sources, with proper extension of the base class and appropriate configuration for contact unsubscription events.
components/smashsend/actions/search-contacts/search-contacts.mjs (2)
17-28
: LGTM: Proper error handling and API integration.The action implements good defensive programming with optional chaining and properly integrates with the SmashSend API client.
24-26
: Only export summary when contact is found.The current logic checks if a contact exists but exports a summary regardless. Consider only exporting the summary when a contact is actually found to provide more accurate feedback.
if (contact?.id) { $.export("$summary", `Successfully fetched contact ${contact.id}`); + } else { + $.export("$summary", "No contact found with the provided email address"); }⛔ Skipped due to learnings
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/smashsend/sources/contact-updated/contact-updated.mjs (1)
4-24
: LGTM: Consistent architecture pattern.The source component follows the established pattern for webhook-based event sources, with proper extension of the base class and appropriate configuration for contact update events.
components/smashsend/sources/new-contact-created/new-contact-created.mjs (1)
4-24
: LGTM: Consistent architecture pattern and proper naming.The source component follows the established pattern for webhook-based event sources, with proper extension of the base class and appropriate configuration for contact creation events. The "New" prefix is correctly applied for new items.
components/smashsend/sources/contact-unsubscribed/contact-unsubscribed.mjs
Show resolved
Hide resolved
components/smashsend/sources/new-contact-created/new-contact-created.mjs
Show resolved
Hide resolved
components/smashsend/sources/contact-resubscribed/contact-resubscribed.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.
Hi @michelle0927, LGTM! Ready for QA!
/approve |
Resolves #17256
Summary by CodeRabbit
New Features
Chores