Skip to content

New Components - apiverve #16164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions components/apiverve/actions/dns-lookup/dns-lookup.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import apiverve from "../../apiverve.app.mjs";

export default {
key: "apiverve-dns-lookup",
name: "DNS Lookup",
description: "Look up the DNS records of a domain. [See the documentation](https://docs.apiverve.com/api/dnslookup)",
version: "0.0.1",
type: "action",
props: {
apiverve,
domain: {
propDefinition: [
apiverve,
"domain",
],
},
},
async run({ $ }) {
const response = await this.apiverve.dnsLookup({
$,
params: {
domain: this.domain,
},
});
if (response?.status === "ok") {
$.export("$summary", `Successfully retrieved DNS records for ${this.domain}`);
}
return response;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import apiverve from "../../apiverve.app.mjs";

export default {
key: "apiverve-get-dictionary-definition",
name: "Get Dictionary Definition",
description: "Get the definition of a word. [See the documentation](https://docs.apiverve.com/api/dictionary)",
version: "0.0.1",
type: "action",
props: {
apiverve,
word: {
type: "string",
label: "Word",
description: "The word for which you want to get the definition (e.g., apple)",
},
},
async run({ $ }) {
const response = await this.apiverve.getDictionaryDefinition({
$,
params: {
word: this.word,
},
});
if (response?.status === "ok") {
$.export("$summary", `Successfully retrieved definition of ${this.word}`);
}
return response;
},
};
56 changes: 56 additions & 0 deletions components/apiverve/actions/get-weather/get-weather.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import apiverve from "../../apiverve.app.mjs";

export default {
key: "apiverve-get-weather",
name: "Get Weather",
description: "Return the temperature, humidity, and more for a given location. [See the documentation](https://docs.apiverve.com/api/weatherforecast)",
version: "0.0.1",
type: "action",
props: {
apiverve,
lookupType: {
type: "string",
label: "Lookup Type",
description: "Whether to search by city or zip code",
options: [
"city",
"zip code",
],
reloadProps: true,
},
},
additionalProps() {
const props = {};
if (!this.lookupType) {
return props;
}
if (this.lookupType === "city") {
props.city = {
type: "string",
label: "City",
description: "The city for which you want to get the current weather (e.g., San Francisco)",
};
}
if (this.lookupType === "zip code") {
props.zip = {
type: "string",
label: "Zip Code",
description: "The zip code for which you want to get the current weather (e.g., 64082)",
};
}
return props;
},
async run({ $ }) {
const response = await this.apiverve.getWeather({
$,
params: {
city: this.city,
zip: this.zip,
},
});
if (response?.status === "ok") {
$.export("$summary", `Successfully retrieved weather for ${this.city || this.zip}`);
}
return response;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import apiverve from "../../apiverve.app.mjs";

export default {
key: "apiverve-ip-blacklist-lookup",
name: "IP Blacklist Lookup",
description: "Lookup if an IP address is in a blacklist. [See the documentation](https://docs.apiverve.com/api/ipblacklistlookup)",
version: "0.0.1",
type: "action",
props: {
apiverve,
ip: {
type: "string",
label: "IP Address",
description: "The IP address to lookup in the blacklist (e.g., 201.23.192.173)",
},
},
async run({ $ }) {
const response = await this.apiverve.ipBlacklistLookup({
$,
params: {
ip: this.ip,
},
});
if (response?.status === "ok") {
$.export("$summary", `Successfully retrieved data for ${this.ip}`);
}
return response;
},
};
29 changes: 29 additions & 0 deletions components/apiverve/actions/moon-phases/moon-phases.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import apiverve from "../../apiverve.app.mjs";

export default {
key: "apiverve-moon-phases",
name: "Moon Phases",
description: "Retrieve the moon phase for a given date. [See the documentation](https://docs.apiverve.com/api/moonphases)",
version: "0.0.1",
type: "action",
props: {
apiverve,
date: {
type: "string",
label: "Date",
description: "The date for which you want to get the moon phase (e.g., MM-DD-YYYY : 01-01-2022)",
},
},
async run({ $ }) {
const response = await this.apiverve.moonPhases({
$,
params: {
date: this.date,
},
});
if (response?.status === "ok") {
$.export("$summary", `Successfully retrieved moon phases for ${this.date}`);
}
return response;
},
};
29 changes: 29 additions & 0 deletions components/apiverve/actions/number-to-words/number-to-words.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import apiverve from "../../apiverve.app.mjs";

export default {
key: "apiverve-number-to-words",
name: "Number to Words",
description: "A simple tool for converting numbers to words. Returns the number in words. [See the documentation](https://docs.apiverve.com/api/numbertowords)",
version: "0.0.1",
type: "action",
props: {
apiverve,
number: {
type: "string",
label: "Number",
description: "The number to convert to words",
},
},
async run({ $ }) {
const response = await this.apiverve.numberToWords({
$,
params: {
number: this.number,
},
});
if (response?.status === "ok") {
$.export("$summary", "Successfully converted number to words");
}
return response;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import apiverve from "../../apiverve.app.mjs";

export default {
key: "apiverve-phone-number-validator",
name: "Phone Number Validator",
description: "Check whether a phone number is valid or not. [See the documentation](https://docs.apiverve.com/api/phonenumbervalidator)",
version: "0.0.1",
type: "action",
props: {
apiverve,
number: {
type: "string",
label: "Phone Number",
description: "The phone number to validate",
},
country: {
type: "string",
label: "Country",
description: "The country code of the phone number (e.g., us, uk)",
},
},
async run({ $ }) {
const response = await this.apiverve.phoneNumberValidator({
$,
params: {
number: this.number,
country: this.country,
},
});
if (response?.status === "ok") {
$.export("$summary", `Successfully retrieved validation info for ${this.number}`);
}
return response;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import apiverve from "../../apiverve.app.mjs";

export default {
key: "apiverve-routing-number-lookup",
name: "Routing Number Lookup",
description: "Lookup routing number information for USA Banks. [See the documentation](https://docs.apiverve.com/api/routinglookup)",
version: "0.0.1",
type: "action",
props: {
apiverve,
routing: {
type: "string",
label: "Routing Number",
description: "The routing number to lookup information about (e.g., 121000358)",
},
},
async run({ $ }) {
const response = await this.apiverve.routingNumberLookup({
$,
params: {
routing: this.routing,
},
});
if (response?.status === "ok") {
$.export("$summary", `Successfully retrieved routing number information for ${this.routing}`);
}
return response;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import apiverve from "../../apiverve.app.mjs";

export default {
key: "apiverve-street-address-parser",
name: "Street Address Parser",
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)",
version: "0.0.1",
type: "action",
props: {
apiverve,
address: {
type: "string",
label: "Address",
description: "The street address to parse",
},
},
async run({ $ }) {
const response = await this.apiverve.streetAddressParser({
$,
params: {
address: this.address,
},
});
if (response?.status === "ok") {
$.export("$summary", "Successfully parsed street address");
}
return response;
},
};
30 changes: 30 additions & 0 deletions components/apiverve/actions/whois-lookup/whois-lookup.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import apiverve from "../../apiverve.app.mjs";

export default {
key: "apiverve-whois-lookup",
name: "Whois Lookup",
description: "Check the registration of a domain name. [See the documentation](https://docs.apiverve.com/api/whoislookup)",
version: "0.0.1",
type: "action",
props: {
apiverve,
domain: {
propDefinition: [
apiverve,
"domain",
],
},
},
async run({ $ }) {
const response = await this.apiverve.whoisLookup({
$,
params: {
domain: this.domain,
},
});
if (response?.status === "ok") {
$.export("$summary", `Successfully retrieved WHOIS records for ${this.domain}`);
}
return response;
},
};
Loading
Loading