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 extends ServiceClass
• MessagePayloadType = unknown
• MessageParamsType = unknown
• FunctionPayloadType = unknown
• FunctionParamsType = unknown
• FunctionOutputType = unknown
• Resources extends Record
<string
, any
> = EmptyObject
• Invokes extends InvokeList
= EmptyObject
• 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
>