Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Autocomplete Request

interface AutocompleteRequest {
    query: string;
}

Autocomplete Response

interface AutocompleteResponse {
    query: string;
    categories: AutocompleteCategories;
    content: AutocompleteContent;
    products: AutocompleteProducts;
    queries: AutocompleteQueries;
    totalRecords: number;
    viewAllText: string;
}

Categories

interface AutocompleteCategory {
    title: string;
    field: string;
    value: string;
    url: string;
}

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

Text Content Results

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

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)

interface AutocompleteQuery {
    query: string;
    url: string;
}

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

Item Type

enum AutocompleteItemType {
    Search = 1,
    Category = 2,
    Product = 3,
    Content = 4
}
  • No labels