using adas_core.Domain.Models.MongoModels;
using MongoDB.Bson;

namespace adas_core.Authentication.Interfaces;

public interface IAuthorityService
{
    public Task<List<Authorization>> GetUserAuthorities(ObjectId userId);
    public void CreateNew(string roleName, ObjectId userId);
    public Task InsertOne(Authorization authorization);
    public Task updateOne(Authorization authorization);

    public Task<List<Authorization>> GetAllAuthorities();

    Task<bool> DeleteAuthoritiesForUser(ObjectId id);
    Task<Authorization?> CreateNewUserAuthority(Authorization authorization);
    Task<bool> DeleteUserAuthority(ObjectId userAuthorityIdParsed);
    Task<Authorization?> EditUserAuthority(Authorization authorization);
}