@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:613
Privileged global outbox control-plane access. The package does not perform caller authentication or RBAC for this service.
Extends
OutboxAdminBase<OutboxListOptions>
Constructors
Constructor
new OutboxAdminService(options): OutboxAdminService;Defined in: src/outbox.admin.service.ts:614
Parameters
| Parameter | Type |
|---|---|
options | OutboxOptions |
Returns
Overrides
OutboxAdminBase<OutboxListOptions>.constructorMethods
getById()
getById(id): Promise<OutboxRecord | null>;Defined in: src/outbox.admin.service.ts:254
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<OutboxRecord | null>
Inherited from
OutboxAdminBase.getByIdgetHealth()
getHealth(options?): Promise<OutboxHealth>;Defined in: src/outbox.admin.service.ts:463
Parameters
| Parameter | Type |
|---|---|
options | OutboxHealthOptions |
Returns
Promise<OutboxHealth>
Inherited from
OutboxAdminBase.getHealthgetStats()
getStats(): Promise<OutboxStats>;Defined in: src/outbox.admin.service.ts:71
Returns
Promise<OutboxStats>
Inherited from
OutboxAdminBase.getStatslist()
list(options?): Promise<OutboxRecord[]>;Defined in: src/outbox.admin.service.ts:126
Parameters
| Parameter | Type |
|---|---|
options | OutboxListOptions |
Returns
Promise<OutboxRecord[]>
Inherited from
OutboxAdminBase.listlistPage()
listPage(options?): Promise<OutboxListPage>;Defined in: src/outbox.admin.service.ts:184
Deterministic descending pagination. The cursor is an opaque, versioned, exclusive boundary over (created_at, id).
Parameters
| Parameter | Type |
|---|---|
options | OutboxListOptions & { cursor?: string; } |
Returns
Promise<OutboxListPage>
Inherited from
OutboxAdminBase.listPagemarkFailed()
markFailed(id, reason): Promise<OutboxAdminMutationResult>;Defined in: src/outbox.admin.service.ts:375
Parameters
| Parameter | Type |
|---|---|
id | string |
reason | string |
Returns
Promise<OutboxAdminMutationResult>
Inherited from
OutboxAdminBase.markFailedpurgeSent()
purgeSent(options): Promise<number>;Defined in: src/outbox.admin.service.ts:432
Parameters
| Parameter | Type |
|---|---|
options | { before: Date; limit?: number; } |
options.before | Date |
options.limit? | number |
Returns
Promise<number>
Inherited from
OutboxAdminBase.purgeSentretry()
retry(id): Promise<OutboxAdminMutationResult>;Defined in: src/outbox.admin.service.ts:275
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<OutboxAdminMutationResult>
Inherited from
OutboxAdminBase.retryretryMany()
retryMany(ids): Promise<number>;Defined in: src/outbox.admin.service.ts:329
Parameters
| Parameter | Type |
|---|---|
ids | string[] |
Returns
Promise<number>
Inherited from
OutboxAdminBase.retryManyOutboxConfigurationError
Defined in: src/errors/outbox-configuration.error.ts:3
Extends
Error
Constructors
Constructor
new OutboxConfigurationError(option, message): OutboxConfigurationError;Defined in: src/errors/outbox-configuration.error.ts:6
Parameters
| Parameter | Type |
|---|---|
option | string |
message | string |
Returns
Overrides
Error.constructorProperties
cause?
optional cause?: unknown;Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Error.causecode
readonly code: "OUTBOX_INVALID_CONFIGURATION" = OUTBOX_INVALID_CONFIGURATION;Defined in: src/errors/outbox-configuration.error.ts:4
message
message: string;Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Error.messagename
name: string;Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Error.nameoption
readonly option: string;Defined in: src/errors/outbox-configuration.error.ts:7
stack?
optional stack?: string;Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Error.stackstackTraceLimit
static stackTraceLimit: number;Defined in: node_modules/@types/node/globals.d.ts:68
The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Error.stackTraceLimitMethods
captureStackTrace()
static captureStackTrace(targetObject, constructorOpt?): void;Defined in: node_modules/@types/node/globals.d.ts:52
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.
The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();Parameters
| Parameter | Type |
|---|---|
targetObject | object |
constructorOpt? | Function |
Returns
void
Inherited from
Error.captureStackTraceprepareStackTrace()
static prepareStackTrace(err, stackTraces): any;Defined in: node_modules/@types/node/globals.d.ts:56
Parameters
| Parameter | Type |
|---|---|
err | Error |
stackTraces | CallSite[] |
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Error.prepareStackTraceOutboxCursorError
Defined in: src/errors/outbox-cursor.error.ts:4
Stable admin pagination error for malformed or unsupported cursors.
Extends
Error
Constructors
Constructor
new OutboxCursorError(message?): OutboxCursorError;Defined in: src/errors/outbox-cursor.error.ts:7
Parameters
| Parameter | Type | Default value |
|---|---|---|
message | string | 'Outbox cursor is malformed or unsupported' |
Returns
Overrides
Error.constructorProperties
cause?
optional cause?: unknown;Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Error.causecode
readonly code: "OUTBOX_INVALID_CURSOR" = OUTBOX_INVALID_CURSOR;Defined in: src/errors/outbox-cursor.error.ts:5
message
message: string;Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Error.messagename
name: string;Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Error.namestack?
optional stack?: string;Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Error.stackstackTraceLimit
static stackTraceLimit: number;Defined in: node_modules/@types/node/globals.d.ts:68
The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Error.stackTraceLimitMethods
captureStackTrace()
static captureStackTrace(targetObject, constructorOpt?): void;Defined in: node_modules/@types/node/globals.d.ts:52
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.
The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();Parameters
| Parameter | Type |
|---|---|
targetObject | object |
constructorOpt? | Function |
Returns
void
Inherited from
Error.captureStackTraceprepareStackTrace()
static prepareStackTrace(err, stackTraces): any;Defined in: node_modules/@types/node/globals.d.ts:56
Parameters
| Parameter | Type |
|---|---|
err | Error |
stackTraces | CallSite[] |
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Error.prepareStackTraceOutboxEmitter
Defined in: src/outbox.emitter.ts:52
Constructors
Constructor
new OutboxEmitter(options, tenantProvider?): OutboxEmitter;Defined in: src/outbox.emitter.ts:56
Parameters
| Parameter | Type |
|---|---|
options | OutboxOptions |
tenantProvider? | OutboxTenantProvider | null |
Returns
Methods
emit()
emit(
tx,
event,
options?): Promise<void>;Defined in: src/outbox.emitter.ts:65
Parameters
| Parameter | Type |
|---|---|
tx | PrismaTransactionClient |
event | OutboxEvent |
options? | OutboxEmitOptions |
Returns
Promise<void>
emitMany()
emitMany(tx, events): Promise<void>;Defined in: src/outbox.emitter.ts:78
Parameters
| Parameter | Type |
|---|---|
tx | PrismaTransactionClient |
events | OutboxEmitManyEntry[] |
Returns
Promise<void>
OutboxEnvelopeError
Defined in: src/errors/outbox-envelope.error.ts:14
Stable producer-side validation error thrown before any database call.
Extends
Error
Constructors
Constructor
new OutboxEnvelopeError(
field,
reason,
message): OutboxEnvelopeError;Defined in: src/errors/outbox-envelope.error.ts:17
Parameters
| Parameter | Type |
|---|---|
field | string |
reason | OutboxEnvelopeErrorReason |
message | string |
Returns
Overrides
Error.constructorProperties
cause?
optional cause?: unknown;Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Error.causecode
readonly code: "OUTBOX_INVALID_ENVELOPE" = OUTBOX_INVALID_ENVELOPE;Defined in: src/errors/outbox-envelope.error.ts:15
field
readonly field: string;Defined in: src/errors/outbox-envelope.error.ts:18
message
message: string;Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Error.messagename
name: string;Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Error.namereason
readonly reason: OutboxEnvelopeErrorReason;Defined in: src/errors/outbox-envelope.error.ts:19
stack?
optional stack?: string;Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Error.stackstackTraceLimit
static stackTraceLimit: number;Defined in: node_modules/@types/node/globals.d.ts:68
The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Error.stackTraceLimitMethods
captureStackTrace()
static captureStackTrace(targetObject, constructorOpt?): void;Defined in: node_modules/@types/node/globals.d.ts:52
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.
The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();Parameters
| Parameter | Type |
|---|---|
targetObject | object |
constructorOpt? | Function |
Returns
void
Inherited from
Error.captureStackTraceprepareStackTrace()
static prepareStackTrace(err, stackTraces): any;Defined in: node_modules/@types/node/globals.d.ts:56
Parameters
| Parameter | Type |
|---|---|
err | Error |
stackTraces | CallSite[] |
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Error.prepareStackTraceabstract 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:39
Implements
OnModuleInitOnApplicationShutdown
Constructors
Constructor
new OutboxListener(
options,
poller,
schemaGuard?): OutboxListener;Defined in: src/outbox.listener.ts:49
Parameters
| Parameter | Type |
|---|---|
options | OutboxOptions |
poller | Pick<OutboxPoller, "requestPoll"> |
schemaGuard? | OutboxSchemaGuard |
Returns
Methods
onApplicationShutdown()
onApplicationShutdown(): Promise<void>;Defined in: src/outbox.listener.ts:83
Returns
Promise<void>
Implementation of
OnApplicationShutdown.onApplicationShutdownonModuleInit()
onModuleInit(): Promise<void>;Defined in: src/outbox.listener.ts:56
Returns
Promise<void>
Implementation of
OnModuleInit.onModuleInitOutboxModule
Defined in: src/outbox.module.ts:34
Constructors
Constructor
new OutboxModule(): OutboxModule;Returns
Methods
forRoot()
static forRoot(options): DynamicModule;Defined in: src/outbox.module.ts:35
Parameters
| Parameter | Type |
|---|---|
options | OutboxOptions |
Returns
DynamicModule
forRootAsync()
static forRootAsync(options): DynamicModule;Defined in: src/outbox.module.ts:87
Parameters
| Parameter | Type |
|---|---|
options | OutboxAsyncOptions |
Returns
DynamicModule
OutboxPersistedInvariantError
Defined in: src/errors/outbox-persisted-invariant.error.ts:4
Extends
Error
Constructors
Constructor
new OutboxPersistedInvariantError(
eventId,
field,
message): OutboxPersistedInvariantError;Defined in: src/errors/outbox-persisted-invariant.error.ts:7
Parameters
| Parameter | Type |
|---|---|
eventId | string | null |
field | string |
message | string |
Returns
Overrides
Error.constructorProperties
cause?
optional cause?: unknown;Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Error.causecode
readonly code: "OUTBOX_PERSISTED_INVARIANT_VIOLATION" = OUTBOX_PERSISTED_INVARIANT_VIOLATION;Defined in: src/errors/outbox-persisted-invariant.error.ts:5
eventId
readonly eventId: string | null;Defined in: src/errors/outbox-persisted-invariant.error.ts:8
field
readonly field: string;Defined in: src/errors/outbox-persisted-invariant.error.ts:9
message
message: string;Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Error.messagename
name: string;Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Error.namestack?
optional stack?: string;Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Error.stackstackTraceLimit
static stackTraceLimit: number;Defined in: node_modules/@types/node/globals.d.ts:68
The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Error.stackTraceLimitMethods
captureStackTrace()
static captureStackTrace(targetObject, constructorOpt?): void;Defined in: node_modules/@types/node/globals.d.ts:52
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.
The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();Parameters
| Parameter | Type |
|---|---|
targetObject | object |
constructorOpt? | Function |
Returns
void
Inherited from
Error.captureStackTraceprepareStackTrace()
static prepareStackTrace(err, stackTraces): any;Defined in: node_modules/@types/node/globals.d.ts:56
Parameters
| Parameter | Type |
|---|---|
err | Error |
stackTraces | CallSite[] |
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Error.prepareStackTraceOutboxSchemaError
Defined in: src/errors/outbox-schema.error.ts:3
Extends
Error
Constructors
Constructor
new OutboxSchemaError(
requiredVersion,
actualVersion,
missing): OutboxSchemaError;Defined in: src/errors/outbox-schema.error.ts:7
Parameters
| Parameter | Type |
|---|---|
requiredVersion | string |
actualVersion | string |
missing | readonly string[] |
Returns
Overrides
Error.constructorProperties
actualVersion
readonly actualVersion: string;Defined in: src/errors/outbox-schema.error.ts:9
cause?
optional cause?: unknown;Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Error.causecode
readonly code: "OUTBOX_SCHEMA_MISMATCH" = OUTBOX_SCHEMA_MISMATCH;Defined in: src/errors/outbox-schema.error.ts:5
message
message: string;Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Error.messagemissing
readonly missing: readonly string[];Defined in: src/errors/outbox-schema.error.ts:10
name
readonly name: "OutboxSchemaError" = 'OutboxSchemaError';Defined in: src/errors/outbox-schema.error.ts:4
Overrides
Error.namerequiredVersion
readonly requiredVersion: string;Defined in: src/errors/outbox-schema.error.ts:8
stack?
optional stack?: string;Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Error.stackstackTraceLimit
static stackTraceLimit: number;Defined in: node_modules/@types/node/globals.d.ts:68
The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Error.stackTraceLimitMethods
captureStackTrace()
static captureStackTrace(targetObject, constructorOpt?): void;Defined in: node_modules/@types/node/globals.d.ts:52
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.
The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();Parameters
| Parameter | Type |
|---|---|
targetObject | object |
constructorOpt? | Function |
Returns
void
Inherited from
Error.captureStackTraceprepareStackTrace()
static prepareStackTrace(err, stackTraces): any;Defined in: node_modules/@types/node/globals.d.ts:56
Parameters
| Parameter | Type |
|---|---|
err | Error |
stackTraces | CallSite[] |
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Error.prepareStackTraceOutboxTenantAdminService
Defined in: src/outbox.admin.service.ts:636
Creates an outbox admin API whose every query is fenced by one expected tenant id. The caller remains responsible for authorizing that identity.
Constructors
Constructor
new OutboxTenantAdminService(options): OutboxTenantAdminService;Defined in: src/outbox.admin.service.ts:637
Parameters
| Parameter | Type |
|---|---|
options | OutboxOptions |
Returns
Methods
forTenant()
forTenant(expectedTenantId): OutboxTenantAdminScope;Defined in: src/outbox.admin.service.ts:641
Parameters
| Parameter | Type |
|---|---|
expectedTenantId | string |
Returns
OutboxTenantAdminScope
OutboxWakeupUnavailableError
Defined in: src/errors/outbox-wakeup-unavailable.error.ts:7
Raised during module initialization when both the polling scheduler and the PostgreSQL wakeup transport are unavailable.
Extends
Error
Constructors
Constructor
new OutboxWakeupUnavailableError(cause): OutboxWakeupUnavailableError;Defined in: src/errors/outbox-wakeup-unavailable.error.ts:10
Parameters
| Parameter | Type |
|---|---|
cause | Error |
Returns
Overrides
Error.constructorProperties
cause?
optional cause?: unknown;Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Error.causecode
readonly code: "OUTBOX_WAKEUP_UNAVAILABLE" = OUTBOX_WAKEUP_UNAVAILABLE;Defined in: src/errors/outbox-wakeup-unavailable.error.ts:8
message
message: string;Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Error.messagename
name: string;Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Error.namestack?
optional stack?: string;Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Error.stackstackTraceLimit
static stackTraceLimit: number;Defined in: node_modules/@types/node/globals.d.ts:68
The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Error.stackTraceLimitMethods
captureStackTrace()
static captureStackTrace(targetObject, constructorOpt?): void;Defined in: node_modules/@types/node/globals.d.ts:52
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.
The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();Parameters
| Parameter | Type |
|---|---|
targetObject | object |
constructorOpt? | Function |
Returns
void
Inherited from
Error.captureStackTraceprepareStackTrace()
static prepareStackTrace(err, stackTraces): any;Defined in: node_modules/@types/node/globals.d.ts:56
Parameters
| Parameter | Type |
|---|---|
err | Error |
stackTraces | CallSite[] |
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Error.prepareStackTraceInterfaces
OutboxAsyncOptions
Defined in: src/interfaces/outbox-options.interface.ts:75
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:76
isGlobal?
optional isGlobal?: boolean;Defined in: src/interfaces/outbox-options.interface.ts:86
tenantProvider?
optional tenantProvider?:
| OutboxTenantProvider
| Type<OutboxTenantProvider>;Defined in: src/interfaces/outbox-options.interface.ts:85
Nest-created tenant provider class or an already-created provider value.
transport?
optional transport?: Type<
| OutboxTransport
| OutboxPublisher>;Defined in: src/interfaces/outbox-options.interface.ts:83
Nest-created custom transport class. Defaults to LocalTransport.
useClass?
optional useClass?: Type<OutboxOptionsFactory>;Defined in: src/interfaces/outbox-options.interface.ts:80
useExisting?
optional useExisting?: Type<OutboxOptionsFactory>;Defined in: src/interfaces/outbox-options.interface.ts:81
useFactory?
optional useFactory?: (...args) =>
| OutboxAsyncRuntimeOptions
| Promise<OutboxAsyncRuntimeOptions>;Defined in: src/interfaces/outbox-options.interface.ts:77
Parameters
| Parameter | Type |
|---|---|
...args | any[] |
Returns
| OutboxAsyncRuntimeOptions | Promise<OutboxAsyncRuntimeOptions>
OutboxAsyncRuntimeOptions
Defined in: src/interfaces/outbox-options.interface.ts:66
Runtime values produced by an async options factory. Nest provider registrations are intentionally owned by OutboxAsyncOptions so their dependencies can participate in the module graph before the factory resolves.
Extends
Omit<OutboxOptions,"isGlobal"|"tenancy"|"transport">
Properties
delivery?
optional delivery?: OutboxDeliveryOptions;Defined in: src/interfaces/outbox-options.interface.ts:49
Inherited from
events?
optional events?: Type<any>[];Defined in: src/interfaces/outbox-options.interface.ts:54
Inherited from
hooks?
optional hooks?: OutboxHooks;Defined in: src/interfaces/outbox-options.interface.ts:51
Inherited from
isGlobal?
optional isGlobal?: undefined;Defined in: src/interfaces/outbox-options.interface.ts:71
lease?
optional lease?: OutboxLeaseOptions;Defined in: src/interfaces/outbox-options.interface.ts:53
Inherited from
polling?
optional polling?: OutboxPollingOptions;Defined in: src/interfaces/outbox-options.interface.ts:45
Inherited from
prisma
prisma: any;Defined in: src/interfaces/outbox-options.interface.ts:44
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).
Inherited from
retry?
optional retry?: OutboxRetryOptions;Defined in: src/interfaces/outbox-options.interface.ts:46
Inherited from
stuckThreshold?
optional stuckThreshold?: number;Defined in: src/interfaces/outbox-options.interface.ts:57
Deprecated
Use lease.duration. Retained as a lease-duration compatibility alias.
Inherited from
tenancy?
optional tenancy?: Omit<OutboxTenancyOptions, "provider"> & {
provider?: undefined;
};Defined in: src/interfaces/outbox-options.interface.ts:70
Type Declaration
provider?
optional provider?: undefined;transport?
optional transport?: undefined;Defined in: src/interfaces/outbox-options.interface.ts:72
wakeup?
optional wakeup?: OutboxWakeupOptions;Defined in: src/interfaces/outbox-options.interface.ts:52
Inherited from
OutboxDeliveryOptions
Defined in: src/interfaces/outbox-options.interface.ts:25
Properties
mode?
optional mode?: "local" | "publisher";Defined in: src/interfaces/outbox-options.interface.ts:26
OutboxDispatchContext
Defined in: src/interfaces/outbox-hooks.interface.ts:22
Extended by
Properties
aggregateId
readonly aggregateId: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:30
aggregateType
readonly aggregateType: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:29
causationId
readonly causationId: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:34
correlationId
readonly correlationId: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:33
eventId
readonly eventId: string;Defined in: src/interfaces/outbox-hooks.interface.ts:24
eventType
readonly eventType: string;Defined in: src/interfaces/outbox-hooks.interface.ts:25
headers
readonly headers: Readonly<Record<string, string>>;Defined in: src/interfaces/outbox-hooks.interface.ts:35
idempotencyKey
readonly idempotencyKey: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:32
maxRetries
readonly maxRetries: number;Defined in: src/interfaces/outbox-hooks.interface.ts:28
partitionKey
readonly partitionKey: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:31
record
readonly record: OutboxRecord;Defined in: src/interfaces/outbox-hooks.interface.ts:23
retryCount
readonly retryCount: number;Defined in: src/interfaces/outbox-hooks.interface.ts:27
tenantId
readonly tenantId: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:26
OutboxEmitContext
Defined in: src/interfaces/outbox-hooks.interface.ts:3
Properties
aggregateId
readonly aggregateId: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:8
aggregateType
readonly aggregateType: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:7
causationId
readonly causationId: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:12
correlationId
readonly correlationId: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:11
eventType
readonly eventType: string;Defined in: src/interfaces/outbox-hooks.interface.ts:4
headers
readonly headers: Readonly<Record<string, string>>;Defined in: src/interfaces/outbox-hooks.interface.ts:13
idempotencyKey
readonly idempotencyKey: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:10
occurredAt
readonly occurredAt: Date | null;Defined in: src/interfaces/outbox-hooks.interface.ts:14
partitionKey
readonly partitionKey: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:9
payload
readonly payload: Readonly<Record<string, unknown>>;Defined in: src/interfaces/outbox-hooks.interface.ts:5
tenantId
readonly tenantId: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:6
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
readonly eventId: string;Defined in: src/interfaces/outbox-handler-context.interface.ts:5
eventType
readonly eventType: string;Defined in: src/interfaces/outbox-handler-context.interface.ts:6
headers
readonly headers: Readonly<Record<string, string>>;Defined in: src/interfaces/outbox-handler-context.interface.ts:9
record
readonly record: OutboxRecord;Defined in: src/interfaces/outbox-handler-context.interface.ts:4
retryCount
readonly retryCount: number;Defined in: src/interfaces/outbox-handler-context.interface.ts:8
tenantId
readonly tenantId: string | null;Defined in: src/interfaces/outbox-handler-context.interface.ts:7
OutboxHealth
Defined in: src/interfaces/outbox-admin.interface.ts:40
Properties
ok
ok: boolean;Defined in: src/interfaces/outbox-admin.interface.ts:41
reasons
reasons: string[];Defined in: src/interfaces/outbox-admin.interface.ts:43
stats
stats: OutboxStats;Defined in: src/interfaces/outbox-admin.interface.ts:42
OutboxHealthOptions
Defined in: src/interfaces/outbox-admin.interface.ts:35
Properties
maxFailedCount?
optional maxFailedCount?: number;Defined in: src/interfaces/outbox-admin.interface.ts:37
maxOldestPendingAgeMs?
optional maxOldestPendingAgeMs?: number;Defined in: src/interfaces/outbox-admin.interface.ts:36
OutboxHooks
Defined in: src/interfaces/outbox-hooks.interface.ts:44
Methods
onDeadLetter()?
optional onDeadLetter(context): void | Promise<void>;Defined in: src/interfaces/outbox-hooks.interface.ts:58
Parameters
| Parameter | Type |
|---|---|
context | OutboxRetryContext |
Returns
void | Promise<void>
onDispatchFailure()?
optional onDispatchFailure(context): void | Promise<void>;Defined in: src/interfaces/outbox-hooks.interface.ts:51
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:47
Parameters
| Parameter | Type |
|---|---|
context | OutboxDispatchContext |
Returns
void | Promise<void>
onDispatchSuccess()?
optional onDispatchSuccess(context): void | Promise<void>;Defined in: src/interfaces/outbox-hooks.interface.ts:48
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:45
Parameters
| Parameter | Type |
|---|---|
context | OutboxEmitContext |
Returns
void | Promise<void>
onPollStart()?
optional onPollStart(context): void | Promise<void>;Defined in: src/interfaces/outbox-hooks.interface.ts:46
Parameters
| Parameter | Type |
|---|---|
context | OutboxPollContext |
Returns
void | Promise<void>
onRetryScheduled()?
optional onRetryScheduled(context): void | Promise<void>;Defined in: src/interfaces/outbox-hooks.interface.ts:57
Parameters
| Parameter | Type |
|---|---|
context | OutboxRetryContext |
Returns
void | Promise<void>
OutboxLeaseOptions
Defined in: src/interfaces/outbox-options.interface.ts:29
Properties
duration?
optional duration?: number;Defined in: src/interfaces/outbox-options.interface.ts:31
Claim lifetime in milliseconds. Defaults to stuckThreshold or 300000.
heartbeatFailureTolerance?
optional heartbeatFailureTolerance?: number;Defined in: src/interfaces/outbox-options.interface.ts:35
Consecutive heartbeat errors tolerated before abandoning the claim. Defaults to 1.
heartbeatInterval?
optional heartbeatInterval?: number;Defined in: src/interfaces/outbox-options.interface.ts:33
Active callback heartbeat interval in milliseconds. Defaults to duration / 3.
OutboxListOptions
Defined in: src/interfaces/outbox-admin.interface.ts:12
Extended by
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
OutboxListPage
Defined in: src/interfaces/outbox-admin.interface.ts:30
Properties
nextCursor
nextCursor: string | null;Defined in: src/interfaces/outbox-admin.interface.ts:32
records
records: OutboxRecord[];Defined in: src/interfaces/outbox-admin.interface.ts:31
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>
off()?
optional off(event, handler): this;Defined in: src/interfaces/outbox-wakeup.interface.ts:12
Optional EventEmitter-compatible listener cleanup API.
Parameters
| Parameter | Type |
|---|---|
event | string |
handler | (payload) => void |
Returns
this
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>
removeListener()?
optional removeListener(event, handler): this;Defined in: src/interfaces/outbox-wakeup.interface.ts:14
Optional legacy EventEmitter-compatible listener cleanup API.
Parameters
| Parameter | Type |
|---|---|
event | string |
handler | (payload) => void |
Returns
this
OutboxOptions
Defined in: src/interfaces/outbox-options.interface.ts:38
Properties
delivery?
optional delivery?: OutboxDeliveryOptions;Defined in: src/interfaces/outbox-options.interface.ts:49
events?
optional events?: Type<any>[];Defined in: src/interfaces/outbox-options.interface.ts:54
hooks?
optional hooks?: OutboxHooks;Defined in: src/interfaces/outbox-options.interface.ts:51
isGlobal?
optional isGlobal?: boolean;Defined in: src/interfaces/outbox-options.interface.ts:55
lease?
optional lease?: OutboxLeaseOptions;Defined in: src/interfaces/outbox-options.interface.ts:53
polling?
optional polling?: OutboxPollingOptions;Defined in: src/interfaces/outbox-options.interface.ts:45
prisma
prisma: any;Defined in: src/interfaces/outbox-options.interface.ts:44
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:46
stuckThreshold?
optional stuckThreshold?: number;Defined in: src/interfaces/outbox-options.interface.ts:57
Deprecated
Use lease.duration. Retained as a lease-duration compatibility alias.
tenancy?
optional tenancy?: OutboxTenancyOptions;Defined in: src/interfaces/outbox-options.interface.ts:50
transport?
optional transport?: Type<
| OutboxTransport
| OutboxPublisher>;Defined in: src/interfaces/outbox-options.interface.ts:48
Custom transport class. Defaults to LocalTransport (in-process handler invocation).
wakeup?
optional wakeup?: OutboxWakeupOptions;Defined in: src/interfaces/outbox-options.interface.ts:52
OutboxOptionsFactory
Defined in: src/interfaces/outbox-options.interface.ts:89
Methods
createOutboxOptions()
createOutboxOptions():
| OutboxAsyncRuntimeOptions
| Promise<OutboxAsyncRuntimeOptions>;Defined in: src/interfaces/outbox-options.interface.ts:90
Returns
| OutboxAsyncRuntimeOptions | Promise<OutboxAsyncRuntimeOptions>
OutboxPageOptions
Defined in: src/interfaces/outbox-admin.interface.ts:23
Extends
Properties
after?
optional after?: Date;Defined in: src/interfaces/outbox-admin.interface.ts:18
Inherited from
before?
optional before?: Date;Defined in: src/interfaces/outbox-admin.interface.ts:17
Inherited from
cursor?
optional cursor?: string;Defined in: src/interfaces/outbox-admin.interface.ts:25
Opaque exclusive continuation cursor returned by a previous page.
eventType?
optional eventType?: string;Defined in: src/interfaces/outbox-admin.interface.ts:14
Inherited from
limit?
optional limit?: number;Defined in: src/interfaces/outbox-admin.interface.ts:16
Inherited from
status?
optional status?: "PENDING" | "PROCESSING" | "SENT" | "FAILED";Defined in: src/interfaces/outbox-admin.interface.ts:13
Inherited from
tenantId?
optional tenantId?: string;Defined in: src/interfaces/outbox-admin.interface.ts:15
Inherited from
OutboxPollContext
Defined in: src/interfaces/outbox-hooks.interface.ts:17
Properties
batchSize
readonly batchSize: number;Defined in: src/interfaces/outbox-hooks.interface.ts:18
deliveryMode
readonly deliveryMode: "local" | "publisher";Defined in: src/interfaces/outbox-hooks.interface.ts:19
OutboxPollingOptions
Defined in: src/interfaces/outbox-options.interface.ts:11
Properties
batchSize?
optional batchSize?: number;Defined in: src/interfaces/outbox-options.interface.ts:14
enabled?
optional enabled?: boolean;Defined in: src/interfaces/outbox-options.interface.ts:12
interval?
optional interval?: number;Defined in: src/interfaces/outbox-options.interface.ts:13
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
readonly aggregateId: string | null;Defined in: src/interfaces/outbox-record.interface.ts:15
aggregateType
readonly aggregateType: string | null;Defined in: src/interfaces/outbox-record.interface.ts:14
causationId
readonly causationId: string | null;Defined in: src/interfaces/outbox-record.interface.ts:19
correlationId
readonly correlationId: string | null;Defined in: src/interfaces/outbox-record.interface.ts:18
createdAt
readonly createdAt: Date;Defined in: src/interfaces/outbox-record.interface.ts:6
eventType
readonly eventType: string;Defined in: src/interfaces/outbox-record.interface.ts:3
headers
readonly headers: Readonly<Record<string, string>>;Defined in: src/interfaces/outbox-record.interface.ts:20
id
readonly id: string;Defined in: src/interfaces/outbox-record.interface.ts:2
idempotencyKey
readonly idempotencyKey: string | null;Defined in: src/interfaces/outbox-record.interface.ts:17
lastError
readonly lastError: string | null;Defined in: src/interfaces/outbox-record.interface.ts:12
maxRetries
readonly maxRetries: number;Defined in: src/interfaces/outbox-record.interface.ts:11
nextAttemptAt
readonly nextAttemptAt: Date | null;Defined in: src/interfaces/outbox-record.interface.ts:9
occurredAt
readonly occurredAt: Date;Defined in: src/interfaces/outbox-record.interface.ts:21
partitionKey
readonly partitionKey: string | null;Defined in: src/interfaces/outbox-record.interface.ts:16
payload
readonly payload: Readonly<Record<string, unknown>>;Defined in: src/interfaces/outbox-record.interface.ts:4
processedAt
readonly processedAt: Date | null;Defined in: src/interfaces/outbox-record.interface.ts:8
retryCount
readonly retryCount: number;Defined in: src/interfaces/outbox-record.interface.ts:10
status
readonly status: "PENDING" | "PROCESSING" | "SENT" | "FAILED";Defined in: src/interfaces/outbox-record.interface.ts:5
tenantId
readonly tenantId: string | null;Defined in: src/interfaces/outbox-record.interface.ts:13
updatedAt
readonly updatedAt: Date;Defined in: src/interfaces/outbox-record.interface.ts:7
OutboxRetryContext
Defined in: src/interfaces/outbox-hooks.interface.ts:38
Extends
Properties
aggregateId
readonly aggregateId: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:30
Inherited from
OutboxDispatchContext.aggregateId
aggregateType
readonly aggregateType: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:29
Inherited from
OutboxDispatchContext.aggregateType
causationId
readonly causationId: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:34
Inherited from
OutboxDispatchContext.causationId
correlationId
readonly correlationId: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:33
Inherited from
OutboxDispatchContext.correlationId
error
readonly error: Error;Defined in: src/interfaces/outbox-hooks.interface.ts:39
eventId
readonly eventId: string;Defined in: src/interfaces/outbox-hooks.interface.ts:24
Inherited from
eventType
readonly eventType: string;Defined in: src/interfaces/outbox-hooks.interface.ts:25
Inherited from
OutboxDispatchContext.eventType
headers
readonly headers: Readonly<Record<string, string>>;Defined in: src/interfaces/outbox-hooks.interface.ts:35
Inherited from
idempotencyKey
readonly idempotencyKey: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:32
Inherited from
OutboxDispatchContext.idempotencyKey
maxRetries
readonly maxRetries: number;Defined in: src/interfaces/outbox-hooks.interface.ts:41
Overrides
OutboxDispatchContext.maxRetries
partitionKey
readonly partitionKey: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:31
Inherited from
OutboxDispatchContext.partitionKey
record
readonly record: OutboxRecord;Defined in: src/interfaces/outbox-hooks.interface.ts:23
Inherited from
retryCount
readonly retryCount: number;Defined in: src/interfaces/outbox-hooks.interface.ts:40
Overrides
OutboxDispatchContext.retryCount
tenantId
readonly tenantId: string | null;Defined in: src/interfaces/outbox-hooks.interface.ts:26
Inherited from
OutboxDispatchContext.tenantId
OutboxRetryOptions
Defined in: src/interfaces/outbox-options.interface.ts:17
Properties
backoff?
optional backoff?: "fixed" | "exponential";Defined in: src/interfaces/outbox-options.interface.ts:19
initialDelay?
optional initialDelay?: number;Defined in: src/interfaces/outbox-options.interface.ts:20
maxDelay?
optional maxDelay?: number;Defined in: src/interfaces/outbox-options.interface.ts:22
Maximum persisted retry delay in milliseconds. Defaults to 24 hours.
maxRetries?
optional maxRetries?: number;Defined in: src/interfaces/outbox-options.interface.ts:18
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:14
Properties
policy?
optional policy?: OutboxTenantPolicy;Defined in: src/interfaces/outbox-tenancy.interface.ts:20
Controls producer tenant resolution. Defaults to optional for compatibility with non-tenant applications.
provider?
optional provider?:
| OutboxTenantProvider
| Type<OutboxTenantProvider>;Defined in: src/interfaces/outbox-tenancy.interface.ts:15
OutboxTenantProvider
Defined in: src/interfaces/outbox-tenancy.interface.ts:5
Methods
getTenantId()?
optional getTenantId():
| string
| Promise<string | null | undefined>
| null
| undefined;Defined in: src/interfaces/outbox-tenancy.interface.ts:6
Returns
| string | Promise<string | null | undefined> | null | undefined
runWithTenant()?
optional runWithTenant<T>(tenantId, fn): Promise<T>;Defined in: src/interfaces/outbox-tenancy.interface.ts:11
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:17
Properties
channel?
optional channel?: string;Defined in: src/interfaces/outbox-wakeup.interface.ts:19
clientFactory?
optional clientFactory?: () =>
| OutboxNotificationClient
| Promise<OutboxNotificationClient | null>
| null;Defined in: src/interfaces/outbox-wakeup.interface.ts:23
Returns
| OutboxNotificationClient | Promise<OutboxNotificationClient | null> | null
connectionString?
optional connectionString?: string;Defined in: src/interfaces/outbox-wakeup.interface.ts:20
enabled?
optional enabled?: boolean;Defined in: src/interfaces/outbox-wakeup.interface.ts:18
reconnectDelay?
optional reconnectDelay?: number;Defined in: src/interfaces/outbox-wakeup.interface.ts:22
Base reconnect delay. Consecutive failures back off exponentially.
Type Aliases
OutboxAdminMutationResult
type OutboxAdminMutationResult =
| {
outcome: "applied";
}
| {
outcome: "not_found";
}
| {
currentStatus: OutboxRecord["status"];
outcome: "conflict";
}
| {
outcome: "lost_claim";
};Defined in: src/interfaces/outbox-admin.interface.ts:46
OutboxEmitManyEntry
type OutboxEmitManyEntry =
| OutboxEvent
| {
event: OutboxEvent;
options?: OutboxEmitOptions;
};Defined in: src/interfaces/outbox-emit-options.interface.ts:28
OutboxEmitOptions
type OutboxEmitOptions = OutboxEmitMetadata &
| {
tenantId?: string;
tenantScope?: never;
}
| {
tenantId?: never;
tenantScope: "global";
};Defined in: src/interfaces/outbox-emit-options.interface.ts:14
OutboxEnvelopeErrorReason
type OutboxEnvelopeErrorReason =
| "invalid_type"
| "empty"
| "too_long"
| "invalid_date"
| "unsupported_json_value"
| "circular"
| "too_deep"
| "too_large";Defined in: src/errors/outbox-envelope.error.ts:3
OutboxTenantListOptions
type OutboxTenantListOptions = Omit<OutboxListOptions, "tenantId">;Defined in: src/interfaces/outbox-admin.interface.ts:21
OutboxTenantPageOptions
type OutboxTenantPageOptions = Omit<OutboxPageOptions, "tenantId">;Defined in: src/interfaces/outbox-admin.interface.ts:28
OutboxTenantPolicy
type OutboxTenantPolicy = "optional" | "required" | "require-match";Defined in: src/interfaces/outbox-tenancy.interface.ts:3
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_INVALID_CONFIGURATION
const OUTBOX_INVALID_CONFIGURATION: "OUTBOX_INVALID_CONFIGURATION" = 'OUTBOX_INVALID_CONFIGURATION';Defined in: src/errors/outbox-configuration.error.ts:1
OUTBOX_INVALID_CURSOR
const OUTBOX_INVALID_CURSOR: "OUTBOX_INVALID_CURSOR";Defined in: src/errors/outbox-cursor.error.ts:1
OUTBOX_INVALID_ENVELOPE
const OUTBOX_INVALID_ENVELOPE: "OUTBOX_INVALID_ENVELOPE";Defined in: src/errors/outbox-envelope.error.ts:1
OUTBOX_OPTIONS
const OUTBOX_OPTIONS: typeof OUTBOX_OPTIONS;Defined in: src/outbox.constants.ts:1
OUTBOX_PERSISTED_INVARIANT_VIOLATION
const OUTBOX_PERSISTED_INVARIANT_VIOLATION: "OUTBOX_PERSISTED_INVARIANT_VIOLATION" = 'OUTBOX_PERSISTED_INVARIANT_VIOLATION';Defined in: src/errors/outbox-persisted-invariant.error.ts:1
OUTBOX_SCHEMA_MISMATCH
const OUTBOX_SCHEMA_MISMATCH: "OUTBOX_SCHEMA_MISMATCH";Defined in: src/errors/outbox-schema.error.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
OUTBOX_WAKEUP_UNAVAILABLE
const OUTBOX_WAKEUP_UNAVAILABLE: "OUTBOX_WAKEUP_UNAVAILABLE";Defined in: src/errors/outbox-wakeup-unavailable.error.ts:1
REQUIRED_OUTBOX_SCHEMA_VERSION
const REQUIRED_OUTBOX_SCHEMA_VERSION: "0.3.0" = '0.3.0';Defined in: src/outbox.schema.ts:6
Functions
OnOutboxEvent()
function OnOutboxEvent(...events): MethodDecorator;Defined in: src/outbox.decorator.ts:9
Parameters
| Parameter | Type |
|---|---|
...events | OutboxEventClass[] |
Returns
MethodDecorator
References
OutboxOperatorService
Renames and re-exports OutboxAdminService