UNPKG

@empathyco/x-components

Version:
173 lines (75 loc) 2.9 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [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> () =&gt; 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) =&gt; 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; }) =&gt; 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) =&gt; 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; }) =&gt; 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\[\]) =&gt; 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)<!-- -->) =&gt; void </td><td> Checks if the url has a query on it and then updates the state with that value. </td></tr> </tbody></table>