import { ApmPluginRequestHandlerContext } from '../typings' ; export async function invalidateAgentKey ( { context , id , } ) { const { body : { invalidated_api_keys : invalidatedAgentKeys } , } = await context . core . elasticsearch . client . asCurrentUser . security . invalidateApiKey ( { body : { ids : [ id ] , owner : true , } , } ) ; return { invalidatedAgentKeys , } ; }