feat(telephony/phase1): API layer — types + endpoints + Zustand stores
Phase 1 — API Layer Telephony
Pattern
Identique aux autres agents (community-manager, SEO) :
-
axiosInstancepartagé (src/config/axios) - Headers
X-USER-UID/X-User-UUIDinjectés automatiquement par le intercepteur + explicitement sur les routes qui le requièrent - Endpoints centralisés (
src/shared/api/endpoints/telephony-service/) - Stores Zustand (
src/shared/api/stores/telephony-service/) - Types alignés sur les DTOs backend (
src/shared/types/telephony/)
Types (6 fichiers)
-
telephony-agent.types.ts— Agent, Wizard, enums -
telephony-call.types.ts— Call, CallResult + LABELS/COLORS -
telephony-campaign.types.ts— Campaign, Status + LABELS/COLORS -
telephony-prospect.types.ts— Prospect, ProspectStatus + LABELS/COLORS -
telephony-stats.types.ts— Stats, DayCount, StatsPeriod -
telephony-number.types.ts— PhoneNumber, Provider + LABELS
Endpoints (7 fichiers)
Couverture complète : CRUD + lifecycle (launch/pause/cancel) + import/export + wizard steps
Stores Zustand (7 fichiers)
-
agent-store— CRUD + activate/deactivate + syncToVapi -
call-store— filtres (direction, result, dates, agentUid) -
campaign-store— CRUD + launch/pause/cancel/complete + export -
prospect-store— CRUD + importCsv + exportCsv + updateStatus -
stats-store— fetchStats (period/dates/agentUid) -
number-store— fetchByAgent/ByOwner + CRUD -
wizard-store— checkStatus + step1→step5 + complete