zynor 0.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +265 -0
- package/README.md +758 -0
- package/dist/index.cjs +71563 -0
- package/dist/index.d.ts +3078 -0
- package/dist/index.js +71563 -0
- package/package.json +54 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,3078 @@
|
|
|
1
|
+
import { AnyARecord, AnyAaaaRecord, AnyCnameRecord, AnyMxRecord, AnyNaptrRecord, AnyNsRecord, AnyPtrRecord, AnySoaRecord, AnySrvRecord, AnyTlsaRecord, AnyTxtRecord, CaaRecord, MxRecord, NaptrRecord, RecordWithTtl, ResolveOptions, ResolveWithTtlOptions, SoaRecord, SrvRecord, TlsaRecord } from 'node:dns';
|
|
2
|
+
|
|
3
|
+
export interface CacheConfig {
|
|
4
|
+
/** Enable/disable caching. Default: true */
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
/** Max entries per cache namespace. Default: 1000 */
|
|
7
|
+
maxSize?: number;
|
|
8
|
+
/** DNS result TTL in ms. Default: 300_000 (5 min) */
|
|
9
|
+
dnsTtl?: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* In-memory LRU cache with TTL-based expiry and size-based eviction.
|
|
13
|
+
* Uses Map insertion order for O(1) LRU tracking.
|
|
14
|
+
*/
|
|
15
|
+
export declare class LruCache<T = any> {
|
|
16
|
+
private cache;
|
|
17
|
+
private readonly maxSize;
|
|
18
|
+
constructor(maxSize?: number);
|
|
19
|
+
/** Get a value by key. Returns undefined if missing or expired. Promotes to MRU on hit. */
|
|
20
|
+
get(key: string): T | undefined;
|
|
21
|
+
/** Set a value with a TTL in milliseconds. Evicts LRU entry if at capacity. */
|
|
22
|
+
set(key: string, data: T, ttlMs: number): void;
|
|
23
|
+
/** Check if a key exists and is not expired. */
|
|
24
|
+
has(key: string): boolean;
|
|
25
|
+
/** Delete a specific key. Returns true if the key existed. */
|
|
26
|
+
delete(key: string): boolean;
|
|
27
|
+
/** Remove all entries. */
|
|
28
|
+
clear(): void;
|
|
29
|
+
/** Number of entries (including potentially expired ones not yet evicted). */
|
|
30
|
+
get size(): number;
|
|
31
|
+
/** Iterate all non-expired keys. Lazily evicts expired entries. */
|
|
32
|
+
keys(): IterableIterator<string>;
|
|
33
|
+
/** Iterate all non-expired values. Lazily evicts expired entries. */
|
|
34
|
+
values(): IterableIterator<T>;
|
|
35
|
+
/** Iterate all non-expired [key, value] pairs. Lazily evicts expired entries. */
|
|
36
|
+
entries(): IterableIterator<[
|
|
37
|
+
string,
|
|
38
|
+
T
|
|
39
|
+
]>;
|
|
40
|
+
/** Purge all expired entries. Returns number of entries removed. */
|
|
41
|
+
prune(): number;
|
|
42
|
+
/** Peek at a value without promoting it in the LRU order. */
|
|
43
|
+
peek(key: string): T | undefined;
|
|
44
|
+
/** Get remaining TTL in ms for a key. Returns 0 if missing or expired. */
|
|
45
|
+
ttl(key: string): number;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Configuration for a DNS provider's concurrency and rate limiting.
|
|
49
|
+
*/
|
|
50
|
+
export interface ProviderConfig {
|
|
51
|
+
/**
|
|
52
|
+
* Concurrency and rate limiting configuration.
|
|
53
|
+
* Can be either a simple concurrency limit or include interval-based rate limiting.
|
|
54
|
+
*/
|
|
55
|
+
limit?: {
|
|
56
|
+
/** Maximum number of concurrent requests */
|
|
57
|
+
concurrency: number;
|
|
58
|
+
/** Time interval in milliseconds for rate limiting */
|
|
59
|
+
interval?: number;
|
|
60
|
+
/** Maximum number of requests per interval */
|
|
61
|
+
intervalCap?: number;
|
|
62
|
+
/**
|
|
63
|
+
* Whether to carry over the concurrency count from the previous interval.
|
|
64
|
+
* @default false
|
|
65
|
+
*/
|
|
66
|
+
carryoverConcurrencyCount?: boolean;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Whether this provider is enabled.
|
|
70
|
+
* @default true
|
|
71
|
+
*/
|
|
72
|
+
enabled?: boolean;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Configuration for all DNS providers.
|
|
76
|
+
*/
|
|
77
|
+
export interface ZynorConfig {
|
|
78
|
+
/** Configuration for the native Node.js DNS resolver */
|
|
79
|
+
native?: ProviderConfig;
|
|
80
|
+
/** Configuration for Google DNS-over-HTTPS */
|
|
81
|
+
google?: ProviderConfig;
|
|
82
|
+
/** Configuration for Cloudflare DNS-over-HTTPS */
|
|
83
|
+
cloudflare?: ProviderConfig;
|
|
84
|
+
/** Configuration for Quad9 DNS-over-HTTPS */
|
|
85
|
+
quad9?: ProviderConfig;
|
|
86
|
+
/** Configuration for DNS result caching */
|
|
87
|
+
cache?: CacheConfig;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Union type of all possible DNS record types returned by ANY queries.
|
|
91
|
+
*/
|
|
92
|
+
export type AnyRecord = AnyARecord | AnyAaaaRecord | AnyCnameRecord | AnyMxRecord | AnyNaptrRecord | AnyNsRecord | AnyPtrRecord | AnySoaRecord | AnySrvRecord | AnyTlsaRecord | AnyTxtRecord;
|
|
93
|
+
/**
|
|
94
|
+
* Available DNS provider names.
|
|
95
|
+
*/
|
|
96
|
+
export type ProviderName = "native" | "google" | "cloudflare" | "quad9";
|
|
97
|
+
/**
|
|
98
|
+
* DNS record types supported by the resolver.
|
|
99
|
+
*/
|
|
100
|
+
export type RecordType = "A" | "AAAA" | "ANY" | "CAA" | "CNAME" | "MX" | "NAPTR" | "NS" | "PTR" | "SOA" | "SRV" | "TLSA" | "TXT";
|
|
101
|
+
/**
|
|
102
|
+
* Error thrown when no providers are enabled.
|
|
103
|
+
*/
|
|
104
|
+
export declare class NoEnabledProvidersError extends Error {
|
|
105
|
+
constructor();
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Error thrown when an invalid hostname is provided.
|
|
109
|
+
*/
|
|
110
|
+
export declare class InvalidHostnameError extends Error {
|
|
111
|
+
constructor(hostname: string);
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Error thrown when a provider is not enabled.
|
|
115
|
+
*/
|
|
116
|
+
export declare class ProviderNotEnabledError extends Error {
|
|
117
|
+
constructor(provider: string);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Error thrown when an invalid provider name is specified.
|
|
121
|
+
*/
|
|
122
|
+
export declare class InvalidProviderError extends Error {
|
|
123
|
+
constructor(provider: string);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Options for aborting/timing out DNS operations.
|
|
127
|
+
*/
|
|
128
|
+
export interface AbortOptions {
|
|
129
|
+
/** AbortSignal to cancel the operation (queue wait + fetch). */
|
|
130
|
+
signal?: AbortSignal;
|
|
131
|
+
/** Timeout in milliseconds for the entire operation (queue wait + fetch). */
|
|
132
|
+
timeout?: number;
|
|
133
|
+
}
|
|
134
|
+
export interface IResolver {
|
|
135
|
+
/**
|
|
136
|
+
* Resolves DNS records for a hostname without specifying record type (defaults to A records)
|
|
137
|
+
* @param hostname - The hostname to resolve
|
|
138
|
+
* @returns Promise resolving to an array of IPv4 addresses
|
|
139
|
+
*/
|
|
140
|
+
resolve(hostname: string): Promise<string[]>;
|
|
141
|
+
/**
|
|
142
|
+
* Resolves DNS records for a hostname without specifying record type but with a specific provider
|
|
143
|
+
* @param hostname - The hostname to resolve
|
|
144
|
+
* @param provider - The DNS provider to use
|
|
145
|
+
* @returns Promise resolving to an array of IPv4 addresses
|
|
146
|
+
*/
|
|
147
|
+
resolve(hostname: string, provider: ProviderName): Promise<string[]>;
|
|
148
|
+
/**
|
|
149
|
+
* Resolves A records for a hostname
|
|
150
|
+
* @param hostname - The hostname to resolve
|
|
151
|
+
* @param rrtype - DNS record type "A"
|
|
152
|
+
* @returns Promise resolving to an array of IPv4 addresses
|
|
153
|
+
*/
|
|
154
|
+
resolve(hostname: string, rrtype: "A"): Promise<string[]>;
|
|
155
|
+
/**
|
|
156
|
+
* Resolves A records for a hostname with a specific provider
|
|
157
|
+
* @param hostname - The hostname to resolve
|
|
158
|
+
* @param rrtype - DNS record type "A"
|
|
159
|
+
* @param provider - The DNS provider to use
|
|
160
|
+
* @returns Promise resolving to an array of IPv4 addresses
|
|
161
|
+
*/
|
|
162
|
+
resolve(hostname: string, rrtype: "A", provider: ProviderName): Promise<string[]>;
|
|
163
|
+
/**
|
|
164
|
+
* Resolves AAAA records for a hostname
|
|
165
|
+
* @param hostname - The hostname to resolve
|
|
166
|
+
* @param rrtype - DNS record type "AAAA"
|
|
167
|
+
* @returns Promise resolving to an array of IPv6 addresses
|
|
168
|
+
*/
|
|
169
|
+
resolve(hostname: string, rrtype: "AAAA"): Promise<string[]>;
|
|
170
|
+
/**
|
|
171
|
+
* Resolves AAAA records for a hostname with a specific provider
|
|
172
|
+
* @param hostname - The hostname to resolve
|
|
173
|
+
* @param rrtype - DNS record type "AAAA"
|
|
174
|
+
* @param provider - The DNS provider to use
|
|
175
|
+
* @returns Promise resolving to an array of IPv6 addresses
|
|
176
|
+
*/
|
|
177
|
+
resolve(hostname: string, rrtype: "AAAA", provider: ProviderName): Promise<string[]>;
|
|
178
|
+
/**
|
|
179
|
+
* Resolves ANY records for a hostname
|
|
180
|
+
* @param hostname - The hostname to resolve
|
|
181
|
+
* @param rrtype - DNS record type "ANY"
|
|
182
|
+
* @returns Promise resolving to an array of any DNS records
|
|
183
|
+
*/
|
|
184
|
+
resolve(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
|
|
185
|
+
/**
|
|
186
|
+
* Resolves ANY records for a hostname with a specific provider
|
|
187
|
+
* @param hostname - The hostname to resolve
|
|
188
|
+
* @param rrtype - DNS record type "ANY"
|
|
189
|
+
* @param provider - The DNS provider to use
|
|
190
|
+
* @returns Promise resolving to an array of any DNS records
|
|
191
|
+
*/
|
|
192
|
+
resolve(hostname: string, rrtype: "ANY", provider: ProviderName): Promise<AnyRecord[]>;
|
|
193
|
+
/**
|
|
194
|
+
* Resolves CAA records for a hostname
|
|
195
|
+
* @param hostname - The hostname to resolve
|
|
196
|
+
* @param rrtype - DNS record type "CAA"
|
|
197
|
+
* @returns Promise resolving to an array of CAA records
|
|
198
|
+
*/
|
|
199
|
+
resolve(hostname: string, rrtype: "CAA"): Promise<CaaRecord[]>;
|
|
200
|
+
/**
|
|
201
|
+
* Resolves CAA records for a hostname with a specific provider
|
|
202
|
+
* @param hostname - The hostname to resolve
|
|
203
|
+
* @param rrtype - DNS record type "CAA"
|
|
204
|
+
* @param provider - The DNS provider to use
|
|
205
|
+
* @returns Promise resolving to an array of CAA records
|
|
206
|
+
*/
|
|
207
|
+
resolve(hostname: string, rrtype: "CAA", provider: ProviderName): Promise<CaaRecord[]>;
|
|
208
|
+
/**
|
|
209
|
+
* Resolves CNAME records for a hostname
|
|
210
|
+
* @param hostname - The hostname to resolve
|
|
211
|
+
* @param rrtype - DNS record type "CNAME"
|
|
212
|
+
* @returns Promise resolving to an array of canonical names
|
|
213
|
+
*/
|
|
214
|
+
resolve(hostname: string, rrtype: "CNAME"): Promise<string[]>;
|
|
215
|
+
/**
|
|
216
|
+
* Resolves CNAME records for a hostname with a specific provider
|
|
217
|
+
* @param hostname - The hostname to resolve
|
|
218
|
+
* @param rrtype - DNS record type "CNAME"
|
|
219
|
+
* @param provider - The DNS provider to use
|
|
220
|
+
* @returns Promise resolving to an array of canonical names
|
|
221
|
+
*/
|
|
222
|
+
resolve(hostname: string, rrtype: "CNAME", provider: ProviderName): Promise<string[]>;
|
|
223
|
+
/**
|
|
224
|
+
* Resolves MX records for a hostname
|
|
225
|
+
* @param hostname - The hostname to resolve
|
|
226
|
+
* @param rrtype - DNS record type "MX"
|
|
227
|
+
* @returns Promise resolving to an array of mail exchange records
|
|
228
|
+
*/
|
|
229
|
+
resolve(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
|
|
230
|
+
/**
|
|
231
|
+
* Resolves MX records for a hostname with a specific provider
|
|
232
|
+
* @param hostname - The hostname to resolve
|
|
233
|
+
* @param rrtype - DNS record type "MX"
|
|
234
|
+
* @param provider - The DNS provider to use
|
|
235
|
+
* @returns Promise resolving to an array of mail exchange records
|
|
236
|
+
*/
|
|
237
|
+
resolve(hostname: string, rrtype: "MX", provider: ProviderName): Promise<MxRecord[]>;
|
|
238
|
+
/**
|
|
239
|
+
* Resolves NAPTR records for a hostname
|
|
240
|
+
* @param hostname - The hostname to resolve
|
|
241
|
+
* @param rrtype - DNS record type "NAPTR"
|
|
242
|
+
* @returns Promise resolving to an array of NAPTR records
|
|
243
|
+
*/
|
|
244
|
+
resolve(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
|
|
245
|
+
/**
|
|
246
|
+
* Resolves NAPTR records for a hostname with a specific provider
|
|
247
|
+
* @param hostname - The hostname to resolve
|
|
248
|
+
* @param rrtype - DNS record type "NAPTR"
|
|
249
|
+
* @param provider - The DNS provider to use
|
|
250
|
+
* @returns Promise resolving to an array of NAPTR records
|
|
251
|
+
*/
|
|
252
|
+
resolve(hostname: string, rrtype: "NAPTR", provider: ProviderName): Promise<NaptrRecord[]>;
|
|
253
|
+
/**
|
|
254
|
+
* Resolves NS records for a hostname
|
|
255
|
+
* @param hostname - The hostname to resolve
|
|
256
|
+
* @param rrtype - DNS record type "NS"
|
|
257
|
+
* @returns Promise resolving to an array of nameserver hostnames
|
|
258
|
+
*/
|
|
259
|
+
resolve(hostname: string, rrtype: "NS"): Promise<string[]>;
|
|
260
|
+
/**
|
|
261
|
+
* Resolves NS records for a hostname with a specific provider
|
|
262
|
+
* @param hostname - The hostname to resolve
|
|
263
|
+
* @param rrtype - DNS record type "NS"
|
|
264
|
+
* @param provider - The DNS provider to use
|
|
265
|
+
* @returns Promise resolving to an array of nameserver hostnames
|
|
266
|
+
*/
|
|
267
|
+
resolve(hostname: string, rrtype: "NS", provider: ProviderName): Promise<string[]>;
|
|
268
|
+
/**
|
|
269
|
+
* Resolves PTR records for a hostname
|
|
270
|
+
* @param hostname - The hostname to resolve
|
|
271
|
+
* @param rrtype - DNS record type "PTR"
|
|
272
|
+
* @returns Promise resolving to an array of pointer records
|
|
273
|
+
*/
|
|
274
|
+
resolve(hostname: string, rrtype: "PTR"): Promise<string[]>;
|
|
275
|
+
/**
|
|
276
|
+
* Resolves PTR records for a hostname with a specific provider
|
|
277
|
+
* @param hostname - The hostname to resolve
|
|
278
|
+
* @param rrtype - DNS record type "PTR"
|
|
279
|
+
* @param provider - The DNS provider to use
|
|
280
|
+
* @returns Promise resolving to an array of pointer records
|
|
281
|
+
*/
|
|
282
|
+
resolve(hostname: string, rrtype: "PTR", provider: ProviderName): Promise<string[]>;
|
|
283
|
+
/**
|
|
284
|
+
* Resolves SOA record for a hostname
|
|
285
|
+
* @param hostname - The hostname to resolve
|
|
286
|
+
* @param rrtype - DNS record type "SOA"
|
|
287
|
+
* @returns Promise resolving to a start of authority record
|
|
288
|
+
*/
|
|
289
|
+
resolve(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
|
|
290
|
+
/**
|
|
291
|
+
* Resolves SOA record for a hostname with a specific provider
|
|
292
|
+
* @param hostname - The hostname to resolve
|
|
293
|
+
* @param rrtype - DNS record type "SOA"
|
|
294
|
+
* @param provider - The DNS provider to use
|
|
295
|
+
* @returns Promise resolving to a start of authority record
|
|
296
|
+
*/
|
|
297
|
+
resolve(hostname: string, rrtype: "SOA", provider: ProviderName): Promise<SoaRecord>;
|
|
298
|
+
/**
|
|
299
|
+
* Resolves SRV records for a hostname
|
|
300
|
+
* @param hostname - The hostname to resolve
|
|
301
|
+
* @param rrtype - DNS record type "SRV"
|
|
302
|
+
* @returns Promise resolving to an array of service records
|
|
303
|
+
*/
|
|
304
|
+
resolve(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
|
|
305
|
+
/**
|
|
306
|
+
* Resolves SRV records for a hostname with a specific provider
|
|
307
|
+
* @param hostname - The hostname to resolve
|
|
308
|
+
* @param rrtype - DNS record type "SRV"
|
|
309
|
+
* @param provider - The DNS provider to use
|
|
310
|
+
* @returns Promise resolving to an array of service records
|
|
311
|
+
*/
|
|
312
|
+
resolve(hostname: string, rrtype: "SRV", provider: ProviderName): Promise<SrvRecord[]>;
|
|
313
|
+
/**
|
|
314
|
+
* Resolves TLSA records for a hostname
|
|
315
|
+
* @param hostname - The hostname to resolve
|
|
316
|
+
* @param rrtype - DNS record type "TLSA"
|
|
317
|
+
* @returns Promise resolving to an array of TLSA records
|
|
318
|
+
*/
|
|
319
|
+
resolve(hostname: string, rrtype: "TLSA"): Promise<TlsaRecord[]>;
|
|
320
|
+
/**
|
|
321
|
+
* Resolves TLSA records for a hostname with a specific provider
|
|
322
|
+
* @param hostname - The hostname to resolve
|
|
323
|
+
* @param rrtype - DNS record type "TLSA"
|
|
324
|
+
* @param provider - The DNS provider to use
|
|
325
|
+
* @returns Promise resolving to an array of TLSA records
|
|
326
|
+
*/
|
|
327
|
+
resolve(hostname: string, rrtype: "TLSA", provider: ProviderName): Promise<TlsaRecord[]>;
|
|
328
|
+
/**
|
|
329
|
+
* Resolves TXT records for a hostname
|
|
330
|
+
* @param hostname - The hostname to resolve
|
|
331
|
+
* @param rrtype - DNS record type "TXT"
|
|
332
|
+
* @returns Promise resolving to an array of text record arrays
|
|
333
|
+
*/
|
|
334
|
+
resolve(hostname: string, rrtype: "TXT"): Promise<string[][]>;
|
|
335
|
+
/**
|
|
336
|
+
* Resolves TXT records for a hostname with a specific provider
|
|
337
|
+
* @param hostname - The hostname to resolve
|
|
338
|
+
* @param rrtype - DNS record type "TXT"
|
|
339
|
+
* @param provider - The DNS provider to use
|
|
340
|
+
* @returns Promise resolving to an array of text record arrays
|
|
341
|
+
*/
|
|
342
|
+
resolve(hostname: string, rrtype: "TXT", provider: ProviderName): Promise<string[][]>;
|
|
343
|
+
/**
|
|
344
|
+
* Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv4
|
|
345
|
+
* addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`).
|
|
346
|
+
* @since v10.6.0
|
|
347
|
+
* @param hostname Host name to resolve.
|
|
348
|
+
*/
|
|
349
|
+
resolve4(hostname: string): Promise<string[]>;
|
|
350
|
+
resolve4(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
|
|
351
|
+
resolve4(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
|
|
352
|
+
/**
|
|
353
|
+
* Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the `hostname` using a specific provider.
|
|
354
|
+
* @param hostname Host name to resolve.
|
|
355
|
+
* @param provider The DNS provider to use for resolution.
|
|
356
|
+
*/
|
|
357
|
+
resolve4(hostname: string, provider: ProviderName): Promise<string[]>;
|
|
358
|
+
/**
|
|
359
|
+
* Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the `hostname` with TTL using a specific provider.
|
|
360
|
+
* @param hostname Host name to resolve.
|
|
361
|
+
* @param options Resolution options with TTL enabled.
|
|
362
|
+
* @param provider The DNS provider to use for resolution.
|
|
363
|
+
*/
|
|
364
|
+
resolve4(hostname: string, options: ResolveWithTtlOptions, provider: ProviderName): Promise<RecordWithTtl[]>;
|
|
365
|
+
/**
|
|
366
|
+
* Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the `hostname` with options using a specific provider.
|
|
367
|
+
* @param hostname Host name to resolve.
|
|
368
|
+
* @param options Resolution options.
|
|
369
|
+
* @param provider The DNS provider to use for resolution.
|
|
370
|
+
*/
|
|
371
|
+
resolve4(hostname: string, options: ResolveOptions, provider: ProviderName): Promise<string[] | RecordWithTtl[]>;
|
|
372
|
+
resolve4(hostname: string, options: AbortOptions): Promise<string[]>;
|
|
373
|
+
resolve4(hostname: string, options: AbortOptions, provider: ProviderName): Promise<string[]>;
|
|
374
|
+
resolve4(hostname: string, options: ResolveOptions & AbortOptions): Promise<string[] | RecordWithTtl[]>;
|
|
375
|
+
resolve4(hostname: string, options: ResolveOptions & AbortOptions, provider: ProviderName): Promise<string[] | RecordWithTtl[]>;
|
|
376
|
+
/**
|
|
377
|
+
* Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv6
|
|
378
|
+
* addresses.
|
|
379
|
+
* @since v10.6.0
|
|
380
|
+
* @param hostname Host name to resolve.
|
|
381
|
+
*/
|
|
382
|
+
resolve6(hostname: string): Promise<string[]>;
|
|
383
|
+
resolve6(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
|
|
384
|
+
resolve6(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
|
|
385
|
+
/**
|
|
386
|
+
* Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname` using a specific provider.
|
|
387
|
+
* @param hostname Host name to resolve.
|
|
388
|
+
* @param provider The DNS provider to use for resolution.
|
|
389
|
+
*/
|
|
390
|
+
resolve6(hostname: string, provider: ProviderName): Promise<string[]>;
|
|
391
|
+
/**
|
|
392
|
+
* Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname` with TTL using a specific provider.
|
|
393
|
+
* @param hostname Host name to resolve.
|
|
394
|
+
* @param options Resolution options with TTL enabled.
|
|
395
|
+
* @param provider The DNS provider to use for resolution.
|
|
396
|
+
*/
|
|
397
|
+
resolve6(hostname: string, options: ResolveWithTtlOptions, provider: ProviderName): Promise<RecordWithTtl[]>;
|
|
398
|
+
/**
|
|
399
|
+
* Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname` with options using a specific provider.
|
|
400
|
+
* @param hostname Host name to resolve.
|
|
401
|
+
* @param options Resolution options.
|
|
402
|
+
* @param provider The DNS provider to use for resolution.
|
|
403
|
+
*/
|
|
404
|
+
resolve6(hostname: string, options: ResolveOptions, provider: ProviderName): Promise<string[] | RecordWithTtl[]>;
|
|
405
|
+
resolve6(hostname: string, options: AbortOptions): Promise<string[]>;
|
|
406
|
+
resolve6(hostname: string, options: AbortOptions, provider: ProviderName): Promise<string[]>;
|
|
407
|
+
resolve6(hostname: string, options: ResolveOptions & AbortOptions): Promise<string[] | RecordWithTtl[]>;
|
|
408
|
+
resolve6(hostname: string, options: ResolveOptions & AbortOptions, provider: ProviderName): Promise<string[] | RecordWithTtl[]>;
|
|
409
|
+
/**
|
|
410
|
+
* Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query).
|
|
411
|
+
* On success, the `Promise` is resolved with an array containing various types of
|
|
412
|
+
* records. Each object has a property `type` that indicates the type of the
|
|
413
|
+
* current record. And depending on the `type`, additional properties will be
|
|
414
|
+
* present on the object:
|
|
415
|
+
*
|
|
416
|
+
* <omitted>
|
|
417
|
+
*
|
|
418
|
+
* Here is an example of the result object:
|
|
419
|
+
*
|
|
420
|
+
* ```js
|
|
421
|
+
* [ { type: 'A', address: '127.0.0.1', ttl: 299 },
|
|
422
|
+
* { type: 'CNAME', value: 'example.com' },
|
|
423
|
+
* { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 },
|
|
424
|
+
* { type: 'NS', value: 'ns1.example.com' },
|
|
425
|
+
* { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] },
|
|
426
|
+
* { type: 'SOA',
|
|
427
|
+
* nsname: 'ns1.example.com',
|
|
428
|
+
* hostmaster: 'admin.example.com',
|
|
429
|
+
* serial: 156696742,
|
|
430
|
+
* refresh: 900,
|
|
431
|
+
* retry: 900,
|
|
432
|
+
* expire: 1800,
|
|
433
|
+
* minttl: 60 } ]
|
|
434
|
+
* ```
|
|
435
|
+
* @since v10.6.0
|
|
436
|
+
*/
|
|
437
|
+
resolveAny(hostname: string): Promise<AnyRecord[]>;
|
|
438
|
+
/**
|
|
439
|
+
* Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query) using a specific provider.
|
|
440
|
+
* @param hostname Host name to resolve.
|
|
441
|
+
* @param provider The DNS provider to use for resolution.
|
|
442
|
+
*/
|
|
443
|
+
resolveAny(hostname: string, provider: ProviderName): Promise<AnyRecord[]>;
|
|
444
|
+
resolveAny(hostname: string, options: AbortOptions): Promise<AnyRecord[]>;
|
|
445
|
+
resolveAny(hostname: string, options: AbortOptions, provider: ProviderName): Promise<AnyRecord[]>;
|
|
446
|
+
/**
|
|
447
|
+
* Uses the DNS protocol to resolve `CAA` records for the `hostname`. On success,
|
|
448
|
+
* the `Promise` is resolved with an array of objects containing available
|
|
449
|
+
* certification authority authorization records available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]`).
|
|
450
|
+
* @since v15.0.0, v14.17.0
|
|
451
|
+
*/
|
|
452
|
+
resolveCaa(hostname: string): Promise<CaaRecord[]>;
|
|
453
|
+
/**
|
|
454
|
+
* Uses the DNS protocol to resolve `CAA` records for the `hostname` using a specific provider.
|
|
455
|
+
* @param hostname Host name to resolve.
|
|
456
|
+
* @param provider The DNS provider to use for resolution.
|
|
457
|
+
*/
|
|
458
|
+
resolveCaa(hostname: string, provider: ProviderName): Promise<CaaRecord[]>;
|
|
459
|
+
resolveCaa(hostname: string, options: AbortOptions): Promise<CaaRecord[]>;
|
|
460
|
+
resolveCaa(hostname: string, options: AbortOptions, provider: ProviderName): Promise<CaaRecord[]>;
|
|
461
|
+
/**
|
|
462
|
+
* Uses the DNS protocol to resolve `CNAME` records for the `hostname`. On success,
|
|
463
|
+
* the `Promise` is resolved with an array of canonical name records available for
|
|
464
|
+
* the `hostname` (e.g. `['bar.example.com']`).
|
|
465
|
+
* @since v10.6.0
|
|
466
|
+
*/
|
|
467
|
+
resolveCname(hostname: string): Promise<string[]>;
|
|
468
|
+
/**
|
|
469
|
+
* Uses the DNS protocol to resolve `CNAME` records for the `hostname` using a specific provider.
|
|
470
|
+
* @param hostname Host name to resolve.
|
|
471
|
+
* @param provider The DNS provider to use for resolution.
|
|
472
|
+
*/
|
|
473
|
+
resolveCname(hostname: string, provider: ProviderName): Promise<string[]>;
|
|
474
|
+
resolveCname(hostname: string, options: AbortOptions): Promise<string[]>;
|
|
475
|
+
resolveCname(hostname: string, options: AbortOptions, provider: ProviderName): Promise<string[]>;
|
|
476
|
+
/**
|
|
477
|
+
* Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects
|
|
478
|
+
* containing both a `priority` and `exchange` property (e.g.`[{priority: 10, exchange: 'mx.example.com'}, ...]`).
|
|
479
|
+
* @since v10.6.0
|
|
480
|
+
*/
|
|
481
|
+
resolveMx(hostname: string): Promise<MxRecord[]>;
|
|
482
|
+
/**
|
|
483
|
+
* Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname` using a specific provider.
|
|
484
|
+
* @param hostname Host name to resolve.
|
|
485
|
+
* @param provider The DNS provider to use for resolution.
|
|
486
|
+
*/
|
|
487
|
+
resolveMx(hostname: string, provider: ProviderName): Promise<MxRecord[]>;
|
|
488
|
+
resolveMx(hostname: string, options: AbortOptions): Promise<MxRecord[]>;
|
|
489
|
+
resolveMx(hostname: string, options: AbortOptions, provider: ProviderName): Promise<MxRecord[]>;
|
|
490
|
+
/**
|
|
491
|
+
* Uses the DNS protocol to resolve regular expression-based records (`NAPTR` records) for the `hostname`. On success, the `Promise` is resolved with an array
|
|
492
|
+
* of objects with the following properties:
|
|
493
|
+
*
|
|
494
|
+
* * `flags`
|
|
495
|
+
* * `service`
|
|
496
|
+
* * `regexp`
|
|
497
|
+
* * `replacement`
|
|
498
|
+
* * `order`
|
|
499
|
+
* * `preference`
|
|
500
|
+
*
|
|
501
|
+
* ```js
|
|
502
|
+
* {
|
|
503
|
+
* flags: 's',
|
|
504
|
+
* service: 'SIP+D2U',
|
|
505
|
+
* regexp: '',
|
|
506
|
+
* replacement: '_sip._udp.example.com',
|
|
507
|
+
* order: 30,
|
|
508
|
+
* preference: 100
|
|
509
|
+
* }
|
|
510
|
+
* ```
|
|
511
|
+
* @since v10.6.0
|
|
512
|
+
*/
|
|
513
|
+
resolveNaptr(hostname: string): Promise<NaptrRecord[]>;
|
|
514
|
+
/**
|
|
515
|
+
* Uses the DNS protocol to resolve regular expression-based records (`NAPTR` records) for the `hostname` using a specific provider.
|
|
516
|
+
* @param hostname Host name to resolve.
|
|
517
|
+
* @param provider The DNS provider to use for resolution.
|
|
518
|
+
*/
|
|
519
|
+
resolveNaptr(hostname: string, provider: ProviderName): Promise<NaptrRecord[]>;
|
|
520
|
+
resolveNaptr(hostname: string, options: AbortOptions): Promise<NaptrRecord[]>;
|
|
521
|
+
resolveNaptr(hostname: string, options: AbortOptions, provider: ProviderName): Promise<NaptrRecord[]>;
|
|
522
|
+
/**
|
|
523
|
+
* Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. On success, the `Promise` is resolved with an array of name server
|
|
524
|
+
* records available for `hostname` (e.g.`['ns1.example.com', 'ns2.example.com']`).
|
|
525
|
+
* @since v10.6.0
|
|
526
|
+
*/
|
|
527
|
+
resolveNs(hostname: string): Promise<string[]>;
|
|
528
|
+
/**
|
|
529
|
+
* Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname` using a specific provider.
|
|
530
|
+
* @param hostname Host name to resolve.
|
|
531
|
+
* @param provider The DNS provider to use for resolution.
|
|
532
|
+
*/
|
|
533
|
+
resolveNs(hostname: string, provider: ProviderName): Promise<string[]>;
|
|
534
|
+
resolveNs(hostname: string, options: AbortOptions): Promise<string[]>;
|
|
535
|
+
resolveNs(hostname: string, options: AbortOptions, provider: ProviderName): Promise<string[]>;
|
|
536
|
+
/**
|
|
537
|
+
* Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. On success, the `Promise` is resolved with an array of strings
|
|
538
|
+
* containing the reply records.
|
|
539
|
+
* @since v10.6.0
|
|
540
|
+
*/
|
|
541
|
+
resolvePtr(hostname: string): Promise<string[]>;
|
|
542
|
+
/**
|
|
543
|
+
* Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname` using a specific provider.
|
|
544
|
+
* @param hostname Host name to resolve.
|
|
545
|
+
* @param provider The DNS provider to use for resolution.
|
|
546
|
+
*/
|
|
547
|
+
resolvePtr(hostname: string, provider: ProviderName): Promise<string[]>;
|
|
548
|
+
resolvePtr(hostname: string, options: AbortOptions): Promise<string[]>;
|
|
549
|
+
resolvePtr(hostname: string, options: AbortOptions, provider: ProviderName): Promise<string[]>;
|
|
550
|
+
/**
|
|
551
|
+
* Uses the DNS protocol to resolve a start of authority record (`SOA` record) for
|
|
552
|
+
* the `hostname`. On success, the `Promise` is resolved with an object with the
|
|
553
|
+
* following properties:
|
|
554
|
+
*
|
|
555
|
+
* * `nsname`
|
|
556
|
+
* * `hostmaster`
|
|
557
|
+
* * `serial`
|
|
558
|
+
* * `refresh`
|
|
559
|
+
* * `retry`
|
|
560
|
+
* * `expire`
|
|
561
|
+
* * `minttl`
|
|
562
|
+
*
|
|
563
|
+
* ```js
|
|
564
|
+
* {
|
|
565
|
+
* nsname: 'ns.example.com',
|
|
566
|
+
* hostmaster: 'root.example.com',
|
|
567
|
+
* serial: 2013101809,
|
|
568
|
+
* refresh: 10000,
|
|
569
|
+
* retry: 2400,
|
|
570
|
+
* expire: 604800,
|
|
571
|
+
* minttl: 3600
|
|
572
|
+
* }
|
|
573
|
+
* ```
|
|
574
|
+
* @since v10.6.0
|
|
575
|
+
*/
|
|
576
|
+
resolveSoa(hostname: string): Promise<SoaRecord>;
|
|
577
|
+
/**
|
|
578
|
+
* Uses the DNS protocol to resolve a start of authority record (`SOA` record) for the `hostname` using a specific provider.
|
|
579
|
+
* @param hostname Host name to resolve.
|
|
580
|
+
* @param provider The DNS provider to use for resolution.
|
|
581
|
+
*/
|
|
582
|
+
resolveSoa(hostname: string, provider: ProviderName): Promise<SoaRecord>;
|
|
583
|
+
resolveSoa(hostname: string, options: AbortOptions): Promise<SoaRecord>;
|
|
584
|
+
resolveSoa(hostname: string, options: AbortOptions, provider: ProviderName): Promise<SoaRecord>;
|
|
585
|
+
/**
|
|
586
|
+
* Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects with
|
|
587
|
+
* the following properties:
|
|
588
|
+
*
|
|
589
|
+
* * `priority`
|
|
590
|
+
* * `weight`
|
|
591
|
+
* * `port`
|
|
592
|
+
* * `name`
|
|
593
|
+
*
|
|
594
|
+
* ```js
|
|
595
|
+
* {
|
|
596
|
+
* priority: 10,
|
|
597
|
+
* weight: 5,
|
|
598
|
+
* port: 21223,
|
|
599
|
+
* name: 'service.example.com'
|
|
600
|
+
* }
|
|
601
|
+
* ```
|
|
602
|
+
* @since v10.6.0
|
|
603
|
+
*/
|
|
604
|
+
resolveSrv(hostname: string): Promise<SrvRecord[]>;
|
|
605
|
+
/**
|
|
606
|
+
* Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname` using a specific provider.
|
|
607
|
+
* @param hostname Host name to resolve.
|
|
608
|
+
* @param provider The DNS provider to use for resolution.
|
|
609
|
+
*/
|
|
610
|
+
resolveSrv(hostname: string, provider: ProviderName): Promise<SrvRecord[]>;
|
|
611
|
+
resolveSrv(hostname: string, options: AbortOptions): Promise<SrvRecord[]>;
|
|
612
|
+
resolveSrv(hostname: string, options: AbortOptions, provider: ProviderName): Promise<SrvRecord[]>;
|
|
613
|
+
/**
|
|
614
|
+
* Uses the DNS protocol to resolve certificate associations (`TLSA` records) for
|
|
615
|
+
* the `hostname`. On success, the `Promise` is resolved with an array of objectsAdd commentMore actions
|
|
616
|
+
* with these properties:
|
|
617
|
+
*
|
|
618
|
+
* * `certUsage`
|
|
619
|
+
* * `selector`
|
|
620
|
+
* * `match`
|
|
621
|
+
* * `data`
|
|
622
|
+
*
|
|
623
|
+
* ```js
|
|
624
|
+
* {
|
|
625
|
+
* certUsage: 3,
|
|
626
|
+
* selector: 1,
|
|
627
|
+
* match: 1,
|
|
628
|
+
* data: [ArrayBuffer]
|
|
629
|
+
* }
|
|
630
|
+
* ```
|
|
631
|
+
* @since v23.9.0, v22.15.0
|
|
632
|
+
*/
|
|
633
|
+
resolveTlsa(hostname: string): Promise<TlsaRecord[]>;
|
|
634
|
+
/**
|
|
635
|
+
* Uses the DNS protocol to resolve certificate associations (`TLSA` records) for the `hostname` using a specific provider.
|
|
636
|
+
* @param hostname Host name to resolve.
|
|
637
|
+
* @param provider The DNS provider to use for resolution.
|
|
638
|
+
*/
|
|
639
|
+
resolveTlsa(hostname: string, provider: ProviderName): Promise<TlsaRecord[]>;
|
|
640
|
+
resolveTlsa(hostname: string, options: AbortOptions): Promise<TlsaRecord[]>;
|
|
641
|
+
resolveTlsa(hostname: string, options: AbortOptions, provider: ProviderName): Promise<TlsaRecord[]>;
|
|
642
|
+
/**
|
|
643
|
+
* Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. On success, the `Promise` is resolved with a two-dimensional array
|
|
644
|
+
* of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
|
|
645
|
+
* one record. Depending on the use case, these could be either joined together or
|
|
646
|
+
* treated separately.
|
|
647
|
+
* @since v10.6.0
|
|
648
|
+
*/
|
|
649
|
+
resolveTxt(hostname: string): Promise<string[][]>;
|
|
650
|
+
/**
|
|
651
|
+
* Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname` using a specific provider.
|
|
652
|
+
* @param hostname Host name to resolve.
|
|
653
|
+
* @param provider The DNS provider to use for resolution.
|
|
654
|
+
*/
|
|
655
|
+
resolveTxt(hostname: string, provider: ProviderName): Promise<string[][]>;
|
|
656
|
+
resolveTxt(hostname: string, options: AbortOptions): Promise<string[][]>;
|
|
657
|
+
resolveTxt(hostname: string, options: AbortOptions, provider: ProviderName): Promise<string[][]>;
|
|
658
|
+
/**
|
|
659
|
+
* Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
|
|
660
|
+
* array of host names.
|
|
661
|
+
*
|
|
662
|
+
* On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code`
|
|
663
|
+
* is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes).
|
|
664
|
+
* @since v10.6.0
|
|
665
|
+
*/
|
|
666
|
+
reverse(ip: string): Promise<string[]>;
|
|
667
|
+
/**
|
|
668
|
+
* Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an array of host names using a specific provider.
|
|
669
|
+
* @param ip IPv4 or IPv6 address to reverse resolve.
|
|
670
|
+
* @param provider The DNS provider to use for resolution.
|
|
671
|
+
*/
|
|
672
|
+
reverse(ip: string, provider: ProviderName): Promise<string[]>;
|
|
673
|
+
reverse(ip: string, options: AbortOptions): Promise<string[]>;
|
|
674
|
+
reverse(ip: string, options: AbortOptions, provider: ProviderName): Promise<string[]>;
|
|
675
|
+
}
|
|
676
|
+
declare const EmailProviders: readonly [
|
|
677
|
+
{
|
|
678
|
+
readonly name: "Gmail";
|
|
679
|
+
readonly domains: readonly [
|
|
680
|
+
"@gmail.com",
|
|
681
|
+
"@googlemail.com"
|
|
682
|
+
];
|
|
683
|
+
},
|
|
684
|
+
{
|
|
685
|
+
readonly name: "Outlook";
|
|
686
|
+
readonly domains: readonly [
|
|
687
|
+
"@outlook.com",
|
|
688
|
+
"@hotmail.com",
|
|
689
|
+
"@hotmail.co.uk",
|
|
690
|
+
"@hotmail.fr",
|
|
691
|
+
"@hotmail.it",
|
|
692
|
+
"@hotmail.es",
|
|
693
|
+
"@hotmail.de",
|
|
694
|
+
"@live.com",
|
|
695
|
+
"@live.co.uk",
|
|
696
|
+
"@live.fr",
|
|
697
|
+
"@live.nl",
|
|
698
|
+
"@live.it",
|
|
699
|
+
"@live.com.au",
|
|
700
|
+
"@live.ca",
|
|
701
|
+
"@msn.com"
|
|
702
|
+
];
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
readonly name: "Yahoo";
|
|
706
|
+
readonly domains: readonly [
|
|
707
|
+
"@yahoo.com",
|
|
708
|
+
"@yahoo.co.uk",
|
|
709
|
+
"@yahoo.fr",
|
|
710
|
+
"@yahoo.com.br",
|
|
711
|
+
"@yahoo.co.in",
|
|
712
|
+
"@yahoo.es",
|
|
713
|
+
"@yahoo.it",
|
|
714
|
+
"@yahoo.de",
|
|
715
|
+
"@yahoo.in",
|
|
716
|
+
"@yahoo.ca",
|
|
717
|
+
"@yahoo.com.au",
|
|
718
|
+
"@yahoo.co.jp",
|
|
719
|
+
"@yahoo.com.ar",
|
|
720
|
+
"@yahoo.com.mx",
|
|
721
|
+
"@yahoo.co.id",
|
|
722
|
+
"@yahoo.com.sg",
|
|
723
|
+
"@ymail.com",
|
|
724
|
+
"@rocketmail.com",
|
|
725
|
+
"@yahoo.at",
|
|
726
|
+
"@yahoo.be",
|
|
727
|
+
"@yahoo.bg",
|
|
728
|
+
"@yahoo.cl",
|
|
729
|
+
"@yahoo.co.hu",
|
|
730
|
+
"@yahoo.co.kr",
|
|
731
|
+
"@yahoo.co.nz",
|
|
732
|
+
"@yahoo.co.th",
|
|
733
|
+
"@yahoo.co.za",
|
|
734
|
+
"@yahoo.com.hk",
|
|
735
|
+
"@yahoo.com.hr",
|
|
736
|
+
"@yahoo.com.my",
|
|
737
|
+
"@yahoo.com.pe",
|
|
738
|
+
"@yahoo.com.ph",
|
|
739
|
+
"@yahoo.com.tr",
|
|
740
|
+
"@yahoo.com.tw",
|
|
741
|
+
"@yahoo.com.ua",
|
|
742
|
+
"@yahoo.com.ve",
|
|
743
|
+
"@yahoo.com.vn",
|
|
744
|
+
"@yahoo.cz",
|
|
745
|
+
"@yahoo.dk",
|
|
746
|
+
"@yahoo.ee",
|
|
747
|
+
"@yahoo.fi",
|
|
748
|
+
"@yahoo.gr",
|
|
749
|
+
"@yahoo.hr",
|
|
750
|
+
"@yahoo.hu",
|
|
751
|
+
"@yahoo.ie",
|
|
752
|
+
"@yahoo.lt",
|
|
753
|
+
"@yahoo.lv",
|
|
754
|
+
"@yahoo.nl",
|
|
755
|
+
"@yahoo.no",
|
|
756
|
+
"@yahoo.pl",
|
|
757
|
+
"@yahoo.pt",
|
|
758
|
+
"@yahoo.ro",
|
|
759
|
+
"@yahoo.rs",
|
|
760
|
+
"@yahoo.se",
|
|
761
|
+
"@yahoo.si",
|
|
762
|
+
"@yahoo.sk"
|
|
763
|
+
];
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
readonly name: "AOL";
|
|
767
|
+
readonly domains: readonly [
|
|
768
|
+
"@aol.com",
|
|
769
|
+
"@aim.com"
|
|
770
|
+
];
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
readonly name: "iCloud";
|
|
774
|
+
readonly domains: readonly [
|
|
775
|
+
"@icloud.com",
|
|
776
|
+
"@me.com",
|
|
777
|
+
"@mac.com"
|
|
778
|
+
];
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
readonly name: "ProtonMail";
|
|
782
|
+
readonly domains: readonly [
|
|
783
|
+
"@protonmail.com",
|
|
784
|
+
"@protonmail.ch",
|
|
785
|
+
"@pm.me",
|
|
786
|
+
"@proton.me"
|
|
787
|
+
];
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
readonly name: "Zoho";
|
|
791
|
+
readonly domains: readonly [
|
|
792
|
+
"@zoho.com",
|
|
793
|
+
"@zohomail.com"
|
|
794
|
+
];
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
readonly name: "Mail.ru";
|
|
798
|
+
readonly domains: readonly [
|
|
799
|
+
"@mail.ru",
|
|
800
|
+
"@bk.ru",
|
|
801
|
+
"@inbox.ru",
|
|
802
|
+
"@list.ru",
|
|
803
|
+
"@internet.ru",
|
|
804
|
+
"@corp.mail.ru",
|
|
805
|
+
"@ro.ru",
|
|
806
|
+
"@rbcmail.ru",
|
|
807
|
+
"@hotbox.ru",
|
|
808
|
+
"@mail15.com",
|
|
809
|
+
"@pochta.ru",
|
|
810
|
+
"@fromru.com",
|
|
811
|
+
"@front.ru",
|
|
812
|
+
"@krovatka.su",
|
|
813
|
+
"@land.ru",
|
|
814
|
+
"@newmail.ru",
|
|
815
|
+
"@nightmail.ru",
|
|
816
|
+
"@nm.ru",
|
|
817
|
+
"@pisem.net",
|
|
818
|
+
"@pochtamt.ru",
|
|
819
|
+
"@pop3.ru",
|
|
820
|
+
"@smtp.ru",
|
|
821
|
+
"@mail333.com",
|
|
822
|
+
"@mailru.com",
|
|
823
|
+
"@e-mail.ru",
|
|
824
|
+
"@email.ru",
|
|
825
|
+
"@emailru.com",
|
|
826
|
+
"@mail.ua",
|
|
827
|
+
"@bigmir.net",
|
|
828
|
+
"@ukr.net",
|
|
829
|
+
"@i.ua",
|
|
830
|
+
"@meta.ua",
|
|
831
|
+
"@online.ua",
|
|
832
|
+
"@yandex.ua",
|
|
833
|
+
"@yandex.by",
|
|
834
|
+
"@yandex.kz",
|
|
835
|
+
"@narod.ru",
|
|
836
|
+
"@lenta.ru",
|
|
837
|
+
"@autorambler.ru",
|
|
838
|
+
"@myrambler.ru",
|
|
839
|
+
"@r0.ru",
|
|
840
|
+
"@rambler.ua",
|
|
841
|
+
"@qip.ru",
|
|
842
|
+
"@mail.kz",
|
|
843
|
+
"@nursat.kz",
|
|
844
|
+
"@kazmail.kz",
|
|
845
|
+
"@mail.kg",
|
|
846
|
+
"@mail.tj",
|
|
847
|
+
"@mail.uz",
|
|
848
|
+
"@tut.by",
|
|
849
|
+
"@mail.by",
|
|
850
|
+
"@open.by",
|
|
851
|
+
"@rambler.by",
|
|
852
|
+
"@mail.md",
|
|
853
|
+
"@mail.am",
|
|
854
|
+
"@mail.ge",
|
|
855
|
+
"@mail.az",
|
|
856
|
+
"@mail.lv",
|
|
857
|
+
"@mail.lt",
|
|
858
|
+
"@mail.ee",
|
|
859
|
+
"@delfi.lv",
|
|
860
|
+
"@inbox.lv",
|
|
861
|
+
"@apollo.lv",
|
|
862
|
+
"@one.lv",
|
|
863
|
+
"@parks.lv"
|
|
864
|
+
];
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
readonly name: "Yandex";
|
|
868
|
+
readonly domains: readonly [
|
|
869
|
+
"@yandex.ru",
|
|
870
|
+
"@yandex.com",
|
|
871
|
+
"@ya.ru"
|
|
872
|
+
];
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
readonly name: "GMX";
|
|
876
|
+
readonly domains: readonly [
|
|
877
|
+
"@gmx.com",
|
|
878
|
+
"@gmx.net",
|
|
879
|
+
"@gmx.de",
|
|
880
|
+
"@gmx.at",
|
|
881
|
+
"@gmx.ch"
|
|
882
|
+
];
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
readonly name: "Web.de";
|
|
886
|
+
readonly domains: readonly [
|
|
887
|
+
"@web.de"
|
|
888
|
+
];
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
readonly name: "Mail.com";
|
|
892
|
+
readonly domains: readonly [
|
|
893
|
+
"@mail.com",
|
|
894
|
+
"@email.com",
|
|
895
|
+
"@usa.com",
|
|
896
|
+
"@myself.com",
|
|
897
|
+
"@consultant.com",
|
|
898
|
+
"@post.com",
|
|
899
|
+
"@europe.com",
|
|
900
|
+
"@asia.com",
|
|
901
|
+
"@iname.com",
|
|
902
|
+
"@writeme.com",
|
|
903
|
+
"@techie.com",
|
|
904
|
+
"@accountant.com",
|
|
905
|
+
"@activist.com",
|
|
906
|
+
"@adexec.com",
|
|
907
|
+
"@allergist.com",
|
|
908
|
+
"@alumnidirector.com",
|
|
909
|
+
"@angelic.com",
|
|
910
|
+
"@appraiser.com",
|
|
911
|
+
"@archaeologist.com",
|
|
912
|
+
"@architect.com",
|
|
913
|
+
"@artlover.com",
|
|
914
|
+
"@asia-mail.com",
|
|
915
|
+
"@auctioneer.com",
|
|
916
|
+
"@bartender.com",
|
|
917
|
+
"@bikerider.com",
|
|
918
|
+
"@birdlover.com",
|
|
919
|
+
"@brew-master.com",
|
|
920
|
+
"@brew-meister.com",
|
|
921
|
+
"@chef.net",
|
|
922
|
+
"@chemist.com",
|
|
923
|
+
"@clerk.com",
|
|
924
|
+
"@clubmember.com",
|
|
925
|
+
"@collector.com",
|
|
926
|
+
"@columnist.com",
|
|
927
|
+
"@comic.com",
|
|
928
|
+
"@computer4u.com",
|
|
929
|
+
"@contractor.com",
|
|
930
|
+
"@coolsite.net",
|
|
931
|
+
"@counsellor.com",
|
|
932
|
+
"@count.com",
|
|
933
|
+
"@cyber-wizard.com",
|
|
934
|
+
"@cyberdude.com",
|
|
935
|
+
"@cybergal.com",
|
|
936
|
+
"@cyberservices.com",
|
|
937
|
+
"@dallasmail.com",
|
|
938
|
+
"@dbzmail.com",
|
|
939
|
+
"@deliveryman.com",
|
|
940
|
+
"@diplomats.com",
|
|
941
|
+
"@doctor.com",
|
|
942
|
+
"@dr.com",
|
|
943
|
+
"@engineer.com",
|
|
944
|
+
"@execs.com",
|
|
945
|
+
"@fastservice.com",
|
|
946
|
+
"@financialmail.com",
|
|
947
|
+
"@fireman.net",
|
|
948
|
+
"@gardener.com",
|
|
949
|
+
"@geologist.com",
|
|
950
|
+
"@graduate.org",
|
|
951
|
+
"@graphic-designer.com",
|
|
952
|
+
"@groupmail.com",
|
|
953
|
+
"@hairdresser.net",
|
|
954
|
+
"@homemail.com",
|
|
955
|
+
"@hot-shot.com",
|
|
956
|
+
"@humanoid.net",
|
|
957
|
+
"@instructor.net",
|
|
958
|
+
"@insurer.com",
|
|
959
|
+
"@journalist.com",
|
|
960
|
+
"@lawyer.com",
|
|
961
|
+
"@legislator.com",
|
|
962
|
+
"@lobbyist.com",
|
|
963
|
+
"@mad.scientist.com",
|
|
964
|
+
"@manager.com",
|
|
965
|
+
"@mathematician.com",
|
|
966
|
+
"@mechanic.com",
|
|
967
|
+
"@minister.com",
|
|
968
|
+
"@musician.org",
|
|
969
|
+
"@optician.com",
|
|
970
|
+
"@orthodontist.net",
|
|
971
|
+
"@pediatrician.com",
|
|
972
|
+
"@photographer.net",
|
|
973
|
+
"@physicist.net",
|
|
974
|
+
"@politician.com",
|
|
975
|
+
"@presidency.com",
|
|
976
|
+
"@priest.com",
|
|
977
|
+
"@programmer.net",
|
|
978
|
+
"@publicist.com",
|
|
979
|
+
"@realtyagent.com",
|
|
980
|
+
"@registrar.com",
|
|
981
|
+
"@repairman.com",
|
|
982
|
+
"@representative.com",
|
|
983
|
+
"@rescueteam.com",
|
|
984
|
+
"@salesperson.net",
|
|
985
|
+
"@scientist.com",
|
|
986
|
+
"@secretary.net",
|
|
987
|
+
"@socialworker.net",
|
|
988
|
+
"@sociologist.com",
|
|
989
|
+
"@solution4u.com",
|
|
990
|
+
"@songwriter.net",
|
|
991
|
+
"@surgical.net",
|
|
992
|
+
"@teacher.net",
|
|
993
|
+
"@technologist.com",
|
|
994
|
+
"@therapist.net",
|
|
995
|
+
"@toothfairy.com",
|
|
996
|
+
"@tvstar.com",
|
|
997
|
+
"@umpire.com",
|
|
998
|
+
"@webname.com",
|
|
999
|
+
"@worker.com",
|
|
1000
|
+
"@workmail.com"
|
|
1001
|
+
];
|
|
1002
|
+
},
|
|
1003
|
+
{
|
|
1004
|
+
readonly name: "Fastmail";
|
|
1005
|
+
readonly domains: readonly [
|
|
1006
|
+
"@fastmail.com",
|
|
1007
|
+
"@fastmail.fm"
|
|
1008
|
+
];
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
readonly name: "AT&T";
|
|
1012
|
+
readonly domains: readonly [
|
|
1013
|
+
"@att.net",
|
|
1014
|
+
"@sbcglobal.net",
|
|
1015
|
+
"@sbcglobal.com",
|
|
1016
|
+
"@ameritech.net",
|
|
1017
|
+
"@bellsouth.net",
|
|
1018
|
+
"@flash.net",
|
|
1019
|
+
"@prodigy.net",
|
|
1020
|
+
"@pacbell.net",
|
|
1021
|
+
"@nvbell.net",
|
|
1022
|
+
"@snet.net",
|
|
1023
|
+
"@swbell.net",
|
|
1024
|
+
"@wans.net",
|
|
1025
|
+
"@worldnet.att.net"
|
|
1026
|
+
];
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
readonly name: "Comcast";
|
|
1030
|
+
readonly domains: readonly [
|
|
1031
|
+
"@comcast.net"
|
|
1032
|
+
];
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
readonly name: "Verizon";
|
|
1036
|
+
readonly domains: readonly [
|
|
1037
|
+
"@verizon.net"
|
|
1038
|
+
];
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
readonly name: "Cox";
|
|
1042
|
+
readonly domains: readonly [
|
|
1043
|
+
"@cox.net"
|
|
1044
|
+
];
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
readonly name: "Charter";
|
|
1048
|
+
readonly domains: readonly [
|
|
1049
|
+
"@charter.net"
|
|
1050
|
+
];
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
readonly name: "Earthlink";
|
|
1054
|
+
readonly domains: readonly [
|
|
1055
|
+
"@earthlink.net"
|
|
1056
|
+
];
|
|
1057
|
+
},
|
|
1058
|
+
{
|
|
1059
|
+
readonly name: "Frontier";
|
|
1060
|
+
readonly domains: readonly [
|
|
1061
|
+
"@frontier.com",
|
|
1062
|
+
"@frontiernet.net",
|
|
1063
|
+
"@myfrontiermail.com",
|
|
1064
|
+
"@frontiernet.com"
|
|
1065
|
+
];
|
|
1066
|
+
},
|
|
1067
|
+
{
|
|
1068
|
+
readonly name: "Windstream";
|
|
1069
|
+
readonly domains: readonly [
|
|
1070
|
+
"@windstream.net"
|
|
1071
|
+
];
|
|
1072
|
+
},
|
|
1073
|
+
{
|
|
1074
|
+
readonly name: "CenturyTel";
|
|
1075
|
+
readonly domains: readonly [
|
|
1076
|
+
"@centurytel.net"
|
|
1077
|
+
];
|
|
1078
|
+
},
|
|
1079
|
+
{
|
|
1080
|
+
readonly name: "Juno";
|
|
1081
|
+
readonly domains: readonly [
|
|
1082
|
+
"@juno.com"
|
|
1083
|
+
];
|
|
1084
|
+
},
|
|
1085
|
+
{
|
|
1086
|
+
readonly name: "Optonline";
|
|
1087
|
+
readonly domains: readonly [
|
|
1088
|
+
"@optonline.net"
|
|
1089
|
+
];
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
readonly name: "QQ";
|
|
1093
|
+
readonly domains: readonly [
|
|
1094
|
+
"@qq.com"
|
|
1095
|
+
];
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
readonly name: "163";
|
|
1099
|
+
readonly domains: readonly [
|
|
1100
|
+
"@163.com",
|
|
1101
|
+
"@126.com"
|
|
1102
|
+
];
|
|
1103
|
+
},
|
|
1104
|
+
{
|
|
1105
|
+
readonly name: "139";
|
|
1106
|
+
readonly domains: readonly [
|
|
1107
|
+
"@139.com"
|
|
1108
|
+
];
|
|
1109
|
+
},
|
|
1110
|
+
{
|
|
1111
|
+
readonly name: "21cn";
|
|
1112
|
+
readonly domains: readonly [
|
|
1113
|
+
"@21cn.com"
|
|
1114
|
+
];
|
|
1115
|
+
},
|
|
1116
|
+
{
|
|
1117
|
+
readonly name: "Sina";
|
|
1118
|
+
readonly domains: readonly [
|
|
1119
|
+
"@sina.com",
|
|
1120
|
+
"@sina.cn",
|
|
1121
|
+
"@sina.com.cn"
|
|
1122
|
+
];
|
|
1123
|
+
},
|
|
1124
|
+
{
|
|
1125
|
+
readonly name: "Sohu";
|
|
1126
|
+
readonly domains: readonly [
|
|
1127
|
+
"@sohu.com"
|
|
1128
|
+
];
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
readonly name: "Aliyun";
|
|
1132
|
+
readonly domains: readonly [
|
|
1133
|
+
"@aliyun.com",
|
|
1134
|
+
"@alibaba.com"
|
|
1135
|
+
];
|
|
1136
|
+
},
|
|
1137
|
+
{
|
|
1138
|
+
readonly name: "Naver";
|
|
1139
|
+
readonly domains: readonly [
|
|
1140
|
+
"@naver.com"
|
|
1141
|
+
];
|
|
1142
|
+
},
|
|
1143
|
+
{
|
|
1144
|
+
readonly name: "Daum";
|
|
1145
|
+
readonly domains: readonly [
|
|
1146
|
+
"@daum.net",
|
|
1147
|
+
"@hanmail.net"
|
|
1148
|
+
];
|
|
1149
|
+
},
|
|
1150
|
+
{
|
|
1151
|
+
readonly name: "Nate";
|
|
1152
|
+
readonly domains: readonly [
|
|
1153
|
+
"@nate.com"
|
|
1154
|
+
];
|
|
1155
|
+
},
|
|
1156
|
+
{
|
|
1157
|
+
readonly name: "Netvigator";
|
|
1158
|
+
readonly domains: readonly [
|
|
1159
|
+
"@netvigator.com"
|
|
1160
|
+
];
|
|
1161
|
+
},
|
|
1162
|
+
{
|
|
1163
|
+
readonly name: "Ziggo";
|
|
1164
|
+
readonly domains: readonly [
|
|
1165
|
+
"@ziggo.nl"
|
|
1166
|
+
];
|
|
1167
|
+
},
|
|
1168
|
+
{
|
|
1169
|
+
readonly name: "263.net";
|
|
1170
|
+
readonly domains: readonly [
|
|
1171
|
+
"@263.net"
|
|
1172
|
+
];
|
|
1173
|
+
},
|
|
1174
|
+
{
|
|
1175
|
+
readonly name: "Aruba";
|
|
1176
|
+
readonly domains: readonly [
|
|
1177
|
+
"@aruba.it"
|
|
1178
|
+
];
|
|
1179
|
+
},
|
|
1180
|
+
{
|
|
1181
|
+
readonly name: "Plala Webmail";
|
|
1182
|
+
readonly domains: readonly [
|
|
1183
|
+
"@plala.or.jp"
|
|
1184
|
+
];
|
|
1185
|
+
},
|
|
1186
|
+
{
|
|
1187
|
+
readonly name: "Turbify";
|
|
1188
|
+
readonly domains: readonly [
|
|
1189
|
+
"@yahoo-inc.com"
|
|
1190
|
+
];
|
|
1191
|
+
},
|
|
1192
|
+
{
|
|
1193
|
+
readonly name: "Godaddy";
|
|
1194
|
+
readonly domains: readonly [
|
|
1195
|
+
"@secureserver.net"
|
|
1196
|
+
];
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
readonly name: "Rackspace";
|
|
1200
|
+
readonly domains: readonly [
|
|
1201
|
+
"@emailsrvr.com"
|
|
1202
|
+
];
|
|
1203
|
+
},
|
|
1204
|
+
{
|
|
1205
|
+
readonly name: "Mimecast";
|
|
1206
|
+
readonly domains: readonly [
|
|
1207
|
+
"@mimecast.com"
|
|
1208
|
+
];
|
|
1209
|
+
},
|
|
1210
|
+
{
|
|
1211
|
+
readonly name: "Facebook";
|
|
1212
|
+
readonly domains: readonly [
|
|
1213
|
+
"@facebook.com"
|
|
1214
|
+
];
|
|
1215
|
+
},
|
|
1216
|
+
{
|
|
1217
|
+
readonly name: "Amazon";
|
|
1218
|
+
readonly domains: readonly [
|
|
1219
|
+
"@amazon.com",
|
|
1220
|
+
"@amazonaws.com"
|
|
1221
|
+
];
|
|
1222
|
+
},
|
|
1223
|
+
{
|
|
1224
|
+
readonly name: "Anazana";
|
|
1225
|
+
readonly domains: readonly [
|
|
1226
|
+
"@anazana.com"
|
|
1227
|
+
];
|
|
1228
|
+
},
|
|
1229
|
+
{
|
|
1230
|
+
readonly name: "CoreMail";
|
|
1231
|
+
readonly domains: readonly [
|
|
1232
|
+
"@icoremail.net"
|
|
1233
|
+
];
|
|
1234
|
+
},
|
|
1235
|
+
{
|
|
1236
|
+
readonly name: "Hinet";
|
|
1237
|
+
readonly domains: readonly [
|
|
1238
|
+
"@hinet.net"
|
|
1239
|
+
];
|
|
1240
|
+
},
|
|
1241
|
+
{
|
|
1242
|
+
readonly name: "Iinet";
|
|
1243
|
+
readonly domains: readonly [
|
|
1244
|
+
"@iinet.net.au"
|
|
1245
|
+
];
|
|
1246
|
+
},
|
|
1247
|
+
{
|
|
1248
|
+
readonly name: "Namecheap";
|
|
1249
|
+
readonly domains: readonly [
|
|
1250
|
+
"@registrar-servers.com"
|
|
1251
|
+
];
|
|
1252
|
+
},
|
|
1253
|
+
{
|
|
1254
|
+
readonly name: "Network Solutions";
|
|
1255
|
+
readonly domains: readonly [
|
|
1256
|
+
"@myregisteredsite.com"
|
|
1257
|
+
];
|
|
1258
|
+
},
|
|
1259
|
+
{
|
|
1260
|
+
readonly name: "Orange";
|
|
1261
|
+
readonly domains: readonly [
|
|
1262
|
+
"@orange.fr",
|
|
1263
|
+
"@wanadoo.fr"
|
|
1264
|
+
];
|
|
1265
|
+
},
|
|
1266
|
+
{
|
|
1267
|
+
readonly name: "Synaq";
|
|
1268
|
+
readonly domains: readonly [
|
|
1269
|
+
"@synaq.com"
|
|
1270
|
+
];
|
|
1271
|
+
},
|
|
1272
|
+
{
|
|
1273
|
+
readonly name: "Zmail";
|
|
1274
|
+
readonly domains: readonly [
|
|
1275
|
+
"@zmail.ru"
|
|
1276
|
+
];
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
readonly name: "Strato";
|
|
1280
|
+
readonly domains: readonly [
|
|
1281
|
+
"@strato.de"
|
|
1282
|
+
];
|
|
1283
|
+
},
|
|
1284
|
+
{
|
|
1285
|
+
readonly name: "Apple";
|
|
1286
|
+
readonly domains: readonly [
|
|
1287
|
+
"@apple.com"
|
|
1288
|
+
];
|
|
1289
|
+
},
|
|
1290
|
+
{
|
|
1291
|
+
readonly name: "Cox Webmail";
|
|
1292
|
+
readonly domains: readonly [
|
|
1293
|
+
"@cloudfilter.net"
|
|
1294
|
+
];
|
|
1295
|
+
},
|
|
1296
|
+
{
|
|
1297
|
+
readonly name: "Mailgun";
|
|
1298
|
+
readonly domains: readonly [
|
|
1299
|
+
"@mailgun.org"
|
|
1300
|
+
];
|
|
1301
|
+
},
|
|
1302
|
+
{
|
|
1303
|
+
readonly name: "Postmark";
|
|
1304
|
+
readonly domains: readonly [
|
|
1305
|
+
"@pmta.postmarkapp.com"
|
|
1306
|
+
];
|
|
1307
|
+
},
|
|
1308
|
+
{
|
|
1309
|
+
readonly name: "SendGrid";
|
|
1310
|
+
readonly domains: readonly [
|
|
1311
|
+
"@sendgrid.net"
|
|
1312
|
+
];
|
|
1313
|
+
},
|
|
1314
|
+
{
|
|
1315
|
+
readonly name: "Elastic Email";
|
|
1316
|
+
readonly domains: readonly [
|
|
1317
|
+
"@elasticemail.com"
|
|
1318
|
+
];
|
|
1319
|
+
},
|
|
1320
|
+
{
|
|
1321
|
+
readonly name: "Zendesk";
|
|
1322
|
+
readonly domains: readonly [
|
|
1323
|
+
"@zendesk.com"
|
|
1324
|
+
];
|
|
1325
|
+
},
|
|
1326
|
+
{
|
|
1327
|
+
readonly name: "Intermedia";
|
|
1328
|
+
readonly domains: readonly [
|
|
1329
|
+
"@intermedia.net"
|
|
1330
|
+
];
|
|
1331
|
+
},
|
|
1332
|
+
{
|
|
1333
|
+
readonly name: "Mailjet";
|
|
1334
|
+
readonly domains: readonly [
|
|
1335
|
+
"@mailjet.com"
|
|
1336
|
+
];
|
|
1337
|
+
},
|
|
1338
|
+
{
|
|
1339
|
+
readonly name: "Front";
|
|
1340
|
+
readonly domains: readonly [
|
|
1341
|
+
"@frontapp.com"
|
|
1342
|
+
];
|
|
1343
|
+
},
|
|
1344
|
+
{
|
|
1345
|
+
readonly name: "Free.fr";
|
|
1346
|
+
readonly domains: readonly [
|
|
1347
|
+
"@free.fr"
|
|
1348
|
+
];
|
|
1349
|
+
},
|
|
1350
|
+
{
|
|
1351
|
+
readonly name: "Libero";
|
|
1352
|
+
readonly domains: readonly [
|
|
1353
|
+
"@libero.it"
|
|
1354
|
+
];
|
|
1355
|
+
},
|
|
1356
|
+
{
|
|
1357
|
+
readonly name: "UOL";
|
|
1358
|
+
readonly domains: readonly [
|
|
1359
|
+
"@uol.com.br"
|
|
1360
|
+
];
|
|
1361
|
+
},
|
|
1362
|
+
{
|
|
1363
|
+
readonly name: "BOL";
|
|
1364
|
+
readonly domains: readonly [
|
|
1365
|
+
"@bol.com.br"
|
|
1366
|
+
];
|
|
1367
|
+
},
|
|
1368
|
+
{
|
|
1369
|
+
readonly name: "SFR";
|
|
1370
|
+
readonly domains: readonly [
|
|
1371
|
+
"@sfr.fr"
|
|
1372
|
+
];
|
|
1373
|
+
},
|
|
1374
|
+
{
|
|
1375
|
+
readonly name: "IG";
|
|
1376
|
+
readonly domains: readonly [
|
|
1377
|
+
"@ig.com.br"
|
|
1378
|
+
];
|
|
1379
|
+
},
|
|
1380
|
+
{
|
|
1381
|
+
readonly name: "Bigpond";
|
|
1382
|
+
readonly domains: readonly [
|
|
1383
|
+
"@bigpond.com",
|
|
1384
|
+
"@bigpond.net.au"
|
|
1385
|
+
];
|
|
1386
|
+
},
|
|
1387
|
+
{
|
|
1388
|
+
readonly name: "Terra";
|
|
1389
|
+
readonly domains: readonly [
|
|
1390
|
+
"@terra.com.br"
|
|
1391
|
+
];
|
|
1392
|
+
},
|
|
1393
|
+
{
|
|
1394
|
+
readonly name: "Neuf";
|
|
1395
|
+
readonly domains: readonly [
|
|
1396
|
+
"@neuf.fr"
|
|
1397
|
+
];
|
|
1398
|
+
},
|
|
1399
|
+
{
|
|
1400
|
+
readonly name: "Alice";
|
|
1401
|
+
readonly domains: readonly [
|
|
1402
|
+
"@alice.it",
|
|
1403
|
+
"@aliceadsl.fr"
|
|
1404
|
+
];
|
|
1405
|
+
},
|
|
1406
|
+
{
|
|
1407
|
+
readonly name: "La Poste";
|
|
1408
|
+
readonly domains: readonly [
|
|
1409
|
+
"@laposte.net"
|
|
1410
|
+
];
|
|
1411
|
+
},
|
|
1412
|
+
{
|
|
1413
|
+
readonly name: "Rambler";
|
|
1414
|
+
readonly domains: readonly [
|
|
1415
|
+
"@rambler.ru"
|
|
1416
|
+
];
|
|
1417
|
+
},
|
|
1418
|
+
{
|
|
1419
|
+
readonly name: "Tiscali";
|
|
1420
|
+
readonly domains: readonly [
|
|
1421
|
+
"@tiscali.it",
|
|
1422
|
+
"@tiscali.co.uk"
|
|
1423
|
+
];
|
|
1424
|
+
},
|
|
1425
|
+
{
|
|
1426
|
+
readonly name: "Shaw";
|
|
1427
|
+
readonly domains: readonly [
|
|
1428
|
+
"@shaw.ca"
|
|
1429
|
+
];
|
|
1430
|
+
},
|
|
1431
|
+
{
|
|
1432
|
+
readonly name: "Sky";
|
|
1433
|
+
readonly domains: readonly [
|
|
1434
|
+
"@sky.com"
|
|
1435
|
+
];
|
|
1436
|
+
},
|
|
1437
|
+
{
|
|
1438
|
+
readonly name: "Freenet";
|
|
1439
|
+
readonly domains: readonly [
|
|
1440
|
+
"@freenet.de"
|
|
1441
|
+
];
|
|
1442
|
+
},
|
|
1443
|
+
{
|
|
1444
|
+
readonly name: "T-Online";
|
|
1445
|
+
readonly domains: readonly [
|
|
1446
|
+
"@t-online.de"
|
|
1447
|
+
];
|
|
1448
|
+
},
|
|
1449
|
+
{
|
|
1450
|
+
readonly name: "Virgilio";
|
|
1451
|
+
readonly domains: readonly [
|
|
1452
|
+
"@virgilio.it"
|
|
1453
|
+
];
|
|
1454
|
+
},
|
|
1455
|
+
{
|
|
1456
|
+
readonly name: "Home.nl";
|
|
1457
|
+
readonly domains: readonly [
|
|
1458
|
+
"@home.nl"
|
|
1459
|
+
];
|
|
1460
|
+
},
|
|
1461
|
+
{
|
|
1462
|
+
readonly name: "Telenet";
|
|
1463
|
+
readonly domains: readonly [
|
|
1464
|
+
"@telenet.be"
|
|
1465
|
+
];
|
|
1466
|
+
},
|
|
1467
|
+
{
|
|
1468
|
+
readonly name: "Voila";
|
|
1469
|
+
readonly domains: readonly [
|
|
1470
|
+
"@voila.fr"
|
|
1471
|
+
];
|
|
1472
|
+
},
|
|
1473
|
+
{
|
|
1474
|
+
readonly name: "Planet.nl";
|
|
1475
|
+
readonly domains: readonly [
|
|
1476
|
+
"@planet.nl"
|
|
1477
|
+
];
|
|
1478
|
+
},
|
|
1479
|
+
{
|
|
1480
|
+
readonly name: "Tin.it";
|
|
1481
|
+
readonly domains: readonly [
|
|
1482
|
+
"@tin.it"
|
|
1483
|
+
];
|
|
1484
|
+
},
|
|
1485
|
+
{
|
|
1486
|
+
readonly name: "NTL World";
|
|
1487
|
+
readonly domains: readonly [
|
|
1488
|
+
"@ntlworld.com"
|
|
1489
|
+
];
|
|
1490
|
+
},
|
|
1491
|
+
{
|
|
1492
|
+
readonly name: "Arcor";
|
|
1493
|
+
readonly domains: readonly [
|
|
1494
|
+
"@arcor.de"
|
|
1495
|
+
];
|
|
1496
|
+
},
|
|
1497
|
+
{
|
|
1498
|
+
readonly name: "Hetnet";
|
|
1499
|
+
readonly domains: readonly [
|
|
1500
|
+
"@hetnet.nl"
|
|
1501
|
+
];
|
|
1502
|
+
},
|
|
1503
|
+
{
|
|
1504
|
+
readonly name: "Zonnet";
|
|
1505
|
+
readonly domains: readonly [
|
|
1506
|
+
"@zonnet.nl"
|
|
1507
|
+
];
|
|
1508
|
+
},
|
|
1509
|
+
{
|
|
1510
|
+
readonly name: "Club Internet";
|
|
1511
|
+
readonly domains: readonly [
|
|
1512
|
+
"@club-internet.fr"
|
|
1513
|
+
];
|
|
1514
|
+
},
|
|
1515
|
+
{
|
|
1516
|
+
readonly name: "Optus";
|
|
1517
|
+
readonly domains: readonly [
|
|
1518
|
+
"@optusnet.com.au"
|
|
1519
|
+
];
|
|
1520
|
+
},
|
|
1521
|
+
{
|
|
1522
|
+
readonly name: "Blueyonder";
|
|
1523
|
+
readonly domains: readonly [
|
|
1524
|
+
"@blueyonder.co.uk"
|
|
1525
|
+
];
|
|
1526
|
+
},
|
|
1527
|
+
{
|
|
1528
|
+
readonly name: "Bluewin";
|
|
1529
|
+
readonly domains: readonly [
|
|
1530
|
+
"@bluewin.ch"
|
|
1531
|
+
];
|
|
1532
|
+
},
|
|
1533
|
+
{
|
|
1534
|
+
readonly name: "Skynet";
|
|
1535
|
+
readonly domains: readonly [
|
|
1536
|
+
"@skynet.be"
|
|
1537
|
+
];
|
|
1538
|
+
},
|
|
1539
|
+
{
|
|
1540
|
+
readonly name: "Sympatico";
|
|
1541
|
+
readonly domains: readonly [
|
|
1542
|
+
"@sympatico.ca"
|
|
1543
|
+
];
|
|
1544
|
+
},
|
|
1545
|
+
{
|
|
1546
|
+
readonly name: "Chello";
|
|
1547
|
+
readonly domains: readonly [
|
|
1548
|
+
"@chello.nl"
|
|
1549
|
+
];
|
|
1550
|
+
}
|
|
1551
|
+
];
|
|
1552
|
+
export type ProviderNames = typeof EmailProviders[number]["name"];
|
|
1553
|
+
declare const records: readonly [
|
|
1554
|
+
{
|
|
1555
|
+
readonly name: "Sohu";
|
|
1556
|
+
readonly mx: "a.sohu.com";
|
|
1557
|
+
},
|
|
1558
|
+
{
|
|
1559
|
+
readonly name: "Sohu";
|
|
1560
|
+
readonly mx: "sohu.com";
|
|
1561
|
+
},
|
|
1562
|
+
{
|
|
1563
|
+
readonly name: "Strato";
|
|
1564
|
+
readonly mx: ".rzone.de";
|
|
1565
|
+
},
|
|
1566
|
+
{
|
|
1567
|
+
readonly name: "Strato";
|
|
1568
|
+
readonly mx: ".strato.de";
|
|
1569
|
+
},
|
|
1570
|
+
{
|
|
1571
|
+
readonly name: "21cn";
|
|
1572
|
+
readonly mx: ".21cn.com";
|
|
1573
|
+
},
|
|
1574
|
+
{
|
|
1575
|
+
readonly name: "163";
|
|
1576
|
+
readonly mx: ".netease.com";
|
|
1577
|
+
},
|
|
1578
|
+
{
|
|
1579
|
+
readonly name: "Netvigator";
|
|
1580
|
+
readonly mx: ".netvigator.com";
|
|
1581
|
+
},
|
|
1582
|
+
{
|
|
1583
|
+
readonly name: "139";
|
|
1584
|
+
readonly mx: ".mail.139.com";
|
|
1585
|
+
},
|
|
1586
|
+
{
|
|
1587
|
+
readonly name: "Nate";
|
|
1588
|
+
readonly mx: ".nate.com";
|
|
1589
|
+
},
|
|
1590
|
+
{
|
|
1591
|
+
readonly name: "Naver";
|
|
1592
|
+
readonly mx: ".naver.com";
|
|
1593
|
+
},
|
|
1594
|
+
{
|
|
1595
|
+
readonly name: "Daum";
|
|
1596
|
+
readonly mx: ".daum.kgslb.com";
|
|
1597
|
+
},
|
|
1598
|
+
{
|
|
1599
|
+
readonly name: "Daum";
|
|
1600
|
+
readonly mx: ".hanmail.net";
|
|
1601
|
+
},
|
|
1602
|
+
{
|
|
1603
|
+
readonly name: "Ziggo";
|
|
1604
|
+
readonly mx: ".ziggo.nl";
|
|
1605
|
+
},
|
|
1606
|
+
{
|
|
1607
|
+
readonly name: "QQ";
|
|
1608
|
+
readonly mx: ".qq.com";
|
|
1609
|
+
},
|
|
1610
|
+
{
|
|
1611
|
+
readonly name: "263.net";
|
|
1612
|
+
readonly mx: "263.net";
|
|
1613
|
+
},
|
|
1614
|
+
{
|
|
1615
|
+
readonly name: "Sina";
|
|
1616
|
+
readonly mx: ".vip.sina.com";
|
|
1617
|
+
},
|
|
1618
|
+
{
|
|
1619
|
+
readonly name: "Sina";
|
|
1620
|
+
readonly mx: ".sina.com.cn";
|
|
1621
|
+
},
|
|
1622
|
+
{
|
|
1623
|
+
readonly name: "Aruba";
|
|
1624
|
+
readonly mx: ".aruba.it";
|
|
1625
|
+
},
|
|
1626
|
+
{
|
|
1627
|
+
readonly name: "Aliyun";
|
|
1628
|
+
readonly mx: ".mxhichina.com";
|
|
1629
|
+
},
|
|
1630
|
+
{
|
|
1631
|
+
readonly name: "Plala Webmail";
|
|
1632
|
+
readonly mx: ".plala.or.jp";
|
|
1633
|
+
},
|
|
1634
|
+
{
|
|
1635
|
+
readonly name: "AOL";
|
|
1636
|
+
readonly mx: "mx-aol.mail";
|
|
1637
|
+
},
|
|
1638
|
+
{
|
|
1639
|
+
readonly name: "Turbify";
|
|
1640
|
+
readonly mx: "mx-biz.mail.am0.yahoodns.net";
|
|
1641
|
+
},
|
|
1642
|
+
{
|
|
1643
|
+
readonly name: "Turbify";
|
|
1644
|
+
readonly mx: "mx-biz.mail.am.yahoodns.net";
|
|
1645
|
+
},
|
|
1646
|
+
{
|
|
1647
|
+
readonly name: "Turbify";
|
|
1648
|
+
readonly mx: "mx-biz.mail.am1.yahoodns.net";
|
|
1649
|
+
},
|
|
1650
|
+
{
|
|
1651
|
+
readonly name: "Turbify";
|
|
1652
|
+
readonly mx: "mx1.biz.mail.yahoo.com";
|
|
1653
|
+
},
|
|
1654
|
+
{
|
|
1655
|
+
readonly name: "Turbify";
|
|
1656
|
+
readonly mx: "mx5.biz.mail.yahoo.com";
|
|
1657
|
+
},
|
|
1658
|
+
{
|
|
1659
|
+
readonly name: "Turbify";
|
|
1660
|
+
readonly mx: ".biz.mail.yahoo.com";
|
|
1661
|
+
},
|
|
1662
|
+
{
|
|
1663
|
+
readonly name: "AT&T";
|
|
1664
|
+
readonly mx: ".prodigy.net";
|
|
1665
|
+
},
|
|
1666
|
+
{
|
|
1667
|
+
readonly name: "Yahoo";
|
|
1668
|
+
readonly mx: ".yahoo.";
|
|
1669
|
+
},
|
|
1670
|
+
{
|
|
1671
|
+
readonly name: "Yahoo";
|
|
1672
|
+
readonly mx: ".yahoodns.net";
|
|
1673
|
+
},
|
|
1674
|
+
{
|
|
1675
|
+
readonly name: "Zoho";
|
|
1676
|
+
readonly mx: ".zoho.com";
|
|
1677
|
+
},
|
|
1678
|
+
{
|
|
1679
|
+
readonly name: "Sitestar Webmail";
|
|
1680
|
+
readonly mx: ".sitestar.everyone.net";
|
|
1681
|
+
readonly webmail: "https://webmail.sitestar.net";
|
|
1682
|
+
},
|
|
1683
|
+
{
|
|
1684
|
+
readonly name: "Outlook Web App (OWA)";
|
|
1685
|
+
readonly mx: ".serverdata.net";
|
|
1686
|
+
readonly webmail: "https://owa.serverdata.net";
|
|
1687
|
+
},
|
|
1688
|
+
{
|
|
1689
|
+
readonly name: "1and1";
|
|
1690
|
+
readonly mx: ".1and1.";
|
|
1691
|
+
},
|
|
1692
|
+
{
|
|
1693
|
+
readonly name: "Outlook";
|
|
1694
|
+
readonly mx: "olc.protection.outlook.com";
|
|
1695
|
+
},
|
|
1696
|
+
{
|
|
1697
|
+
readonly name: "Outlook";
|
|
1698
|
+
readonly mx: ".mail.outlook.com";
|
|
1699
|
+
},
|
|
1700
|
+
{
|
|
1701
|
+
readonly name: "Outlook";
|
|
1702
|
+
readonly mx: ".hotmail.";
|
|
1703
|
+
},
|
|
1704
|
+
{
|
|
1705
|
+
readonly name: "Office 365";
|
|
1706
|
+
readonly mx: "mail.protection.outlook.com";
|
|
1707
|
+
},
|
|
1708
|
+
{
|
|
1709
|
+
readonly name: "Office 365";
|
|
1710
|
+
readonly mx: ".outlook.com";
|
|
1711
|
+
},
|
|
1712
|
+
{
|
|
1713
|
+
readonly name: "Office 365";
|
|
1714
|
+
readonly mx: ".office365.com";
|
|
1715
|
+
},
|
|
1716
|
+
{
|
|
1717
|
+
readonly name: "Gmail";
|
|
1718
|
+
readonly mx: ".google.com";
|
|
1719
|
+
},
|
|
1720
|
+
{
|
|
1721
|
+
readonly name: "Mail.ru";
|
|
1722
|
+
readonly mx: ".mail.ru";
|
|
1723
|
+
},
|
|
1724
|
+
{
|
|
1725
|
+
readonly name: "Mail.com";
|
|
1726
|
+
readonly mx: ".mail.com";
|
|
1727
|
+
},
|
|
1728
|
+
{
|
|
1729
|
+
readonly name: "Earthlink";
|
|
1730
|
+
readonly mx: ".earthlink.net";
|
|
1731
|
+
},
|
|
1732
|
+
{
|
|
1733
|
+
readonly name: "Earthlink";
|
|
1734
|
+
readonly mx: ".oxsus-vadesecure.net";
|
|
1735
|
+
},
|
|
1736
|
+
{
|
|
1737
|
+
readonly name: "Rackspace";
|
|
1738
|
+
readonly mx: ".emailsrvr.com";
|
|
1739
|
+
},
|
|
1740
|
+
{
|
|
1741
|
+
readonly name: "Mimecast";
|
|
1742
|
+
readonly mx: ".mimecast.com";
|
|
1743
|
+
},
|
|
1744
|
+
{
|
|
1745
|
+
readonly name: "Godaddy";
|
|
1746
|
+
readonly mx: ".secureserver.net";
|
|
1747
|
+
},
|
|
1748
|
+
{
|
|
1749
|
+
readonly name: "Comcast";
|
|
1750
|
+
readonly mx: ".comcast.net";
|
|
1751
|
+
},
|
|
1752
|
+
{
|
|
1753
|
+
readonly name: "Office 365";
|
|
1754
|
+
readonly mx: ".ppe-hosted.com";
|
|
1755
|
+
},
|
|
1756
|
+
{
|
|
1757
|
+
readonly name: "Office 365";
|
|
1758
|
+
readonly mx: ".gslb.pphosted.com";
|
|
1759
|
+
},
|
|
1760
|
+
{
|
|
1761
|
+
readonly name: "Office 365";
|
|
1762
|
+
readonly mx: ".arsmtp.com";
|
|
1763
|
+
},
|
|
1764
|
+
{
|
|
1765
|
+
readonly name: "Zoho";
|
|
1766
|
+
readonly mx: ".zoho.com";
|
|
1767
|
+
},
|
|
1768
|
+
{
|
|
1769
|
+
readonly name: "ProtonMail";
|
|
1770
|
+
readonly mx: "mail.protonmail.ch";
|
|
1771
|
+
},
|
|
1772
|
+
{
|
|
1773
|
+
readonly name: "Facebook";
|
|
1774
|
+
readonly mx: ".facebook.com";
|
|
1775
|
+
},
|
|
1776
|
+
{
|
|
1777
|
+
readonly name: "163";
|
|
1778
|
+
readonly mx: ".netease.com";
|
|
1779
|
+
},
|
|
1780
|
+
{
|
|
1781
|
+
readonly name: "163";
|
|
1782
|
+
readonly mx: ".163.com";
|
|
1783
|
+
},
|
|
1784
|
+
{
|
|
1785
|
+
readonly name: "263";
|
|
1786
|
+
readonly mx: ".263.net";
|
|
1787
|
+
},
|
|
1788
|
+
{
|
|
1789
|
+
readonly name: "Aliyun";
|
|
1790
|
+
readonly mx: ".alibaba.com";
|
|
1791
|
+
},
|
|
1792
|
+
{
|
|
1793
|
+
readonly name: "Aliyun";
|
|
1794
|
+
readonly mx: ".aliyun.com";
|
|
1795
|
+
},
|
|
1796
|
+
{
|
|
1797
|
+
readonly name: "Amazon";
|
|
1798
|
+
readonly mx: ".amazon.com";
|
|
1799
|
+
},
|
|
1800
|
+
{
|
|
1801
|
+
readonly name: "Amazon";
|
|
1802
|
+
readonly mx: ".amazonaws.com";
|
|
1803
|
+
},
|
|
1804
|
+
{
|
|
1805
|
+
readonly name: "Anazana";
|
|
1806
|
+
readonly mx: ".anazana.com";
|
|
1807
|
+
},
|
|
1808
|
+
{
|
|
1809
|
+
readonly name: "CoreMail";
|
|
1810
|
+
readonly mx: ".icoremail.net";
|
|
1811
|
+
},
|
|
1812
|
+
{
|
|
1813
|
+
readonly name: "GMX";
|
|
1814
|
+
readonly mx: ".gmx.net";
|
|
1815
|
+
},
|
|
1816
|
+
{
|
|
1817
|
+
readonly name: "GMX";
|
|
1818
|
+
readonly mx: ".gmx.com";
|
|
1819
|
+
},
|
|
1820
|
+
{
|
|
1821
|
+
readonly name: "Hinet";
|
|
1822
|
+
readonly mx: ".hinet.";
|
|
1823
|
+
},
|
|
1824
|
+
{
|
|
1825
|
+
readonly name: "iCloud";
|
|
1826
|
+
readonly mx: ".icloud.com";
|
|
1827
|
+
},
|
|
1828
|
+
{
|
|
1829
|
+
readonly name: "Iinet";
|
|
1830
|
+
readonly mx: ".iinet.net.au";
|
|
1831
|
+
},
|
|
1832
|
+
{
|
|
1833
|
+
readonly name: "Namecheap";
|
|
1834
|
+
readonly mx: ".registrar-servers.com";
|
|
1835
|
+
},
|
|
1836
|
+
{
|
|
1837
|
+
readonly name: "Network Solutions";
|
|
1838
|
+
readonly mx: ".myregisteredsite.com";
|
|
1839
|
+
},
|
|
1840
|
+
{
|
|
1841
|
+
readonly name: "Orange";
|
|
1842
|
+
readonly mx: ".orange.";
|
|
1843
|
+
},
|
|
1844
|
+
{
|
|
1845
|
+
readonly name: "QQ";
|
|
1846
|
+
readonly mx: ".qq.com";
|
|
1847
|
+
},
|
|
1848
|
+
{
|
|
1849
|
+
readonly name: "Synaq";
|
|
1850
|
+
readonly mx: ".synaq.";
|
|
1851
|
+
},
|
|
1852
|
+
{
|
|
1853
|
+
readonly name: "Web.de";
|
|
1854
|
+
readonly mx: ".web.de";
|
|
1855
|
+
},
|
|
1856
|
+
{
|
|
1857
|
+
readonly name: "Yandex";
|
|
1858
|
+
readonly mx: ".yandex.";
|
|
1859
|
+
},
|
|
1860
|
+
{
|
|
1861
|
+
readonly name: "Zmail";
|
|
1862
|
+
readonly mx: ".zmail.";
|
|
1863
|
+
},
|
|
1864
|
+
{
|
|
1865
|
+
readonly name: "Strato";
|
|
1866
|
+
readonly mx: ".strato.de";
|
|
1867
|
+
},
|
|
1868
|
+
{
|
|
1869
|
+
readonly name: "Apple";
|
|
1870
|
+
readonly mx: ".apple.com";
|
|
1871
|
+
},
|
|
1872
|
+
{
|
|
1873
|
+
readonly name: "Cox Webmail";
|
|
1874
|
+
readonly mx: ".cloudfilter.net";
|
|
1875
|
+
},
|
|
1876
|
+
{
|
|
1877
|
+
readonly name: "Fastmail";
|
|
1878
|
+
readonly mx: ".messagingengine.com";
|
|
1879
|
+
},
|
|
1880
|
+
{
|
|
1881
|
+
readonly name: "Mailgun";
|
|
1882
|
+
readonly mx: ".mailgun.org";
|
|
1883
|
+
},
|
|
1884
|
+
{
|
|
1885
|
+
readonly name: "Postmark";
|
|
1886
|
+
readonly mx: ".pmta.postmarkapp.com";
|
|
1887
|
+
},
|
|
1888
|
+
{
|
|
1889
|
+
readonly name: "SendGrid";
|
|
1890
|
+
readonly mx: ".sendgrid.net";
|
|
1891
|
+
},
|
|
1892
|
+
{
|
|
1893
|
+
readonly name: "Elastic Email";
|
|
1894
|
+
readonly mx: ".elasticemail.com";
|
|
1895
|
+
},
|
|
1896
|
+
{
|
|
1897
|
+
readonly name: "Zendesk";
|
|
1898
|
+
readonly mx: ".zendesk.com";
|
|
1899
|
+
},
|
|
1900
|
+
{
|
|
1901
|
+
readonly name: "Intermedia";
|
|
1902
|
+
readonly mx: ".intermedia.net";
|
|
1903
|
+
},
|
|
1904
|
+
{
|
|
1905
|
+
readonly name: "Mailjet";
|
|
1906
|
+
readonly mx: ".mailjet.com";
|
|
1907
|
+
},
|
|
1908
|
+
{
|
|
1909
|
+
readonly name: "Front";
|
|
1910
|
+
readonly mx: ".frontapp.com";
|
|
1911
|
+
},
|
|
1912
|
+
{
|
|
1913
|
+
readonly name: "Unknown";
|
|
1914
|
+
readonly mx: "..................";
|
|
1915
|
+
},
|
|
1916
|
+
{
|
|
1917
|
+
readonly name: "Webmail";
|
|
1918
|
+
readonly mx: "..................";
|
|
1919
|
+
},
|
|
1920
|
+
{
|
|
1921
|
+
readonly name: "Zimbra";
|
|
1922
|
+
readonly mx: "..................";
|
|
1923
|
+
},
|
|
1924
|
+
{
|
|
1925
|
+
readonly name: "Others";
|
|
1926
|
+
readonly mx: "..................";
|
|
1927
|
+
},
|
|
1928
|
+
{
|
|
1929
|
+
readonly name: "Aruba";
|
|
1930
|
+
readonly mx: "..................";
|
|
1931
|
+
},
|
|
1932
|
+
{
|
|
1933
|
+
readonly name: "Alibaba";
|
|
1934
|
+
readonly mx: "..................";
|
|
1935
|
+
},
|
|
1936
|
+
{
|
|
1937
|
+
readonly name: "IBM";
|
|
1938
|
+
readonly mx: "..................";
|
|
1939
|
+
},
|
|
1940
|
+
{
|
|
1941
|
+
readonly name: "Digitalocean";
|
|
1942
|
+
readonly mx: "..................";
|
|
1943
|
+
},
|
|
1944
|
+
{
|
|
1945
|
+
readonly name: "AWS Partner";
|
|
1946
|
+
readonly mx: "..................";
|
|
1947
|
+
},
|
|
1948
|
+
{
|
|
1949
|
+
readonly name: "Microsoft Exchange";
|
|
1950
|
+
readonly mx: "..................";
|
|
1951
|
+
},
|
|
1952
|
+
{
|
|
1953
|
+
readonly name: "Oracle Cloud";
|
|
1954
|
+
readonly mx: "..................";
|
|
1955
|
+
},
|
|
1956
|
+
{
|
|
1957
|
+
readonly name: "Roundcube Webmail";
|
|
1958
|
+
readonly mx: "..................";
|
|
1959
|
+
},
|
|
1960
|
+
{
|
|
1961
|
+
readonly name: "cPanel Webmail";
|
|
1962
|
+
readonly mx: "..................";
|
|
1963
|
+
},
|
|
1964
|
+
{
|
|
1965
|
+
readonly name: "Yahoo (External Provider)";
|
|
1966
|
+
readonly mx: "..................";
|
|
1967
|
+
},
|
|
1968
|
+
{
|
|
1969
|
+
readonly name: "cPanel Webmail";
|
|
1970
|
+
readonly mx: "..................";
|
|
1971
|
+
},
|
|
1972
|
+
{
|
|
1973
|
+
readonly name: "Disposable";
|
|
1974
|
+
readonly mx: "..................";
|
|
1975
|
+
}
|
|
1976
|
+
];
|
|
1977
|
+
type ProviderName$1 = typeof records[number]["name"] | ProviderNames;
|
|
1978
|
+
export interface ValidationConfig {
|
|
1979
|
+
/**
|
|
1980
|
+
* @description This will enable deep validation of the email. slower than normal email validator as it triggers multiple dns requests, or travel to the ip address to get the domain name.
|
|
1981
|
+
* This is per request option, passing true to the getProvider without turning this ON, it wont work and vice versa.
|
|
1982
|
+
* @default false
|
|
1983
|
+
*/
|
|
1984
|
+
enableDeepValidation?: boolean;
|
|
1985
|
+
/**
|
|
1986
|
+
* @description This will enable the ipResolver for the email validator on deep validation.
|
|
1987
|
+
* @default undefined
|
|
1988
|
+
*/
|
|
1989
|
+
ipResolver?: {
|
|
1990
|
+
/**
|
|
1991
|
+
* @description Get your free api keys from https://findip.net to use find-api as a fallback for ipApi if enabled
|
|
1992
|
+
* @default undefined
|
|
1993
|
+
*/
|
|
1994
|
+
findip?: {
|
|
1995
|
+
enabled: boolean;
|
|
1996
|
+
apiKey: string[];
|
|
1997
|
+
};
|
|
1998
|
+
/**
|
|
1999
|
+
* @description This is 100% but might throagth that's why we have a fallback to findip.net
|
|
2000
|
+
* if you want to use this feature, change to true enable it
|
|
2001
|
+
* @default false
|
|
2002
|
+
*/
|
|
2003
|
+
ipApi?: boolean;
|
|
2004
|
+
};
|
|
2005
|
+
deepValidationOptions?: {
|
|
2006
|
+
/** Max total time (ms) for the entire deep validation phase. @default 3000 */
|
|
2007
|
+
maxTimeout?: number;
|
|
2008
|
+
http?: {
|
|
2009
|
+
timeout?: number;
|
|
2010
|
+
maxRetry?: number;
|
|
2011
|
+
};
|
|
2012
|
+
};
|
|
2013
|
+
}
|
|
2014
|
+
/**
|
|
2015
|
+
* Minimal domain-level cache entry.
|
|
2016
|
+
* Cheap fields (isFree, role, isDisposable) are recomputed on cache hit.
|
|
2017
|
+
*/
|
|
2018
|
+
export interface ValidateCacheEntry {
|
|
2019
|
+
provider?: string;
|
|
2020
|
+
status: "valid" | "Invalid" | "Syntax" | "Error" | "Rejected" | "Disposable";
|
|
2021
|
+
message?: string;
|
|
2022
|
+
webmail?: string;
|
|
2023
|
+
/** Validation method — only set for Unknown/Others providers. */
|
|
2024
|
+
method?: "shallow" | "deep";
|
|
2025
|
+
}
|
|
2026
|
+
export declare class EmailValidator {
|
|
2027
|
+
private resolver;
|
|
2028
|
+
private findIpKeys;
|
|
2029
|
+
private roles;
|
|
2030
|
+
private records;
|
|
2031
|
+
private yahooList;
|
|
2032
|
+
private domain;
|
|
2033
|
+
private static instance;
|
|
2034
|
+
private dns;
|
|
2035
|
+
private validateCache;
|
|
2036
|
+
private ipCache;
|
|
2037
|
+
private inflight;
|
|
2038
|
+
private validationConfig;
|
|
2039
|
+
constructor(config?: {
|
|
2040
|
+
options?: ValidationConfig;
|
|
2041
|
+
dns?: Omit<ZynorConfig, "cache">;
|
|
2042
|
+
});
|
|
2043
|
+
/**
|
|
2044
|
+
* Creates or returns an existing instance of the EmailValidator (Singleton pattern)
|
|
2045
|
+
* @param config - Configuration object for the EmailValidator
|
|
2046
|
+
* @param config.options - Optional validation configuration settings
|
|
2047
|
+
* @param config.options.enableDeepValidation - Enable deep validation with additional DNS lookups
|
|
2048
|
+
* @param config.options.ipResolver - Configure IP resolution settings
|
|
2049
|
+
* @param config.options.ipResolver.findip - Settings for findip.net API
|
|
2050
|
+
* @param config.options.ipResolver.ipApi - Enable/disable ipApi service
|
|
2051
|
+
* @param config.dns - Optional DNS configuration settings
|
|
2052
|
+
* @returns The singleton instance of EmailValidator
|
|
2053
|
+
* @example
|
|
2054
|
+
* // Create with default settings
|
|
2055
|
+
* const validator = EmailValidator.create();
|
|
2056
|
+
*
|
|
2057
|
+
* // Create with custom configuration
|
|
2058
|
+
* const validator = EmailValidator.create({
|
|
2059
|
+
* options: {
|
|
2060
|
+
* enableDeepValidation: true,
|
|
2061
|
+
* ipResolver: {
|
|
2062
|
+
* findip: {
|
|
2063
|
+
* enabled: true,
|
|
2064
|
+
* apiKey: ['your-api-key']
|
|
2065
|
+
* }
|
|
2066
|
+
* }
|
|
2067
|
+
* }
|
|
2068
|
+
* });
|
|
2069
|
+
*/
|
|
2070
|
+
static create(config?: {
|
|
2071
|
+
options?: ValidationConfig;
|
|
2072
|
+
dns?: ZynorConfig;
|
|
2073
|
+
}): EmailValidator;
|
|
2074
|
+
private getMxRecords;
|
|
2075
|
+
/**
|
|
2076
|
+
* Validates an email address and determines its provider/service
|
|
2077
|
+
* @param email - The email address to validate and analyze
|
|
2078
|
+
* @returns Promise resolving to EmailResponse containing validation status and provider details
|
|
2079
|
+
* @throws Error if email validation fails
|
|
2080
|
+
* @example
|
|
2081
|
+
* const validator = EmailValidator.create();
|
|
2082
|
+
* const result = await validator.validate("user@gmail.com");
|
|
2083
|
+
*/
|
|
2084
|
+
validate(email: string): Promise<EmailResponse>;
|
|
2085
|
+
/**
|
|
2086
|
+
* Validates an email address with deep validation and determines its provider/service
|
|
2087
|
+
* @param email - The email address to validate and analyze
|
|
2088
|
+
* @param deep - Set to true to enable deep validation with additional DNS lookups
|
|
2089
|
+
* @returns Promise resolving to EmailResponse containing validation status and provider details
|
|
2090
|
+
* @throws Error if email validation fails
|
|
2091
|
+
* @remarks Deep validation performs additional DNS lookups and domain checks which may be slower
|
|
2092
|
+
* @example
|
|
2093
|
+
* const validator = EmailValidator.create();
|
|
2094
|
+
* const result = await validator.getProvider("user@company.com", true);
|
|
2095
|
+
*/
|
|
2096
|
+
validate(email: string, deep: true): Promise<EmailResponse>;
|
|
2097
|
+
/**
|
|
2098
|
+
* Validates an email address with abort/timeout support and optional deep validation
|
|
2099
|
+
* @param email - The email address to validate and analyze
|
|
2100
|
+
* @param options - Options including signal, timeout, and optional deep flag
|
|
2101
|
+
* @returns Promise resolving to EmailResponse containing validation status and provider details
|
|
2102
|
+
* @example
|
|
2103
|
+
* const validator = EmailValidator.create();
|
|
2104
|
+
* const result = await validator.validate("user@company.com", { timeout: 5000 });
|
|
2105
|
+
* const result2 = await validator.validate("user@company.com", { timeout: 5000, deep: true });
|
|
2106
|
+
*/
|
|
2107
|
+
validate(email: string, options: AbortOptions & {
|
|
2108
|
+
deep?: boolean;
|
|
2109
|
+
}): Promise<EmailResponse>;
|
|
2110
|
+
/**
|
|
2111
|
+
* Reconstruct full EmailResponse from a cache entry + cheap recomputed fields.
|
|
2112
|
+
*/
|
|
2113
|
+
private _buildResponse;
|
|
2114
|
+
private _validateCore;
|
|
2115
|
+
/**
|
|
2116
|
+
* Validates multiple email addresses in parallel.
|
|
2117
|
+
* Concurrency is derived from enabled DNS provider limits unless explicitly provided.
|
|
2118
|
+
* Results are returned in the same order as the input array.
|
|
2119
|
+
* Each validation is independent — one failure does not abort others.
|
|
2120
|
+
*
|
|
2121
|
+
* @param emails - Array of email addresses to validate
|
|
2122
|
+
* @param options - Optional bulk validation options
|
|
2123
|
+
* @param options.concurrency - Max parallel validations (defaults to DNS totalConcurrency)
|
|
2124
|
+
* @param options.deep - Enable deep validation for all emails
|
|
2125
|
+
* @param options.signal - AbortSignal to cancel the entire batch
|
|
2126
|
+
* @param options.timeout - Timeout in ms forwarded to each validation
|
|
2127
|
+
* @returns A promise resolving to an array of EmailResponse in the same order as input
|
|
2128
|
+
*
|
|
2129
|
+
* @example
|
|
2130
|
+
* ```typescript
|
|
2131
|
+
* const validator = EmailValidator.create();
|
|
2132
|
+
* const results = await validator.validateBulk(
|
|
2133
|
+
* ['user@gmail.com', 'invalid@@', 'test@company.com'],
|
|
2134
|
+
* { deep: true }
|
|
2135
|
+
* );
|
|
2136
|
+
* // results[0].success === true, results[1].success === false, ...
|
|
2137
|
+
* ```
|
|
2138
|
+
*/
|
|
2139
|
+
validateBulk(emails: string[], options?: {
|
|
2140
|
+
concurrency?: number;
|
|
2141
|
+
deep?: boolean;
|
|
2142
|
+
signal?: AbortSignal;
|
|
2143
|
+
timeout?: number;
|
|
2144
|
+
}): Promise<EmailResponse[]>;
|
|
2145
|
+
private is_wale4r_zimbra;
|
|
2146
|
+
private is_zimbra;
|
|
2147
|
+
private is_webmail;
|
|
2148
|
+
private is_owa;
|
|
2149
|
+
private is_cPanel;
|
|
2150
|
+
private toToken;
|
|
2151
|
+
private parseJSCpanel;
|
|
2152
|
+
private is_Roundcube;
|
|
2153
|
+
private probeUrl;
|
|
2154
|
+
protected domain_check(email?: string, direct?: boolean, _pattern?: number, abortOptions?: AbortOptions): Promise<{
|
|
2155
|
+
status: boolean;
|
|
2156
|
+
type: string;
|
|
2157
|
+
webmail?: string;
|
|
2158
|
+
}>;
|
|
2159
|
+
private resolveA;
|
|
2160
|
+
private dnsLookup;
|
|
2161
|
+
private returnDNS;
|
|
2162
|
+
protected ipApi(ip: string, abortOptions?: AbortOptions): Promise<IPResponseData | null>;
|
|
2163
|
+
protected findIp(ip: string, abortOptions?: AbortOptions): Promise<IPResponseDataFindIp | null>;
|
|
2164
|
+
/**
|
|
2165
|
+
* Checks if the given string is a valid email address according to advanced validation rules.
|
|
2166
|
+
*
|
|
2167
|
+
* This function performs a multi-step validation of an email address. It first checks the general format,
|
|
2168
|
+
* then splits the address into local and domain parts, and applies several constraints:
|
|
2169
|
+
* - Local part must be at least 2 characters, domain part at least 5 characters.
|
|
2170
|
+
* - Local part cannot exceed certain length and may not contain too many hyphens or dots.
|
|
2171
|
+
* - Domain part may not contain too many dots or hyphens.
|
|
2172
|
+
* - Validates extension via this.domain.isDomainExtension.
|
|
2173
|
+
* - Total email length cannot be excessive.
|
|
2174
|
+
*
|
|
2175
|
+
* Validation rules:
|
|
2176
|
+
* - Maximum 35 characters for the local part
|
|
2177
|
+
* - Maximum 3 hyphens in the local part
|
|
2178
|
+
* - Maximum 3 dots in the local part
|
|
2179
|
+
* - Maximum 3 dots in the domain part
|
|
2180
|
+
* - Maximum 2 hyphens in the domain part
|
|
2181
|
+
* - Maximum 55 total characters in the email address
|
|
2182
|
+
* - Local part >= 2 chars; domain part >= 5 chars
|
|
2183
|
+
*
|
|
2184
|
+
* @param {string} email - The email address to validate.
|
|
2185
|
+
* @returns {boolean} True if the email passes all format and structural constraints, false otherwise.
|
|
2186
|
+
*
|
|
2187
|
+
* @example
|
|
2188
|
+
* validator.isEmail("john.doe@example.com"); // true
|
|
2189
|
+
* validator.isEmail("x@y.com"); // false (domain part < 5 chars)
|
|
2190
|
+
* validator.isEmail("toolong--name----more@long-domain-hyphen---.com"); // false
|
|
2191
|
+
*/
|
|
2192
|
+
isEmail(email: string): boolean;
|
|
2193
|
+
/**
|
|
2194
|
+
* Checks if the given email or domain name belongs to a free (public/free-to-register) email provider.
|
|
2195
|
+
*
|
|
2196
|
+
* - If an email address is provided, this method extracts the domain part.
|
|
2197
|
+
* - If a domain is provided directly, it is checked as-is.
|
|
2198
|
+
* - Returns `true` if the domain is recognized as a free provider (such as Gmail, Yahoo, Outlook, etc.), otherwise `false`.
|
|
2199
|
+
*
|
|
2200
|
+
* @param {string} email_or_domain - The email address (e.g. "user@gmail.com") or domain name (e.g. "gmail.com") to check.
|
|
2201
|
+
* @returns {boolean} `true` if the domain is a known free email provider, `false` otherwise.
|
|
2202
|
+
*
|
|
2203
|
+
* @example
|
|
2204
|
+
* validator.isFreeDomain('person@yahoo.com'); // returns true
|
|
2205
|
+
* validator.isFreeDomain('gmail.com'); // returns true
|
|
2206
|
+
* validator.isFreeDomain('user@private-company.org'); // returns false
|
|
2207
|
+
* validator.isFreeDomain('private-company.org'); // returns false
|
|
2208
|
+
*/
|
|
2209
|
+
isFreeDomain(email_or_domain: string): boolean;
|
|
2210
|
+
/**
|
|
2211
|
+
* Checks if the given email address is disposable.
|
|
2212
|
+
*
|
|
2213
|
+
* This method determines whether the provided email address is from a known disposable email provider.
|
|
2214
|
+
* Disposable email addresses are typically used for temporary or throwaway purposes, and are often associated
|
|
2215
|
+
* with domains that provide temporary inboxes.
|
|
2216
|
+
*
|
|
2217
|
+
* - Returns `true` if the email is found to be disposable using the internal provider list.
|
|
2218
|
+
* - Returns `false` for any non-disposable addresses, invalid addresses, or if the email is not recognized.
|
|
2219
|
+
*
|
|
2220
|
+
* @param {string} email - The email address to check for disposability (e.g., "user@mailinator.com").
|
|
2221
|
+
* @returns {boolean} `true` if the email is disposable, otherwise `false`.
|
|
2222
|
+
*
|
|
2223
|
+
* @example
|
|
2224
|
+
* validator.isDisposable('test@mailinator.com'); // returns true
|
|
2225
|
+
* validator.isDisposable('john.doe@gmail.com'); // returns false
|
|
2226
|
+
*
|
|
2227
|
+
* @see {@link https://github.com/yourrepo/zynor#email-validation}
|
|
2228
|
+
*/
|
|
2229
|
+
isDisposable(email: string): boolean;
|
|
2230
|
+
/**
|
|
2231
|
+
* Detects the mail server / webmail provider for a domain by probing common webmail URLs.
|
|
2232
|
+
* This is the deep validation `domain_check` logic exposed as a standalone public method.
|
|
2233
|
+
*
|
|
2234
|
+
* @param domain - The domain name to check (e.g. "example.com")
|
|
2235
|
+
* @param abortOptions - Optional signal/timeout to cancel the operation
|
|
2236
|
+
* @returns An object with `status`, `type` (provider name), and optional `webmail` URL
|
|
2237
|
+
*
|
|
2238
|
+
* @example
|
|
2239
|
+
* const result = await validator.detectMailProvider('company.com');
|
|
2240
|
+
* // { status: true, type: 'Zimbra', webmail: 'https://mail.company.com' }
|
|
2241
|
+
*
|
|
2242
|
+
* @example
|
|
2243
|
+
* const result = await validator.detectMailProvider('unknown.io', { timeout: 2000 });
|
|
2244
|
+
* // { status: false, type: '' }
|
|
2245
|
+
*/
|
|
2246
|
+
detectMailProvider(domain: string, abortOptions?: AbortOptions): Promise<{
|
|
2247
|
+
status: boolean;
|
|
2248
|
+
type: string;
|
|
2249
|
+
webmail?: string;
|
|
2250
|
+
}>;
|
|
2251
|
+
/**
|
|
2252
|
+
* Looks up IP address info using ipApi and/or findIp services.
|
|
2253
|
+
* Returns ISP, organization, geolocation, and hosting details.
|
|
2254
|
+
*
|
|
2255
|
+
* Works independently of `enableDeepValidation`. Only requires `ipResolver` config:
|
|
2256
|
+
* - `ipResolver.ipApi: true` for ip-api.com lookups
|
|
2257
|
+
* - `ipResolver.findip: { enabled: true, apiKey: [...] }` for findip.net fallback
|
|
2258
|
+
*
|
|
2259
|
+
* @param ip - The IP address to look up (e.g. "93.184.216.34")
|
|
2260
|
+
* @param abortOptions - Optional signal/timeout to cancel the operation
|
|
2261
|
+
* @returns IP info object from ipApi or findIp, or null if lookup is disabled/fails
|
|
2262
|
+
*
|
|
2263
|
+
* @example
|
|
2264
|
+
* const validator = EmailValidator.create({
|
|
2265
|
+
* options: { ipResolver: { ipApi: true } }
|
|
2266
|
+
* });
|
|
2267
|
+
* const info = await validator.lookupIpInfo('93.184.216.34');
|
|
2268
|
+
* // { status: 'success', isp: 'Edgecast Inc.', org: 'Verizon', ... }
|
|
2269
|
+
*/
|
|
2270
|
+
lookupIpInfo(ip: string, abortOptions?: AbortOptions): Promise<IPResponseData | IPResponseDataFindIp | null>;
|
|
2271
|
+
/**
|
|
2272
|
+
* Detects the hosting provider for a domain by resolving its A records and looking up IP info.
|
|
2273
|
+
* Identifies providers like AWS, Microsoft, DigitalOcean, Oracle, IBM, Alibaba, and Aruba.
|
|
2274
|
+
*
|
|
2275
|
+
* Works independently of `enableDeepValidation`. Only requires `ipResolver` config:
|
|
2276
|
+
* - `ipResolver.ipApi: true` for ip-api.com lookups
|
|
2277
|
+
* - `ipResolver.findip: { enabled: true, apiKey: [...] }` for findip.net fallback
|
|
2278
|
+
*
|
|
2279
|
+
* @param domain - The domain name to check (e.g. "mail.example.com")
|
|
2280
|
+
* @param abortOptions - Optional signal/timeout to cancel the operation
|
|
2281
|
+
* @returns An object with `status` and `type` (hosting provider name)
|
|
2282
|
+
*
|
|
2283
|
+
* @example
|
|
2284
|
+
* const validator = EmailValidator.create({
|
|
2285
|
+
* options: { ipResolver: { ipApi: true } }
|
|
2286
|
+
* });
|
|
2287
|
+
* const result = await validator.detectHostingProvider('mail.company.com');
|
|
2288
|
+
* // { status: true, type: 'AWS Partner' }
|
|
2289
|
+
*/
|
|
2290
|
+
detectHostingProvider(domain: string, abortOptions?: AbortOptions): Promise<{
|
|
2291
|
+
status: boolean;
|
|
2292
|
+
type: string;
|
|
2293
|
+
webmail?: string;
|
|
2294
|
+
}>;
|
|
2295
|
+
private is_email;
|
|
2296
|
+
private isDomainOrUrl;
|
|
2297
|
+
/**
|
|
2298
|
+
* Checks if the input string is a valid JSON array of strings, where each string is a valid email address.
|
|
2299
|
+
*
|
|
2300
|
+
* - Attempts to parse the input string as JSON.
|
|
2301
|
+
* - Ensures the parsed value is an array of non-empty strings.
|
|
2302
|
+
* - Each element is also checked (using this.isEmail) to confirm it is a valid email address.
|
|
2303
|
+
* - If all conditions are met and the array has at least one valid email, returns the array.
|
|
2304
|
+
* - Otherwise, returns null.
|
|
2305
|
+
*
|
|
2306
|
+
* @param {string} input - The input string to validate.
|
|
2307
|
+
* @returns {string[] | null} The parsed array of valid email addresses if all conditions are met, otherwise null.
|
|
2308
|
+
*
|
|
2309
|
+
* @example
|
|
2310
|
+
* validator.isJson('["hello@site.com", "test@a.io"]'); // returns ["hello@site.com", "test@a.io"]
|
|
2311
|
+
* validator.isJson('["foo", 1, null]'); // returns null
|
|
2312
|
+
* validator.isJson('not json'); // returns null
|
|
2313
|
+
* validator.isJson('[]'); // returns null
|
|
2314
|
+
*/
|
|
2315
|
+
isJson(input: string): string[] | null;
|
|
2316
|
+
/**
|
|
2317
|
+
* Extracts and returns an array of valid email addresses from various input formats.
|
|
2318
|
+
*
|
|
2319
|
+
* This method processes input strings that may contain:
|
|
2320
|
+
* - Plain email addresses
|
|
2321
|
+
* - Comma-separated email addresses
|
|
2322
|
+
* - URL-encoded strings (automatically decoded)
|
|
2323
|
+
* - JSON arrays containing email addresses
|
|
2324
|
+
*
|
|
2325
|
+
* The function will:
|
|
2326
|
+
* 1. URL-decode each input string
|
|
2327
|
+
* 2. Split comma-separated values
|
|
2328
|
+
* 3. Validate each token as an email address
|
|
2329
|
+
* 4. Parse JSON arrays and extract valid emails from them
|
|
2330
|
+
* 5. Return a flat array of all valid email addresses found
|
|
2331
|
+
*
|
|
2332
|
+
* Note: Domain/URL detection is currently disabled (commented out in the implementation).
|
|
2333
|
+
* Only valid email addresses are included in the result.
|
|
2334
|
+
*
|
|
2335
|
+
* @param {string[]} input - An array of strings that may contain email addresses in various formats.
|
|
2336
|
+
* Each string can be:
|
|
2337
|
+
* - A single email address
|
|
2338
|
+
* - Comma-separated email addresses
|
|
2339
|
+
* - URL-encoded email addresses
|
|
2340
|
+
* - A JSON array string containing email addresses
|
|
2341
|
+
* - Any combination of the above
|
|
2342
|
+
*
|
|
2343
|
+
* @returns {string[]} An array of valid email addresses extracted from the input.
|
|
2344
|
+
* Duplicate emails may be present if they appear multiple times in the input.
|
|
2345
|
+
* Returns an empty array if no valid emails are found.
|
|
2346
|
+
*
|
|
2347
|
+
* @example
|
|
2348
|
+
* // Single email
|
|
2349
|
+
* validator.extractEmailsFromArray(["user@example.com"]);
|
|
2350
|
+
* // Returns: ["user@example.com"]
|
|
2351
|
+
*
|
|
2352
|
+
* @example
|
|
2353
|
+
* // Comma-separated emails
|
|
2354
|
+
* validator.extractEmailsFromArray(["user1@example.com,user2@example.com"]);
|
|
2355
|
+
* // Returns: ["user1@example.com", "user2@example.com"]
|
|
2356
|
+
*
|
|
2357
|
+
* @example
|
|
2358
|
+
* // URL-encoded and comma-separated
|
|
2359
|
+
* validator.extractEmailsFromArray(["user%40example.com,test%40domain.com"]);
|
|
2360
|
+
* // Returns: ["user@example.com", "test@domain.com"]
|
|
2361
|
+
*
|
|
2362
|
+
* @example
|
|
2363
|
+
* // JSON array of emails
|
|
2364
|
+
* validator.extractEmailsFromArray(['["email1@test.com", "email2@test.com"]']);
|
|
2365
|
+
* // Returns: ["email1@test.com", "email2@test.com"]
|
|
2366
|
+
*
|
|
2367
|
+
* @example
|
|
2368
|
+
* // Mixed formats
|
|
2369
|
+
* validator.extractEmailsFromArray([
|
|
2370
|
+
* "user@example.com",
|
|
2371
|
+
* "test@domain.com,admin@site.com",
|
|
2372
|
+
* '["json@email.com"]'
|
|
2373
|
+
* ]);
|
|
2374
|
+
* // Returns: ["user@example.com", "test@domain.com", "admin@site.com", "json@email.com"]
|
|
2375
|
+
*
|
|
2376
|
+
* @example
|
|
2377
|
+
* // Invalid emails are filtered out
|
|
2378
|
+
* validator.extractEmailsFromArray(["valid@example.com", "invalid-email", "another@valid.com"]);
|
|
2379
|
+
* // Returns: ["valid@example.com", "another@valid.com"]
|
|
2380
|
+
*/
|
|
2381
|
+
extractEmailsFromArray(input: string[]): string[];
|
|
2382
|
+
/**
|
|
2383
|
+
* Retrieves the webmail URL for a given email provider or domain/email address.
|
|
2384
|
+
*
|
|
2385
|
+
* This method returns the webmail login URL for known email providers (e.g., Gmail, Yahoo, Outlook).
|
|
2386
|
+
* It supports multiple calling patterns:
|
|
2387
|
+
* - By provider name only (returns the standard webmail URL for that provider)
|
|
2388
|
+
* - By provider name with domain/email (for providers that may have custom domains)
|
|
2389
|
+
* - By domain/email address directly (automatically detects if the string is a domain or email)
|
|
2390
|
+
*
|
|
2391
|
+
* The method first checks if the provider has a known webmail URL in the internal provider list.
|
|
2392
|
+
* If not found and a domain/email is provided, it attempts to resolve the webmail URL from the domain.
|
|
2393
|
+
*
|
|
2394
|
+
* Supported providers include major global providers (Gmail, Yahoo, Outlook, etc.), regional providers,
|
|
2395
|
+
* business/enterprise providers, and many others. See the provider list for complete coverage.
|
|
2396
|
+
*
|
|
2397
|
+
* @overload
|
|
2398
|
+
* @param {ProviderName} provider - The name of the email provider (e.g., "Gmail", "Yahoo", "Outlook").
|
|
2399
|
+
* @returns {string | null} The webmail URL for the provider, or `null` if not found.
|
|
2400
|
+
*
|
|
2401
|
+
* @overload
|
|
2402
|
+
* @param {ProviderName} provider - The name of the email provider.
|
|
2403
|
+
* @param {string} domainOrEmail - A domain name (e.g., "example.com") or email address (e.g., "user@example.com").
|
|
2404
|
+
* Used as a fallback if the provider name doesn't have a direct URL mapping.
|
|
2405
|
+
* @returns {string | null} The webmail URL for the provider/domain, or `null` if not found.
|
|
2406
|
+
*
|
|
2407
|
+
* @overload
|
|
2408
|
+
* @param {string} domainOrEmail - A domain name (e.g., "gmail.com") or email address (e.g., "user@gmail.com").
|
|
2409
|
+
* The method automatically detects if this is a domain or email by checking for "@" or ".".
|
|
2410
|
+
* @returns {string | null} The webmail URL for the domain, or `null` if not found.
|
|
2411
|
+
*
|
|
2412
|
+
* @example
|
|
2413
|
+
* // Get webmail URL by provider name
|
|
2414
|
+
* validator.getProviderWebmailUrl("Gmail");
|
|
2415
|
+
* // Returns: "https://mail.google.com"
|
|
2416
|
+
*
|
|
2417
|
+
* @example
|
|
2418
|
+
* // Get webmail URL by provider name with domain
|
|
2419
|
+
* validator.getProviderWebmailUrl("Yahoo", "yahoo.com");
|
|
2420
|
+
* // Returns: "https://mail.yahoo.com"
|
|
2421
|
+
*
|
|
2422
|
+
* @example
|
|
2423
|
+
* // Get webmail URL by email address (auto-detects domain)
|
|
2424
|
+
* validator.getProviderWebmailUrl("user@gmail.com");
|
|
2425
|
+
* // Returns: "https://mail.google.com"
|
|
2426
|
+
*
|
|
2427
|
+
* @example
|
|
2428
|
+
* // Get webmail URL by domain name
|
|
2429
|
+
* validator.getProviderWebmailUrl("outlook.com");
|
|
2430
|
+
* // Returns: "https://outlook.live.com"
|
|
2431
|
+
*
|
|
2432
|
+
* @example
|
|
2433
|
+
* // Unknown provider returns null
|
|
2434
|
+
* validator.getProviderWebmailUrl("UnknownProvider");
|
|
2435
|
+
* // Returns: null
|
|
2436
|
+
*
|
|
2437
|
+
* @example
|
|
2438
|
+
* // Provider with domain fallback
|
|
2439
|
+
* validator.getProviderWebmailUrl("CustomProvider", "customdomain.com");
|
|
2440
|
+
* // May return a URL if the domain is recognized as a free provider
|
|
2441
|
+
*/
|
|
2442
|
+
getProviderWebmailUrl(provider: ProviderName$1): string | null;
|
|
2443
|
+
getProviderWebmailUrl(provider: ProviderName$1, domainOrEmail: string): string | null;
|
|
2444
|
+
getProviderWebmailUrl(domainOrEmail: string): string | null;
|
|
2445
|
+
/**
|
|
2446
|
+
* Extract and validate email addresses from mixed HTML or plain-text content.
|
|
2447
|
+
*
|
|
2448
|
+
* The method:
|
|
2449
|
+
* 1. Sanitizes the input by stripping HTML tags and removing non-essential punctuation.
|
|
2450
|
+
* 2. Applies a robust regular-expression pattern to locate candidate email strings.
|
|
2451
|
+
* 3. Validates each candidate against the full RFC-style rules implemented in {@link isEmail}.
|
|
2452
|
+
* 4. De-duplicates the final list while preserving the original order of first appearance.
|
|
2453
|
+
*
|
|
2454
|
+
* @param content - Arbitrary HTML or plain-text that may contain zero or more email addresses.
|
|
2455
|
+
* @returns An array of unique, syntactically valid email addresses discovered in the supplied content.
|
|
2456
|
+
* Returns an empty array when no valid emails are found.
|
|
2457
|
+
*
|
|
2458
|
+
* @example
|
|
2459
|
+
* // Plain text
|
|
2460
|
+
* validator.extractEmails('Contact us at support@example.com or sales@example.com');
|
|
2461
|
+
* // → ['support@example.com', 'sales@example.com']
|
|
2462
|
+
*
|
|
2463
|
+
* @example
|
|
2464
|
+
* // HTML fragment
|
|
2465
|
+
* validator.extractEmails('<a href="mailto:info@site.org">Info</a> <span>admin@site.org</span>');
|
|
2466
|
+
* // → ['info@site.org', 'admin@site.org']
|
|
2467
|
+
*
|
|
2468
|
+
* @example
|
|
2469
|
+
* // Duplicates are removed
|
|
2470
|
+
* validator.extractEmails('user@demo.io, User@demo.io, USER@DEMO.IO');
|
|
2471
|
+
* // → ['user@demo.io']
|
|
2472
|
+
*/
|
|
2473
|
+
extractEmails(content: string): string[];
|
|
2474
|
+
}
|
|
2475
|
+
export type IPResponseData = {
|
|
2476
|
+
status: string;
|
|
2477
|
+
continent: string;
|
|
2478
|
+
continentCode: string;
|
|
2479
|
+
country: string;
|
|
2480
|
+
countryCode: string;
|
|
2481
|
+
region: string;
|
|
2482
|
+
regionName: string;
|
|
2483
|
+
city: string;
|
|
2484
|
+
zip: string;
|
|
2485
|
+
lat: number;
|
|
2486
|
+
lon: number;
|
|
2487
|
+
timezone: string;
|
|
2488
|
+
currency: string;
|
|
2489
|
+
isp: string;
|
|
2490
|
+
org: string;
|
|
2491
|
+
as: string;
|
|
2492
|
+
reverse: string;
|
|
2493
|
+
mobile: boolean;
|
|
2494
|
+
proxy: boolean;
|
|
2495
|
+
hosting: boolean;
|
|
2496
|
+
query: string;
|
|
2497
|
+
};
|
|
2498
|
+
export type IPResponseDataFindIp = {
|
|
2499
|
+
city: {
|
|
2500
|
+
geoname_id: number;
|
|
2501
|
+
names: {
|
|
2502
|
+
de: string;
|
|
2503
|
+
en: string;
|
|
2504
|
+
es: string;
|
|
2505
|
+
fa: string;
|
|
2506
|
+
fr: string;
|
|
2507
|
+
ja: string;
|
|
2508
|
+
ko: string;
|
|
2509
|
+
"pt-BR": string;
|
|
2510
|
+
ru: string;
|
|
2511
|
+
"zh-CN": string;
|
|
2512
|
+
};
|
|
2513
|
+
};
|
|
2514
|
+
continent: {
|
|
2515
|
+
code: string;
|
|
2516
|
+
geoname_id: number;
|
|
2517
|
+
names: {
|
|
2518
|
+
de: string;
|
|
2519
|
+
en: string;
|
|
2520
|
+
es: string;
|
|
2521
|
+
fa: string;
|
|
2522
|
+
fr: string;
|
|
2523
|
+
ja: string;
|
|
2524
|
+
ko: string;
|
|
2525
|
+
"pt-BR": string;
|
|
2526
|
+
ru: string;
|
|
2527
|
+
"zh-CN": string;
|
|
2528
|
+
};
|
|
2529
|
+
};
|
|
2530
|
+
country: {
|
|
2531
|
+
geoname_id: number;
|
|
2532
|
+
is_in_european_union: boolean;
|
|
2533
|
+
iso_code: string;
|
|
2534
|
+
names: {
|
|
2535
|
+
de: string;
|
|
2536
|
+
en: string;
|
|
2537
|
+
es: string;
|
|
2538
|
+
fa: string;
|
|
2539
|
+
fr: string;
|
|
2540
|
+
ja: string;
|
|
2541
|
+
ko: string;
|
|
2542
|
+
"pt-BR": string;
|
|
2543
|
+
ru: string;
|
|
2544
|
+
"zh-CN": string;
|
|
2545
|
+
};
|
|
2546
|
+
};
|
|
2547
|
+
location: {
|
|
2548
|
+
latitude: number;
|
|
2549
|
+
longitude: number;
|
|
2550
|
+
time_zone: string;
|
|
2551
|
+
weather_code: string;
|
|
2552
|
+
};
|
|
2553
|
+
subdivisions: Array<{
|
|
2554
|
+
geoname_id: number;
|
|
2555
|
+
iso_code?: string;
|
|
2556
|
+
names: {
|
|
2557
|
+
en: string;
|
|
2558
|
+
};
|
|
2559
|
+
}>;
|
|
2560
|
+
traits: {
|
|
2561
|
+
autonomous_system_number: number;
|
|
2562
|
+
autonomous_system_organization: string;
|
|
2563
|
+
connection_type: string;
|
|
2564
|
+
isp: string;
|
|
2565
|
+
user_type: string;
|
|
2566
|
+
};
|
|
2567
|
+
};
|
|
2568
|
+
export interface Valid {
|
|
2569
|
+
success: true;
|
|
2570
|
+
data: {
|
|
2571
|
+
provider: ProviderName$1;
|
|
2572
|
+
isFree: boolean;
|
|
2573
|
+
email: string;
|
|
2574
|
+
role: boolean;
|
|
2575
|
+
webmail?: string;
|
|
2576
|
+
};
|
|
2577
|
+
}
|
|
2578
|
+
export interface Invalid {
|
|
2579
|
+
success: false;
|
|
2580
|
+
type: "Invalid";
|
|
2581
|
+
email: string;
|
|
2582
|
+
role: boolean;
|
|
2583
|
+
}
|
|
2584
|
+
interface Disposable$1 {
|
|
2585
|
+
success: false;
|
|
2586
|
+
type: "Disposable";
|
|
2587
|
+
email: string;
|
|
2588
|
+
role: boolean;
|
|
2589
|
+
}
|
|
2590
|
+
export interface Rejected {
|
|
2591
|
+
success: false;
|
|
2592
|
+
type: "Rejected";
|
|
2593
|
+
email: string;
|
|
2594
|
+
role: boolean;
|
|
2595
|
+
}
|
|
2596
|
+
export interface Syntax {
|
|
2597
|
+
success: false;
|
|
2598
|
+
type: "Syntax";
|
|
2599
|
+
email: string;
|
|
2600
|
+
role: boolean;
|
|
2601
|
+
}
|
|
2602
|
+
interface Error$1 {
|
|
2603
|
+
success: false;
|
|
2604
|
+
type: "Error";
|
|
2605
|
+
email: string;
|
|
2606
|
+
message: string;
|
|
2607
|
+
role: boolean;
|
|
2608
|
+
}
|
|
2609
|
+
export type EmailResponse = Valid | Invalid | Rejected | Syntax | Error$1 | Disposable$1;
|
|
2610
|
+
/**
|
|
2611
|
+
* Main DNS resolver class that aggregates multiple DNS providers.
|
|
2612
|
+
*/
|
|
2613
|
+
export declare class Zynor {
|
|
2614
|
+
private providers;
|
|
2615
|
+
private static __emailValidator;
|
|
2616
|
+
private dnsCache;
|
|
2617
|
+
private dnsTtl;
|
|
2618
|
+
private inflight;
|
|
2619
|
+
/**
|
|
2620
|
+
* Creates a new Zynor resolver instance.
|
|
2621
|
+
* @param config - Configuration for all providers
|
|
2622
|
+
* @example
|
|
2623
|
+
* ```typescript
|
|
2624
|
+
* const dns = new Zynor({
|
|
2625
|
+
* google: { enabled: true, limit: { concurrency: 10 } },
|
|
2626
|
+
* cloudflare: { enabled: false }
|
|
2627
|
+
* });
|
|
2628
|
+
* ```
|
|
2629
|
+
*/
|
|
2630
|
+
constructor(config?: ZynorConfig);
|
|
2631
|
+
private cachedResolve;
|
|
2632
|
+
/**
|
|
2633
|
+
* Creates or returns a singleton instance of EmailValidator.
|
|
2634
|
+
* If an instance already exists, returns the existing instance.
|
|
2635
|
+
* If no instance exists, creates a new one with the provided configuration.
|
|
2636
|
+
*
|
|
2637
|
+
* @param config - Configuration object for the EmailValidator
|
|
2638
|
+
* @param config.options - Optional validation configuration settings
|
|
2639
|
+
* @param config.options.allowIPv6 - Whether to allow IPv6 addresses in email domains
|
|
2640
|
+
* @param config.options.allowInternational - Whether to allow international email addresses
|
|
2641
|
+
* @param config.options.checkDNS - Whether to perform DNS lookups during validation
|
|
2642
|
+
* @param config.dns - Optional DNS configuration for the validator's DNS resolver
|
|
2643
|
+
* @returns An EmailValidator instance
|
|
2644
|
+
*
|
|
2645
|
+
* @example
|
|
2646
|
+
* ```typescript
|
|
2647
|
+
* // Create with default configuration
|
|
2648
|
+
* const validator = Zynor.createEmailValidator();
|
|
2649
|
+
*
|
|
2650
|
+
* // Create with custom configuration
|
|
2651
|
+
* const validator = Zynor.createEmailValidator({
|
|
2652
|
+
* options: {
|
|
2653
|
+
* allowIPv6: true,
|
|
2654
|
+
* checkDNS: true
|
|
2655
|
+
* },
|
|
2656
|
+
* dns: {
|
|
2657
|
+
* google: { enabled: true }
|
|
2658
|
+
* }
|
|
2659
|
+
* });
|
|
2660
|
+
* ```
|
|
2661
|
+
*/
|
|
2662
|
+
static createEmailValidator(config?: {
|
|
2663
|
+
options?: ValidationConfig;
|
|
2664
|
+
dns?: ZynorConfig;
|
|
2665
|
+
}): EmailValidator;
|
|
2666
|
+
static get emailValidator(): EmailValidator;
|
|
2667
|
+
/**
|
|
2668
|
+
* Initializes all DNS providers with their configurations.
|
|
2669
|
+
*/
|
|
2670
|
+
private initializeProviders;
|
|
2671
|
+
/**
|
|
2672
|
+
* Sets configuration for a specific provider.
|
|
2673
|
+
* @param provider - The provider name
|
|
2674
|
+
* @param config - The provider configuration
|
|
2675
|
+
* @throws {InvalidProviderError} If the provider name is invalid
|
|
2676
|
+
* @example
|
|
2677
|
+
* ```typescript
|
|
2678
|
+
* dns.setConfig('google', { enabled: true, limit: { concurrency: 15 } });
|
|
2679
|
+
* ```
|
|
2680
|
+
*/
|
|
2681
|
+
setConfig(provider: string, config: ProviderConfig): void;
|
|
2682
|
+
/**
|
|
2683
|
+
* Sets configurations for all providers.
|
|
2684
|
+
* @param config - Configuration object for all providers
|
|
2685
|
+
* @example
|
|
2686
|
+
* ```typescript
|
|
2687
|
+
* dns.setConfigs({
|
|
2688
|
+
* native: { enabled: true },
|
|
2689
|
+
* google: { enabled: true, limit: { concurrency: 10 } },
|
|
2690
|
+
* cloudflare: { enabled: false },
|
|
2691
|
+
* quad9: { enabled: true }
|
|
2692
|
+
* });
|
|
2693
|
+
* ```
|
|
2694
|
+
*/
|
|
2695
|
+
setConfigs(config: ZynorConfig): void;
|
|
2696
|
+
/**
|
|
2697
|
+
* Validates if a provider name is valid.
|
|
2698
|
+
*/
|
|
2699
|
+
private isValidProvider;
|
|
2700
|
+
/**
|
|
2701
|
+
* Validates hostname format.
|
|
2702
|
+
*/
|
|
2703
|
+
private validateHostname;
|
|
2704
|
+
/**
|
|
2705
|
+
* Gets all enabled providers.
|
|
2706
|
+
*/
|
|
2707
|
+
private getEnabledProviders;
|
|
2708
|
+
/**
|
|
2709
|
+
* Selects a random enabled provider, preferring non-full queues.
|
|
2710
|
+
*/
|
|
2711
|
+
private selectProvider;
|
|
2712
|
+
private rnd;
|
|
2713
|
+
/**
|
|
2714
|
+
* Parses the second argument which can be either AbortOptions or a provider string.
|
|
2715
|
+
*/
|
|
2716
|
+
private parseArgs;
|
|
2717
|
+
/**
|
|
2718
|
+
* Gets a provider instance by name.
|
|
2719
|
+
*/
|
|
2720
|
+
private getProvider;
|
|
2721
|
+
/**
|
|
2722
|
+
* Resolves A records for a hostname.
|
|
2723
|
+
* @param hostname - The hostname to resolve
|
|
2724
|
+
* @param options - Optional resolution options
|
|
2725
|
+
* @param provider - Optional specific provider to use (e.g., 'google', 'cloudflare')
|
|
2726
|
+
* @returns A promise resolving to an array of IPv4 addresses or records with TTL
|
|
2727
|
+
* @throws {InvalidHostnameError} If the hostname is invalid
|
|
2728
|
+
* @throws {NoEnabledProvidersError} If no providers are enabled
|
|
2729
|
+
* @example
|
|
2730
|
+
* ```typescript
|
|
2731
|
+
* const addresses = await dns.resolve4('example.com');
|
|
2732
|
+
* console.log(addresses); // ['93.184.216.34']
|
|
2733
|
+
*
|
|
2734
|
+
* const withTtl = await dns.resolve4('example.com', { ttl: true });
|
|
2735
|
+
* console.log(withTtl); // [{ address: '93.184.216.34', ttl: 300 }]
|
|
2736
|
+
* ```
|
|
2737
|
+
*/
|
|
2738
|
+
resolve4: IResolver["resolve4"];
|
|
2739
|
+
/**
|
|
2740
|
+
* Resolves AAAA records for a hostname.
|
|
2741
|
+
* @param hostname - The hostname to resolve
|
|
2742
|
+
* @param options - Optional resolution options
|
|
2743
|
+
* @param provider - Optional specific provider to use
|
|
2744
|
+
* @returns A promise resolving to an array of IPv6 addresses or records with TTL
|
|
2745
|
+
* @throws {InvalidHostnameError} If the hostname is invalid
|
|
2746
|
+
* @throws {NoEnabledProvidersError} If no providers are enabled
|
|
2747
|
+
* @example
|
|
2748
|
+
* ```typescript
|
|
2749
|
+
* const addresses = await dns.resolve6('example.com');
|
|
2750
|
+
* console.log(addresses); // ['2606:2800:220:1:248:1893:25c8:1946']
|
|
2751
|
+
* ```
|
|
2752
|
+
*/
|
|
2753
|
+
resolve6: IResolver["resolve6"];
|
|
2754
|
+
/**
|
|
2755
|
+
* Resolves ANY records for a hostname.
|
|
2756
|
+
* @param hostname - The hostname to resolve
|
|
2757
|
+
* @param provider - Optional specific provider to use
|
|
2758
|
+
* @returns A promise resolving to an array of any DNS records
|
|
2759
|
+
* @throws {InvalidHostnameError} If the hostname is invalid
|
|
2760
|
+
* @throws {NoEnabledProvidersError} If no providers are enabled
|
|
2761
|
+
* @example
|
|
2762
|
+
* ```typescript
|
|
2763
|
+
* const records = await dns.resolveAny('example.com');
|
|
2764
|
+
* console.log(records); // [{ type: 'A', address: '93.184.216.34' }, ...]
|
|
2765
|
+
* ```
|
|
2766
|
+
*/
|
|
2767
|
+
resolveAny: IResolver["resolveAny"];
|
|
2768
|
+
/**
|
|
2769
|
+
* Resolves CAA records for a hostname.
|
|
2770
|
+
* @param hostname - The hostname to resolve
|
|
2771
|
+
* @param provider - Optional specific provider to use
|
|
2772
|
+
* @returns A promise resolving to an array of CAA records
|
|
2773
|
+
* @throws {InvalidHostnameError} If the hostname is invalid
|
|
2774
|
+
* @throws {NoEnabledProvidersError} If no providers are enabled
|
|
2775
|
+
*/
|
|
2776
|
+
resolveCaa: IResolver["resolveCaa"];
|
|
2777
|
+
/**
|
|
2778
|
+
* Resolves CNAME records for a hostname.
|
|
2779
|
+
* @param hostname - The hostname to resolve
|
|
2780
|
+
* @param provider - Optional specific provider to use
|
|
2781
|
+
* @returns A promise resolving to an array of CNAME records
|
|
2782
|
+
* @throws {InvalidHostnameError} If the hostname is invalid
|
|
2783
|
+
* @throws {NoEnabledProvidersError} If no providers are enabled
|
|
2784
|
+
*/
|
|
2785
|
+
resolveCname: IResolver["resolveCname"];
|
|
2786
|
+
/**
|
|
2787
|
+
* Resolves MX records for a hostname.
|
|
2788
|
+
* @param hostname - The hostname to resolve
|
|
2789
|
+
* @param provider - Optional specific provider to use
|
|
2790
|
+
* @returns A promise resolving to an array of MX records
|
|
2791
|
+
* @throws {InvalidHostnameError} If the hostname is invalid
|
|
2792
|
+
* @throws {NoEnabledProvidersError} If no providers are enabled
|
|
2793
|
+
* @example
|
|
2794
|
+
* ```typescript
|
|
2795
|
+
* const mxRecords = await dns.resolveMx('example.com');
|
|
2796
|
+
* console.log(mxRecords); // [{ priority: 10, exchange: 'mail.example.com' }]
|
|
2797
|
+
* ```
|
|
2798
|
+
*/
|
|
2799
|
+
resolveMx: IResolver["resolveMx"];
|
|
2800
|
+
/**
|
|
2801
|
+
* Resolves NAPTR records for a hostname.
|
|
2802
|
+
* @param hostname - The hostname to resolve
|
|
2803
|
+
* @param provider - Optional specific provider to use
|
|
2804
|
+
* @returns A promise resolving to an array of NAPTR records
|
|
2805
|
+
* @throws {InvalidHostnameError} If the hostname is invalid
|
|
2806
|
+
* @throws {NoEnabledProvidersError} If no providers are enabled
|
|
2807
|
+
*/
|
|
2808
|
+
resolveNaptr: IResolver["resolveNaptr"];
|
|
2809
|
+
/**
|
|
2810
|
+
* Resolves NS records for a hostname.
|
|
2811
|
+
* @param hostname - The hostname to resolve
|
|
2812
|
+
* @param provider - Optional specific provider to use
|
|
2813
|
+
* @returns A promise resolving to an array of NS records
|
|
2814
|
+
* @throws {InvalidHostnameError} If the hostname is invalid
|
|
2815
|
+
* @throws {NoEnabledProvidersError} If no providers are enabled
|
|
2816
|
+
*/
|
|
2817
|
+
resolveNs: IResolver["resolveNs"];
|
|
2818
|
+
/**
|
|
2819
|
+
* Resolves PTR records for an IP address.
|
|
2820
|
+
* @param ip - The IP address to resolve
|
|
2821
|
+
* @param provider - Optional specific provider to use
|
|
2822
|
+
* @returns A promise resolving to an array of PTR records
|
|
2823
|
+
* @throws {InvalidHostnameError} If the IP address is invalid
|
|
2824
|
+
* @throws {NoEnabledProvidersError} If no providers are enabled
|
|
2825
|
+
*/
|
|
2826
|
+
resolvePtr: IResolver["resolvePtr"];
|
|
2827
|
+
/**
|
|
2828
|
+
* Resolves SOA record for a hostname.
|
|
2829
|
+
* @param hostname - The hostname to resolve
|
|
2830
|
+
* @param provider - Optional specific provider to use
|
|
2831
|
+
* @returns A promise resolving to the SOA record
|
|
2832
|
+
* @throws {InvalidHostnameError} If the hostname is invalid
|
|
2833
|
+
* @throws {NoEnabledProvidersError} If no providers are enabled
|
|
2834
|
+
*/
|
|
2835
|
+
resolveSoa: IResolver["resolveSoa"];
|
|
2836
|
+
/**
|
|
2837
|
+
* Resolves SRV records for a hostname.
|
|
2838
|
+
* @param hostname - The hostname to resolve
|
|
2839
|
+
* @param provider - Optional specific provider to use
|
|
2840
|
+
* @returns A promise resolving to an array of SRV records
|
|
2841
|
+
* @throws {InvalidHostnameError} If the hostname is invalid
|
|
2842
|
+
* @throws {NoEnabledProvidersError} If no providers are enabled
|
|
2843
|
+
*/
|
|
2844
|
+
resolveSrv: IResolver["resolveSrv"];
|
|
2845
|
+
/**
|
|
2846
|
+
* Resolves TLSA records for a hostname.
|
|
2847
|
+
* @param hostname - The hostname to resolve
|
|
2848
|
+
* @param provider - Optional specific provider to use
|
|
2849
|
+
* @returns A promise resolving to an array of TLSA records
|
|
2850
|
+
* @throws {InvalidHostnameError} If the hostname is invalid
|
|
2851
|
+
* @throws {NoEnabledProvidersError} If no providers are enabled
|
|
2852
|
+
*/
|
|
2853
|
+
resolveTlsa: IResolver["resolveTlsa"];
|
|
2854
|
+
/**
|
|
2855
|
+
* Resolves TXT records for a hostname.
|
|
2856
|
+
* @param hostname - The hostname to resolve
|
|
2857
|
+
* @param provider - Optional specific provider to use
|
|
2858
|
+
* @returns A promise resolving to an array of TXT records
|
|
2859
|
+
* @throws {InvalidHostnameError} If the hostname is invalid
|
|
2860
|
+
* @throws {NoEnabledProvidersError} If no providers are enabled
|
|
2861
|
+
* @example
|
|
2862
|
+
* ```typescript
|
|
2863
|
+
* const txtRecords = await dns.resolveTxt('example.com');
|
|
2864
|
+
* console.log(txtRecords); // [['v=spf1 include:_spf.example.com ~all']]
|
|
2865
|
+
* ```
|
|
2866
|
+
*/
|
|
2867
|
+
resolveTxt: IResolver["resolveTxt"];
|
|
2868
|
+
/**
|
|
2869
|
+
* Performs reverse DNS lookup for an IP address.
|
|
2870
|
+
* @param ip - The IP address to reverse lookup
|
|
2871
|
+
* @param provider - Optional specific provider to use
|
|
2872
|
+
* @returns A promise resolving to an array of hostnames
|
|
2873
|
+
* @throws {InvalidHostnameError} If the IP address is invalid
|
|
2874
|
+
* @throws {NoEnabledProvidersError} If no providers are enabled
|
|
2875
|
+
* @example
|
|
2876
|
+
* ```typescript
|
|
2877
|
+
* const hostnames = await dns.reverse('8.8.8.8');
|
|
2878
|
+
* console.log(hostnames); // ['dns.google.']
|
|
2879
|
+
* ```
|
|
2880
|
+
*/
|
|
2881
|
+
reverse: IResolver["reverse"];
|
|
2882
|
+
/**
|
|
2883
|
+
* Generic resolve method that delegates to specific resolve methods.
|
|
2884
|
+
* @param hostname - The hostname to resolve
|
|
2885
|
+
* @param rrtype - The DNS record type
|
|
2886
|
+
* @param provider - Optional specific provider to use
|
|
2887
|
+
* @returns A promise resolving to DNS records of the specified type
|
|
2888
|
+
* @throws {InvalidHostnameError} If the hostname is invalid
|
|
2889
|
+
* @throws {NoEnabledProvidersError} If no providers are enabled
|
|
2890
|
+
* @example
|
|
2891
|
+
* ```typescript
|
|
2892
|
+
* const aRecords = await dns.resolve('example.com', 'A');
|
|
2893
|
+
* const mxRecords = await dns.resolve('example.com', 'MX');
|
|
2894
|
+
* ```
|
|
2895
|
+
*/
|
|
2896
|
+
resolve: IResolver["resolve"];
|
|
2897
|
+
/**
|
|
2898
|
+
* Returns the sum of concurrency limits across all enabled DNS providers.
|
|
2899
|
+
* Used by `validateBulk` to determine default parallelism.
|
|
2900
|
+
* @example
|
|
2901
|
+
* ```typescript
|
|
2902
|
+
* const dns = new Zynor({ google: { enabled: true }, cloudflare: { enabled: true } });
|
|
2903
|
+
* console.log(dns.totalConcurrency); // 20 (10 + 10)
|
|
2904
|
+
* ```
|
|
2905
|
+
*/
|
|
2906
|
+
get totalConcurrency(): number;
|
|
2907
|
+
/**
|
|
2908
|
+
* Validates multiple email addresses in parallel using the email validator.
|
|
2909
|
+
* Concurrency is derived from enabled DNS provider limits unless explicitly provided.
|
|
2910
|
+
* @param emails - Array of email addresses to validate
|
|
2911
|
+
* @param options - Optional bulk validation options
|
|
2912
|
+
* @returns A promise resolving to an array of EmailResponse in the same order as input
|
|
2913
|
+
* @example
|
|
2914
|
+
* ```typescript
|
|
2915
|
+
* const results = await Zynor.validateBulk(['user@gmail.com', 'test@example.com']);
|
|
2916
|
+
* console.log(results); // [{ success: true, data: { provider: 'Google', ... } }, ...]
|
|
2917
|
+
* ```
|
|
2918
|
+
*/
|
|
2919
|
+
static validateBulk(emails: string[], options?: {
|
|
2920
|
+
concurrency?: number;
|
|
2921
|
+
deep?: boolean;
|
|
2922
|
+
signal?: AbortSignal;
|
|
2923
|
+
timeout?: number;
|
|
2924
|
+
}): Promise<EmailResponse[]>;
|
|
2925
|
+
}
|
|
2926
|
+
/**
|
|
2927
|
+
* Resets the default resolver instance.
|
|
2928
|
+
* This is useful for testing or when you want to change the default configuration.
|
|
2929
|
+
*/
|
|
2930
|
+
export declare const resetDefaultResolver: () => void;
|
|
2931
|
+
/**
|
|
2932
|
+
* Sets a custom default resolver instance.
|
|
2933
|
+
* @param resolver - The Zynor instance to use as default
|
|
2934
|
+
*/
|
|
2935
|
+
export declare const setDefaultResolver: (resolver: Zynor) => void;
|
|
2936
|
+
/**
|
|
2937
|
+
* Resolves A records for a hostname using the default resolver.
|
|
2938
|
+
* @param hostname - The hostname to resolve
|
|
2939
|
+
* @param options - Optional resolution options
|
|
2940
|
+
* @param provider - Optional specific provider to use
|
|
2941
|
+
* @returns A promise resolving to an array of IPv4 addresses or records with TTL
|
|
2942
|
+
* @example
|
|
2943
|
+
* ```typescript
|
|
2944
|
+
* import { resolve4 } from 'zynor';
|
|
2945
|
+
*
|
|
2946
|
+
* const addresses = await resolve4('example.com');
|
|
2947
|
+
* console.log(addresses); // ['93.184.216.34']
|
|
2948
|
+
*
|
|
2949
|
+
* const withTtl = await resolve4('example.com', { ttl: true });
|
|
2950
|
+
* console.log(withTtl); // [{ address: '93.184.216.34', ttl: 300 }]
|
|
2951
|
+
* ```
|
|
2952
|
+
*/
|
|
2953
|
+
export declare const resolve4: IResolver["resolve4"];
|
|
2954
|
+
/**
|
|
2955
|
+
* Resolves AAAA records for a hostname using the default resolver.
|
|
2956
|
+
* @param hostname - The hostname to resolve
|
|
2957
|
+
* @param options - Optional resolution options
|
|
2958
|
+
* @param provider - Optional specific provider to use
|
|
2959
|
+
* @returns A promise resolving to an array of IPv6 addresses or records with TTL
|
|
2960
|
+
* @example
|
|
2961
|
+
* ```typescript
|
|
2962
|
+
* import { resolve6 } from 'zynor';
|
|
2963
|
+
*
|
|
2964
|
+
* const addresses = await resolve6('example.com');
|
|
2965
|
+
* console.log(addresses); // ['2606:2800:220:1:248:1893:25c8:1946']
|
|
2966
|
+
* ```
|
|
2967
|
+
*/
|
|
2968
|
+
export declare const resolve6: IResolver["resolve6"];
|
|
2969
|
+
/**
|
|
2970
|
+
* Resolves ANY records for a hostname using the default resolver.
|
|
2971
|
+
* @param hostname - The hostname to resolve
|
|
2972
|
+
* @param provider - Optional specific provider to use
|
|
2973
|
+
* @returns A promise resolving to an array of any DNS records
|
|
2974
|
+
* @example
|
|
2975
|
+
* ```typescript
|
|
2976
|
+
* import { resolveAny } from 'zynor';
|
|
2977
|
+
*
|
|
2978
|
+
* const records = await resolveAny('example.com');
|
|
2979
|
+
* console.log(records); // [{ type: 'A', address: '93.184.216.34' }, ...]
|
|
2980
|
+
* ```
|
|
2981
|
+
*/
|
|
2982
|
+
export declare const resolveAny: IResolver["resolveAny"];
|
|
2983
|
+
/**
|
|
2984
|
+
* Resolves CAA records for a hostname using the default resolver.
|
|
2985
|
+
* @param hostname - The hostname to resolve
|
|
2986
|
+
* @param provider - Optional specific provider to use
|
|
2987
|
+
* @returns A promise resolving to an array of CAA records
|
|
2988
|
+
*/
|
|
2989
|
+
export declare const resolveCaa: IResolver["resolveCaa"];
|
|
2990
|
+
/**
|
|
2991
|
+
* Resolves CNAME records for a hostname using the default resolver.
|
|
2992
|
+
* @param hostname - The hostname to resolve
|
|
2993
|
+
* @param provider - Optional specific provider to use
|
|
2994
|
+
* @returns A promise resolving to an array of CNAME records
|
|
2995
|
+
*/
|
|
2996
|
+
export declare const resolveCname: IResolver["resolveCname"];
|
|
2997
|
+
/**
|
|
2998
|
+
* Resolves MX records for a hostname using the default resolver.
|
|
2999
|
+
* @param hostname - The hostname to resolve
|
|
3000
|
+
* @param provider - Optional specific provider to use
|
|
3001
|
+
* @returns A promise resolving to an array of MX records
|
|
3002
|
+
* @example
|
|
3003
|
+
* ```typescript
|
|
3004
|
+
* import { resolveMx } from 'zynor';
|
|
3005
|
+
*
|
|
3006
|
+
* const mxRecords = await resolveMx('example.com');
|
|
3007
|
+
* console.log(mxRecords); // [{ priority: 10, exchange: 'mail.example.com' }]
|
|
3008
|
+
* ```
|
|
3009
|
+
*/
|
|
3010
|
+
export declare const resolveMx: IResolver["resolveMx"];
|
|
3011
|
+
/**
|
|
3012
|
+
* Resolves NAPTR records for a hostname using the default resolver.
|
|
3013
|
+
* @param hostname - The hostname to resolve
|
|
3014
|
+
* @param provider - Optional specific provider to use
|
|
3015
|
+
* @returns A promise resolving to an array of NAPTR records
|
|
3016
|
+
*/
|
|
3017
|
+
export declare const resolveNaptr: IResolver["resolveNaptr"];
|
|
3018
|
+
/**
|
|
3019
|
+
* Resolves NS records for a hostname using the default resolver.
|
|
3020
|
+
* @param hostname - The hostname to resolve
|
|
3021
|
+
* @param provider - Optional specific provider to use
|
|
3022
|
+
* @returns A promise resolving to an array of NS records
|
|
3023
|
+
*/
|
|
3024
|
+
export declare const resolveNs: IResolver["resolveNs"];
|
|
3025
|
+
export declare const resolvePtr: IResolver["resolvePtr"];
|
|
3026
|
+
export declare const resolveSoa: IResolver["resolveSoa"];
|
|
3027
|
+
export declare const resolveSrv: IResolver["resolveSrv"];
|
|
3028
|
+
/**
|
|
3029
|
+
* Resolves TLSA records for a hostname using the default resolver.
|
|
3030
|
+
* @param hostname - The hostname to resolve
|
|
3031
|
+
* @param provider - Optional specific provider to use
|
|
3032
|
+
* @returns A promise resolving to an array of TLSA records
|
|
3033
|
+
*/
|
|
3034
|
+
export declare const resolveTlsa: IResolver["resolveTlsa"];
|
|
3035
|
+
/**
|
|
3036
|
+
* Resolves TXT records for a hostname using the default resolver.
|
|
3037
|
+
* @param hostname - The hostname to resolve
|
|
3038
|
+
* @param provider - Optional specific provider to use
|
|
3039
|
+
* @returns A promise resolving to an array of TXT records
|
|
3040
|
+
* @example
|
|
3041
|
+
* ```typescript
|
|
3042
|
+
* import { resolveTxt } from 'zynor';
|
|
3043
|
+
*
|
|
3044
|
+
* const txtRecords = await resolveTxt('example.com');
|
|
3045
|
+
* console.log(txtRecords); // [['v=spf1 include:_spf.example.com ~all']]
|
|
3046
|
+
* ```
|
|
3047
|
+
*/
|
|
3048
|
+
export declare const resolveTxt: IResolver["resolveTxt"];
|
|
3049
|
+
/**
|
|
3050
|
+
* Performs reverse DNS lookup for an IP address using the default resolver.
|
|
3051
|
+
* @param ip - The IP address to reverse lookup
|
|
3052
|
+
* @param provider - Optional specific provider to use
|
|
3053
|
+
* @returns A promise resolving to an array of hostnames
|
|
3054
|
+
* @example
|
|
3055
|
+
* ```typescript
|
|
3056
|
+
* import { reverse } from 'zynor';
|
|
3057
|
+
*
|
|
3058
|
+
* const hostnames = await reverse('8.8.8.8');
|
|
3059
|
+
* console.log(hostnames); // ['dns.google.']
|
|
3060
|
+
* ```
|
|
3061
|
+
*/
|
|
3062
|
+
export declare const reverse: IResolver["reverse"];
|
|
3063
|
+
export declare const resolve: IResolver["resolve"];
|
|
3064
|
+
|
|
3065
|
+
export {
|
|
3066
|
+
CaaRecord,
|
|
3067
|
+
MxRecord,
|
|
3068
|
+
NaptrRecord,
|
|
3069
|
+
RecordWithTtl,
|
|
3070
|
+
ResolveOptions,
|
|
3071
|
+
ResolveWithTtlOptions,
|
|
3072
|
+
SoaRecord,
|
|
3073
|
+
SrvRecord,
|
|
3074
|
+
TlsaRecord,
|
|
3075
|
+
Zynor as default,
|
|
3076
|
+
};
|
|
3077
|
+
|
|
3078
|
+
export {};
|