import { CoreSetup , CoreStart , SavedObjectsClientContract , } from 'kibana/server' ; import { APMPluginStartDependencies } from '../../types' ; import { getInternalSavedObjectsClient } from '../../lib/helpers/get_internal_saved_objects_client' ; export async function getApmPackgePolicies ( { core , fleetPluginStart , } ) { const savedObjectsClient = await getInternalSavedObjectsClient ( core . setup ) ; return await fleetPluginStart . packagePolicyService . list ( savedObjectsClient , { kuery : 'ingest-package-policies.package.name:apm' , } ) ; }