fix: track live downstream cmpp connections

This commit is contained in:
hectorzhao
2026-07-11 19:16:52 +08:00
parent 76e0417ccf
commit 2fea15ef25
21 changed files with 477 additions and 141 deletions
@@ -11,11 +11,15 @@ import {
GatewayUplinkEventDto,
SendChainService,
} from './send-chain.service';
import { GatewayDownstreamConnectionEventDto, SmsConfigService } from '../sms-config/sms-config.service';
@ApiTags('gateway-events')
@Controller('gateway/events')
export class GatewayEventsController {
constructor(private readonly sendChain: SendChainService) {}
constructor(
private readonly sendChain: SendChainService,
private readonly smsConfig: SmsConfigService,
) {}
@Post('submit-result')
submitResult(@Body() body: GatewaySubmitResultDto) {
@@ -47,6 +51,11 @@ export class GatewayEventsController {
return this.sendChain.submitInboundMessage(body);
}
@Post('inbound/connection')
inboundConnection(@Body() body: GatewayDownstreamConnectionEventDto) {
return this.smsConfig.recordDownstreamConnectionEvent(body);
}
@Post('downstream/pending')
pendingDownstream(@Body() body: GatewayPendingDeliveryQueryDto) {
return this.sendChain.listPendingDownstreamDeliveries(body);