65 lines
2.9 KiB
C#
65 lines
2.9 KiB
C#
// ***********************************************************************
|
|
// <copyright file="IPermissionService.cs">
|
|
// Heath
|
|
// </copyright>
|
|
// ***********************************************************************
|
|
using Core.Cerberos.Adapters;
|
|
using Core.Cerberos.Adapters.Common.Enums;
|
|
using Core.Cerberos.Domain.Contexts.Onboarding.Request;
|
|
|
|
namespace Core.Cerberos.Provider.Contracts
|
|
{
|
|
public interface IPermissionService
|
|
{
|
|
/// <summary>
|
|
/// Creates a new Permission.
|
|
/// </summary>
|
|
/// <param name="entity">The Permission to be created.</param>
|
|
/// <returns>A <see cref="{Task{PermissionAdapter}}"/> representing
|
|
/// the asynchronous execution of the service.</returns>
|
|
Task<PermissionAdapter> CreatePermissionService(PermissionRequest newPermission);
|
|
|
|
/// <summary>
|
|
/// Gets an Permission by identifier.
|
|
/// </summary>
|
|
/// <param name="id">The Permission identifier.</param>
|
|
/// <returns>A <see cref="{Task{PermissionAdapter}}"/> representing
|
|
/// the asynchronous execution of the service.</returns>
|
|
Task<PermissionAdapter> GetPermissionByIdService(string id);
|
|
|
|
/// <summary>
|
|
/// Gets all the roles.
|
|
/// </summary>
|
|
/// <returns>A <see cref="{Task{IEnumerbale{PermissionAdapter}}}"/> representing
|
|
/// the asynchronous execution of the service.</returns>
|
|
Task<IEnumerable<PermissionAdapter>> GetAllPermissionsService();
|
|
|
|
/// <summary>
|
|
/// Gets all the permissions by permissions identifier list.
|
|
/// </summary>
|
|
/// <param name="permissions">The list of permissions identifiers.</param>
|
|
/// <returns>A <see cref="Task{IEnumerable{PermissionAdapter}}"/> representing
|
|
/// the asynchronous execution of the service.</returns>
|
|
Task<IEnumerable<PermissionAdapter>> GetAllPermissionsByListService(string[] permissions);
|
|
|
|
/// <summary>
|
|
/// Changes the status of the permission.
|
|
/// </summary>
|
|
/// <param name="id">The permission identifier.</param>
|
|
/// <param name="newStatus">The new status of the permission.</param>
|
|
/// <returns>The <see cref="PermissionAdapter"/> updated entity.</returns>
|
|
/// <returns>A <see cref="{Task{PermissionAdapter}}"/> representing
|
|
/// the asynchronous execution of the service.</returns>
|
|
Task<PermissionAdapter> ChangePermissionStatusService(string id, StatusEnum newStatus);
|
|
|
|
/// <summary>
|
|
/// Updates a Permission by id.
|
|
/// </summary>
|
|
/// <param name="entity">The Permission to be updated.</param>
|
|
/// <param name="id">The Permission identifier.</param>
|
|
/// <returns>A <see cref="{Task{PermissionAdapter}}"/> representing
|
|
/// the asynchronous execution of the service.</returns>
|
|
Task<PermissionAdapter> UpdatePermissionService(PermissionAdapter entity, string id);
|
|
}
|
|
}
|