## API Report File for "kibana"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts

import { ConfigOptions } from 'elasticsearch';
import { Duration } from 'moment';
import { ObjectType } from '@kbn/config-schema';
import { Observable } from 'rxjs';
import { Request } from 'hapi';
import { ResponseObject } from 'hapi';
import { ResponseToolkit } from 'hapi';
import { Schema } from '@kbn/config-schema';
import { Server } from 'hapi';
import { ServerOptions } from 'hapi';
import { Type } from '@kbn/config-schema';
import { TypeOf } from '@kbn/config-schema';
import { Url } from 'url';

// @public (undocumented)
export type APICaller = (endpoint: string, clientParams: Record<string, unknown>, options?: CallAPIOptions) => Promise<unknown>;

// Warning: (ae-forgotten-export) The symbol "SessionStorage" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "AuthResult" needs to be exported by the entry point index.d.ts
// 
// @public (undocumented)
export type AuthenticationHandler<T> = (request: Request, sessionStorage: SessionStorage<T>, t: AuthToolkit) => Promise<AuthResult>;

// @public
export interface AuthToolkit {
    authenticated: (credentials: any) => AuthResult;
    redirected: (url: string) => AuthResult;
    rejected: (error: Error, options?: {
        statusCode?: number;
    }) => AuthResult;
}

// Warning: (ae-forgotten-export) The symbol "BootstrapArgs" needs to be exported by the entry point index.d.ts
// 
// @internal (undocumented)
export function bootstrap({ configs, cliArgs, applyConfigOverrides, features, }: BootstrapArgs): Promise<void>;

// @public
export interface CallAPIOptions {
    wrap401Errors: boolean;
}

// @public
export class ClusterClient {
    constructor(config: ElasticsearchClientConfig, log: Logger);
    asScoped(req?: {
        headers?: Headers;
    }): ScopedClusterClient;
    callAsInternalUser: (endpoint: string, clientParams?: Record<string, unknown>, options?: CallAPIOptions | undefined) => Promise<any>;
    close(): void;
    }

// @internal (undocumented)
export class ConfigService {
    // Warning: (ae-forgotten-export) The symbol "Config" needs to be exported by the entry point index.d.ts
    // Warning: (ae-forgotten-export) The symbol "Env" needs to be exported by the entry point index.d.ts
    constructor(config$: Observable<Config>, env: Env, logger: LoggerFactory);
    atPath<TSchema>(path: ConfigPath): Observable<TSchema>;
    getConfig$(): Observable<Config>;
    // (undocumented)
    getUnusedPaths(): Promise<string[]>;
    // (undocumented)
    getUsedPaths(): Promise<string[]>;
    // (undocumented)
    isEnabledAtPath(path: ConfigPath): Promise<boolean>;
    optionalAtPath<TSchema>(path: ConfigPath): Observable<TSchema | undefined>;
    // Warning: (ae-forgotten-export) The symbol "ConfigPath" needs to be exported by the entry point index.d.ts
    setSchema(path: ConfigPath, schema: Type<unknown>): Promise<void>;
    }

// @public (undocumented)
export interface CoreSetup {
    // (undocumented)
    elasticsearch: ElasticsearchServiceSetup;
    // (undocumented)
    http: HttpServiceSetup;
    // (undocumented)
    plugins: PluginsServiceSetup;
}

// @public (undocumented)
export interface CoreStart {
    // (undocumented)
    http: HttpServiceStart;
    // (undocumented)
    plugins: PluginsServiceStart;
}

// @public
export interface DiscoveredPlugin {
    readonly configPath: ConfigPath;
    readonly id: PluginName;
    readonly optionalPlugins: ReadonlyArray<PluginName>;
    readonly requiredPlugins: ReadonlyArray<PluginName>;
}

// Warning: (ae-forgotten-export) The symbol "ElasticsearchConfig" needs to be exported by the entry point index.d.ts
// 
// @public (undocumented)
export type ElasticsearchClientConfig = Pick<ConfigOptions, 'keepAlive' | 'log' | 'plugins'> & Pick<ElasticsearchConfig, 'apiVersion' | 'customHeaders' | 'logQueries' | 'requestHeadersWhitelist' | 'sniffOnStart' | 'sniffOnConnectionFault' | 'hosts' | 'username' | 'password'> & {
    pingTimeout?: ElasticsearchConfig['pingTimeout'] | ConfigOptions['pingTimeout'];
    requestTimeout?: ElasticsearchConfig['requestTimeout'] | ConfigOptions['requestTimeout'];
    sniffInterval?: ElasticsearchConfig['sniffInterval'] | ConfigOptions['sniffInterval'];
    ssl?: Partial<ElasticsearchConfig['ssl']>;
};

