<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@empathyco/x-types](./x-types.md)

## x-types package

Search-types library with the search API models. It also includes model schemas for testing purpose.

## Remarks

Entry point to export search-type models and testing schemas in a unified api-extractor model.

## Functions

<table><thead><tr><th>

Function


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[isBooleanFilter(filter)](./x-types.isbooleanfilter.md)


</td><td>

Type guard to check if a filter is a [BooleanFilter](./x-types.booleanfilter.md)<!-- -->.


</td></tr>
<tr><td>

[isEditableNumberRangeFacet(facet)](./x-types.iseditablenumberrangefacet.md)


</td><td>

Type guard to check if a facet is an [EditableNumberRangeFacet](./x-types.editablenumberrangefacet.md)<!-- -->.


</td></tr>
<tr><td>

[isEditableNumberRangeFilter(filter)](./x-types.iseditablenumberrangefilter.md)


</td><td>

Type guard to check if a filter is an [EditableNumberRangeFilter](./x-types.editablenumberrangefilter.md)<!-- -->.


</td></tr>
<tr><td>

[isFacetFilter(filter)](./x-types.isfacetfilter.md)


</td><td>

Type guard to check if a filter is a [FacetFilter](./x-types.facetfilter.md)<!-- -->.


</td></tr>
<tr><td>

[isHierarchicalFacet(facet)](./x-types.ishierarchicalfacet.md)


</td><td>

Type guard to check if a facet is an [HierarchicalFacet](./x-types.hierarchicalfacet.md)<!-- -->.


</td></tr>
<tr><td>

[isHierarchicalFilter(filter)](./x-types.ishierarchicalfilter.md)


</td><td>

Type guard to check if a filter is a [HierarchicalFilter](./x-types.hierarchicalfilter.md)<!-- -->.


</td></tr>
<tr><td>

[isNumberRangeFacet(facet)](./x-types.isnumberrangefacet.md)


</td><td>

Type guard to check if a facet is an [NumberRangeFacet](./x-types.numberrangefacet.md)<!-- -->.


</td></tr>
<tr><td>

[isNumberRangeFilter(filter)](./x-types.isnumberrangefilter.md)


</td><td>

Type guard to check if a filter is a [NumberRangeFilter](./x-types.numberrangefilter.md)<!-- -->.


</td></tr>
<tr><td>

[isRawFilter(filter)](./x-types.israwfilter.md)


</td><td>

Type guard to check if a filter is a [RawFilter](./x-types.rawfilter.md)<!-- -->.


</td></tr>
<tr><td>

[isSimpleFacet(facet)](./x-types.issimplefacet.md)


</td><td>

Type guard to check if a facet is an [SimpleFacet](./x-types.simplefacet.md)<!-- -->.


</td></tr>
<tr><td>

[isSimpleFilter(filter)](./x-types.issimplefilter.md)


</td><td>

Type guard to check if a filter is a [SimpleFilter](./x-types.simplefilter.md)<!-- -->.


</td></tr>
</tbody></table>

## Interfaces

<table><thead><tr><th>

Interface


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[AiQuestion](./x-types.aiquestion.md)


</td><td>

A question is an entity generated by the AI. It contains the question text, the response text and the search queries.


</td></tr>
<tr><td>

[AiQuestionsRequest](./x-types.aiquestionsrequest.md)


</td><td>

Request for the question endpoint.


</td></tr>
<tr><td>

[AiQuestionsResponse](./x-types.aiquestionsresponse.md)


</td><td>

Response for the question endpoint.


</td></tr>
<tr><td>

[AiSuggestionSearch](./x-types.aisuggestionsearch.md)


</td><td>

Each suggestion search is a query and the results of that query.


</td></tr>
<tr><td>

[AiSuggestionsRequest](./x-types.aisuggestionsrequest.md)


</td><td>

Request for the ai suggestions endpoint.


</td></tr>
<tr><td>

