Skip to content

[Components] hunter - new components #17083

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 1 commit into from
Jun 16, 2025
Merged

[Components] hunter - new components #17083

merged 1 commit into from
Jun 16, 2025

Conversation

jcortes
Copy link
Collaborator

@jcortes jcortes commented Jun 11, 2025

WHY

Resolves #16969

Summary by CodeRabbit

  • New Features
    • Added actions for creating, updating, retrieving, and deleting leads.
    • Introduced actions to list leads and leads lists, and to get detailed leads list information.
    • Expanded Hunter integration with advanced filtering and pagination for leads management.
  • Improvements
    • Enhanced API interface with extensive property definitions and reusable methods.
    • Improved input validation and error handling across all actions.
  • Chores
    • Updated integration version to 0.7.0 and upgraded dependencies for improved stability.

@jcortes jcortes self-assigned this Jun 11, 2025
Copy link
Contributor

coderabbitai bot commented Jun 11, 2025

Walkthrough

A comprehensive Hunter integration is introduced, adding a new app module with multiple API wrapper methods and property definitions. Several new action modules are implemented for account information, combined enrichment, domain search, email count, email finder, email verifier, and lead management (create, update, delete, get, list). The package version and platform dependency are also updated.

Changes

File(s) Change Summary
components/hunter/hunter.app.mjs Added prop definitions and API wrapper methods for Hunter endpoints; removed authKeys method.
components/hunter/actions/account-information/account-information.mjs New action: retrieves Hunter account information.
components/hunter/actions/combined-enrichment/combined-enrichment.mjs New action: retrieves all info associated with an email and its domain.
components/hunter/actions/domain-search/domain-search.mjs New action: searches for email addresses by domain or company, with filters and validation.
components/hunter/actions/email-count/email-count.mjs New action: retrieves the number of email addresses for a domain or company, with input validation.
components/hunter/actions/email-finder/email-finder.mjs New action: finds the most likely email address for a domain/company and person’s name, with input validation.
components/hunter/actions/email-verifier/email-verifier.mjs New action: verifies deliverability and existence of an email address.
components/hunter/actions/create-lead/create-lead.mjs New action: creates a new lead with extensive lead details.
components/hunter/actions/delete-lead/delete-lead.mjs New action: deletes an existing lead by ID.
components/hunter/actions/get-lead/get-lead.mjs New action: retrieves a lead by ID.
components/hunter/actions/get-leads-list/get-leads-list.mjs New action: retrieves a leads list and its leads by ID with limit.
components/hunter/actions/list-leads-lists/list-leads-lists.mjs New action: lists leads lists with limit and sorting.
components/hunter/actions/list-leads/list-leads.mjs New action: lists leads with extensive filtering and pagination.
components/hunter/actions/update-lead/update-lead.mjs New action: updates an existing lead by ID with optional fields.
components/hunter/package.json Updated package version to 0.7.0 and upgraded @pipedream/platform dependency to ^3.0.3.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Action
    participant HunterApp
    participant HunterAPI

    User->>Action: Trigger action (e.g., Email Finder)
    Action->>HunterApp: Call corresponding method (e.g., emailFinder)
    HunterApp->>HunterAPI: Make HTTP request to Hunter endpoint
    HunterAPI-->>HunterApp: Return API response
    HunterApp-->>Action: Return processed data
    Action-->>User: Output summary and data
Loading

Assessment against linked issues

Objective Addressed Explanation
verify-email-address: Verify deliverability and validity of a professional email address (required email prop) (#16969)
find-email-address: Find most likely professional email for domain and person’s name (domain, first, last required) (#16969) The action allows domain and company as optional; domain is not strictly required as specified.
search-domain: Search for all emails on a specified domain (domain required, optional dept and pagination) (#16969) The action allows domain or company, but the objective requires domain as required.

Assessment against linked issues: Out-of-scope changes

Code Change (file_path) Explanation
Addition of account information, combined enrichment, and email count actions (various action files) These features are not requested in the linked issue and go beyond the explicitly stated objectives.
Addition of company as an alternative to domain in domain search and email finder actions (action files) The linked issue specifies domain as required, not company; supporting company is out of scope.
Addition of Hunter app methods unrelated to required actions (hunter.app.mjs) Methods like combinedEnrichment and accountInformation are not mentioned in the objectives.
Addition of lead management actions (create, update, delete, get, list leads and leads lists) Lead management is not part of the objectives in the linked issue and is out of scope.

Poem

In burrows deep, the Hunter leaps,
With emails found and secrets it keeps.
Domains and names, it scours the night,
Verifies addresses with bunny delight.
A hop, a search, a clever find—
This code’s a carrot for the curious mind! 🥕

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/hunter/actions/domain-search/domain-search.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:201:49)

components/hunter/actions/delete-lead/delete-lead.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:201:49)

components/hunter/actions/combined-enrichment/combined-enrichment.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:201:49)

  • 11 others
