bigbuffet-rw/packages/pl-api/lib/entities/directory/statistics-period.ts
marcin mikołajczak 0bed543c20 pl-api: moar blind search and replace
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-10-14 22:50:34 +02:00

12 lines
548 B
TypeScript

import * as v from 'valibot';
const directoryStatisticsPeriodSchema = v.object({
period: z.string().date(),
server_count: v.fallback(v.nullable(v.pipe(v.unknown(), v.transform(Number))), null),
user_count: v.fallback(v.nullable(v.pipe(v.unknown(), v.transform(Number))), null),
active_user_count: v.fallback(v.nullable(v.pipe(v.unknown(), v.transform(Number))), null),
});
type DirectoryStatisticsPeriod = v.InferOutput<typeof directoryStatisticsPeriodSchema>;
export { directoryStatisticsPeriodSchema, type DirectoryStatisticsPeriod };