Skip to main content

Refinement

Overview​

Refinement is a discriminated union of possible search result refinement types available in the High Velocity front-end app.

type Refinement = AttributeRefinement | CategoryRefinement;

AttributeRefinement​

Represents a refinement based on product attributes.

Attributes​

type​

type: literal = 'attribute'


Indicates that the refinement is of type 'attribute'.

items​

type: AttributeRefinementValue[]

The list of attribute refinement values.

name​

type: string


The name of the attribute being refined.


AttributeRefinementValue​

Represents a value for an attribute refinement.

Attributes​

value​

type: string


The value of the attribute refinement.

label​

type: string


The display label of the attribute refinement.

count​

type: number


The count of items matching the attribute refinement.


CategoryRefinement​

Represents a refinement based on product categories.

Attributes​

type​

type: literal = 'category'


Indicates that the refinement is of type 'category'.

items​

type: CategoryRefinementValue[]

The list of category refinement values.


CategoryRefinementValue​

Represents a value for a category refinement.

Attributes​

value​

type: string


The value of the category refinement.

label​

type: string


The display label of the category refinement.

count​

type: number


The count of items matching the category refinement.

items (optional)​

type: CategoryRefinementValue


A list of nested category refinement values.