feat: harden sessions and track downstream acknowledgements
This commit is contained in:
@@ -4,6 +4,9 @@ import {
|
||||
GatewayInboundAuthDto,
|
||||
GatewayInboundSubmitDto,
|
||||
GatewayPendingDeliveryQueryDto,
|
||||
GatewayDownstreamAcknowledgedDto,
|
||||
GatewayDownstreamFailureType,
|
||||
GatewayDownstreamSentDto,
|
||||
GatewayDownstreamRecoveryStatusDto,
|
||||
GatewayReceiptEventDto,
|
||||
GatewaySubmitDeadLetterDto,
|
||||
@@ -66,9 +69,19 @@ export class GatewayEventsController {
|
||||
return this.sendChain.markDownstreamDeliveryDelivered(body.id);
|
||||
}
|
||||
|
||||
@Post('downstream/sent')
|
||||
downstreamSent(@Body() body: GatewayDownstreamSentDto) {
|
||||
return this.sendChain.markDownstreamDeliverySent(body);
|
||||
}
|
||||
|
||||
@Post('downstream/acknowledged')
|
||||
downstreamAcknowledged(@Body() body: GatewayDownstreamAcknowledgedDto) {
|
||||
return this.sendChain.acknowledgeDownstreamDelivery(body);
|
||||
}
|
||||
|
||||
@Post('downstream/failed')
|
||||
downstreamFailed(@Body() body: { id: string; errorMessage?: string }) {
|
||||
return this.sendChain.markDownstreamDeliveryFailed(body.id, body.errorMessage);
|
||||
downstreamFailed(@Body() body: { id: string; errorMessage?: string; failureType?: GatewayDownstreamFailureType }) {
|
||||
return this.sendChain.markDownstreamDeliveryFailed(body.id, body.errorMessage, body.failureType);
|
||||
}
|
||||
|
||||
@Post('downstream/recovery-status')
|
||||
|
||||
Reference in New Issue
Block a user