import { IDriver } from "../IDriver"; import { IPlugin } from "./IPlugin"; import Constructible from "../Constructible"; import IConfig, { LogLevels } from "./IConfig"; import IRPC from "../IRPC"; import { Middleware, middlewareCreator, restrictScopeMiddleware, asyncMiddleware } from "./Middleware"; import { IErrorBroker } from "./IErrorBroker"; import IEvent from "../IEvent"; export declare type LogFunction = (entry: any, options?: unknown) => void; export interface ILogger { log(level: LogLevels, entry: any, options?: unknown): void; info: LogFunction; silly: LogFunction; warn: LogFunction; error: LogFunction; verbose: LogFunction; debug: LogFunction; } export interface IApplicationHookEmitter { on(event: string, handler: (...args: unknown[]) => Promise): void; once(event: string, handler: (...args: unknown[]) => Promise): void; emit(event: string, ...args: unknown[]): void; emitAsync(event: string, ...args: unknown[]): Promise; triggerHook(method: string, ...params: any[]): Promise>; triggerHookSingle(method: string, ...params: any[]): Promise; registerHook(method: string, fn: (...params: any[]) => Promise): void; } export declare type IApplicationContext = IApplicationHookEmitter & { config: IConfig; logs: ILogger; redis: unknown; rpcServer: unknown & { methods: IRPC; }; webExpress: unknown; drivers: Map>; plugins: Map; mongoose: unknown; package: unknown; webSocketServer: unknown; webSocketPaths: Map; errors: IErrorBroker; ipfsClient?: unknown; createEvent(type: string, event?: Partial>): Promise>; middleware: { [name: string]: middlewareCreator; restrictScopeMiddleware: restrictScopeMiddleware; asyncMiddleware: asyncMiddleware; handleErrorMiddleware: () => Middleware; }; loadDriver(driver: Constructible, name?: string): Promise; };