Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel7

Autocomplete Request

Excerpt
nameAutocompleteRequest
Code Block
languagetypescript
interface AutocompleteRequest {
    query: string;
}

Autocomplete Response

Excerpt
nameAutocompleteResponse
Code Block
languagetypescript
interface AutocompleteResponse {
    query: string;
    categories: AutocompleteCategories;
    content: AutocompleteContent;
    products: AutocompleteProducts;
    queries: AutocompleteQueries;
    totalRecords: number;
    viewAllText: string;
}

Categories

Excerpt
nameAutocompleteCategories
Code Block
languagetypescript
interface AutocompleteCategory {
    title: string;
    field: string;
    value: string;
    url: string;
}

Code Block
languagetypescript
interface AutocompleteCategories {
    title: string;
    results: Array<AutocompleteCategory>;
}

Text Content Results

Excerpt
nameAutocompleteContent
Code Block
languagetypescript
interface AutocompleteContentResult {
    id: string;
    title: string;
    url: string;
    pinned: boolean;
    score: number;
    attributes?: {
        [key: string]: Array<string>;
    };
}

Code Block
languagetypescript
interface AutocompleteContent {
    title: string;
    results: Array<AutocompleteContentResult>;
    totalRecords: number;
}

Product Results

Excerpt
nameAutocompleteProducts
Code Block
languagetypescript
interface AutocompleteProductResult {
    id: string;
    title: string;
    sku?: string;
    imageUrl?: string;
    url: string;
    pinned: boolean;
    score: number;
    attributes?: {
        [key: string]: Array<string>;
    };
}
Code Block
languagetypescript
interface AutocompleteProducts {
    title: string;
    results: Array<AutocompleteProductResult>;
    totalRecords: number;
}

...

Query Results (Popular Searches)

Excerpt
nameAutocompleteQueries
Code Block
languagetypescript
interface AutocompleteQuery {
    query: string;
    url: string;
}

Code Block
languagetypescript
interface AutocompleteQueries {
    title: string;
    results: Array<AutocompleteQuery>;
}

Item Type

Excerpt
nameAutocompleteItemType
Code Block
languagetypescript
enum AutocompleteItemType {
    Search = 1,
    Category = 2,
    Product = 3,
    Content = 4
}