DD.WellWorkover.Cloud/AsbCloudApp/Services/Notifications/INotificationService.cs

53 lines
1.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Threading;
using System.Threading.Tasks;
using AsbCloudApp.Data;
namespace AsbCloudApp.Services.Notifications;
/// <summary>
/// Интерфейс для работы с уведомлениями
/// </summary>
public interface INotificationService
{
/// <summary>
/// Отправка нового уведомления
/// </summary>
/// <param name="idUser"></param>
/// <param name="idNotificationCategory"></param>
/// <param name="title"></param>
/// <param name="message"></param>
/// <param name="timeToLife"></param>
/// <param name="notificationTransport"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Task NotifyAsync(int idUser,
int idNotificationCategory,
string title,
string message,
TimeSpan timeToLife,
NotificationTransport notificationTransport,
CancellationToken cancellationToken);
/// <summary>
/// Обновление уведомления
/// </summary>
/// <param name="idNotification"></param>
/// <param name="isRead"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Task UpdateNotificationAsync(int idNotification,
bool isRead,
CancellationToken cancellationToken);
/// <summary>
/// Отправка уведомлений, которые не были отправлены
/// </summary>
/// <param name="idUser"></param>
/// <param name="notificationTransport"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Task ResendNotificationAsync(int idUser,
NotificationTransport notificationTransport,
CancellationToken cancellationToken);
}