import { NonNullablePaths } from '@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[]; } /** * A Predict end-point take an input and returns an list of Prediction object. * @param input - The text the predictions will be based on. * @public * @documentationMaturity preview * @requiredField input * @permissionId WIX_ATLAS.LIST_PREDICTIONS * @applicableIdentity APP * @fqn com.wixpress.vi.atlas.service.v2.AutocompleteServiceV2.Predict */ declare function predict(input: string, options?: PredictOptions): Promise>; interface PredictOptions { /** 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; } export { type AddressLocation, type FilterBy, FilterType, type FilterTypeWithLiterals, type ListPredictionsRequest, type ListPredictionsResponse, type MatchedSubstrings, type PredictOptions, type PredictRequest, type PredictResponse, type Prediction, type TextStructure, predict };