Versions Compared

Key

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

...

Excerpt
nameFacet
Code Block
languagetypescript
type FacetType =
    | 'checkbox'
    | 'color'
    | 'date-range'
    | 'link'
    | 'numeric-range'
    | 'range-slider'
    | 'recent-searches'
    | 'related-searches'
    | 'search'
    | 'size'
    | 'tabs'
    | 'unsupported';

Code Block
languagetypescript
interface FacetValueColor {
    name: string;
    hex?: string;
    imageUrl?: string;
}

Code Block
languagetypescript
interface FacetValue {
    title: string;
    imageUrl?: string;
    value?: string;
    color?: FacetValueColor;
    count?: number;
    level?: number;
    selected?: boolean;
    excluded?: boolean;
    children?: Array<FacetValue>;
}

Code Block
languagetypescript
interface FacetFacetRange<T> {
    id: number;
    type: FacetType;
    title: string;
    values?: Array<FacetValue>
    type: string;
    min: T;
    max: T;
    start: T;
    end: T;
}

interface DateFacetRange extends FacetRange<Date> {
    type: 'date';
}

interface NumericFacetRange extends FacetRange<number> {
    type: 'numeric';
}

Code Block
languagetypescript
interface Facet {
    id: number;
    field?type: stringFacetType;
    collapsibletitle: booleanstring;
    collapsedvalues?: booleanArray<FacetValue>;
    rangeMin?field: numberstring;
    rangeMax?collapsible: numberboolean;
    rangeStartcollapsed?: numberboolean;
    rangeEndrange?: DateFacetRange number| NumericFacetRange;
    searchable?: boolean;
    searchWithin?: string;
    tooltip?: string;
    truncateThreshold?: number;
    visible: boolean;
}

...

Excerpt
nameSearchResultsItem
Code Block
languagetypescript
type SearchResultsItemType = 'content' | 'product';

Code Block
languagetypescript
interface SearchResultsItem {
    id: string;attributes?: {
        pinned[key: string]: booleanArray<string>;
    visible: boolean};
    scoredescription?: numberstring;
    typeid: SearchResultsItemTypestring;
    imageUrl?: string;
    titlepinned: stringboolean;
    urlprice?: stringnumber;
    pricesalePrice?: number;
    salePrice?score: number;
    attributes?title: string;
{    type: SearchResultsItemType;
    [keyurl: string]:;
Array<string>;    visible: }boolean;
}

Sorting

Excerpt
nameSorting
Code Block
languagetypescript
interface SortingOption {
    title: string;
    value: string;
    default: boolean;
    selected: boolean;
}

Code Block
languagetypescript
interface Sorting {
    value?: string;
    options: Array<SortingOption>;
}

...