import { cacheDataViewsContract , loadSavedSearches } from '../util/index_utils' ; import { checkFullLicense } from '../license' ; import { checkGetJobsCapabilitiesResolver } from '../capabilities/check_capabilities' ; import { getMlNodeCount } from '../ml_nodes_check/check_ml_nodes' ; import { loadMlServerInfo } from '../services/ml_server_info' ; import type { DataViewsContract } from '../../../../../../src/plugins/data_views/public' ; export interface Resolvers { [ name ] : ( ) => Promise < any > ; } export interface ResolverResults { [ name ] : any ; } interface BasicResolverDependencies { dataViewsContract : DataViewsContract ; redirectToMlAccessDeniedPage : ( ) => Promise < void > ; } export const basicResolvers = ( { dataViewsContract , redirectToMlAccessDeniedPage , } ) : Resolvers => ( { checkFullLicense , getMlNodeCount , loadMlServerInfo , cacheDataViewsContract : ( ) => cacheDataViewsContract ( dataViewsContract ) , checkGetJobsCapabilities : ( ) => checkGetJobsCapabilitiesResolver ( redirectToMlAccessDeniedPage ) , loadSavedSearches , } ) ;