Skip to content
nestjs-pipeline
Search
Ctrl
K
Cancel
GitHub
Select theme
Dark
Light
Auto
Menu
Start
Overview
Getting started
Architecture
Concepts
Runtime architecture
Pipeline execution model
Pipeline context reference
Guides
Correlation IDs
Writing custom behaviors
A DDD example
The built-in LoggingBehavior
Tracing and metrics
Validation with Zod
Recipes
A command through every layer
Wiring an application
Jobs that keep the request's context
Several tenants in one deployment
@nestjs-pipeline
@nestjs-pipeline/audit
@nestjs-pipeline/cache
@nestjs-pipeline/casl
@nestjs-pipeline/core
@nestjs-pipeline/correlation
@nestjs-pipeline/deadletter
@nestjs-pipeline/feature-flags
@nestjs-pipeline/idempotency
@nestjs-pipeline/job-context
@nestjs-pipeline/opentelemetry
@nestjs-pipeline/rate-limit
@nestjs-pipeline/resilience
@nestjs-pipeline/tenant
@nestjs-pipeline/zod
@cqrs-ddd
@cqrs-ddd/core
@cqrs-ddd/mikro-orm
@cqrs-ddd/safe-stringify
@cqrs-ddd/untyped
@cqrs-ddd/uuidv7
Upgrading
Upgrading from 0.3.x
Upgrading from 0.2.x
Upgrading from 0.1.x
Release notes
What's new in 0.2.2
What's new in 0.2.1
Changelog
API reference
@cqrs-ddd/core
Classes
AggregateRoot
BaseCommand
BaseQuery
CommandBaseHandler
CommandRepository
ConcurrencyConflictError
DomainEvent
DomainException
EntityNotFoundException
InvalidValueException
MemoryCache
MissingTenantContextError
QueryRepository
RootDomainEvent
RootEntity
TransientOperationError
UnknownMutableFieldError
Interfaces
ApplyEventOptions
ApplyMutationOptions
CacheFillOptions
CacheKeyRequestContext
CacheMutationBarrier
CacheOptions
CacheSetOptions
CacheStateEntry
DomainErrorHttpStatus
FromCacheOptions
IAggregateRoot
ICache
ICacheLogger
ICommandRepository
IDomainEventPublisher
IEvent
IPersistenceDialect
IQueryOptions
IQueryRepository
IVersionedCache
IWriteSideAggregateRepository
MutableFieldDefinition
MutableOptions
NumberRuleOptions
PersistedAggregate
PersistedWriteOptions
QueryRepositoryHydration
RootEntitySnapshot
TextRuleOptions
Type Aliases
AggregateBearingResult
CacheBarrierReason
CacheKeyTenantSource
CacheResourceSpecifier
CacheStateStatus
CacheStoredValue
InferPayload
MemoryCacheSetOptions
Method
MutationPatch
NonEmptyEventArray
NumberRule
NumberRuleValue
SingleEvent
TenantResolver
TenantSource
TextRule
TextRuleValue
UniqueErrors
ValueViolation
ValueViolationError
Variables
CACHE_TOKEN
DEFAULT_BARRIER_TTL_MS
DEFAULT_MAX_ENTRIES
Functions
AcknowledgePersisted
ApplyMutation
Cache
cacheKey
cacheKeyTemplate
consoleCacheLogger
createCacheMutationBarrier
deepCloneAndFreeze
domainErrorHttpStatus
FromCache
getMutableFields
isCacheMutationBarrier
isCacheNewer
isTransientOperationError
isVersionedCache
MapPersistenceErrors
Mutable
numberRule
PersistedWrite
persistenceDialect
requireTenant
requireTenantId
safeWarn
setPersistenceDialect
setTenantResolver
textRule
toCacheSnapshot
@cqrs-ddd/mikro-orm
Classes
AggregateRepository
CacheEntry
MikroOrmCache
MikroOrmDialect
TenantStore
UnixTimestampType
Interfaces
IEntityManagerSource
ITransactionalEntityManagerSource
MikroOrmCacheOptions
RootEntityColumns
SqlIdentifierOptions
TenantStoreOptions
VersionedAggregate
Type Aliases
TenantIsolation
Timestamp
Variables
CacheEntrySchema
Functions
assertAutocommit
createCacheEntrySchema
createCacheTableSql
isSqlIdentifier
isTransientPersistenceError
mapPersistenceError
optimisticDelete
optimisticUpdate
rootEntityProperties
versionProperty
@cqrs-ddd/safe-stringify
Interfaces
SanitizeOptions
Type Aliases
StrictJsonValue
Variables
ABSENT_SEGMENT
DEFAULT_REDACT_KEYS
REDACTED
Functions
escapeKeySegment
joinKeySegments
redactValue
safeSanitize
safeStringify
stableStringify
toStrictJsonValue
@cqrs-ddd/untyped
Functions
untyped
@cqrs-ddd/uuidv7
Functions
isUuidV7
uuidv7
@nestjs-pipeline/audit
Classes
AuditBehavior
AuditModule
LogAuditSink
PostgresAuditSink
Interfaces
AuditActor
AuditBehaviorOptions
AuditError
AuditLoggerLike
AuditModuleAsyncOptions
AuditModuleOptions
AuditRecord
AuditSink
BuildAuditRecordInput
BuildAuditStartRecordInput
LogAuditSinkOptions
PostgresAuditSinkOptions
PostgresQueryableLike
Type Aliases
AuditActorFactory
AuditIntentOptions
AuditMetadataFactory
AuditOutcome
AuditRedactor
AuditRequestKind
AuditSeverity
AuditStartRecord
Variables
AUDIT_DEFAULT_OPTIONS
AUDIT_OUTCOMES
AUDIT_RECORD_ITEM
AUDIT_RECORD_ITEM_TOKEN
AUDIT_REQUEST_KINDS
AUDIT_SEVERITY
AUDIT_SINK
AUDIT_START_RECORD_ITEM_TOKEN
DEFAULT_REDACT_KEYS
REDACTED
Functions
audit
buildAuditRecord
buildAuditStartRecord
createAuditTableSql
redactValue
@nestjs-pipeline/cache
Classes
CacheBehavior
CacheManagerAdapter
CacheModule
MissingCachePartitionError
Interfaces
CacheBehaviorOptions
CacheModuleAsyncOptions
CacheModuleOptions
CacheStoreConfig
IPipelineCache
PartitionedCacheKeyOptions
Type Aliases
CacheCondition
CacheIntentOptions
CacheKeyFactory
CachePartitionDimension
CacheStoreType
Variables
CACHE_DEFAULT_OPTIONS
CACHE_HIT_ITEM
CACHE_HIT_ITEM_TOKEN
CACHE_KEY_ITEM
CACHE_KEY_ITEM_TOKEN
PIPELINE_CACHE
Functions
buildCache
buildCacheAttributes
buildKeyv
cache
createPartitionedCacheKeyFactory
@nestjs-pipeline/casl
Classes
CaslAuthorizer
CaslBehavior
CaslModule
MissingAbilityError
UnauthorizedActionException
UnauthorizedActionFilter
Interfaces
AbilityRequirement
Capability
CaslAuthorizationInput
CaslBehaviorOptions
CaslModuleOptions
CaslPrincipal
ICaslPermissionSource
UnauthorizedActionDetails
Type Aliases
AppAbility
AppRawRule
CapabilityString
CaslAction
CaslSubject
Projected
Variables
CASL_ABILITY_KEY
CASL_ACTIONS
CASL_BEHAVIOR_ID
CASL_PERMISSION_SOURCE
CASL_PRINCIPAL_KEY
CASL_SUBJECTS
Functions
abilityDigest
buildAbility
getCaslAbility
getCaslPrincipal
hasEntityConditions
interpolateConditions
normalizeCapability
parseCapabilityString
requireAbilityDigest
requires
serializeCapability
@nestjs-pipeline/core
Classes
BasePipelineContext
LoggingBehavior
MissingPartitionError
MissingPipelineItemError
PipelineConfigurationError
PipelineContext
PipelineModule
Interfaces
ContextSource
ContextSources
CorrelationSource
GlobalBehaviorsOptions
IPipelineBehavior
IPipelineBehaviorContract
IPipelineBehaviorOptionsResolver
IPipelineContext
LoggingBehaviorOptions
PipelineBehaviorDiagnostic
PipelineBehaviorOrderRule
PipelineBehaviorValidationContext
PipelineHandlerMeta
PipelineItemToken
PipelineModuleAsyncOptions
PipelineModuleFeatureOptions
PipelineModuleOptions
PipelineOptionsFactory
TenantPartitionOptions
Type Aliases
BehaviorId
ErrorClass
GlobalBehaviorScope
LoggingIntentOptions
NextDelegate
PipelineBehaviorEntry
PipelineBehaviorOrder
PipelineBehaviorTuple
PipelineLoggerProvider
PipelineRuntimeOptions
Variables
LOGGING_BEHAVIOR_LOGGER
PIPELINE_BEHAVIOR_CONTRACT
PIPELINE_BEHAVIOR_ID
PIPELINE_BEHAVIORS_METADATA
PIPELINE_BEHAVIORS_OPTIONS_METADATA
PIPELINE_SKIPPED_BEHAVIORS_METADATA
pipelineStore
SET_TENANT_ID
Functions
createPipelineItem
getBehaviorId
getPipelineItem
hasPipelineItem
logging
requirePipelineItem
setPipelineItem
SkipPipeline
tenantSegments
toPostgresJson
UsePipeline
@nestjs-pipeline/correlation
Classes
HttpCorrelationMiddleware
Interfaces
CorrelationDecoratorOptions
CorrelationOptions
Type Aliases
CorrelationExtractor
WithCorrelationId
Variables
CORRELATION_OPTIONS
CorrelationFrom
correlationSource
DEFAULT_CORRELATION_HEADER
DEFAULT_CORRELATION_ID_MAX_LENGTH
DEFAULT_CORRELATION_ID_PATTERN
Functions
addCorrelationId
correlationHeaders
getCorrelationId
runWithCorrelationId
WithCorrelation
@nestjs-pipeline/deadletter
Classes
BullMqDeadLetterTransport
DeadLetterBehavior
DeadLetterModule
DeadLetterRedriveError
DeadLetterRedriver
PostgresDeadLetterTransport
RabbitMqDeadLetterTransport
Interfaces
BullMqDeadLetterTransportOptions
BullMqQueueLike
DeadLetterBehaviorOptions
DeadLetterError
DeadLetterListFilter
DeadLetterModuleAsyncOptions
DeadLetterModuleOptions
DeadLetterRecord
DeadLetterRedriveResult
DeadLetterRedriverOptions
DeadLetterStore
DeadLetterTransport
PostgresDeadLetterTransportOptions
PostgresQueryableLike
RabbitMqConfirmChannelLike
RabbitMqDeadLetterTransportOptions
Type Aliases
DeadLetterDispatch
DeadLetterIntentOptions
DeadLetterMetadataFactory
DeadLetterRequestKind
DeadLetterStatus
Variables
DEAD_LETTER_DEFAULT_OPTIONS
DEAD_LETTER_ITEM
DEAD_LETTER_ITEM_TOKEN
DEAD_LETTER_TRANSPORT
DEFAULT_REDACT_KEYS
REDACTED
Functions
buildDeadLetterAttributes
buildDeadLetterRecord
createDeadLetterTableSql
deadLetter
redactValue
@nestjs-pipeline/feature-flags
Classes
FeatureDisabledError
FeatureDisabledFilter
FeatureFlagBehavior
FeatureFlagEvaluationError
FeatureFlagsModule
Interfaces
FeatureDisabledFilterOptions
FeatureFlagBehaviorOptions
FeatureFlagDecision
FeatureFlagsModuleOptions
Type Aliases
EvaluationContextFactory
FeatureFallbackFactory
FeatureFlagErrorPolicy
FeatureFlagIntentOptions
TargetingKeyFactory
Variables
FEATURE_FLAG_DECISION_ITEM
FEATURE_FLAG_DECISION_ITEM_TOKEN
FEATURE_FLAG_ITEM
FEATURE_FLAG_ITEM_TOKEN
FEATURE_FLAG_KEY_ITEM
FEATURE_FLAG_KEY_ITEM_TOKEN
FEATURE_FLAGS_CLIENT
FEATURE_FLAGS_DEFAULT_CONTEXT
FEATURE_FLAGS_DEFAULT_OPTIONS
FEATURE_FLAGS_TARGETING_KEY_FACTORY
Functions
baseEvaluationContext
buildEvaluationContext
buildFeatureFlagAttributes
featureFlag
@nestjs-pipeline/idempotency
Classes
IdempotencyBehavior
IdempotencyCompletionError
IdempotencyConflictError
IdempotencyConflictFilter
IdempotencyModule
MemoryIdempotencyStore
MissingIdempotencyPartitionError
PostgresIdempotencyStore
RedisIdempotencyStore
Interfaces
IdempotencyBehaviorOptions
IdempotencyModuleAsyncOptions
IdempotencyModuleOptions
IdempotencyRecord
IdempotencyStore
MemoryIdempotencyStoreOptions
PartitionedIdempotencyKeyOptions
PostgresIdempotencyStoreOptions
PostgresQueryableLike
PostgresQueryResultLike
PostgresRowLike
RedisClientLike
RedisIdempotencyStoreOptions
Type Aliases
IdempotencyConflictReason
IdempotencyFinalizationPhase
IdempotencyIntentOptions
IdempotencyKeyFactory
IdempotencyOperationFactory
IdempotencyPartitionDimension
IdempotencyPrincipalFactory
IdempotencyReplayScopeFactory
IdempotencyRequestKind
IdempotencyStatus
JsonValue
MaybePromise
Variables
DEFAULT_IDEMPOTENCY_TTL_MS
IDEMPOTENCY_DEFAULT_OPTIONS
IDEMPOTENCY_KEY_ITEM
IDEMPOTENCY_KEY_ITEM_TOKEN
IDEMPOTENCY_OWNERSHIP_LOST_ITEM
IDEMPOTENCY_OWNERSHIP_LOST_ITEM_TOKEN
IDEMPOTENCY_REPLAYED_ITEM
IDEMPOTENCY_REPLAYED_ITEM_TOKEN
IDEMPOTENCY_STORE
Functions
buildIdempotencyAttributes
createIdempotencyTableSql
createPartitionedIdempotencyKeyFactory
fingerprintValue
idempotent
@nestjs-pipeline/job-context
Classes
InvalidJobContextError
JobContextModule
MissingJobContextError
Interfaces
AsSystemOptions
ContextSource
CorrelationSource
IJobPrincipal
InJobContextOptions
JobContext
JobContextOptions
JobContextSources
PrincipalReference
Type Aliases
WithJobContext
Functions
AsSystem
InJobContext
withJobContext
@nestjs-pipeline/opentelemetry
Classes
AttributesBehavior
MetricsBehavior
TraceBehavior
Interfaces
AttributesBehaviorOptions
MetricsBehaviorOptions
TraceBehaviorOptions
Type Aliases
MetricsIntentOptions
PipelineTelemetryAttributeFactory
TraceIntentOptions
Variables
PIPELINE_OTEL_ATTRIBUTES
PIPELINE_TELEMETRY_ATTRIBUTES
Functions
addPipelineTelemetryAttributes
buildMetricAttributes
buildTraceAttributes
getPipelineTelemetryAttributes
metrics
trace
@nestjs-pipeline/rate-limit
Classes
MissingRateLimitPartitionError
RateLimitBehavior
RateLimitExceededError
RateLimitExceededFilter
RateLimitModule
Interfaces
PartitionedRateLimitKeyOptions
RateLimitBehaviorOptions
RateLimiterLike
RateLimiterResLike
RateLimitModuleAsyncOptions
RateLimitModuleOptions
Type Aliases
RateLimitCostFactory
RateLimitIntentOptions
RateLimitKeyFactory
RateLimitPartitionDimension
RateLimitPartitionFactory
Variables
RATE_LIMIT_DEFAULT_OPTIONS
RATE_LIMIT_ITEM
RATE_LIMIT_ITEM_TOKEN
RATE_LIMIT_KEY_ITEM
RATE_LIMIT_KEY_ITEM_TOKEN
RATE_LIMITER
Functions
buildRateLimitAttributes
buildRateLimitKey
createPartitionedRateLimitKeyFactory
rateLimit
@nestjs-pipeline/resilience
Enumerations
CircuitState
Classes
BrokenCircuitError
BulkheadRejectedError
IsolatedCircuitError
ResilienceBehavior
ResilienceConfigurationError
ResilienceModule
ResiliencePolicies
ResiliencePolicyConfigurationError
TaskCancelledError
Interfaces
BulkheadOptions
CircuitBreakerOptions
PolicyBuildContext
ResilienceBehaviorOptions
ResilienceModuleAsyncOptions
ResilienceModuleOptions
ResiliencePolicyOptions
ResilienceTelemetry
ResilienceTelemetryEvent
RetryOptions
RetryPolicyOptions
TimeoutOptions
TimeoutPolicyOptions
Type Aliases
AnyPolicy
BreakerStrategy
FallbackOptions
HandlerResilienceLayer
JitterStrategy
ResilienceIntentOptions
ResilienceLayer
RetryBackoff
Variables
isBrokenCircuitError
isBulkheadRejectedError
isIsolatedCircuitError
isTaskCancelledError
RESILIENCE_DEFAULT_OPTIONS
Functions
buildResiliencePolicy
getResilienceAbortSignal
getResiliencePolicyToken
InjectResiliencePolicy
resilience
@nestjs-pipeline/tenant
Variables
tenantSource
Functions
currentTenantId
runWithTenant
@nestjs-pipeline/zod
Classes
ZodValidationBehavior
ZodValidationError
ZodValidationFilter
Interfaces
ZodMapper
Type Aliases
AbstractConstructor
InferInput
InferOutput
ZodCommandClass
ZodQueryClass
ZodRequestClass
Variables
ZOD_RAW_INPUT_KEY
ZOD_SCHEMA_KEY
ZOD_VALIDATED_DATA_KEY
Functions
createCommand
createQuery
createZodMapper
createZodRequest
getRawInput
getValidatedData
updatable
updatableFieldsOf
zodBadRequest
HTTP API
Overview
Users
/users
GET
/users
POST
/users/{id}
GET
/users/{id}
DELETE
/users/{id}
PATCH
/users/{id}/overview
GET
Roles
/roles
GET
/roles
POST
/roles/{id}
GET
/roles/{id}
DELETE
/roles/{id}
PATCH
Auths
/auths/login
POST
/auths/refresh
POST
/auths/logout
POST
GitHub
Select theme
Dark
Light
Auto
@cqrs-ddd/uuidv7
Functions
Section titled “Functions”
isUuidV7
uuidv7