@arturwojnar/hermes-postgresql
Version:
Production-Ready TypeScript Outbox Pattern for PostgreSQL
26 lines (25 loc) • 534 B
TypeScript
import { Lsn } from './lsn';
declare enum MessageType {
Begin = "B",
Insert = "I",
Commit = "C",
Other = "Other"
}
type Transaction = {
transactionId: number;
lsn: Lsn;
timestamp: Date;
results: InsertResult[];
};
type InsertResult = {
position: number | bigint;
eventType: string;
payload: string;
};
type EventEnvelope<Event> = {
position: number | bigint;
eventType: string;
lsn: string;
event: Event;
};
export { EventEnvelope, InsertResult, MessageType, Transaction };