Files
PnvPanel/backend/src/PnvPanel.Application/Common/Interfaces/IRealtimeNotifier.cs
T
Leonid Pershin 7b6fe9ad78 Add Telegram bot integration and enhance user management features
- Introduced Telegram.Bot package for bot functionality.
- Updated user management to include Telegram linking and blocking features.
- Enhanced activation request handling with notifications via Telegram.
- Added new database entities for Telegram link tokens and login requests.
- Implemented traffic synchronization for client stats in the XuiPanelGateway.
- Updated application structure to support new test projects and improved dependency injection for Telegram services.
2026-07-02 01:01:03 +03:00

25 lines
1.2 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 PnvPanel.Domain.Configs;
using PnvPanel.Domain.Nodes;
namespace PnvPanel.Application.Common.Interfaces;
/// <summary>
/// Пуш событий через SignalR. Реализация (SignalRRealtimeNotifier) живёт в Api (не в Infrastructure) —
/// ей нужен IHubContext&lt;PanelHub&gt;, а Hub, будучи транспортным механизмом, определён в Api;
/// Infrastructure не может ссылаться на Api (обратное направление зависимостей).
/// </summary>
public interface IRealtimeNotifier
{
Task NotifyConfigTrafficUpdatedAsync(
Guid userId, Guid configId, long usedUpBytes, long usedDownBytes, CancellationToken cancellationToken);
Task NotifyConfigStatusChangedAsync(Guid userId, Guid configId, ConfigStatus status, CancellationToken cancellationToken);
Task NotifyNodeStatusChangedAsync(Guid nodeId, NodeStatus status, DateTimeOffset? lastSyncAt, CancellationToken cancellationToken);
Task NotifyActivationRequestedAsync(
Guid requestId, Guid userId, string userName, string? comment, DateTimeOffset createdAt, CancellationToken cancellationToken);
Task NotifyUserActivatedAsync(Guid userId, CancellationToken cancellationToken);
}