import { RouteDependencies } from '../types' ; import { registerFieldHistogramsRoutes } from './api/field_histograms' ; import { registerPrivilegesRoute } from './api/privileges' ; import { registerTransformsRoutes } from './api/transforms' ; import { API_BASE_PATH } from '../../common/constants' ; export const addBasePath = ( uri ) : string => `${ API_BASE_PATH }${ uri }` ; export class ApiRoutes { setup ( dependencies ) { registerFieldHistogramsRoutes ( dependencies ) ; registerPrivilegesRoute ( dependencies ) ; registerTransformsRoutes ( dependencies ) ; } }