import type { BrandSuggestions } from './BrandSuggestions'; import type { EinsteinSuggestedPhrases } from './EinsteinSuggestedPhrases'; import type { CategorySuggestions } from './CategorySuggestions'; import type { ProductSuggestions } from './ProductSuggestions'; import type { SearchMode } from './SearchMode'; import type { CustomSuggestions } from './CustomSuggestions'; /** * @type SuggestionResult: Document representing a search suggestion result. * * @property brandSuggestions: Returns the suggested brands. * * @property categorySuggestions: Returns the suggested categories. * * @property productSuggestions: Returns the suggested products. * * @property customSuggestion: Returns custom suggestions. * * @property einsteinSuggestedPhrases: Returns Einstein suggested phrases containing popular and recent search phrases. * * @property searchPhrase: The query phrase (q) for which suggestions where made. * - **Min Length:** 3 * - **Max Length:** 50 * * @property searchMode: The search matching approach the client requested for these suggestions, echoed back from the `searchMode` query parameter. Omitted when the request did not supply one. This is the requested hint, not necessarily the mode that served the suggestions — see `effectiveSearchMode`. * * @property effectiveSearchMode: The search matching approach the platform actually used to serve these suggestions. May differ from the requested `searchMode` when the platform demoted the mode (for example when the semantic index is unavailable). * */ export type SuggestionResult = { brandSuggestions?: BrandSuggestions; categorySuggestions?: CategorySuggestions; productSuggestions?: ProductSuggestions; customSuggestion?: CustomSuggestions; einsteinSuggestedPhrases?: EinsteinSuggestedPhrases; searchPhrase: string; searchMode?: SearchMode; effectiveSearchMode?: SearchMode; } & { [key: string]: any; };