bigbuffet-rw/packages/pl-api/lib/entities/directory/language.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

17 lines
430 B
TypeScript

import * as v from 'valibot';
/**
* @category Directory schemas
*/
const directoryLanguageSchema = v.object({
locale: v.string(),
language: v.string(),
servers_count: v.fallback(v.nullable(v.pipe(v.unknown(), v.transform(Number))), null),
});
/**
* @category Directory entity types
*/
type DirectoryLanguage = v.InferOutput<typeof directoryLanguageSchema>;
export { directoryLanguageSchema, type DirectoryLanguage };