@nestarc/outbox
Classes
LocalTransport
Defined in: src/transports/local.transport.ts:10
Implements
Constructors
Constructor
new LocalTransport(tenantProvider?): LocalTransport;Defined in: src/transports/local.transport.ts:11
Parameters
| Parameter | Type |
|---|---|
tenantProvider? | OutboxTenantProvider | null |
Returns
Methods
dispatch()
dispatch(
record,
handlers,
context?): Promise<void>;Defined in: src/transports/local.transport.ts:17
Parameters
| Parameter | Type |
|---|---|
record | OutboxRecord |
handlers | OutboxHandler[] |
context | OutboxHandlerContext |
Returns
Promise<void>
Implementation of
OutboxAdminService
Defined in: src/outbox.admin.service.ts:38
Constructors
Constructor
new OutboxAdminService(options): OutboxAdminService;Defined in: src/outbox.admin.service.ts:39
Parameters
| Parameter | Type |
|---|---|
options | OutboxOptions |
Returns
Methods
getById()
getById(id): Promise<OutboxRecord | null>;Defined in: src/outbox.admin.service.ts:124
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<OutboxRecord | null>
getHealth()
getHealth(options?): Promise<OutboxHealth>;Defined in: src/outbox.admin.service.ts:215
Parameters
| Parameter | Type |
|---|---|
options | OutboxHealthOptions |
Returns
Promise<OutboxHealth>
getStats()
getStats(): Promise<OutboxStats>;Defined in: src/outbox.admin.service.ts:41
Returns
Promise<OutboxStats>
list()
list(options?): Promise<OutboxRecord[]>;Defined in: src/outbox.admin.service.ts:77
Parameters
| Parameter | Type |
|---|---|
options | OutboxListOptions |
Returns
Promise<OutboxRecord[]>
markFailed()
markFailed(id, reason): Promise<boolean>;Defined in: src/outbox.admin.service.ts:177
Parameters
| Parameter | Type |
|---|---|
id | string |
reason | string |
Returns
Promise<boolean>
purgeSent()
purgeSent(options): Promise<number>;Defined in: src/outbox.admin.service.ts:193
Parameters
| Parameter | Type |
|---|---|
options | { before: Date; limit?: number; } |
options.before | Date |
options.limit? | number |
Returns
Promise<number>
retry()
retry(id): Promise<boolean>;Defined in: src/outbox.admin.service.ts:138
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<boolean>
retryMany()
retryMany(ids): Promise<number>;Defined in: src/outbox.admin.service.ts:155
Parameters
| Parameter | Type |
|---|---|
ids | string[] |
Returns
Promise<number>
OutboxEmitter
Defined in: src/outbox.emitter.ts:37
Constructors
Constructor
new OutboxEmitter(options, tenantProvider?): OutboxEmitter;Defined in: src/outbox.emitter.ts:41
Parameters
| Parameter | Type |
|---|---|
options | OutboxOptions |
tenantProvider? | OutboxTenantProvider | null |
Returns
Methods
emit()
emit(
tx,
event,
options?): Promise<void>;Defined in: src/outbox.emitter.ts:50
Parameters
| Parameter | Type |
|---|---|
tx | PrismaTransactionClient |
event | OutboxEvent |
options? | OutboxEmitOptions |
Returns
Promise<void>
emitMany()
emitMany(tx, events): Promise<void>;Defined in: src/outbox.emitter.ts:92
Parameters
| Parameter | Type |
|---|---|
tx | PrismaTransactionClient |
events | OutboxEmitManyEntry[] |
Returns
Promise<void>
abstract OutboxEvent
Defined in: src/outbox.event.ts:1
Constructors
Constructor
new OutboxEvent(): OutboxEvent;Returns
Methods
getEventType()
getEventType(): string;Defined in: src/outbox.event.ts:10
Returns
string
toPayload()
toPayload(): Record<string, unknown>;Defined in: src/outbox.event.ts:2
Returns
Record<string, unknown>
OutboxListener
Defined in: src/outbox.listener.ts:24
Implements
OnModuleInitOnApplicationShutdown
Constructors
Constructor
new OutboxListener(options, poller): OutboxListener;Defined in: src/outbox.listener.ts:30
Parameters
| Parameter | Type |
|---|---|
options | OutboxOptions |
poller | Pick<OutboxPoller, "poll"> |
Returns
Methods
onApplicationShutdown()
onApplicationShutdown(): Promise<void>;Defined in: src/outbox.listener.ts:41
Returns
Promise<void>
Implementation of
OnApplicationShutdown.onApplicationShutdownonModuleInit()
onModuleInit(): Promise<void>;Defined in: src/outbox.listener.ts:36
Returns
Promise<void>
Implementation of
OnModuleInit.onModuleInitOutboxModule
Defined in: src/outbox.module.ts:28
Constructors
Constructor
new OutboxModule(): OutboxModule;Returns
Methods
forRoot()
static forRoot(options): DynamicModule;Defined in: src/outbox.module.ts:29
Parameters
| Parameter | Type |
|---|---|
options | OutboxOptions |
Returns
DynamicModule
forRootAsync()
static forRootAsync(options): DynamicModule;Defined in: src/outbox.module.ts:79
Parameters
| Parameter | Type |
|---|---|
options | OutboxAsyncOptions |
Returns
DynamicModule
Interfaces
OutboxAsyncOptions
Defined in: src/interfaces/outbox-options.interface.ts:44
Extends
Pick<ModuleMetadata,"imports">
Properties
imports?
optional imports?: (
| DynamicModule
| Type<any>
| Promise<DynamicModule>
| ForwardReference<any>)[];Defined in: node_modules/@nestjs/common/interfaces/modules/module-metadata.interface.d.ts:18
Optional list of imported modules that export the providers which are required in this module.
Inherited from
Pick.importsinject?
optional inject?: any[];Defined in: src/interfaces/outbox-options.interface.ts:45
isGlobal?
optional isGlobal?: boolean;Defined in: src/interfaces/outbox-options.interface.ts:51
transport?
optional transport?: Type<
| OutboxTransport
| OutboxPublisher>;Defined in: src/interfaces/outbox-options.interface.ts:50
Custom transport class. Defaults to LocalTransport.
useClass?
optional useClass?: Type<OutboxOptionsFactory>;Defined in: src/interfaces/outbox-options.interface.ts:47
useExisting?
optional useExisting?: Type<OutboxOptionsFactory>;Defined in: src/interfaces/outbox-options.interface.ts:48
useFactory?
optional useFactory?: (...args) =>
| OutboxOptions
| Promise<OutboxOptions>;Defined in: src/interfaces/outbox-options.interface.ts:46
Parameters
| Parameter | Type |
|---|---|
...args | any[] |
Returns
| OutboxOptions | Promise<OutboxOptions>
OutboxDeliveryOptions
Defined in: src/interfaces/outbox-options.interface.ts:20
Properties
mode?
optional mode?: "local" | "publisher";Defined in: src/interfaces/outbox-options.interface.ts:21
OutboxDispatchContext
Defined in: src/interfaces/outbox-hooks.interface.ts:14
Extended by
Properties
aggregateId
aggregateId: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:22
aggregateType
aggregateType: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:21
causationId
causationId: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:26
correlationId
correlationId: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:25
eventId
eventId: string;Defined in: src/interfaces/outbox-hooks.interface.ts:16
eventType
eventType: string;Defined in: src/interfaces/outbox-hooks.interface.ts:17
headers
headers: Record<string, string>;Defined in: src/interfaces/outbox-hooks.interface.ts:27
idempotencyKey
idempotencyKey: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:24
maxRetries
maxRetries: number;Defined in: src/interfaces/outbox-hooks.interface.ts:20
partitionKey
partitionKey: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:23
record
record: OutboxRecord;Defined in: src/interfaces/outbox-hooks.interface.ts:15
retryCount
retryCount: number;Defined in: src/interfaces/outbox-hooks.interface.ts:19
tenantId
tenantId: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:18
OutboxEmitContext
Defined in: src/interfaces/outbox-hooks.interface.ts:4
Extends
Required<OutboxEmitOptions>
Properties
aggregateId
aggregateId: string | null;Defined in: src/interfaces/outbox-emit-options.interface.ts:6
Inherited from
aggregateType
aggregateType: string | null;Defined in: src/interfaces/outbox-emit-options.interface.ts:5
Inherited from
OutboxEmitOptions.aggregateType
causationId
causationId: string | null;Defined in: src/interfaces/outbox-emit-options.interface.ts:10
Inherited from
correlationId
correlationId: string | null;Defined in: src/interfaces/outbox-emit-options.interface.ts:9
Inherited from
OutboxEmitOptions.correlationId
eventType
eventType: string;Defined in: src/interfaces/outbox-hooks.interface.ts:5
headers
headers: Record<string, string>;Defined in: src/interfaces/outbox-emit-options.interface.ts:11
Inherited from
idempotencyKey
idempotencyKey: string | null;Defined in: src/interfaces/outbox-emit-options.interface.ts:8
Inherited from
OutboxEmitOptions.idempotencyKey
occurredAt
occurredAt: Date | null;Defined in: src/interfaces/outbox-emit-options.interface.ts:12
Inherited from
partitionKey
partitionKey: string | null;Defined in: src/interfaces/outbox-emit-options.interface.ts:7
Inherited from
OutboxEmitOptions.partitionKey
payload
payload: Record<string, unknown>;Defined in: src/interfaces/outbox-hooks.interface.ts:6
tenantId
tenantId: string | null;Defined in: src/interfaces/outbox-emit-options.interface.ts:4
Inherited from
OutboxEmitOptions
Defined in: src/interfaces/outbox-emit-options.interface.ts:3
Properties
aggregateId?
optional aggregateId?: string | null;Defined in: src/interfaces/outbox-emit-options.interface.ts:6
aggregateType?
optional aggregateType?: string | null;Defined in: src/interfaces/outbox-emit-options.interface.ts:5
causationId?
optional causationId?: string | null;Defined in: src/interfaces/outbox-emit-options.interface.ts:10
correlationId?
optional correlationId?: string | null;Defined in: src/interfaces/outbox-emit-options.interface.ts:9
headers?
optional headers?: Record<string, string>;Defined in: src/interfaces/outbox-emit-options.interface.ts:11
idempotencyKey?
optional idempotencyKey?: string | null;Defined in: src/interfaces/outbox-emit-options.interface.ts:8
occurredAt?
optional occurredAt?: Date | null;Defined in: src/interfaces/outbox-emit-options.interface.ts:12
partitionKey?
optional partitionKey?: string | null;Defined in: src/interfaces/outbox-emit-options.interface.ts:7
tenantId?
optional tenantId?: string | null;Defined in: src/interfaces/outbox-emit-options.interface.ts:4
OutboxHandler
Defined in: src/interfaces/outbox-handler.interface.ts:1
Properties
eventTypes
eventTypes: string[];Defined in: src/interfaces/outbox-handler.interface.ts:4
instance
instance: Record<string, any>;Defined in: src/interfaces/outbox-handler.interface.ts:2
methodName
methodName: string;Defined in: src/interfaces/outbox-handler.interface.ts:3
OutboxHandlerContext
Defined in: src/interfaces/outbox-handler-context.interface.ts:3
Properties
eventId
eventId: string;Defined in: src/interfaces/outbox-handler-context.interface.ts:5
eventType
eventType: string;Defined in: src/interfaces/outbox-handler-context.interface.ts:6
headers
headers: Record<string, string>;Defined in: src/interfaces/outbox-handler-context.interface.ts:9
record
record: OutboxRecord;Defined in: src/interfaces/outbox-handler-context.interface.ts:4
retryCount
retryCount: number;Defined in: src/interfaces/outbox-handler-context.interface.ts:8
tenantId
tenantId: string | null;Defined in: src/interfaces/outbox-handler-context.interface.ts:7
OutboxHealth
Defined in: src/interfaces/outbox-admin.interface.ts:26
Properties
ok
ok: boolean;Defined in: src/interfaces/outbox-admin.interface.ts:27
reasons
reasons: string[];Defined in: src/interfaces/outbox-admin.interface.ts:29
stats
stats: OutboxStats;Defined in: src/interfaces/outbox-admin.interface.ts:28
OutboxHealthOptions
Defined in: src/interfaces/outbox-admin.interface.ts:21
Properties
maxFailedCount?
optional maxFailedCount?: number;Defined in: src/interfaces/outbox-admin.interface.ts:23
maxOldestPendingAgeMs?
optional maxOldestPendingAgeMs?: number;Defined in: src/interfaces/outbox-admin.interface.ts:22
OutboxHooks
Defined in: src/interfaces/outbox-hooks.interface.ts:36
Methods
onDeadLetter()?
optional onDeadLetter(context): void | Promise<void>;Defined in: src/interfaces/outbox-hooks.interface.ts:50
Parameters
| Parameter | Type |
|---|---|
context | OutboxRetryContext |
Returns
void | Promise<void>
onDispatchFailure()?
optional onDispatchFailure(context): void | Promise<void>;Defined in: src/interfaces/outbox-hooks.interface.ts:43
Parameters
| Parameter | Type |
|---|---|
context | OutboxDispatchContext & { durationMs: number; error: Error; } |
Returns
void | Promise<void>
onDispatchStart()?
optional onDispatchStart(context): void | Promise<void>;Defined in: src/interfaces/outbox-hooks.interface.ts:39
Parameters
| Parameter | Type |
|---|---|
context | OutboxDispatchContext |
Returns
void | Promise<void>
onDispatchSuccess()?
optional onDispatchSuccess(context): void | Promise<void>;Defined in: src/interfaces/outbox-hooks.interface.ts:40
Parameters
| Parameter | Type |
|---|---|
context | OutboxDispatchContext & { durationMs: number; } |
Returns
void | Promise<void>
onEmit()?
optional onEmit(context): void | Promise<void>;Defined in: src/interfaces/outbox-hooks.interface.ts:37
Parameters
| Parameter | Type |
|---|---|
context | OutboxEmitContext |
Returns
void | Promise<void>
onPollStart()?
optional onPollStart(context): void | Promise<void>;Defined in: src/interfaces/outbox-hooks.interface.ts:38
Parameters
| Parameter | Type |
|---|---|
context | OutboxPollContext |
Returns
void | Promise<void>
onRetryScheduled()?
optional onRetryScheduled(context): void | Promise<void>;Defined in: src/interfaces/outbox-hooks.interface.ts:49
Parameters
| Parameter | Type |
|---|---|
context | OutboxRetryContext |
Returns
void | Promise<void>
OutboxListOptions
Defined in: src/interfaces/outbox-admin.interface.ts:12
Properties
after?
optional after?: Date;Defined in: src/interfaces/outbox-admin.interface.ts:18
before?
optional before?: Date;Defined in: src/interfaces/outbox-admin.interface.ts:17
eventType?
optional eventType?: string;Defined in: src/interfaces/outbox-admin.interface.ts:14
limit?
optional limit?: number;Defined in: src/interfaces/outbox-admin.interface.ts:16
status?
optional status?: "PENDING" | "PROCESSING" | "SENT" | "FAILED";Defined in: src/interfaces/outbox-admin.interface.ts:13
tenantId?
optional tenantId?: string;Defined in: src/interfaces/outbox-admin.interface.ts:15
OutboxNotification
Defined in: src/interfaces/outbox-wakeup.interface.ts:1
Properties
channel
channel: string;Defined in: src/interfaces/outbox-wakeup.interface.ts:2
payload?
optional payload?: string;Defined in: src/interfaces/outbox-wakeup.interface.ts:3
OutboxNotificationClient
Defined in: src/interfaces/outbox-wakeup.interface.ts:6
Methods
connect()
connect(): Promise<void>;Defined in: src/interfaces/outbox-wakeup.interface.ts:7
Returns
Promise<void>
end()
end(): Promise<void>;Defined in: src/interfaces/outbox-wakeup.interface.ts:9
Returns
Promise<void>
on()
on(event, handler): this;Defined in: src/interfaces/outbox-wakeup.interface.ts:10
Parameters
| Parameter | Type |
|---|---|
event | string |
handler | (payload) => void |
Returns
this
query()
query(sql): Promise<unknown>;Defined in: src/interfaces/outbox-wakeup.interface.ts:8
Parameters
| Parameter | Type |
|---|---|
sql | string |
Returns
Promise<unknown>
OutboxOptions
Defined in: src/interfaces/outbox-options.interface.ts:24
Properties
delivery?
optional delivery?: OutboxDeliveryOptions;Defined in: src/interfaces/outbox-options.interface.ts:35
events?
optional events?: Type<any>[];Defined in: src/interfaces/outbox-options.interface.ts:39
hooks?
optional hooks?: OutboxHooks;Defined in: src/interfaces/outbox-options.interface.ts:37
isGlobal?
optional isGlobal?: boolean;Defined in: src/interfaces/outbox-options.interface.ts:40
polling?
optional polling?: OutboxPollingOptions;Defined in: src/interfaces/outbox-options.interface.ts:31
prisma
prisma: any;Defined in: src/interfaces/outbox-options.interface.ts:30
forRoot: PrismaService class reference (resolved via DI, must be in a
Global
module). forRootAsync: resolved PrismaService instance from the factory. The instance must satisfy PrismaLike ($executeRaw, $queryRaw).
retry?
optional retry?: OutboxRetryOptions;Defined in: src/interfaces/outbox-options.interface.ts:32
stuckThreshold?
optional stuckThreshold?: number;Defined in: src/interfaces/outbox-options.interface.ts:41
tenancy?
optional tenancy?: OutboxTenancyOptions;Defined in: src/interfaces/outbox-options.interface.ts:36
transport?
optional transport?: Type<
| OutboxTransport
| OutboxPublisher>;Defined in: src/interfaces/outbox-options.interface.ts:34
Custom transport class. Defaults to LocalTransport (in-process handler invocation).
wakeup?
optional wakeup?: OutboxWakeupOptions;Defined in: src/interfaces/outbox-options.interface.ts:38
OutboxOptionsFactory
Defined in: src/interfaces/outbox-options.interface.ts:54
Methods
createOutboxOptions()
createOutboxOptions():
| OutboxOptions
| Promise<OutboxOptions>;Defined in: src/interfaces/outbox-options.interface.ts:55
Returns
| OutboxOptions | Promise<OutboxOptions>
OutboxPollContext
Defined in: src/interfaces/outbox-hooks.interface.ts:9
Properties
batchSize
batchSize: number;Defined in: src/interfaces/outbox-hooks.interface.ts:10
deliveryMode
deliveryMode: "local" | "publisher";Defined in: src/interfaces/outbox-hooks.interface.ts:11
OutboxPollingOptions
Defined in: src/interfaces/outbox-options.interface.ts:8
Properties
batchSize?
optional batchSize?: number;Defined in: src/interfaces/outbox-options.interface.ts:11
enabled?
optional enabled?: boolean;Defined in: src/interfaces/outbox-options.interface.ts:9
interval?
optional interval?: number;Defined in: src/interfaces/outbox-options.interface.ts:10
OutboxPublisher
Defined in: src/interfaces/outbox-publisher.interface.ts:3
Methods
publish()
publish(record): Promise<void>;Defined in: src/interfaces/outbox-publisher.interface.ts:4
Parameters
| Parameter | Type |
|---|---|
record | OutboxRecord |
Returns
Promise<void>
OutboxRecord
Defined in: src/interfaces/outbox-record.interface.ts:1
Properties
aggregateId
aggregateId: string | null;Defined in: src/interfaces/outbox-record.interface.ts:14
aggregateType
aggregateType: string | null;Defined in: src/interfaces/outbox-record.interface.ts:13
causationId
causationId: string | null;Defined in: src/interfaces/outbox-record.interface.ts:18
correlationId
correlationId: string | null;Defined in: src/interfaces/outbox-record.interface.ts:17
createdAt
createdAt: Date;Defined in: src/interfaces/outbox-record.interface.ts:6
eventType
eventType: string;Defined in: src/interfaces/outbox-record.interface.ts:3
headers
headers: Record<string, string>;Defined in: src/interfaces/outbox-record.interface.ts:19
id
id: string;Defined in: src/interfaces/outbox-record.interface.ts:2
idempotencyKey
idempotencyKey: string | null;Defined in: src/interfaces/outbox-record.interface.ts:16
lastError
lastError: string | null;Defined in: src/interfaces/outbox-record.interface.ts:11
maxRetries
maxRetries: number;Defined in: src/interfaces/outbox-record.interface.ts:10
occurredAt
occurredAt: Date;Defined in: src/interfaces/outbox-record.interface.ts:20
partitionKey
partitionKey: string | null;Defined in: src/interfaces/outbox-record.interface.ts:15
payload
payload: Record<string, unknown>;Defined in: src/interfaces/outbox-record.interface.ts:4
processedAt
processedAt: Date | null;Defined in: src/interfaces/outbox-record.interface.ts:8
retryCount
retryCount: number;Defined in: src/interfaces/outbox-record.interface.ts:9
status
status: "PENDING" | "PROCESSING" | "SENT" | "FAILED";Defined in: src/interfaces/outbox-record.interface.ts:5
tenantId
tenantId: string | null;Defined in: src/interfaces/outbox-record.interface.ts:12
updatedAt
updatedAt: Date;Defined in: src/interfaces/outbox-record.interface.ts:7
OutboxRetryContext
Defined in: src/interfaces/outbox-hooks.interface.ts:30
Extends
Properties
aggregateId
aggregateId: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:22
Inherited from
OutboxDispatchContext.aggregateId
aggregateType
aggregateType: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:21
Inherited from
OutboxDispatchContext.aggregateType
causationId
causationId: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:26
Inherited from
OutboxDispatchContext.causationId
correlationId
correlationId: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:25
Inherited from
OutboxDispatchContext.correlationId
error
error: Error;Defined in: src/interfaces/outbox-hooks.interface.ts:31
eventId
eventId: string;Defined in: src/interfaces/outbox-hooks.interface.ts:16
Inherited from
eventType
eventType: string;Defined in: src/interfaces/outbox-hooks.interface.ts:17
Inherited from
OutboxDispatchContext.eventType
headers
headers: Record<string, string>;Defined in: src/interfaces/outbox-hooks.interface.ts:27
Inherited from
idempotencyKey
idempotencyKey: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:24
Inherited from
OutboxDispatchContext.idempotencyKey
maxRetries
maxRetries: number;Defined in: src/interfaces/outbox-hooks.interface.ts:33
Overrides
OutboxDispatchContext.maxRetries
partitionKey
partitionKey: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:23
Inherited from
OutboxDispatchContext.partitionKey
record
record: OutboxRecord;Defined in: src/interfaces/outbox-hooks.interface.ts:15
Inherited from
retryCount
retryCount: number;Defined in: src/interfaces/outbox-hooks.interface.ts:32
Overrides
OutboxDispatchContext.retryCount
tenantId
tenantId: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:18
Inherited from
OutboxDispatchContext.tenantId
OutboxRetryOptions
Defined in: src/interfaces/outbox-options.interface.ts:14
Properties
backoff?
optional backoff?: "fixed" | "exponential";Defined in: src/interfaces/outbox-options.interface.ts:16
initialDelay?
optional initialDelay?: number;Defined in: src/interfaces/outbox-options.interface.ts:17
maxRetries?
optional maxRetries?: number;Defined in: src/interfaces/outbox-options.interface.ts:15
OutboxStats
Defined in: src/interfaces/outbox-admin.interface.ts:3
Properties
failed
failed: number;Defined in: src/interfaces/outbox-admin.interface.ts:7
oldestPendingAgeMs
oldestPendingAgeMs: number | null;Defined in: src/interfaces/outbox-admin.interface.ts:8
oldestProcessingAgeMs
oldestProcessingAgeMs: number | null;Defined in: src/interfaces/outbox-admin.interface.ts:9
pending
pending: number;Defined in: src/interfaces/outbox-admin.interface.ts:4
processing
processing: number;Defined in: src/interfaces/outbox-admin.interface.ts:5
sent
sent: number;Defined in: src/interfaces/outbox-admin.interface.ts:6
OutboxTenancyOptions
Defined in: src/interfaces/outbox-tenancy.interface.ts:8
Properties
provider?
optional provider?:
| OutboxTenantProvider
| Type<OutboxTenantProvider>;Defined in: src/interfaces/outbox-tenancy.interface.ts:9
OutboxTenantProvider
Defined in: src/interfaces/outbox-tenancy.interface.ts:3
Methods
getTenantId()?
optional getTenantId():
| string
| Promise<string | null | undefined>
| null
| undefined;Defined in: src/interfaces/outbox-tenancy.interface.ts:4
Returns
| string | Promise<string | null | undefined> | null | undefined
runWithTenant()?
optional runWithTenant<T>(tenantId, fn): Promise<T>;Defined in: src/interfaces/outbox-tenancy.interface.ts:5
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
tenantId | string |
fn | () => Promise<T> |
Returns
Promise<T>
OutboxTransport
Defined in: src/interfaces/outbox-transport.interface.ts:5
Methods
dispatch()
dispatch(
record,
handlers,
context?): Promise<void>;Defined in: src/interfaces/outbox-transport.interface.ts:6
Parameters
| Parameter | Type |
|---|---|
record | OutboxRecord |
handlers | OutboxHandler[] |
context? | OutboxHandlerContext |
Returns
Promise<void>
OutboxWakeupOptions
Defined in: src/interfaces/outbox-wakeup.interface.ts:13
Properties
channel?
optional channel?: string;Defined in: src/interfaces/outbox-wakeup.interface.ts:15
clientFactory?
optional clientFactory?: () =>
| OutboxNotificationClient
| Promise<OutboxNotificationClient | null>
| null;Defined in: src/interfaces/outbox-wakeup.interface.ts:18
Returns
| OutboxNotificationClient | Promise<OutboxNotificationClient | null> | null
connectionString?
optional connectionString?: string;Defined in: src/interfaces/outbox-wakeup.interface.ts:16
enabled?
optional enabled?: boolean;Defined in: src/interfaces/outbox-wakeup.interface.ts:14
reconnectDelay?
optional reconnectDelay?: number;Defined in: src/interfaces/outbox-wakeup.interface.ts:17
Type Aliases
OutboxEmitManyEntry
type OutboxEmitManyEntry =
| OutboxEvent
| {
event: OutboxEvent;
options?: OutboxEmitOptions;
};Defined in: src/interfaces/outbox-emit-options.interface.ts:15
PrismaLike
type PrismaLike = PrismaTransactionClient & {
$executeRawUnsafe?: Promise<number>;
$queryRawUnsafe?: Promise<T>;
};Defined in: src/interfaces/prisma-transaction-client.interface.ts:16
Minimal type for PrismaService instance (used by OutboxPoller for polling queries).
Type Declaration
| Name | Type | Defined in |
|---|---|---|
$executeRawUnsafe()? | (query, ...values) => Promise<number> | src/interfaces/prisma-transaction-client.interface.ts:17 |
$queryRawUnsafe()? | (query, ...values) => Promise<T> | src/interfaces/prisma-transaction-client.interface.ts:18 |
PrismaTransactionClient
type PrismaTransactionClient = {
$executeRaw: Promise<number>;
$executeRawUnsafe?: Promise<number>;
$queryRaw: Promise<T>;
$queryRawUnsafe?: Promise<T>;
};Defined in: src/interfaces/prisma-transaction-client.interface.ts:2
Minimal type for Prisma interactive transaction client (inside $transaction callback).
Methods
$executeRaw()
$executeRaw(query, ...values): Promise<number>;Defined in: src/interfaces/prisma-transaction-client.interface.ts:3
Parameters
| Parameter | Type |
|---|---|
query | TemplateStringsArray |
...values | unknown[] |
Returns
Promise<number>
$executeRawUnsafe()?
optional $executeRawUnsafe(query, ...values): Promise<number>;Defined in: src/interfaces/prisma-transaction-client.interface.ts:7
Parameters
| Parameter | Type |
|---|---|
query | string |
...values | unknown[] |
Returns
Promise<number>
$queryRaw()
$queryRaw<T>(query, ...values): Promise<T>;Defined in: src/interfaces/prisma-transaction-client.interface.ts:8
Type Parameters
| Type Parameter | Default type |
|---|---|
T | unknown |
Parameters
| Parameter | Type |
|---|---|
query | TemplateStringsArray |
...values | unknown[] |
Returns
Promise<T>
$queryRawUnsafe()?
optional $queryRawUnsafe<T>(query, ...values): Promise<T>;Defined in: src/interfaces/prisma-transaction-client.interface.ts:12
Type Parameters
| Type Parameter | Default type |
|---|---|
T | unknown |
Parameters
| Parameter | Type |
|---|---|
query | string |
...values | unknown[] |
Returns
Promise<T>
Variables
OUTBOX_EVENT_METADATA
const OUTBOX_EVENT_METADATA: typeof OUTBOX_EVENT_METADATA;Defined in: src/outbox.constants.ts:4
OUTBOX_OPTIONS
const OUTBOX_OPTIONS: typeof OUTBOX_OPTIONS;Defined in: src/outbox.constants.ts:1
OUTBOX_TENANT_PROVIDER
const OUTBOX_TENANT_PROVIDER: typeof OUTBOX_TENANT_PROVIDER;Defined in: src/outbox.constants.ts:3
OUTBOX_TRANSPORT
const OUTBOX_TRANSPORT: typeof OUTBOX_TRANSPORT;Defined in: src/outbox.constants.ts:2
Functions
OnOutboxEvent()
function OnOutboxEvent(...events): MethodDecorator;Defined in: src/outbox.decorator.ts:9
Parameters
| Parameter | Type |
|---|---|
...events | OutboxEventClass[] |
Returns
MethodDecorator