Skip to content

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

Merged
merged 3 commits into from
Jul 9, 2025
Merged

New Components - smashsend #17511

merged 3 commits into from
Jul 9, 2025

Conversation

michelle0927
Copy link
Collaborator

@michelle0927 michelle0927 commented Jul 7, 2025

Resolves #17256

Summary by CodeRabbit

  • New Features

    • Added actions to create, update, delete, list, and search contacts in Smashsend.
    • Introduced instant event triggers for contact creation, update, deletion, resubscription, and unsubscription.
    • Included sample event data for all new event triggers.
    • Added utility for parsing objects and improved contact property handling.
    • Enhanced integration with paginated contact selection and webhook management.
  • Chores

    • Updated package version and dependencies.

Copy link

vercel bot commented Jul 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Ignored (Inspect) Jul 8, 2025 3:08pm
pipedream-docs ⬜️ Ignored (Inspect) Jul 8, 2025 3:08pm
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Jul 8, 2025 3:08pm

Copy link
Contributor

coderabbitai bot commented Jul 7, 2025

Walkthrough

This 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

File(s) Change Summary
components/smashsend/smashsend.app.mjs, components/smashsend/common/utils.mjs Core app logic and utility function for API calls, pagination, and parsing.
components/smashsend/actions/create-or-update-contact/create-or-update-contact.mjs Adds create-or-update contact action.
components/smashsend/actions/delete-contact/delete-contact.mjs Adds delete contact action.
components/smashsend/actions/list-contacts/list-contacts.mjs Adds list contacts action.
components/smashsend/actions/search-contacts/search-contacts.mjs Adds search contacts by email action.
components/smashsend/sources/common/base.mjs Adds base source for webhook event handling.
components/smashsend/sources/contact-deleted/contact-deleted.mjs,
components/smashsend/sources/contact-deleted/test-event.mjs
Adds source and test event for "Contact Deleted" event.
components/smashsend/sources/contact-resubscribed/contact-resubscribed.mjs,
components/smashsend/sources/contact-resubscribed/test-event.mjs
Adds source and test event for "Contact Resubscribed" event.
components/smashsend/sources/contact-unsubscribed/contact-unsubscribed.mjs,
components/smashsend/sources/contact-unsubscribed/test-event.mjs
Adds source and test event for "Contact Unsubscribed" event.
components/smashsend/sources/contact-updated/contact-updated.mjs,
components/smashsend/sources/contact-updated/test-event.mjs
Adds source and test event for "Contact Updated" event.
components/smashsend/sources/new-contact-created/new-contact-created.mjs,
components/smashsend/sources/new-contact-created/test-event.mjs
Adds source and test event for "New Contact Created" event.
components/smashsend/package.json Updates version and adds dependency on @pipedream/platform.

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
Loading
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
Loading

Assessment against linked issues

Objective Addressed Explanation
Implement SmashSend app core logic and authentication (#17256)
Add actions: create-contact, update-contact (create-or-update), delete-contact, list-contacts, search-contact (#17256)
Add sources for contact-created, contact-resubscribed, contact-updated, contact-deleted, contact-unsubscribed (#17256)
Use webhooks for real-time event sources, with sample/test events (#17256)

Suggested labels

ai-assisted

Poem

In the garden of code where contacts grow,
SmashSend’s magic now starts to flow!
Create, update, or search with glee,
Webhooks hopping in, as quick as can be.
Rabbits cheer, their paws tap-tap—
For every contact, there’s now an app!
🐇✨

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

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

components/smashsend/sources/common/base.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:801:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
at #link (node:internal/modules/esm/module_job:202:49)


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2d0a4d0 and f2cde08.

📒 Files selected for processing (1)
  • components/smashsend/sources/common/base.mjs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • components/smashsend/sources/common/base.mjs
⏰ 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: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
✨ Finishing Touches
  • 📝 Generate Docstrings

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 note

Everything parses correctly. If you want absolute consistency with the other samples, consider using null (instead of "") for firstName / lastName, but that’s purely cosmetic.

components/smashsend/package.json (1)

1-18: Consider adding missing metadata

A license (and optionally repository) 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 like Date, RegExp, or Function 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

📥 Commits

Reviewing files that changed from the base of the PR and between 4a4c5a2 and 2d0a4d0.

⛔ 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 good

Structure, 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: LGTM

Consistent with the event schema and other fixtures. No issues found.

components/smashsend/sources/contact-deleted/test-event.mjs (1)

1-26: Fixture approved

Well-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 logic

The action currently uses the presence of contact.updatedAt to decide whether a contact was “updated” versus “created.” Since it always calls createContact (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—only createContact—so updatedAt alone isn’t a definitive indicator.
• Consider comparing contact.createdAt to contact.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.

luancazarine
luancazarine previously approved these changes Jul 7, 2025
Copy link
Collaborator

@luancazarine luancazarine left a 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!

@michelle0927
Copy link
Collaborator Author

/approve

@michelle0927 michelle0927 merged commit 7dc03a2 into master Jul 9, 2025
11 checks passed
@michelle0927 michelle0927 deleted the issue-17256 branch July 9, 2025 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[APP] SmashSend
2 participants