feat(fase2): add Flow API routes and Flow Engine main app

API Gateway:
- Add flows router with CRUD endpoints
- Add activate/deactivate endpoints
- Auto-deactivate other flows for welcome/fallback triggers

Flow Engine:
- Add main.py with FastAPI app
- Add /process endpoint for message handling
- Add SQLAlchemy models (mirrors api-gateway)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Claude AI
2026-01-29 10:20:35 +00:00
parent 8824f65a62
commit 14a579d5ca
5 changed files with 242 additions and 2 deletions

View File

@@ -2,7 +2,7 @@ from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from app.core.config import get_settings
from app.core.database import engine, Base
from app.routers import auth, whatsapp
from app.routers import auth, whatsapp, flows
settings = get_settings()
@@ -28,6 +28,7 @@ app.add_middleware(
# Routers
app.include_router(auth.router)
app.include_router(whatsapp.router)
app.include_router(flows.router)
@app.get("/health")