feat: complete cmpp gateway delivery recovery workflows
This commit is contained in:
@@ -3,7 +3,10 @@ import { ApiTags } from '@nestjs/swagger';
|
||||
import {
|
||||
GatewayInboundAuthDto,
|
||||
GatewayInboundSubmitDto,
|
||||
GatewayPendingDeliveryQueryDto,
|
||||
GatewayDownstreamRecoveryStatusDto,
|
||||
GatewayReceiptEventDto,
|
||||
GatewaySubmitDeadLetterDto,
|
||||
GatewaySubmitResultDto,
|
||||
GatewayUplinkEventDto,
|
||||
SendChainService,
|
||||
@@ -29,6 +32,11 @@ export class GatewayEventsController {
|
||||
return this.sendChain.handleUplink(body);
|
||||
}
|
||||
|
||||
@Post('dead-letter')
|
||||
deadLetter(@Body() body: GatewaySubmitDeadLetterDto) {
|
||||
return this.sendChain.recordGatewaySubmitDeadLetter(body);
|
||||
}
|
||||
|
||||
@Post('inbound/authenticate')
|
||||
authenticateInbound(@Body() body: GatewayInboundAuthDto) {
|
||||
return this.sendChain.authenticateInboundApplication(body);
|
||||
@@ -38,4 +46,24 @@ export class GatewayEventsController {
|
||||
submitInbound(@Body() body: GatewayInboundSubmitDto) {
|
||||
return this.sendChain.submitInboundMessage(body);
|
||||
}
|
||||
|
||||
@Post('downstream/pending')
|
||||
pendingDownstream(@Body() body: GatewayPendingDeliveryQueryDto) {
|
||||
return this.sendChain.listPendingDownstreamDeliveries(body);
|
||||
}
|
||||
|
||||
@Post('downstream/delivered')
|
||||
downstreamDelivered(@Body() body: { id: string }) {
|
||||
return this.sendChain.markDownstreamDeliveryDelivered(body.id);
|
||||
}
|
||||
|
||||
@Post('downstream/failed')
|
||||
downstreamFailed(@Body() body: { id: string; errorMessage?: string }) {
|
||||
return this.sendChain.markDownstreamDeliveryFailed(body.id, body.errorMessage);
|
||||
}
|
||||
|
||||
@Post('downstream/recovery-status')
|
||||
downstreamRecoveryStatus(@Body() body: GatewayDownstreamRecoveryStatusDto) {
|
||||
return this.sendChain.recordGatewayDownstreamRecoveryStatus(body);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user