@internetdata/internetdata 2.8.1 → 2.9.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.
@@ -1,5 +1,5 @@
1
1
  export type ClientOptions = {
2
- baseUrl: 'https://internetdata.io' | (string & {});
2
+ baseUrl: 'https://internetdata.io' | 'https://api.internetdata.io' | 'https://api.internetdata.io' | 'https://api.internetdata.io' | 'https://api.internetdata.io' | 'https://api.internetdata.io' | 'https://api.internetdata.io' | (string & {});
3
3
  };
4
4
  export type Error = {
5
5
  /**
@@ -524,6 +524,1105 @@ export type OauthError = {
524
524
  error: string;
525
525
  error_description?: string;
526
526
  };
527
+ /**
528
+ * What every database says about one address.
529
+ */
530
+ export type LookupResponse = {
531
+ /**
532
+ * The address looked up, as parsed: `::ffff:a.b.c.d` answers as `a.b.c.d`.
533
+ */
534
+ ip: string;
535
+ /**
536
+ * Reserved space, answered from the address alone.
537
+ */
538
+ is_bogon: boolean;
539
+ /**
540
+ * In VPN IP: a VPN service's server. Paid plans and the trial.
541
+ */
542
+ is_vpn?: boolean;
543
+ /**
544
+ * In Tor IP: a Tor exit.
545
+ */
546
+ is_tor: boolean;
547
+ /**
548
+ * In Relay IP: an anonymizing relay such as iCloud Private Relay.
549
+ */
550
+ is_relay: boolean;
551
+ /**
552
+ * In Residential Proxy IP's 90-day window: a residential proxy exit. Paid plans and the trial.
553
+ */
554
+ is_resproxy?: boolean;
555
+ /**
556
+ * In Datacenter Proxy IP's 90-day window. Paid plans and the trial.
557
+ */
558
+ is_dcproxy?: boolean;
559
+ /**
560
+ * In Mobile Proxy IP's 90-day window. Paid plans and the trial.
561
+ */
562
+ is_mobproxy?: boolean;
563
+ /**
564
+ * In Public Proxy IP: a public proxy listens here, or its traffic left from here. Paid plans and the trial.
565
+ */
566
+ is_pubproxy?: boolean;
567
+ /**
568
+ * In Hosting IP: a hosting or cloud network. Paid plans and the trial.
569
+ */
570
+ is_hosting?: boolean;
571
+ /**
572
+ * In CDN IP: a content delivery network. Paid plans and the trial.
573
+ */
574
+ is_cdn?: boolean;
575
+ /**
576
+ * In Anycast IP: announced from many places at once.
577
+ */
578
+ is_anycast: boolean;
579
+ /**
580
+ * In Carrier IP: a mobile carrier's address space.
581
+ */
582
+ is_carrier: boolean;
583
+ /**
584
+ * In Satellite IP: a satellite operator's address space.
585
+ */
586
+ is_satellite: boolean;
587
+ /**
588
+ * In SSH IP: an SSH server answered here.
589
+ */
590
+ is_ssh: boolean;
591
+ /**
592
+ * In SMTP IP: a mail server answered here.
593
+ */
594
+ is_smtp: boolean;
595
+ /**
596
+ * In Web IP: a web server answered here on port 80 or 443.
597
+ */
598
+ is_web: boolean;
599
+ /**
600
+ * In DNS Resolver IP: an open DNS resolver answered here.
601
+ */
602
+ is_dns_resolver: boolean;
603
+ /**
604
+ * In BitTorrent IP: a BitTorrent client was seen here in the last 90 days.
605
+ */
606
+ is_bittorrent: boolean;
607
+ /**
608
+ * VPN IP's row, `{}` when `is_vpn` is false. Paid plans and the trial.
609
+ */
610
+ vpn?: ClassDetail;
611
+ /**
612
+ * Tor IP's row, `{}` when `is_tor` is false.
613
+ */
614
+ tor: ClassDetail;
615
+ /**
616
+ * Relay IP's row, `{}` when `is_relay` is false.
617
+ */
618
+ relay: ClassDetail;
619
+ /**
620
+ * `{}` when `is_resproxy` is false. Paid plans and the trial.
621
+ */
622
+ resproxy?: ProxyDetail;
623
+ /**
624
+ * `{}` when `is_dcproxy` is false. Paid plans and the trial.
625
+ */
626
+ dcproxy?: ProxyDetail;
627
+ /**
628
+ * `{}` when `is_mobproxy` is false. Paid plans and the trial.
629
+ */
630
+ mobproxy?: ProxyDetail;
631
+ /**
632
+ * `{}` when `is_pubproxy` is false. Paid plans and the trial.
633
+ */
634
+ pubproxy?: PubproxyDetail;
635
+ /**
636
+ * `{}` when `is_hosting` is false. Paid plans and the trial.
637
+ */
638
+ hosting?: ClassDetail;
639
+ /**
640
+ * `{}` when `is_cdn` is false. Paid plans and the trial.
641
+ */
642
+ cdn?: ClassDetail;
643
+ /**
644
+ * `{}` when `is_carrier` is false. Paid plans and the trial.
645
+ */
646
+ carrier?: CarrierDetail;
647
+ /**
648
+ * `{}` when `is_satellite` is false. Paid plans and the trial.
649
+ */
650
+ satellite?: SatelliteDetail;
651
+ /**
652
+ * `{}` when `is_ssh` is false. Paid plans and the trial.
653
+ */
654
+ ssh?: SshDetail;
655
+ /**
656
+ * `{}` when `is_smtp` is false. Paid plans and the trial.
657
+ */
658
+ smtp?: SmtpDetail;
659
+ /**
660
+ * A row per port that answered, lowest first; `[]` when `is_web` is false. Paid plans and the trial.
661
+ */
662
+ web?: Array<WebDetail>;
663
+ /**
664
+ * `{}` when `is_dns_resolver` is false. Paid plans and the trial.
665
+ */
666
+ dns_resolver?: DnsResolverDetail;
667
+ /**
668
+ * `{}` when `is_bittorrent` is false. Paid plans and the trial.
669
+ */
670
+ bittorrent?: BitTorrentDetail;
671
+ location: Location;
672
+ asn: Asn;
673
+ company: Company;
674
+ /**
675
+ * The name the address's reverse DNS (PTR) record points to in IP RDNS, empty when it has none.
676
+ */
677
+ hostname: string;
678
+ abuse: AbuseContact;
679
+ whois?: Whois;
680
+ rwhois?: Rwhois;
681
+ hosted_domains?: HostedDomains;
682
+ /**
683
+ * On every answer to a key on the free plan, and on no other: `false` while the day's trial of every field lasts, `true` once the answer has Unlimited's fields.
684
+ */
685
+ trial_expired?: boolean;
686
+ };
687
+ export type ClassDetail = {
688
+ /**
689
+ * The provider's ID in its catalog; empty for an unattributed range, and on Tor.
690
+ */
691
+ provider: string;
692
+ /**
693
+ * The name the catalog gives the provider, empty where it names none.
694
+ */
695
+ provider_name: string;
696
+ /**
697
+ * `high`, `medium` or `low`: how sure we are the range is what the flag says.
698
+ */
699
+ confidence: string;
700
+ /**
701
+ * The last day the range was seen as such.
702
+ */
703
+ last_seen: string;
704
+ };
705
+ export type ProxyDetail = {
706
+ /**
707
+ * The proxy pool's ID in its catalog, empty where unattributed.
708
+ */
709
+ provider: string;
710
+ /**
711
+ * The name the catalog gives it.
712
+ */
713
+ provider_name: string;
714
+ /**
715
+ * The first day of the window the address was seen as an exit.
716
+ */
717
+ first_seen: string;
718
+ /**
719
+ * The last day it was.
720
+ */
721
+ last_seen: string;
722
+ /**
723
+ * How many times it was seen in the window.
724
+ */
725
+ hits: number;
726
+ /**
727
+ * On what share of the window's days, in percent.
728
+ */
729
+ hits_days_pct: number;
730
+ /**
731
+ * How many pools it was seen in.
732
+ */
733
+ providers_num: number;
734
+ };
735
+ export type PubproxyDetail = {
736
+ /**
737
+ * A public proxy listens here.
738
+ */
739
+ entry: boolean;
740
+ /**
741
+ * Public proxies' traffic leaves from here.
742
+ */
743
+ exit: boolean;
744
+ /**
745
+ * The protocols at either end, `[]` when unknown.
746
+ */
747
+ protocols: Array<string>;
748
+ /**
749
+ * How many ports a proxy listens on here.
750
+ */
751
+ num_ports: number;
752
+ /**
753
+ * How many proxies' traffic left from here.
754
+ */
755
+ num_proxies: number;
756
+ /**
757
+ * The last day one was seen.
758
+ */
759
+ last_seen: string;
760
+ /**
761
+ * The last day one answered a request, empty when none did.
762
+ */
763
+ last_usable: string;
764
+ };
765
+ export type CarrierDetail = {
766
+ /**
767
+ * The mobile carrier.
768
+ */
769
+ name: string;
770
+ /**
771
+ * Its mobile country code.
772
+ */
773
+ mcc: string;
774
+ /**
775
+ * Its mobile network code.
776
+ */
777
+ mnc: string;
778
+ /**
779
+ * ISO 3166 country code.
780
+ */
781
+ country: string;
782
+ /**
783
+ * `high`, `medium` or `low`.
784
+ */
785
+ confidence: string;
786
+ };
787
+ export type SatelliteDetail = {
788
+ /**
789
+ * The operator's ID in Satellite IP Provider.
790
+ */
791
+ provider: string;
792
+ /**
793
+ * The operator's name.
794
+ */
795
+ provider_name: string;
796
+ /**
797
+ * The orbit: `leo`, `meo` or `geo`.
798
+ */
799
+ orbit: string;
800
+ /**
801
+ * Who the space serves, such as consumer or maritime.
802
+ */
803
+ segment: string;
804
+ /**
805
+ * ISO 3166 country code.
806
+ */
807
+ country: string;
808
+ /**
809
+ * The AS the operator announces it from.
810
+ */
811
+ asn: number;
812
+ /**
813
+ * `high`, `medium` or `low`.
814
+ */
815
+ confidence: string;
816
+ };
817
+ export type SshDetail = {
818
+ /**
819
+ * The port the server answered on.
820
+ */
821
+ port: number;
822
+ /**
823
+ * Its banner.
824
+ */
825
+ banner: string;
826
+ /**
827
+ * Its host key's fingerprint.
828
+ */
829
+ host_key_fp: string;
830
+ /**
831
+ * A session was set up.
832
+ */
833
+ session_ok: boolean;
834
+ /**
835
+ * The first day it answered.
836
+ */
837
+ first_seen: string;
838
+ /**
839
+ * The last day it did.
840
+ */
841
+ last_seen: string;
842
+ };
843
+ export type SmtpDetail = {
844
+ /**
845
+ * The port the server answered on.
846
+ */
847
+ port: number;
848
+ /**
849
+ * Its banner.
850
+ */
851
+ banner: string;
852
+ /**
853
+ * A session was set up.
854
+ */
855
+ session_ok: boolean;
856
+ /**
857
+ * The first day it answered.
858
+ */
859
+ first_seen: string;
860
+ /**
861
+ * The last day it did.
862
+ */
863
+ last_seen: string;
864
+ };
865
+ export type WebDetail = {
866
+ /**
867
+ * 80 or 443.
868
+ */
869
+ port: number;
870
+ /**
871
+ * A TLS handshake completed.
872
+ */
873
+ tls_ok: boolean;
874
+ /**
875
+ * An HTTP response came back.
876
+ */
877
+ session_ok: boolean;
878
+ /**
879
+ * Its status, 0 where none came.
880
+ */
881
+ status_code: number;
882
+ /**
883
+ * Its `Server` header.
884
+ */
885
+ server: string;
886
+ /**
887
+ * Where it redirected.
888
+ */
889
+ location: string;
890
+ /**
891
+ * The page's title.
892
+ */
893
+ title: string;
894
+ /**
895
+ * The certificate's subject common name.
896
+ */
897
+ cert_subject_cn: string;
898
+ /**
899
+ * Its subject organization.
900
+ */
901
+ cert_subject_o: string;
902
+ /**
903
+ * Its issuer.
904
+ */
905
+ cert_issuer_dn: string;
906
+ /**
907
+ * Browsers trust it.
908
+ */
909
+ cert_browser_trusted: boolean;
910
+ /**
911
+ * The TLS version negotiated, empty without TLS.
912
+ */
913
+ tls_version: string;
914
+ /**
915
+ * The first day the port was open.
916
+ */
917
+ first_seen: string;
918
+ /**
919
+ * The last day it was.
920
+ */
921
+ last_seen: string;
922
+ };
923
+ export type DnsResolverDetail = {
924
+ /**
925
+ * The port it answered on.
926
+ */
927
+ port: number;
928
+ /**
929
+ * It offered recursion.
930
+ */
931
+ recursion_available: boolean;
932
+ /**
933
+ * Its answer's response code.
934
+ */
935
+ rcode: number;
936
+ /**
937
+ * Its answer was right.
938
+ */
939
+ answer_correct: boolean;
940
+ /**
941
+ * The first day it answered.
942
+ */
943
+ first_seen: string;
944
+ /**
945
+ * The last day it did.
946
+ */
947
+ last_seen: string;
948
+ };
949
+ export type BitTorrentDetail = {
950
+ /**
951
+ * A client here answered, or two or more reported it at once.
952
+ */
953
+ verified: boolean;
954
+ /**
955
+ * A client here derived its node ID from the address (BEP 42).
956
+ */
957
+ id_matches_ip: boolean;
958
+ /**
959
+ * The first day a client was seen here.
960
+ */
961
+ first_seen: string;
962
+ /**
963
+ * The last day.
964
+ */
965
+ last_seen: string;
966
+ /**
967
+ * The last day one answered, empty when none did.
968
+ */
969
+ last_reachable: string;
970
+ /**
971
+ * On how many days.
972
+ */
973
+ days_seen: number;
974
+ /**
975
+ * Distinct ports over the window.
976
+ */
977
+ num_ports: number;
978
+ /**
979
+ * The most on one day.
980
+ */
981
+ peak_num_ports: number;
982
+ /**
983
+ * A DHT indexer rather than people.
984
+ */
985
+ indexer: boolean;
986
+ /**
987
+ * The two-letter codes its clients name themselves by.
988
+ */
989
+ clients: Array<string>;
990
+ };
991
+ /**
992
+ * Where the address is.
993
+ */
994
+ export type Location = {
995
+ /**
996
+ * Continent code.
997
+ */
998
+ continent: string;
999
+ /**
1000
+ * Continent name.
1001
+ */
1002
+ continent_name: string;
1003
+ /**
1004
+ * ISO 3166-1 alpha-2 country code.
1005
+ */
1006
+ country: string;
1007
+ /**
1008
+ * Country name.
1009
+ */
1010
+ country_name: string;
1011
+ /**
1012
+ * IANA timezone.
1013
+ */
1014
+ timezone: string;
1015
+ /**
1016
+ * ISO 4217 code.
1017
+ */
1018
+ currency_code: string;
1019
+ /**
1020
+ * Currency name.
1021
+ */
1022
+ currency_name: string;
1023
+ /**
1024
+ * Currency symbol.
1025
+ */
1026
+ currency_symbol: string;
1027
+ /**
1028
+ * The country's flag.
1029
+ */
1030
+ flag_emoji: string;
1031
+ /**
1032
+ * Its code points, `U+1F1E6 U+1F1F9`.
1033
+ */
1034
+ flag_unicode: string;
1035
+ /**
1036
+ * Region (state or province). Paid plans and the trial.
1037
+ */
1038
+ region?: string;
1039
+ /**
1040
+ * ISO 3166-2 region code. Paid plans and the trial.
1041
+ */
1042
+ region_code?: string;
1043
+ /**
1044
+ * City. Paid plans and the trial.
1045
+ */
1046
+ city?: string;
1047
+ /**
1048
+ * Postal code. Paid plans and the trial.
1049
+ */
1050
+ postal_code?: string;
1051
+ /**
1052
+ * Latitude of the city. Paid plans and the trial.
1053
+ */
1054
+ latitude?: number;
1055
+ /**
1056
+ * Longitude of the city. Paid plans and the trial.
1057
+ */
1058
+ longitude?: number;
1059
+ /**
1060
+ * Radius in km holding the true location with 67% confidence. Paid plans and the trial.
1061
+ */
1062
+ accuracy_radius?: number;
1063
+ /**
1064
+ * GeoNames ID of the city. Paid plans and the trial.
1065
+ */
1066
+ geoname_id?: string;
1067
+ /**
1068
+ * US TV market (DMA) code. Paid plans and the trial.
1069
+ */
1070
+ dma_code?: string;
1071
+ /**
1072
+ * The day the range's location last changed. Paid plans and the trial.
1073
+ */
1074
+ last_changed?: string;
1075
+ };
1076
+ /**
1077
+ * The network announcing the address, from IP ASN.
1078
+ */
1079
+ export type Asn = {
1080
+ /**
1081
+ * The AS announcing the address, 0 where none does.
1082
+ */
1083
+ asn: number;
1084
+ /**
1085
+ * Its operator.
1086
+ */
1087
+ name: string;
1088
+ /**
1089
+ * Its operator's domain.
1090
+ */
1091
+ domain: string;
1092
+ /**
1093
+ * The kind of network it runs.
1094
+ */
1095
+ type: string;
1096
+ /**
1097
+ * The announced prefix covering the address.
1098
+ */
1099
+ prefix: string;
1100
+ /**
1101
+ * The country its registry assigned it to. Paid plans and the trial.
1102
+ */
1103
+ country?: string;
1104
+ /**
1105
+ * The announcement's RPKI status. Paid plans and the trial.
1106
+ */
1107
+ rpki_status?: string;
1108
+ };
1109
+ /**
1110
+ * Who uses the address, from IP Company.
1111
+ */
1112
+ export type Company = {
1113
+ /**
1114
+ * Who uses the address.
1115
+ */
1116
+ name: string;
1117
+ /**
1118
+ * Their domain.
1119
+ */
1120
+ domain: string;
1121
+ /**
1122
+ * What kind of organization: hosting, isp, business, education, government. Paid plans and the trial.
1123
+ */
1124
+ type?: string;
1125
+ /**
1126
+ * ISO 3166 country code. Paid plans and the trial.
1127
+ */
1128
+ country?: string;
1129
+ };
1130
+ /**
1131
+ * Where to report abuse, from IP Abuse Contact.
1132
+ */
1133
+ export type AbuseContact = {
1134
+ /**
1135
+ * Where to report abuse from the address.
1136
+ */
1137
+ email: string;
1138
+ /**
1139
+ * The contact. Paid plans and the trial.
1140
+ */
1141
+ name?: string;
1142
+ /**
1143
+ * Its phone number. Paid plans and the trial.
1144
+ */
1145
+ phone?: string;
1146
+ /**
1147
+ * Its postal address. Paid plans and the trial.
1148
+ */
1149
+ address?: string;
1150
+ /**
1151
+ * ISO 3166 country code. Paid plans and the trial.
1152
+ */
1153
+ country?: string;
1154
+ /**
1155
+ * The registry block it was derived from. Paid plans and the trial.
1156
+ */
1157
+ network?: string;
1158
+ /**
1159
+ * ARIN reports the contact answered its yearly validation. Paid plans and the trial.
1160
+ */
1161
+ validated?: boolean;
1162
+ /**
1163
+ * Since when it has not. Paid plans and the trial.
1164
+ */
1165
+ unvalidated_since?: string;
1166
+ };
1167
+ /**
1168
+ * IP Whois's most specific record covering the address. Paid plans and the trial.
1169
+ */
1170
+ export type Whois = {
1171
+ /**
1172
+ * Network name of the most specific record covering the address.
1173
+ */
1174
+ id: string;
1175
+ /**
1176
+ * Its holder.
1177
+ */
1178
+ name: string;
1179
+ /**
1180
+ * The registry's handle for the holder.
1181
+ */
1182
+ org: string;
1183
+ /**
1184
+ * ISO 3166 country code.
1185
+ */
1186
+ country: string;
1187
+ /**
1188
+ * The registry's assignment status.
1189
+ */
1190
+ status: string;
1191
+ /**
1192
+ * The registry, or rwhois.
1193
+ */
1194
+ source: string;
1195
+ /**
1196
+ * The holder's domain.
1197
+ */
1198
+ domain: string;
1199
+ /**
1200
+ * The record's abuse contact.
1201
+ */
1202
+ abuse_email: string;
1203
+ /**
1204
+ * The AS announcing the record's start address.
1205
+ */
1206
+ asn: number;
1207
+ };
1208
+ /**
1209
+ * IP RWHOIS's most specific network covering the address. Paid plans and the trial.
1210
+ */
1211
+ export type Rwhois = {
1212
+ /**
1213
+ * The network's identifier on the operator's RWHOIS server.
1214
+ */
1215
+ id: string;
1216
+ /**
1217
+ * Its assignee.
1218
+ */
1219
+ name: string;
1220
+ /**
1221
+ * ISO 3166 country code.
1222
+ */
1223
+ country: string;
1224
+ /**
1225
+ * The operator that published it.
1226
+ */
1227
+ source: string;
1228
+ /**
1229
+ * The contact emails' domain.
1230
+ */
1231
+ domain: string;
1232
+ /**
1233
+ * Its abuse contact.
1234
+ */
1235
+ abuse_email: string;
1236
+ };
1237
+ /**
1238
+ * From IP Hosted Domains: a count, never the list. Paid plans and the trial.
1239
+ */
1240
+ export type HostedDomains = {
1241
+ /**
1242
+ * How many registered domains resolve to the address.
1243
+ */
1244
+ total: number;
1245
+ };
1246
+ /**
1247
+ * What every database says about one AS.
1248
+ */
1249
+ export type AsnLookupResponse = {
1250
+ /**
1251
+ * The AS number.
1252
+ */
1253
+ asn: number;
1254
+ /**
1255
+ * Its operator.
1256
+ */
1257
+ name: string;
1258
+ /**
1259
+ * The country its registry assigned it to.
1260
+ */
1261
+ country: string;
1262
+ /**
1263
+ * The registry that allocated it.
1264
+ */
1265
+ registry: string;
1266
+ /**
1267
+ * When.
1268
+ */
1269
+ allocated: string;
1270
+ /**
1271
+ * Its operator's domain.
1272
+ */
1273
+ domain: string;
1274
+ /**
1275
+ * The kind of network it runs. Paid plans and the trial.
1276
+ */
1277
+ type?: string;
1278
+ /**
1279
+ * IPv4 addresses it announces. Paid plans and the trial.
1280
+ */
1281
+ num_ips?: number;
1282
+ /**
1283
+ * IPv4 prefixes it announces. Paid plans and the trial.
1284
+ */
1285
+ num_prefixes4?: number;
1286
+ /**
1287
+ * IPv6 prefixes it announces. Paid plans and the trial.
1288
+ */
1289
+ num_prefixes6?: number;
1290
+ /**
1291
+ * Its announcements RPKI calls valid. Paid plans and the trial.
1292
+ */
1293
+ rpki_valid?: number;
1294
+ /**
1295
+ * Invalid. Paid plans and the trial.
1296
+ */
1297
+ rpki_invalid?: number;
1298
+ /**
1299
+ * With no RPKI record. Paid plans and the trial.
1300
+ */
1301
+ rpki_not_found?: number;
1302
+ /**
1303
+ * Its ASN Whois record, every column, empty where the registry states nothing. Paid plans and the trial.
1304
+ */
1305
+ whois?: {
1306
+ [key: string]: string;
1307
+ };
1308
+ /**
1309
+ * What it announces, IPv4 then IPv6, up to 20000 a family. Paid plans and the trial.
1310
+ */
1311
+ prefixes?: Array<AsnPrefix>;
1312
+ /**
1313
+ * On every answer to a key on the free plan, and on no other: `false` while the day's trial of every field lasts, `true` once the answer has Unlimited's fields.
1314
+ */
1315
+ trial_expired?: boolean;
1316
+ };
1317
+ export type AsnPrefix = {
1318
+ /**
1319
+ * The announced prefix.
1320
+ */
1321
+ prefix: string;
1322
+ /**
1323
+ * How many peers saw it.
1324
+ */
1325
+ peer_count: number;
1326
+ /**
1327
+ * Its RPKI status.
1328
+ */
1329
+ rpki_status: string;
1330
+ /**
1331
+ * The first day BGP Route saw it.
1332
+ */
1333
+ first_seen: string;
1334
+ /**
1335
+ * Where its first address is.
1336
+ */
1337
+ country: string;
1338
+ /**
1339
+ * IPv4 addresses it covers; 0 for IPv6.
1340
+ */
1341
+ size: number;
1342
+ /**
1343
+ * Every other AS announcing it.
1344
+ */
1345
+ other_origins: Array<number>;
1346
+ };
1347
+ /**
1348
+ * What every database says about one domain.
1349
+ */
1350
+ export type DomainLookupResponse = {
1351
+ /**
1352
+ * The domain, lowercase and in punycode.
1353
+ */
1354
+ domain: string;
1355
+ /**
1356
+ * In Domain List: a registered domain.
1357
+ */
1358
+ is_registered: boolean;
1359
+ /**
1360
+ * In Disposable Domain. Paid plans and the trial.
1361
+ */
1362
+ is_disposable?: boolean;
1363
+ /**
1364
+ * It has A records.
1365
+ */
1366
+ has_a: boolean;
1367
+ /**
1368
+ * AAAA records.
1369
+ */
1370
+ has_aaaa: boolean;
1371
+ /**
1372
+ * MX records.
1373
+ */
1374
+ has_mx: boolean;
1375
+ /**
1376
+ * NS records.
1377
+ */
1378
+ has_ns: boolean;
1379
+ /**
1380
+ * A CNAME record.
1381
+ */
1382
+ has_cname: boolean;
1383
+ dns?: DomainDns;
1384
+ ip_ranges?: DomainIpRanges;
1385
+ /**
1386
+ * `{}` when `is_disposable` is false. Paid plans and the trial.
1387
+ */
1388
+ disposable?: DisposableDetail;
1389
+ /**
1390
+ * On every answer to a key on the free plan, and on no other: `false` while the day's trial of every field lasts, `true` once the answer has Unlimited's fields.
1391
+ */
1392
+ trial_expired?: boolean;
1393
+ };
1394
+ /**
1395
+ * Its records in Domain DNS, up to 100 a type. Paid plans and the trial.
1396
+ */
1397
+ export type DomainDns = {
1398
+ a: Array<DnsAddressRecord>;
1399
+ aaaa: Array<DnsAddressRecord>;
1400
+ mx: Array<DnsMxRecord>;
1401
+ ns: Array<DnsNsRecord>;
1402
+ cname: Array<DnsCnameRecord>;
1403
+ };
1404
+ export type DnsAddressRecord = {
1405
+ /**
1406
+ * The address.
1407
+ */
1408
+ ip: string;
1409
+ /**
1410
+ * The last day the snapshot saw it.
1411
+ */
1412
+ last_seen: string;
1413
+ };
1414
+ export type DnsMxRecord = {
1415
+ /**
1416
+ * Its priority.
1417
+ */
1418
+ priority: number;
1419
+ /**
1420
+ * The mail host.
1421
+ */
1422
+ host: string;
1423
+ /**
1424
+ * The last day seen.
1425
+ */
1426
+ last_seen: string;
1427
+ };
1428
+ export type DnsNsRecord = {
1429
+ /**
1430
+ * The name server.
1431
+ */
1432
+ host: string;
1433
+ /**
1434
+ * The last day seen.
1435
+ */
1436
+ last_seen: string;
1437
+ };
1438
+ export type DnsCnameRecord = {
1439
+ /**
1440
+ * Where it points.
1441
+ */
1442
+ target: string;
1443
+ /**
1444
+ * The last day seen.
1445
+ */
1446
+ last_seen: string;
1447
+ };
1448
+ /**
1449
+ * The organization's IP ranges, from Domain IP Ranges. Paid plans and the trial.
1450
+ */
1451
+ export type DomainIpRanges = {
1452
+ /**
1453
+ * The organization's domain.
1454
+ */
1455
+ domain: string;
1456
+ /**
1457
+ * Where its home page redirects, when that is how it was reached.
1458
+ */
1459
+ redirects_to: string;
1460
+ /**
1461
+ * How many ranges it holds.
1462
+ */
1463
+ total: number;
1464
+ /**
1465
+ * IPv4 addresses across them.
1466
+ */
1467
+ ipv4: number;
1468
+ /**
1469
+ * The first 1000, IPv4 before IPv6, the largest first.
1470
+ */
1471
+ ranges: Array<DomainIpRange>;
1472
+ };
1473
+ export type DomainIpRange = {
1474
+ /**
1475
+ * The range.
1476
+ */
1477
+ range: string;
1478
+ /**
1479
+ * Its registry name.
1480
+ */
1481
+ name: string;
1482
+ /**
1483
+ * ISO 3166 country code.
1484
+ */
1485
+ country: string;
1486
+ };
1487
+ export type DisposableDetail = {
1488
+ /**
1489
+ * `high`, `medium` or `low`.
1490
+ */
1491
+ confidence: string;
1492
+ /**
1493
+ * The providers behind it.
1494
+ */
1495
+ providers: Array<string>;
1496
+ /**
1497
+ * The first day seen in use.
1498
+ */
1499
+ first_seen: string;
1500
+ /**
1501
+ * The last day.
1502
+ */
1503
+ last_seen: string;
1504
+ };
1505
+ /**
1506
+ * Up to 1000 items across the three arrays, each optional.
1507
+ */
1508
+ export type BatchLookupRequest = {
1509
+ /**
1510
+ * Addresses.
1511
+ */
1512
+ ips?: Array<string>;
1513
+ /**
1514
+ * AS numbers, `AS15169` or `15169`; a JSON number reads too.
1515
+ */
1516
+ asns?: Array<string>;
1517
+ /**
1518
+ * Domains.
1519
+ */
1520
+ domains?: Array<string>;
1521
+ };
1522
+ export type BatchLookupResponse = {
1523
+ /**
1524
+ * Each answered item's lookup, keyed by the string sent.
1525
+ */
1526
+ results: {
1527
+ [key: string]: LookupResponse | AsnLookupResponse | DomainLookupResponse;
1528
+ };
1529
+ /**
1530
+ * Each failed item, keyed by the string sent.
1531
+ */
1532
+ errors: {
1533
+ [key: string]: BatchLookupError;
1534
+ };
1535
+ };
1536
+ export type BatchLookupError = {
1537
+ /**
1538
+ * The status its own lookup would have answered.
1539
+ */
1540
+ status: number;
1541
+ /**
1542
+ * The same message.
1543
+ */
1544
+ error: string;
1545
+ };
1546
+ export type LookupError = {
1547
+ /**
1548
+ * What went wrong.
1549
+ */
1550
+ error: string;
1551
+ };
1552
+ export type Entitlement = {
1553
+ /**
1554
+ * The organization the key belongs to.
1555
+ */
1556
+ org_id: string;
1557
+ apikey: EntitlementApikey;
1558
+ plan: EntitlementPlan;
1559
+ usage: EntitlementUsage;
1560
+ };
1561
+ /**
1562
+ * The credential itself. The key is never echoed - only its ID, which is
1563
+ * what the console shows and what you can act on.
1564
+ *
1565
+ */
1566
+ export type EntitlementApikey = {
1567
+ id: string;
1568
+ /**
1569
+ * Null for a key with no end date, which is the normal case.
1570
+ */
1571
+ expires: string | null;
1572
+ /**
1573
+ * The source addresses this key may be used from. EMPTY means
1574
+ * unrestricted, never "deny all".
1575
+ *
1576
+ */
1577
+ allowed_cidrs: Array<string>;
1578
+ };
1579
+ export type EntitlementPlan = {
1580
+ /**
1581
+ * The plan the organization is on: `free` for the free plan,
1582
+ * Unlimited, or a paid plan's key. On `free`, usage counts the
1583
+ * day's lookups answered with every field, its daily trial.
1584
+ *
1585
+ */
1586
+ key: string;
1587
+ /**
1588
+ * The field tier, which decides how much of a lookup answer comes
1589
+ * back; `free` is the free plan's. What each tier includes is documented
1590
+ * on the lookup endpoint rather than repeated here, so there is one
1591
+ * place it can be wrong.
1592
+ *
1593
+ */
1594
+ tier: 'free' | 'starter' | 'scale' | 'max';
1595
+ };
1596
+ export type EntitlementUsage = {
1597
+ /**
1598
+ * Requests counted in the current window. The same number the lookup
1599
+ * API gates on, and it can lag by a few seconds.
1600
+ *
1601
+ */
1602
+ requests: number;
1603
+ /**
1604
+ * What the plan includes. Zero on a plan that includes none.
1605
+ */
1606
+ quota: number;
1607
+ /**
1608
+ * Where we stop serving. NULL means never, which is the normal state
1609
+ * of an uncapped paid plan and is not the same as zero. Above the
1610
+ * quota and below this, requests are served and billed as overage.
1611
+ *
1612
+ */
1613
+ hard_limit: number | null;
1614
+ /**
1615
+ * When the current allowance period began.
1616
+ */
1617
+ window_start: string;
1618
+ /**
1619
+ * When the allowance next resets.
1620
+ */
1621
+ window_end: string;
1622
+ };
1623
+ export type EntitlementError = {
1624
+ error: string;
1625
+ };
527
1626
  /**
528
1627
  * Database identifier (e.g. `vpn_ip_v1`, `resproxy_provider_v1`).
529
1628
  */
@@ -1309,3 +2408,239 @@ export type OauthRevokeResponses = {
1309
2408
  };
1310
2409
  };
