Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
052081d
ipgeolocation_io: add app file and 12 actions
mateen993 Mar 6, 2026
320e362
Update components/ipgeolocation_io/actions/get-abuse-contact/get-abus…
mateen993 Mar 6, 2026
bf8c7e7
Update components/ipgeolocation_io/actions/get-asn/get-asn.mjs
mateen993 Mar 6, 2026
7d0d7aa
Update components/ipgeolocation_io/actions/get-bulk-geolocation/get-b…
mateen993 Mar 6, 2026
d582959
Update components/ipgeolocation_io/actions/get-ip-security/get-ip-sec…
mateen993 Mar 6, 2026
9eeddd9
Update components/ipgeolocation_io/actions/parse-bulk-user-agents/par…
mateen993 Mar 6, 2026
85365d4
Update components/ipgeolocation_io/ipgeolocation_io.app.mjs
mateen993 Mar 6, 2026
8766743
Update components/ipgeolocation_io/README.md
mateen993 Mar 6, 2026
74d49a8
Update components/ipgeolocation_io/README.md
mateen993 Mar 6, 2026
8193837
Update components/ipgeolocation_io/actions/parse-user-agent/parse-use…
mateen993 Mar 6, 2026
fa46560
ipgeolocation_io: fix files path
mateen993 Mar 6, 2026
3cbbb19
ipgeolocation_io: fix: import + add: validation (convert-timezone)
mateen993 Mar 6, 2026
cee55de
ipgeolocation_io: add - validation (astronomy-time-series)
mateen993 Mar 6, 2026
9161dd3
ipgeolocation_io: fix: apiKey input as props add
mateen993 Mar 6, 2026
7b6c981
Update components/ipgeolocation_io/package.json
mateen993 Mar 6, 2026
fd049ed
ipgeolocation_io: fix: auth + get-timezone
mateen993 Mar 6, 2026
8d99b72
ipgeolocation_io: fix summary
mateen993 Mar 6, 2026
29c8ec2
ipgeolocation_io: add $ context
mateen993 Mar 6, 2026
c51580b
Update components/ipgeolocation_io/actions/get-astronomy/get-astronom…
mateen993 Mar 6, 2026
0dca4f8
Update components/ipgeolocation_io/actions/get-astronomy-time-series/…
mateen993 Mar 6, 2026
be480a2
Merge remote-tracking branch 'upstream/master' into add/ipgeolocation…
michelle0927 Mar 6, 2026
43ed1e5
move ipgeolocation_io to ipgeolocation
michelle0927 Mar 6, 2026
4bb8505
move api call methods to app file
michelle0927 Mar 6, 2026
915da98
create common file for languages
michelle0927 Mar 6, 2026
e00020a
update props to camelCase
michelle0927 Mar 6, 2026
2183463
pnpm-lock.yaml
michelle0927 Mar 6, 2026
d7df96e
fix key
michelle0927 Mar 6, 2026
b87bc66
update api key
michelle0927 Mar 6, 2026
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
192 changes: 192 additions & 0 deletions components/ipgeolocation/actions/convert-timezone/convert-timezone.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
import ipgeolocation from "../../ipgeolocation.app.mjs";

