bigbuffet-rw/packages/pl-api/lib/entities/directory/statistics-period.ts
marcin mikołajczak bc65755862 pl-api: Update docs
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-11-29 16:01:54 +01:00

18 lines
645 B
TypeScript

import * as v from 'valibot';
/**
* @category Directory schemas
*/
const directoryStatisticsPeriodSchema = v.object({
period: v.pipe(v.string(), v.isoDate()),
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),
});
/**
* @category Directory entity types
*/
type DirectoryStatisticsPeriod = v.InferOutput<typeof directoryStatisticsPeriodSchema>;
export { directoryStatisticsPeriodSchema, type DirectoryStatisticsPeriod };