// @public (undocumented)
export interface ElasticsearchServiceSetup {
    // (undocumented)
    readonly adminClient$: Observable<ClusterClient>;
    // (undocumented)
    readonly createClient: (type: string, config: ElasticsearchClientConfig) => ClusterClient;
    // (undocumented)
    readonly dataClient$: Observable<ClusterClient>;
    // (undocumented)
    readonly legacy: {
        readonly config$: Observable<ElasticsearchConfig>;
    };
}

// @public (undocumented)
export type Headers = Record<string, string | string[] | undefined>;

// Warning: (ae-forgotten-export) The symbol "HttpServerSetup" needs to be exported by the entry point index.d.ts
// 
// @public (undocumented)
export type HttpServiceSetup = HttpServerSetup;

// @public (undocumented)
export interface HttpServiceStart {
    isListening: () => boolean;
}

// @public (undocumented)
export class KibanaRequest<Params = unknown, Query = unknown, Body = unknown> {
    constructor(request: Request, params: Params, query: Query, body: Body);
    // (undocumented)
    readonly body: Body;
    // Warning: (ae-forgotten-export) The symbol "RouteSchemas" needs to be exported by the entry point index.d.ts
    static from<P extends ObjectType, Q extends ObjectType, B extends ObjectType>(req: Request, routeSchemas: RouteSchemas<P, Q, B> | undefined): KibanaRequest<P["type"], Q["type"], B["type"]>;
    // (undocumented)
    getFilteredHeaders(headersToKeep: string[]): Pick<Record<string, string | string[] | undefined>, string>;
    // (undocumented)
    readonly headers: Headers;
    // (undocumented)
    readonly params: Params;
    // (undocumented)
    readonly path: string;
    // (undocumented)
    readonly query: Query;
    // (undocumented)
    unstable_getIncomingMessage(): import("http").IncomingMessage;
    }

// @public
export interface Logger {
    debug(message: string, meta?: LogMeta): void;
    error(errorOrMessage: string | Error, meta?: LogMeta): void;
    fatal(errorOrMessage: string | Error, meta?: LogMeta): void;
    info(message: string, meta?: LogMeta): void;
    // @internal (undocumented)
    log(record: LogRecord): void;
    trace(message: string, meta?: LogMeta): void;
    warn(errorOrMessage: string | Error, meta?: LogMeta): void;
}

// @public
export interface LoggerFactory {
    get(...contextParts: string[]): Logger;
}

// @internal
export class LogLevel {
    // (undocumented)
    static readonly All: LogLevel;
    // (undocumented)
    static readonly Debug: LogLevel;
    // (undocumented)
    static readonly Error: LogLevel;
    // (undocumented)
    static readonly Fatal: LogLevel;
    static fromId(level: LogLevelId): LogLevel;
    // Warning: (ae-forgotten-export) The symbol "LogLevelId" needs to be exported by the entry point index.d.ts
    // 
    // (undocumented)
    readonly id: LogLevelId;
    // (undocumented)
    static readonly Info: LogLevel;
    // (undocumented)
    static readonly Off: LogLevel;
    supports(level: LogLevel): boolean;
    // (undocumented)
    static readonly Trace: LogLevel;
    // (undocumented)
    readonly value: number;
    // (undocumented)
    static readonly Warn: LogLevel;
}

// @public
export interface LogMeta {
    // (undocumented)
    [key: string]: any;
}

// @internal
export interface LogRecord {
    // (undocumented)
    context: string;
    // (undocumented)
    error?: Error;
    // (undocumented)
    level: LogLevel;
    // (undocumented)
    message: string;
    // (undocumented)
    meta?: {
        [name: string]: any;
    };
    // (undocumented)
    timestamp: Date;
}

// Warning: (ae-forgotten-export) The symbol "OnRequestResult" needs to be exported by the entry point index.d.ts
// 
// @public (undocumented)
export type OnRequestHandler<Params = any, Query = any, Body = any> = (req: KibanaRequest<Params, Query, Body>, t: OnRequestToolkit) => OnRequestResult | Promise<OnRequestResult>;

// @public
export interface OnRequestToolkit {
    next: () => OnRequestResult;
    redirected: (url: string) => OnRequestResult;
    rejected: (error: Error, options?: {
        statusCode?: number;
    }) => OnRequestResult;
    setUrl: (newUrl: string | Url) => void;
}

