Skip to content

Commit 5450b43

Browse files
authored
Merging pull request #17617
* new components * pnpm-lock.yaml
1 parent ad84ab1 commit 5450b43

File tree

15 files changed

+762
-8
lines changed

15 files changed

+762
-8
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import explorium from "../../explorium.app.mjs";
2+
import constants from "../../common/constants.mjs";
3+
4+
export default {
5+
key: "explorium-enrich-business",
6+
name: "Enrich Business",
7+
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)",
8+
version: "0.0.1",
9+
type: "action",
10+
props: {
11+
explorium,
12+
type: {
13+
type: "string",
14+
label: "Enrichment Type",
15+
description: "The type of enrichment to perform",
16+
options: constants.BUSINESS_ENRICHMENT_TYPES,
17+
},
18+
businessId: {
19+
type: "string",
20+
label: "Business ID",
21+
description: "The ID of the business to enrich",
22+
},
23+
},
24+
async run({ $ }) {
25+
const { data } = await this.explorium.enrichBusiness({
26+
$,
27+
type: this.type,
28+
data: {
29+
business_id: this.businessId,
30+
},
31+
});
32+
$.export("$summary", `Enriched business ${this.businessId} with ${this.type}`);
33+
return data;
34+
},
35+
};
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import explorium from "../../explorium.app.mjs";
2+
import constants from "../../common/constants.mjs";
3+
4+
export default {
5+
key: "explorium-enrich-prospect",
6+
name: "Enrich Prospect",
7+
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)",
8+
version: "0.0.1",
9+
type: "action",
10+
props: {
11+
explorium,
12+
type: {
13+
type: "string",
14+
label: "Enrichment Type",
15+
description: "The type of enrichment to perform",
16+
options: constants.PROSPECT_ENRICHMENT_TYPES,
17+
},
18+
prospectId: {
19+
type: "string",
20+
label: "Prospect ID",
21+
description: "The ID of the prospect to enrich",
22+
},
23+
},
24+
async run({ $ }) {
25+
const { data } = await this.explorium.enrichProspect({
26+
$,
27+
type: this.type,
28+
data: {
29+
prospect_id: this.prospectId,
30+
},
31+
});
32+
$.export("$summary", `Enriched prospect ${this.prospectId} with ${this.type}`);
33+
return data;
34+
},
35+
};
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
import explorium from "../../explorium.app.mjs";
2+
3+
export default {
4+
key: "explorium-fetch-businesses",
5+
name: "Fetch Businesses",
6+
description: "Fetches business records using filters. [See the documentation](https://developers.explorium.ai/reference/list_businesses)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
explorium,
11+
name: {
12+
propDefinition: [
13+
explorium,
14+
"name",
15+
],
16+
},
17+
country: {
18+
propDefinition: [
19+
explorium,
20+
"country",
21+
],
22+
},
23+
size: {
24+
propDefinition: [
25+
explorium,
26+
"size",
27+
],
28+
},
29+
revenue: {
30+
propDefinition: [
31+
explorium,
32+
"revenue",
33+
],
34+
},
35+
websiteKeywords: {
36+
type: "string[]",
37+
label: "Website Keywords",
38+
description: "Filter by website keywords",
39+
optional: true,
40+
},
41+
},
42+
async run({ $ }) {
43+
const { data } = await this.explorium.fetchBusinesses({
44+
$,
45+
data: {
46+
mode: "full",
47+
size: 100,
48+
page_size: 100,
49+
filters: {
50+
company_name: this.name
51+
? {
52+
values: [
53+
this.name,
54+
],
55+
}
56+
: undefined,
57+
country_code: this.country
58+
? {
59+
values: [
60+
this.country,
61+
],
62+
}
63+
: undefined,
64+
company_size: this.size
65+
? {
66+
values: this.size,
67+
}
68+
: undefined,
69+
company_revenue: this.revenue
70+
? {
71+
values: this.revenue,
72+
}
73+
: undefined,
74+
website_keywords: this.websiteKeywords
75+
? {
76+
values: this.websiteKeywords,
77+
}
78+
: undefined,
79+
},
80+
},
81+
});
82+
$.export("$summary", `Fetched ${data.length} businesses`);
83+
return data;
84+
},
85+
};
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
import explorium from "../../explorium.app.mjs";
2+
import constants from "../../common/constants.mjs";
3+
4+
export default {
5+
key: "explorium-fetch-prospects",
6+
name: "Fetch Prospects",
7+
description: "Fetches prospect records using filters. [See the documentation](https://developers.explorium.ai/reference/fetch_prospects)",
8+
version: "0.0.1",
9+
type: "action",
10+
props: {
11+
explorium,
12+
name: {
13+
propDefinition: [
14+
explorium,
15+
"name",
16+
],
17+
},
18+
country: {
19+
propDefinition: [
20+
explorium,
21+
"country",
22+
],
23+
},
24+
size: {
25+
propDefinition: [
26+
explorium,
27+
"size",
28+
],
29+
},
30+
revenue: {
31+
propDefinition: [
32+
explorium,
33+
"revenue",
34+
],
35+
},
36+
jobLevel: {
37+
type: "string[]",
38+
label: "Job Level",
39+
description: "Filter by job level",
40+
options: constants.PROSPECT_JOB_LEVELS,
41+
optional: true,
42+
},
43+
jobDepartment: {
44+
type: "string[]",
45+
label: "Job Department",
46+
description: "Filter by job department",
47+
options: constants.PROSPECT_JOB_DEPARTMENTS,
48+
optional: true,
49+
},
50+
},
51+
async run({ $ }) {
52+
const { data } = await this.explorium.fetchProspects({
53+
$,
54+
data: {
55+
mode: "full",
56+
size: 100,
57+
page_size: 100,
58+
filters: {
59+
company_name: this.name
60+
? {
61+
values: [
62+
this.name,
63+
],
64+
}
65+
: undefined,
66+
country_code: this.country
67+
? {
68+
values: [
69+
this.country,
70+
],
71+
}
72+
: undefined,
73+
company_size: this.size
74+
? {
75+
values: this.size,
76+
}
77+
: undefined,
78+
company_revenue: this.revenue
79+
? {
80+
values: this.revenue,
81+
}
82+
: undefined,
83+
job_level: this.jobLevel
84+
? {
85+
values: this.jobLevel,
86+
}
87+
: undefined,
88+
job_department: this.jobDepartment
89+
? {
90+
values: this.jobDepartment,
91+
}
92+
: undefined,
93+
},
94+
},
95+
});
96+
$.export("$summary", `Fetched ${data.length} prospects`);
97+
return data;
98+
},
99+
};
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import explorium from "../../explorium.app.mjs";
2+
3+
export default {
4+
key: "explorium-match-business-id",
5+
name: "Match Business ID",
6+
description: "Match a businesse to its unique identifier using business name and domain. [See the documentation](https://developers.explorium.ai/reference/match_businesses)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
explorium,
11+
name: {
12+
type: "string",
13+
label: "Business Name",
14+
description: "The name of the business to match",
15+
},
16+
domain: {
17+
type: "string",
18+
label: "Domain",
19+
description: "The domain of the business to match",
20+
},
21+
},
22+
async run({ $ }) {
23+
const response = await this.explorium.matchBusinessId({
24+
$,
25+
data: {
26+
businesses_to_match: [
27+
{
28+
name: this.name,
29+
domain: this.domain,
30+
},
31+
],
32+
},
33+
});
34+
$.export("$summary", `Matched business ID for ${this.name} (${this.domain})`);
35+
return response;
36+
},
37+
};
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import explorium from "../../explorium.app.mjs";
2+
3+
export default {
4+
key: "explorium-match-prospect-id",
5+
name: "Match Prospect ID",
6+
description: "Match individual prospects to unique identifiers using email addresses. [See the documentation](https://developers.explorium.ai/reference/match_prospects-1)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
explorium,
11+
email: {
12+
type: "string",
13+
label: "Email",
14+
description: "The email address of the prospect to match",
15+
},
16+
},
17+
async run({ $ }) {
18+
const response = await this.explorium.matchProspectId({
19+
$,
20+
data: {
21+
prospects_to_match: [
22+
{
23+
email: this.email,
24+
},
25+
],
26+
},
27+
});
28+
$.export("$summary", `Matched prospect ID for ${this.email}`);
29+
return response;
30+
},
31+
};

0 commit comments

Comments
 (0)