add client telmetry and fix missing openapi on prefault

This commit is contained in:
miloschwartz
2025-12-11 10:38:48 -05:00
parent 963468d7fa
commit f81909489a
5 changed files with 83 additions and 19 deletions

View File

@@ -21,7 +21,13 @@ const queryAccessAuditLogsQuery = z.object({
})
.transform((val) => Math.floor(new Date(val).getTime() / 1000))
.optional()
.prefault(() => getSevenDaysAgo().toISOString()),
.prefault(() => getSevenDaysAgo().toISOString())
.openapi({
type: "string",
format: "date-time",
description:
"Start time as ISO date string (defaults to 7 days ago)"
}),
timeEnd: z
.string()
.refine((val) => !isNaN(Date.parse(val)), {