<?php

declare(strict_types=1);

namespace ApiModel\Domain\Repository;

interface UserRepositoryInterface
{
    public function findProfileById(string $userId): array;

    public function updateLanguage(string $userId, string $lang): array;

    public function updatePhoto(string $userId, ?string $photo): void;

    /** @return array<string, mixed>|null fila completa auth.users */
    public function findFullByEmail(string $email): ?array;

    /** @return array<string, mixed>|null */
    public function findFullById(string $id): ?array;

    public function updateUserAfterExternalSync(string $id, string $name, string $externalId): void;

    public function insertClientUser(string $id, string $name, string $email, string $externalId, string $language): void;

    public function emailExists(string $email): bool;

    public function insertUserWithPassword(string $id, string $name, string $email, string $passwordHash, string $role, string $language): void;

    public function insertUserWithoutPassword(string $id, string $name, string $email, string $language): void;

    public function updateUserName(string $id, string $name): void;

    public function updateUserEmail(string $id, string $email): void;

    public function updateUserRole(string $id, string $role): void;

    public function updateUserIsActive(string $id, bool $isActive): void;

    public function updatePasswordHash(string $id, string $passwordHash): void;

    public function countUsersForAdmin(?string $searchQuery): int;

    /** @return list<array<string, mixed>> */
    public function listUsersForAdmin(int $limit, int $offset, ?string $searchQuery): array;

    /** @param list<string> $roleIds */
    public function updateUserRoles(string $userId, array $roleIds): void;

    public function deleteUser(string $userId): void;

    public function updateUserFerreteria(string $id, ?string $ferreteriaId): void;
}