// @public
export interface Plugin<TSetup, TStart, TPluginsSetup extends Record<PluginName, unknown> = {}, TPluginsStart extends Record<PluginName, unknown> = {}> {
    // (undocumented)
    setup: (core: PluginSetupContext, plugins: TPluginsSetup) => TSetup | Promise<TSetup>;
    // (undocumented)
    start: (core: PluginStartContext, plugins: TPluginsStart) => TStart | Promise<TStart>;
    // (undocumented)
    stop?: () => void;
}

// @public
export type PluginInitializer<TSetup, TStart, TPluginsSetup extends Record<PluginName, unknown> = {}, TPluginsStart extends Record<PluginName, unknown> = {}> = (core: PluginInitializerContext) => Plugin<TSetup, TStart, TPluginsSetup, TPluginsStart>;

// @public
export interface PluginInitializerContext {
    // (undocumented)
    config: {
        create: <Schema>() => Observable<Schema>;
        createIfExists: <Schema>() => Observable<Schema | undefined>;
    };
    // (undocumented)
    env: {
        mode: EnvironmentMode;
    };
    // (undocumented)
    logger: LoggerFactory;
}

// @public
export type PluginName = string;

// @public
export interface PluginSetupContext {
    // (undocumented)
    elasticsearch: {
        adminClient$: Observable<ClusterClient>;
        dataClient$: Observable<ClusterClient>;
    };
    // (undocumented)
    http: {
        registerAuth: HttpServiceSetup['registerAuth'];
        registerOnRequest: HttpServiceSetup['registerOnRequest'];
        getBasePathFor: HttpServiceSetup['getBasePathFor'];
        setBasePathFor: HttpServiceSetup['setBasePathFor'];
    };
}

// @public (undocumented)
export interface PluginsServiceSetup {
    // (undocumented)
    contracts: Map<PluginName, unknown>;
    // (undocumented)
    uiPlugins: {
        public: Map<PluginName, DiscoveredPlugin>;
        internal: Map<PluginName, DiscoveredPluginInternal>;
    };
}

// @public (undocumented)
export interface PluginsServiceStart {
    // (undocumented)
    contracts: Map<PluginName, unknown>;
}

// @public
export interface PluginStartContext {
}

// @public (undocumented)
export class Router {
    constructor(path: string);
    delete<P extends ObjectType, Q extends ObjectType, B extends ObjectType>(route: RouteConfig<P, Q, B>, handler: RequestHandler<P, Q, B>): void;
    // Warning: (ae-forgotten-export) The symbol "RouteConfig" needs to be exported by the entry point index.d.ts
    // Warning: (ae-forgotten-export) The symbol "RequestHandler" needs to be exported by the entry point index.d.ts
    get<P extends ObjectType, Q extends ObjectType, B extends ObjectType>(route: RouteConfig<P, Q, B>, handler: RequestHandler<P, Q, B>): void;
    getRoutes(): Readonly<RouterRoute>[];
    // (undocumented)
    readonly path: string;
    post<P extends ObjectType, Q extends ObjectType, B extends ObjectType>(route: RouteConfig<P, Q, B>, handler: RequestHandler<P, Q, B>): void;
    put<P extends ObjectType, Q extends ObjectType, B extends ObjectType>(route: RouteConfig<P, Q, B>, handler: RequestHandler<P, Q, B>): void;
    // Warning: (ae-forgotten-export) The symbol "RouterRoute" needs to be exported by the entry point index.d.ts
    // 
    // (undocumented)
    routes: Array<Readonly<RouterRoute>>;
    }

// @public
export class ScopedClusterClient {
    constructor(internalAPICaller: APICaller, scopedAPICaller: APICaller, headers?: Record<string, string | string[] | undefined> | undefined);
    callAsCurrentUser(endpoint: string, clientParams?: Record<string, unknown>, options?: CallAPIOptions): Promise<unknown>;
    callAsInternalUser(endpoint: string, clientParams?: Record<string, unknown>, options?: CallAPIOptions): Promise<unknown>;
    }


// Warnings were encountered during analysis:
// 
// src/core/server/plugins/plugin_context.ts:35:10 - (ae-forgotten-export) The symbol "EnvironmentMode" needs to be exported by the entry point index.d.ts
// src/core/server/plugins/plugins_service.ts:37:5 - (ae-forgotten-export) The symbol "DiscoveredPluginInternal" needs to be exported by the entry point index.d.ts

// (No @packageDocumentation comment for this package)

```
