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