<?php

namespace MintyPHP\Repository\Access;

/** Contract for managing permission assignments on roles. */
interface RolePermissionRepositoryInterface
{
    public function listPermissionIdsByRoleId(int $roleId): array;

    public function countPermissionsByRoleIds(array $roleIds): array;

    public function replaceForRole(int $roleId, array $permissionIds): bool;

    public function listRoleIdsByPermissionId(int $permissionId): array;

    public function replaceForPermission(int $permissionId, array $roleIds): bool;

    public function listPermissionKeysByRoleIds(array $roleIds): array;

    public function listPermissionsWithRolesByRoleIds(array $roleIds): array;
}
