13 Commits

Author SHA1 Message Date
Claude AI
5dd3499097 feat: Major WhatsApp integration update with Odoo and pause/resume
## Frontend
- Add media display (images, audio, video, docs) in Inbox
- Add pause/resume functionality for WhatsApp accounts
- Fix media URLs to use nginx proxy (relative URLs)

## API Gateway
- Add /accounts/:id/pause and /accounts/:id/resume endpoints
- Fix media URL handling for browser access

## WhatsApp Core
- Add pauseSession() - disconnect without logout
- Add resumeSession() - reconnect using saved credentials
- Add media download and storage for incoming messages
- Serve media files via /media/ static route

## Odoo Module (odoo_whatsapp_hub)
- Add Chat Hub interface with DOLLARS theme (dark, 3-column layout)
- Add WhatsApp/DRRR theme switcher for chat view
- Add "ABRIR CHAT" button in conversation form
- Add send_message_from_chat() method
- Add security/ir.model.access.csv
- Fix CSS scoping to avoid breaking Odoo UI
- Update webhook to handle message events properly

## Documentation
- Add docs/CONTEXTO_DESARROLLO.md with complete project context

## Infrastructure
- Add whatsapp_media Docker volume
- Configure nginx proxy for /media/ route
- Update .gitignore to track src/sessions/ source files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 20:48:56 +00:00
Claude AI
d2ce86bd41 feat(api-gateway): add Odoo config model and endpoints
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 22:19:17 +00:00
Claude AI
62d4c37c1d feat(fase4): add GlobalVariable API routes
Add schemas and router for global variables with CRUD operations
and admin-only access controls for create/update/delete.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:13:26 +00:00
Claude AI
b8d97e2557 feat(fase4): add FlowTemplate model and API
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:10:54 +00:00
Claude AI
c18e0b9d2a feat(fase3): add Queue and QuickReply API routes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:56:39 +00:00
Claude AI
e0ff66504b feat(fase3): add conversation transfer and note API routes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:56:35 +00:00
Claude AI
5746ad42e5 feat(fase3): add supervisor dashboard API
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:54:51 +00:00
Claude AI
c9365c9d43 feat(fase3): add agent status update and list endpoints
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:52:31 +00:00
Claude AI
363e332f29 feat(phase2): integrate flow engine and add flows navigation
- Add FLOW_ENGINE_URL to API Gateway config
- Integrate flow engine in message handler (BOT status only)
- Add /flows routes to MainLayout with FlowList and FlowBuilder
- Add Flujos menu item with ApartmentOutlined icon

This completes Phase 2: Flow Engine Básico

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:24:08 +00:00
Claude AI
c97d380635 feat(phase2): add Flow Builder UI and internal flow routes
- Add FlowBuilder.tsx with React Flow visual editor
- Add FlowList.tsx for flow management
- Add /internal/flow/send endpoint for flow-engine messaging
- Add reactflow dependency to frontend

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:23:02 +00:00
Claude AI
14a579d5ca 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>
2026-01-29 10:20:35 +00:00
Claude AI
dcb7fb5974 feat: add Layer 3 - API Gateway main app, WhatsApp routes, Frontend pages
API Gateway:
- main.py with FastAPI app, CORS, health endpoints
- WhatsApp routes: accounts CRUD, conversations, messages, internal events
- WhatsApp schemas for request/response validation

Frontend:
- Login page with register option for first admin
- MainLayout with sidebar navigation and user dropdown
- Dashboard with statistics cards (accounts, conversations)
- WhatsApp Accounts page with QR modal for connection
- Inbox page with conversation list and real-time chat

Full feature set for Fase 1 Foundation complete.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:01:06 +00:00
Claude AI
7042aa2061 feat: add Layer 2 - WhatsApp Core logic, API Gateway models/auth, Frontend core
WhatsApp Core:
- SessionManager with Baileys integration for multi-account support
- Express server with REST API and Socket.IO for real-time events
- Session lifecycle management (create, disconnect, delete)
- Message sending with support for text, image, document, audio, video

API Gateway:
- Database models: User, WhatsAppAccount, Contact, Conversation, Message
- JWT authentication with access/refresh tokens
- Auth endpoints: login, refresh, register, me
- Pydantic schemas for request/response validation

Frontend:
- React 18 app structure with routing
- Zustand auth store with persistence
- API client with automatic token handling
- Base CSS and TypeScript declarations

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 09:55:10 +00:00