<?php

namespace MintyPHP\Repository\CustomField;

interface UserCustomFieldValueRepositoryInterface
{
    /**
     * @param int[] $definitionIds
     * @return array<int, array<string, mixed>>
     */
    public function listByUserAndDefinitionIds(int $userId, array $definitionIds): array;

    /** @param array<string, mixed> $typedValue */
    public function upsertScalarValue(int $userId, int $definitionId, array $typedValue): int|false;

    /** @param int[] $definitionIds */
    public function deleteByUserAndDefinitionIds(int $userId, array $definitionIds): bool;

    /** @param int[] $tenantIds */
    public function deleteByUserOutsideTenantIds(int $userId, array $tenantIds): bool;
}
