PURISTA API / @purista/core / CommandFunction
Type Alias: CommandFunction()<S, MessagePayloadType, MessageParamsType, FunctionPayloadType, FunctionParamsType, FunctionOutputType, Resources, Invokes, EmitList>
CommandFunction<
S
,MessagePayloadType
,MessageParamsType
,FunctionPayloadType
,FunctionParamsType
,FunctionOutputType
,Resources
,Invokes
,EmitList
> = (this
,context
,payload
,parameter
) =>Promise
<FunctionOutputType
>
Defined in: packages/core/src/core/types/commandType/CommandFunction.ts:12
CommandFunction is a function which will be triggered when a matching event bridge message is received by the service
Type Parameters
S
S
extends 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
>
payload
Readonly
<FunctionPayloadType
>
parameter
Readonly
<FunctionParamsType
>
Returns
Promise
<FunctionOutputType
>