import { PaymentEvent } from "@edr/types";

/**
 * Publisher port (architecture.md §12): how a payment event leaves this service.
 * HTTP implementation now; a RabbitMQ implementation later is a DI swap only — the outbox
 * and relay stay exactly as they are.
 */
export interface PaymentEventPublisher {
  /** Deliver one event; throw on failure so the relay can retry with backoff. */
  publish(event: PaymentEvent): Promise<void>;
}

export const PAYMENT_EVENT_PUBLISHER = Symbol("PAYMENT_EVENT_PUBLISHER");
