feat: historial de correos en ticket + fechas fijas a America/Santiago
This commit is contained in:
1 parent
eaa96fbc24
commit
38e21d20dd
6 files changed
+132
-7
No files matched your search
@@ -129,6 +129,35 @@ export async function addComment(
|
||||
});
|
||||
}
|
||||
|
||||
// ==================== Historial de correos del ticket ====================
|
||||
// Integración email <-> ticket: enviados desde soporte (mail.log) +
|
||||
// respuestas recibidas (helpdesk.email_inbound). Visible para quien
|
||||
// puede ver el ticket (equipo + solicitante).
|
||||
export interface TicketSentEmail {
|
||||
id: number;
|
||||
template: string;
|
||||
recipient: string;
|
||||
subject: string;
|
||||
status: string;
|
||||
error?: string;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export interface TicketReceivedEmail {
|
||||
authorId?: string;
|
||||
authorEmail: string;
|
||||
subject: string;
|
||||
status: string;
|
||||
error?: string;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export async function getTicketEmails(ticketId: number) {
|
||||
return fetchApi<{ sent: TicketSentEmail[]; received: TicketReceivedEmail[] }>(
|
||||
`/api/helpdesk/ticket/${ticketId}/emails`
|
||||
);
|
||||
}
|
||||
|
||||
// ==================== Knowledge Base ====================
|
||||
export async function getKBArticles() {
|
||||
return fetchApi<KBArticle[]>("/api/helpdesk/kb/published");
|
||||
|
||||
Reference in new issue
Block a user