✨ 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

vercel bot commented Jun 11, 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) Visit Preview Jun 13, 2025 0:22am
pipedream-docs ⬜️ Ignored (Inspect) Jun 13, 2025 0:22am
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Jun 13, 2025 0:22am

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

🧹 Nitpick comments (6)
components/hunter/package.json (1)

3-3: Confirm version bump is accompanied by CHANGELOG / release notes
Jumping from 0.6.00.7.0 is a “minor” release per semver. Please ensure the PR (or a follow-up) includes release notes summarising user-visible changes so consumers understand the impact.

components/hunter/actions/account-information/account-information.mjs (1)

12-18: Return a richer summary for better UX
Instead of a generic summary, exporting a key data point (e.g. account email or plan) makes the step output self-describing in the PD UI.

-$.export("$summary", "Successfully retrieved account information");
+$.export(
+  "$summary",
+  `Fetched account information for ${response?.data?.email || "your"} account`,
+);
components/hunter/actions/email-verifier/email-verifier.mjs (1)

24-33: Expose verification status in the step summary
Surfacing whether the email is valid, invalid, or risky at a glance improves workflow readability.

-$.export("$summary", "Successfully verified email address");
+$.export(
+  "$summary",
+  `Email "${email}" is ${response?.data?.result || "processed"}`,
+);
components/hunter/actions/email-count/email-count.mjs (1)

54-55: Improve summary with actual count
Returning the numeric count in the summary helps users verify results quickly.

-$.export("$summary", "Successfully retrieved email count");
+$.export("$summary", `Found ${response?.data?.total || 0} email(s)`);
components/hunter/actions/email-finder/email-finder.mjs (1)

62-63: Surface confidence score in summary
Users usually care about the score Hunter returns. Export it for quick inspection.

-$.export("$summary", "Successfully searched for email address");
+$.export(
+  "$summary",
+  `Best guess: ${response?.data?.email || "N/A"} (confidence ${response?.data?.score ?? "?"}%)`,
+);
components/hunter/hunter.app.mjs (1)

42-49: limit prop range is correct but not respected by callers

