import { Plugin , CoreSetup } from 'kibana/server' ; import { PluginSetupContract as ActionsPluginSetup } from '../../../../../../../plugins/actions/server/plugin' ; import { PluginSetupContract as AlertingPluginSetup } from '../../../../../../../plugins/alerting/server/plugin' ; import { EncryptedSavedObjectsPluginStart } from '../../../../../../../plugins/encrypted_saved_objects/server' ; import { PluginSetupContract as FeaturesPluginSetup } from '../../../../../../../plugins/features/server' ; import { defineAlertTypes } from './alert_types' ; export interface FixtureSetupDeps { features : FeaturesPluginSetup ; actions : ActionsPluginSetup ; alerting : AlertingPluginSetup ; } export interface FixtureStartDeps { encryptedSavedObjects : EncryptedSavedObjectsPluginStart ; } export class FixturePlugin implements Plugin < void , void , FixtureSetupDeps , FixtureStartDeps > { public setup ( core , { features , alerting } ) { features . registerKibanaFeature ( { id : 'alertsRestrictedFixture' , name : 'AlertRestricted' , app : [ 'alerts' , 'kibana' ] , category : { id : 'foo' , label : 'foo' } , alerting : [ 'test.restricted-noop' , 'test.unrestricted-noop' , 'test.noop' ] , privileges : { all : { app : [ 'alerts' , 'kibana' ] , savedObject : { all : [ 'alert' ] , read : [ ] , } , alerting : { rule : { all : [ 'test.restricted-noop' , 'test.unrestricted-noop' , 'test.noop' ] , } , } , ui : [ ] , } , read : { app : [ 'alerts' , 'kibana' ] , savedObject : { all : [ ] , read : [ ] , } , alerting : { rule : { read : [ 'test.restricted-noop' , 'test.unrestricted-noop' , 'test.noop' ] , } , } , ui : [ ] , } , } , } ) ; defineAlertTypes ( core , { alerting } ) ; } public start ( ) { } public stop ( ) { } }