Add WABA outreach automation (Z-PRO integration)

Per-product message templates, official/não-oficial channel selection,
manual per-number sending, and a 20-minute internal scheduler for the
existing automatic outreach batch — all pre-existing local work being
committed as-is.
This commit is contained in:
Gustavo
2026-08-03 13:14:09 -03:00
parent 0894ab68b3
commit eaaf7af659
32 changed files with 3522 additions and 342 deletions
+2
View File
@@ -9,6 +9,7 @@ import { registerExtractionRoutes } from './routes/extractions.mjs';
import { registerLeadRoutes } from './routes/leads.mjs';
import { registerExportRoutes } from './routes/exports.mjs';
import { registerAuthRoutes } from './routes/auth.mjs';
import { registerOutreachRoutes } from './routes/outreach.mjs';
import { getCookie, getSession, SESSION_COOKIE } from './session.mjs';
const PUBLIC_API_PATHS = new Set(['/api/auth/login', '/api/health']);
@@ -53,6 +54,7 @@ export function createAppServer({ db, jobs, log = () => {} }) {
registerExtractionRoutes(router, deps);
registerLeadRoutes(router, deps);
registerExportRoutes(router, deps);
registerOutreachRoutes(router, deps);
// SSE de progresso dos jobs (rota especial: gerencia a resposta manualmente)
router.add('GET', '/api/jobs/:jobId/events', async (req, res, { params }) => {