import { Setup } from '../../../lib/helpers/setup_request' ; import { AgentConfiguration } from '../../../../common/agent_configuration/configuration_types' ; import { convertConfigSettingsToString } from './convert_settings_to_string' ; export async function listConfigurations ( { setup } ) { const { internalClient , indices } = setup ; const params = { index : indices . apmAgentConfigurationIndex , size : 200 , } ; const resp = await internalClient . search < AgentConfiguration > ( 'list_agent_configuration' , params ) ; return resp . hits . hits . map ( convertConfigSettingsToString ) . map ( ( hit ) => hit . _source ) ; }