Table of Contents

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

invitation ProjectInvitation

The project invitation entity that was accepted.

project Project

The project the user joined.

inviter User

The user who sent the invitation.

invitee User

The user who accepted the invitation.

cancellationToken CancellationToken

Cancellation 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

invitation ProjectInvitation

The project invitation entity.

project Project

The project the user is being invited to.

inviter User

The user who sent the invitation.

invitee User

The user being invited.

acceptUrl string

The secure URL for accepting the invitation (includes token).

declineUrl string

The secure URL for declining the invitation (includes token).

cancellationToken CancellationToken

Cancellation 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

invitation ProjectInvitation

The project invitation entity that was declined.

project Project

The project the user declined to join.

inviter User

The user who sent the invitation.

invitee User

The user who declined the invitation.

reason string

Optional reason provided by the invitee for declining.

cancellationToken CancellationToken

Cancellation 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

request ProjectJoinRequest

The project join request entity that was approved.

project Project

The project the user joined.

requester User

The user whose join request was approved.

owner User

The project owner who approved the request.

cancellationToken CancellationToken

Cancellation 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

request ProjectJoinRequest

The project join request entity that was declined.

project Project

The project the user's join request was declined for.

requester User

The user whose join request was declined.

owner User

The project owner who declined the request.

reason string

Optional reason provided by the owner for declining.

cancellationToken CancellationToken

Cancellation 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

request ProjectJoinRequest

The project join request entity.

project Project

The project the user wants to join.

requester User

The user who created the join request.

owner User

The project owner who can approve or decline the request.

approveUrl string

The secure URL for approving the join request (includes token).

declineUrl string

The secure URL for declining the join request (includes token).

cancellationToken CancellationToken

Cancellation 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.