import { pick , reduce } from 'lodash' ; export const convertPackQueriesToSO = ( queries ) => reduce ( queries , ( acc , value , key ) => { acc . push ( { id : key , ... pick ( value , [ 'query' , 'interval' , 'platform' , 'version' , 'ecs_mapping' ] ) , } ) ; return acc ; } , [ ] ) ; export const convertSOQueriesToPack = ( queries ) => reduce ( queries , ( acc , { id : queryId , ... query } ) => { acc [ queryId ] = query ; return acc ; } , { } as Record < string , any > ) ;