internetdata-web 1.3.3 → 1.4.0
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/README.md +2 -2
- package/dist/generated/index.d.ts +1 -1
- package/dist/generated/sdk.gen.d.ts +4 -2
- package/dist/generated/sdk.gen.js +4 -2
- package/dist/generated/types.gen.d.ts +99 -0
- package/dist/index.d.ts +1 -1
- package/dist/shapes.d.ts +12 -0
- package/dist/shapes.js +28 -2
- package/dist/types.d.ts +12 -2
- package/dist/types.js +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -73,7 +73,7 @@ console.log(domain.isRegistered); // true
|
|
|
73
73
|
console.log(domain.dns?.mx); // on a paid plan
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
Unlimited answers an AS's registration, and whether a domain is registered and which record types it has. A paid plan adds the AS's whois record, prefixes, rank, Tier 1 flag, upstreams, peers, downstreams and hosted domains, and the domain's records, IP ranges
|
|
76
|
+
Unlimited answers an AS's registration, and whether a domain is registered and which record types it has. A paid plan adds the AS's whois record, prefixes, rank, Tier 1 flag, upstreams, peers, downstreams and hosted domains, and the domain's records, IP ranges, whether it is disposable, the network behind each of its addresses, the other domains on its first IPv4 address, what its home page says and links to, and the domains whose home pages redirect or link to it. Neither lookup is cached or batched, and `lookup` refuses an AS or a domain before sending it.
|
|
77
77
|
|
|
78
78
|
### Your own address
|
|
79
79
|
|
|
@@ -94,7 +94,7 @@ console.log(ent.usage.requests); // 580
|
|
|
94
94
|
console.log(ent.usage.window_end); // when the allowance resets
|
|
95
95
|
```
|
|
96
96
|
|
|
97
|
-
Usage counts against the anniversary of your subscription on a paid plan, not the calendar month and not the billing period
|
|
97
|
+
Usage counts against the anniversary of your subscription on a paid plan, not the calendar month and not the billing period; it is the same number a lookup is gated on. `hard_limit` is null on an uncapped plan, which is not the same as zero. It needs a key, so it belongs where a key does.
|
|
98
98
|
|
|
99
99
|
### Batch lookup
|
|
100
100
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { lookupAsn, lookupBatch, lookupDomain, lookupIp, lookupMyIp, myEntitlement, oauthMetadata, oauthRevoke, oauthToken, type Options } from './sdk.gen.js';
|
|
2
|
-
export type { AbuseContact, Asn, AsnHostedDomains, AsnLookupResponse, AsnPrefix, BatchLookupError, BatchLookupRequest, BatchLookupResponse, BitTorrentDetail, CarrierDetail, ClassDetail, ClientOptions, Company, DisposableDetail, DnsAddressRecord, DnsCnameRecord, DnsMxRecord, DnsNsRecord, DnsResolverDetail, DomainDns, DomainIpRange, DomainIpRanges, DomainLookupResponse, Entitlement, EntitlementApikey, EntitlementError, EntitlementPlan, EntitlementUsage, HostedDomains, Location, LookupAsnData, LookupAsnError, LookupAsnErrors, LookupAsnResponse, LookupAsnResponses, LookupBatchData, LookupBatchError, LookupBatchErrors, LookupBatchResponse, LookupBatchResponses, LookupDomainData, LookupDomainError, LookupDomainErrors, LookupDomainResponse, LookupDomainResponses, LookupError, LookupIpData, LookupIpError, LookupIpErrors, LookupIpResponse, LookupIpResponses, LookupMyIpData, LookupMyIpError, LookupMyIpErrors, LookupMyIpResponse, LookupMyIpResponses, LookupResponse, MyEntitlementData, MyEntitlementError, MyEntitlementErrors, MyEntitlementResponse, MyEntitlementResponses, OauthError, OauthMetadata, OauthMetadataData, OauthMetadataResponse, OauthMetadataResponses, OauthRevokeData, OauthRevokeResponse, OauthRevokeResponses, OauthTokenData, OauthTokenError, OauthTokenErrors, OauthTokenResponse, OauthTokenResponses, ProxyDetail, PubproxyDetail, RevokeRequest, Rwhois, SatelliteDetail, SmtpDetail, SshDetail, TokenRequest, TokenResponse, WebDetail, Whois } from './types.gen.js';
|
|
2
|
+
export type { AbuseContact, Asn, AsnHostedDomains, AsnLookupResponse, AsnPrefix, BatchLookupError, BatchLookupRequest, BatchLookupResponse, BitTorrentDetail, CarrierDetail, ClassDetail, ClientOptions, CohostedDomains, Company, DisposableDetail, DnsAddressRecord, DnsCnameRecord, DnsMxRecord, DnsNsRecord, DnsResolverDetail, DomainBacklinks, DomainDns, DomainHost, DomainIpRange, DomainIpRanges, DomainLookupResponse, DomainRedirects, DomainWeb, DomainWebLinks, Entitlement, EntitlementApikey, EntitlementError, EntitlementPlan, EntitlementUsage, HostedDomains, Location, LookupAsnData, LookupAsnError, LookupAsnErrors, LookupAsnResponse, LookupAsnResponses, LookupBatchData, LookupBatchError, LookupBatchErrors, LookupBatchResponse, LookupBatchResponses, LookupDomainData, LookupDomainError, LookupDomainErrors, LookupDomainResponse, LookupDomainResponses, LookupError, LookupIpData, LookupIpError, LookupIpErrors, LookupIpResponse, LookupIpResponses, LookupMyIpData, LookupMyIpError, LookupMyIpErrors, LookupMyIpResponse, LookupMyIpResponses, LookupResponse, MyEntitlementData, MyEntitlementError, MyEntitlementErrors, MyEntitlementResponse, MyEntitlementResponses, OauthError, OauthMetadata, OauthMetadataData, OauthMetadataResponse, OauthMetadataResponses, OauthRevokeData, OauthRevokeResponse, OauthRevokeResponses, OauthTokenData, OauthTokenError, OauthTokenErrors, OauthTokenResponse, OauthTokenResponses, ProxyDetail, PubproxyDetail, RevokeRequest, Rwhois, SatelliteDetail, SmtpDetail, SshDetail, TokenRequest, TokenResponse, WebDetail, Whois } from './types.gen.js';
|
|
@@ -93,8 +93,10 @@ export declare const lookupAsn: <ThrowOnError extends boolean = false>(options:
|
|
|
93
93
|
*
|
|
94
94
|
* Answers what InternetData knows about one domain from its latest snapshots: on every plan
|
|
95
95
|
* whether it is registered and which DNS record types it has; on a paid one the records themselves, up to
|
|
96
|
-
* 100 a type, the
|
|
97
|
-
*
|
|
96
|
+
* 100 a type, the network announcing each address, the other domains on its first IPv4 address, the
|
|
97
|
+
* organization's IP ranges, whether it is a disposable email domain, what its home page says of itself and
|
|
98
|
+
* links to, and the domains whose home page redirects or links to it. An internationalized name is answered
|
|
99
|
+
* under its punycode spelling.
|
|
98
100
|
*
|
|
99
101
|
*/
|
|
100
102
|
export declare const lookupDomain: <ThrowOnError extends boolean = false>(options: Options<LookupDomainData, ThrowOnError>) => RequestResult<LookupDomainResponses, LookupDomainErrors, ThrowOnError>;
|
|
@@ -160,8 +160,10 @@ export const lookupAsn = (options) => (options.client ?? client).get({
|
|
|
160
160
|
*
|
|
161
161
|
* Answers what InternetData knows about one domain from its latest snapshots: on every plan
|
|
162
162
|
* whether it is registered and which DNS record types it has; on a paid one the records themselves, up to
|
|
163
|
-
* 100 a type, the
|
|
164
|
-
*
|
|
163
|
+
* 100 a type, the network announcing each address, the other domains on its first IPv4 address, the
|
|
164
|
+
* organization's IP ranges, whether it is a disposable email domain, what its home page says of itself and
|
|
165
|
+
* links to, and the domains whose home page redirects or links to it. An internationalized name is answered
|
|
166
|
+
* under its punycode spelling.
|
|
165
167
|
*
|
|
166
168
|
*/
|
|
167
169
|
export const lookupDomain = (options) => (options.client ?? client).get({
|
|
@@ -1030,11 +1030,19 @@ export type DomainLookupResponse = {
|
|
|
1030
1030
|
*/
|
|
1031
1031
|
has_cname: boolean;
|
|
1032
1032
|
dns?: DomainDns;
|
|
1033
|
+
/**
|
|
1034
|
+
* The network announcing each address in `dns.a` and then `dns.aaaa`, from IP ASN; `[]` where it resolves to none. Paid plans and the trial.
|
|
1035
|
+
*/
|
|
1036
|
+
hosting?: Array<DomainHost>;
|
|
1037
|
+
cohosted_domains?: CohostedDomains;
|
|
1033
1038
|
ip_ranges?: DomainIpRanges;
|
|
1034
1039
|
/**
|
|
1035
1040
|
* `{}` when `is_disposable` is false. Paid plans and the trial.
|
|
1036
1041
|
*/
|
|
1037
1042
|
disposable?: DisposableDetail;
|
|
1043
|
+
web?: DomainWeb;
|
|
1044
|
+
redirects?: DomainRedirects;
|
|
1045
|
+
backlinks?: DomainBacklinks;
|
|
1038
1046
|
/**
|
|
1039
1047
|
* On every answer to a key on the free plan, and on no other: `false` while its organization's trial of every field lasts, `true` once the answer has Unlimited's fields.
|
|
1040
1048
|
*/
|
|
@@ -1044,6 +1052,97 @@ export type DomainLookupResponse = {
|
|
|
1044
1052
|
*/
|
|
1045
1053
|
cap_reached?: boolean;
|
|
1046
1054
|
};
|
|
1055
|
+
/**
|
|
1056
|
+
* An address the domain resolves to and the network announcing it.
|
|
1057
|
+
*/
|
|
1058
|
+
export type DomainHost = {
|
|
1059
|
+
/**
|
|
1060
|
+
* One address the domain resolves to.
|
|
1061
|
+
*/
|
|
1062
|
+
ip: string;
|
|
1063
|
+
/**
|
|
1064
|
+
* The network announcing it, as an address lookup's `asn`; every member empty where IP ASN holds none.
|
|
1065
|
+
*/
|
|
1066
|
+
asn: Asn;
|
|
1067
|
+
};
|
|
1068
|
+
/**
|
|
1069
|
+
* From IP Hosted Domains: the other registered domains on the domain's first IPv4 address, how many and the 10 most popular. Paid plans and the trial.
|
|
1070
|
+
*/
|
|
1071
|
+
export type CohostedDomains = {
|
|
1072
|
+
/**
|
|
1073
|
+
* The domain's first IPv4 address, `''` where it has none.
|
|
1074
|
+
*/
|
|
1075
|
+
ip: string;
|
|
1076
|
+
/**
|
|
1077
|
+
* How many other registered domains resolve to it.
|
|
1078
|
+
*/
|
|
1079
|
+
total: number;
|
|
1080
|
+
/**
|
|
1081
|
+
* Up to 10 of them, the most popular first, the domain itself left out; `[]` when none does.
|
|
1082
|
+
*/
|
|
1083
|
+
domains: Array<string>;
|
|
1084
|
+
};
|
|
1085
|
+
/**
|
|
1086
|
+
* What our crawl last read of the domain's own home page, every member empty where it holds none. Paid plans and the trial.
|
|
1087
|
+
*/
|
|
1088
|
+
export type DomainWeb = {
|
|
1089
|
+
/**
|
|
1090
|
+
* The URL of the home page read.
|
|
1091
|
+
*/
|
|
1092
|
+
url: string;
|
|
1093
|
+
/**
|
|
1094
|
+
* An English page's title.
|
|
1095
|
+
*/
|
|
1096
|
+
title: string;
|
|
1097
|
+
/**
|
|
1098
|
+
* An English page's description.
|
|
1099
|
+
*/
|
|
1100
|
+
description: string;
|
|
1101
|
+
/**
|
|
1102
|
+
* The day it was last read.
|
|
1103
|
+
*/
|
|
1104
|
+
last_seen: string;
|
|
1105
|
+
links: DomainWebLinks;
|
|
1106
|
+
};
|
|
1107
|
+
/**
|
|
1108
|
+
* The external hosts the home page links to.
|
|
1109
|
+
*/
|
|
1110
|
+
export type DomainWebLinks = {
|
|
1111
|
+
/**
|
|
1112
|
+
* How many external hosts the home page links to.
|
|
1113
|
+
*/
|
|
1114
|
+
total: number;
|
|
1115
|
+
/**
|
|
1116
|
+
* Up to 10 of them; `[]` when it links to none.
|
|
1117
|
+
*/
|
|
1118
|
+
hosts: Array<string>;
|
|
1119
|
+
};
|
|
1120
|
+
/**
|
|
1121
|
+
* The registered domains whose home page redirects to this one, how many and the 10 most popular. Paid plans and the trial.
|
|
1122
|
+
*/
|
|
1123
|
+
export type DomainRedirects = {
|
|
1124
|
+
/**
|
|
1125
|
+
* How many registered domains have a home page that redirects to this domain.
|
|
1126
|
+
*/
|
|
1127
|
+
total: number;
|
|
1128
|
+
/**
|
|
1129
|
+
* Up to 10 of them, the most popular first; `[]` when none does.
|
|
1130
|
+
*/
|
|
1131
|
+
domains: Array<string>;
|
|
1132
|
+
};
|
|
1133
|
+
/**
|
|
1134
|
+
* The registered domains whose home page links to this one, how many and the 10 most popular. Paid plans and the trial.
|
|
1135
|
+
*/
|
|
1136
|
+
export type DomainBacklinks = {
|
|
1137
|
+
/**
|
|
1138
|
+
* How many registered domains have a home page that links to this domain.
|
|
1139
|
+
*/
|
|
1140
|
+
total: number;
|
|
1141
|
+
/**
|
|
1142
|
+
* Up to 10 of them, the most popular first; `[]` when none does.
|
|
1143
|
+
*/
|
|
1144
|
+
domains: Array<string>;
|
|
1145
|
+
};
|
|
1047
1146
|
/**
|
|
1048
1147
|
* Its records in Domain DNS, up to 100 a type. Paid plans and the trial.
|
|
1049
1148
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -6,4 +6,4 @@ export type { OauthOptions, AuthorizationUrlOptions, OauthMetadata, TokenRespons
|
|
|
6
6
|
export { isBogon } from './bogon.js';
|
|
7
7
|
export { InternetDataError, OauthError, OauthAccessDeniedError, OauthExpiredTokenError, } from './errors.js';
|
|
8
8
|
export type { ErrorKind } from './errors.js';
|
|
9
|
-
export type { Result, AsnResult, DomainResult, LookupResponse, AsnLookupResponse, DomainLookupResponse, ClassDetail, ProxyDetail, PubproxyDetail, CarrierDetail, SatelliteDetail, SshDetail, SmtpDetail, WebDetail, DnsResolverDetail, BitTorrentDetail, Location, Asn, Company, AbuseContact, Whois, Rwhois, HostedDomains, AsnPrefix, DomainDns, DnsAddressRecord, DnsMxRecord, DnsNsRecord, DnsCnameRecord, DomainIpRanges, DomainIpRange, DisposableDetail, Entitlement, EntitlementApikey, EntitlementPlan, EntitlementUsage, } from './types.js';
|
|
9
|
+
export type { Result, AsnResult, DomainResult, LookupResponse, AsnLookupResponse, DomainLookupResponse, ClassDetail, ProxyDetail, PubproxyDetail, CarrierDetail, SatelliteDetail, SshDetail, SmtpDetail, WebDetail, DnsResolverDetail, BitTorrentDetail, Location, Asn, Company, AbuseContact, Whois, Rwhois, HostedDomains, AsnPrefix, DomainDns, DnsAddressRecord, DnsMxRecord, DnsNsRecord, DnsCnameRecord, DomainIpRanges, DomainIpRange, DisposableDetail, DomainHost, CohostedDomains, DomainWeb, DomainWebLinks, DomainRedirects, DomainBacklinks, Entitlement, EntitlementApikey, EntitlementPlan, EntitlementUsage, } from './types.js';
|
package/dist/shapes.d.ts
CHANGED
|
@@ -17,6 +17,12 @@ export declare const DNS_NS_RECORD_MEMBERS: readonly ["host", "last_seen"];
|
|
|
17
17
|
export declare const DNS_CNAME_RECORD_MEMBERS: readonly ["target", "last_seen"];
|
|
18
18
|
export declare const DOMAIN_IP_RANGES_MEMBERS: readonly ["domain", "redirects_to", "total", "ipv4", "ranges"];
|
|
19
19
|
export declare const DOMAIN_IP_RANGE_MEMBERS: readonly ["range", "name", "country"];
|
|
20
|
+
export declare const DOMAIN_HOST_MEMBERS: readonly ["ip", "asn"];
|
|
21
|
+
export declare const COHOSTED_DOMAINS_MEMBERS: readonly ["ip", "total", "domains"];
|
|
22
|
+
export declare const DOMAIN_WEB_MEMBERS: readonly ["url", "title", "description", "last_seen", "links"];
|
|
23
|
+
export declare const DOMAIN_WEB_LINKS_MEMBERS: readonly ["total", "hosts"];
|
|
24
|
+
export declare const DOMAIN_REDIRECTS_MEMBERS: readonly ["total", "domains"];
|
|
25
|
+
export declare const DOMAIN_BACKLINKS_MEMBERS: readonly ["total", "domains"];
|
|
20
26
|
export declare const BATCH_MEMBERS: readonly ["results", "errors"];
|
|
21
27
|
export declare const BATCH_ERROR_MEMBERS: readonly ["status", "error"];
|
|
22
28
|
export declare const ENTITLEMENT_MEMBERS: readonly ["org_id", "apikey", "plan", "usage"];
|
|
@@ -52,6 +58,12 @@ export declare const DNS_NS_RECORD_TYPES: Record<string, Kind>;
|
|
|
52
58
|
export declare const DNS_CNAME_RECORD_TYPES: Record<string, Kind>;
|
|
53
59
|
export declare const DOMAIN_IP_RANGES_TYPES: Record<string, Kind>;
|
|
54
60
|
export declare const DOMAIN_IP_RANGE_TYPES: Record<string, Kind>;
|
|
61
|
+
export declare const DOMAIN_HOST_TYPES: Record<string, Kind>;
|
|
62
|
+
export declare const COHOSTED_DOMAINS_TYPES: Record<string, Kind>;
|
|
63
|
+
export declare const DOMAIN_WEB_TYPES: Record<string, Kind>;
|
|
64
|
+
export declare const DOMAIN_WEB_LINKS_TYPES: Record<string, Kind>;
|
|
65
|
+
export declare const DOMAIN_REDIRECTS_TYPES: Record<string, Kind>;
|
|
66
|
+
export declare const DOMAIN_BACKLINKS_TYPES: Record<string, Kind>;
|
|
55
67
|
export declare const DISPOSABLE_DETAIL_TYPES: Record<string, Kind>;
|
|
56
68
|
export declare const BATCH_ERROR_TYPES: Record<string, Kind>;
|
|
57
69
|
export declare const ENTITLEMENT_TYPES: Record<string, Kind>;
|
package/dist/shapes.js
CHANGED
|
@@ -37,6 +37,12 @@ export const DNS_NS_RECORD_MEMBERS = ['host', 'last_seen'];
|
|
|
37
37
|
export const DNS_CNAME_RECORD_MEMBERS = ['target', 'last_seen'];
|
|
38
38
|
export const DOMAIN_IP_RANGES_MEMBERS = ['domain', 'redirects_to', 'total', 'ipv4', 'ranges'];
|
|
39
39
|
export const DOMAIN_IP_RANGE_MEMBERS = ['range', 'name', 'country'];
|
|
40
|
+
export const DOMAIN_HOST_MEMBERS = ['ip', 'asn'];
|
|
41
|
+
export const COHOSTED_DOMAINS_MEMBERS = ['ip', 'total', 'domains'];
|
|
42
|
+
export const DOMAIN_WEB_MEMBERS = ['url', 'title', 'description', 'last_seen', 'links'];
|
|
43
|
+
export const DOMAIN_WEB_LINKS_MEMBERS = ['total', 'hosts'];
|
|
44
|
+
export const DOMAIN_REDIRECTS_MEMBERS = ['total', 'domains'];
|
|
45
|
+
export const DOMAIN_BACKLINKS_MEMBERS = ['total', 'domains'];
|
|
40
46
|
export const BATCH_MEMBERS = ['results', 'errors'];
|
|
41
47
|
export const BATCH_ERROR_MEMBERS = ['status', 'error'];
|
|
42
48
|
export const ENTITLEMENT_MEMBERS = ['org_id', 'apikey', 'plan', 'usage'];
|
|
@@ -133,7 +139,8 @@ export const ASN_PREFIX_TYPES = {
|
|
|
133
139
|
};
|
|
134
140
|
export const DOMAIN_LOOKUP_TYPES = {
|
|
135
141
|
domain: 'string', is_registered: FLAG, is_disposable: FLAG, has_a: FLAG, has_aaaa: FLAG, has_mx: FLAG,
|
|
136
|
-
has_ns: FLAG, has_cname: FLAG, dns: 'object', ip_ranges: 'object', disposable: 'object',
|
|
142
|
+
has_ns: FLAG, has_cname: FLAG, dns: 'object', ip_ranges: 'object', disposable: 'object', hosting: 'array',
|
|
143
|
+
cohosted_domains: 'object', web: 'object', redirects: 'object', backlinks: 'object', trial_expired: FLAG,
|
|
137
144
|
cap_reached: FLAG,
|
|
138
145
|
};
|
|
139
146
|
export const DOMAIN_DNS_TYPES = {
|
|
@@ -151,6 +158,14 @@ export const DOMAIN_IP_RANGES_TYPES = {
|
|
|
151
158
|
export const DOMAIN_IP_RANGE_TYPES = {
|
|
152
159
|
range: 'string', name: 'string', country: 'string',
|
|
153
160
|
};
|
|
161
|
+
export const DOMAIN_HOST_TYPES = { ip: 'string', asn: 'object' };
|
|
162
|
+
export const COHOSTED_DOMAINS_TYPES = { ip: 'string', total: 'integer', domains: 'array' };
|
|
163
|
+
export const DOMAIN_WEB_TYPES = {
|
|
164
|
+
url: 'string', title: 'string', description: 'string', last_seen: 'string', links: 'object',
|
|
165
|
+
};
|
|
166
|
+
export const DOMAIN_WEB_LINKS_TYPES = { total: 'integer', hosts: 'array' };
|
|
167
|
+
export const DOMAIN_REDIRECTS_TYPES = { total: 'integer', domains: 'array' };
|
|
168
|
+
export const DOMAIN_BACKLINKS_TYPES = { total: 'integer', domains: 'array' };
|
|
154
169
|
export const DISPOSABLE_DETAIL_TYPES = {
|
|
155
170
|
confidence: 'string', providers: 'array', first_seen: 'string', last_seen: 'string',
|
|
156
171
|
};
|
|
@@ -275,7 +290,18 @@ export function isDomainLookup(data) {
|
|
|
275
290
|
&& every(dns['cname'], (r) => typed(r, DNS_CNAME_RECORD_MEMBERS, DNS_CNAME_RECORD_TYPES)))
|
|
276
291
|
&& optional(data['ip_ranges'], (ranges) => typed(ranges, DOMAIN_IP_RANGES_MEMBERS, DOMAIN_IP_RANGES_TYPES) && every(ranges['ranges'], (r) => typed(r, DOMAIN_IP_RANGE_MEMBERS, DOMAIN_IP_RANGE_TYPES)))
|
|
277
292
|
&& optional(data['disposable'], (d) => typed(d, [], DISPOSABLE_DETAIL_TYPES)
|
|
278
|
-
&& lists(d, 'providers', isString))
|
|
293
|
+
&& lists(d, 'providers', isString))
|
|
294
|
+
&& optional(data['hosting'], (hosting) => every(hosting, (h) => typed(h, DOMAIN_HOST_MEMBERS, DOMAIN_HOST_TYPES)
|
|
295
|
+
&& typed(h['asn'], ASN_MEMBERS, ASN_TYPES)))
|
|
296
|
+
&& optional(data['cohosted_domains'], (c) => typed(c, COHOSTED_DOMAINS_MEMBERS, COHOSTED_DOMAINS_TYPES)
|
|
297
|
+
&& every(c['domains'], isString))
|
|
298
|
+
&& optional(data['web'], (web) => typed(web, DOMAIN_WEB_MEMBERS, DOMAIN_WEB_TYPES)
|
|
299
|
+
&& typed(web['links'], DOMAIN_WEB_LINKS_MEMBERS, DOMAIN_WEB_LINKS_TYPES)
|
|
300
|
+
&& every(web['links']['hosts'], isString))
|
|
301
|
+
&& optional(data['redirects'], (r) => typed(r, DOMAIN_REDIRECTS_MEMBERS, DOMAIN_REDIRECTS_TYPES)
|
|
302
|
+
&& every(r['domains'], isString))
|
|
303
|
+
&& optional(data['backlinks'], (b) => typed(b, DOMAIN_BACKLINKS_MEMBERS, DOMAIN_BACKLINKS_TYPES)
|
|
304
|
+
&& every(b['domains'], isString));
|
|
279
305
|
}
|
|
280
306
|
/** Both maps present. An entry in either is judged on its own, as that address's answer. */
|
|
281
307
|
export function isBatch(data) {
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AbuseContact, Asn, AsnHostedDomains, AsnLookupResponse, AsnPrefix, BitTorrentDetail, CarrierDetail, ClassDetail, Company, DisposableDetail, DnsAddressRecord, DnsCnameRecord, DnsMxRecord, DnsNsRecord, DnsResolverDetail, DomainDns, DomainIpRange, DomainIpRanges, DomainLookupResponse, Entitlement, EntitlementApikey, EntitlementPlan, EntitlementUsage, HostedDomains, Location, LookupResponse, ProxyDetail, PubproxyDetail, Rwhois, SatelliteDetail, SmtpDetail, SshDetail, WebDetail, Whois } from './generated/types.gen.js';
|
|
2
|
-
export type { AbuseContact, Asn, AsnHostedDomains, AsnLookupResponse, AsnPrefix, BitTorrentDetail, CarrierDetail, ClassDetail, Company, DisposableDetail, DnsAddressRecord, DnsCnameRecord, DnsMxRecord, DnsNsRecord, DnsResolverDetail, DomainDns, DomainIpRange, DomainIpRanges, DomainLookupResponse, Entitlement, EntitlementApikey, EntitlementPlan, EntitlementUsage, HostedDomains, Location, LookupResponse, ProxyDetail, PubproxyDetail, Rwhois, SatelliteDetail, SmtpDetail, SshDetail, WebDetail, Whois, };
|
|
1
|
+
import type { AbuseContact, Asn, AsnHostedDomains, AsnLookupResponse, AsnPrefix, BitTorrentDetail, CarrierDetail, ClassDetail, Company, CohostedDomains, DisposableDetail, DnsAddressRecord, DnsCnameRecord, DnsMxRecord, DnsNsRecord, DnsResolverDetail, DomainBacklinks, DomainDns, DomainHost, DomainIpRange, DomainIpRanges, DomainLookupResponse, DomainRedirects, DomainWeb, DomainWebLinks, Entitlement, EntitlementApikey, EntitlementPlan, EntitlementUsage, HostedDomains, Location, LookupResponse, ProxyDetail, PubproxyDetail, Rwhois, SatelliteDetail, SmtpDetail, SshDetail, WebDetail, Whois } from './generated/types.gen.js';
|
|
2
|
+
export type { AbuseContact, Asn, AsnHostedDomains, AsnLookupResponse, AsnPrefix, BitTorrentDetail, CarrierDetail, ClassDetail, Company, CohostedDomains, DisposableDetail, DnsAddressRecord, DnsCnameRecord, DnsMxRecord, DnsNsRecord, DnsResolverDetail, DomainBacklinks, DomainDns, DomainHost, DomainIpRange, DomainIpRanges, DomainLookupResponse, DomainRedirects, DomainWeb, DomainWebLinks, Entitlement, EntitlementApikey, EntitlementPlan, EntitlementUsage, HostedDomains, Location, LookupResponse, ProxyDetail, PubproxyDetail, Rwhois, SatelliteDetail, SmtpDetail, SshDetail, WebDetail, Whois, };
|
|
3
3
|
/**
|
|
4
4
|
* What a lookup answers about one address.
|
|
5
5
|
*
|
|
@@ -123,6 +123,16 @@ export interface DomainResult {
|
|
|
123
123
|
ipRanges?: DomainIpRanges;
|
|
124
124
|
/** `{}` when `isDisposable` is false. */
|
|
125
125
|
disposable?: DisposableDetail;
|
|
126
|
+
/** The network announcing each address in `dns.a`, then `dns.aaaa`. */
|
|
127
|
+
hosting?: DomainHost[];
|
|
128
|
+
/** The other registered domains on its first IPv4 address. */
|
|
129
|
+
cohostedDomains?: CohostedDomains;
|
|
130
|
+
/** What its home page said of itself, and the hosts it links to, when last read. */
|
|
131
|
+
web?: DomainWeb;
|
|
132
|
+
/** The registered domains whose home page redirects to it. */
|
|
133
|
+
redirects?: DomainRedirects;
|
|
134
|
+
/** The registered domains whose home page links to it. */
|
|
135
|
+
backlinks?: DomainBacklinks;
|
|
126
136
|
trialExpired?: boolean;
|
|
127
137
|
capReached?: boolean;
|
|
128
138
|
/** The response exactly as it came off the wire, with its original names. */
|
package/dist/types.js
CHANGED
|
@@ -26,7 +26,8 @@ const ASN_RESULT_NAMES = {
|
|
|
26
26
|
const DOMAIN_RESULT_NAMES = {
|
|
27
27
|
domain: 'domain', is_registered: 'isRegistered', is_disposable: 'isDisposable', has_a: 'hasA',
|
|
28
28
|
has_aaaa: 'hasAaaa', has_mx: 'hasMx', has_ns: 'hasNs', has_cname: 'hasCname', dns: 'dns',
|
|
29
|
-
ip_ranges: 'ipRanges', disposable: 'disposable',
|
|
29
|
+
ip_ranges: 'ipRanges', disposable: 'disposable', hosting: 'hosting', cohosted_domains: 'cohostedDomains',
|
|
30
|
+
web: 'web', redirects: 'redirects', backlinks: 'backlinks', trial_expired: 'trialExpired',
|
|
30
31
|
cap_reached: 'capReached',
|
|
31
32
|
};
|
|
32
33
|
export function toResult(body) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "internetdata-web",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Official browser client library for the InternetData API. Look up IP addresses, ASNs and domains from a page or a browser extension.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|