-
Notifications
You must be signed in to change notification settings - Fork 5.5k
16975 components prospeo #17014
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
16975 components prospeo #17014
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| import { ConfigurationError } from "@pipedream/platform"; | ||
| import prospeo from "../../prospeo.app.mjs"; | ||
|
|
||
| export default { | ||
| name: "Extract Data", | ||
| version: "0.0.1", | ||
| key: "prospeo-extract-data", | ||
| description: "Extract data from any LinkedIn profile in real-time, as well as all the data from the company page, and also find a valid verified email from the lead. [See the documentation](https://prospeo.io/api/social-url-enrichment)", | ||
| type: "action", | ||
| props: { | ||
| prospeo, | ||
| linkedinUrl: { | ||
| type: "string", | ||
| label: "LinkedIn URL", | ||
| description: "The LinkedIn profile URL.This endpoint is only compatible with public LinkedIn URL, and will not work with special IDs starting in `ACw..`, or `ACo...`", | ||
| }, | ||
| profileOnly: { | ||
| type: "boolean", | ||
| label: "Profile Only", | ||
| description: "If true, only the profile data will be returned. If false, the company data will also be returned.", | ||
| optional: true, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| try { | ||
| const response = await this.prospeo.extractData({ | ||
| $, | ||
| data: { | ||
| url: this.linkedinUrl, | ||
| profile_only: this.profileOnly, | ||
| }, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully extracted data for **${this.linkedinUrl}**`); | ||
|
|
||
| return response; | ||
| } catch ({ response }) { | ||
| if (response.data.message === "NO_RESULT") { | ||
| $.export("$summary", `No data found for **${this.linkedinUrl}**`); | ||
| return {}; | ||
| } else { | ||
| throw new ConfigurationError(response.data.message); | ||
| } | ||
| } | ||
| }, | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| import { ConfigurationError } from "@pipedream/platform"; | ||
| import prospeo from "../../prospeo.app.mjs"; | ||
|
|
||
| export default { | ||
| name: "Find Email", | ||
| version: "0.0.1", | ||
| key: "prospeo-find-email", | ||
| description: "Find an email address. [See the documentation](https://prospeo.io/api/email-finder)", | ||
| type: "action", | ||
| props: { | ||
| prospeo, | ||
| fullName: { | ||
| type: "string", | ||
| label: "Full Name", | ||
| description: "The person's full name. Prospeo advises you to submit the first and last name for higher accuracy.", | ||
| }, | ||
| company: { | ||
| type: "string", | ||
| label: "Company Domain/Name", | ||
| description: "The company domain, website, or name. Using a domain or website is recommended for better accuracy. If submitting a company name, it needs to be between 3 to 75 characters.", | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| try { | ||
| const response = await this.prospeo.findEmail({ | ||
| $, | ||
| data: { | ||
| company: this.company, | ||
| full_name: this.fullName, | ||
| }, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully found email for **${this.fullName}** at **${this.company}**`); | ||
|
|
||
| return response; | ||
| } catch ({ response }) { | ||
| if (response.data.message === "NO_RESULT") { | ||
| $.export("$summary", `No results found for **${this.fullName}** at ${this.company}`); | ||
| return {}; | ||
| } else { | ||
| throw new ConfigurationError(response.data); | ||
| } | ||
| } | ||
| }, | ||
| }; | ||
39 changes: 39 additions & 0 deletions
39
components/prospeo/actions/find-mobile-number/find-mobile-number.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| import { ConfigurationError } from "@pipedream/platform"; | ||
| import prospeo from "../../prospeo.app.mjs"; | ||
|
|
||
| export default { | ||
| name: "Find Mobile Number", | ||
| version: "0.0.1", | ||
| key: "prospeo-find-mobile-number", | ||
| description: "Discover mobile numbers associated with a LinkedIn profile URL. [See the documentation](https://prospeo.io/api/mobile-finder)", | ||
| type: "action", | ||
| props: { | ||
| prospeo, | ||
| linkedinUrl: { | ||
| type: "string", | ||
| label: "LinkedIn URL", | ||
| description: "The LinkedIn profile URL.This endpoint is only compatible with public LinkedIn URL, and will not work with special IDs starting in `ACw..`, or `ACo...`", | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| try { | ||
| const response = await this.prospeo.findMobile({ | ||
| $, | ||
| data: { | ||
| url: this.linkedinUrl, | ||
| }, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully found mobile number for **${this.linkedinUrl}**`); | ||
|
|
||
| return response; | ||
| } catch ({ response }) { | ||
| if (response.data.message === "NO_RESULT") { | ||
| $.export("$summary", `No results found for **${this.linkedinUrl}**`); | ||
| return {}; | ||
| } else { | ||
| throw new ConfigurationError(response.data.message); | ||
| } | ||
| } | ||
luancazarine marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }, | ||
| }; | ||
61 changes: 61 additions & 0 deletions
61
components/prospeo/actions/search-domain/search-domain.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| import { ConfigurationError } from "@pipedream/platform"; | ||
| import { EMAIL_TYPE_OPTIONS } from "../../common/constants.mjs"; | ||
| import prospeo from "../../prospeo.app.mjs"; | ||
|
|
||
| export default { | ||
| name: "Search Domain", | ||
| version: "0.0.1", | ||
| key: "prospeo-search-domain", | ||
| description: "Discover email addresses associated with a domain name, website, or company name. [See the documentation](https://prospeo.io/api/domain-search)", | ||
| type: "action", | ||
| props: { | ||
| prospeo, | ||
| company: { | ||
| type: "string", | ||
| label: "Company Domain/Name", | ||
| description: "The company domain, website, or name. Using a domain or website is recommended for better accuracy. If submitting a company name, it needs to be between 3 to 75 characters.", | ||
| }, | ||
| limit: { | ||
| type: "integer", | ||
| label: "Limit", | ||
| description: "How many emails you need. The default value is `50`. You will be charged 1 credit every 50 emails. For example, 35 emails will be charged 1 credit while 65 emails will be charged 2 credits.", | ||
| optional: true, | ||
| }, | ||
| emailType: { | ||
| type: "string", | ||
| label: "Email Type", | ||
| description: "Indicates what type of email you want to get. `generic` refers to role-based emails such as `info@example.com`, while `professional` are emails of people working at the company.", | ||
| options: EMAIL_TYPE_OPTIONS, | ||
| optional: true, | ||
| }, | ||
| companyEnrichment: { | ||
| type: "boolean", | ||
| label: "Company Enrichment", | ||
| description: "Indicates if you want the company details in the response. It is `false` by default. Turning it to `true` might slow-down the response time as we gather the company details.", | ||
| }, | ||
| }, | ||
luancazarine marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| async run({ $ }) { | ||
| try { | ||
| const response = await this.prospeo.searchDomain({ | ||
| $, | ||
| data: { | ||
| company: this.company, | ||
| limit: this.limit, | ||
| email_type: this.emailType, | ||
| enrich_company: this.companyEnrichment, | ||
| }, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully searched domain: ${this.company}`); | ||
|
|
||
| return response; | ||
| } catch ({ response }) { | ||
| if (response.data.message === "NO_RESULT") { | ||
| $.export("$summary", `No results found for **${this.company}**`); | ||
| return {}; | ||
| } else { | ||
| throw new ConfigurationError(response.data.message); | ||
| } | ||
| } | ||
| }, | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| import { ConfigurationError } from "@pipedream/platform"; | ||
| import prospeo from "../../prospeo.app.mjs"; | ||
|
|
||
| export default { | ||
| name: "Verify Email", | ||
| version: "0.0.1", | ||
| key: "prospeo-verify-email", | ||
| description: "Verify the validity of an email address. [See the documentation](https://prospeo.io/api/email-verifier)", | ||
| type: "action", | ||
| props: { | ||
| prospeo, | ||
| email: { | ||
| type: "string", | ||
| label: "Email", | ||
| description: "The email address to verify", | ||
| optional: true, | ||
| }, | ||
| emailAnonId: { | ||
| type: "string", | ||
| label: "Email Anon ID", | ||
| description: "The ID of the email obtained from the `Search Domain` action.", | ||
| optional: true, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| if (!this.email && !this.emailAnonId) { | ||
| throw new ConfigurationError("Either email or emailAnonId is required"); | ||
| } | ||
| try { | ||
| const response = await this.prospeo.verifyEmail({ | ||
| $, | ||
| data: { | ||
| email: this.email, | ||
| email_anon_id: this.emailAnonId, | ||
| }, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully verified: ${this.email || this.emailAnonId}`); | ||
|
|
||
| return response; | ||
| } catch ({ response }) { | ||
| if (response.data.message === "NO_RESULT") { | ||
| $.export("$summary", `No results found for **${this.email || this.emailAnonId}**`); | ||
| return {}; | ||
| } else { | ||
| throw new ConfigurationError(response.data.message); | ||
| } | ||
luancazarine marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| }, | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| export const EMAIL_TYPE_OPTIONS = [ | ||
| { | ||
| label: "Generic", | ||
| value: "generic", | ||
| }, | ||
| { | ||
| label: "Professional", | ||
| value: "professional", | ||
| }, | ||
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,61 @@ | ||
| import { axios } from "@pipedream/platform"; | ||
|
|
||
| export default { | ||
| type: "app", | ||
| app: "prospeo", | ||
| propDefinitions: {}, | ||
| methods: { | ||
| // this.$auth contains connected account data | ||
| authKeys() { | ||
| console.log(Object.keys(this.$auth)); | ||
| _baseUrl() { | ||
| return "https://api.prospeo.io"; | ||
| }, | ||
| _headers() { | ||
| return { | ||
| "x-key": `${this.$auth.api_key}`, | ||
| "Content-Type": "application/json", | ||
| }; | ||
| }, | ||
| _makeRequest({ | ||
| $ = this, path, ...opts | ||
| }) { | ||
| return axios($, { | ||
| url: this._baseUrl() + path, | ||
| headers: this._headers(), | ||
| ...opts, | ||
| }); | ||
| }, | ||
| findEmail(args = {}) { | ||
| return this._makeRequest({ | ||
| method: "POST", | ||
| path: "/email-finder", | ||
| ...args, | ||
| }); | ||
| }, | ||
| findMobile(args = {}) { | ||
| return this._makeRequest({ | ||
| method: "POST", | ||
| path: "/mobile-finder", | ||
| ...args, | ||
| }); | ||
| }, | ||
| extractData(args = {}) { | ||
| return this._makeRequest({ | ||
| method: "POST", | ||
| path: "/social-url-enrichment", | ||
| ...args, | ||
| }); | ||
| }, | ||
| searchDomain(args = {}) { | ||
| return this._makeRequest({ | ||
| method: "POST", | ||
| path: "/domain-search", | ||
| ...args, | ||
| }); | ||
| }, | ||
| verifyEmail(args = {}) { | ||
| return this._makeRequest({ | ||
| method: "POST", | ||
| path: "/email-verifier", | ||
| ...args, | ||
| }); | ||
| }, | ||
| }, | ||
| }; | ||
| }; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.