. */ namespace SP\Domain\Security\Ports; use Exception; use SP\Domain\Common\Services\ServiceException; use SP\Domain\Core\Dtos\ItemSearchDto; use SP\Domain\Core\Exceptions\ConstraintException; use SP\Domain\Core\Exceptions\InvalidArgumentException; use SP\Domain\Core\Exceptions\QueryException; use SP\Domain\Security\Dtos\TrackRequest; use SP\Infrastructure\Common\Repositories\NoSuchItemException; use SP\Infrastructure\Database\QueryResult; /** * Class TrackService * * @package SP\Domain\Common\Services */ interface TrackService { /** * @throws InvalidArgumentException */ public function buildTrackRequest(string $source): TrackRequest; /** * @throws QueryException * @throws ConstraintException * @throws NoSuchItemException */ public function unlock(int $id): void; /** * @throws ConstraintException * @throws QueryException */ public function clear(): bool; /** * Comprobar los intentos de login * * @return bool True if delay is performed, false otherwise * @throws Exception */ public function checkTracking(TrackRequest $trackRequest): bool; /** * @throws ServiceException * @throws ConstraintException * @throws QueryException */ public function add(TrackRequest $trackRequest): int; /** * @throws ConstraintException * @throws QueryException */ public function search(ItemSearchDto $itemSearchData): QueryResult; }