<?php

declare(strict_types=1);

namespace CpCreation\AltchaBundle\Contract;

use CpCreation\AltchaBundle\Model\Challenge;
use CpCreation\AltchaBundle\Model\ScopeManifest;
use CpCreation\AltchaBundle\Model\ScopePolicy;
use CpCreation\AltchaBundle\Model\ScopeSyncResult;
use CpCreation\AltchaBundle\Model\VerificationRequest;
use CpCreation\AltchaBundle\Model\VerificationResult;

interface AltchaServiceClientInterface
{
    public function resolvePolicy(string $scope, string $host): ScopePolicy;

    public function createChallenge(
        string $scope,
        string $host,
        string $clientIp,
        string $formToken,
        int $policyVersion,
    ): Challenge;

    public function verifyAndConsume(VerificationRequest $request): VerificationResult;

    public function synchronizeScopes(ScopeManifest $manifest, bool $dryRun): ScopeSyncResult;
}
