mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-13 16:22:59 +10:00
- Changed ESLint configuration to target TypeScript files and added parser options for better integration. - Updated various schemas across the application to replace `nestjs-zod/z` imports with `zod` for consistency. - Refactored password validation in authentication schemas to use `z.string()` instead of `z.password()`. - Enhanced date handling in user and resume schemas by introducing a new `dateSchema` utility. - Updated `.ncurc.json` to target minor upgrades for dependencies.
22 lines
672 B
TypeScript
22 lines
672 B
TypeScript
import { defaultResumeData, idSchema, resumeDataSchema } from "@reactive-resume/schema";
|
|
import { dateSchema } from "@reactive-resume/utils";
|
|
import { createZodDto } from "nestjs-zod/dto";
|
|
import { z } from "zod";
|
|
|
|
import { userSchema } from "../user";
|
|
|
|
export const resumeSchema = z.object({
|
|
id: idSchema,
|
|
title: z.string(),
|
|
slug: z.string(),
|
|
data: resumeDataSchema.default(defaultResumeData),
|
|
visibility: z.enum(["private", "public"]).default("private"),
|
|
locked: z.boolean().default(false),
|
|
userId: idSchema,
|
|
user: userSchema.optional(),
|
|
createdAt: dateSchema,
|
|
updatedAt: dateSchema,
|
|
});
|
|
|
|
export class ResumeDto extends createZodDto(resumeSchema) {}
|