Skip to content

PURISTA API


PURISTA API / @purista/core / SubscriptionFunction

Type Alias: SubscriptionFunction()<ServiceClassType, FunctionPayloadType, FunctionParamsType, FunctionOutputType, Resources, Invokes, EmitList>

SubscriptionFunction<ServiceClassType, FunctionPayloadType, FunctionParamsType, FunctionOutputType, Resources, Invokes, EmitList> = (this, context, payload, parameter) => Promise<FunctionOutputType>

Defined in: packages/core/src/core/types/subscription/SubscriptionFunction.ts:11

CommandFunction is a function which will be triggered when a matching event bridge message is received by the service

Type Parameters

ServiceClassType

ServiceClassType extends ServiceClass

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

ServiceClassType

context

SubscriptionFunctionContext<Resources, Invokes, EmitList>

payload

Readonly<FunctionPayloadType>

parameter

Readonly<FunctionParamsType>

Returns

Promise<FunctionOutputType>