Skip to content

PURISTA API


PURISTA API / @purista/core / CommandAfterGuardHook

Type Alias: CommandAfterGuardHook()<S, MessagePayloadType, MessageParamsType, FunctionPayloadType, FunctionParamsType, FunctionOutputType, Resources, Invokes, EmitList>

CommandAfterGuardHook<S, MessagePayloadType, MessageParamsType, FunctionPayloadType, FunctionParamsType, FunctionOutputType, Resources, Invokes, EmitList> = (this, context, result, originalPayload, originalParameter) => Promise<void>

Defined in: packages/core/src/core/types/commandType/CommandAfterGuardHook.ts:13

Definition of after guard hook functions. This guard is called after function successfully returns and after output validation.

Type Parameters

S

S extends ServiceClass = ServiceClass

MessagePayloadType

MessagePayloadType = unknown

MessageParamsType

MessageParamsType = unknown

FunctionPayloadType

FunctionPayloadType = unknown

FunctionParamsType

FunctionParamsType = unknown

FunctionOutputType

FunctionOutputType = unknown

Resources

Resources extends Record<string, any> = EmptyObject

Invokes

Invokes extends InvokeList = EmptyObject

EmitList

EmitList extends Record<string, Schema> = EmptyObject

Parameters

this

S

context

CommandFunctionContext<MessagePayloadType, MessageParamsType, Resources, Invokes, EmitList>

result

Readonly<FunctionOutputType>

originalPayload

Readonly<FunctionPayloadType>

originalParameter

Readonly<FunctionParamsType>

Returns

Promise<void>