import { schema } from '@kbn/config-schema' ; import { skipBodyValidation } from '../../lib/route_config_helpers' ; import { RouteDependencies } from '../../plugin' ; export function registerSearchRoutes ( { router , enterpriseSearchRequestHandler , } ) { router . post ( skipBodyValidation ( { path : '/internal/app_search/engines/{engineName}/search' , validate : { params : schema . object ( { engineName : schema . string ( ) , } ) , query : schema . object ( { query : schema . string ( ) , } ) , } , } ) , enterpriseSearchRequestHandler . createRequest ( { path : '/as/engines/:engineName/dashboard_search' , } ) ) ; router . post ( skipBodyValidation ( { path : '/internal/app_search/search-ui/api/as/v1/engines/{engineName}/search.json' , validate : { params : schema . object ( { engineName : schema . string ( ) , } ) , } , } ) , enterpriseSearchRequestHandler . createRequest ( { path : '/as/engines/:engineName/dashboard_search' , } ) ) ; }