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, EmitList, MetadataType>

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

Defined in: packages/core/src/core/types/commandType/CommandDefinition.ts:18

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, any>

Invokes

Invokes extends InvokeList

EmitList

EmitList extends Record<string, Schema>

MetadataType

MetadataType extends CommandDefinitionMetadataBase = CommandDefinitionMetadataBase

Properties

call

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

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

the command function


commandDescription

commandDescription: string

Defined in: packages/core/src/core/types/commandType/CommandDefinition.ts:37

the description of the command


commandName

commandName: string

Defined in: packages/core/src/core/types/commandType/CommandDefinition.ts:35

the name of the command


emitList

emitList: EmitList

Defined in: packages/core/src/core/types/commandType/CommandDefinition.ts:111


eventBridgeConfig

eventBridgeConfig: DefinitionEventBridgeConfig

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

config information for event bridge


eventName?

optional eventName: string

Defined in: packages/core/src/core/types/commandType/CommandDefinition.ts:55

the eventName for the command response


hooks

hooks: object

Defined in: packages/core/src/core/types/commandType/CommandDefinition.ts:57

hooks of command

afterGuard?

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

beforeGuard?

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

transformInput?

optional transformInput: object

transformInput.transformFunction

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

transformInput.transformInputSchema

transformInput.transformInputSchema: Schema

transformInput.transformParameterSchema

transformInput.transformParameterSchema: Schema

transformOutput?

optional transformOutput: object

transformOutput.transformFunction

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

transformOutput.transformOutputSchema

transformOutput.transformOutputSchema: Schema


invokes

invokes: Invokes

Defined in: packages/core/src/core/types/commandType/CommandDefinition.ts:110


metadata

metadata: MetadataType

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

the metadata of the command