mirror of
https://github.com/documenso/documenso.git
synced 2025-11-12 15:53:02 +10:00
49 lines
1.6 KiB
TypeScript
49 lines
1.6 KiB
TypeScript
import { z } from 'zod';
|
|
|
|
import { ZCurrentPasswordSchema, ZPasswordSchema } from '../auth-router/schema';
|
|
|
|
export const ZFindUserSecurityAuditLogsSchema = z.object({
|
|
page: z.number().optional(),
|
|
perPage: z.number().optional(),
|
|
});
|
|
|
|
export const ZRetrieveUserByIdQuerySchema = z.object({
|
|
id: z.number().min(1),
|
|
});
|
|
|
|
export const ZUpdateProfileMutationSchema = z.object({
|
|
name: z.string().min(1),
|
|
signature: z.string(),
|
|
});
|
|
|
|
export const ZUpdatePublicProfileMutationSchema = z.object({
|
|
profileURL: z.string().min(1),
|
|
profileBio: z.string().max(256, { message: 'Profile bio must not exceed 256 characters' }),
|
|
});
|
|
|
|
export const ZUpdatePasswordMutationSchema = z.object({
|
|
currentPassword: ZCurrentPasswordSchema,
|
|
password: ZPasswordSchema,
|
|
});
|
|
|
|
export const ZForgotPasswordFormSchema = z.object({
|
|
email: z.string().email().min(1),
|
|
});
|
|
|
|
export const ZResetPasswordFormSchema = z.object({
|
|
password: ZPasswordSchema,
|
|
token: z.string().min(1),
|
|
});
|
|
|
|
export const ZConfirmEmailMutationSchema = z.object({
|
|
email: z.string().email().min(1),
|
|
});
|
|
|
|
export type TFindUserSecurityAuditLogsSchema = z.infer<typeof ZFindUserSecurityAuditLogsSchema>;
|
|
export type TRetrieveUserByIdQuerySchema = z.infer<typeof ZRetrieveUserByIdQuerySchema>;
|
|
export type TUpdateProfileMutationSchema = z.infer<typeof ZUpdateProfileMutationSchema>;
|
|
export type TUpdatePasswordMutationSchema = z.infer<typeof ZUpdatePasswordMutationSchema>;
|
|
export type TForgotPasswordFormSchema = z.infer<typeof ZForgotPasswordFormSchema>;
|
|
export type TResetPasswordFormSchema = z.infer<typeof ZResetPasswordFormSchema>;
|
|
export type TConfirmEmailMutationSchema = z.infer<typeof ZConfirmEmailMutationSchema>;
|