Add tipos del contrato de preferencias del agente de voz
This commit is contained in:
40
mvp/b2c/src/lib/voice/preferences.ts
Normal file
40
mvp/b2c/src/lib/voice/preferences.ts
Normal 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[];
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user