<?php
/**
 * Detailed event destination contract.
 *
 * @package Carticy\Conversions\Events
 */

declare(strict_types=1);

namespace Carticy\Conversions\Events;

use Carticy\Conversions\Domain\ConversionEvent;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Optional destination contract for destinations that need truthful dispatch
 * statuses beyond the legacy accepted/failed boolean.
 */
interface DetailedEventDestinationInterface extends EventDestinationInterface {

	/**
	 * Send or queue an event with structured dispatch diagnostics.
	 *
	 * @param ConversionEvent $event Canonical event snapshot.
	 * @return DispatchResult
	 */
	public function send_with_result( ConversionEvent $event ): DispatchResult;
}
