PURISTA API / @purista/core
@purista/core
This is the main package of PURISTA.
A backend framework for building message based domain services.
This framework adapts and combines a wide range of different patters from domain driven design, cqrs, microservice, event sourcing and lambda functions.
It is build from ground up in typescript and highly focuses on schema, and auto generation of types, input-output-validation, OpenApi documentation (swagger).
It contains the builders, classes & types and some helper functions. For easier testing of commands and subscriptions, the package contains different mock creation helper based on sinon
Learn PURIST at purista.dev
Enumerations
Classes
Interfaces
Type Aliases
- addPrefixToObject
- AuthCredentials
- BrokerHeaderCommandMsg
- BrokerHeaderCommandResponseMsg
- BrokerHeaderCustomMsg
- ClientBuilderConfig
- ClientBuilderEvents
- Command
- CommandDefinitionBuilderTypes
- CommandDefinitionList
- CommandDefinitionListResolved
- CommandDefinitionMetadataBase
- Complete
- CompressionMethod
- Config
- ConfigFull
- ConfigStoreCacheMap
- Constructor
- ContentType
- ContextBase
- CorrelationId
- CustomMessage
- DefaultConfigStoreConfig
- DefaultEventBridgeConfig
- DefaultSecretStoreConfig
- DefaultStateStoreConfig
- DefinitionEventBridgeConfig
- EBMessage
- EBMessageAddress
- EBMessageBase
- EBMessageId
- EBMessageSenderAddress
- EmitCustomMessageFunction
- EmitSchemaList
- EmptyObject
- ErrorResponsePayload
- EventBridgeAdapterEvents
- EventBridgeConfig
- EventBridgeCustomEvents
- EventBridgeEvents
- EventKey
- EventMap
- FromEmitToOtherType
- FromInvokeToOtherType
- FullDefinition
- FullServiceDefinition
- GetMessageParamsType
- GetMessagePayloadType
- HttpClientConfig
- HttpClientRequestOptions
- HttpExposedServiceMeta
- InferTypeOrEmptyObject
- InfoInvokeTimeout
- InfoInvokeTimeoutPayload
- InfoMessage
- InfoMessageType
- InfoServiceBase
- InfoServiceDrain
- InfoServiceFunctionAdded
- InfoServiceInit
- InfoServiceNotReady
- InfoServiceReady
- InfoServiceShutdown
- InfoSubscriptionError
- InstanceId
- InstanceOrType
- InvokeFunction
- InvokeList
- IsConstructor
- LogFnParamType
- LoggerOptions
- LoggerStubs
- LogLevelName
- NeverObject
- Newable
- NonEmptyString
- ObjectWithKeysFromStringArray
- PendigInvocation
- Prettify
- PrincipalId
- QueryParameter
- SecretStoreCacheMap
- ServiceBuilderTypes
- ServiceClassTypes
- ServiceDefinitions
- ServiceEvents
- ServiceInfoType
- SetNewTypeValue
- SetNewTypeValues
- ShutdownEntry
- StoreBaseConfig
- SubscriptionDefinitionBuilderTypes
- SubscriptionDefinitionList
- SubscriptionDefinitionListResolved
- SubscriptionDefinitionMetadataBase
- SubscriptionStorageEntry
- SupportedHttpMethod
- TenantId
- TraceId
Variables
- CONFIG_FILE_NAME
- configFullSchema
- configSchema
- eventBridgeClientConfigSchema
- httpClientConfigSchema
- infoMessageTypes
- MIN_CONTENT_SIZE_FOR_COMPRESSION
- puristaVersion
- ServiceInfoValidator
Functions
- convertEmitValidationsToSchema
- convertInvokeValidationsToSchema
- createInvokeFunctionProxy
- exportServiceDefinitions
- extendApi
- generateSchema
- getCommandFunctionWithValidation
- getDefaultEventBridgeConfig
- getDefaultLogLevel
- getNewSubscriptionStorageEntry
- getSubscriptionFunctionWithValidation
- getTimeoutPromise
- initDefaultConfigStore
- initDefaultSecretStore
- initDefaultStateStore
- initLogger
- isCustomMessage
- isHttpExposedServiceMeta
- isInfoMessage
- isInfoServiceFunctionAdded
- isMessageMatchingSubscription
- mergeServiceDefintion
- safeBind
- schemaObjectToTsType
- throwIfNotValidMessage
- transformSchemaObject
- validationToSchema
Command
- CommandDefinitionBuilder
- CommandAfterGuardHook
- CommandBeforeGuardHook
- CommandDefinition
- CommandErrorResponse
- CommandFunction
- CommandFunctionContext
- CommandFunctionContextEnhancements
- CommandResponse
- CommandSuccessResponse
- CommandTransformFunctionContext
- CommandTransformInputHook
- CommandTransformOutputHook
- isCommand
- isCommandErrorResponse
- isCommandResponse
- isCommandSuccessResponse
Event bridge
Helper
- convertToCamelCase
- convertToKebabCase
- convertToPascalCase
- convertToSnakeCase
- createErrorResponse
- createInfoMessage
- createSuccessResponse
- deserializeOtp
- getCleanedMessage
- getErrorMessageForCode
- getNewCorrelationId
- getNewEBMessageId
- getNewInstanceId
- getNewTraceId
- getSubscriptionQueueName
- getUniqueId
- gracefulShutdown
- isDevelop
- serializeOtp
Service
Store
- ConfigStoreBaseClass
- DefaultConfigStore
- DefaultSecretStore
- DefaultStateStore
- SecretStoreBaseClass
- StateStoreBaseClass
- ConfigStore
- SecretStore
- StateStore
- ConfigDeleteFunction
- ConfigGetterFunction
- ConfigSetterFunction
- SecretDeleteFunction
- SecretGetterFunction
- SecretSetterFunction
- StateDeleteFunction
- StateGetterFunction
- StateSetterFunction
Subscription
- SubscriptionDefinitionBuilder
- Subscription
- SubscriptionAfterGuardHook
- SubscriptionBeforeGuardHook
- SubscriptionDefinition
- SubscriptionFunction
- SubscriptionFunctionContext
- SubscriptionFunctionContextEnhancements
- SubscriptionTransformFunctionContext
- SubscriptionTransformInputHook
- SubscriptionTransformOutputHook