import { CoreSetup } from 'src/core/server' ; import { withApmSpan } from '../../utils/with_apm_span' ; export type InternalSavedObjectsClient = Awaited < ReturnType < typeof getInternalSavedObjectsClient > > ; export async function getInternalSavedObjectsClient ( core ) { return withApmSpan ( 'get_internal_saved_objects_client' , ( ) => core . getStartServices ( ) . then ( async ( [ coreStart ] ) => { return coreStart . savedObjects . createInternalRepository ( ) ; } ) ) ; }