feat: agregar soporte para plantillas de correo electrónico y contexto en el envío de notificaciones

This commit is contained in:
2026-08-20 11:38:50 -03:00
parent e4441fa476
commit b6399d28fc
13 changed files with 174 additions and 11 deletions
@@ -45,6 +45,8 @@ export interface ResolvedNotificationContent {
companyOwnerId?: string;
subject: string;
message: string;
emailTemplateId?: string;
emailContext?: Record<string, unknown>;
}
const appointmentSchema = new Schema(
@@ -169,6 +171,8 @@ export async function resolveNotificationContent(job: INotificationJobDocument):
companyOwnerId: companyOwnerId ? String(companyOwnerId) : undefined,
subject: fallbackSubject.trim(),
message: fallbackMessage.trim(),
emailTemplateId: job.payload.emailTemplateId?.trim(),
emailContext: job.payload.emailContext,
};
}
}