using StickyBoard.Core.DTOs.SocialAndMessaging; using StickyBoard.Core.Models; using StickyBoard.Core.Models.SocialAndMessaging; using StickyBoard.Core.Repositories.Base; namespace StickyBoard.Core.Repositories.SocialAndMessaging.Contracts; public interface IInviteRepository : IRepository, ISyncRepository { // ===================================================================== // DB FUNCTION HELPERS // ===================================================================== Task CreateViaDbFunctionAsync( Guid senderId, string email, InviteScope scopeType, Guid? workspaceId, Guid? boardId, Guid? contactId, WorkspaceRole? targetRole, WorkspaceRole? boardRole, string tokenHash, TimeSpan expiresIn, string? note, CancellationToken ct); Task AcceptViaDbFunctionAsync( string tokenHash, Guid acceptingUserId, CancellationToken ct); Task RevokeViaDbFunctionAsync( string tokenHash, CancellationToken ct); // ===================================================================== // QUERIES // ===================================================================== Task> GetBySenderAsync( Guid senderId, CancellationToken ct); Task> GetByEmailAsync( string email, CancellationToken ct); Task GetByTokenHashAsync( string tokenHash, CancellationToken ct); // ===================================================================== // VALIDATION HELPERS // ===================================================================== Task ValidateWorkspaceExistsAsync( Guid workspaceId, CancellationToken ct); Task ValidateBoardExistsAsync( Guid boardId, CancellationToken ct); }