18 lines
400 B
TypeScript
18 lines
400 B
TypeScript
import { z } from 'zod';
|
|
|
|
export const loginSchema = z.object({
|
|
username: z.string().trim().min(3).max(64),
|
|
password: z.string().min(8).max(200),
|
|
});
|
|
|
|
export type LoginInput = z.infer<typeof loginSchema>;
|
|
|
|
export const authUserSchema = z.object({
|
|
id: z.string(),
|
|
username: z.string(),
|
|
slug: z.string(),
|
|
displayName: z.string(),
|
|
});
|
|
|
|
export type AuthUser = z.infer<typeof authUserSchema>;
|