import { Feature } from 'geojson'; import { DatabaseFeature, LayerGroups, NearbyQuery } from '../../interfaces/gis.interface'; import { Api, ApiResponse } from '../api'; export interface ElementFeaturePair { type: string; identifierHash: string; elementHash: string; } interface GeocodingResponse { results: { address_components: { long_name: string; short_name: string; types: string[]; }[]; formatted_address: string; geometry: { location: { lat: number; lng: number; }; location_type: string; viewport: { northeast: { lat: number; lng: number; }; southeast: { lat: number; lng: number; }; }; }; place_id: string; plus_code: { compound_code: string; global_code: string; }; types: string[]; }[]; status: string; } interface AutocompleteResponse { status: string; predictions: { description: string; place_id: string; }[]; } export interface GetLayerGroupsResult { organization: string; groups: LayerGroups; } export interface ShowNearResult { features: DatabaseFeature[]; per_page: number; page: number; results_count: number; } interface NearOptions { awaitSync: boolean; } interface EditData { layerName?: string; organization?: string; geojson?: Feature; } export interface IncrementalUpdatesResponse { features: DatabaseFeature[]; count: number; perPage: number; } export interface FeaturesQuery { organization: string; query?: object; layerName?: string | string[] | undefined; properties?: { [prop: string]: string | number | string[]; }; bounds?: [[number, number], [number, number]]; limit?: number; sort?: { [prop: string]: number; }; } export declare class Geojson { api: Api; sessionToken?: string; googleKey?: string; constructor(api: Api); setGoogleKey(key: string): void; near(query: NearbyQuery, organization: string, layer: string | string[], page?: number, perPage?: number, paramOptions?: Partial): Promise>; loadLayers(organization: string): Promise>; loadLayerGroups(organization: string): Promise>; getFeature(identifierHash: string): Promise>; getIncrementalUpdates(organization: string, layers: string[], lastSyncAt: string, page?: number): Promise>; getFeaturesForElements(hashes: string[]): Promise>; addFeature(geojson: Feature, layerName: string, organization: string): Promise>; createElementsForFeatures(organization: string, hashes: string | string[]): Promise>; queryFeatures(query: FeaturesQuery): Promise>; editFeature(geoIdentifier: string, editData: EditData): Promise>; geocodingQuery(query: string, metaData?: { location?: string; radius?: number; }): Promise> | undefined; getPlaceLocation(placeId: string): Promise>; generateSessionToken(): void; } export {};