using Model;
namespace Services;
///
/// Represents a service for managing teams.
///
public interface ITeamService
{
///
/// Lists all teams associated with the specified .
///
Task> ListTeamsOf(int userId);
///
/// Lists a range of teams.
///
Task> ListTeams(int start, int count);
///
/// Retrieves the total count of teams.
///
Task CountTotalTeams();
///
/// Adds a new team.
///
Task AddTeam(string name, string picture, string firstColor, string secondColor);
Task GetTeam(int id);
///
/// Removes one or more teams.
///
Task RemoveTeams(params int[] teams);
///
/// Updates an existing team.
///
Task UpdateTeam(Team team);
///
/// Retrieves the members of the specified team.
///
Task> GetMembersOf(int teamId);
///
/// Adds a new member to the team.
///
Task AddMember(int teamId, int userId, MemberRole role);
///
/// Updates the role of a member within the team.
///
Task UpdateMember(Member member);
///
/// Removes a member from the team.
///
Task RemoveMember(int teamId, int userId);
enum TeamAccessibility
{
/**
* The Team or the user is not found
*/
NotFound,
/**
* Accessibility not granted
*/
Unauthorized,
/**
* Accessibility granted
*/
Authorized
}
public Task> GetSharedTacticsToTeam(int teamId);
public Task IsUserInTeam(int userId, int teamId);
/**
* Ensures that the given user identifier van perform an operation that requires the given role permission.
* The returned result is the different kind of accessibility the service can grant to the user, based on its actual role inside the
* given team.
*/
public Task EnsureAccessibility(int userId, int teamId, MemberRole role);
}