<?php
/**
 * Top affiliate candidate repository contract.
 *
 * @package Affilun\Infrastructure\Persistence
 */

declare(strict_types=1);

namespace Affilun\Infrastructure\Persistence;

interface TopAffiliateCandidateRepository {

	/**
	 * Replace the locally cached Cloud candidate rows.
	 *
	 * @param list<array<string,mixed>> $rows Product-shaped rows.
	 */
	public function replaceAll( array $rows ): int;

	/**
	 * List cached candidate rows.
	 *
	 * @param ProductListQuery $query List query.
	 */
	public function findPaginated( ProductListQuery $query ): ProductListResult;

	/**
	 * Count cached candidate rows.
	 */
	public function count(): int;
}
