feat: add sms send chain phase

This commit is contained in:
hectorzhao
2026-07-01 13:39:26 +08:00
parent 56f835a00f
commit 27bb2d798a
11 changed files with 981 additions and 2 deletions
@@ -0,0 +1,31 @@
import { Body, Controller, Get, Param, Post, Query } from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger';
import { TenantId } from '../common/tenant-id.decorator';
import { CreateBatchTaskDto, SendChainService } from './send-chain.service';
@ApiTags('client-send-chain')
@Controller('client/send')
export class ClientSendChainController {
constructor(private readonly sendChain: SendChainService) {}
@Post('batch-tasks')
createBatchTask(@Body() body: CreateBatchTaskDto) {
return this.sendChain.createBatchTask(body);
}
@Get('batch-tasks')
listBatchTasks(@TenantId() tenantId?: string, @Query('status') status?: string) {
return this.sendChain.listBatchTasks(tenantId, status);
}
@Get('batch-tasks/:id')
getBatchTask(@Param('id') taskId: string) {
return this.sendChain.getBatchTask(taskId);
}
@Get('batch-tasks/:id/messages')
listTaskMessages(@Param('id') taskId: string) {
return this.sendChain.listMessages(taskId);
}
}