<?php

declare(strict_types=1);

namespace CpCreation\VitiCore\Commerce\Catalog\Enrollment\Repository;

use CpCreation\VitiCore\Commerce\Catalog\Enrollment\Model\CatalogEnrollmentRequest;
use Ramsey\Uuid\UuidInterface;

interface CatalogEnrollmentRequestStore
{
    public function findOneByRequestId(UuidInterface|string $requestId): ?CatalogEnrollmentRequest;

    public function existsForFingerprint(string $configurationFingerprint): bool;

    /**
     * @return list<CatalogEnrollmentRequest>
     */
    public function findUnprepared(int $limit): array;

    /**
     * @return list<CatalogEnrollmentRequest>
     */
    public function findReadyForDelivery(\DateTimeImmutable $staleQueuedBefore, int $limit): array;

    public function findLatestRegistered(UuidInterface|string $instanceId): ?CatalogEnrollmentRequest;
}
