1
+ // Auth
2
+ declare interface Authorization {
3
+ headers : {
4
+ Authorization : string
5
+ }
6
+ }
7
+
8
+ // User
9
+ declare interface User {
10
+ email : string
11
+ full_name : string
12
+ date_joined : string
13
+ last_login : string
14
+ }
15
+
16
+ declare type GetUser = ( ) => Promise < User >
17
+
18
+ // Subscription
19
+ declare type ProxyType = "free" | "cloud" | "premiumcloud" | "dedicated"
20
+
21
+ declare type CountryCodes = "AF" | "AX" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BA" | "BW" | "BV" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CA" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "HM" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KR" | "KP" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "AN" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "UM" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "EH" | "YE" | "ZM" | "ZW"
22
+
23
+ declare type Countries = { [ key in CountryCodes ] : number }
24
+
25
+ declare interface Subscription {
26
+ proxy_type : ProxyType
27
+ proxy_count : number
28
+ countries : Countries
29
+ bandwidth_limit : number
30
+
31
+ automatic_refresh_frequency : number
32
+ ondemand_refreshes_total : number
33
+ proxy_replacements_total : number
34
+
35
+ unlimited_ip_authorizations : boolean
36
+ unlimited_burst_threads : boolean
37
+
38
+ start_date : string
39
+ end_date : string
40
+ renewals_paid : number
41
+
42
+ monthly_price : number
43
+ yearly_price : number
44
+ free_credits : number
45
+
46
+ subuser_count : number
47
+ }
48
+
49
+ declare type GetSubscription = ( ) => Promise < Subscription >
50
+
51
+ // Proxy
52
+ declare interface ProxyConfig {
53
+ countries : Countries
54
+ username : string
55
+ password : string
56
+ authorized_ips : Array < string >
57
+ download_links : {
58
+ http_password_backbone : string
59
+ http_password_direct : string
60
+ http_ip_backbone : string
61
+ http_ip_direct : string
62
+ socks5_password_backbone : string
63
+ socks5_password_direct : string
64
+ socks5_ip_backbone : string
65
+ socks5_ip_direct : string
66
+ }
67
+ }
68
+
69
+ declare type GetProxyConfig = ( ) => Promise < ProxyConfig >
70
+ declare type SetProxyConfig = ( authorized_ips : Array < string > ) => Promise < ProxyConfig >
71
+
72
+ declare interface ProxyPorts {
73
+ http : number
74
+ socks5 : number
75
+ }
76
+
77
+ declare interface ProxyInfo {
78
+ username : string
79
+ password : string
80
+ proxy_address : string
81
+ ports : { http :8167 , socks5 :8168 } ,
82
+ valid : boolean
83
+ last_verification : string
84
+ country_code : CountryCodes ,
85
+ country_code_confidence : number ,
86
+ city_name : string
87
+ }
88
+
89
+ declare interface ProxyList {
90
+ count : number
91
+ next ?: string
92
+ previous ?: string
93
+
94
+ results : Array < ProxyInfo >
95
+ }
96
+
97
+ declare type StatusCodes = {
98
+ [ key : string ] : number
99
+ }
100
+
101
+ declare interface ProxyStats {
102
+ "bandwidth_used" : number
103
+ "bandwidth_remaining" : number
104
+ "bandwidth_limit" : number
105
+ "bandwidth_projected" : number
106
+
107
+ "requests_total" : number
108
+ "requests_countries" : Countries ,
109
+ "requests_successful" : number
110
+ "requests_failed" : number
111
+ "request_failure_status_code" : StatusCodes
112
+ }
0 commit comments