[AiSuggestionsSearchRequest](./x-types.aisuggestionssearchrequest.md)


</td><td>

Request for the suggestions-search endpoint.


</td></tr>
<tr><td>

[AiSuggestionsSearchResponse](./x-types.aisuggestionssearchresponse.md)


</td><td>

Response for the AI suggestions search endpoint.


</td></tr>
<tr><td>

[AiTasksRequest](./x-types.aitasksrequest.md)


</td><td>

Request for the task endpoint.


</td></tr>
<tr><td>

[AiTasksResponse](./x-types.aitasksresponse.md)


</td><td>

Response for the task endpoint.


</td></tr>
<tr><td>

[Banner](./x-types.banner.md)


</td><td>

A banner is an image with a title, that when clicked redirect the user to an URL. Often it is represented as a 100% wide element that appears on top of the results inside the grid or between rows.


</td></tr>
<tr><td>

[BooleanFilter](./x-types.booleanfilter.md)


</td><td>

A boolean filter used in a [FacetFilter](./x-types.facetfilter.md)<!-- -->, which status can be selected or not and it may contains the total results number that the filter should return.


</td></tr>
<tr><td>

[EditableNumberRangeFacet](./x-types.editablenumberrangefacet.md)


</td><td>

Editable Number Range Facet is a trait for filtering results using user editable [RangeValue](./x-types.rangevalue.md)<!-- -->.Editable means that the value max and min can be changed by the user instead of havingseveral boolean filters with different values. It extends from [Facet](./x-types.facet.md)<!-- -->,changes the modelName and uses [EditableNumberRangeFilter](./x-types.editablenumberrangefilter.md) as filters.


</td></tr>
<tr><td>

[EditableNumberRangeFilter](./x-types.editablenumberrangefilter.md)


</td><td>

A type of filter used in [EditableNumberRangeFacet](./x-types.editablenumberrangefacet.md) and extends from [FacetFilter](./x-types.facetfilter.md)<!-- -->. This filter has the particularity that its [RangeValue](./x-types.rangevalue.md) is editable by the user. Editable means that the value max and min can be changed by the user instead of having several boolean filters with different values.


</td></tr>
<tr><td>

[ExperienceControlsRequest](./x-types.experiencecontrolsrequest.md)


</td><td>

Request for Experience Controls endpoint.


</td></tr>
<tr><td>

[ExperienceControlsResponse](./x-types.experiencecontrolsresponse.md)


</td><td>

Response for the experience controls endpoint.


</td></tr>
<tr><td>

[ExtraParamsRequest](./x-types.extraparamsrequest.md)


</td><td>

Interface to support extra params in any request.


</td></tr>
<tr><td>

[Facet](./x-types.facet.md)


</td><td>

Facet is a trait for filtering results. It uses [Filter](./x-types.filter.md) as filters.


</td></tr>
<tr><td>

[FacetFilter](./x-types.facetfilter.md)


</td><td>

A filter which is associated with a [Facet](./x-types.facet.md)<!-- -->.


</td></tr>
<tr><td>

[FacetsRequest](./x-types.facetsrequest.md)


</td><td>

The Request for the Facets endpoint.


</td></tr>
<tr><td>

[FacetsResponse](./x-types.facetsresponse.md)


</td><td>

Response for the facet endpoint.


</td></tr>
<tr><td>

[Filter](./x-types.filter.md)


</td><td>

A basic filter.


</td></tr>
<tr><td>

[FilterableRequest](./x-types.filterablerequest.md)


</td><td>

Interface for any Request with a `filters` parameter.


</td></tr>
<tr><td>

[HierarchicalFacet](./x-types.hierarchicalfacet.md)


</td><td>

Hierarchical facet is a trait for filtering results. It extends from [Facet](./x-types.facet.md) changes the modelName and uses [HierarchicalFilter](./x-types.hierarchicalfilter.md) as filters.


</td></tr>
<tr><td>

