'use strict';

var chunkZYXDUS6Q_cjs = require('./chunk-ZYXDUS6Q.cjs');
var z = require('zod');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

var z__default = /*#__PURE__*/_interopDefault(z);

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

exports.activateVersionResponseSchema = activateVersionResponseSchema;
exports.compareVersionsQuerySchema = compareVersionsQuerySchema;
exports.createCompareVersionsResponseSchema = createCompareVersionsResponseSchema;
exports.createListVersionsResponseSchema = createListVersionsResponseSchema;
exports.createVersionBodySchema = createVersionBodySchema;
exports.deleteVersionResponseSchema = deleteVersionResponseSchema;
exports.listVersionsQuerySchema = listVersionsQuerySchema;
exports.versionDiffEntrySchema = versionDiffEntrySchema;
exports.versionOrderBySchema = versionOrderBySchema;
//# sourceMappingURL=chunk-VTHT3PPM.cjs.map
//# sourceMappingURL=chunk-VTHT3PPM.cjs.map