-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New Components - explorium #17617
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
New Components - explorium #17617
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
35 changes: 35 additions & 0 deletions
35
components/explorium/actions/enrich-business/enrich-business.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,35 @@ | ||
| import explorium from "../../explorium.app.mjs"; | ||
| import constants from "../../common/constants.mjs"; | ||
|
|
||
| export default { | ||
| key: "explorium-enrich-business", | ||
| name: "Enrich Business", | ||
| description: "Enrich business data with comprehensive insights for lead generation, risk assessment, and business intelligence. [See the documentation](https://developers.explorium.ai/reference/businesses_enrichments)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| explorium, | ||
| type: { | ||
| type: "string", | ||
| label: "Enrichment Type", | ||
| description: "The type of enrichment to perform", | ||
| options: constants.BUSINESS_ENRICHMENT_TYPES, | ||
| }, | ||
| businessId: { | ||
| type: "string", | ||
| label: "Business ID", | ||
| description: "The ID of the business to enrich", | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const { data } = await this.explorium.enrichBusiness({ | ||
| $, | ||
| type: this.type, | ||
| data: { | ||
| business_id: this.businessId, | ||
| }, | ||
| }); | ||
| $.export("$summary", `Enriched business ${this.businessId} with ${this.type}`); | ||
| return data; | ||
| }, | ||
| }; |
35 changes: 35 additions & 0 deletions
35
components/explorium/actions/enrich-prospect/enrich-prospect.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,35 @@ | ||
| import explorium from "../../explorium.app.mjs"; | ||
| import constants from "../../common/constants.mjs"; | ||
|
|
||
| export default { | ||
| key: "explorium-enrich-prospect", | ||
| name: "Enrich Prospect", | ||
| description: "Enrich prospect records with comprehensive professional and contact information to enhance outreach and engagement strategies. [See the documentation](https://developers.explorium.ai/reference/prospects_enrichments)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| explorium, | ||
| type: { | ||
| type: "string", | ||
| label: "Enrichment Type", | ||
| description: "The type of enrichment to perform", | ||
| options: constants.PROSPECT_ENRICHMENT_TYPES, | ||
| }, | ||
| prospectId: { | ||
| type: "string", | ||
| label: "Prospect ID", | ||
| description: "The ID of the prospect to enrich", | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const { data } = await this.explorium.enrichProspect({ | ||
| $, | ||
| type: this.type, | ||
| data: { | ||
| prospect_id: this.prospectId, | ||
| }, | ||
| }); | ||
| $.export("$summary", `Enriched prospect ${this.prospectId} with ${this.type}`); | ||
| return data; | ||
| }, | ||
| }; |
85 changes: 85 additions & 0 deletions
85
components/explorium/actions/fetch-businesses/fetch-businesses.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,85 @@ | ||
| import explorium from "../../explorium.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "explorium-fetch-businesses", | ||
| name: "Fetch Businesses", | ||
| description: "Fetches business records using filters. [See the documentation](https://developers.explorium.ai/reference/list_businesses)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| explorium, | ||
| name: { | ||
| propDefinition: [ | ||
| explorium, | ||
| "name", | ||
| ], | ||
| }, | ||
| country: { | ||
| propDefinition: [ | ||
| explorium, | ||
| "country", | ||
| ], | ||
| }, | ||
| size: { | ||
| propDefinition: [ | ||
| explorium, | ||
| "size", | ||
| ], | ||
| }, | ||
| revenue: { | ||
| propDefinition: [ | ||
| explorium, | ||
| "revenue", | ||
| ], | ||
| }, | ||
| websiteKeywords: { | ||
| type: "string[]", | ||
| label: "Website Keywords", | ||
| description: "Filter by website keywords", | ||
| optional: true, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const { data } = await this.explorium.fetchBusinesses({ | ||
| $, | ||
| data: { | ||
| mode: "full", | ||
| size: 100, | ||
| page_size: 100, | ||
| filters: { | ||
| company_name: this.name | ||
| ? { | ||
| values: [ | ||
| this.name, | ||
| ], | ||
| } | ||
| : undefined, | ||
| country_code: this.country | ||
| ? { | ||
| values: [ | ||
| this.country, | ||
| ], | ||
| } | ||
| : undefined, | ||
| company_size: this.size | ||
| ? { | ||
| values: this.size, | ||
| } | ||
| : undefined, | ||
| company_revenue: this.revenue | ||
| ? { | ||
| values: this.revenue, | ||
| } | ||
| : undefined, | ||
| website_keywords: this.websiteKeywords | ||
| ? { | ||
| values: this.websiteKeywords, | ||
| } | ||
| : undefined, | ||
| }, | ||
| }, | ||
| }); | ||
| $.export("$summary", `Fetched ${data.length} businesses`); | ||
| return data; | ||
| }, | ||
| }; | ||
99 changes: 99 additions & 0 deletions
99
components/explorium/actions/fetch-prospects/fetch-prospects.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,99 @@ | ||
| import explorium from "../../explorium.app.mjs"; | ||
| import constants from "../../common/constants.mjs"; | ||
|
|
||
| export default { | ||
| key: "explorium-fetch-prospects", | ||
| name: "Fetch Prospects", | ||
| description: "Fetches prospect records using filters. [See the documentation](https://developers.explorium.ai/reference/fetch_prospects)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| explorium, | ||
| name: { | ||
| propDefinition: [ | ||
| explorium, | ||
| "name", | ||
| ], | ||
| }, | ||
| country: { | ||
| propDefinition: [ | ||
| explorium, | ||
| "country", | ||
| ], | ||
| }, | ||
| size: { | ||
| propDefinition: [ | ||
| explorium, | ||
| "size", | ||
| ], | ||
| }, | ||
| revenue: { | ||
| propDefinition: [ | ||
| explorium, | ||
| "revenue", | ||
| ], | ||
| }, | ||
| jobLevel: { | ||
| type: "string[]", | ||
| label: "Job Level", | ||
| description: "Filter by job level", | ||
| options: constants.PROSPECT_JOB_LEVELS, | ||
| optional: true, | ||
| }, | ||
| jobDepartment: { | ||
| type: "string[]", | ||
| label: "Job Department", | ||
| description: "Filter by job department", | ||
| options: constants.PROSPECT_JOB_DEPARTMENTS, | ||
| optional: true, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const { data } = await this.explorium.fetchProspects({ | ||
| $, | ||
| data: { | ||
| mode: "full", | ||
| size: 100, | ||
| page_size: 100, | ||
| filters: { | ||
| company_name: this.name | ||
| ? { | ||
| values: [ | ||
| this.name, | ||
| ], | ||
| } | ||
| : undefined, | ||
| country_code: this.country | ||
| ? { | ||
| values: [ | ||
| this.country, | ||
| ], | ||
| } | ||
| : undefined, | ||
| company_size: this.size | ||
| ? { | ||
| values: this.size, | ||
| } | ||
| : undefined, | ||
| company_revenue: this.revenue | ||
| ? { | ||
| values: this.revenue, | ||
| } | ||
| : undefined, | ||
| job_level: this.jobLevel | ||
| ? { | ||
| values: this.jobLevel, | ||
| } | ||
| : undefined, | ||
| job_department: this.jobDepartment | ||
| ? { | ||
| values: this.jobDepartment, | ||
| } | ||
| : undefined, | ||
| }, | ||
| }, | ||
| }); | ||
| $.export("$summary", `Fetched ${data.length} prospects`); | ||
| return data; | ||
| }, | ||
| }; |
37 changes: 37 additions & 0 deletions
37
components/explorium/actions/match-business-id/match-business-id.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,37 @@ | ||
| import explorium from "../../explorium.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "explorium-match-business-id", | ||
| name: "Match Business ID", | ||
| description: "Match a businesse to its unique identifier using business name and domain. [See the documentation](https://developers.explorium.ai/reference/match_businesses)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| explorium, | ||
| name: { | ||
| type: "string", | ||
| label: "Business Name", | ||
| description: "The name of the business to match", | ||
| }, | ||
| domain: { | ||
| type: "string", | ||
| label: "Domain", | ||
| description: "The domain of the business to match", | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.explorium.matchBusinessId({ | ||
| $, | ||
| data: { | ||
| businesses_to_match: [ | ||
| { | ||
| name: this.name, | ||
| domain: this.domain, | ||
| }, | ||
| ], | ||
| }, | ||
| }); | ||
| $.export("$summary", `Matched business ID for ${this.name} (${this.domain})`); | ||
| return response; | ||
| }, | ||
| }; |
31 changes: 31 additions & 0 deletions
31
components/explorium/actions/match-prospect-id/match-prospect-id.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,31 @@ | ||
| import explorium from "../../explorium.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "explorium-match-prospect-id", | ||
| name: "Match Prospect ID", | ||
| description: "Match individual prospects to unique identifiers using email addresses. [See the documentation](https://developers.explorium.ai/reference/match_prospects-1)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| explorium, | ||
| email: { | ||
| type: "string", | ||
| label: "Email", | ||
| description: "The email address of the prospect to match", | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.explorium.matchProspectId({ | ||
| $, | ||
| data: { | ||
| prospects_to_match: [ | ||
| { | ||
| email: this.email, | ||
| }, | ||
| ], | ||
| }, | ||
| }); | ||
| $.export("$summary", `Matched prospect ID for ${this.email}`); | ||
| return response; | ||
| }, | ||
| }; |
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.