/
opt
/
mawid
/
packages
/
shared
/
src
/
schemas
/
/opt/mawid/packages/shared/src/schemas
mkdir
upload
Name
Size
Mode
Actions
appointment.ts
1064
0644
edit
dl
rm
auth.ts
477
0644
edit
dl
rm
clinic.ts
863
0644
edit
dl
rm
index.ts
184
0644
edit
dl
rm
service.ts
572
0644
edit
dl
rm
staff.ts
550
0644
edit
dl
rm
working-hours.ts
765
0644
edit
dl
rm
Edit:
/opt/mawid/packages/shared/src/schemas/appointment.ts
(1064B)
import { z } from 'zod'; export const createAppointmentSchema = z.object({ patientId: z.string().min(1), serviceId: z.string().min(1), staffId: z.string().min(1), startsAtUtc: z.string().datetime(), }); export type CreateAppointmentInput = z.infer<typeof createAppointmentSchema>; export const updateAppointmentSchema = z .object({ startsAtUtc: z.string().datetime(), staffId: z.string().min(1), status: z.enum(['confirmed', 'completed', 'no_show']), }) .partial(); export type UpdateAppointmentInput = z.infer<typeof updateAppointmentSchema>; export const cancelAppointmentSchema = z.object({ reason: z.string().max(200).optional(), }); export type CancelAppointmentInput = z.infer<typeof cancelAppointmentSchema>; export const updatePatientSchema = z .object({ name: z.string().min(1).max(120), language: z.enum(['ar', 'tr', 'en']), notes: z.string().max(2000).nullable(), tags: z.array(z.string().min(1).max(40)).max(20), }) .partial(); export type UpdatePatientInput = z.infer<typeof updatePatientSchema>;
Save
cmd:
run