@empathyco/x-components
Version:
Empathy X Components
192 lines (83 loc) • 3.09 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [SearchActions](./x-components.searchactions.md)
## SearchActions interface
Search store actions.
**Signature:**
```typescript
export interface SearchActions
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[cancelFetchAndSaveSearchResponse](./x-components.searchactions.cancelfetchandsavesearchresponse.md)
</td><td>
</td><td>
() => void
</td><td>
Cancels / interrupt [SearchActions.fetchAndSaveSearchResponse](./x-components.searchactions.fetchandsavesearchresponse.md) synchronous promise.
</td></tr>
<tr><td>
[fetchAndSaveSearchResponse](./x-components.searchactions.fetchandsavesearchresponse.md)
</td><td>
</td><td>
(request: [InternalSearchRequest](./x-components.internalsearchrequest.md) \| null) => void
</td><td>
Fetches a new search response and stores them in the module state.
</td></tr>
<tr><td>
[fetchSearchResponse](./x-components.searchactions.fetchsearchresponse.md)
</td><td>
</td><td>
(request: SearchRequest) => SearchResponse
</td><td>
Fetches the search response and returns them.
</td></tr>
<tr><td>
[increasePageAppendingResults](./x-components.searchactions.increasepageappendingresults.md)
</td><td>
</td><td>
() => void
</td><td>
Checks if there are more pages of results to load. If there are, then increases the page number in state and set to `true` the [SearchState.isAppendResults](./x-components.searchstate.isappendresults.md) flag.
</td></tr>
<tr><td>
[resetRequestOnRefinement](./x-components.searchactions.resetrequestonrefinement.md)
</td><td>
</td><td>
(watchedRequest: [WatchedInternalSearchRequest](./x-components.watchedinternalsearchrequest.md)<!-- -->) => void
</td><td>
Batches state resets in a single action after [SearchGetters.request](./x-components.searchgetters.request.md) parameters update.
</td></tr>
<tr><td>
[saveOrigin](./x-components.searchactions.saveorigin.md)
</td><td>
</td><td>
(originInit: [QueryOriginInit](./x-components.queryorigininit.md)<!-- -->) => void
</td><td>
Creates a [QueryOrigin](./x-components.queryorigin.md) and saves it.
</td></tr>
<tr><td>
[saveSearchResponse](./x-components.searchactions.savesearchresponse.md)
</td><td>
</td><td>
(response: SearchResponse) => void
</td><td>
Saves the [SearchResponse](./x-types.searchresponse.md)<!-- -->.
</td></tr>
<tr><td>
[setUrlParams](./x-components.searchactions.seturlparams.md)
</td><td>
</td><td>
(urlParams: [UrlParams](./x-components.urlparams.md)<!-- -->) => void
</td><td>
Checks if the url has params on it and then updates the state with these values.
</td></tr>
</tbody></table>