- Added EmailBlacklist service and controller for managing blacklisted emails. - Created EmailBlacklistDto for data transfer and EmailBlacklistFormViewModel for form handling. - Implemented views for listing and adding emails to the blacklist. - Updated database schema with new EmailBlacklist entity and related migrations. - Enhanced OAuthClientFormViewModel to include ClientId and ClientSecret properties. - Added EmailBlacklistService to handle email blacklisting logic. - Integrated email blacklist service into the application with necessary dependencies.
28 lines
1.2 KiB
C#
28 lines
1.2 KiB
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace MemberCenter.Api.Contracts;
|
|
|
|
public sealed record SubscribeRequest(
|
|
[property: JsonPropertyName("list_id")] Guid ListId,
|
|
[property: JsonPropertyName("email")] string Email,
|
|
[property: JsonPropertyName("preferences")] Dictionary<string, object>? Preferences,
|
|
[property: JsonPropertyName("source")] string? Source);
|
|
|
|
public sealed record UnsubscribeRequest(
|
|
[property: JsonPropertyName("token")] string Token);
|
|
|
|
public sealed record IssueUnsubscribeTokenRequest(
|
|
[property: JsonPropertyName("list_id")] Guid ListId,
|
|
[property: JsonPropertyName("email")] string Email);
|
|
|
|
public sealed record UpdatePreferencesRequest(
|
|
[property: JsonPropertyName("list_id")] Guid ListId,
|
|
[property: JsonPropertyName("email")] string Email,
|
|
[property: JsonPropertyName("preferences")] Dictionary<string, object> Preferences);
|
|
|
|
public sealed record DisableSubscriptionRequest(
|
|
[property: JsonPropertyName("email")] string Email,
|
|
[property: JsonPropertyName("reason")] string Reason,
|
|
[property: JsonPropertyName("disabled_by")] string DisabledBy,
|
|
[property: JsonPropertyName("occurred_at")] DateTimeOffset OccurredAt);
|