import { PredictRequest as PredictRequest$1, PredictResponse as PredictResponse$1 } from './index.typings.js'; import '@wix/sdk-types'; interface Prediction { /** The human-readable name of the prediction */ description?: string; /** The id of the prediction that can be use in place api. Available for short time. */ searchId?: string; /** Contains an array with offset value and length. These describe the location of the entered term in the prediction result text, so that the term can be highlighted if desired */ matchedSubstrings?: MatchedSubstrings[]; /** Provides pre-formatted text that can be shown in your autocomplete results */ textStructure?: TextStructure; /** Contains an integer indicating the straight-line distance between the predicted place, and the specified origin point, in meters. */ distanceInMeters?: number | null; /** * The place types. For example: route, locality etc... * @maxSize 100 * @maxLength 128 */ types?: string[]; } interface MatchedSubstrings { length?: number; offset?: number; } interface TextStructure { /** Contains the main text of a prediction, usually the name of the place */ mainText?: string; /** Contains the secondary text of a prediction, usually the location of the place */ secondaryText?: string; /** Contains an array with offset value and length. These describe the location of the entered term in the prediction result text, so that the term can be highlighted if desired */ mainTextMatchedSubstrings?: MatchedSubstrings[]; } interface ListPredictionsRequest { /** The text the predictions will be based on. */ input?: string; /** The origin point from which to calculate straight-line distance to the destination */ origin?: AddressLocation; /** The point around which you wish to retrieve place information */ location?: AddressLocation; /** The acceptable distance from that location (in meters) */ radius?: string | null; /** Filters the user can add in order to get more accurate results */ filterBy?: FilterBy[]; } interface AddressLocation { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } interface FilterBy { /** One of the filter types enum */ filterType?: FilterTypeWithLiterals; /** Free text like "us" */ filterValue?: string; } declare enum FilterType { /** Filter by zip code */ zip_code = "zip_code", /** Filter by 2-letters or 3-letters country code */ country_code = "country_code" } /** @enumType */ type FilterTypeWithLiterals = FilterType | 'zip_code' | 'country_code'; interface ListPredictionsResponse { predictions?: Prediction[]; } interface PredictRequest { /** * The text the predictions will be based on. * @minLength 1 */ input: string; /** The origin point from which to calculate straight-line distance to the destination */ origin?: AddressLocation; /** The point around which you wish to retrieve place information */ location?: AddressLocation; /** The acceptable distance from that location (in meters) */ radius?: string | null; /** alpha-2 or alpha-3 ISO-3166 country codes to filter by */ countryCodes?: string[]; /** * A random string which identifies an autocomplete session for billing purposes. The session begins when the user starts typing a query, and concludes when they select a place and a call to Get Place is made. Once a session has concluded, the token is no longer valid. your app must generate a fresh token for each session. * @format GUID */ sessionToken?: string | null; } interface PredictResponse { predictions?: Prediction[]; } type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function predict(): __PublicMethodMetaInfo<'POST', {}, PredictRequest$1, PredictRequest, PredictResponse$1, PredictResponse>; export { type AddressLocation as AddressLocationOriginal, type FilterBy as FilterByOriginal, FilterType as FilterTypeOriginal, type FilterTypeWithLiterals as FilterTypeWithLiteralsOriginal, type ListPredictionsRequest as ListPredictionsRequestOriginal, type ListPredictionsResponse as ListPredictionsResponseOriginal, type MatchedSubstrings as MatchedSubstringsOriginal, type PredictRequest as PredictRequestOriginal, type PredictResponse as PredictResponseOriginal, type Prediction as PredictionOriginal, type TextStructure as TextStructureOriginal, type __PublicMethodMetaInfo, predict };