Skip to content

Commit 17b0486

Browse files
committed
Added actions
1 parent 1233817 commit 17b0486

File tree

2 files changed

+33
-5
lines changed

2 files changed

+33
-5
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+
};

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)