[HierarchicalFilter](./x-types.hierarchicalfilter.md)


</td><td>

A type of filter used in [HierarchicalFacet](./x-types.hierarchicalfacet.md) and extends from [BooleanFilter](./x-types.booleanfilter.md)<!-- -->. This filter has the particularity that it has recursive children.


</td></tr>
<tr><td>

[HistoryQuery](./x-types.historyquery.md)


</td><td>

Represents a query that has been made by the user.


</td></tr>
<tr><td>

[Identifiable](./x-types.identifiable.md)


</td><td>

Represents an Object with id property.


</td></tr>
<tr><td>

[IdentifierResultsRequest](./x-types.identifierresultsrequest.md)


</td><td>

Request for Identifier Results endpoint.


</td></tr>
<tr><td>

[IdentifierResultsResponse](./x-types.identifierresultsresponse.md)


</td><td>

Response for the identifier results endpoint.


</td></tr>
<tr><td>

[NamedModel](./x-types.namedmodel.md)


</td><td>

Common interface to ease the differentiate between different model types.


</td></tr>
<tr><td>

[NextQueries](./x-types.nextqueries.md)


</td><td>

A group of next queries.


</td></tr>
<tr><td>

[NextQueriesRequest](./x-types.nextqueriesrequest.md)


</td><td>

Request for Next Queries endpoint.


</td></tr>
<tr><td>

[NextQueriesResponse](./x-types.nextqueriesresponse.md)


</td><td>

Response for the next queries endpoint.


</td></tr>
<tr><td>

[NextQuery](./x-types.nextquery.md)


</td><td>

A next query is a suggestion of a new query that the user may be interested after searching for an specific term.


</td></tr>
<tr><td>

[NumberRangeFacet](./x-types.numberrangefacet.md)


</td><td>

Number Range Facet is a trait for filtering results. It extends from [Facet](./x-types.facet.md)<!-- -->, changes the modelName and uses [NumberRangeFilter](./x-types.numberrangefilter.md) as filters.


</td></tr>
<tr><td>

[NumberRangeFilter](./x-types.numberrangefilter.md)


</td><td>

A type of filter used in [NumberRangeFacet](./x-types.numberrangefacet.md) and extends from [BooleanFilter](./x-types.booleanfilter.md)<!-- -->. This filter has the particularity that its range property is an object with a range of numbers. The difference with [EditableNumberRangeFilter](./x-types.editablenumberrangefilter.md) is that range's values are not editable. There are different NumberRangeFilters within the facet to cover different predefined range options.


</td></tr>
<tr><td>

[PageableRequest](./x-types.pageablerequest.md)


</td><td>

Interface for any Request which supports pagination.


</td></tr>
<tr><td>

[PartialResult](./x-types.partialresult.md)


</td><td>

A partial result represents a sub-query of a user search term which normally has not enough results (or not results at all). It includes a preview of these results and the number of total results that match against the sub-query.


</td></tr>
<tr><td>

[PopularSearchesRequest](./x-types.popularsearchesrequest.md)


</td><td>

Request for Popular Searches endpoint.


</td></tr>
<tr><td>

[PopularSearchesResponse](./x-types.popularsearchesresponse.md)


</td><td>

Response for the popular searches endpoint.


</td></tr>
<tr><td>

[Previewable](./x-types.previewable.md)


</td><td>

Represents an item that is searchable, and the results associated to it.


</td></tr>
<tr><td>

[PreviewResults](./x-types.previewresults.md)


</td><td>

Interface to type the query preview objects.


</td></tr>
<tr><td>

[Promoted](./x-types.promoted.md)


</td><td>

A promoted is an image with a title, that when clicked redirect the user to an URL. Often it is represented taking up the same space than a normal result.


</td></tr>
<tr><td>

[QueryableRequest](./x-types.queryablerequest.md)


</td><td>

Interface for any Request with a `query` parameter.


</td></tr>
<tr><td>

