// Generated by ts-to-zod
import { z } from "zod";

export const datasetRecordEntrySchema = z
  .object({
    id: z.string(),
  })
  .and(z.record(z.any()));

export const datasetRecordInputSchema = z
  .object({
    id: z.string().optional(),
  })
  .and(z.record(z.any()));

export const datasetColumnTypeSchema = z.union([
  z.literal("string"),
  z.literal("boolean"),
  z.literal("number"),
  z.literal("date"),
  z.literal("list"),
  z.literal("json"),
  z.literal("spans"),
  z.literal("rag_contexts"),
  z.literal("chat_messages"),
  z.literal("annotations"),
  z.literal("evaluations"),
  z.literal("image"),
]);

export const datasetColumnsSchema = z.array(
  z.object({
    name: z.string(),
    type: datasetColumnTypeSchema,
  }),
);

export const datasetRecordFormSchema = z.object({
  name: z.string().min(1),
  columnTypes: datasetColumnsSchema,
});
