| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- using Application.Abstractions.Chat;
- namespace Application.Abstractions.Hub;
- /// <summary>
- /// AppHub 클라이언트 인터페이스 — 모든 페이지에서 사용하는 공통 Hub
- /// 접속자 추적 + 채팅 + 알림 + 쪽지 + 크루 초대/동의/toast
- /// </summary>
- public interface IAppHubClient
- {
- // ── 채팅 (기존 ChatHub 통합) ──────────────────────────────────
- Task ReceiveMessage(ChatMessage message);
- Task ReceiveHistory(IReadOnlyList<ChatMessage> messages);
- Task ReceiveSystemMessage(string message);
- Task ReceiveParticipantCount(int count);
- Task ReceiveParticipants(IReadOnlyList<ChatParticipant> participants);
- Task Connected(string message);
- Task Logout(string message);
- Task Kick();
- // ── 알림 + 쪽지 ──────────────────────────────────────────────
- Task ReceiveNotification(object notification);
- Task ReceiveNote(object notePreview);
- Task ReceiveUnreadCounts(int notificationCount, int noteCount);
- // ── 채널 상태 (PubSub 기반 실시간) ─────────────────────────
- Task ReceiveChannelStatus(object channelStatus);
- // ── 크루 ─────────────────────────────────────────────────────
- Task ReceiveCrewInvitation(object invitation);
- Task ReceiveCrewConsentUpdate(object consentStatus);
- Task ReceiveCrewStarted(object sessionInfo);
- Task ReceiveCrewEnded(object sessionResult);
- Task ReceiveCrewToast(object toastData);
- /// <summary>
- /// 크루원 리스트 변경 (추가/수정/삭제/초대응답).
- /// payload: { kind: "added" | "updated" | "removed" | "invitationStatusChanged", data: object }
- /// 운영자(JoinCrew 그룹 구독자)에게만 broadcast.
- /// </summary>
- Task ReceiveCrewMemberChange(object payload);
- // ── 피드 ─────────────────────────────────────────────────────
- Task ReceiveFeedPost(object toast);
- // ── Presence (구독 기반 온라인 상태 broadcast) ──────────────
- Task ReceivePresenceChange(int memberID, bool isOnline);
- }
|