'use strict';

var chunkUSD6C4ZL_cjs = require('./chunk-USD6C4ZL.cjs');
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 storedScorerIdPathParams = z__default.default.object({
  storedScorerId: z__default.default.string().describe("Unique identifier for the stored scorer definition")
});
var storageOrderBySchema = z__default.default.object({
  field: z__default.default.enum(["createdAt", "updatedAt"]).optional(),
  direction: z__default.default.enum(["ASC", "DESC"]).optional()
});
var listStoredScorersQuerySchema = chunkZYXDUS6Q_cjs.createPagePaginationSchema(100).extend({
  orderBy: storageOrderBySchema.optional(),
  status: z__default.default.enum(["draft", "published", "archived"]).optional().default("published").describe("Filter scorers by status (defaults to published)"),
  authorId: z__default.default.string().optional().describe("Filter scorers by author identifier"),
  metadata: z__default.default.record(z__default.default.string(), z__default.default.unknown()).optional().describe("Filter scorers by metadata key-value pairs")
});
var samplingConfigSchema = z__default.default.union([
  z__default.default.object({ type: z__default.default.literal("none") }),
  z__default.default.object({ type: z__default.default.literal("ratio"), rate: z__default.default.number().min(0).max(1) })
]);
var scorerTypeEnum = z__default.default.enum([
  "llm-judge",
  "answer-relevancy",
  "answer-similarity",
  "bias",
  "context-precision",
  "context-relevance",
  "faithfulness",
  "hallucination",
  "noise-sensitivity",
  "prompt-alignment",
  "tool-call-accuracy",
  "toxicity"
]).describe("Scorer type: llm-judge for custom, or a preset type name");
var snapshotConfigSchema = z__default.default.object({
  name: z__default.default.string().describe("Name of the scorer"),
  description: z__default.default.string().optional().describe("Description of the scorer"),
  type: scorerTypeEnum,
  model: chunkUSD6C4ZL_cjs.modelConfigSchema.optional().describe("Model configuration for LLM judge"),
  instructions: z__default.default.string().optional().describe("System instructions for the judge LLM (used when type is llm-judge)"),
  scoreRange: z__default.default.object({
    min: z__default.default.number().optional().describe("Minimum score value (default: 0)"),
    max: z__default.default.number().optional().describe("Maximum score value (default: 1)")
  }).optional().describe("Score range configuration (used when type is llm-judge)"),
  presetConfig: z__default.default.record(z__default.default.string(), z__default.default.unknown()).optional().describe("Serializable config options for preset scorers"),
  defaultSampling: samplingConfigSchema.optional().describe("Default sampling configuration")
});
var createStoredScorerBodySchema = z__default.default.object({
  id: z__default.default.string().optional().describe("Unique identifier. If not provided, derived from name."),
  authorId: z__default.default.string().optional().describe("Author identifier for multi-tenant filtering"),
  metadata: z__default.default.record(z__default.default.string(), z__default.default.unknown()).optional().describe("Additional metadata for the scorer")
}).merge(snapshotConfigSchema);
var updateStoredScorerBodySchema = z__default.default.object({
  authorId: z__default.default.string().optional(),
  metadata: z__default.default.record(z__default.default.string(), z__default.default.unknown()).optional()
}).partial().merge(snapshotConfigSchema.partial());
var storedScorerSchema = z__default.default.object({
  id: z__default.default.string(),
  status: z__default.default.string().describe("Scorer status: draft, published, or archived"),
  activeVersionId: z__default.default.string().optional(),
  authorId: z__default.default.string().optional(),
  metadata: z__default.default.record(z__default.default.string(), z__default.default.unknown()).optional(),
  createdAt: z__default.default.coerce.date(),
  updatedAt: z__default.default.coerce.date(),
  name: z__default.default.string().describe("Name of the scorer"),
  description: z__default.default.string().optional().describe("Description of the scorer"),
  type: scorerTypeEnum,
  model: chunkUSD6C4ZL_cjs.modelConfigSchema.optional(),
  instructions: z__default.default.string().optional().describe("System instructions for the judge LLM"),
  scoreRange: z__default.default.object({
    min: z__default.default.number().optional(),
    max: z__default.default.number().optional()
  }).optional(),
  presetConfig: z__default.default.record(z__default.default.string(), z__default.default.unknown()).optional(),
  defaultSampling: samplingConfigSchema.optional()
});
var listStoredScorersResponseSchema = chunkZYXDUS6Q_cjs.paginationInfoSchema.extend({
  scorerDefinitions: z__default.default.array(storedScorerSchema)
});
var getStoredScorerResponseSchema = storedScorerSchema;
var createStoredScorerResponseSchema = storedScorerSchema;
var updateStoredScorerResponseSchema = z__default.default.union([
  z__default.default.object({
    id: z__default.default.string(),
    status: z__default.default.string(),
    activeVersionId: z__default.default.string().optional(),
    authorId: z__default.default.string().optional(),
    metadata: z__default.default.record(z__default.default.string(), z__default.default.unknown()).optional(),
    createdAt: z__default.default.coerce.date(),
    updatedAt: z__default.default.coerce.date()
  }),
  storedScorerSchema
]);
var deleteStoredScorerResponseSchema = z__default.default.object({
  success: z__default.default.boolean(),
  message: z__default.default.string()
});

exports.createStoredScorerBodySchema = createStoredScorerBodySchema;
exports.createStoredScorerResponseSchema = createStoredScorerResponseSchema;
exports.deleteStoredScorerResponseSchema = deleteStoredScorerResponseSchema;
exports.getStoredScorerResponseSchema = getStoredScorerResponseSchema;
exports.listStoredScorersQuerySchema = listStoredScorersQuerySchema;
exports.listStoredScorersResponseSchema = listStoredScorersResponseSchema;
exports.storedScorerIdPathParams = storedScorerIdPathParams;
exports.storedScorerSchema = storedScorerSchema;
exports.updateStoredScorerBodySchema = updateStoredScorerBodySchema;
exports.updateStoredScorerResponseSchema = updateStoredScorerResponseSchema;
//# sourceMappingURL=chunk-BAECEBZY.cjs.map
//# sourceMappingURL=chunk-BAECEBZY.cjs.map