declare const Language: Readonly<{ readonly EN: "en"; readonly DE: "de"; readonly RU: "ru"; readonly JA: "ja"; readonly FR: "fr"; readonly CN: "cn"; readonly ES: "es"; readonly CS: "cs"; readonly IT: "it"; readonly KO: "ko"; readonly FA: "fa"; readonly PT: "pt"; }>; type Language = (typeof Language)[keyof typeof Language]; declare const LANGUAGE_VALUES: readonly Language[]; declare const ResponseFormat: Readonly<{ readonly JSON: "json"; readonly XML: "xml"; }>; type ResponseFormat = (typeof ResponseFormat)[keyof typeof ResponseFormat]; declare const RESPONSE_FORMAT_VALUES: readonly ResponseFormat[]; declare const JsonOutputMode: Readonly<{ readonly COMPACT: "compact"; readonly FULL: "full"; }>; type JsonOutputMode = (typeof JsonOutputMode)[keyof typeof JsonOutputMode]; declare const JSON_OUTPUT_MODE_VALUES: readonly JsonOutputMode[]; declare const LocationConfidence: Readonly<{ readonly HIGH: "high"; readonly MEDIUM: "medium"; readonly LOW: "low"; readonly UNKNOWN: "unknown"; }>; type LocationConfidence = (typeof LocationConfidence)[keyof typeof LocationConfidence]; declare const LOCATION_CONFIDENCE_VALUES: readonly LocationConfidence[]; type HeaderMultiMap = Readonly>; interface ApiResponse { data: T; metadata: ApiResponseMetadata; } interface ApiResponseMetadataInit { creditsCharged?: number | null; successfulRecords?: number | null; statusCode: number; durationMs: number; rawHeaders?: HeaderMultiMap | null; } declare class ApiResponseMetadata { readonly creditsCharged: number | undefined; readonly successfulRecords: number | undefined; readonly statusCode: number; readonly durationMs: number; readonly rawHeaders: HeaderMultiMap; constructor(init: ApiResponseMetadataInit); headerValues(name: string): readonly string[]; firstHeaderValue(name: string): string | undefined; } interface Abuse { route?: string; country?: string; name?: string; organization?: string; kind?: string; address?: string; emails?: readonly string[]; phoneNumbers?: readonly string[]; } interface Asn { asNumber?: string; organization?: string; country?: string; type?: string; domain?: string; dateAllocated?: string; rir?: string; } interface Company { name?: string; type?: string; domain?: string; } interface CountryMetadata { callingCode?: string; tld?: string; languages?: readonly string[]; } interface Currency { code?: string; name?: string; symbol?: string; } interface DstTransition { utcTime?: string; duration?: string; gap?: boolean; dateTimeAfter?: string; dateTimeBefore?: string; overlap?: boolean; } interface Location { continentCode?: string; continentName?: string; countryCode2?: string; countryCode3?: string; countryName?: string; countryNameOfficial?: string; countryCapital?: string; stateProv?: string; stateCode?: string; district?: string; city?: string; locality?: string; accuracyRadius?: string; confidence?: LocationConfidence; dmaCode?: string; zipcode?: string; latitude?: string; longitude?: string; isEu?: boolean; countryFlag?: string; geonameId?: string; countryEmoji?: string; } interface Network { connectionType?: string; route?: string; isAnycast?: boolean; } interface Security { threatScore?: number; isTor?: boolean; isProxy?: boolean; proxyProviderNames?: readonly string[]; proxyConfidenceScore?: number; proxyLastSeen?: string; isResidentialProxy?: boolean; isVpn?: boolean; vpnProviderNames?: readonly string[]; vpnConfidenceScore?: number; vpnLastSeen?: string; isRelay?: boolean; relayProviderName?: string; isAnonymous?: boolean; isKnownAttacker?: boolean; isBot?: boolean; isSpam?: boolean; isCloudProvider?: boolean; cloudProviderName?: string; } interface TimeZoneInfo { name?: string; offset?: number; offsetWithDst?: number; currentTime?: string; currentTimeUnix?: number; currentTzAbbreviation?: string; currentTzFullName?: string; standardTzAbbreviation?: string; standardTzFullName?: string; isDst?: boolean; dstSavings?: number; dstExists?: boolean; dstTzAbbreviation?: string; dstTzFullName?: string; dstStart?: DstTransition; dstEnd?: DstTransition; } interface UserAgentDevice { name?: string; type?: string; brand?: string; cpu?: string; } interface UserAgentEngine { name?: string; type?: string; version?: string; versionMajor?: string; } interface UserAgentOperatingSystem { name?: string; type?: string; version?: string; versionMajor?: string; build?: string; } interface UserAgent { userAgentString?: string; name?: string; type?: string; version?: string; versionMajor?: string; device?: UserAgentDevice; engine?: UserAgentEngine; operatingSystem?: UserAgentOperatingSystem; } interface IpGeolocationResponse { ip?: string; domain?: string; hostname?: string; location?: Location; countryMetadata?: CountryMetadata; network?: Network; currency?: Currency; asn?: Asn; company?: Company; security?: Security; abuse?: Abuse; timeZone?: TimeZoneInfo; userAgent?: UserAgent; } interface BulkLookupSuccess { success: true; data: IpGeolocationResponse; } interface BulkLookupError { success: false; error: { message?: string; }; } type BulkLookupResult = BulkLookupSuccess | BulkLookupError; type HeaderValue = string | readonly string[]; type HeaderEntry = readonly [string, HeaderValue]; type RequestHeaders = Headers | Readonly> | ReadonlyMap | Iterable; type NormalizedHeaders = Readonly>; interface LookupIpGeolocationRequestInit { ip?: string | null; lang?: Language | string | null; include?: Iterable | null; fields?: Iterable | null; excludes?: Iterable | null; userAgent?: string | null; headers?: RequestHeaders | null; output?: ResponseFormat | string | null; } interface BulkLookupIpGeolocationRequestInit { ips: Iterable; lang?: Language | string | null; include?: Iterable | null; fields?: Iterable | null; excludes?: Iterable | null; userAgent?: string | null; headers?: RequestHeaders | null; output?: ResponseFormat | string | null; } declare class LookupIpGeolocationRequest { readonly ip: string | undefined; readonly lang: Language | undefined; readonly include: readonly string[]; readonly fields: readonly string[]; readonly excludes: readonly string[]; readonly userAgent: string | undefined; readonly headers: NormalizedHeaders; readonly output: ResponseFormat; constructor(init?: LookupIpGeolocationRequestInit); } declare class BulkLookupIpGeolocationRequest { readonly ips: readonly string[]; readonly lang: Language | undefined; readonly include: readonly string[]; readonly fields: readonly string[]; readonly excludes: readonly string[]; readonly userAgent: string | undefined; readonly headers: NormalizedHeaders; readonly output: ResponseFormat; constructor(init: BulkLookupIpGeolocationRequestInit); } interface HttpRequestData { url: string; method: string; headers: HeaderMultiMap; body?: string | undefined; connectTimeoutMs: number; readTimeoutMs: number; } interface HttpResponseData { statusCode: number; body: string; headers: HeaderMultiMap; } interface HttpTransport { send(request: HttpRequestData): Promise; close(): Promise; } type FetchLike = typeof fetch; interface FetchHttpTransportInit { fetch?: FetchLike; maxResponseBodyChars?: number; } declare const DEFAULT_MAX_RESPONSE_BODY_CHARS: number; declare class FetchHttpTransport implements HttpTransport { private readonly fetchImpl; private readonly maxResponseBodyChars; constructor(init?: FetchHttpTransportInit); send(request: HttpRequestData): Promise; close(): Promise; } interface IpGeolocationClientConfigInit { apiKey?: string | null; requestOrigin?: string | null; baseUrl?: string | null; connectTimeoutMs?: number | null; readTimeoutMs?: number | null; } declare class IpGeolocationClientConfig { readonly apiKey: string | undefined; readonly requestOrigin: string | undefined; readonly baseUrl: string; readonly connectTimeoutMs: number; readonly readTimeoutMs: number; constructor(init?: IpGeolocationClientConfigInit); } declare class IpGeolocationClient { private readonly config; private readonly transport; private readonly ownsTransport; private closed; constructor(config: IpGeolocationClientConfig | IpGeolocationClientConfigInit, transport?: HttpTransport); static defaultUserAgent(): string; lookupIpGeolocation(request: LookupIpGeolocationRequest | LookupIpGeolocationRequestInit): Promise>; lookupIpGeolocationRaw(request: LookupIpGeolocationRequest | LookupIpGeolocationRequestInit): Promise>; bulkLookupIpGeolocation(request: BulkLookupIpGeolocationRequest | BulkLookupIpGeolocationRequestInit): Promise>; bulkLookupIpGeolocationRaw(request: BulkLookupIpGeolocationRequest | BulkLookupIpGeolocationRequestInit): Promise>; close(): Promise; private ensureOpen; private validateLookupRequestBase; private validateBulkRequestBase; private buildLookupHttpRequest; private buildBulkHttpRequest; private executeWithMetrics; private resolveDefaultUserAgent; } interface ErrorCauseOptions { cause?: unknown; } declare class IpGeolocationError extends Error { readonly cause: unknown; constructor(message: string, options?: ErrorCauseOptions); } declare class ValidationError extends IpGeolocationError { } declare class SerializationError extends IpGeolocationError { } declare class TransportError extends IpGeolocationError { } declare class RequestTimeoutError extends TransportError { } declare class ApiError extends IpGeolocationError { readonly statusCode: number; readonly apiMessage: string | undefined; constructor(message: string, statusCode: number, apiMessage?: string); } declare class BadRequestError extends ApiError { } declare class UnauthorizedError extends ApiError { } declare class NotFoundError extends ApiError { } declare class MethodNotAllowedError extends ApiError { } declare class PayloadTooLargeError extends ApiError { } declare class UnsupportedMediaTypeError extends ApiError { } declare class LockedError extends ApiError { } declare class RateLimitError extends ApiError { } declare class ClientClosedRequestError extends ApiError { } declare class ServerError extends ApiError { } declare function toJson(value: unknown, mode?: JsonOutputMode | string): string; declare function toPrettyJson(value: unknown, mode?: JsonOutputMode | string): string; declare const SDK_VERSION = "3.0.0"; declare function getVersion(): string; export { type Abuse, ApiError, type ApiResponse, ApiResponseMetadata, type ApiResponseMetadataInit, type Asn, BadRequestError, type BulkLookupError, BulkLookupIpGeolocationRequest, type BulkLookupIpGeolocationRequestInit, type BulkLookupResult, type BulkLookupSuccess, ClientClosedRequestError, type Company, type CountryMetadata, type Currency, DEFAULT_MAX_RESPONSE_BODY_CHARS, type DstTransition, type ErrorCauseOptions, FetchHttpTransport, type FetchHttpTransportInit, type FetchLike, type HeaderEntry, type HeaderMultiMap, type HeaderValue, type HttpRequestData, type HttpResponseData, type HttpTransport, IpGeolocationClient, IpGeolocationClientConfig, type IpGeolocationClientConfigInit, IpGeolocationError, type IpGeolocationResponse, JSON_OUTPUT_MODE_VALUES, JsonOutputMode, LANGUAGE_VALUES, LOCATION_CONFIDENCE_VALUES, Language, type Location, LocationConfidence, LockedError, LookupIpGeolocationRequest, type LookupIpGeolocationRequestInit, MethodNotAllowedError, type Network, type NormalizedHeaders, NotFoundError, PayloadTooLargeError, RESPONSE_FORMAT_VALUES, RateLimitError, type RequestHeaders, RequestTimeoutError, ResponseFormat, SDK_VERSION, type Security, SerializationError, ServerError, type TimeZoneInfo, TransportError, UnauthorizedError, UnsupportedMediaTypeError, type UserAgent, type UserAgentDevice, type UserAgentEngine, type UserAgentOperatingSystem, ValidationError, getVersion, toJson, toPrettyJson };