feat: add read and delete customer form
This commit is contained in:
@@ -1,16 +1,5 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
export const UserSchema = z.object({
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
email: z.string().email(),
|
||||
deleted: z.boolean(),
|
||||
createdAt: z.string().transform(arg => new Date(arg)),
|
||||
updatedAt: z.string().transform(arg => new Date(arg))
|
||||
});
|
||||
|
||||
export type User = z.infer<typeof UserSchema>;
|
||||
|
||||
export const CustomerFormCreateSchema = z.object({
|
||||
type: z.string(),
|
||||
text: z.string()
|
||||
@@ -29,3 +18,9 @@ export const CustomerFormSchema = z.object({
|
||||
export const CustomerFormListSchema = z.array(CustomerFormSchema);
|
||||
|
||||
export type CustomerForm = z.infer<typeof CustomerFormSchema>;
|
||||
|
||||
export const ContextSchema = z.object({
|
||||
params: z.object({
|
||||
id: z.string()
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user