Examples

Example 1

import { CqrsPlugin } from '@setu-ts/cqrs-plugin';

app.register(CqrsPlugin({ behaviors: [timingBehavior] }));

Classes

c
HandlerNotFoundError(requestType: string)

Thrown by CommandBus.execute and QueryBus.execute when no handler is registered for the request's type.

Functions

Interfaces

I
CommandHandlerRegistration

One command handler and the command type the bus routes to it.

I
CqrsCommand

A command: a request that mutates state and returns a result.

I
CqrsPluginOptions

Options for CqrsPlugin.

I
CqrsQuery

A query: a request that returns data without side effects.

I
CqrsRequest

A CQRS request identified by a string type and carrying typed data.

I
ICommandHandler

Handles one command type.

I
ICqrsFacade

Facade combining command and query buses.

I
IPipelineBehavior

Wraps a handler with cross-cutting logic (logging, timing, validation, etc.).

I
IQueryHandler

Handles one query type.

I
QueryHandlerRegistration

One query handler and the query type the bus routes to it.