- Updated OpenAPI documentation to include new OAuth2 usage types: `send_api`. - Added endpoints for issuing one-click unsubscribe tokens in both single and batch requests. - Modified OAuth client creation and management to enforce new usage types and redirect URI requirements. - Implemented logic in the Newsletter service to handle one-click unsubscribe token issuance. - Updated UI to reflect changes in OAuth client usage options and redirect URI handling. - Enhanced token generation logic to support new scopes and audience settings for Send Engine.
17 lines
977 B
C#
17 lines
977 B
C#
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);
|
|
}
|