<!-- 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 
```

## Properties

|  Property | Modifiers | Type | Description |
|  --- | --- | --- | --- |
|  [clearFilters](./x-components.facetsservice.clearfilters.md) |  | (facetIds?: Array&lt;Facet\['id'\]&gt;, metadata?: [FiltersMetadata](./x-components.filtersmetadata.md)<!-- -->) =&gt; void | Deselects the selected filters. |
|  [clearFiltersWithMetadata](./x-components.facetsservice.clearfilterswithmetadata.md) |  | (payload?: { facetIds?: Array&lt;Facet\['id'\]&gt;; metadata?: [FiltersMetadata](./x-components.filtersmetadata.md)<!-- -->; }) =&gt; void | Deselects the selected filters. This is intended to be used from the wiring where currently we can only provide one argument. |
|  [deselect](./x-components.facetsservice.deselect.md) |  | (filter: Filter, metadata?: [FiltersMetadata](./x-components.filtersmetadata.md)<!-- -->) =&gt; void | Deselects filter, adding it to the store if it was not present. |
|  [select](./x-components.facetsservice.select.md) |  | (filter: Filter \| Filter\[\]) =&gt; void | Selects filter/filters, adding it/them to the store if it/they was not present. |
|  [selectPreselectedFilters](./x-components.facetsservice.selectpreselectedfilters.md) |  | () =&gt; void | Selects preselected filter/filters, adding it/them to the store if it/they are not present. |
|  [setFacets](./x-components.facetsservice.setfacets.md) |  | (facetsGroup: [FacetsGroup](./x-components.facetsgroup.md)<!-- -->) =&gt; void | 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](./x-components.facetsservice.setquery.md) |  | (query: string) =&gt; void | Sets the query. |
|  [toggle](./x-components.facetsservice.toggle.md) |  | (filter: Filter) =&gt; void | Selects a deselected filter, and deselects a selected filter, adding them to the store in both cases. |
|  [updateFacets](./x-components.facetsservice.updatefacets.md) |  | (facetsGroup: [FacetsGroup](./x-components.facetsgroup.md)<!-- -->) =&gt; void | 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](./x-components.facetsservice.updatepreselectedfilters.md) |  | (filters: Filter\[\]) =&gt; void | Replaces the preselected filters with the new ones. |

