Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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;
}

...

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
}