import { ISearchRequestParams } from '../../../../../../../../../src/plugins/data/common' ; import { ActionDetailsRequestOptions } from '../../../../../../common/search_strategy' ; import { createQueryFilterClauses } from '../../../../../../common/utils/build_query' ; export const buildActionDetailsQuery = ( { actionId , filterQuery , } ) : ISearchRequestParams => { const filter = [ ... createQueryFilterClauses ( filterQuery ) , { match_phrase : { action_id : actionId , } , } , ] ; const dslQuery = { allow_no_indices : true , index : '.fleet-actions' , ignore_unavailable : true , body : { query : { bool : { filter } } , size : 1 , fields : [ '*' ] , } , } ; return dslQuery ; } ;