"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.extendEmolumentoChangeImageSchema = exports.emolumentoChangeImageSchema = exports.emolumentoDeleteSchema = exports.editEmolumentoSchema = exports.extendCreateEmolumentoSchema = exports.createEmolumentoSchema = void 0;
const zod_1 = require("zod");
const zod_to_openapi_1 = require("@asteasolutions/zod-to-openapi");
const validation_1 = require("../../util/validation");
(0, zod_to_openapi_1.extendZodWithOpenApi)(zod_1.z);
exports.createEmolumentoSchema = zod_1.z.object({
    designacao: (0, validation_1.requiredString)('designacao'),
    valor: (0, validation_1.requiredString)('valor').openapi({ example: '8000000', description: 'Valor maximo no caso de emolumento de simulacao' }),
    valorMinimo: zod_1.z.string().optional().openapi({ example: '300000' }),
    prazoEmMesesMinimo: zod_1.z.string().optional().openapi({ example: '3' }),
    prazoEmMeses: zod_1.z.string().optional().openapi({ example: '12' }),
    taxaJuro: zod_1.z.string().optional().openapi({ example: '4.5' }),
    comissaoRisco: zod_1.z.string().optional().openapi({ example: '1.5' }),
    model: zod_1.z.string().optional().openapi({ example: 'Simulacao' }),
    descricao: zod_1.z.string().optional(),
    tipo: zod_1.z.string().optional().openapi({ example: 'Producto' }),
    isPublic: zod_1.z.string().optional().openapi({ example: 'true' }),
    customField: zod_1.z.string().optional(),
    userId: (0, validation_1.requiredString)('userId'),
});
exports.extendCreateEmolumentoSchema = exports.createEmolumentoSchema.extend({
    imagem: (0, validation_1.fileSchema)('imagem').optional(),
});
exports.editEmolumentoSchema = zod_1.z.object({
    emolumentoId: (0, validation_1.requiredNumber)('emolumentoId'),
    designacao: zod_1.z.string().optional(),
    valor: zod_1.z.string().optional(),
    isPublic: zod_1.z.boolean().optional(),
    valorMinimo: zod_1.z.string().optional(),
    prazoEmMesesMinimo: zod_1.z.string().optional(),
    prazoEmMeses: zod_1.z.string().optional(),
    taxaJuro: zod_1.z.string().optional(),
    comissaoRisco: zod_1.z.string().optional(),
    customField: zod_1.z.string().optional(),
    descricao: zod_1.z.string().optional(),
    tipo: zod_1.z.string().optional(),
    model: zod_1.z.string().optional(),
    userId: (0, validation_1.requiredNumber)('userId'),
});
exports.emolumentoDeleteSchema = zod_1.z.object({
    id: (0, validation_1.requiredNumber)('id'),
    userId: (0, validation_1.requiredNumber)('userId'),
});
exports.emolumentoChangeImageSchema = zod_1.z.object({
    emolumentoId: (0, validation_1.requiredString)('emolumentoId'),
    userId: (0, validation_1.requiredString)('userId'),
});
exports.extendEmolumentoChangeImageSchema = exports.emolumentoChangeImageSchema.extend({
    imagem: (0, validation_1.fileSchema)('imagem')
});
