feat: add caller connection and answer rate analytics
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { Controller, Get, Inject, Module, Query } from '@nestjs/common';
|
||||
import { CurrentUserParam, RequirePermissions, type CurrentUser } from '../security/security.metadata.js';
|
||||
import { CallerAnalyticsService } from './caller-analytics.service.js';
|
||||
|
||||
@Controller('caller-analytics')
|
||||
@RequirePermissions('caller_analytics.view')
|
||||
class CallerAnalyticsController {
|
||||
constructor(@Inject(CallerAnalyticsService) private readonly service: CallerAnalyticsService) {}
|
||||
@Get('overview') overview(@Query() q: Record<string, unknown>, @CurrentUserParam() user: CurrentUser) { return this.service.overview(q, user); }
|
||||
@Get('summary') summary(@Query() q: Record<string, unknown>, @CurrentUserParam() user: CurrentUser) { return this.service.overview(q, user); }
|
||||
@Get('numbers') numbers(@Query() q: Record<string, unknown>, @CurrentUserParam() user: CurrentUser) { return this.service.overview(q, user); }
|
||||
@Get('trends') trends(@Query() q: Record<string, unknown>, @CurrentUserParam() user: CurrentUser) { return this.service.overview(q, user); }
|
||||
@Get('calls') calls(@Query() q: Record<string, unknown>, @CurrentUserParam() user: CurrentUser) { return this.service.detail(q, user); }
|
||||
@Get('breakdown') breakdown(@Query() q: Record<string, unknown>, @CurrentUserParam() user: CurrentUser) { return this.service.detail(q, user); }
|
||||
@Get('options') options(@CurrentUserParam() user: CurrentUser) { return this.service.options(user); }
|
||||
}
|
||||
@Module({ controllers: [CallerAnalyticsController], providers: [CallerAnalyticsService] })
|
||||
export class CallerAnalyticsModule {}
|
||||
Reference in New Issue
Block a user