"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CLIPConfig = exports.OcrConfigSchema = exports.FacialRecognitionConfigSchema = exports.DuplicateDetectionConfigSchema = exports.CLIPConfigSchema = void 0;
const openapi = require("@nestjs/swagger");
const nestjs_zod_1 = require("nestjs-zod");
const zod_1 = __importDefault(require("zod"));
const TaskConfigSchema = zod_1.default
    .object({
    enabled: zod_1.default.boolean().describe('Whether the task is enabled'),
})
    .meta({ id: 'TaskConfig' });
const ModelConfigSchema = TaskConfigSchema.extend({
    modelName: zod_1.default.string().describe('Name of the model to use'),
});
exports.CLIPConfigSchema = ModelConfigSchema.meta({ id: 'CLIPConfig' });
exports.DuplicateDetectionConfigSchema = TaskConfigSchema.extend({
    maxDistance: zod_1.default
        .number()
        .meta({ format: 'double' })
        .min(0.001)
        .max(0.1)
        .describe('Maximum distance threshold for duplicate detection'),
}).meta({ id: 'DuplicateDetectionConfig' });
exports.FacialRecognitionConfigSchema = ModelConfigSchema.extend({
    minScore: zod_1.default
        .number()
        .meta({ format: 'double' })
        .min(0.1)
        .max(1)
        .describe('Minimum confidence score for face detection'),
    maxDistance: zod_1.default
        .number()
        .meta({ format: 'double' })
        .min(0.1)
        .max(2)
        .describe('Maximum distance threshold for face recognition'),
    minFaces: zod_1.default.int().min(1).describe('Minimum number of faces required for recognition'),
}).meta({ id: 'FacialRecognitionConfig' });
exports.OcrConfigSchema = ModelConfigSchema.extend({
    maxResolution: zod_1.default.int().min(1).describe('Maximum resolution for OCR processing'),
    minDetectionScore: zod_1.default
        .number()
        .meta({ format: 'double' })
        .min(0.1)
        .max(1)
        .describe('Minimum confidence score for text detection'),
    minRecognitionScore: zod_1.default
        .number()
        .meta({ format: 'double' })
        .min(0.1)
        .max(1)
        .describe('Minimum confidence score for text recognition'),
}).meta({ id: 'OcrConfig' });
class CLIPConfig extends (0, nestjs_zod_1.createZodDto)(exports.CLIPConfigSchema) {
    static _OPENAPI_METADATA_FACTORY() {
        return {};
    }
}
exports.CLIPConfig = CLIPConfig;
//# sourceMappingURL=model-config.dto.js.map