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