88 lines
		
	
	
		
			4.1 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			88 lines
		
	
	
		
			4.1 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| // ***********************************************************************
 | |
| // <copyright file="IModuleService.cs">
 | |
| //     AgileWebs
 | |
| // </copyright>
 | |
| // ***********************************************************************
 | |
| 
 | |
| using Core.Thalos.BuildingBlocks;
 | |
| using Core.Thalos.Domain.Contexts.Onboarding.Request;
 | |
| 
 | |
| namespace Core.Thalos.Provider.Contracts
 | |
| {
 | |
|     /// <summary>
 | |
|     /// Interface for Module-related service operations.
 | |
|     /// </summary>
 | |
|     public interface IModuleProvider
 | |
|     {
 | |
|         /// <summary>
 | |
|         /// Creates a new Module.
 | |
|         /// </summary>
 | |
|         /// <param name="newModule">The Module to be created.</param>
 | |
|         /// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
 | |
|         /// <returns>
 | |
|         /// A <see cref="ValueTask{ModuleAdapter}"/> representing the asynchronous execution of the service.
 | |
|         /// </returns>
 | |
|         ValueTask<ModuleAdapter> CreateModule(ModuleRequest newModule, CancellationToken cancellationToken);
 | |
| 
 | |
|         /// <summary>
 | |
|         /// Gets a Module by its identifier.
 | |
|         /// </summary>
 | |
|         /// <param name="_id">The Module Mongo identifier.</param>
 | |
|         /// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
 | |
|         /// <returns>
 | |
|         /// A <see cref="ValueTask{ModuleAdapter}"/> representing the asynchronous execution of the service.
 | |
|         /// </returns>
 | |
|         ValueTask<ModuleAdapter> GetModuleById(string _id, CancellationToken cancellationToken);
 | |
| 
 | |
|         /// <summary>
 | |
|         /// Gets all Modules.
 | |
|         /// </summary>
 | |
|         /// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
 | |
|         /// <returns>
 | |
|         /// A <see cref="ValueTask{IEnumerable{ModuleAdapter}}"/> representing the asynchronous execution of the service.
 | |
|         /// </returns>
 | |
|         ValueTask<IEnumerable<ModuleAdapter>> GetAllModules(CancellationToken cancellationToken);
 | |
| 
 | |
|         /// <summary>
 | |
|         /// Gets all Modules by a list of identifiers.
 | |
|         /// </summary>
 | |
|         /// <param name="modules">The list of Module identifiers.</param>
 | |
|         /// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
 | |
|         /// <returns>
 | |
|         /// A <see cref="ValueTask{IEnumerable{ModuleAdapter}}"/> representing the asynchronous execution of the service.
 | |
|         /// </returns>
 | |
|         ValueTask<IEnumerable<ModuleAdapter>> GetAllModulesByList(string[] modules, CancellationToken cancellationToken);
 | |
| 
 | |
|         /// <summary>
 | |
|         /// Changes the status of a Module.
 | |
|         /// </summary>
 | |
|         /// <param name="_id">The Module Mongo identifier.</param>
 | |
|         /// <param name="newStatus">The new status of the Module.</param>
 | |
|         /// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
 | |
|         /// <returns>
 | |
|         /// A <see cref="ValueTask{ModuleAdapter}"/> representing the asynchronous execution of the service.
 | |
|         /// </returns>
 | |
|         ValueTask<ModuleAdapter?> ChangeModuleStatus(string _id, Blueprint.Mongo.StatusEnum newStatus, CancellationToken cancellationToken);
 | |
| 
 | |
|         /// <summary>
 | |
|         /// Updates a Module by its identifier.
 | |
|         /// </summary>
 | |
|         /// <param name="entity">The Module to be updated.</param>
 | |
|         /// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
 | |
|         /// <returns>
 | |
|         /// A <see cref="ValueTask{ModuleAdapter}"/> representing the asynchronous execution of the service.
 | |
|         /// </returns>
 | |
|         ValueTask<ModuleAdapter?> UpdateModule(ModuleAdapter entity, CancellationToken cancellationToken);
 | |
| 
 | |
|         /// <summary>
 | |
|         /// Deletes a Module by its identifier.
 | |
|         /// </summary>
 | |
|         /// <param name="_id">The Module Mongo identifier.</param>
 | |
|         /// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
 | |
|         /// <returns>
 | |
|         /// A <see cref="ValueTask{ModuleAdapter}"/> representing the asynchronous execution of the service.
 | |
|         /// </returns>
 | |
|         ValueTask<ModuleAdapter?> DeleteModule(string _id, CancellationToken cancellationToken);
 | |
|     }
 | |
| }
 |