import type { PublicMethodsOf } from '@kbn/utility-types' ; import { AlertingAuthorization } from './alerting_authorization' ; type Schema = PublicMethodsOf < AlertingAuthorization > ; export type AlertingAuthorizationMock = jest . Mocked < Schema > ; const createAlertingAuthorizationMock = ( ) => { const mocked = { ensureAuthorized : jest . fn ( ) , filterByRuleTypeAuthorization : jest . fn ( ) , getAuthorizationFilter : jest . fn ( ) , getFindAuthorizationFilter : jest . fn ( ) , getAugmentedRuleTypesWithAuthorization : jest . fn ( ) , getSpaceId : jest . fn ( ) , } ; return mocked ; } ; export const alertingAuthorizationMock = { create : createAlertingAuthorizationMock , } ;