Developer 02 fe252b9979 Refactor email template commands and add controller
- Updated `UpdateEmailTemplateCommand` to use a property for `EmailTemplateQuery` with `JsonIgnore`, allowing optional body and subject parameters.
- Simplified `UpdateToDefaultCommand` by removing documentation comments and constructor parameters.
- Corrected namespace for `ReadEmailTemplateQuery` from `Query.Read` to `Queries.Read`.
- Introduced `ResetEnvelopeTemplateCommand` with optional ID and type, inheriting from `EmailTemplateQuery`, along with detailed XML documentation.
- Added `EmailTemplateController` to manage email templates, including methods for retrieval and updates, utilizing AutoMapper and authorization attributes.
2025-04-12 01:20:04 +02:00

23 lines
1.6 KiB
C#

using EnvelopeGenerator.Common;
namespace EnvelopeGenerator.Application.EmailTemplates.Commands.Reset;
/// <summary>
/// Ein Befehl zum Zurücksetzen einer E-Mail-Vorlage auf die Standardwerte.
/// Erbt von <see cref="EmailTemplateQuery"/> und ermöglicht die Angabe einer optionalen ID und eines Typs der E-Mail-Vorlage.
/// </summary>
/// <param name="Id">Die optionale ID der E-Mail-Vorlage, die zurückgesetzt werden soll.</param>
/// <param name="Type">Der Typ der E-Mail-Vorlage, z. B. <see cref="Constants.EmailTemplateType"/> (optional). Beispiele:
/// 0 - DocumentReceived: Benachrichtigung über den Empfang eines Dokuments.
/// 1 - DocumentSigned: Benachrichtigung über die Unterzeichnung eines Dokuments.
/// 2 - DocumentDeleted: Benachrichtigung über das Löschen eines Dokuments.
/// 3 - DocumentCompleted: Benachrichtigung über den Abschluss eines Dokuments.
/// 4 - DocumentAccessCodeReceived: Benachrichtigung über den Erhalt eines Zugangscodes.
/// 5 - DocumentShared: Benachrichtigung über das Teilen eines Dokuments.
/// 6 - TotpSecret: Benachrichtigung über ein TOTP-Geheimnis.
/// 7 - DocumentRejected_ADM (Für den Absender): Mail an den Absender, wenn das Dokument abgelehnt wird.
/// 8 - DocumentRejected_REC (Für den ablehnenden Empfänger): Mail an den ablehnenden Empfänger, wenn das Dokument abgelehnt wird.
/// 9 - DocumentRejected_REC_2 (Für sonstige Empfänger): Mail an andere Empfänger (Brief), wenn das Dokument abgelehnt wird.
/// </param>
public record ResetEnvelopeTemplateCommand(int? Id, Constants.EmailTemplateType? Type) : EmailTemplateQuery(Id, Type);