import { CommandResponse } from "./Bus/Command/CommandHandlerResolver"; import type IMiddleware from "./Bus/Middleware"; import type ICommandHandler from "./Bus/Command/CommandHandler"; import type IQueryHandler from "./Bus/Query/QueryHandler"; import type { IAppError, IAppResponse, QueryBusResponse } from "./Bus/CallbackArg"; import type IQuery from "./Bus/Query/Query"; import type ICommand from "./Bus/Command/Command"; /** Middleware type for the command bus */ export type CommandMiddleware = IMiddleware; /** Middleware type for the query bus */ export type QueryMiddleware = IMiddleware; /** Constructor type for commands and queries */ type MessageConstructor = { name: string; }; export default class App { private readonly commandResolver; private readonly queryResolver; private readonly commandBus; private readonly queryBus; constructor(commands: Map, queries: Map, commandBusMiddlewares?: CommandMiddleware[], queryBusMiddlewares?: QueryMiddleware[]); ask(query: IQuery): Promise; handle(command: ICommand): Promise; private bindResolvers; private registerCommand; private registerQuery; } export {};