<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [HistoryQueriesActions](./x-components.historyqueriesactions.md)

## HistoryQueriesActions interface

HistoryQueries store actions.

**Signature:**

```typescript
export interface HistoryQueriesActions 
```

## Properties

<table><thead><tr><th>

Property


</th><th>

Modifiers


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[addQueryToHistory](./x-components.historyqueriesactions.addquerytohistory.md)


</td><td>


</td><td>

(query: string) =&gt; void


</td><td>

Saves a query to the history, synchronizing it with the browser storage. There are 3 possible cases.


</td></tr>
<tr><td>

[loadHistoryQueriesFromBrowserStorage](./x-components.historyqueriesactions.loadhistoryqueriesfrombrowserstorage.md)


</td><td>


</td><td>

() =&gt; void


</td><td>

Loads the [historyQueries](./x-components.historyqueriesstate.historyqueries.md) property from the browser storage.


</td></tr>
<tr><td>

[refreshSession](./x-components.historyqueriesactions.refreshsession.md)


</td><td>


</td><td>

() =&gt; void


</td><td>

Refreshes the current search session, updating its TTL.


</td></tr>
<tr><td>

[removeFromHistory](./x-components.historyqueriesactions.removefromhistory.md)


</td><td>


</td><td>

(historyQuery: HistoryQuery) =&gt; void


</td><td>

Removes a single query from the history, synchronizing it with the browser storage.


</td></tr>
<tr><td>

[setHistoryQueries](./x-components.historyqueriesactions.sethistoryqueries.md)


</td><td>


</td><td>

(historyQueries: HistoryQuery\[\]) =&gt; void


</td><td>

Sets the history queries, synchronizing them with the browser storage. It also removes the oldest query if the history queries length is bigger than the [HistoryQueriesConfig.maxItemsToStore](./x-components.historyqueriesconfig.maxitemstostore.md)<!-- -->.


</td></tr>
<tr><td>

[setUrlParams](./x-components.historyqueriesactions.seturlparams.md)


</td><td>


</td><td>

(urlParams: [UrlParams](./x-components.urlparams.md)<!-- -->) =&gt; void


</td><td>

Checks if the url has a query on it and then updates the state with that value.


</td></tr>
<tr><td>

[toggleHistoryQueries](./x-components.historyqueriesactions.togglehistoryqueries.md)


</td><td>


</td><td>

(isEnabled: boolean) =&gt; void


</td><td>

Toggles the history queries and stores the state in the browser storage. It also cleans the history queries when disabling them.


</td></tr>
<tr><td>

[updateHistoryQueriesWithSearchResponse](./x-components.historyqueriesactions.updatehistoryquerieswithsearchresponse.md)


</td><td>


</td><td>

(searchResponse: [InternalSearchResponse](./x-components.internalsearchresponse.md)<!-- -->) =&gt; void


</td><td>

Updates the history queries with the relevant info included in a search response.


</td></tr>
</tbody></table>

