Skip to content

Commit 80a343d

Browse files
Merging pull request #16162
* Added actions * Added actions * remove duplicate action --------- Co-authored-by: michelle0927 <[email protected]>
1 parent ef0e890 commit 80a343d

File tree

6 files changed

+1238
-6
lines changed

6 files changed

+1238
-6
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import app from "../../trestle.app.mjs";
2+
3+
export default {
4+
key: "trestle-phone-validation",
5+
name: "Phone Validation",
6+
description: "Validates phone numbers and provides phone metadata. [See the documentation](https://trestle-api.redoc.ly/Current/tag/Phone-Validation-API#operation/getPhoneValidation)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
phone: {
12+
propDefinition: [
13+
app,
14+
"phone",
15+
],
16+
},
17+
},
18+
async run({ $ }) {
19+
const response = await this.app.phoneValidation({
20+
$,
21+
params: {
22+
phone: this.phone,
23+
},
24+
});
25+
$.export("$summary", "Successfully executed phone validation");
26+
return response;
27+
},
28+
};
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
import app from "../../trestle.app.mjs";
2+
3+
export default {
4+
key: "trestle-real-contact",
5+
name: "Real Contact",
6+
description: "Verifies and grades phone numbers, emails, and addresses. [See the documentation](https://trestle-api.redoc.ly/Current/tag/Real-Contact-API#operation/realContact)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
phone: {
12+
propDefinition: [
13+
app,
14+
"phone",
15+
],
16+
},
17+
name: {
18+
propDefinition: [
19+
app,
20+
"name",
21+
],
22+
},
23+
email: {
24+
propDefinition: [
25+
app,
26+
"email",
27+
],
28+
},
29+
ipAddress: {
30+
propDefinition: [
31+
app,
32+
"ipAddress",
33+
],
34+
},
35+
street: {
36+
propDefinition: [
37+
app,
38+
"street",
39+
],
40+
},
41+
city: {
42+
propDefinition: [
43+
app,
44+
"city",
45+
],
46+
},
47+
stateCode: {
48+
propDefinition: [
49+
app,
50+
"stateCode",
51+
],
52+
},
53+
postalCode: {
54+
propDefinition: [
55+
app,
56+
"postalCode",
57+
],
58+
},
59+
countryCode: {
60+
propDefinition: [
61+
app,
62+
"countryCode",
63+
],
64+
},
65+
},
66+
async run({ $ }) {
67+
const response = await this.app.realContact({
68+
$,
69+
params: {
70+
phone: this.phone,
71+
name: this.name,
72+
email: this.email,
73+
ip_address: this.ipAddress,
74+
address: {
75+
street_line_1: this.street,
76+
city: this.city,
77+
state_code: this.stateCode,
78+
postal_code: this.postalCode,
79+
country_code: this.countryCode,
80+
},
81+
},
82+
});
83+
$.export("$summary", "Successfully executed contact lookup");
84+
return response;
85+
},
86+
};
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import app from "../../trestle.app.mjs";
2+
3+
export default {
4+
key: "trestle-reverse-phone",
5+
name: "Reverse Phone",
6+
description: "Offers comprehensive verification and enrichment of phone numbers. [See the documentation](https://trestle-api.redoc.ly/Current/tag/Reverse-Phone-API#operation/getPhone)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
phone: {
12+
propDefinition: [
13+
app,
14+
"phone",
15+
],
16+
},
17+
},
18+
async run({ $ }) {
19+
const response = await this.app.reversePhone({
20+
$,
21+
params: {
22+
phone: this.phone,
23+
},
24+
});
25+
$.export("$summary", "Successfully executed reverse phone lookup");
26+
return response;
27+
},
28+
};

0 commit comments

Comments
 (0)