import { schema } from '@kbn/config-schema' ; import { RouteDependencies } from '../../plugin' ; export function registerCrawlerSitemapRoutes ( { router , enterpriseSearchRequestHandler , } ) { router . post ( { path : '/internal/app_search/engines/{engineName}/crawler/domains/{domainId}/sitemaps' , validate : { params : schema . object ( { engineName : schema . string ( ) , domainId : schema . string ( ) , } ) , body : schema . object ( { url : schema . string ( ) , } ) , } , } , enterpriseSearchRequestHandler . createRequest ( { path : '/api/as/v1/engines/:engineName/crawler/domains/:domainId/sitemaps' , params : { respond_with : 'index' , } , } ) ) ; router . put ( { path : '/internal/app_search/engines/{engineName}/crawler/domains/{domainId}/sitemaps/{sitemapId}' , validate : { params : schema . object ( { engineName : schema . string ( ) , domainId : schema . string ( ) , sitemapId : schema . string ( ) , } ) , body : schema . object ( { url : schema . string ( ) , } ) , } , } , enterpriseSearchRequestHandler . createRequest ( { path : '/api/as/v1/engines/:engineName/crawler/domains/:domainId/sitemaps/:sitemapId' , params : { respond_with : 'index' , } , } ) ) ; router . delete ( { path : '/internal/app_search/engines/{engineName}/crawler/domains/{domainId}/sitemaps/{sitemapId}' , validate : { params : schema . object ( { engineName : schema . string ( ) , domainId : schema . string ( ) , sitemapId : schema . string ( ) , } ) , } , } , enterpriseSearchRequestHandler . createRequest ( { path : '/api/as/v1/engines/:engineName/crawler/domains/:domainId/sitemaps/:sitemapId' , params : { respond_with : 'index' , } , } ) ) ; }