@maxmind/geoip2-node
Version:
Node.js API for GeoIP2 webservice client and database reader
22 lines (21 loc) • 788 B
TypeScript
import * as mmdb from 'maxmind';
import { MaxMindRecord } from './records.js';
export interface CountryResponse extends mmdb.CountryResponse {
maxmind?: MaxMindRecord;
}
export interface CityResponse extends mmdb.CityResponse {
maxmind?: MaxMindRecord;
}
export type ClientErrorCode = 'FETCH_ERROR' | 'HTTP_STATUS_CODE_ERROR' | 'INVALID_RESPONSE_BODY' | 'IP_ADDRESS_INVALID' | 'NETWORK_TIMEOUT' | 'SERVER_ERROR';
export type WebServiceErrorCode = ClientErrorCode | (string & {});
export interface WebServiceClientError {
code: WebServiceErrorCode;
error: string;
status?: number;
url: string;
cause?: unknown;
}
export interface Json {
[key: string]: unknown;
}
export type ConnectionType = 'Cable/DSL' | 'Cellular' | 'Corporate' | 'Dialup' | 'Satellite';