// eslint-disable-next-line @react-native/no-deep-imports import {type Double} from 'react-native/Libraries/Types/CodegenTypes' import {type TurboModule, TurboModuleRegistry} from 'react-native' import type {Address} from '../interfaces' export interface BoundingBox { southWest: Point northEast: Point } export enum SearchSnippet { NONE = 'NONE', PANORAMAS = 'PANORAMAS', PHOTOS = 'PHOTOS', BUSINESSRATING1X = 'BUSINESSRATING1X', // ios only } export enum SearchType { NONE = 'NONE', GEO = 'GEO', BIZ = 'BIZ', } export interface Point { lat: Double lon: Double } export type FigureParams = { point?: Point boundingBox?: BoundingBox polyline?: Point[] polygon?: Point[] } export interface SearchOptions { disableSpellingCorrection?: boolean geometry?: boolean snippets?: SearchSnippet[] searchTypes?: SearchType[] } interface Spec extends TurboModule { searchByAddress(query: string, figure: FigureParams, options: SearchOptions): Promise
searchByPoint(point: Point, zoom: Double, options: SearchOptions): Promise geoToAddress(point: Point): Promise addressToGeo(address: string): Promise