class IntegrationEvent
extends DomainEvent<T>
Since 0.1.0

Abstract base class for integration (cross-service) events.

An empty semantic subclass of DomainEvent — no added fields, and no framework reader: it is a semantic MARKER only. Nothing dispatches on instanceof IntegrationEvent — the M14 messaging bridge selects forwarded events by its configured eventTypes string list, never by class identity — and the in-memory bus publishes it like any other event. A typed cross-service contract (wire envelope, schema version, causal chain) is defineIntegrationEvent in @setu-ts/messaging-plugin, not this class.

Examples

Example 1

class UserCreatedIntegration extends IntegrationEvent<{ userId: string }> {
  readonly type = 'UserCreated';
}

Constructors

IntegrationEvent(
runtime: IRuntimeServices,
data: T,
opts?: { aggregateId?: string; version?: number; }
)

Type Parameters

T = unknown

The event payload type

Usage

import { IntegrationEvent } from "events-plugin/src/index.ts";