<?php

namespace MintyPHP\Repository\System;

interface SystemHealthRepositoryInterface
{
    public function checkDatabaseConnectivity(): bool;

    /**
     * @param list<string> $requiredTables
     * @return list<string>
     */
    public function listPresentTables(array $requiredTables): array;

    /**
     * @return array{last_heartbeat_at: string, last_result: string, last_error_code: string}|null
     */
    public function getSchedulerStatus(): ?array;

    /**
     * @param list<string> $keys
     * @return list<string>
     */
    public function listActivePermissionKeys(array $keys): array;

    public function countAdminUsers(): int;

    public function countActivePermissions(): int;

    public function countInactivePermissions(): int;

    /**
     * @return list<string>
     */
    public function listAllActivePermissionKeys(): array;
}
