Skip to content

Commit 2c90e06

Browse files
authored
[Components] ContactOut - new components (#17026)
1 parent 9824fda commit 2c90e06

File tree

13 files changed

+1179
-11
lines changed

13 files changed

+1179
-11
lines changed
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
import app from "../../contactout.app.mjs";
2+
3+
export default {
4+
key: "contactout-company-search",
5+
name: "Company Search",
6+
description: "Get company profiles matching the search criteria. [See the documentation](https://api.contactout.com/#company-search-api).",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
name: {
12+
type: "string[]",
13+
label: "Company Names",
14+
description: "Array of company names to search for (max 50)",
15+
optional: true,
16+
},
17+
domain: {
18+
type: "string[]",
19+
label: "Company Domains",
20+
description: "Array of company domains to search for (max 50)",
21+
optional: true,
22+
},
23+
size: {
24+
propDefinition: [
25+
app,
26+
"companySize",
27+
],
28+
description: "Company size by number of employees",
29+
},
30+
hqOnly: {
31+
type: "boolean",
32+
label: "Headquarters Only",
33+
description: "Filter search locations by headquarters only",
34+
optional: true,
35+
},
36+
location: {
37+
propDefinition: [
38+
app,
39+
"location",
40+
],
41+
description: "Array of locations to search for (max 50)",
42+
},
43+
industries: {
44+
propDefinition: [
45+
app,
46+
"industry",
47+
],
48+
description: "Array of industries to search for (max 50)",
49+
},
50+
minRevenue: {
51+
label: "Minimum Revenue",
52+
description: "Minimum revenue of the company",
53+
propDefinition: [
54+
app,
55+
"revenue",
56+
],
57+
},
58+
maxRevenue: {
59+
label: "Maximum Revenue",
60+
description: "Maximum revenue of the company",
61+
propDefinition: [
62+
app,
63+
"revenue",
64+
],
65+
},
66+
yearFoundedFrom: {
67+
type: "integer",
68+
label: "Year Founded From",
69+
description: "Minimum year founded of the company (min: `1985`)",
70+
optional: true,
71+
min: 1985,
72+
},
73+
yearFoundedTo: {
74+
type: "integer",
75+
label: "Year Founded To",
76+
description: "Maximum year founded of the company (requires Year Founded From)",
77+
optional: true,
78+
},
79+
},
80+
async run({ $ }) {
81+
const {
82+
name,
83+
domain,
84+
size,
85+
hqOnly,
86+
location,
87+
industries,
88+
minRevenue,
89+
maxRevenue,
90+
yearFoundedFrom,
91+
yearFoundedTo,
92+
} = this;
93+
94+
const response = await this.app.searchCompanies({
95+
$,
96+
data: {
97+
name,
98+
domain,
99+
size,
100+
hq_only: hqOnly,
101+
location,
102+
industries,
103+
min_revenue: minRevenue,
104+
max_revenue: maxRevenue,
105+
year_founded_from: yearFoundedFrom,
106+
year_founded_to: yearFoundedTo,
107+
},
108+
});
109+
110+
$.export("$summary", "Successfully searched for companies");
111+
return response;
112+
},
113+
};
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
import app from "../../contactout.app.mjs";
2+
3+
export default {
4+
key: "contactout-decision-makers-search",
5+
name: "Decision Makers Search",
6+
description: "Get profiles of key decision makers within a specified company. [See the documentation](https://api.contactout.com/#decision-makers-api).",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
linkedinUrl: {
12+
type: "string",
13+
label: "LinkedIn Company URL",
14+
description: "The fully formed URL of the company's LinkedIn profile (e.g., `https://linkedin.com/company/contactout`)",
15+
optional: true,
16+
},
17+
domain: {
18+
propDefinition: [
19+
app,
20+
"domain",
21+
],
22+
description: "The domain name of the company's website (e.g., example.com)",
23+
optional: true,
24+
},
25+
name: {
26+
propDefinition: [
27+
app,
28+
"name",
29+
],
30+
description: "The name of the company",
31+
optional: true,
32+
},
33+
page: {
34+
propDefinition: [
35+
app,
36+
"page",
37+
],
38+
},
39+
revealInfo: {
40+
propDefinition: [
41+
app,
42+
"revealInfo",
43+
],
44+
},
45+
},
46+
async run({ $ }) {
47+
const {
48+
linkedinUrl,
49+
domain,
50+
name,
51+
page,
52+
revealInfo,
53+
} = this;
54+
55+
const response = await this.app.searchDecisionMakers({
56+
$,
57+
params: {
58+
linkedin_url: linkedinUrl,
59+
domain,
60+
name,
61+
page,
62+
reveal_info: revealInfo,
63+
},
64+
});
65+
66+
$.export("$summary", "Successfully searched for decision makers");
67+
return response;
68+
},
69+
};
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import app from "../../contactout.app.mjs";
2+
3+
export default {
4+
key: "contactout-email-to-linkedin",
5+
name: "Email To LinkedIn",
6+
description: "Find LinkedIn profile from email address. [See the documentation](https://api.contactout.com/#email-to-linkedin-api).",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
email: {
12+
propDefinition: [
13+
app,
14+
"email",
15+
],
16+
description: "The email address to find LinkedIn profile for",
17+
},
18+
},
19+
async run({ $ }) {
20+
const {
21+
app,
22+
email,
23+
} = this;
24+
25+
const response = await app.emailToLinkedIn({
26+
$,
27+
params: {
28+
email,
29+
},
30+
});
31+
32+
$.export("$summary", "Successfully found LinkedIn profile for email");
33+
return response;
34+
},
35+
};
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import app from "../../contactout.app.mjs";
2+
3+
export default {
4+
key: "contactout-get-company-info",
5+
name: "Get Company Information",
6+
description: "Get company information from domain names. [See the documentation](https://api.contactout.com/#company-information-from-domains).",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
domains: {
12+
type: "string[]",
13+
label: "Company Domains",
14+
description: "An array of domain names (max 30). Each domain should be in a valid format, for example: example.com",
15+
},
16+
},
17+
async run({ $ }) {
18+
const response = await this.app.getCompanyInfo({
19+
$,
20+
data: {
21+
domains: this.domains,
22+
},
23+
});
24+
25+
$.export("$summary", "Successfully retrieved company information");
26+
return response;
27+
},
28+
};
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import app from "../../contactout.app.mjs";
2+
3+
export default {
4+
key: "contactout-get-contact-info-by-member-id",
5+
name: "Get Contact Info by LinkedIn Member ID",
6+
description: "Get contact information (email and phone) for a LinkedIn profile using a LinkedIn Member ID. [See the documentation](https://api.contactout.com/#from-linkedin-memberid).",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
memberId: {
12+
propDefinition: [
13+
app,
14+
"memberId",
15+
],
16+
description: "LinkedIn Member ID is a unique identifier assigned to each member on the LinkedIn platform",
17+
},
18+
includePhone: {
19+
propDefinition: [
20+
app,
21+
"includePhone",
22+
],
23+
},
24+
},
25+
async run({ $ }) {
26+
const params = {
27+
member_id: this.memberId,
28+
};
29+
30+
if (this.includePhone) {
31+
params.include_phone = this.includePhone;
32+
}
33+
34+
const response = await this.app.getContactInfoByMemberId({
35+
$,
36+
params,
37+
});
38+
39+
$.export("$summary", `Successfully retrieved contact info for LinkedIn Member ID: ${this.memberId}`);
40+
return response;
41+
},
42+
};
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import app from "../../contactout.app.mjs";
2+
3+
export default {
4+
key: "contactout-get-contact-info",
5+
name: "Get Contact Info from LinkedIn Profile",
6+
description: "Get contact information (email and phone) for a LinkedIn profile using a LinkedIn URL. [See the documentation](https://api.contactout.com/#from-linkedin-profile).",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
profile: {
12+
propDefinition: [
13+
app,
14+
"profile",
15+
],
16+
description: "The LinkedIn profile URL to get contact information for. URL must begin with http and must contain linkedin.com/in/ or linkedin.com/pub/",
17+
},
18+
includePhone: {
19+
propDefinition: [
20+
app,
21+
"includePhone",
22+
],
23+
},
24+
emailType: {
25+
propDefinition: [
26+
app,
27+
"emailType",
28+
],
29+
},
30+
},
31+
async run({ $ }) {
32+
const params = {
33+
profile: this.profile,
34+
};
35+
36+
if (this.includePhone) {
37+
params.include_phone = this.includePhone;
38+
}
39+
40+
if (this.emailType) {
41+
params.email_type = this.emailType;
42+
}
43+
44+
const response = await this.app.getContactInfo({
45+
$,
46+
params,
47+
});
48+
49+
$.export("$summary", `Successfully retrieved contact info for LinkedIn profile: ${this.profile}`);
50+
return response;
51+
},
52+
};

0 commit comments

Comments
 (0)