Table of Contents |
---|
Autocomplete Request
Code Block | ||
---|---|---|
| ||
interface AutocompleteRequest {
query: string;
} |
Autocomplete Response
Code Block | ||
---|---|---|
| ||
interface AutocompleteResponse {
query: string;
categories: AutocompleteCategories;
content: AutocompleteContent;
products: AutocompleteProducts;
queries: AutocompleteQueries;
totalRecords: number;
viewAllText: string;
} |
Categories
Code Block | ||
---|---|---|
| ||
interface AutocompleteCategory {
title: string;
field: string;
value: string;
url: string;
}
interface AutocompleteCategories {
title: string;
results: Array<AutocompleteCategory>;
} |
Text Content Results
Code Block | ||
---|---|---|
| ||
interface AutocompleteContentResult {
id: string;
title: string;
url: string;
pinned: boolean;
score: number;
attributes?: {
[key: string]: Array<string>;
};
}
interface AutocompleteContent {
title: string;
results: Array<AutocompleteContentResult>;
totalRecords: number;
} |
Product Results
Code Block | ||
---|---|---|
| ||
interface AutocompleteProductResult {
id: string;
title: string;
sku?: string;
imageUrl?: string;
url: string;
pinned: boolean;
score: number;
attributes?: {
[key: string]: Array<string>;
};
}
interface AutocompleteProducts {
title: string;
results: Array<AutocompleteProductResult>;
totalRecords: number;
} |
Queries (Popular Searches)
Code Block | ||
---|---|---|
| ||
interface AutocompleteQuery {
query: string;
url: string;
}
interface AutocompleteQueries {
title: string;
results: Array<AutocompleteQuery>;
} |