Use Blueprint.Mongo package in module service

This commit is contained in:
Oscar Morales
2025-05-20 13:25:53 -06:00
parent 41da6d76f8
commit c3e1cfbf8d
5 changed files with 191 additions and 341 deletions

View File

@@ -3,13 +3,13 @@
// AgileWebs
// </copyright>
// ***********************************************************************
using Core.Blueprint.Mongo;
using Core.Thalos.Adapters;
using Core.Thalos.Adapters.Common.Enums;
using Core.Thalos.Domain.Contexts.Onboarding.Request;
namespace Core.Thalos.Provider.Contracts
{
public interface IModuleService
public interface IModuleProvider
{
/// <summary>
/// Creates a new Module.
@@ -17,7 +17,7 @@ namespace Core.Thalos.Provider.Contracts
/// <param name="entity">The Module to be created.</param>
/// <returns>A <see cref="{Task{ModuleAdapter}}"/> representing
/// the asynchronous execution of the service.</returns>
Task<ModuleAdapter> CreateModuleService(ModuleRequest newModule);
ValueTask<ModuleAdapter> CreateModule(ModuleRequest newModule, CancellationToken cancellationToken);
/// <summary>
/// Gets an Module by identifier.
@@ -25,14 +25,14 @@ namespace Core.Thalos.Provider.Contracts
/// <param name="id">The Module identifier.</param>
/// <returns>A <see cref="{Task{ModuleAdapter}}"/> representing
/// the asynchronous execution of the service.</returns>
Task<ModuleAdapter> GetModuleByIdService(string id);
ValueTask<ModuleAdapter> GetModuleById(string _id, CancellationToken cancellationToken);
/// <summary>
/// Gets all the roles.
/// </summary>
/// <returns>A <see cref="{Task{IEnumerbale{ModuleAdapter}}}"/> representing
/// the asynchronous execution of the service.</returns>
Task<IEnumerable<ModuleAdapter>> GetAllModulesService();
ValueTask<IEnumerable<ModuleAdapter>> GetAllModules(CancellationToken cancellationToken);
/// <summary>
/// Gets all the permissions by permissions identifier list.
@@ -40,7 +40,7 @@ namespace Core.Thalos.Provider.Contracts
/// <param name="permissions">The list of permissions identifiers.</param>
/// <returns>A <see cref="Task{IEnumerable{ModuleAdapter}}"/> representing
/// the asynchronous execution of the service.</returns>
Task<IEnumerable<ModuleAdapter>> GetAllModulesByListService(string[] permissions);
ValueTask<IEnumerable<ModuleAdapter>> GetAllModulesByList(string[] modules, CancellationToken cancellationToken);
/// <summary>
/// Changes the status of the permission.
@@ -50,7 +50,7 @@ namespace Core.Thalos.Provider.Contracts
/// <returns>The <see cref="ModuleAdapter"/> updated entity.</returns>
/// <returns>A <see cref="{Task{ModuleAdapter}}"/> representing
/// the asynchronous execution of the service.</returns>
Task<ModuleAdapter> ChangeModuleStatusService(string id, StatusEnum newStatus);
ValueTask<ModuleAdapter> ChangeModuleStatus(string id, StatusEnum newStatus, CancellationToken cancellationToken);
/// <summary>
/// Updates a Module by id.
@@ -59,6 +59,6 @@ namespace Core.Thalos.Provider.Contracts
/// <param name="id">The Module identifier.</param>
/// <returns>A <see cref="{Task{ModuleAdapter}}"/> representing
/// the asynchronous execution of the service.</returns>
Task<ModuleAdapter> UpdateModuleService(ModuleAdapter entity, string id);
ValueTask<ModuleAdapter> UpdateModule(ModuleAdapter entity, CancellationToken cancellationToken);
}
}