From 1ca6877caa766f2c203a5925f1d864b85e05b442 Mon Sep 17 00:00:00 2001 From: Dustin Healy <54083382+dustinhealy@users.noreply.github.com> Date: Tue, 9 Jun 2026 12:45:54 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20fix:=20explicit=20factory=20retu?= =?UTF-8?q?rn=20type=20on=20createAdminAuditLogHandlers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same tsdown --isolatedDeclarations migration that hit packages/data-schemas also applies to packages/api; the audit-log handler factory's inferred return type tripped TS9013 against the new build pipeline. Annotated the factory with explicit handler signatures matching the sibling createAdminGrantsHandlers convention. Used Promise for the export handler because its final res.end() path returns undefined, unlike the other two handlers which always return a Response. --- packages/api/src/admin/auditLog.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/api/src/admin/auditLog.ts b/packages/api/src/admin/auditLog.ts index 6aa766a81b..9f4cde7515 100644 --- a/packages/api/src/admin/auditLog.ts +++ b/packages/api/src/admin/auditLog.ts @@ -257,7 +257,11 @@ function parseFilters( }; } -export function createAdminAuditLogHandlers(deps: AdminAuditLogDeps) { +export function createAdminAuditLogHandlers(deps: AdminAuditLogDeps): { + listAuditLog: (req: ServerRequest, res: Response) => Promise; + getAuditLogEntry: (req: ServerRequest, res: Response) => Promise; + exportAuditLogCsv: (req: ServerRequest, res: Response) => Promise; +} { const { listAuditLogPage, findAuditLogEntry, streamAuditLogEntries } = deps; async function listAuditLogHandler(req: ServerRequest, res: Response) {