feat(purga): Monday eliminado completamente del sistema
14 servicios eliminados, 7 controllers local-only, crons locales, config sin MONDAY_*, frontend sin banners/avisos Monday. 552 tests API + 7 apps construidas.
This commit is contained in:
@@ -72,7 +72,7 @@ async function enviarAlta(ruta: string, payload: AltaCliente): Promise<Resultado
|
||||
|
||||
/**
|
||||
* Registra el alta en el API Gateway (POST /clientes). El backend persiste en
|
||||
* SQLite y replica en Monday.
|
||||
* SQLite.
|
||||
*/
|
||||
export async function crearAltaCliente(payload: AltaCliente): Promise<ResultadoAlta> {
|
||||
return enviarAlta('/clientes', payload)
|
||||
@@ -85,7 +85,7 @@ export interface ProgresoIniciado {
|
||||
mondayContactoId: string | null
|
||||
}
|
||||
|
||||
/** POST /clientes/progreso/iniciar — crea el alta en progreso (Contacto PROSPECTO en Monday) */
|
||||
/** POST /clientes/progreso/iniciar — crea el alta en progreso (Contacto PROSPECTO) */
|
||||
export async function iniciarProgreso(payload: {
|
||||
datosGenerales: unknown
|
||||
leadMondayId?: string
|
||||
@@ -216,7 +216,7 @@ export async function obtenerCotizacion(id: string): Promise<import('../lib/coti
|
||||
return (await res.json()) as import('../lib/cotizacionAlta').CotizacionParaAlta
|
||||
}
|
||||
|
||||
/** GET /altas/prefill-apartado/:itemId — todo lo recolectado de un apartado de Monday (?apartado=<id>) */
|
||||
/** GET /altas/prefill-apartado/:itemId — todo lo recolectado de un apartado (?apartado=<id>) */
|
||||
export async function obtenerPrefillApartado(itemId: string): Promise<import('../lib/apartadoAlta').PrefillApartado> {
|
||||
const res = await fetch(`${API_URL}/altas/prefill-apartado/${itemId}`, conAuth())
|
||||
manejar401(res)
|
||||
@@ -224,7 +224,7 @@ export async function obtenerPrefillApartado(itemId: string): Promise<import('..
|
||||
return (await res.json()) as import('../lib/apartadoAlta').PrefillApartado
|
||||
}
|
||||
|
||||
// ---------- Pre-llenado desde lead de Monday (auth) ----------
|
||||
// ---------- Pre-llenado desde lead (auth) ----------
|
||||
|
||||
export interface LeadResumen {
|
||||
id: string
|
||||
@@ -279,7 +279,7 @@ export async function crearAfluencia(payload: {
|
||||
origen?: string
|
||||
desarrollo?: string
|
||||
notas?: string
|
||||
/** Oportunidad de Monday a actualizar (botón "Afluencia" de Mi día) */
|
||||
/** Oportunidad a actualizar (botón "Afluencia" de Mi día) */
|
||||
oportunidadId?: string
|
||||
modelo?: string
|
||||
numDependientes?: string
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
import type { AltaCliente } from '../types'
|
||||
|
||||
/**
|
||||
* OBSOLETO: la réplica en Monday (tableros Contactos y Apartado) ya la hace
|
||||
* el API Gateway en POST /api/clientes (ver services/api.ts y
|
||||
* api-gateway/src/controllers/clientes.controller.ts). Se conserva el
|
||||
* archivo solo como referencia; no llamar desde el flujo del wizard.
|
||||
*/
|
||||
export async function enviarAMonday(payload: AltaCliente): Promise<void> {
|
||||
console.warn('[monday] enviarAMonday está obsoleto: el backend ya replica en Monday', {
|
||||
nombre: payload.datosGenerales.nombreCompleto,
|
||||
proyecto: payload.viviendaCredito.proyecto,
|
||||
ubicacion: payload.viviendaCredito.ubicacion,
|
||||
})
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
import { conAuth, getToken } from './auth'
|
||||
|
||||
const API_URL = import.meta.env.VITE_API_URL || '/api'
|
||||
|
||||
export interface EstadoSistema {
|
||||
mondayOk: boolean
|
||||
pendientesSync: number
|
||||
}
|
||||
|
||||
export async function fetchEstadoSistema(): Promise<EstadoSistema | null> {
|
||||
if (!getToken()) return null
|
||||
try {
|
||||
const res = await fetch(`${API_URL}/sistema/estado`, conAuth())
|
||||
if (!res.ok) return null
|
||||
return (await res.json()) as EstadoSistema
|
||||
} catch {
|
||||
return null
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user