<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [FacetsService](./x-components.facetsservice.md)

## FacetsService interface

Service to manipulate the filters.

**Signature:**

```typescript
export interface FacetsService 
```

## Methods

|  Method | Description |
|  --- | --- |
|  [clearFilters(facetIds, metadata)](./x-components.facetsservice.clearfilters.md) | Deselects the selected filters. |
|  [clearFiltersWithMetadata(payload)](./x-components.facetsservice.clearfilterswithmetadata.md) | Deselects the selected filters. This is intended to be used from the wiring where currently we can only provide one argument. |
|  [deselect(filter, metadata)](./x-components.facetsservice.deselect.md) | Deselects filter, adding it to the store if it was not present. |
|  [select(filter)](./x-components.facetsservice.select.md) | Selects filter/filters, adding it/them to the store if it/they was not present. |
|  [selectPreselectedFilters()](./x-components.facetsservice.selectpreselectedfilters.md) | Selects preselected filter/filters, adding it/them to the store if it/they are not present. |
|  [setFacets(facetsGroup)](./x-components.facetsservice.setfacets.md) | Sets the facets of the group. This method just replaces the facets, and keeps the given facet's filters selected state as it is. |
|  [setQuery(query)](./x-components.facetsservice.setquery.md) | Sets the query. |
|  [toggle(filter)](./x-components.facetsservice.toggle.md) | Selects a deselected filter, and deselects a selected filter, adding them to the store in both cases. |
|  [updateFacets(facetsGroup)](./x-components.facetsservice.updatefacets.md) | Replaces the facets of the group with the new ones. It ignores the provided filters selected state, replacing it with the previous selected filter. |
|  [updatePreselectedFilters(filters)](./x-components.facetsservice.updatepreselectedfilters.md) | Replaces the preselected filters with the new ones. |