[QuerySuggestionsRequest](./x-types.querysuggestionsrequest.md)


</td><td>

Request for Query Suggestions endpoint.


</td></tr>
<tr><td>

[QuerySuggestionsResponse](./x-types.querysuggestionsresponse.md)


</td><td>

Response for the query suggestions endpoint.


</td></tr>
<tr><td>

[RangeValue](./x-types.rangevalue.md)


</td><td>

A numeric range filter value.


</td></tr>
<tr><td>

[RawFilter](./x-types.rawfilter.md)


</td><td>

A filter which id is the value of the filter. It can be selected or not.


</td></tr>
<tr><td>

[RecommendationsRequest](./x-types.recommendationsrequest.md)


</td><td>

Request for Recommendations endpoint.


</td></tr>
<tr><td>

[RecommendationsResponse](./x-types.recommendationsresponse.md)


</td><td>

Response for the recommendations endpoint.


</td></tr>
<tr><td>

[Redirection](./x-types.redirection.md)


</td><td>

A redirection (AKA Direct Link) is simply a URL. Normally, the user is just redirected to it after making a query that matches the configuration of this URL. In other cases it is shown as a button that the user can click, and which will trigger the redirect action.


</td></tr>
<tr><td>

[RelatedPrompt](./x-types.relatedprompt.md)


</td><td>

Represents a related prompt.


</td></tr>
<tr><td>

[RelatedPromptNextQuery](./x-types.relatedpromptnextquery.md)


</td><td>

Represents a related prompt nextQuery.


</td></tr>
<tr><td>

[RelatedPromptsRequest](./x-types.relatedpromptsrequest.md)


</td><td>

Request for Related Prompts endpoint.


</td></tr>
<tr><td>

[RelatedPromptsResponse](./x-types.relatedpromptsresponse.md)


</td><td>

Response for the related prompts endpoint.


</td></tr>
<tr><td>

[RelatedTag](./x-types.relatedtag.md)


</td><td>

A related tag is just a term that refines the current query.


</td></tr>
<tr><td>

[RelatedTagsRequest](./x-types.relatedtagsrequest.md)


</td><td>

Request for Related Tags endpoint.


</td></tr>
<tr><td>

[RelatedTagsResponse](./x-types.relatedtagsresponse.md)


</td><td>

Response for the related tags endpoint.


</td></tr>
<tr><td>

[Result](./x-types.result.md)


</td><td>

A search result.


</td></tr>
<tr><td>

[ResultIdentifier](./x-types.resultidentifier.md)


</td><td>

The client result identifier (SKU, MOCACO, a simple ID...).


</td></tr>
<tr><td>

[ResultPrice](./x-types.resultprice.md)


</td><td>

The result price.


</td></tr>
<tr><td>

[ResultRating](./x-types.resultrating.md)


</td><td>

The result rating.


</td></tr>
<tr><td>

[ResultVariant](./x-types.resultvariant.md)


</td><td>

A result variant.


</td></tr>
<tr><td>

[SearchRequest](./x-types.searchrequest.md)


</td><td>

The Request for the Search endpoint.


</td></tr>
<tr><td>

[SearchResponse](./x-types.searchresponse.md)


</td><td>

Response for the search endpoint.


</td></tr>
<tr><td>

[SemanticQueriesRequest](./x-types.semanticqueriesrequest.md)


</td><td>

Request for the SemanticQueriesEndpoint.


</td></tr>
<tr><td>

[SemanticQueriesResponse](./x-types.semanticqueriesresponse.md)


</td><td>

Response for the semantic queries endpoint.


</td></tr>
<tr><td>

[SemanticQuery](./x-types.semanticquery.md)


</td><td>

A semantic query is a term related to another in a semantic way.


</td></tr>
<tr><td>

[SimpleFacet](./x-types.simplefacet.md)


</td><td>