export default {
key: "ipgeolocation-convert-timezone",
name: "Convert Timezone",
description:
"Convert a time between two timezones using timezone names, coordinates, city, IATA, ICAO, or UN/LOCODE. [See the documentation](https://ipgeolocation.io/documentation/timezone-api.html)",
version: "0.0.1",
type: "action",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
props: {
ipgeolocation,
tzFrom: {
type: "string",
label: "From Timezone",
description: "Source timezone name (e.g. `America/New_York`). Must be used with `To Timezone`",
optional: true,
},
tzTo: {
type: "string",
label: "To Timezone",
description: "Target timezone name (e.g. `Asia/Tokyo`). Must be used with `From Timezone`",
optional: true,
},
latFrom: {
type: "string",
label: "From Latitude",
description: "Source latitude coordinate. Must be used with From Longitude",
optional: true,
},
longFrom: {
type: "string",
label: "From Longitude",
description: "Source longitude coordinate. Must be used with From Latitude",
optional: true,
},
latTo: {
type: "string",
label: "To Latitude",
description: "Target latitude coordinate. Must be used with To Longitude",
optional: true,
},
longTo: {
type: "string",
label: "To Longitude",
description: "Target longitude coordinate. Must be used with To Latitude",
optional: true,
},
locationFrom: {
type: "string",
label: "From Location",
description: "Source city or address (e.g. `New York, USA`). Must be used with To Location",
optional: true,
},
locationTo: {
type: "string",
label: "To Location",
description: "Target city or address (e.g. `London, UK`). Must be used with From Location",
optional: true,
},
iataFrom: {
type: "string",
label: "From IATA Code",
description: "Source airport IATA code (e.g. `JFK`). Must be used with To IATA Code",
optional: true,
},
iataTo: {
type: "string",
label: "To IATA Code",
description: "Target airport IATA code (e.g. `LHR`). Must be used with From IATA Code",
optional: true,
},
icaoFrom: {
type: "string",
label: "From ICAO Code",
description: "Source airport ICAO code (e.g. `KJFK`). Must be used with To ICAO Code",
optional: true,
},
icaoTo: {
type: "string",
label: "To ICAO Code",
description: "Target airport ICAO code (e.g. `EGLL`). Must be used with From ICAO Code",
optional: true,
},
locodeFrom: {
type: "string",
label: "From UN/LOCODE",
description: "Source UN/LOCODE (e.g. `USNYC`). Must be used with To UN/LOCODE",
optional: true,
},
locodeTo: {
type: "string",
label: "To UN/LOCODE",
description: "Target UN/LOCODE (e.g. `GBLON`). Must be used with From UN/LOCODE",
optional: true,
},
time: {
type: "string",
label: "Time to Convert",
description: "Time to convert in format `YYYY-MM-DD HH:mm` or `YYYY-MM-DD HH:mm:ss`. Leave blank to convert current time",
optional: true,
},
},
async run({ $ }) {
const hasValue = (value) => value !== undefined && value !== null && value !== "";
const hasPair = (from, to) => hasValue(from) && hasValue(to);
const hasAnyCoord = [
this.latFrom,
this.longFrom,
this.latTo,
this.longTo,
].some(hasValue);
const hasFullCoordSet = [
this.latFrom,
this.longFrom,
this.latTo,
this.longTo,
].every(hasValue);

if (
(hasValue(this.tzFrom) !== hasValue(this.tzTo))
|| (hasValue(this.locationFrom) !== hasValue(this.locationTo))
|| (hasValue(this.iataFrom) !== hasValue(this.iataTo))
|| (hasValue(this.icaoFrom) !== hasValue(this.icaoTo))
|| (hasValue(this.locodeFrom) !== hasValue(this.locodeTo))
|| (hasAnyCoord && !hasFullCoordSet)
) {
throw new Error("Provide complete source and target values for the selected conversion mode.");
}

if (!(
hasPair(this.tzFrom, this.tzTo)
|| hasPair(this.locationFrom, this.locationTo)
|| hasPair(this.iataFrom, this.iataTo)
|| hasPair(this.icaoFrom, this.icaoTo)
|| hasPair(this.locodeFrom, this.locodeTo)
|| hasFullCoordSet
)) {
throw new Error("Provide a valid source and target using timezone names, coordinates, locations, IATA, ICAO, or UN/LOCODE.");
}

const response = await this.ipgeolocation.convertTimezone({
$,
params: {
tz_from: this.tzFrom,
tz_to: this.tzTo,
time: this.time,
lat_from: this.latFrom,
long_from: this.longFrom,
lat_to: this.latTo,
long_to: this.longTo,
location_from: this.locationFrom,
location_to: this.locationTo,
iata_from: this.iataFrom,
iata_to: this.iataTo,
icao_from: this.icaoFrom,
icao_to: this.icaoTo,
locode_from: this.locodeFrom,
locode_to: this.locodeTo,
},
});

let from, to;

if (hasPair(this.tzFrom, this.tzTo)) {
from = this.tzFrom;
to = this.tzTo;
} else if (hasFullCoordSet) {
from = `${this.latFrom},${this.longFrom}`;
to = `${this.latTo},${this.longTo}`;
} else if (hasPair(this.locationFrom, this.locationTo)) {
from = this.locationFrom;
to = this.locationTo;
} else if (hasPair(this.iataFrom, this.iataTo)) {
from = this.iataFrom;
to = this.iataTo;
} else if (hasPair(this.icaoFrom, this.icaoTo)) {
from = this.icaoFrom;
to = this.icaoTo;
} else {
from = this.locodeFrom;
to = this.locodeTo;
}

$.export("$summary", `Successfully converted time from ${from} to ${to}`);
return response;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import ipgeolocation from "../../ipgeolocation.app.mjs";

export default {
key: "ipgeolocation-get-abuse-contact",
name: "Get Abuse Contact",
description:
"Retrieve abuse contact information for an IPv4 or IPv6 address, including abuse emails, phone numbers, organization, and network route. Only available on paid plans. [See the documentation](https://ipgeolocation.io/documentation/ip-abuse-contact-api.html)",
version: "0.0.1",
type: "action",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
props: {
ipgeolocation,
ip: {
type: "string",
label: "IP Address",
description: "The IPv4 or IPv6 address to retrieve abuse contact information for. Leave blank to retrieve abuse contact information for the caller's IP address",
optional: true,
},
fields: {
type: "string",
label: "Fields",
description: "Comma-separated list of fields to return (e.g. `abuse.emails,abuse.organization`). Reduces response size",
optional: true,
},
excludes: {
type: "string",
label: "Exclude Fields",
description: "Comma-separated list of fields to exclude from the response. The `ip` field is always returned",
optional: true,
},
},
async run({ $ }) {
const response = await this.ipgeolocation.getAbuseContact({
$,
params: {
ip: this.ip,
fields: this.fields,
excludes: this.excludes,
},
});
$.export("$summary", `Successfully retrieved abuse contact for ${this.ip || `caller's IP: ${response.ip}`}`);
return response;
},
};
62 changes: 62 additions & 0 deletions components/ipgeolocation/actions/get-asn/get-asn.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import ipgeolocation from "../../ipgeolocation.app.mjs";

export default {
key: "ipgeolocation-get-asn",
name: "Get ASN Details",
description:
"Retrieve detailed ASN information including peers, upstreams, downstreams, routes, and WHOIS data for an ASN number or IP address. Only available on paid plans. [See the documentation](https://ipgeolocation.io/documentation/asn-api.html)",
version: "0.0.1",
type: "action",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
props: {
ipgeolocation,
ip: {
type: "string",
label: "IP Address",
description: "The IPv4/IPv6 address to look up. Leave blank to lookup ASN data for the caller's IP address",
optional: true,
},
asn: {
type: "string",
label: "ASN",
description: "The ASN number (e.g. `AS15169`). If both `ip` and `asn` are provided, `asn` will be used",
optional: true,
},
include: {
type: "string",
label: "Include Additional Data",
description: "Comma-separated list of extra modules to include in the response. Available values: `routes`, `peers`, `upstreams`, `downstreams`, `whois_response`. Use `*` to include all.",
optional: true,
},
fields: {
type: "string",
label: "Fields",
description: "Comma-separated list of fields to return (e.g. `asn.organization,asn.routes`). Reduces response size",
optional: true,
},
excludes: {
type: "string",
label: "Exclude Fields",
description: "Comma-separated list of fields to exclude from the response. The `ip` field is always returned if querying by IP address",
optional: true,
},
},
async run({ $ }) {
const response = await this.ipgeolocation.getAsn({
$,
params: {
asn: this.asn,
ip: this.ip,
include: this.include,
fields: this.fields,
excludes: this.excludes,
},
});
$.export("$summary", `Successfully retrieved ASN details for ${this.asn || this.ip || `caller's IP: ${response.ip}`}`);
return response;
},
};
Loading