import { createPagePaginationSchema, paginationInfoSchema } from './chunk-USZD5AX2.js';
import z from 'zod';

var versionOrderBySchema = z.object({
  field: z.enum(["versionNumber", "createdAt"]).optional(),
  direction: z.enum(["ASC", "DESC"]).optional()
});
var listVersionsQuerySchema = createPagePaginationSchema(20).extend({
  orderBy: versionOrderBySchema.optional()
});
var compareVersionsQuerySchema = z.object({
  from: z.string().describe("Version ID (UUID) to compare from"),
  to: z.string().describe("Version ID (UUID) to compare to")
});
var createVersionBodySchema = z.object({
  changeMessage: z.string().max(500).optional().describe("Optional message describing the changes")
});
var activateVersionResponseSchema = z.object({
  success: z.boolean(),
  message: z.string(),
  activeVersionId: z.string()
});
var deleteVersionResponseSchema = z.object({
  success: z.boolean(),
  message: z.string()
});
var versionDiffEntrySchema = z.object({
  field: z.string().describe("The field path that changed"),
  previousValue: z.unknown().describe('The value in the "from" version'),
  currentValue: z.unknown().describe('The value in the "to" version')
});
function createListVersionsResponseSchema(versionSchema) {
  return paginationInfoSchema.extend({
    versions: z.array(versionSchema)
  });
}
function createCompareVersionsResponseSchema(versionSchema) {
  return z.object({
    diffs: z.array(versionDiffEntrySchema).describe("List of differences between versions"),
    fromVersion: versionSchema.describe("The source version"),
    toVersion: versionSchema.describe("The target version")
  });
}

export { activateVersionResponseSchema, compareVersionsQuerySchema, createCompareVersionsResponseSchema, createListVersionsResponseSchema, createVersionBodySchema, deleteVersionResponseSchema, listVersionsQuerySchema, versionDiffEntrySchema, versionOrderBySchema };
//# sourceMappingURL=chunk-H4AABNBB.js.map
//# sourceMappingURL=chunk-H4AABNBB.js.map