@empathyco/x-components
Version:
Empathy X Components
154 lines (139 loc) • 17.2 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@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
| Function | Description |
| --- | --- |
| [isBooleanFilter(filter)](./x-types.isbooleanfilter.md) | Type guard to check if a filter is a [BooleanFilter](./x-types.booleanfilter.md)<!-- -->. |
| [isEditableNumberRangeFacet(facet)](./x-types.iseditablenumberrangefacet.md) | Type guard to check if a facet is an [EditableNumberRangeFacet](./x-types.editablenumberrangefacet.md)<!-- -->. |
| [isEditableNumberRangeFilter(filter)](./x-types.iseditablenumberrangefilter.md) | Type guard to check if a filter is an [EditableNumberRangeFilter](./x-types.editablenumberrangefilter.md)<!-- -->. |
| [isFacetFilter(filter)](./x-types.isfacetfilter.md) | Type guard to check if a filter is a [FacetFilter](./x-types.facetfilter.md)<!-- -->. |
| [isHierarchicalFacet(facet)](./x-types.ishierarchicalfacet.md) | Type guard to check if a facet is an [HierarchicalFacet](./x-types.hierarchicalfacet.md)<!-- -->. |
| [isHierarchicalFilter(filter)](./x-types.ishierarchicalfilter.md) | Type guard to check if a filter is a [HierarchicalFilter](./x-types.hierarchicalfilter.md)<!-- -->. |
| [isNumberRangeFacet(facet)](./x-types.isnumberrangefacet.md) | Type guard to check if a facet is an [NumberRangeFacet](./x-types.numberrangefacet.md)<!-- -->. |
| [isNumberRangeFilter(filter)](./x-types.isnumberrangefilter.md) | Type guard to check if a filter is a [NumberRangeFilter](./x-types.numberrangefilter.md)<!-- -->. |
| [isRawFilter(filter)](./x-types.israwfilter.md) | Type guard to check if a filter is a [RawFilter](./x-types.rawfilter.md)<!-- -->. |
| [isSimpleFacet(facet)](./x-types.issimplefacet.md) | Type guard to check if a facet is an [SimpleFacet](./x-types.simplefacet.md)<!-- -->. |
| [isSimpleFilter(filter)](./x-types.issimplefilter.md) | Type guard to check if a filter is a [SimpleFilter](./x-types.simplefilter.md)<!-- -->. |
## Interfaces
| Interface | Description |
| --- | --- |
| [AiQuestion](./x-types.aiquestion.md) | A question is an entity generated by the AI. It contains the question text, the response text and the search queries. |
| [AiQuestionsRequest](./x-types.aiquestionsrequest.md) | Request for the question endpoint. |
| [AiQuestionsResponse](./x-types.aiquestionsresponse.md) | Response for the question endpoint. |
| [AiSuggestionSearch](./x-types.aisuggestionsearch.md) | Each suggestion search is a query and the results of that query. |
| [AiSuggestionsRequest](./x-types.aisuggestionsrequest.md) | Request for the ai suggestions endpoint. |
| [AiSuggestionsSearchRequest](./x-types.aisuggestionssearchrequest.md) | Request for the suggestions-search endpoint. |
| [AiSuggestionsSearchResponse](./x-types.aisuggestionssearchresponse.md) | Response for the AI suggestions search endpoint. |
| [AiTasksRequest](./x-types.aitasksrequest.md) | Request for the task endpoint. |
| [AiTasksResponse](./x-types.aitasksresponse.md) | Response for the task endpoint. |
| [Banner](./x-types.banner.md) | 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. |
| [BooleanFilter](./x-types.booleanfilter.md) | 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. |
| [EditableNumberRangeFacet](./x-types.editablenumberrangefacet.md) | 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. |
| [EditableNumberRangeFilter](./x-types.editablenumberrangefilter.md) | 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. |
| [ExperienceControlsRequest](./x-types.experiencecontrolsrequest.md) | Request for Experience Controls endpoint. |
| [ExperienceControlsResponse](./x-types.experiencecontrolsresponse.md) | Response for the experience controls endpoint. |
| [ExtraParamsRequest](./x-types.extraparamsrequest.md) | Interface to support extra params in any request. |
| [Facet](./x-types.facet.md) | Facet is a trait for filtering results. It uses [Filter](./x-types.filter.md) as filters. |
| [FacetFilter](./x-types.facetfilter.md) | A filter which is associated with a [Facet](./x-types.facet.md)<!-- -->. |
| [Filter](./x-types.filter.md) | A basic filter. |
| [FilterableRequest](./x-types.filterablerequest.md) | Interface for any Request with a <code>filters</code> parameter. |
| [HierarchicalFacet](./x-types.hierarchicalfacet.md) | 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. |
| [HierarchicalFilter](./x-types.hierarchicalfilter.md) | 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. |
| [HistoryQuery](./x-types.historyquery.md) | Represents a query that has been made by the user. |
| [Identifiable](./x-types.identifiable.md) | Represents an Object with id property. |
| [IdentifierResultsRequest](./x-types.identifierresultsrequest.md) | Request for Identifier Results endpoint. |
| [IdentifierResultsResponse](./x-types.identifierresultsresponse.md) | Response for the identifier results endpoint. |
| [NamedModel](./x-types.namedmodel.md) | Common interface to ease the differentiate between different model types. |
| [NextQueries](./x-types.nextqueries.md) | A group of next queries. |
| [NextQueriesRequest](./x-types.nextqueriesrequest.md) | Request for Next Queries endpoint. |
| [NextQueriesResponse](./x-types.nextqueriesresponse.md) | Response for the next queries endpoint. |
| [NextQuery](./x-types.nextquery.md) | A next query is a suggestion of a new query that the user may be interested after searching for an specific term. |
| [NumberRangeFacet](./x-types.numberrangefacet.md) | 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. |
| [NumberRangeFilter](./x-types.numberrangefilter.md) | 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. |
| [PageableRequest](./x-types.pageablerequest.md) | Interface for any Request which supports pagination. |
| [PartialResult](./x-types.partialresult.md) | 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. |
| [PopularSearchesRequest](./x-types.popularsearchesrequest.md) | Request for Popular Searches endpoint. |
| [PopularSearchesResponse](./x-types.popularsearchesresponse.md) | Response for the popular searches endpoint. |
| [Previewable](./x-types.previewable.md) | Represents an item that is searchable, and the results associated to it. |
| [PreviewResults](./x-types.previewresults.md) | Interface to type the query preview objects. |
| [Promoted](./x-types.promoted.md) | 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. |
| [QueryableRequest](./x-types.queryablerequest.md) | Interface for any Request with a <code>query</code> parameter. |
| [QuerySuggestionsRequest](./x-types.querysuggestionsrequest.md) | Request for Query Suggestions endpoint. |
| [QuerySuggestionsResponse](./x-types.querysuggestionsresponse.md) | Response for the query suggestions endpoint. |
| [RangeValue](./x-types.rangevalue.md) | A numeric range filter value. |
| [RawFilter](./x-types.rawfilter.md) | A filter which id is the value of the filter. It can be selected or not. |
| [RecommendationsRequest](./x-types.recommendationsrequest.md) | Request for Recommendations endpoint. |
| [RecommendationsResponse](./x-types.recommendationsresponse.md) | Response for the recommendations endpoint. |
| [Redirection](./x-types.redirection.md) | 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. |
| [RelatedPrompt](./x-types.relatedprompt.md) | Represents a related prompt. |
| [RelatedPromptNextQuery](./x-types.relatedpromptnextquery.md) | Represents a related prompt nextQuery. |
| [RelatedPromptsRequest](./x-types.relatedpromptsrequest.md) | Request for Related Prompts endpoint. |
| [RelatedPromptsResponse](./x-types.relatedpromptsresponse.md) | Response for the related prompts endpoint. |
| [RelatedTag](./x-types.relatedtag.md) | A related tag is just a term that refines the current query. |
| [RelatedTagsRequest](./x-types.relatedtagsrequest.md) | Request for Related Tags endpoint. |
| [RelatedTagsResponse](./x-types.relatedtagsresponse.md) | Response for the related tags endpoint. |
| [Result](./x-types.result.md) | A search result. |
| [ResultIdentifier](./x-types.resultidentifier.md) | The client result identifier (SKU, MOCACO, a simple ID...). |
| [ResultPrice](./x-types.resultprice.md) | The result price. |
| [ResultRating](./x-types.resultrating.md) | The result rating. |
| [ResultVariant](./x-types.resultvariant.md) | A result variant. |
| [SearchRequest](./x-types.searchrequest.md) | The Request for the Search endpoint. |
| [SearchResponse](./x-types.searchresponse.md) | Response for the search endpoint. |
| [SemanticQueriesRequest](./x-types.semanticqueriesrequest.md) | Request for the SemanticQueriesEndpoint. |
| [SemanticQueriesResponse](./x-types.semanticqueriesresponse.md) | Response for the semantic queries endpoint. |
| [SemanticQuery](./x-types.semanticquery.md) | A semantic query is a term related to another in a semantic way. |
| [SimpleFacet](./x-types.simplefacet.md) | 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. |
| [SimpleFilter](./x-types.simplefilter.md) | 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. |
| [SortableRequest](./x-types.sortablerequest.md) | Interface for any Request with sorting. |
| [Stats](./x-types.stats.md) | <p>Statistics for the current search results.</p><p>Price - interval of the prices of the results.</p> |
| [StepEmpathising](./x-types.stepempathising.md) | Model for each step of the empathising task. |
| [Suggestion](./x-types.suggestion.md) | A suggestion represents a query that has been proposed to the user, due of being popular, matching with the current search query... |
| [Taggable](./x-types.taggable.md) | A taggable entity. |
| [Tagging](./x-types.tagging.md) | The tagging user actions. |
| [TaggingRequest](./x-types.taggingrequest.md) | The request for the tagging API. |
| [TrackableRequest](./x-types.trackablerequest.md) | Interface for any Request with tagging. |
| [TrackableShowResponse](./x-types.trackableshowresponse.md) | Response to be implemented by all responses that contain a part to track the show event. |
| [UserInfo](./x-types.userinfo.md) | The representation of the user. |
| [XComponentsAdapter](./x-types.xcomponentsadapter.md) | XComponentsAdapter. |
## Variables
| Variable | Description |
| --- | --- |
| [BannerSchema](./x-types.bannerschema.md) | Jest schema for validating Banner entities. |
| [BooleanFilterModelNames](./x-types.booleanfiltermodelnames.md) | Const to use in the [BooleanFilterModelName](./x-types.booleanfiltermodelname.md) Type definition and also in Type Guards. |
| [BooleanFilterSchema](./x-types.booleanfilterschema.md) | Jest schema for validating BooleanFilter entities. |
| [EditableNumberRangeFacetSchema](./x-types.editablenumberrangefacetschema.md) | Jest schema for validating EditableNumberRangeFacet entity. |
| [EditableNumberRangeFilterSchema](./x-types.editablenumberrangefilterschema.md) | Jest schema for validating EditableNumberRangeFilterSchema entity. |
| [FacetFilterSchema](./x-types.facetfilterschema.md) | Jest schema for validating FacetFilter entities. |
| [FacetSchema](./x-types.facetschema.md) | Jest schema for validating Facet entities. |
| [FilterSchema](./x-types.filterschema.md) | Jest schema for validating Filter entities. |
| [HierarchicalFacetSchema](./x-types.hierarchicalfacetschema.md) | Jest schema for validating HierarchicalFacet entity. |
| [HierarchicalFilterSchema](./x-types.hierarchicalfilterschema.md) | Jest schema for validating HierarchicalFilter entity. |
| [HistoryQuerySchema](./x-types.historyqueryschema.md) | Jest schema for validating Next query entities. |
| [NextQuerySchema](./x-types.nextqueryschema.md) | Jest schema for validating Next query entities. |
| [NumberRangeFacetSchema](./x-types.numberrangefacetschema.md) | Jest schema for validating NumberRangeFacet entity. |
| [NumberRangeFilterSchema](./x-types.numberrangefilterschema.md) | Jest schema for validating NumberRangeFilter entity. |
| [PromotedSchema](./x-types.promotedschema.md) | Jest schema for validating Promoted entities. |
| [RawFilterSchema](./x-types.rawfilterschema.md) | Jest schema for validating RawFilter entities. |
| [RecommendationSchema](./x-types.recommendationschema.md) | Jest schema for validating Recommendation (AKA Result) entities. |
| [RedirectionSchema](./x-types.redirectionschema.md) | Jest schema for validating Redirection entities. |
| [RelatedTagSchema](./x-types.relatedtagschema.md) | Jest schema for validating Related Tag entities. |
| [ResultSchema](./x-types.resultschema.md) | Jest schema for validating Result entities. |
| [SemanticQuerySchema](./x-types.semanticqueryschema.md) | Jest schema for validating SemanticQuery entities. |
| [SimpleFacetSchema](./x-types.simplefacetschema.md) | Jest schema for validating SimpleFacet entity. |
| [SimpleFilterSchema](./x-types.simplefilterschema.md) | Jest schema for validating SimpleFilter entity. |
| [SuggestionSchema](./x-types.suggestionschema.md) | Jest schema for validating Suggestion entities. |
| [TaggableSchema](./x-types.taggableschema.md) | Jest schema for validating Taggable entities. |
| [TaggingRequestSchema](./x-types.taggingrequestschema.md) | Jest schema for validating TaggingRequest entities. |
| [TaggingSchema](./x-types.taggingschema.md) | Jest schema for validating Tagging entities. |
## Type Aliases
| Type Alias | Description |
| --- | --- |
| [BooleanFilterModelName](./x-types.booleanfiltermodelname.md) | Type to ease the usage of a model name in a [BooleanFilter](./x-types.booleanfilter.md) with autocomplete suggestions. |
| [FacetModelName](./x-types.facetmodelname.md) | Facets model names type. It can be: SimpleFacet, HierarchicalFacet, NumberRangeFacet or EditableNumberRangeFacet. |
| [FilterModelName](./x-types.filtermodelname.md) | Filters model names type. It can be: [BooleanFilterModelName](./x-types.booleanfiltermodelname.md)<!-- -->, RawFilter or EditableNumberRangeFilter. |
| [ModelNameType](./x-types.modelnametype.md) | Type to ease the usage of the ModelNames interface with autocomplete suggestions. |
| [Sort](./x-types.sort.md) | The Sort model represents a way of arranging a list of items. |