namespace Svrnty.CQRS.Events.Abstractions;
///
/// Interface for publishing domain events to external systems.
///
public interface IDomainEventPublisher
{
///
/// Publishes a domain event.
///
/// The type of event to publish.
/// The event to publish.
/// Cancellation token.
Task PublishAsync(TEvent @event, CancellationToken cancellationToken = default)
where TEvent : IDomainEvent;
}