1311
2410
  export type OauthRevokeResponse = OauthRevokeResponses[keyof OauthRevokeResponses];
2411
+ export type LookupIpData = {
2412
+ body?: never;
2413
+ path: {
2414
+ /**
2415
+ * The IPv4 or IPv6 address to look up.
2416
+ */
2417
+ ip: string;
2418
+ };
2419
+ query?: never;
2420
+ url: '/{ip}';
2421
+ };
2422
+ export type LookupIpErrors = {
2423
+ /**
2424
+ * Not an address, an AS number or a domain.
2425
+ */
2426
+ 400: LookupError;
2427
+ /**
2428
+ * The key is not one, or no longer works.
2429
+ */
2430
+ 401: LookupError;
2431
+ /**
2432
+ * The key may not be used from this address, or was sent over plain HTTP.
2433
+ */
2434
+ 403: LookupError;
2435
+ /**
2436
+ * A rate limit, with `Retry-After` (this API protecting itself, or Unlimited's per-minute
2437
+ * limit), or, with none, a paid plan's overage cap.
2438
+ *
2439
+ */
2440
+ 429: LookupError;
2441
+ /**
2442
+ * Our data could not be read. Retry; nothing was charged.
2443
+ */
2444
+ 500: LookupError;
2445
+ };
2446
+ export type LookupIpError = LookupIpErrors[keyof LookupIpErrors];
2447
+ export type LookupIpResponses = {
2448
+ /**
2449
+ * What each database says about the address, as much as your plan shows.
2450
+ */
2451
+ 200: LookupResponse;
2452
+ };
2453
+ export type LookupIpResponse = LookupIpResponses[keyof LookupIpResponses];
2454
+ export type LookupMyIpData = {
2455
+ body?: never;
2456
+ path?: never;
2457
+ query?: never;
2458
+ url: '/myip';
2459
+ };
2460
+ export type LookupMyIpErrors = {
2461
+ /**
2462
+ * The key is not one, or no longer works.
2463
+ */
2464
+ 401: LookupError;
2465
+ /**
2466
+ * The key may not be used from this address, or was sent over plain HTTP.
2467
+ */
2468
+ 403: LookupError;
2469
+ /**
2470
+ * A rate limit, with `Retry-After` (this API protecting itself, or Unlimited's per-minute
2471
+ * limit), or, with none, a paid plan's overage cap.
2472
+ *
2473
+ */
2474
+ 429: LookupError;
2475
+ /**
2476
+ * Our data could not be read. Retry; nothing was charged.
2477
+ */
2478
+ 500: LookupError;
2479
+ };
2480
+ export type LookupMyIpError = LookupMyIpErrors[keyof LookupMyIpErrors];
2481
+ export type LookupMyIpResponses = {
2482
+ /**
2483
+ * The lookup of your own address.
2484
+ */
2485
+ 200: LookupResponse;
2486
+ };
2487
+ export type LookupMyIpResponse = LookupMyIpResponses[keyof LookupMyIpResponses];
2488
+ export type LookupAsnData = {
2489
+ body?: never;
2490
+ path: {
2491
+ /**
2492
+ * The AS number, as `AS15169` in any case, or the bare number.
2493
+ */
2494
+ asn: string;
2495
+ };
2496
+ query?: never;
2497
+ url: '/asn/{asn}';
2498
+ };
2499
+ export type LookupAsnErrors = {
2500
+ /**
2501
+ * Not an address, an AS number or a domain.
2502
+ */
2503
+ 400: LookupError;
2504
+ /**
2505
+ * The key is not one, or no longer works.
2506
+ */
2507
+ 401: LookupError;
2508
+ /**
2509
+ * The key may not be used from this address, or was sent over plain HTTP.
2510
+ */
2511
+ 403: LookupError;
2512
+ /**
2513
+ * A rate limit, with `Retry-After` (this API protecting itself, or Unlimited's per-minute
2514
+ * limit), or, with none, a paid plan's overage cap.
2515
+ *
2516
+ */
2517
+ 429: LookupError;
2518
+ /**
2519
+ * Our data could not be read. Retry; nothing was charged.
2520
+ */
2521
+ 500: LookupError;
2522
+ };
2523
+ export type LookupAsnError = LookupAsnErrors[keyof LookupAsnErrors];
2524
+ export type LookupAsnResponses = {
2525
+ /**
2526
+ * What each database says about the AS, as much as your plan shows.
2527
+ */
2528
+ 200: AsnLookupResponse;
2529
+ };
2530
+ export type LookupAsnResponse = LookupAsnResponses[keyof LookupAsnResponses];
2531
+ export type LookupDomainData = {
2532
+ body?: never;
2533
+ path: {
2534
+ /**
2535
+ * The domain to look up.
2536
+ */
2537
+ domain: string;
2538
+ };
2539
+ query?: never;
2540
+ url: '/domain/{domain}';
2541
+ };
2542
+ export type LookupDomainErrors = {
2543
+ /**
2544
+ * Not an address, an AS number or a domain.
2545
+ */
2546
+ 400: LookupError;
2547
+ /**
2548
+ * The key is not one, or no longer works.
2549
+ */
2550
+ 401: LookupError;
2551
+ /**
2552
+ * The key may not be used from this address, or was sent over plain HTTP.
2553
+ */
2554
+ 403: LookupError;
2555
+ /**
2556
+ * A rate limit, with `Retry-After` (this API protecting itself, or Unlimited's per-minute
2557
+ * limit), or, with none, a paid plan's overage cap.
2558
+ *
2559
+ */
2560
+ 429: LookupError;
2561
+ /**
2562
+ * Our data could not be read. Retry; nothing was charged.
2563
+ */
2564
+ 500: LookupError;
2565
+ };
2566
+ export type LookupDomainError = LookupDomainErrors[keyof LookupDomainErrors];
2567
+ export type LookupDomainResponses = {
2568
+ /**
2569
+ * What each database says about the domain, as much as your plan shows.
2570
+ */
2571
+ 200: DomainLookupResponse;
2572
+ };
2573
+ export type LookupDomainResponse = LookupDomainResponses[keyof LookupDomainResponses];
2574
+ export type LookupBatchData = {
2575
+ body: BatchLookupRequest;
2576
+ path?: never;
2577
+ query?: never;
2578
+ url: '/batch';
2579
+ };
2580
+ export type LookupBatchErrors = {
2581
+ /**
2582
+ * The body is not a batch, or holds no items or more than 1000.
2583
+ */
2584
+ 400: LookupError;
2585
+ /**
2586
+ * No key, or a key that does not work.
2587
+ */
2588
+ 401: LookupError;
2589
+ /**
2590
+ * A key on the free plan.
2591
+ */
2592
+ 402: LookupError;
2593
+ /**
2594
+ * The key may not be used from this address, or was sent over plain HTTP.
2595
+ */
2596
+ 403: LookupError;
2597
+ /**
2598
+ * The body is larger than 512 KB.
2599
+ */
2600
+ 413: LookupError;
2601
+ /**
2602
+ * A rate limit; retry after `Retry-After`.
2603
+ */
2604
+ 429: LookupError;
2605
+ };
2606
+ export type LookupBatchError = LookupBatchErrors[keyof LookupBatchErrors];
2607
+ export type LookupBatchResponses = {
2608
+ /**
2609
+ * Every item, under `results` or `errors`.
2610
+ */
2611
+ 200: BatchLookupResponse;
2612
+ };
2613
+ export type LookupBatchResponse = LookupBatchResponses[keyof LookupBatchResponses];
2614
+ export type MyEntitlementData = {
2615
+ body?: never;
2616
+ path?: never;
2617
+ query?: never;
2618
+ url: '/api/v1/entitlement';
2619
+ };
2620
+ export type MyEntitlementErrors = {
2621
+ /**
2622
+ * No key was presented, or it is unknown, revoked or expired.
2623
+ */
2624
+ 401: EntitlementError;
2625
+ /**
2626
+ * The key restricts which source addresses may use it, and this
2627
+ * request did not come from one of them.
2628
+ *
2629
+ */
2630
+ 403: EntitlementError;
2631
+ /**
2632
+ * The usage counters could not be read. Reported rather than guessed
2633
+ * at: the whole answer is the number, and a confident zero would read
2634
+ * as "you have used nothing".
2635
+ *
2636
+ */
2637
+ 503: EntitlementError;
2638
+ };
2639
+ export type MyEntitlementError = MyEntitlementErrors[keyof MyEntitlementErrors];
2640
+ export type MyEntitlementResponses = {
2641
+ /**
2642
+ * The key's entitlements and consumption.
2643
+ */
2644
+ 200: Entitlement;
2645
+ };
2646
+ export type MyEntitlementResponse = MyEntitlementResponses[keyof MyEntitlementResponses];