import { z } from "https://deno.land/x/zod@v3.22.4/mod.ts";

// Schema para validação de entrada
export const createWaitlistSchema = z.object({
  patient_id: z.string().uuid(),
  doctor_id: z.string().uuid(),
  desired_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/),
});

export const createNotificationSchema = z.object({
  type: z.enum(["sms", "email", "whatsapp"]),
  payload: z.record(z.any()),
  scheduled_at: z.string().datetime().optional(),
});

export const appointmentFiltersSchema = z.object({
  patient_id: z.string().uuid().optional(),
  doctor_id: z.string().uuid().optional(),
  status: z.string().optional(),
  method: z.string().optional(),
});

export const waitlistFiltersSchema = z.object({
  patient_id: z.string().uuid().optional(),
  doctor_id: z.string().uuid().optional(),
  status: z.string().optional(),
  method: z.string().optional(),
});

export const notificationFiltersSchema = z.object({
  status: z.string().optional(),
  type: z.enum(["sms", "email", "whatsapp"]).optional(),
  method: z.string().optional(),
});
