// *********************************************************************** // // AgileWebs // // *********************************************************************** using Core.Thalos.BuildingBlocks; using Core.Thalos.Domain.Contexts.Onboarding.Request; namespace Core.Thalos.Provider.Contracts { /// /// Interface for Permission-related service operations. /// public interface IPermissionProvider { /// /// Creates a new Permission. /// /// The Permission to be created. /// A token to cancel the asynchronous operation. /// /// A representing the asynchronous execution of the service. /// ValueTask CreatePermission(PermissionRequest newPermission, CancellationToken cancellationToken); /// /// Gets a Permission by its identifier. /// /// The Permission Mongo identifier. /// A token to cancel the asynchronous operation. /// /// A representing the asynchronous execution of the service. /// ValueTask GetPermissionById(string _id, CancellationToken cancellationToken); /// /// Gets all Permissions. /// /// A token to cancel the asynchronous operation. /// /// A representing the asynchronous execution of the service. /// ValueTask> GetAllPermissions(CancellationToken cancellationToken); /// /// Gets all Permissions by a list of identifiers. /// /// The list of Permission identifiers. /// A token to cancel the asynchronous operation. /// /// A representing the asynchronous execution of the service. /// ValueTask> GetAllPermissionsByList(string[] permissions, CancellationToken cancellationToken); /// /// Changes the status of a Permission. /// /// The Permission Mongo identifier. /// The new status of the Permission. /// A token to cancel the asynchronous operation. /// /// A representing the asynchronous execution of the service. /// ValueTask ChangePermissionStatus(string _id, Blueprint.Mongo.StatusEnum newStatus, CancellationToken cancellationToken); /// /// Updates a Permission. /// /// The Permission to be updated. /// A token to cancel the asynchronous operation. /// /// A representing the asynchronous execution of the service. /// ValueTask UpdatePermission(PermissionAdapter entity, CancellationToken cancellationToken); /// /// Deletes a Permission by its identifier. /// /// The Permission Mongo identifier. /// A token to cancel the asynchronous operation. /// /// A representing the asynchronous execution of the service. /// ValueTask DeletePermission(string _id, CancellationToken cancellationToken); } }