diff --git a/EnvelopeGenerator.Application/Common/Interfaces/Services/Notification/DocumentAccessCodeReceivedNotification.cs b/EnvelopeGenerator.Application/Common/Interfaces/Services/Notification/DocumentAccessCodeReceivedNotification.cs new file mode 100644 index 00000000..e15778f9 --- /dev/null +++ b/EnvelopeGenerator.Application/Common/Interfaces/Services/Notification/DocumentAccessCodeReceivedNotification.cs @@ -0,0 +1,47 @@ +using EnvelopeGenerator.Domain.Constants; + +namespace EnvelopeGenerator.Application.Common.Interfaces.Services.Notification; + +/// +/// Payload for template. +/// +public record DocumentAccessCodeReceivedNotification : EnvelopeNotificationBase +{ + /// + /// Replaces [DOCUMENT_TITLE] in mail subject/body. + /// + public required string DocumentTitle { get; init; } + + /// + /// Replaces [NAME_RECEIVER] in mail body. + /// + public required string NameReceiver { get; init; } + + /// + /// Replaces [NAME_SENDER] in mail body. + /// + public required string NameSender { get; init; } + + /// + /// Determines [SIGNATURE_TYPE] text in mail body. + /// + public required bool IsReadAndConfirm { private get; init; } + + /// + /// Replaces [SIGNATURE_TYPE] in mail body. + /// + public string SignatureType => IsReadAndConfirm ? "Signieren" : "Lesen und bestätigen"; + + /// + /// Replaces [DOCUMENT_ACCESS_CODE] in mail body. + /// + public required string DocumentAccessCode { get; init; } + + /// + /// Replaces [NAME_PORTAL] in mail body. + /// + public string NamePortal { get; init; } = "signFLOW Portal"; + + /// + public override EmailTemplateType GetTemplateType() => EmailTemplateType.DocumentAccessCodeReceived; +} diff --git a/EnvelopeGenerator.Application/Common/Interfaces/Services/Notification/DocumentCompletedNotification.cs b/EnvelopeGenerator.Application/Common/Interfaces/Services/Notification/DocumentCompletedNotification.cs new file mode 100644 index 00000000..1345ec5f --- /dev/null +++ b/EnvelopeGenerator.Application/Common/Interfaces/Services/Notification/DocumentCompletedNotification.cs @@ -0,0 +1,27 @@ +using EnvelopeGenerator.Domain.Constants; + +namespace EnvelopeGenerator.Application.Common.Interfaces.Services.Notification; + +/// +/// Payload for template. +/// +public record DocumentCompletedNotification : EnvelopeNotificationBase +{ + /// + /// Replaces [DOCUMENT_TITLE] in mail subject/body. + /// + public required string DocumentTitle { get; init; } + + /// + /// Replaces [NAME_RECEIVER] in mail body. + /// + public required string NameReceiver { get; init; } + + /// + /// Replaces [NAME_PORTAL] in mail body. + /// + public string NamePortal { get; init; } = "signFLOW Portal"; + + /// + public override EmailTemplateType GetTemplateType() => EmailTemplateType.DocumentCompleted; +} diff --git a/EnvelopeGenerator.Application/Common/Interfaces/Services/Notification/DocumentDeletedNotification.cs b/EnvelopeGenerator.Application/Common/Interfaces/Services/Notification/DocumentDeletedNotification.cs new file mode 100644 index 00000000..dca00acf --- /dev/null +++ b/EnvelopeGenerator.Application/Common/Interfaces/Services/Notification/DocumentDeletedNotification.cs @@ -0,0 +1,37 @@ +using EnvelopeGenerator.Domain.Constants; + +namespace EnvelopeGenerator.Application.Common.Interfaces.Services.Notification; + +/// +/// Payload for template. +/// +public record DocumentDeletedNotification : EnvelopeNotificationBase +{ + /// + /// Replaces [DOCUMENT_TITLE] in mail subject/body. + /// + public required string DocumentTitle { get; init; } + + /// + /// Replaces [NAME_RECEIVER] in mail body. + /// + public required string NameReceiver { get; init; } + + /// + /// Replaces [NAME_SENDER] in mail body. + /// + public required string NameSender { get; init; } + + /// + /// Replaces [REASON] in mail body. + /// + public required string Reason { get; init; } + + /// + /// Replaces [NAME_PORTAL] in mail body. + /// + public string NamePortal { get; init; } = "signFLOW Portal"; + + /// + public override EmailTemplateType GetTemplateType() => EmailTemplateType.DocumentDeleted; +} diff --git a/EnvelopeGenerator.Application/Common/Interfaces/Services/Notification/DocumentRejectedAdmNotification.cs b/EnvelopeGenerator.Application/Common/Interfaces/Services/Notification/DocumentRejectedAdmNotification.cs new file mode 100644 index 00000000..2b5ce019 --- /dev/null +++ b/EnvelopeGenerator.Application/Common/Interfaces/Services/Notification/DocumentRejectedAdmNotification.cs @@ -0,0 +1,37 @@ +using EnvelopeGenerator.Domain.Constants; + +namespace EnvelopeGenerator.Application.Common.Interfaces.Services.Notification; + +/// +/// Payload for template. +/// +public record DocumentRejectedAdmNotification : EnvelopeNotificationBase +{ + /// + /// Replaces [DOCUMENT_TITLE] in mail subject/body. + /// + public required string DocumentTitle { get; init; } + + /// + /// Replaces [NAME_SENDER] in mail body. + /// + public required string NameSender { get; init; } + + /// + /// Replaces [NAME_RECEIVER] in mail body. + /// + public required string NameReceiver { get; init; } + + /// + /// Replaces [REASON] in mail body. + /// + public required string Reason { get; init; } + + /// + /// Replaces [NAME_PORTAL] in mail body. + /// + public string NamePortal { get; init; } = "signFLOW Portal"; + + /// + public override EmailTemplateType GetTemplateType() => EmailTemplateType.DocumentRejected_ADM; +} diff --git a/EnvelopeGenerator.Application/Common/Interfaces/Services/Notification/DocumentRejectedRec2Notification.cs b/EnvelopeGenerator.Application/Common/Interfaces/Services/Notification/DocumentRejectedRec2Notification.cs new file mode 100644 index 00000000..17eb0290 --- /dev/null +++ b/EnvelopeGenerator.Application/Common/Interfaces/Services/Notification/DocumentRejectedRec2Notification.cs @@ -0,0 +1,32 @@ +using EnvelopeGenerator.Domain.Constants; + +namespace EnvelopeGenerator.Application.Common.Interfaces.Services.Notification; + +/// +/// Payload for template. +/// +public record DocumentRejectedRec2Notification : EnvelopeNotificationBase +{ + /// + /// Replaces [DOCUMENT_TITLE] in mail subject/body. + /// + public required string DocumentTitle { get; init; } + + /// + /// Replaces [NAME_RECEIVER] in mail body. + /// + public required string NameReceiver { get; init; } + + /// + /// Replaces [NAME_SENDER] in mail body. + /// + public required string NameSender { get; init; } + + /// + /// Replaces [NAME_PORTAL] in mail body. + /// + public string NamePortal { get; init; } = "signFLOW Portal"; + + /// + public override EmailTemplateType GetTemplateType() => EmailTemplateType.DocumentRejected_REC_2; +} diff --git a/EnvelopeGenerator.Application/Common/Interfaces/Services/Notification/DocumentRejectedRecNotification.cs b/EnvelopeGenerator.Application/Common/Interfaces/Services/Notification/DocumentRejectedRecNotification.cs new file mode 100644 index 00000000..0eae5f33 --- /dev/null +++ b/EnvelopeGenerator.Application/Common/Interfaces/Services/Notification/DocumentRejectedRecNotification.cs @@ -0,0 +1,32 @@ +using EnvelopeGenerator.Domain.Constants; + +namespace EnvelopeGenerator.Application.Common.Interfaces.Services.Notification; + +/// +/// Payload for template. +/// +public record DocumentRejectedRecNotification : EnvelopeNotificationBase +{ + /// + /// Replaces [DOCUMENT_TITLE] in mail subject/body. + /// + public required string DocumentTitle { get; init; } + + /// + /// Replaces [NAME_RECEIVER] in mail body. + /// + public required string NameReceiver { get; init; } + + /// + /// Replaces [NAME_SENDER] in mail body. + /// + public required string NameSender { get; init; } + + /// + /// Replaces [NAME_PORTAL] in mail body. + /// + public string NamePortal { get; init; } = "signFLOW Portal"; + + /// + public override EmailTemplateType GetTemplateType() => EmailTemplateType.DocumentRejected_REC; +} diff --git a/EnvelopeGenerator.Application/Common/Interfaces/Services/Notification/TotpSecretNotification.cs b/EnvelopeGenerator.Application/Common/Interfaces/Services/Notification/TotpSecretNotification.cs new file mode 100644 index 00000000..e6baad6c --- /dev/null +++ b/EnvelopeGenerator.Application/Common/Interfaces/Services/Notification/TotpSecretNotification.cs @@ -0,0 +1,27 @@ +using EnvelopeGenerator.Domain.Constants; + +namespace EnvelopeGenerator.Application.Common.Interfaces.Services.Notification; + +/// +/// Payload for template. +/// +public record TotpSecretNotification : EnvelopeNotificationBase +{ + /// + /// Replaces [TFA_EXPIRATION] in mail body. + /// + public required string TfaExpiration { get; init; } + + /// + /// Replaces [TFA_QR_CODE] in mail body. + /// + public required string TfaQrCode { get; init; } + + /// + /// Replaces [NAME_PORTAL] in mail body. + /// + public string NamePortal { get; init; } = "signFLOW Portal"; + + /// + public override EmailTemplateType GetTemplateType() => EmailTemplateType.TotpSecret; +}