/opt/mawid/packages/shared/src/schemas
Edit: /opt/mawid/packages/shared/src/schemas/clinic.ts (863B)
import { z } from 'zod';
import { workingHoursSchema } from './working-hours';
export const clinicSettingsSchema = z
.object({
reminderOffsetsHours: z.array(z.number().positive()).max(4).default([24, 2]),
depositEnabled: z.boolean().default(false),
waitlistHoldMinutes: z.number().int().positive().default(20),
/** Owner's personal WhatsApp number for notifications (slot refills, weekly summary). */
ownerWaPhone: z.string().min(5).max(20).optional(),
})
.partial();
export const updateClinicSchema = z
.object({
name: z.string().min(1).max(120),
phone: z.string().min(5).max(20),
timezone: z.string().min(1),
defaultLanguage: z.enum(['ar', 'tr', 'en']),
workingHours: workingHoursSchema,
settings: clinicSettingsSchema,
})
.partial();
export type UpdateClinicInput = z.infer
;