Skip to content

PURISTA API


PURISTA API / @purista/core / SubscriptionDefinition

Type Alias: SubscriptionDefinition<S, TransformInputPayload, TransformInputParams, FunctionPayloadType, FunctionParamsType, FunctionOutputType, FinalFunctionOutputType, TransformOutputHookOutput, Resources, Invokes, EmitList, MetadataType>

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

Defined in: packages/core/src/core/types/subscription/SubscriptionDefinition.ts:22

The definition for a subscription provided by some service.

Type Parameters

S

S extends ServiceClass

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 SubscriptionDefinitionMetadataBase = SubscriptionDefinitionMetadataBase

Properties

call

call: SubscriptionFunction<S, FunctionPayloadType, FunctionParamsType, FunctionOutputType, Resources, Invokes, EmitList>

Defined in: packages/core/src/core/types/subscription/SubscriptionDefinition.ts:45

the subscription function


deprecated

deprecated: boolean

Defined in: packages/core/src/core/types/subscription/SubscriptionDefinition.ts:119


emitEventName?

optional emitEventName: string

Defined in: packages/core/src/core/types/subscription/SubscriptionDefinition.ts:73

event name to be used for custom message if the subscription functions returns value


emitList

emitList: EmitList

Defined in: packages/core/src/core/types/subscription/SubscriptionDefinition.ts:118


eventBridgeConfig

eventBridgeConfig: DefinitionEventBridgeConfig

Defined in: packages/core/src/core/types/subscription/SubscriptionDefinition.ts:43

config information for event bridge


eventName?

optional eventName: string

Defined in: packages/core/src/core/types/subscription/SubscriptionDefinition.ts:71

filter forevent name


hooks

hooks: object

Defined in: packages/core/src/core/types/subscription/SubscriptionDefinition.ts:79

hooks of subscription

afterGuard?

optional afterGuard: Record<string, SubscriptionAfterGuardHook<S, FunctionPayloadType, FunctionParamsType, FunctionOutputType, Resources, Invokes, EmitList>>

beforeGuard?

optional beforeGuard: Record<string, SubscriptionBeforeGuardHook<S, FunctionPayloadType, FunctionParamsType, Resources, Invokes, EmitList>>

transformInput?

optional transformInput: object

transformInput.transformFunction

transformInput.transformFunction: SubscriptionTransformInputHook<S, TransformInputPayload, TransformInputParams, FunctionPayloadType, FunctionParamsType>

transformInput.transformInputSchema

transformInput.transformInputSchema: Schema

transformInput.transformParameterSchema

transformInput.transformParameterSchema: Schema

transformOutput?

optional transformOutput: object

transformOutput.transformFunction

transformOutput.transformFunction: SubscriptionTransformOutputHook<S, FinalFunctionOutputType, FunctionParamsType, TransformOutputHookOutput>

transformOutput.transformOutputSchema

transformOutput.transformOutputSchema: Schema


invokes

invokes: Invokes

Defined in: packages/core/src/core/types/subscription/SubscriptionDefinition.ts:117


messageType?

optional messageType: EBMessageType

Defined in: packages/core/src/core/types/subscription/SubscriptionDefinition.ts:69

filter for message type


metadata

metadata: MetadataType

Defined in: packages/core/src/core/types/subscription/SubscriptionDefinition.ts:41

the metadata of the subscription


principalId?

optional principalId: PrincipalId

Defined in: packages/core/src/core/types/subscription/SubscriptionDefinition.ts:75

filter for principal id


receiver?

optional receiver: object

Defined in: packages/core/src/core/types/subscription/SubscriptionDefinition.ts:62

filter for messages consumed by given receiver

instanceId?

optional instanceId: InstanceId

serviceName?

optional serviceName: string

serviceTarget?

optional serviceTarget: string

serviceVersion?

optional serviceVersion: string


sender?

optional sender: object

Defined in: packages/core/src/core/types/subscription/SubscriptionDefinition.ts:55

filter for messages produced by given sender

instanceId?

optional instanceId: InstanceId

serviceName?

optional serviceName: string

serviceTarget?

optional serviceTarget: string

serviceVersion?

optional serviceVersion: string


subscriptionDescription

subscriptionDescription: string

Defined in: packages/core/src/core/types/subscription/SubscriptionDefinition.ts:39

the description of the subscription


subscriptionName

subscriptionName: string

Defined in: packages/core/src/core/types/subscription/SubscriptionDefinition.ts:37

the name of the subscription


tenantId?

optional tenantId: TenantId

Defined in: packages/core/src/core/types/subscription/SubscriptionDefinition.ts:77

filter for tenant id