import { NextQueriesRequest } from '@empathyco/x-adapter' ; import { HistoryQuery , NextQuery } from '@empathyco/x-types' ; import { XActionContext , XStoreModule } from '../../../store' ; import { StatusMutations , StatusState } from '../../../store/utils/status-store.utils' ; import { UrlParams } from '../../../types/url-params' ; import { Dictionary } from '../../../utils' ; import { NextQueriesConfig } from '../config.types' ; public export interface NextQueriesState extends StatusState { /** The internal query of the module. Used to request the next queries. */ query : string ; /** The list of the next queries, related to the `query` property of the state. */ nextQueries : NextQuery [ ] ; /** The list of the searched queries, related to the `query` property of the state. */ searchedQueries : HistoryQuery [ ] ; /** Configuration options of the next queries module. */ config : NextQueriesConfig ; /** The extra params property of the state. */ params : Dictionary < unknown > ; } public export interface NextQueriesGetters { /** Request object to retrieve the next queries using the search adapter, or null if there is
     * not valid data to conform a valid request. */ request : NextQueriesRequest | null ; /** List of next queries that have not been searched before. */ nextQueries : NextQuery [ ] ; } public export interface NextQueriesMutations extends StatusMutations { param newQuery setQuery ( newQuery ) : void ; param nextQueries setNextQueries ( nextQueries ) : void ; param searchedQueries setSearchedQueries ( searchedQueries ) : void ; param params setParams ( params ) : void ; } public export interface NextQueriesActions { /**
     * Cancels / interrupt  NextQueriesActions . fetchAndSaveNextQueries synchronous promise.
      cancelFetchAndSaveNextQueries ( ) : void ; returns fetchNextQueries ( request ) : NextQuery [ ] | null ; /**
     * Requests a new set of next queries and stores them in the module.
     */ fetchAndSaveNextQueries ( request ) : void ; /**
     * Sets the query of the module based on the last history query.
     */ setQueryFromLastHistoryQuery ( historyQueries ) : void ; param urlParams setUrlParams ( urlParams ) : void ; } public export type NextQueriesXStoreModule = XStoreModule < NextQueriesState , NextQueriesGetters , NextQueriesMutations , NextQueriesActions > ; /**
 * Alias type for actions context of the  NextQueriesXStoreModule .
 *
 *  public export type NextQueriesActionContext = XActionContext < NextQueriesState , NextQueriesGetters , NextQueriesMutations , NextQueriesActions > ;