Add tipos del contrato de preferencias del agente de voz

This commit is contained in:
Carlos Narro
2026-05-31 16:11:29 +02:00
parent 9997ce11cc
commit c38289fcae

View File

@@ -0,0 +1,40 @@
import type { Calidad, CategoriaMaterial, TipoReforma } from '@/budget/types';
export type Urgencia = 'alta' | 'media' | 'baja';
export interface RawCallData {
tipoReforma: TipoReforma;
m2Suelo: number | null;
calidad: Calidad | null;
estructural: boolean | null;
urgencia: Urgencia | null;
presupuestoTarget: number | null; // céntimos
tasteText: string;
}
export interface PreferenceExtra {
key: string;
label: string;
importe: number; // céntimos (base, antes de factor zona)
}
export interface PreferenceAjuste {
label: string;
tipo: 'factor' | 'fijo';
valor: number; // factor (p.ej. 1.1) o céntimos
motivo: string;
}
export interface AbstractedPreferences {
calidadGlobal: Calidad;
materialSelections: Partial<Record<CategoriaMaterial, string>>;
estructural: boolean;
urgencia: Urgencia | null;
presupuestoTarget: number | null;
elementos: PreferenceExtra[];
estiloRender: string[];
ajustes: PreferenceAjuste[];
confianza: 'baja' | 'media' | 'alta';
resumen: string;
camposFaltantes: string[];
}