import { SavedObjectsServiceSetup } from 'kibana/server' ; import { mlJob , mlModule } from './mappings' ; import { migrations } from './migrations' ; import { ML_SAVED_OBJECT_TYPE , ML_MODULE_SAVED_OBJECT_TYPE , } from '../../common/types/saved_objects' ; export function setupSavedObjects ( savedObjects ) { savedObjects . registerType ( { name : ML_SAVED_OBJECT_TYPE , hidden : false , namespaceType : 'multiple' , migrations , mappings : mlJob , } ) ; savedObjects . registerType ( { name : ML_MODULE_SAVED_OBJECT_TYPE , hidden : false , management : { importableAndExportable : true , visibleInManagement : false , } , namespaceType : 'agnostic' , migrations , mappings : mlModule , } ) ; }