fix: track live downstream cmpp connections
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user