fix: return buffer objects from report exporters

This commit is contained in:
Esdras Renan 2025-11-10 02:58:16 -03:00
parent 56dd48d6b9
commit 8ecead47f2

View file

@ -48,7 +48,7 @@ export async function createConvexContext(identity: ViewerIdentity): Promise<Con
export type ReportArtifact = {
fileName: string
mimeType: string
buffer: Uint8Array
buffer: Buffer
}
type BaseOptions = {
@ -126,7 +126,7 @@ export async function buildHoursWorkbook(
return {
fileName,
mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
buffer: new Uint8Array(workbook),
buffer: workbook,
}
}
@ -188,7 +188,7 @@ export async function buildBacklogWorkbook(
return {
fileName,
mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
buffer: new Uint8Array(workbook),
buffer: workbook,
}
}
@ -235,7 +235,7 @@ export async function buildSlaWorkbook(
return {
fileName,
mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
buffer: new Uint8Array(workbook),
buffer: workbook,
}
}
@ -286,7 +286,7 @@ export async function buildCsatWorkbook(
return {
fileName,
mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
buffer: new Uint8Array(workbook),
buffer: workbook,
}
}
@ -341,6 +341,6 @@ export async function buildTicketsByChannelWorkbook(
return {
fileName,
mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
buffer: new Uint8Array(workbook),
buffer: workbook,
}
}