Skip to content
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 - clickfunnels #12577

Merged
merged 6 commits into from
Jun 27, 2024
Merged

New Components - clickfunnels #12577

merged 6 commits into from
Jun 27, 2024

Conversation

luancazarine
Copy link
Collaborator

@luancazarine luancazarine commented Jun 26, 2024

Resolves #12570.

Summary by CodeRabbit

  • New Features

    • Added "Apply Tag to Contact" action for ClickFunnels integration.
    • Introduced the ability to remove a specified tag from a contact in ClickFunnels.
    • Added a feature to update or create a contact in ClickFunnels based on email.
    • New event sources for ClickFunnels:
      • Emit event when a new contact is identified.
      • Emit event when a one-time order is paid.
      • Emit event when a subscription invoice is paid.
  • Enhancements

    • Improved methods for interacting with ClickFunnels contacts, tags, teams, and workspaces.
    • Updated various prop definitions for better integration with ClickFunnels.
  • Dependency Updates

    • Updated version to "0.1.0" and added dependency on @pipedream/platform version "^3.0.0".

Copy link

vercel bot commented Jun 26, 2024

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

3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Jun 27, 2024 1:29pm
pipedream-docs ⬜️ Ignored (Inspect) Jun 27, 2024 1:29pm
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Jun 27, 2024 1:29pm

@luancazarine luancazarine added the ai-assisted Content generated by AI, with human refinement and modification label Jun 26, 2024
Copy link
Contributor

coderabbitai bot commented Jun 26, 2024

Walkthrough

This release introduces multiple new actions and sources for the ClickFunnels integration. Key features include applying or removing tags from contacts, updating or creating contacts based on email, and emitting events for new contact identifications, one-time order payments, and subscription fee payments. Additionally, there's an overhaul of prop definitions and methods for streamlined API interactions.

Changes

