2026-07-22 19:43:13 +00:00
|
|
|
using Heimdall.Application.DTOs;
|
|
|
|
|
|
|
|
|
|
namespace Heimdall.Application.Common.Persistence;
|
|
|
|
|
|
|
|
|
|
public interface IUserRepository
|
|
|
|
|
{
|
|
|
|
|
Task<PagedResult<UserResponse>> GetPagedAsync(int page, int pageSize, CancellationToken ct);
|
|
|
|
|
Task<UserResponse?> GetByIdAsync(Guid id, CancellationToken ct);
|
|
|
|
|
Task<int> CountAdminUsersAsync(CancellationToken ct);
|
|
|
|
|
Task AddAuditLogAsync(Guid? userId, string action, string resourceType, string? resourceId, string? oldValue, string? newValue, CancellationToken ct);
|
|
|
|
|
Task SetUserSitesAsync(Guid userId, IList<Guid> siteIds, CancellationToken ct);
|
|
|
|
|
Task RemoveUserDataAsync(Guid userId, CancellationToken ct);
|
2026-11-04 11:37:53 +01:00
|
|
|
Task<bool> ExistsAsync(Guid userId, CancellationToken ct);
|
|
|
|
|
Task<int> CountUsersAsync(CancellationToken ct);
|
|
|
|
|
Task<IReadOnlyDictionary<Guid, string>> GetLanguagesAsync(IReadOnlyCollection<Guid> userIds, CancellationToken ct);
|
|
|
|
|
Task<IReadOnlyDictionary<Guid, string?>> GetEmailsAsync(IReadOnlyCollection<Guid> userIds, CancellationToken ct);
|
|
|
|
|
Task<IReadOnlyList<GroupMemberResponse>> GetGroupMembersAsync(Guid groupId, CancellationToken ct);
|
|
|
|
|
Task<bool> IsAdminAsync(Guid userId, CancellationToken ct);
|
2026-07-22 19:43:13 +00:00
|
|
|
}
|