feat: API Gateway (Express 5 + Prisma + Monday) y conexion de apps al API

- api-gateway: servicio Monday (retry 429/complejidad, paginacion cursor,
  column IDs por titulo), endpoints unidades/cotizaciones/clientes/planes,
  webhook con handshake challenge, Prisma SQLite dev, 55 tests
- cotizador: inventario desde /api/unidades con fallback a seed
- alta-clientes: POST /api/clientes + upload multipart de documentos
- cobranza: persistencia via API con respaldo offline en localStorage
- .env.example con board IDs del workspace Frasa-CAS
This commit is contained in:
2026-08-21 23:39:17 +00:00
parent ecd4edac02
commit 0546f35d2a
48 changed files with 7129 additions and 66 deletions

View File

@@ -0,0 +1,17 @@
import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
env: {
// config/index.ts exige estas vars al importarse; los tests nunca llaman a Monday real
MONDAY_API_KEY: 'test-key',
MONDAY_BOARD_CONTACTOS: '111',
MONDAY_BOARD_DESARROLLOS: '222',
MONDAY_BOARD_UNIDADES: '333',
MONDAY_BOARD_LEADS: '444',
MONDAY_BOARD_OPORTUNIDADES: '555',
MONDAY_BOARD_APARTADO: '666',
MONDAY_BOARD_VENTAS: '777',
},
},
})