Simple facet is a trait for filtering results. It extends from [Facet](./x-types.facet.md)<!-- -->, changes the modelName and uses [SimpleFilter](./x-types.simplefilter.md) as filters.


</td></tr>
<tr><td>

[SimpleFilter](./x-types.simplefilter.md)


</td><td>

A type of filter used in [SimpleFacet](./x-types.simplefacet.md) and extends from [Filter](./x-types.filter.md)<!-- -->. It can be selected or not.


</td></tr>
<tr><td>

[SortableRequest](./x-types.sortablerequest.md)


</td><td>

Interface for any Request with sorting.


</td></tr>
<tr><td>

[Stats](./x-types.stats.md)


</td><td>

Statistics for the current search results.

Price - interval of the prices of the results.


</td></tr>
<tr><td>

[StepEmpathising](./x-types.stepempathising.md)


</td><td>

Model for each step of the empathising task.


</td></tr>
<tr><td>

[Suggestion](./x-types.suggestion.md)


</td><td>

A suggestion represents a query that has been proposed to the user, due of being popular, matching with the current search query...


</td></tr>
<tr><td>

[Taggable](./x-types.taggable.md)


</td><td>

A taggable entity.


</td></tr>
<tr><td>

[Tagging](./x-types.tagging.md)


</td><td>

The tagging user actions.


</td></tr>
<tr><td>

[TaggingRequest](./x-types.taggingrequest.md)


</td><td>

The request for the tagging API.


</td></tr>
<tr><td>

[TrackableRequest](./x-types.trackablerequest.md)


</td><td>

Interface for any Request with tagging.


</td></tr>
<tr><td>

[TrackableShowResponse](./x-types.trackableshowresponse.md)


</td><td>

Response to be implemented by all responses that contain a part to track the show event.


</td></tr>
<tr><td>

[UserInfo](./x-types.userinfo.md)


</td><td>

The representation of the user.


</td></tr>
<tr><td>

[XComponentsAdapter](./x-types.xcomponentsadapter.md)


</td><td>

XComponentsAdapter.


</td></tr>
</tbody></table>

## Variables

<table><thead><tr><th>

Variable


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[BannerSchema](./x-types.bannerschema.md)


</td><td>

Jest schema for validating Banner entities.


</td></tr>
<tr><td>

[BooleanFilterModelNames](./x-types.booleanfiltermodelnames.md)


</td><td>

Const to use in the [BooleanFilterModelName](./x-types.booleanfiltermodelname.md) Type definition and also in Type Guards.


</td></tr>
<tr><td>

[BooleanFilterSchema](./x-types.booleanfilterschema.md)


</td><td>

Jest schema for validating BooleanFilter entities.


</td></tr>
<tr><td>

[EditableNumberRangeFacetSchema](./x-types.editablenumberrangefacetschema.md)


</td><td>

Jest schema for validating EditableNumberRangeFacet entity.


</td></tr>
<tr><td>

[EditableNumberRangeFilterSchema](./x-types.editablenumberrangefilterschema.md)


</td><td>

Jest schema for validating EditableNumberRangeFilterSchema entity.


</td></tr>
<tr><td>

[FacetFilterSchema](./x-types.facetfilterschema.md)


</td><td>

Jest schema for validating FacetFilter entities.


</td></tr>
<tr><td>

[FacetSchema](./x-types.facetschema.md)


</td><td>

Jest schema for validating Facet entities.


</td></tr>
<tr><td>

[FilterSchema](./x-types.filterschema.md)


</td><td>

Jest schema for validating Filter entities.


</td></tr>
<tr><td>

[HierarchicalFacetSchema](./x-types.hierarchicalfacetschema.md)


</td><td>

Jest schema for validating HierarchicalFacet entity.


</td></tr>
<tr><td>

[HierarchicalFilterSchema](./x-types.hierarchicalfilterschema.md)


</td><td>

Jest schema for validating HierarchicalFilter entity.


</td></tr>
<tr><td>

