Interface IProjectNotificationEmailSender
- Namespace
- Builvero.Application.Interfaces.Services
- Assembly
- Builvero.Application.dll
Defines the contract for sending project-related notification emails including invitations and join requests.
public interface IProjectNotificationEmailSender
Remarks
This interface provides methods for sending email notifications related to project invitations and join requests. All emails use SendGrid dynamic templates and include secure token-based action URLs that allow users to accept/decline invitations or approve/decline join requests without requiring login.
Methods
SendProjectInvitationAcceptedAsync(ProjectInvitation, Project, User, User, CancellationToken)
Sends an email notification when a project invitation is accepted.
Task SendProjectInvitationAcceptedAsync(ProjectInvitation invitation, Project project, User inviter, User invitee, CancellationToken cancellationToken = default)
Parameters
invitationProjectInvitationThe project invitation entity that was accepted.
projectProjectThe project the user joined.
inviterUserThe user who sent the invitation.
inviteeUserThe user who accepted the invitation.
cancellationTokenCancellationTokenCancellation token to cancel the operation.
Returns
- Task
A task representing the asynchronous operation.
Remarks
The email is sent to the inviter to notify them that their invitation was accepted.
SendProjectInvitationAsync(ProjectInvitation, Project, User, User, string, string, CancellationToken)
Sends an email notification when a project invitation is created.
Task SendProjectInvitationAsync(ProjectInvitation invitation, Project project, User inviter, User invitee, string acceptUrl, string declineUrl, CancellationToken cancellationToken = default)
Parameters
invitationProjectInvitationThe project invitation entity.
projectProjectThe project the user is being invited to.
inviterUserThe user who sent the invitation.
inviteeUserThe user being invited.
acceptUrlstringThe secure URL for accepting the invitation (includes token).
declineUrlstringThe secure URL for declining the invitation (includes token).
cancellationTokenCancellationTokenCancellation token to cancel the operation.
Returns
- Task
A task representing the asynchronous operation.
Remarks
The email includes project information, inviter details, and action links for accepting or declining the invitation.
SendProjectInvitationDeclinedAsync(ProjectInvitation, Project, User, User, string?, CancellationToken)
Sends an email notification when a project invitation is declined.
Task SendProjectInvitationDeclinedAsync(ProjectInvitation invitation, Project project, User inviter, User invitee, string? reason, CancellationToken cancellationToken = default)
Parameters
invitationProjectInvitationThe project invitation entity that was declined.
projectProjectThe project the user declined to join.
inviterUserThe user who sent the invitation.
inviteeUserThe user who declined the invitation.
reasonstringOptional reason provided by the invitee for declining.
cancellationTokenCancellationTokenCancellation token to cancel the operation.
Returns
- Task
A task representing the asynchronous operation.
Remarks
The email is sent to the inviter to notify them that their invitation was declined, including the reason if provided.
SendProjectJoinApprovedAsync(ProjectJoinRequest, Project, User, User, CancellationToken)
Sends an email notification when a project join request is approved.
Task SendProjectJoinApprovedAsync(ProjectJoinRequest request, Project project, User requester, User owner, CancellationToken cancellationToken = default)
Parameters
requestProjectJoinRequestThe project join request entity that was approved.
projectProjectThe project the user joined.
requesterUserThe user whose join request was approved.
ownerUserThe project owner who approved the request.
cancellationTokenCancellationTokenCancellation token to cancel the operation.
Returns
- Task
A task representing the asynchronous operation.
Remarks
The email is sent to the requester to notify them that their join request was approved and they are now a project member.
SendProjectJoinDeclinedAsync(ProjectJoinRequest, Project, User, User, string?, CancellationToken)
Sends an email notification when a project join request is declined.
Task SendProjectJoinDeclinedAsync(ProjectJoinRequest request, Project project, User requester, User owner, string? reason, CancellationToken cancellationToken = default)
Parameters
requestProjectJoinRequestThe project join request entity that was declined.
projectProjectThe project the user's join request was declined for.
requesterUserThe user whose join request was declined.
ownerUserThe project owner who declined the request.
reasonstringOptional reason provided by the owner for declining.
cancellationTokenCancellationTokenCancellation token to cancel the operation.
Returns
- Task
A task representing the asynchronous operation.
Remarks
The email is sent to the requester to notify them that their join request was declined, including the reason if provided.
SendProjectJoinRequestAsync(ProjectJoinRequest, Project, User, User, string, string, CancellationToken)
Sends an email notification when a project join request is created.
Task SendProjectJoinRequestAsync(ProjectJoinRequest request, Project project, User requester, User owner, string approveUrl, string declineUrl, CancellationToken cancellationToken = default)
Parameters
requestProjectJoinRequestThe project join request entity.
projectProjectThe project the user wants to join.
requesterUserThe user who created the join request.
ownerUserThe project owner who can approve or decline the request.
approveUrlstringThe secure URL for approving the join request (includes token).
declineUrlstringThe secure URL for declining the join request (includes token).
cancellationTokenCancellationTokenCancellation token to cancel the operation.
Returns
- Task
A task representing the asynchronous operation.
Remarks
The email is sent to the project owner and includes project information, requester details, and action links for approving or declining the join request.