Skip to content

PURISTA API


PURISTA API / @purista/core / CommandDefinition

Type Alias: CommandDefinition<S, MessagePayloadType, MessageParamsType, TransformInputPayload, TransformInputParams, FunctionPayloadType, FunctionParamsType, FunctionOutputType, FinalFunctionOutputType, TransformOutputHookOutput, Resources, Invokes, StreamInvokes, EmitList, MetadataType, QueueInvokes>

CommandDefinition<S, MessagePayloadType, MessageParamsType, TransformInputPayload, TransformInputParams, FunctionPayloadType, FunctionParamsType, FunctionOutputType, FinalFunctionOutputType, TransformOutputHookOutput, Resources, Invokes, StreamInvokes, EmitList, MetadataType, QueueInvokes> = object

Defined in: core/types/commandType/CommandDefinition.ts:20

The definition for a command provided by some service.

Type Parameters

S

S extends ServiceClass

MessagePayloadType

MessagePayloadType

MessageParamsType

MessageParamsType

TransformInputPayload

TransformInputPayload

TransformInputParams

TransformInputParams

FunctionPayloadType

FunctionPayloadType

FunctionParamsType

FunctionParamsType

FunctionOutputType

FunctionOutputType

FinalFunctionOutputType

FinalFunctionOutputType

TransformOutputHookOutput

TransformOutputHookOutput

Resources

Resources extends Record<string, unknown>

Invokes

Invokes extends InvokeList

StreamInvokes

StreamInvokes extends StreamInvokeList

EmitList

EmitList extends Record<string, Schema>

MetadataType

MetadataType extends CommandDefinitionMetadataBase = CommandDefinitionMetadataBase

QueueInvokes

QueueInvokes extends QueueInvokeList = QueueInvokeList

Properties

call

call: CommandFunction<S, MessagePayloadType, MessageParamsType, FunctionPayloadType, FunctionParamsType, FunctionOutputType, Resources, Invokes, StreamInvokes, EmitList, QueueInvokes>

Defined in: core/types/commandType/CommandDefinition.ts:49

the command function


commandDescription

commandDescription: string

Defined in: core/types/commandType/CommandDefinition.ts:41

the description of the command


commandName

commandName: string

Defined in: core/types/commandType/CommandDefinition.ts:39

the name of the command


emitList

emitList: EmitList

Defined in: core/types/commandType/CommandDefinition.ts:124


eventBridgeConfig

eventBridgeConfig: DefinitionEventBridgeConfig

Defined in: core/types/commandType/CommandDefinition.ts:45

config information for event bridge


eventName?

optional eventName?: string

Defined in: core/types/commandType/CommandDefinition.ts:63

the eventName for the command response


hooks

hooks: object

Defined in: core/types/commandType/CommandDefinition.ts:65

hooks of command

afterGuard?

optional afterGuard?: Record<string, CommandAfterGuardHook<S, MessagePayloadType, MessageParamsType, FunctionPayloadType, FunctionParamsType, FunctionOutputType, Resources, Invokes, StreamInvokes, EmitList, QueueInvokes>>

beforeGuard?

optional beforeGuard?: Record<string, CommandBeforeGuardHook<S, MessagePayloadType, MessageParamsType, FunctionPayloadType, FunctionParamsType, Resources, Invokes, StreamInvokes, EmitList, QueueInvokes>>

transformInput?

optional transformInput?: object

transformInput.transformFunction

transformFunction: CommandTransformInputHook<S, MessagePayloadType, MessageParamsType, TransformInputPayload, TransformInputParams, FunctionPayloadType, FunctionParamsType>

transformInput.transformInputSchema

transformInputSchema: Schema

transformInput.transformParameterSchema

transformParameterSchema: Schema

transformOutput?

optional transformOutput?: object

transformOutput.transformFunction

transformFunction: CommandTransformOutputHook<S, MessagePayloadType, MessageParamsType, FinalFunctionOutputType, FunctionParamsType, TransformOutputHookOutput>

transformOutput.transformOutputSchema

transformOutputSchema: Schema


invokes

invokes: Invokes

Defined in: core/types/commandType/CommandDefinition.ts:122


metadata

metadata: MetadataType

Defined in: core/types/commandType/CommandDefinition.ts:43

the metadata of the command


queueInvokes

queueInvokes: QueueInvokes

Defined in: core/types/commandType/CommandDefinition.ts:125


schedules?

optional schedules?: ScheduleDefinition[]

Defined in: core/types/commandType/CommandDefinition.ts:47

provider-neutral schedule metadata for short command triggers


streamInvokes

streamInvokes: StreamInvokes

Defined in: core/types/commandType/CommandDefinition.ts:123