Skip to content

Commit ccde4bd

Browse files
chore: publish SearchByText docs in Preview
PiperOrigin-RevId: 580660853
1 parent 16c2734 commit ccde4bd

File tree

1 file changed

+126
-0
lines changed

1 file changed

+126
-0
lines changed

index.d.ts

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7+
// g3-format-clang
78
// Google Maps JS API Version: 3.54
89
// tslint:disable:enforce-name-casing
910
// tslint:disable:no-any
@@ -12179,6 +12180,13 @@ declare namespace google.maps.places {
1217912180
static findPlaceFromQuery(
1218012181
this: any, request: google.maps.places.FindPlaceFromQueryRequest):
1218112182
Promise<{places: google.maps.places.Place[]}>;
12183+
/**
12184+
* Available only in the v=beta channel: https://goo.gle/3oAthT3.
12185+
* Text query based place search.
12186+
*/
12187+
static searchByText(
12188+
this: any, request: google.maps.places.SearchByTextRequest):
12189+
Promise<{places: google.maps.places.Place[]}>;
1218212190
}
1218312191
/**
1218412192
* Defines information about an aspect of the place that users have reviewed.
@@ -13278,6 +13286,124 @@ declare namespace google.maps.places {
1327813286
*/
1327913287
bounds?: google.maps.LatLngBounds|null|google.maps.LatLngBoundsLiteral;
1328013288
}
13289+
/**
13290+
* Available only in the v=beta channel: https://goo.gle/3oAthT3.
13291+
*
13292+
* RankBy enum for SearchByTextRequest.
13293+
*
13294+
* Access by calling `const {SearchByTextRankBy} = await
13295+
* google.maps.importLibrary("places")`. See
13296+
* https://developers.google.com/maps/documentation/javascript/libraries.
13297+
*/
13298+
export enum SearchByTextRankBy {
13299+
/**
13300+
* Ranks results by distance.
13301+
*/
13302+
DISTANCE = 'DISTANCE',
13303+
/**
13304+
* Ranks results by relevance.
13305+
*/
13306+
RELEVANCE = 'RELEVANCE',
13307+
}
13308+
/**
13309+
* Available only in the v=beta channel: https://goo.gle/3oAthT3.
13310+
*
13311+
* Request interface for {@link google.maps.places.Place.searchByText}.
13312+
*/
13313+
export interface SearchByTextRequest {
13314+
/**
13315+
* Fields to be included in the response, <a
13316+
* href="https://developers.google.com/maps/billing/understanding-cost-of-use#places-product">which
13317+
* will be billed for</a>. If <code>[&#39;ALL&#39;]</code> is passed in, all
13318+
* available fields will be returned and billed for (this is not recommended
13319+
* for production deployments). For a list of fields see {@link
13320+
* google.maps.places.PlaceResult}. Nested fields can be specified with
13321+
* dot-paths (for example, <code>"geometry.location"</code>).
13322+
*/
13323+
fields: string[];
13324+
/**
13325+
* The requested place type. Full list of types supported: <a
13326+
* href="https://developers.google.com/maps/documentation/places/web-service/place-types">https://developers.google.com/maps/documentation/places/web-service/place-types</a>.
13327+
* Only one included type is supported. See {@link
13328+
* google.maps.places.SearchByTextRequest.useStrictTypeFiltering}
13329+
*/
13330+
includedType?: string;
13331+
/**
13332+
* Used to restrict the search to places that are currently open.
13333+
* @defaultValue <code>false</code>
13334+
*/
13335+
isOpenNow?: boolean;
13336+
/**
13337+
* Place details will be displayed with the preferred language if available.
13338+
* Will default to the browser&#39;s language preference. Current list of
13339+
* supported languages: <a
13340+
* href="https://developers.google.com/maps/faq#languagesupport">https://developers.google.com/maps/faq#languagesupport</a>.
13341+
*/
13342+
language?: string;
13343+
/**
13344+
* The region to search. This location serves as a bias which means results
13345+
* around given location might be returned. Cannot be set along with
13346+
* locationRestriction.
13347+
*/
13348+
locationBias?: google.maps.LatLng|google.maps.LatLngLiteral|
13349+
google.maps.LatLngBounds|google.maps.LatLngBoundsLiteral|
13350+
google.maps.CircleLiteral|google.maps.Circle;
13351+
/**
13352+
* The region to search. This location serves as a restriction which means
13353+
* results outside given location will not be returned. Cannot be set along
13354+
* with locationBias.
13355+
*/
13356+
locationRestriction?: google.maps.LatLngBounds|
13357+
google.maps.LatLngBoundsLiteral;
13358+
/**
13359+
* Maximum number of results to return. It must be between 1 and 20,
13360+
* inclusively.
13361+
*/
13362+
maxResultCount?: number;
13363+
/**
13364+
* Filter out results whose average user rating is strictly less than this
13365+
* limit. A valid value must be an float between 0 and 5 (inclusively) at a
13366+
* 0.5 cadence i.e. [0, 0.5, 1.0, ... , 5.0] inclusively. The input rating
13367+
* will be rounded up to the nearest 0.5(ceiling). For instance, a rating of
13368+
* 0.6 will eliminate all results with a less than 1.0 rating.
13369+
*/
13370+
minRating?: number;
13371+
/**
13372+
* Used to restrict the search to places that are marked as certain price
13373+
* levels. Any combinations of price levels can be chosen. Defaults to all
13374+
* price levels.
13375+
*/
13376+
priceLevels?: google.maps.places.PriceLevel[];
13377+
/**
13378+
* @deprecated Please use textQuery instead
13379+
*/
13380+
query?: string;
13381+
/**
13382+
* How results will be ranked in the response.
13383+
* @defaultValue <code>SearchByTextRankBy.DISTANCE</code>
13384+
*/
13385+
rankBy?: google.maps.places.SearchByTextRankBy;
13386+
/**
13387+
* The Unicode country/region code (CLDR) of the location where the request
13388+
* is coming from. This parameter is used to display the place details, like
13389+
* region-specific place name, if available. The parameter can affect
13390+
* results based on applicable law. For more information, see <a
13391+
* href="https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html">https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html</a>.
13392+
* Note that 3-digit region codes are not currently supported.
13393+
*/
13394+
region?: string;
13395+
/**
13396+
* Required. The text query for textual search.
13397+
*/
13398+
textQuery?: string;
13399+
/**
13400+
* Used to set strict type filtering for {@link
13401+
* google.maps.places.SearchByTextRequest.includedType}. If set to true,
13402+
* only results of the same type will be returned.
13403+
* @defaultValue <code>false</code>
13404+
*/
13405+
useStrictTypeFiltering?: boolean;
13406+
}
1328113407
/**
1328213408
* Contains structured information about the place&#39;s description, divided
1328313409
* into a main text and a secondary text, including an array of matched

0 commit comments

Comments
 (0)