import type { IDomainEventBus } from '../../application/ports/event-bus.port'; import type { DomainEvent } from '../../domain/events/domain-event'; export type OutboxEntryStatus = 'pending' | 'published' | 'failed'; export interface OutboxEntry { readonly id: string; readonly eventType: string; readonly payload: DomainEvent; status: OutboxEntryStatus; readonly createdAt: string; processedAt?: string; errorMessage?: string; } export interface IOutboxRepository { save(entry: OutboxEntry): Promise; findPending(): Promise; update(entry: OutboxEntry): Promise; } export declare class OutboxService { private readonly outboxRepo; private readonly eventBus; constructor(outboxRepo: IOutboxRepository, eventBus: IDomainEventBus); dispatchPending(): Promise<{ published: number; failed: number; }>; enqueue(event: DomainEvent): Promise; }