template-saas/apps/backend/dist/modules/notifications/services/notifications.service.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

34 lines
1.9 KiB
TypeScript

import { Repository } from 'typeorm';
import { Notification, NotificationTemplate, UserNotificationPreference } from '../entities';
import { CreateNotificationDto, SendTemplateNotificationDto, UpdatePreferencesDto } from '../dto';
import { EmailService } from '@modules/email';
export declare class NotificationsService {
private readonly notificationRepository;
private readonly templateRepository;
private readonly preferenceRepository;
private readonly emailService;
private readonly logger;
constructor(notificationRepository: Repository<Notification>, templateRepository: Repository<NotificationTemplate>, preferenceRepository: Repository<UserNotificationPreference>, emailService: EmailService);
create(dto: CreateNotificationDto, tenantId: string): Promise<Notification>;
sendFromTemplate(dto: SendTemplateNotificationDto, tenantId: string): Promise<Notification>;
findAllForUser(userId: string, tenantId: string, options?: {
page?: number;
limit?: number;
unreadOnly?: boolean;
}): Promise<{
data: Notification[];
total: number;
unread: number;
}>;
markAsRead(notificationId: string, userId: string, tenantId: string): Promise<Notification>;
markAllAsRead(userId: string, tenantId: string): Promise<number>;
delete(notificationId: string, userId: string, tenantId: string): Promise<void>;
getUnreadCount(userId: string, tenantId: string): Promise<number>;
findAllTemplates(): Promise<NotificationTemplate[]>;
findTemplateByCode(code: string): Promise<NotificationTemplate>;
getPreferences(userId: string, tenantId: string): Promise<UserNotificationPreference>;
updatePreferences(userId: string, tenantId: string, dto: UpdatePreferencesDto): Promise<UserNotificationPreference>;
private formatEmailHtml;
cleanupOldNotifications(daysToKeep?: number): Promise<number>;
}