template-saas/apps/backend/dist/modules/notifications/gateways/notifications.gateway.d.ts
rckrdmrd 50a821a415
Some checks failed
CI / Backend CI (push) Has been cancelled
CI / Frontend CI (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / CI Summary (push) Has been cancelled
[SIMCO-V38] feat: Actualizar a SIMCO v3.8.0
- HERENCIA-SIMCO.md actualizado con directivas v3.7 y v3.8
- Actualizaciones de configuracion

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 08:53:08 -06:00

33 lines
1.4 KiB
TypeScript

import { OnGatewayConnection, OnGatewayDisconnect } from '@nestjs/websockets';
import { Server, Socket } from 'socket.io';
import { Notification } from '../entities';
interface AuthenticatedSocket extends Socket {
userId?: string;
tenantId?: string;
}
export declare class NotificationsGateway implements OnGatewayConnection, OnGatewayDisconnect {
server: Server;
private readonly logger;
private userSockets;
private socketUsers;
handleConnection(client: AuthenticatedSocket): void;
handleDisconnect(client: AuthenticatedSocket): void;
emitToUser(tenantId: string, userId: string, notification: Partial<Notification>): Promise<number>;
emitToTenant(tenantId: string, event: string, data: any): Promise<void>;
handleMarkAsRead(client: AuthenticatedSocket, payload: {
notificationId: string;
}): void;
handleMarkAllAsRead(client: AuthenticatedSocket): void;
handleGetUnreadCount(client: AuthenticatedSocket): {
event: string;
};
emitUnreadCount(tenantId: string, userId: string, count: number): Promise<void>;
emitNotificationDeleted(tenantId: string, userId: string, notificationId: string): Promise<void>;
getConnectedUsersCount(): number;
getTotalConnections(): number;
isUserOnline(tenantId: string, userId: string): boolean;
private extractUserId;
private extractTenantId;
}
export {};