feat: Phase 2 — missed call queue ingestion, auto-assignment, endpoints

- MissedQueueService: polls Ozonetel abandonCalls every 30s, dedup by phone
- Auto-assigns oldest PENDING_CALLBACK call on agent Ready (dispose + state change)
- GET /api/worklist/missed-queue, PATCH /api/worklist/missed-queue/:id/status
- Worklist query updated with callback fields and FIFO ordering
- PlatformGraphqlService.query() made public for server-to-server ops
- forwardRef circular dependency resolution between WorklistModule and OzonetelAgentModule

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-23 09:17:33 +05:30
parent 4963a698d9
commit cec2526d37
8 changed files with 310 additions and 10 deletions

View File

@@ -1,9 +1,12 @@
import { Module } from '@nestjs/common';
import { Module, forwardRef } from '@nestjs/common';
import { OzonetelAgentController } from './ozonetel-agent.controller';
import { OzonetelAgentService } from './ozonetel-agent.service';
import { KookooIvrController } from './kookoo-ivr.controller';
import { WorklistModule } from '../worklist/worklist.module';
import { PlatformModule } from '../platform/platform.module';
@Module({
imports: [PlatformModule, forwardRef(() => WorklistModule)],
controllers: [OzonetelAgentController, KookooIvrController],
providers: [OzonetelAgentService],
exports: [OzonetelAgentService],