/// <reference types="jest" />
import { RootConfigService, IdentityService, LoggerService, ServiceFactory, TokenManagerService, AuthService, DiscoveryService, HttpAuthService, BackstageCredentials, BackstageUserInfo, UserInfoService } from '@backstage/backend-plugin-api';
import { JsonObject } from '@backstage/types';
/** @public */
export type ServiceMock<TService> = {
    factory: ServiceFactory<TService>;
} & {
    [Key in keyof TService]: TService[Key] extends (...args: infer Args) => infer Return ? TService[Key] & jest.MockInstance<Return, Args> : TService[Key];
};
/**
 * @public
 */
export declare namespace mockServices {
    function rootConfig(options?: rootConfig.Options): RootConfigService;
    namespace rootConfig {
        type Options = {
            data?: JsonObject;
        };
        const factory: (options?: Options | undefined) => ServiceFactory<RootConfigService, "root">;
    }
    function rootLogger(options?: rootLogger.Options): LoggerService;
    namespace rootLogger {
        type Options = {
            level?: 'none' | 'error' | 'warn' | 'info' | 'debug';
        };
        const factory: (options?: Options | undefined) => ServiceFactory<LoggerService, "root">;
        const mock: (partialImpl?: Partial<import("@backstage/backend-plugin-api").RootLoggerService> | undefined) => ServiceMock<import("@backstage/backend-plugin-api").RootLoggerService>;
    }
    function tokenManager(): TokenManagerService;
    namespace tokenManager {
        const factory: () => ServiceFactory<TokenManagerService, "plugin">;
        const mock: (partialImpl?: Partial<TokenManagerService> | undefined) => ServiceMock<TokenManagerService>;
    }
    function identity(): IdentityService;
    namespace identity {
        const factory: () => ServiceFactory<IdentityService, "plugin">;
        const mock: (partialImpl?: Partial<IdentityService> | undefined) => ServiceMock<IdentityService>;
    }
    function auth(options?: {
        pluginId?: string;
        disableDefaultAuthPolicy?: boolean;
    }): AuthService;
    namespace auth {
        const factory: () => ServiceFactory<AuthService, "plugin">;
        const mock: (partialImpl?: Partial<AuthService> | undefined) => ServiceMock<AuthService>;
    }
    function discovery(): DiscoveryService;
    namespace discovery {
        const factory: () => ServiceFactory<DiscoveryService, "plugin">;
        const mock: (partialImpl?: Partial<DiscoveryService> | undefined) => ServiceMock<DiscoveryService>;
    }
    /**
     * Creates a mock implementation of the `HttpAuthService`.
     *
     * By default all requests without credentials are treated as requests from
     * the default mock user principal. This behavior can be configured with the
     * `defaultCredentials` option.
     */
    function httpAuth(options?: {
        pluginId?: string;
        /**
         * The default credentials to use if there are no credentials present in the
         * incoming request.
         *
         * By default all requests without credentials are treated as authenticated
         * as the default mock user as returned from `mockCredentials.user()`.
         */
        defaultCredentials?: BackstageCredentials;
    }): HttpAuthService;
    namespace httpAuth {
        /**
         * Creates a mock service factory for the `HttpAuthService`.
         *
         * By default all requests without credentials are treated as requests from
         * the default mock user principal. This behavior can be configured with the
         * `defaultCredentials` option.
         */
        const factory: (options?: {
            defaultCredentials?: BackstageCredentials | undefined;
        } | undefined) => ServiceFactory<HttpAuthService, "plugin">;
        const mock: (partialImpl?: Partial<HttpAuthService> | undefined) => ServiceMock<HttpAuthService>;
    }
    /**
     * Creates a mock implementation of the `UserInfoService`.
     *
     * By default it extracts the user's entity ref from a user principal and
     * returns that as the only ownership entity ref, but this can be overridden
     * by passing in a custom set of user info.
     */
    function userInfo(customInfo?: Partial<BackstageUserInfo>): UserInfoService;
    namespace userInfo {
        /**
         * Creates a mock service factory for the `UserInfoService`.
         *
         * By default it extracts the user's entity ref from a user principal and
         * returns that as the only ownership entity ref.
         */
        const factory: () => ServiceFactory<UserInfoService, "plugin">;
        const mock: (partialImpl?: Partial<UserInfoService> | undefined) => ServiceMock<UserInfoService>;
    }
    namespace cache {
        const factory: () => ServiceFactory<import("@backstage/backend-plugin-api").CacheService, "plugin">;
        const mock: (partialImpl?: Partial<import("@backstage/backend-plugin-api").CacheService> | undefined) => ServiceMock<import("@backstage/backend-plugin-api").CacheService>;
    }
    namespace database {
        const factory: () => ServiceFactory<import("@backstage/backend-plugin-api").DatabaseService, "plugin">;
        const mock: (partialImpl?: Partial<import("@backstage/backend-plugin-api").DatabaseService> | undefined) => ServiceMock<import("@backstage/backend-plugin-api").DatabaseService>;
    }
    namespace httpRouter {
        const factory: (options?: import("@backstage/backend-app-api").HttpRouterFactoryOptions | undefined) => ServiceFactory<import("@backstage/backend-plugin-api").HttpRouterService, "plugin">;
        const mock: (partialImpl?: Partial<import("@backstage/backend-plugin-api").HttpRouterService> | undefined) => ServiceMock<import("@backstage/backend-plugin-api").HttpRouterService>;
    }
    namespace rootHttpRouter {
        const factory: (options?: import("@backstage/backend-app-api").RootHttpRouterFactoryOptions | undefined) => ServiceFactory<import("@backstage/backend-plugin-api").RootHttpRouterService, "root">;
        const mock: (partialImpl?: Partial<import("@backstage/backend-plugin-api").RootHttpRouterService> | undefined) => ServiceMock<import("@backstage/backend-plugin-api").RootHttpRouterService>;
    }
    namespace lifecycle {
        const factory: () => ServiceFactory<import("@backstage/backend-plugin-api").LifecycleService, "plugin">;
        const mock: (partialImpl?: Partial<import("@backstage/backend-plugin-api").LifecycleService> | undefined) => ServiceMock<import("@backstage/backend-plugin-api").LifecycleService>;
    }
    namespace logger {
        const factory: () => ServiceFactory<LoggerService, "plugin">;
        const mock: (partialImpl?: Partial<LoggerService> | undefined) => ServiceMock<LoggerService>;
    }
    namespace permissions {
        const factory: () => ServiceFactory<import("@backstage/backend-plugin-api").PermissionsService, "plugin">;
        const mock: (partialImpl?: Partial<import("@backstage/backend-plugin-api").PermissionsService> | undefined) => ServiceMock<import("@backstage/backend-plugin-api").PermissionsService>;
    }
    namespace rootLifecycle {
        const factory: () => ServiceFactory<import("@backstage/backend-plugin-api").RootLifecycleService, "root">;
        const mock: (partialImpl?: Partial<import("@backstage/backend-plugin-api").RootLifecycleService> | undefined) => ServiceMock<import("@backstage/backend-plugin-api").RootLifecycleService>;
    }
    namespace scheduler {
        const factory: () => ServiceFactory<import("@backstage/backend-plugin-api").SchedulerService, "plugin">;
        const mock: (partialImpl?: Partial<import("@backstage/backend-plugin-api").SchedulerService> | undefined) => ServiceMock<import("@backstage/backend-plugin-api").SchedulerService>;
    }
    namespace urlReader {
        const factory: () => ServiceFactory<import("@backstage/backend-plugin-api").UrlReaderService, "plugin">;
        const mock: (partialImpl?: Partial<import("@backstage/backend-plugin-api").UrlReaderService> | undefined) => ServiceMock<import("@backstage/backend-plugin-api").UrlReaderService>;
    }
}