The default/min/max are sensible, yet the Domain-Search action overrides the value. After fixing that action, no change needed here.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between da4e8b8 and 9064111.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (8)
  • components/hunter/actions/account-information/account-information.mjs (1 hunks)
  • components/hunter/actions/combined-enrichment/combined-enrichment.mjs (1 hunks)
  • components/hunter/actions/domain-search/domain-search.mjs (1 hunks)
  • components/hunter/actions/email-count/email-count.mjs (1 hunks)
  • components/hunter/actions/email-finder/email-finder.mjs (1 hunks)
  • components/hunter/actions/email-verifier/email-verifier.mjs (1 hunks)
  • components/hunter/hunter.app.mjs (1 hunks)
  • components/hunter/package.json (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: pnpm publish
  • GitHub Check: Lint Code Base
🔇 Additional comments (5)
components/hunter/package.json (1)

16-16: Dependency range could unintentionally pull in breaking changes
Using a caret (^3.0.3) allows any 3.x.x of @pipedream/platform, including future versions with potential breaking changes. If the new actions rely on behaviour first introduced in 3.0.3, consider pinning to that exact patch or, at minimum, adding automated tests to catch regressions.

components/hunter/actions/domain-search/domain-search.mjs (1)

82-84: Good guard for mutually-exclusive inputs

Clear error messaging when neither domain nor company is supplied – nice.

components/hunter/actions/combined-enrichment/combined-enrichment.mjs (1)

24-33: Looks solid; nothing blocking

Input plumbing, API call, and summary export are concise and correct.

components/hunter/hunter.app.mjs (2)

55-60: API key conveyed via X-API-KEY header – verify Hunter supports this

Hunter’s docs specify the api_key query param. Header support is undocumented. If the header is rejected, every request will 401.

-        "X-API-KEY": this.$auth.api_key,
+        // fallback to query param if header not accepted

Confirm header behaviour, or move the key into params for safety.


88-93: Endpoint path for Combined Enrichment may be wrong

Docs use /combined (or /combined-enrichment) – here it’s /combined/find.

Please double-check the exact endpoint; a 404 will break the action.

@jcortes jcortes force-pushed the hunter-new-components branch from 9064111 to 8ae6313 Compare June 13, 2025 00:21
@jcortes jcortes force-pushed the hunter-new-components branch from 8ae6313 to 09e742e Compare June 13, 2025 00:21
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 (2)
components/hunter/actions/list-leads-lists/list-leads-lists.mjs (1)

11-17: limit description ≠ actual default

The shared limit propDefinition defaults to 100, but the description here claims a default of 20.
Either override the default field locally or update the sentence to avoid surprising users.

- description: "A limit on the number of lists to be returned. Limit can range between 1 and 100 lists. Default is 20.",
+ description: "A limit on the number of lists to be returned. Limit can range between 1 and 100 lists. Default is 100.",
components/hunter/actions/list-leads/list-leads.mjs (1)

217-242: Minor naming collision

const { app } = this; shadows the top-level import app. Although it works, renaming the destructured variable (hunterApp) avoids cognitive overhead when scanning the file.

Purely optional.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 9064111 and 09e742e.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (15)
  • components/hunter/actions/account-information/account-information.mjs (1 hunks)
  • components/hunter/actions/combined-enrichment/combined-enrichment.mjs (1 hunks)
  • components/hunter/actions/create-lead/create-lead.mjs (1 hunks)
  • components/hunter/actions/delete-lead/delete-lead.mjs (1 hunks)
  • components/hunter/actions/domain-search/domain-search.mjs (1 hunks)
  • components/hunter/actions/email-count/email-count.mjs (1 hunks)
  • components/hunter/actions/email-finder/email-finder.mjs (1 hunks)
  • components/hunter/actions/email-verifier/email-verifier.mjs (1 hunks)
  • components/hunter/actions/get-lead/get-lead.mjs (1 hunks)
  • components/hunter/actions/get-leads-list/get-leads-list.mjs (1 hunks)
  • components/hunter/actions/list-leads-lists/list-leads-lists.mjs (1 hunks)
  • components/hunter/actions/list-leads/list-leads.mjs (1 hunks)
  • components/hunter/actions/update-lead/update-lead.mjs (1 hunks)
  • components/hunter/hunter.app.mjs (1 hunks)
  • components/hunter/package.json (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (7)
  • components/hunter/actions/account-information/account-information.mjs
  • components/hunter/package.json
  • components/hunter/actions/email-count/email-count.mjs
  • components/hunter/actions/email-finder/email-finder.mjs
  • components/hunter/actions/email-verifier/email-verifier.mjs
  • components/hunter/actions/combined-enrichment/combined-enrichment.mjs
  • components/hunter/actions/domain-search/domain-search.mjs
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
🔇 Additional comments (5)
components/hunter/hunter.app.mjs (1)

171-178: Verify Hunter accepts the custom X-API-KEY header

Hunter’s REST docs historically expect the API key as a query-string api_key parameter.
Before merging, double-check that the API now officially supports the X-API-KEY HTTP header (case-insensitive but generally spelled X-Api-Key). If not, every request will be rejected with 401 – Invalid credentials.

Run a quick search for “X-API-KEY” in the official docs or try the email-verifier endpoint with cURL to confirm header support.

components/hunter/actions/get-lead/get-lead.mjs (1)

24-30: response.data.id may not exist – confirm JSON shape

Hunter’s /leads/{id} endpoint wraps the lead object inside data.
The safe path is response.data.id ?? response.data.data?.id. Otherwise the summary logs undefined.

- $.export("$summary", `Successfully retrieved lead with ID \`${response.data.id}\`.`);
+ const id = response.data?.id ?? response.data?.data?.id;
+ $.export("$summary", `Successfully retrieved lead with ID \`${id}\`.`);
components/hunter/actions/delete-lead/delete-lead.mjs (1)

24-32: LGTM – concise and correct

The delete action cleanly delegates to the app helper, exports a clear summary, and returns an explicit success flag.

components/hunter/actions/get-leads-list/get-leads-list.mjs (1)

1-24: Props section looks solid

Prop definitions are wired correctly and descriptions match Hunter’s API. Nice work keeping the default limit explanation consistent with Hunter’s docs.

components/hunter/actions/create-lead/create-lead.mjs (1)

50-78: 👍 Comprehensive industry list

The predefined companyIndustry options match Hunter’s docs and improve UX by preventing typos.

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.

LGTM!

@jcortes jcortes merged commit 19261df into master Jun 16, 2025
11 checks passed
@jcortes jcortes deleted the hunter-new-components branch June 16, 2025 15:25
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.

[Components] hunter
2 participants