39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
import { GeocodeProvider } from '@prisma/client';
|
|
export interface BoundsQuery {
|
|
minLat: number;
|
|
maxLat: number;
|
|
minLng: number;
|
|
maxLng: number;
|
|
}
|
|
export interface GeocodeResult {
|
|
latitude: number;
|
|
longitude: number;
|
|
confidence: number;
|
|
provider: GeocodeProvider;
|
|
formattedAddress?: string;
|
|
}
|
|
export interface ReverseGeocodeResult {
|
|
address: string;
|
|
city?: string;
|
|
province?: string;
|
|
country?: string;
|
|
}
|
|
export declare const geocodingService: {
|
|
geocodeBatch(addresses: string[], bounds?: BoundsQuery): Promise<(GeocodeResult | null)[]>;
|
|
geocode(address: string, bounds?: BoundsQuery): Promise<GeocodeResult | null>;
|
|
reverseGeocode(lat: number, lng: number): Promise<ReverseGeocodeResult | null>;
|
|
search(query: string, limit?: number): Promise<Array<{
|
|
latitude: number;
|
|
longitude: number;
|
|
displayName: string;
|
|
type: string;
|
|
provider: string;
|
|
}>>;
|
|
clearCache(): Promise<void>;
|
|
getCacheStats(): Promise<{
|
|
keys: number;
|
|
hits: number;
|
|
misses: number;
|
|
}>;
|
|
};
|
|
//# sourceMappingURL=geocoding.service.d.ts.map
|