UNPKG

ggez-banking-sdk

Version:

A Node.js package to handle GGEZ Banking API endpoints, Simplify the process of managing CRUD operations with this efficient and easy-to-use package.

27 lines (26 loc) 967 B
import type { GeoCoordinates } from "../types"; declare class GeoHelper { private static readonly CACHE_KEY_PREFIX; private static readonly DEFAULT_TTL_MS; private static cache; private static pending; private readonly baseUrl; private readonly axiosInstance; constructor(baseUrl: string); static clearCache(): void; private static storageKey; private static readCache; private static writeCache; private fetchIPAddressAndLocation; private fetchSharedLocation; private loadGeoData; private static toGeoCoordinates; private static fallbackGeoCoordinates; getGeoCoordinates(ttlMs?: number, forceRefresh?: boolean): Promise<GeoCoordinates>; getIPAddress(ttlMs?: number, forceRefresh?: boolean): Promise<string>; getGeoCoordinatesAndIPAddress(ttlMs?: number, forceRefresh?: boolean): Promise<{ geo_coordinates: GeoCoordinates; ip_address: string; }>; } export { GeoHelper };