import { CoreSetup , CoreStart , Plugin } from 'src/core/public' ; import { CustomIntegrationsSetup , CustomIntegrationsStart , CustomIntegrationsStartDependencies , } from './types' ; import { CustomIntegration , ROUTES_APPEND_CUSTOM_INTEGRATIONS , ROUTES_REPLACEMENT_CUSTOM_INTEGRATIONS , } from '../common' ; import { pluginServices } from './services' ; import { pluginServiceRegistry } from './services/kibana' ; export class CustomIntegrationsPlugin implements Plugin < CustomIntegrationsSetup , CustomIntegrationsStart > { public setup ( core ) { return { async getReplacementCustomIntegrations ( ) { return core . http . get ( ROUTES_REPLACEMENT_CUSTOM_INTEGRATIONS ) ; } , async getAppendCustomIntegrations ( ) { return core . http . get ( ROUTES_APPEND_CUSTOM_INTEGRATIONS ) ; } , } ; } public start ( coreStart , startPlugins ) { pluginServices . setRegistry ( pluginServiceRegistry . start ( { coreStart , startPlugins } ) ) ; return { ContextProvider : pluginServices . getContextProvider ( ) , } ; } public stop ( ) { } }