@empathyco/x-components
Version:
Empathy X Components
173 lines (75 loc) • 2.9 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [NextQueriesActions](./x-components.nextqueriesactions.md)
## NextQueriesActions interface
Next queries module actions.
**Signature:**
```typescript
export interface NextQueriesActions
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[cancelFetchAndSaveNextQueries](./x-components.nextqueriesactions.cancelfetchandsavenextqueries.md)
</td><td>
</td><td>
() => void
</td><td>
Cancels / interrupt [NextQueriesActions.fetchAndSaveNextQueries](./x-components.nextqueriesactions.fetchandsavenextqueries.md) synchronous promise.
</td></tr>
<tr><td>
[fetchAndSaveNextQueries](./x-components.nextqueriesactions.fetchandsavenextqueries.md)
</td><td>
</td><td>
(request: NextQueriesRequest \| null) => void
</td><td>
Requests a new set of next queries and stores them in the module.
</td></tr>
<tr><td>
[fetchAndSaveNextQueryPreview](./x-components.nextqueriesactions.fetchandsavenextquerypreview.md)
</td><td>
</td><td>
(payload: { query: string; location: [FeatureLocation](./x-components.featurelocation.md) \| undefined; }) => void
</td><td>
Requests the results to preview a next query and saves them in the state.
</td></tr>
<tr><td>
[fetchNextQueries](./x-components.nextqueriesactions.fetchnextqueries.md)
</td><td>
</td><td>
(request: NextQueriesRequest \| null) => NextQuery\[\] \| null
</td><td>
Requests a new set of next queries for the module query, and returns them.
</td></tr>
<tr><td>
[fetchNextQueryPreview](./x-components.nextqueriesactions.fetchnextquerypreview.md)
</td><td>
</td><td>
(payload: { query: string; location: [FeatureLocation](./x-components.featurelocation.md) \| undefined; }) => SearchResponse \| null
</td><td>
Requests the results to preview a next query, limited by [NextQueriesConfig.maxPreviewItemsToRequest](./x-components.nextqueriesconfig.maxpreviewitemstorequest.md)<!-- -->.
</td></tr>
<tr><td>
[setQueryFromLastHistoryQuery](./x-components.nextqueriesactions.setqueryfromlasthistoryquery.md)
</td><td>
</td><td>
(historyQueries: HistoryQuery\[\]) => void
</td><td>
Sets the query of the module based on the last history query.
</td></tr>
<tr><td>
[setUrlParams](./x-components.nextqueriesactions.seturlparams.md)
</td><td>
</td><td>
(urlParams: [UrlParams](./x-components.urlparams.md)<!-- -->) => void
</td><td>
Checks if the url has a query on it and then updates the state with that value.
</td></tr>
</tbody></table>