using MemberCenter.Application.Models.Profile;
using MemberCenter.Application.Models.Newsletter;

namespace MemberCenter.Application.Abstractions;

public interface INewsletterService
{
    Task<PendingSubscriptionResult?> SubscribeAsync(Guid listId, string email, Dictionary<string, object>? preferences);
    Task<SubscriptionDto?> ConfirmAsync(string token);
    Task<string?> IssueUnsubscribeTokenAsync(Guid listId, string email);
    Task<string?> IssueOneClickUnsubscribeTokenAsync(Guid tenantId, Guid listId, Guid subscriberId);
    Task<IReadOnlyList<OneClickUnsubscribeTokenResult>> IssueOneClickUnsubscribeTokensAsync(Guid tenantId, Guid listId, IReadOnlyList<Guid> subscriberIds);
    Task<SubscriptionDto?> UnsubscribeAsync(string token);
    Task<SubscriptionDto?> GetPreferencesAsync(Guid listId, string email);
    Task<SubscriptionDto?> UpdatePreferencesAsync(Guid listId, string email, Dictionary<string, object> preferences);
    Task<IReadOnlyList<SubscriptionDto>> ListSubscriptionsAsync(Guid listId);
    Task<IReadOnlyList<UserSubscriptionSummaryDto>> ListSubscriptionsForUserAsync(Guid userId);
    Task<UserSubscriptionSummaryDto?> UnsubscribeForUserAsync(Guid userId, Guid subscriptionId);
}
