Skip to content

Commit 2727cd3

Browse files
authored
New Components - apiverve (#16164)
* new components * pnpm-lock.yaml * updates
1 parent 2feb582 commit 2727cd3

File tree

13 files changed

+420
-8
lines changed

13 files changed

+420
-8
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import apiverve from "../../apiverve.app.mjs";
2+
3+
export default {
4+
key: "apiverve-dns-lookup",
5+
name: "DNS Lookup",
6+
description: "Look up the DNS records of a domain. [See the documentation](https://docs.apiverve.com/api/dnslookup)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
apiverve,
11+
domain: {
12+
propDefinition: [
13+
apiverve,
14+
"domain",
15+
],
16+
},
17+
},
18+
async run({ $ }) {
19+
const response = await this.apiverve.dnsLookup({
20+
$,
21+
params: {
22+
domain: this.domain,
23+
},
24+
});
25+
if (response?.status === "ok") {
26+
$.export("$summary", `Successfully retrieved DNS records for ${this.domain}`);
27+
}
28+
return response;
29+
},
30+
};
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import apiverve from "../../apiverve.app.mjs";
2+
3+
export default {
4+
key: "apiverve-get-dictionary-definition",
5+
name: "Get Dictionary Definition",
6+
description: "Get the definition of a word. [See the documentation](https://docs.apiverve.com/api/dictionary)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
apiverve,
11+
word: {
12+
type: "string",
13+
label: "Word",
14+
description: "The word for which you want to get the definition (e.g., apple)",
15+
},
16+
},
17+
async run({ $ }) {
18+
const response = await this.apiverve.getDictionaryDefinition({
19+
$,
20+
params: {
21+
word: this.word,
22+
},
23+
});
24+
if (response?.status === "ok") {
25+
$.export("$summary", `Successfully retrieved definition of ${this.word}`);
26+
}
27+
return response;
28+
},
29+
};
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import apiverve from "../../apiverve.app.mjs";
2+
3+
export default {
4+
key: "apiverve-get-weather",
5+
name: "Get Weather",
6+
description: "Return the temperature, humidity, and more for a given location. [See the documentation](https://docs.apiverve.com/api/weatherforecast)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
apiverve,
11+
lookupType: {
12+
type: "string",
13+
label: "Lookup Type",
14+
description: "Whether to search by city or zip code",
15+
options: [
16+
"city",
17+
"zip code",
18+
],
19+
reloadProps: true,
20+
},
21+
},
22+
additionalProps() {
23+
const props = {};
24+
if (!this.lookupType) {
25+
return props;
26+
}
27+
if (this.lookupType === "city") {
28+
props.city = {
29+
type: "string",
30+
label: "City",
31+
description: "The city for which you want to get the current weather (e.g., San Francisco)",
32+
};
33+
}
34+
if (this.lookupType === "zip code") {
35+
props.zip = {
36+
type: "string",
37+
label: "Zip Code",
38+
description: "The zip code for which you want to get the current weather (e.g., 64082)",
39+
};
40+
}
41+
return props;
42+
},
43+
async run({ $ }) {
44+
const response = await this.apiverve.getWeather({
45+
$,
46+
params: {
47+
city: this.city,
48+
zip: this.zip,
49+
},
50+
});
51+
if (response?.status === "ok") {
52+
$.export("$summary", `Successfully retrieved weather for ${this.city || this.zip}`);
53+
}
54+
return response;
55+
},
56+
};
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import apiverve from "../../apiverve.app.mjs";
2+
3+
export default {
4+
key: "apiverve-ip-blacklist-lookup",
5+
name: "IP Blacklist Lookup",
6+
description: "Lookup if an IP address is in a blacklist. [See the documentation](https://docs.apiverve.com/api/ipblacklistlookup)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
apiverve,
11+
ip: {
12+
type: "string",
13+
label: "IP Address",
14+
description: "The IP address to lookup in the blacklist (e.g., 201.23.192.173)",
15+
},
16+
},
17+
async run({ $ }) {
18+
const response = await this.apiverve.ipBlacklistLookup({
19+
$,
20+
params: {
21+
ip: this.ip,
22+
},
23+
});
24+
if (response?.status === "ok") {
25+
$.export("$summary", `Successfully retrieved data for ${this.ip}`);
26+
}
27+
return response;
28+
},
29+
};
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import apiverve from "../../apiverve.app.mjs";
2+
3+
export default {
4+
key: "apiverve-moon-phases",
5+
name: "Moon Phases",
6+
description: "Retrieve the moon phase for a given date. [See the documentation](https://docs.apiverve.com/api/moonphases)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
apiverve,
11+
date: {
12+
type: "string",
13+
label: "Date",
14+
description: "The date for which you want to get the moon phase (e.g., MM-DD-YYYY : 01-01-2022)",
15+
},
16+
},
17+
async run({ $ }) {
18+
const response = await this.apiverve.moonPhases({
19+
$,
20+
params: {
21+
date: this.date,
22+
},
23+
});
24+
if (response?.status === "ok") {
25+
$.export("$summary", `Successfully retrieved moon phases for ${this.date}`);
26+
}
27+
return response;
28+
},
29+
};
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import apiverve from "../../apiverve.app.mjs";
2+
3+
export default {
4+
key: "apiverve-number-to-words",
5+
name: "Number to Words",
6+
description: "A simple tool for converting numbers to words. Returns the number in words. [See the documentation](https://docs.apiverve.com/api/numbertowords)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
apiverve,
11+
number: {
12+
type: "string",
13+
label: "Number",
14+
description: "The number to convert to words",
15+
},
16+
},
17+
async run({ $ }) {
18+
const response = await this.apiverve.numberToWords({
19+
$,
20+
params: {
21+
number: this.number,
22+
},
23+
});
24+
if (response?.status === "ok") {
25+
$.export("$summary", "Successfully converted number to words");
26+
}
27+
return response;
28+
},
29+
};
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import apiverve from "../../apiverve.app.mjs";
2+
3+
export default {
4+
key: "apiverve-phone-number-validator",
5+
name: "Phone Number Validator",
6+
description: "Check whether a phone number is valid or not. [See the documentation](https://docs.apiverve.com/api/phonenumbervalidator)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
apiverve,
11+
number: {
12+
type: "string",
13+
label: "Phone Number",
14+
description: "The phone number to validate",
15+
},
16+
country: {
17+
type: "string",
18+
label: "Country",
19+
description: "The country code of the phone number (e.g., us, uk)",
20+
},
21+
},
22+
async run({ $ }) {
23+
const response = await this.apiverve.phoneNumberValidator({
24+
$,
25+
params: {
26+
number: this.number,
27+
country: this.country,
28+
},
29+
});
30+
if (response?.status === "ok") {
31+
$.export("$summary", `Successfully retrieved validation info for ${this.number}`);
32+
}
33+
return response;
34+
},
35+
};
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import apiverve from "../../apiverve.app.mjs";
2+
3+
export default {
4+
key: "apiverve-routing-number-lookup",
5+
name: "Routing Number Lookup",
6+
description: "Lookup routing number information for USA Banks. [See the documentation](https://docs.apiverve.com/api/routinglookup)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
apiverve,
11+
routing: {
12+
type: "string",
13+
label: "Routing Number",
14+
description: "The routing number to lookup information about (e.g., 121000358)",
15+
},
16+
},
17+
async run({ $ }) {
18+
const response = await this.apiverve.routingNumberLookup({
19+
$,
20+
params: {
21+
routing: this.routing,
22+
},
23+
});
24+
if (response?.status === "ok") {
25+
$.export("$summary", `Successfully retrieved routing number information for ${this.routing}`);
26+
}
27+
return response;
28+
},
29+
};
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import apiverve from "../../apiverve.app.mjs";
2+
3+
export default {
4+
key: "apiverve-street-address-parser",
5+
name: "Street Address Parser",
6+
description: "Parse a US street addresses and return the parsed components of the street address provided. [See the documentation](https://docs.apiverve.com/api/streetaddressparser)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
apiverve,
11+
address: {
12+
type: "string",
13+
label: "Address",
14+
description: "The street address to parse",
15+
},
16+
},
17+
async run({ $ }) {
18+
const response = await this.apiverve.streetAddressParser({
19+
$,
20+
params: {
21+
address: this.address,
22+
},
23+
});
24+
if (response?.status === "ok") {
25+
$.export("$summary", "Successfully parsed street address");
26+
}
27+
return response;
28+
},
29+
};
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import apiverve from "../../apiverve.app.mjs";
2+
3+
export default {
4+
key: "apiverve-whois-lookup",
5+
name: "Whois Lookup",
6+
description: "Check the registration of a domain name. [See the documentation](https://docs.apiverve.com/api/whoislookup)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
apiverve,
11+
domain: {
12+
propDefinition: [
13+
apiverve,
14+
"domain",
15+
],
16+
},
17+
},
18+
async run({ $ }) {
19+
const response = await this.apiverve.whoisLookup({
20+
$,
21+
params: {
22+
domain: this.domain,
23+
},
24+
});
25+
if (response?.status === "ok") {
26+
$.export("$summary", `Successfully retrieved WHOIS records for ${this.domain}`);
27+
}
28+
return response;
29+
},
30+
};

0 commit comments

Comments
 (0)