mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 07:13:12 +00:00
31 lines
1.3 KiB
C#
31 lines
1.3 KiB
C#
using System.Security.Claims;
|
|
using Data.SeaHavenIndustries;
|
|
using SeaHaven.Services.DTOs;
|
|
|
|
namespace SeaHaven.Services.Interfaces;
|
|
|
|
public interface ITeamMemberInviteService
|
|
{
|
|
/// <summary>Persists a new invite for a pending member and returns its raw token.</summary>
|
|
Task<IssuedTeamMemberInvite> CreateAsync(string userId, CancellationToken cancellationToken);
|
|
|
|
/// <summary>Emails the invite link. Returns false when the email could not be handed off.</summary>
|
|
Task<bool> SendAsync(
|
|
IssuedTeamMemberInvite invite,
|
|
string email,
|
|
string name,
|
|
CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Revokes the member's open invites, including any email confirmation made through them,
|
|
/// and emails a new invite to their current address unless they are deactivated.
|
|
/// Returns whether that email went out, or null when the member is deactivated and nothing was emailed.
|
|
/// </summary>
|
|
Task<bool?> ReissueAsync(ApplicationUser user, CancellationToken cancellationToken);
|
|
|
|
/// <summary>Admin-only: revokes a pending member's open invites and emails a new one.</summary>
|
|
Task<TeamMemberInviteResendOutcomeDTO> ResendAsync(
|
|
string userId,
|
|
ClaimsPrincipal caller,
|
|
CancellationToken cancellationToken);
|
|
}
|