import { TopRecommendationsRequest } from '@empathyco/x-adapter' ; import { Result } from '@empathyco/x-types' ; import { XActionContext , XStoreModule } from '../../../store' ; import { StatusMutations , StatusState } from '../../../store/utils/status-store.utils' ; import { Dictionary } from '../../../utils/types' ; import { RecommendationsConfig } from '../config.types' ; public export interface RecommendationsState extends StatusState { /** Configuration for the `Recommendations` module. */ config : RecommendationsConfig ; /** Param to be sent on the recommendations request. */ origin : string ; /** The recommendations of the module. */ recommendations : Result [ ] ; /** The extra params property of the state. */ params : Dictionary < unknown > ; } public export interface RecommendationsGetters { /** The adapter request object for retrieving the recommendations. */ request : TopRecommendationsRequest ; } public export interface RecommendationsMutations extends StatusMutations { param recommendations setRecommendations ( recommendations ) : void ; param params setParams ( params ) : void ; } public export interface RecommendationsActions { /**
     * Cancels / interrupt  RecommendationsActions . fetchAndSaveRecommendations synchronous
     * promise.
      cancelFetchAndSaveRecommendations ( ) : void ; /**
     * Requests and saves to the state a list of recommendations.
     */ fetchAndSaveRecommendations ( request ) : void ; returns fetchRecommendations ( request ) : Result [ ] ; } public export type RecommendationsXStoreModule = XStoreModule < RecommendationsState , RecommendationsGetters , RecommendationsMutations , RecommendationsActions > ; /**
 * Alias type for actions context of the  RecommendationsXStoreModule .
 *
 *  public export type RecommendationsActionContext = XActionContext < RecommendationsState , RecommendationsGetters , RecommendationsMutations , RecommendationsActions > ;