feat: add operations acceptance phase
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
import { Controller, Get, Query } from '@nestjs/common';
|
||||
import { ApiTags } from '@nestjs/swagger';
|
||||
import { OperationsService } from './operations.service';
|
||||
|
||||
@ApiTags('operations')
|
||||
@Controller('admin/operations')
|
||||
export class AdminOperationsController {
|
||||
constructor(private readonly operations: OperationsService) {}
|
||||
|
||||
@Get('monitor')
|
||||
monitor(@Query('tenantId') tenantId?: string, @Query('channelId') channelId?: string) {
|
||||
return this.operations.monitor({ tenantId, channelId });
|
||||
}
|
||||
|
||||
@Get('task-progress')
|
||||
taskProgress(@Query('tenantId') tenantId?: string, @Query('status') status?: string) {
|
||||
return this.operations.listBatchTasks({ tenantId, status });
|
||||
}
|
||||
|
||||
@Get('messages')
|
||||
listMessages(
|
||||
@Query('tenantId') tenantId?: string,
|
||||
@Query('applicationId') applicationId?: string,
|
||||
@Query('channelId') channelId?: string,
|
||||
@Query('taskId') taskId?: string,
|
||||
@Query('phoneNumber') phoneNumber?: string,
|
||||
@Query('status') status?: string,
|
||||
) {
|
||||
return this.operations.listMessages({ tenantId, applicationId, channelId, taskId, phoneNumber, status });
|
||||
}
|
||||
|
||||
@Get('uplink-messages')
|
||||
listUplinkMessages(@Query('tenantId') tenantId?: string, @Query('channelId') channelId?: string) {
|
||||
return this.operations.listUplinkMessages({ tenantId, channelId });
|
||||
}
|
||||
|
||||
@Get('dashboard')
|
||||
dashboard(@Query('tenantId') tenantId?: string) {
|
||||
return this.operations.dashboard({ tenantId });
|
||||
}
|
||||
|
||||
@Get('statistics')
|
||||
statistics(@Query('tenantId') tenantId?: string, @Query('groupBy') groupBy?: string) {
|
||||
return this.operations.statistics({ tenantId, groupBy });
|
||||
}
|
||||
|
||||
@Get('audit-logs')
|
||||
auditLogs(@Query('tenantId') tenantId?: string, @Query('userId') userId?: string) {
|
||||
return this.operations.auditLogs({ tenantId, userId });
|
||||
}
|
||||
|
||||
@Get('audit-summary')
|
||||
auditSummary(@Query('tenantId') tenantId?: string) {
|
||||
return this.operations.auditSummary({ tenantId });
|
||||
}
|
||||
|
||||
@Get('trace')
|
||||
trace(
|
||||
@Query('tenantId') tenantId?: string,
|
||||
@Query('applicationId') applicationId?: string,
|
||||
@Query('channelId') channelId?: string,
|
||||
@Query('taskId') taskId?: string,
|
||||
@Query('phoneNumber') phoneNumber?: string,
|
||||
@Query('messageId') messageId?: string,
|
||||
) {
|
||||
return this.operations.trace({ tenantId, applicationId, channelId, taskId, phoneNumber, messageId });
|
||||
}
|
||||
|
||||
@Get('reconciliation')
|
||||
reconciliation(@Query('tenantId') tenantId?: string, @Query('taskId') taskId?: string) {
|
||||
return this.operations.reconciliation({ tenantId, taskId });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user