import { ChromeStart , DocLinksStart , HttpStart , NotificationsSetup , OverlayStart , SavedObjectsClientContract , IUiSettingsClient , ApplicationStart , } from 'opensearch-dashboards/public' ; import { UiStatsMetricType } from '@osd/analytics' ; import { TelemetryPluginStart } from '../../../telemetry/public' ; import { UrlForwardingStart } from '../../../url_forwarding/public' ; import { TutorialService } from '../services/tutorials' ; import { FeatureCatalogueRegistry } from '../services/feature_catalogue' ; import { EnvironmentService } from '../services/environment' ; import { ConfigSchema } from '../../config' ; import { HomePluginBranding } from '..' ; export interface HomeOpenSearchDashboardsServices { indexPatternService : any ; opensearchDashboardsVersion : string ; chrome : ChromeStart ; application : ApplicationStart ; uiSettings : IUiSettingsClient ; urlForwarding : UrlForwardingStart ; homeConfig : ConfigSchema ; featureCatalogue : FeatureCatalogueRegistry ; http : HttpStart ; savedObjectsClient : SavedObjectsClientContract ; toastNotifications : NotificationsSetup [ 'toasts' ] ; banners : OverlayStart [ 'banners' ] ; trackUiMetric : ( type : UiStatsMetricType , eventNames : string | string [ ] , count ? : number ) => void ; getBasePath : ( ) => string ; docLinks : DocLinksStart ; addBasePath : ( url : string ) => string ; environmentService : EnvironmentService ; telemetry ? : TelemetryPluginStart ; tutorialService : TutorialService ; injectedMetadata : { getInjectedVar : ( name : string , defaultValue ? : any ) => unknown ; getBranding : ( ) => HomePluginBranding ; } ; } let services = null ; export function setServices ( newServices ) { services = newServices ; } export function getServices ( ) { if ( ! services ) { throw new Error ( 'OpenSearch Dashboards services not set - are you trying to import this module from outside of the home app?' ) ; } return services ; }