-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[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
Conversation
WalkthroughA 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
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
Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
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/hunter/actions/domain-search/domain-search.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs components/hunter/actions/delete-lead/delete-lead.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs components/hunter/actions/combined-enrichment/combined-enrichment.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
✨ 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 (
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
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: 4
🧹 Nitpick comments (6)
components/hunter/package.json (1)
3-3: Confirmversionbump is accompanied by CHANGELOG / release notes
Jumping from0.6.0→0.7.0is 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 isvalid,invalid, orriskyat 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 thescoreHunter 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:limitprop range is correct but not respected by callersThe 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
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis 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 any3.x.xof@pipedream/platform, including future versions with potential breaking changes. If the new actions rely on behaviour first introduced in3.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 inputsClear error messaging when neither
domainnorcompanyis supplied – nice.components/hunter/actions/combined-enrichment/combined-enrichment.mjs (1)
24-33: Looks solid; nothing blockingInput plumbing, API call, and summary export are concise and correct.
components/hunter/hunter.app.mjs (2)
55-60: API key conveyed viaX-API-KEYheader – verify Hunter supports thisHunter’s docs specify the
api_keyquery 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 acceptedConfirm header behaviour, or move the key into
paramsfor safety.
88-93: Endpoint path for Combined Enrichment may be wrongDocs use
/combined(or/combined-enrichment) – here it’s/combined/find.Please double-check the exact endpoint; a 404 will break the action.
9064111 to
8ae6313
Compare
8ae6313 to
09e742e
Compare
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 (2)
components/hunter/actions/list-leads-lists/list-leads-lists.mjs (1)
11-17:limitdescription ≠ actual defaultThe shared
limitpropDefinition defaults to 100, but the description here claims a default of 20.
Either override thedefaultfield 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-levelimport 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
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis 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 customX-API-KEYheaderHunter’s REST docs historically expect the API key as a query-string
api_keyparameter.
Before merging, double-check that the API now officially supports theX-API-KEYHTTP header (case-insensitive but generally spelledX-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.idmay not exist – confirm JSON shapeHunter’s
/leads/{id}endpoint wraps the lead object insidedata.
The safe path isresponse.data.id ?? response.data.data?.id. Otherwise the summary logsundefined.- $.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 correctThe 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 solidProp definitions are wired correctly and descriptions match Hunter’s API. Nice work keeping the default
limitexplanation consistent with Hunter’s docs.components/hunter/actions/create-lead/create-lead.mjs (1)
50-78: 👍 Comprehensive industry listThe predefined
companyIndustryoptions match Hunter’s docs and improve UX by preventing typos.
michelle0927
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
WHY
Resolves #16969
Summary by CodeRabbit