This namespace allows you to interact Gmail and Inbox's default search behaviour. It allows for two use cases: 1) To provide autocomplete suggestions as the user types in their query and 2) To rewrite sarch queries.
Registers a search autocomplete suggestion provider. This allows you to add results to Gmails autocomplete results when a user types into a search box. Each providers results are visually seperated from each other in the UI.
|handler||A handler that takes in a string query and returns an Array (or Promise for one) of AutocompleteSearchResults.|
Allows you to rewrite certain queries that may be typed in or programatically set. If a user types in a search, their search term will still be visible but the search that is actually executed by Gmails servers will be what you rewrite the query to.
|rewriter||A rewriter object that specifies the term to rewrite and a function to get the new query.|
This type is returned by the function you pass into the Search.registerSearchSuggestionsProvider() method as a way to add autocomplete suggestions to the Gmail/Inbox search box.
|name||The name of the result to display. This property or nameHTML must be set.||No|
|nameHTML||HTML to display in the name area of the result. This property or name must be set.||No|
|description||The name of the result to display. This property or descriptionHTML must be set.||No|
|descriptionHTML||HTML to display in the name area of the result. This property or description must be set.||No|
|iconUrl||URL for the icon to show in the result. Should be a local extension file URL or a HTTPS url.||No|
|iconHTML||HTML to display in the icon area of the result. This property can not be used with iconUrl.||No|
|routeName||The name of the route to navigate to when the autocomplete search result is selected.||No|
|routeParams||The parameters of the route being navigated to when the autocomplete search result is selected.||No|
|externalURL||An external URL to navigate to when the autocomplete search result is selected.||No|
|onClick||A function to call when the autocomplete search result is selected.||No|
This type is passed into the Search.registerSearchQueryRewriter() method as a way to add rewrite search queries.
|term||The query term that you'd like to rewrite/replace. No wildcards are currently supported. Currently it must begin with "app:" or "has:".||Yes|
|termReplacer||A function which returns a String (or Promise for a string) to replace the specified term in the search query.||Yes|