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
@@ -2,6 +2,7 @@ import { loadDotEnv, GTI_PORT } from '../src/env.mjs';
import { openDb, ensureSeeds } from '../src/db.mjs';
import { createJobManager, recoverOrphans } from '../src/jobs/manager.mjs';
import { createAppServer } from '../src/server/index.mjs';
import { startOutreachScheduler } from '../src/outreach/scheduler.mjs';
// Servidor local do GTI Maquina Comercial. Inicie com:
// npm start (ou node scripts/servidor.mjs, ou o GTI-Comercial.exe)
@@ -17,6 +18,7 @@ recoverOrphans(db, log);
const jobs = createJobManager();
const server = createAppServer({ db, jobs, log });
startOutreachScheduler({ db, log });
const port = GTI_PORT;
server.listen(port, '127.0.0.1', () => {