mirror of
https://github.com/skidoodle/hostinfo
synced 2026-04-28 01:27:36 +02:00
30 lines
598 B
TypeScript
30 lines
598 B
TypeScript
export interface GeoData {
|
|
ip: string;
|
|
hostname: string | null;
|
|
countryCode: string | null;
|
|
countryName: string | null;
|
|
city: string | null;
|
|
region: string | null;
|
|
org: string | null;
|
|
asn: string | null;
|
|
timezone: string | null;
|
|
isLocal: boolean;
|
|
isBogon: boolean;
|
|
}
|
|
|
|
export type LoadingStatus = 'idle' | 'loading' | 'success' | 'error';
|
|
|
|
export interface TabState {
|
|
url: string;
|
|
domain: string;
|
|
status: LoadingStatus;
|
|
data: GeoData | null;
|
|
errorMessage: string | null;
|
|
lastUpdated: number;
|
|
}
|
|
|
|
export interface CacheEntry {
|
|
data: GeoData;
|
|
timestamp: number;
|
|
}
|