fix: harden upstream and downstream receipt delivery
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
GatewayReceiptEventDto,
|
||||
GatewaySubmitDeadLetterDto,
|
||||
GatewaySubmitResultDto,
|
||||
GatewaySubmitSegmentResultDto,
|
||||
GatewayUplinkEventDto,
|
||||
SendChainService,
|
||||
} from './send-chain.service';
|
||||
@@ -31,6 +32,16 @@ export class GatewayEventsController {
|
||||
return this.sendChain.handleSubmitResult(body);
|
||||
}
|
||||
|
||||
@Post('submit-segment-result')
|
||||
submitSegmentResult(@Body() body: GatewaySubmitSegmentResultDto) {
|
||||
return this.sendChain.handleSubmitSegmentResult(body);
|
||||
}
|
||||
|
||||
@Post('receipt/intake')
|
||||
receiptIntake(@Body() body: GatewayReceiptEventDto) {
|
||||
return this.trackGatewayEvent('deliver_receipt', body, () => this.sendChain.intakeReceipt(body));
|
||||
}
|
||||
|
||||
@Post('receipt')
|
||||
receipt(@Body() body: GatewayReceiptEventDto) {
|
||||
return this.trackGatewayEvent('deliver_receipt', body, () => this.sendChain.handleReceipt(body));
|
||||
@@ -104,8 +115,8 @@ export class GatewayEventsController {
|
||||
}
|
||||
|
||||
@Post('downstream/failed')
|
||||
downstreamFailed(@Body() body: { id: string; errorMessage?: string; failureType?: GatewayDownstreamFailureType }) {
|
||||
return this.sendChain.markDownstreamDeliveryFailed(body.id, body.errorMessage, body.failureType);
|
||||
downstreamFailed(@Body() body: GatewayDownstreamSentDto & { errorMessage?: string; failureType?: GatewayDownstreamFailureType }) {
|
||||
return this.sendChain.markDownstreamDeliveryFailed(body.id, body.errorMessage, body.failureType, body);
|
||||
}
|
||||
|
||||
@Post('downstream/recovery-status')
|
||||
|
||||
Reference in New Issue
Block a user