Files/Groups Change Summary
components/clickfunnels/actions/apply-tag-contact/apply-tag-contact.mjs Added an action to apply tags to ClickFunnels contacts.
components/clickfunnels/actions/remove-tag-contact/remove-tag-contact.mjs Introduced an action to remove tags from ClickFunnels contacts.
components/clickfunnels/actions/update-create-contact/update-create-contact.mjs Added an action to search, update, or create contacts by email in ClickFunnels.
components/clickfunnels/clickfunnels.app.mjs Included new prop definitions and methods for contact, tag, team, and workspace management in ClickFunnels.
components/clickfunnels/common/utils.mjs Introduced utility functions for object manipulation (clearObj, parseObject).
components/clickfunnels/package.json Updated version and added dependency on @pipedream/platform.
.../sources/common/base.mjs Added webhook handling props, methods, hooks, and run function for ClickFunnels.
.../sources/new-contact-identified-instant/new-contact-identified-instant.mjs` Added a source to emit events when a new or anonymous contact is identified.
.../sources/new-one-time-order-paid-instant/new-one-time-order-paid-instant.mjs` Introduced a source to emit events when a one-time order is paid.
.../sources/new-subscription-invoice-paid-instant/new-subscription-invoice-paid-instant.mjs` Added a source to emit events when a subscription invoice is paid.

Assessment against linked issues

Objective (Issue #12570) Addressed Explanation
Emit an event when a new contact is identified. (new-contact-identified-instant)
Emit an event when a one-time order is paid. (new-one-time-order-paid-instant)
Emit an event when a subscription invoice is paid. (new-subscription-invoice-paid-instant)
Apply a tag to a contact using specified contact and tag IDs. (apply-tag-contact)
Remove a specific tag from a contact using specified contact and tag IDs. (remove-tag-contact)
Search, update, or create a contact using an email. (update-create-contact)

Poem

In ClickFunnels' realm so wide,
Tags on contacts set with pride. 💠
Orders paid, invoices too,
Webhooks bringing change anew.
Contacts found or made so grand,
ClickFunnels' changes, finely planned. 🚀💻✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

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>.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @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.

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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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.

Sources
 - New Contact Identified (Instant)
 - New One Time Order Paid (Instant)
 - New Subscription Invoice Paid (Instant)

Actions
 - Apply Tag Contact
 - Remove Tag Contact
 - Update Create Contact
@luancazarine luancazarine marked this pull request as ready for review June 26, 2024 21:23
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: 9

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 41ffe0b and 0c50f3f.

Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing (13)
  • components/clickfunnels/actions/apply-tag-contact/apply-tag-contact.mjs (1 hunks)
  • components/clickfunnels/actions/remove-tag-contact/remove-tag-contact.mjs (1 hunks)
  • components/clickfunnels/actions/update-create-contact/update-create-contact.mjs (1 hunks)
  • components/clickfunnels/clickfunnels.app.mjs (1 hunks)
  • components/clickfunnels/common/utils.mjs (1 hunks)
  • components/clickfunnels/package.json (2 hunks)
  • components/clickfunnels/sources/common/base.mjs (1 hunks)
  • components/clickfunnels/sources/new-contact-identified-instant/new-contact-identified-instant.mjs (1 hunks)
  • components/clickfunnels/sources/new-contact-identified-instant/test-event.mjs (1 hunks)
  • components/clickfunnels/sources/new-one-time-order-paid-instant/new-one-time-order-paid-instant.mjs (1 hunks)
  • components/clickfunnels/sources/new-one-time-order-paid-instant/test-event.mjs (1 hunks)
  • components/clickfunnels/sources/new-subscription-invoice-paid-instant/new-subscription-invoice-paid-instant.mjs (1 hunks)
  • components/clickfunnels/sources/new-subscription-invoice-paid-instant/test-event.mjs (1 hunks)
Files skipped from review due to trivial changes (3)
  • components/clickfunnels/sources/new-contact-identified-instant/test-event.mjs
  • components/clickfunnels/sources/new-one-time-order-paid-instant/test-event.mjs
  • components/clickfunnels/sources/new-subscription-invoice-paid-instant/test-event.mjs
Additional context used
Biome
components/clickfunnels/common/utils.mjs

[error] 11-11: Avoid the use of spread (...) syntax on accumulators. (lint/performance/noAccumulatingSpread)

Spread syntax should be avoided on accumulators (like those in .reduce) because it causes a time complexity of O(n^2).
Consider methods such as .splice or .push instead.

Additional comments not posted (7)
components/clickfunnels/package.json (2)

3-3: Version update to 0.1.0

The version update from "0.0.1" to "0.1.0" typically indicates significant feature additions or improvements. Ensure that all relevant documentation and user-facing materials reflect this version change.


16-16: Addition of @pipedream/platform dependency

The addition of @pipedream/platform as a dependency is appropriate given the integration with Pipedream's functionalities. Ensure that this version is compatible with other dependencies and the environment where this package will be deployed.

components/clickfunnels/sources/new-one-time-order-paid-instant/new-one-time-order-paid-instant.mjs (1)

4-24: New Source Module: One-Time Order Paid (Instant)

This module is well-structured, extending the common base configurations and methods. The getEventTypes and getSummary methods are appropriately implemented for the specific event type. Ensure that the sample emit test aligns with the expected data structure of the event.

components/clickfunnels/sources/new-subscription-invoice-paid-instant/new-subscription-invoice-paid-instant.mjs (1)

4-24: New Source Module: Subscription Invoice Paid

Like the previous module, this one is well-structured and extends the common base configurations. The specific methods for event types and summaries are correctly implemented for subscription invoice payments. Continue to ensure alignment with the expected data structures and the robustness of the sample emit tests.

components/clickfunnels/sources/new-contact-identified-instant/new-contact-identified-instant.mjs (1)

4-24: New Source Module: New Contact Identified (Instant)

This module extends the common base and is specifically tailored for the event of identifying new or previously anonymous contacts. The methods getEventTypes and getSummary are well-implemented, providing clear and concise summaries based on the event data. Ensure that the sample emit functionality accurately reflects real-world scenarios.

components/clickfunnels/common/utils.mjs (1)

18-41: Review the parseObject function

The parseObject function is well-designed to handle different data types and parse JSON strings safely. However, ensure thorough testing, especially with edge cases and malformed JSON strings, to prevent runtime errors.

components/clickfunnels/actions/apply-tag-contact/apply-tag-contact.mjs (1)

1-1: Use relative imports for consistency.

Consider using relative imports instead of absolute to ensure the module resolution behaves as expected across different environments.

- import clickfunnels from "../../clickfunnels.app.mjs";
+ import clickfunnels from "../clickfunnels.app.mjs";

Likely invalid or redundant comment.

Copy link
Collaborator

@michelle0927 michelle0927 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one minor comment. Ready for QA!

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: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 0c50f3f and 9f5b770.

Files selected for processing (1)
  • components/clickfunnels/sources/new-subscription-invoice-paid-instant/new-subscription-invoice-paid-instant.mjs (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • components/clickfunnels/sources/new-subscription-invoice-paid-instant/new-subscription-invoice-paid-instant.mjs

…instant/new-subscription-invoice-paid-instant.mjs

Co-authored-by: michelle0927 <michelle0927@users.noreply.github.com>
@luancazarine
Copy link
Collaborator Author

/approve

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: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 9f5b770 and c87128c.

Files selected for processing (1)
  • components/clickfunnels/sources/new-subscription-invoice-paid-instant/new-subscription-invoice-paid-instant.mjs (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • components/clickfunnels/sources/new-subscription-invoice-paid-instant/new-subscription-invoice-paid-instant.mjs

@luancazarine luancazarine merged commit 63e4036 into master Jun 27, 2024
11 checks passed
@luancazarine luancazarine deleted the issue-12570 branch June 27, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai-assisted Content generated by AI, with human refinement and modification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Components] clickfunnels
3 participants