import { Controller, Get, Param, Query } from '@nestjs/common'; import { ApiTags } from '@nestjs/swagger'; import { TenantId } from '../common/tenant-id.decorator'; import { OperationsService } from './operations.service'; @ApiTags('client-operations') @Controller('client/operations') export class ClientOperationsController { constructor(private readonly operations: OperationsService) {} @Get('batch-tasks') listBatchTasks(@TenantId() tenantId?: string, @Query('status') status?: string) { return this.operations.listBatchTasks({ tenantId, status }); } @Get('batch-tasks/:id/messages') listTaskMessages(@Param('id') taskId: string, @Query('phoneNumber') phoneNumber?: string) { return this.operations.listMessages({ taskId, phoneNumber }); } @Get('uplink-messages') listUplinkMessages(@TenantId() tenantId?: string, @Query('channelId') channelId?: string) { return this.operations.listUplinkMessages({ tenantId, channelId }); } }