oak-common-aspect/lib/geo.d.ts

19 lines
775 B
TypeScript

import { AsyncContext } from 'oak-domain/lib/store/AsyncRowStore';
import { EntityDict } from 'oak-domain/lib/types';
import { EntityDict as BaseEntityDict } from 'oak-domain/lib/base-app-domain';
import { MapService } from './types/Map';
export declare type GeoApi = 'geo' | 'regeo';
export declare function registerGetMapService(fn: <ED extends BaseEntityDict & EntityDict>(context: AsyncContext<ED>) => MapService | undefined): void;
export declare function geoService<ED extends BaseEntityDict & EntityDict, A extends GeoApi>(options: {
api: A;
params: Parameters<MapService[A]>[0];
}, context: AsyncContext<ED>): Promise<{
poiName: string;
areaId: string;
} | {
poiName: string;
areaId: string;
latitude: number;
longitude: number;
}[]>;