Files
CMS/src/CMSMicroservice.Application/Common/Interfaces/IAlertService.cs
T

55 lines
1.9 KiB
C#

namespace CMSMicroservice.Application.Common.Interfaces;
/// <summary>
/// سرویس ارسال Alert و Notification
/// برای ارسال اعلان‌های مختلف از طریق کانال‌های مختلف (Email, SMS, Slack, etc.)
/// </summary>
public interface IAlertService
{
/// <summary>
/// ارسال Alert برای خطاهای Critical
/// </summary>
Task SendCriticalAlertAsync(string title, string message, Exception? exception = null, CancellationToken cancellationToken = default);
/// <summary>
/// ارسال Alert برای Warning
/// </summary>
Task SendWarningAlertAsync(string title, string message, CancellationToken cancellationToken = default);
/// <summary>
/// ارسال اعلان موفقیت
/// </summary>
Task SendSuccessNotificationAsync(string title, string message, CancellationToken cancellationToken = default);
}
/// <summary>
/// سرویس ارسال Notification به کاربران
/// برای ارسال پیامک، ایمیل و پوش به کاربران سیستم
/// </summary>
public interface IUserNotificationService
{
/// <summary>
/// ارسال اعلان دریافت کمیسیون به کاربر
/// </summary>
Task SendCommissionReceivedNotificationAsync(
long userId,
decimal amount,
int weekNumber,
CancellationToken cancellationToken = default);
/// <summary>
/// ارسال اعلان فعال‌سازی عضویت باشگاه
/// </summary>
Task SendClubActivationNotificationAsync(
long userId,
CancellationToken cancellationToken = default);
/// <summary>
/// ارسال اعلان خطا در پرداخت
/// </summary>
Task SendPayoutErrorNotificationAsync(
long userId,
string errorMessage,
CancellationToken cancellationToken = default);
}