AI Implementation feature(820): Project Scaffold and Platform Foundations (#1)
This commit was merged in pull request #1.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
export const LoginDtoSchema = z.object({
|
||||
username: z.string().min(1).max(64),
|
||||
password: z.string().min(1).max(256),
|
||||
});
|
||||
export type LoginDto = z.infer<typeof LoginDtoSchema>;
|
||||
|
||||
export const RefreshDtoSchema = z.object({
|
||||
refreshToken: z.string().min(1).optional(),
|
||||
});
|
||||
export type RefreshDto = z.infer<typeof RefreshDtoSchema>;
|
||||
|
||||
export const CsrfResponseDtoSchema = z.object({
|
||||
csrfToken: z.string(),
|
||||
});
|
||||
export type CsrfResponseDto = z.infer<typeof CsrfResponseDtoSchema>;
|
||||
|
||||
export interface LoginResponse {
|
||||
accessToken: string;
|
||||
refreshToken: string;
|
||||
expiresIn: number;
|
||||
user: { id: string; username: string; role: 'admin' | 'player' };
|
||||
}
|
||||
Reference in New Issue
Block a user