[HistoryQuerySchema](./x-types.historyqueryschema.md)


</td><td>

Jest schema for validating Next query entities.


</td></tr>
<tr><td>

[NextQuerySchema](./x-types.nextqueryschema.md)


</td><td>

Jest schema for validating Next query entities.


</td></tr>
<tr><td>

[NumberRangeFacetSchema](./x-types.numberrangefacetschema.md)


</td><td>

Jest schema for validating NumberRangeFacet entity.


</td></tr>
<tr><td>

[NumberRangeFilterSchema](./x-types.numberrangefilterschema.md)


</td><td>

Jest schema for validating NumberRangeFilter entity.


</td></tr>
<tr><td>

[PromotedSchema](./x-types.promotedschema.md)


</td><td>

Jest schema for validating Promoted entities.


</td></tr>
<tr><td>

[RawFilterSchema](./x-types.rawfilterschema.md)


</td><td>

Jest schema for validating RawFilter entities.


</td></tr>
<tr><td>

[RecommendationSchema](./x-types.recommendationschema.md)


</td><td>

Jest schema for validating Recommendation (AKA Result) entities.


</td></tr>
<tr><td>

[RedirectionSchema](./x-types.redirectionschema.md)


</td><td>

Jest schema for validating Redirection entities.


</td></tr>
<tr><td>

[RelatedTagSchema](./x-types.relatedtagschema.md)


</td><td>

Jest schema for validating Related Tag entities.


</td></tr>
<tr><td>

[ResultSchema](./x-types.resultschema.md)


</td><td>

Jest schema for validating Result entities.


</td></tr>
<tr><td>

[SemanticQuerySchema](./x-types.semanticqueryschema.md)


</td><td>

Jest schema for validating SemanticQuery entities.


</td></tr>
<tr><td>

[SimpleFacetSchema](./x-types.simplefacetschema.md)


</td><td>

Jest schema for validating SimpleFacet entity.


</td></tr>
<tr><td>

[SimpleFilterSchema](./x-types.simplefilterschema.md)


</td><td>

Jest schema for validating SimpleFilter entity.


</td></tr>
<tr><td>

[SuggestionSchema](./x-types.suggestionschema.md)


</td><td>

Jest schema for validating Suggestion entities.


</td></tr>
<tr><td>

[TaggableSchema](./x-types.taggableschema.md)


</td><td>

Jest schema for validating Taggable entities.


</td></tr>
<tr><td>

[TaggingRequestSchema](./x-types.taggingrequestschema.md)


</td><td>

Jest schema for validating TaggingRequest entities.


</td></tr>
<tr><td>

[TaggingSchema](./x-types.taggingschema.md)


</td><td>

Jest schema for validating Tagging entities.


</td></tr>
</tbody></table>

## Type Aliases

<table><thead><tr><th>

Type Alias


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[BooleanFilterModelName](./x-types.booleanfiltermodelname.md)


</td><td>

Type to ease the usage of a model name in a [BooleanFilter](./x-types.booleanfilter.md) with autocomplete suggestions.


</td></tr>
<tr><td>

[FacetModelName](./x-types.facetmodelname.md)


</td><td>

Facets model names type. It can be: SimpleFacet, HierarchicalFacet, NumberRangeFacet or EditableNumberRangeFacet.


</td></tr>
<tr><td>

[FilterModelName](./x-types.filtermodelname.md)


</td><td>

Filters model names type. It can be: [BooleanFilterModelName](./x-types.booleanfiltermodelname.md)<!-- -->, RawFilter or EditableNumberRangeFilter.


</td></tr>
<tr><td>

[ModelNameType](./x-types.modelnametype.md)


</td><td>

Type to ease the usage of the ModelNames interface with autocomplete suggestions.


</td></tr>
<tr><td>

[Sort](./x-types.sort.md)


</td><td>

The Sort model represents a way of arranging a list of items.


</td></tr>
</tbody></table>

