@adviser/cement - v0.0.0
    Preparing search index...

    Interface EventoHandler<INREQ, REQ, RES>

    Event handler interface. Handlers can optionally validate requests before handling them.

    interface EventoHandler<INREQ = unknown, REQ = unknown, RES = unknown> {
        type?: EventoType;
        hash: string;
        handle(
            trigger: HandleTriggerCtx<INREQ, REQ, RES>,
        ): Promise<Result<EventoResultType, Error>>;
        validate?(
            trigger: ValidateTriggerCtx<INREQ, REQ, RES>,
        ): Promise<Result<Option<REQ>, Error>>;
        post?(trigger: HandleTriggerCtx<INREQ, REQ, RES>): Promise<void>;
    }

    Type Parameters

    • INREQ = unknown

      The input request type (defaults to unknown)

    • REQ = unknown

      The validated request type (defaults to unknown)

    • RES = unknown

      The response type (defaults to unknown)

    Index

    Properties

    Methods

    Properties

    type?: EventoType

    Handler type (defaults to Regular if not specified)

    hash: string

    Unique identifier for this handler

    Methods

    Optionalpost