2023-06-09 18:21:18 +10:00
|
|
|
import { z } from 'zod';
|
|
|
|
|
|
2024-01-30 06:12:52 +05:30
|
|
|
import { ZCurrentPasswordSchema, ZPasswordSchema } from '../auth-router/schema';
|
|
|
|
|
|
2024-01-30 17:31:27 +11:00
|
|
|
export const ZFindUserSecurityAuditLogsSchema = z.object({
|
|
|
|
|
page: z.number().optional(),
|
|
|
|
|
perPage: z.number().optional(),
|
|
|
|
|
});
|
|
|
|
|
|
2023-09-21 15:10:20 +01:00
|
|
|
export const ZRetrieveUserByIdQuerySchema = z.object({
|
|
|
|
|
id: z.number().min(1),
|
|
|
|
|
});
|
|
|
|
|
|
2023-06-09 18:21:18 +10:00
|
|
|
export const ZUpdateProfileMutationSchema = z.object({
|
|
|
|
|
name: z.string().min(1),
|
|
|
|
|
signature: z.string(),
|
|
|
|
|
});
|
|
|
|
|
|
2024-02-22 01:57:46 +05:30
|
|
|
export const ZUpdatePublicProfileMutationSchema = z.object({
|
2024-02-28 14:43:09 +11:00
|
|
|
url: z.string().min(1),
|
2024-02-22 01:57:46 +05:30
|
|
|
});
|
|
|
|
|
|
2023-06-09 18:21:18 +10:00
|
|
|
export const ZUpdatePasswordMutationSchema = z.object({
|
2024-01-30 06:12:52 +05:30
|
|
|
currentPassword: ZCurrentPasswordSchema,
|
|
|
|
|
password: ZPasswordSchema,
|
2023-06-09 18:21:18 +10:00
|
|
|
});
|
|
|
|
|
|
2023-09-18 11:15:29 +00:00
|
|
|
export const ZForgotPasswordFormSchema = z.object({
|
|
|
|
|
email: z.string().email().min(1),
|
|
|
|
|
});
|
|
|
|
|
|
2023-09-18 14:03:33 +00:00
|
|
|
export const ZResetPasswordFormSchema = z.object({
|
2024-01-30 06:12:52 +05:30
|
|
|
password: ZPasswordSchema,
|
2023-09-18 14:03:33 +00:00
|
|
|
token: z.string().min(1),
|
|
|
|
|
});
|
|
|
|
|
|
2023-11-21 06:42:29 +02:00
|
|
|
export const ZConfirmEmailMutationSchema = z.object({
|
|
|
|
|
email: z.string().email().min(1),
|
|
|
|
|
});
|
|
|
|
|
|
2024-01-30 17:31:27 +11:00
|
|
|
export type TFindUserSecurityAuditLogsSchema = z.infer<typeof ZFindUserSecurityAuditLogsSchema>;
|
2023-09-21 15:10:20 +01:00
|
|
|
export type TRetrieveUserByIdQuerySchema = z.infer<typeof ZRetrieveUserByIdQuerySchema>;
|
2023-09-18 11:15:29 +00:00
|
|
|
export type TUpdateProfileMutationSchema = z.infer<typeof ZUpdateProfileMutationSchema>;
|
2023-06-09 18:21:18 +10:00
|
|
|
export type TUpdatePasswordMutationSchema = z.infer<typeof ZUpdatePasswordMutationSchema>;
|
2023-09-18 11:15:29 +00:00
|
|
|
export type TForgotPasswordFormSchema = z.infer<typeof ZForgotPasswordFormSchema>;
|
2023-09-18 14:03:33 +00:00
|
|
|
export type TResetPasswordFormSchema = z.infer<typeof ZResetPasswordFormSchema>;
|
2023-11-21 06:42:29 +02:00
|
|
|
export type TConfirmEmailMutationSchema = z.infer<typeof ZConfirmEmailMutationSchema>;
|