-
Notifications
You must be signed in to change notification settings - Fork 2
/
ipinfo-express.d.ts
99 lines (86 loc) · 2.01 KB
/
ipinfo-express.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
declare module "ipinfo-express" {
import { RequestHandler } from "express";
interface IPinfoMiddlewareOptions {
token?: string;
cache?: any;
timeout?: number;
filter?: (ip: string) => boolean;
}
export interface Asn {
asn: string;
name: string;
domain: string;
route: string;
type: string;
}
export interface Company {
name: string;
domain: string;
type: string;
}
export interface Carrier {
name: string;
mcc: string;
mnc: string;
}
export interface Privacy {
vpn: boolean;
proxy: boolean;
tor: boolean;
relay: boolean;
hosting: boolean;
service: string;
}
export interface Abuse {
address: string;
country: string;
countryCode: string;
email: string;
name: string;
network: string;
phone: string;
}
export interface Domains {
ip: string;
total: number;
domains: string[];
}
export interface CountryFlag {
emoji: string;
unicode: string;
}
export interface CountryCurrency {
code: string;
symbol: string;
}
export interface Continent {
code: string;
name: string;
}
export interface IPinfoResponse {
ip: string;
hostname: string;
bogon: boolean;
anycast: boolean;
city: string;
region: string;
country: string;
countryFlag: CountryFlag;
countryCurrency: CountryCurrency;
continent: Continent;
isEU: boolean;
countryCode: string;
loc: string;
org: string;
postal: string;
timezone: string;
asn: Asn;
company: Company;
carrier: Carrier;
privacy: Privacy;
abuse: Abuse;
domains: Domains;
}
function ipinfo(options: IPinfoMiddlewareOptions): RequestHandler;
export = ipinfo;
}