Commit Graph

11 Commits

Author SHA1 Message Date
fcc7c90e84 feat: recording analysis module with Deepgram + AI insights + Redis cache
- RecordingsModule: POST /api/recordings/analyze
- Deepgram pre-recorded API: diarize, summarize, topics, sentiment, utterances
- AI insights via OpenAI generateObject: call outcome, coaching, compliance, satisfaction
- Redis cache: 7-day TTL per callId, check before hitting Deepgram/OpenAI
- Generic getCache/setCache added to SessionService for cross-module use

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 09:20:15 +05:30
fd08a5d5db fix: Ozonetel token — 10min cache, invalidate on 401, refresh on login
- Reduced token cache from 55min to 10min (Ozonetel expires in ~15min)
- All API methods invalidate cached token on 401 response
- Force-refresh token on CC agent login
- Removed unused withTokenRetry wrapper

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 15:22:19 +05:30
a35a7d70bf feat: session lock stores IP + timestamp for debugging
- SessionService stores JSON { memberId, ip, lockedAt } instead of plain memberId
- Auth controller extracts client IP from x-forwarded-for header
- Lockout error message includes IP of blocking device

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 13:21:13 +05:30
77c5335955 fix: strict duplicate login lockout — one device per agent
Block any login attempt when a session exists, regardless of user identity.
Same user on second device is blocked until logout or TTL expiry.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 21:44:56 +05:30
e4a24feedb feat: multi-agent SIP with Redis session lockout
- SessionService: Redis-backed session lock/unlock/refresh with 1hr TTL
- AgentConfigService: queries Agent entity, caches per-member config
- Auth login: resolves agent config, locks Redis session, returns SIP credentials
- Auth logout: unlocks Redis session, Ozonetel logout, clears cache
- Auth heartbeat: refreshes Redis TTL every 5 minutes
- Added ioredis dependency

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 21:24:32 +05:30
30a4cda178 feat: add token refresh endpoint for auto-renewal
POST /auth/refresh exchanges refresh token for new access token
via platform's renewToken mutation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 11:53:02 +05:30
f0d3d2c9f1 feat: fetch user profile with custom roles (HelixEngage Manager/User) after login, determine app role, pass to frontend 2026-03-18 10:43:05 +05:30
22ac383107 feat: add call lookup endpoint with lead matching + AI enrichment, token passthrough on platform service 2026-03-18 09:11:15 +05:30
a42d479f06 feat: wire sidecar to platform — auth proxy with workspace subdomain, GraphQL proxy, health check 2026-03-18 07:15:47 +05:30
3e0d9a4351 feat: add auth proxy controller for login and token exchange
Adds POST /auth/login and POST /auth/tokens endpoints that proxy
GraphQL mutations to the fortytwo-eap-core platform, letting the
frontend use only the sidecar URL for authentication.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 09:08:07 +05:30
a3172140b0 chore: scaffold NestJS sidecar with config, CORS, and dependency setup 2026-03-17 09:02:15 +05:30