AI Implementation feature(857): Authenticated Shell: Header, Quick Tabs and Change Password (#14)
This commit was merged in pull request #14.
This commit is contained in:
@@ -37,4 +37,25 @@ export interface LoginResponse {
|
||||
refreshToken: string;
|
||||
expiresIn: number;
|
||||
user: { id: string; username: string; role: 'admin' | 'player' };
|
||||
}
|
||||
}
|
||||
|
||||
export const ChangePasswordDtoSchema = z
|
||||
.object({
|
||||
oldPassword: z.string().min(1).max(256),
|
||||
newPassword: z.string().min(1).max(256),
|
||||
confirmNewPassword: z.string().min(1).max(256),
|
||||
})
|
||||
.refine((d) => d.newPassword === d.confirmNewPassword, {
|
||||
path: ['confirmNewPassword'],
|
||||
message: 'Passwords do not match',
|
||||
});
|
||||
export type ChangePasswordDto = z.infer<typeof ChangePasswordDtoSchema>;
|
||||
|
||||
export const MeResponseDtoSchema = z.object({
|
||||
id: z.string(),
|
||||
username: z.string(),
|
||||
role: z.enum(['admin', 'player']),
|
||||
rank: z.number().int().nullable(),
|
||||
points: z.number().int(),
|
||||
});
|
||||
export type MeResponseDto = z.infer<typeof MeResponseDtoSchema>;
|
||||
Reference in New Issue
Block a user