<?php

declare(strict_types=1);

namespace App\Services\Identity;

interface IdentityProviderInterface
{
    public function provider(): string;

    /**
     * Returns ['request_id' => string, 'standard_url' => string]
     */
    public function buildRequest(array $context = []): array;

    /**
     * Parse callback. Returns:
     *   ['status' => 'verified'|'failed', 'ci' => string|null, 'di' => string|null,
     *    'name' => string|null, 'birthdate' => string|null, 'gender' => string|null,
     *    'mobile' => string|null, 'carrier' => string|null, 'raw' => array]
     */
    public function parseCallback(array $payload): array;

    public function isMock(): bool;
}
