Mejor gestion de errores para los order
This commit is contained in:
@@ -62,11 +62,14 @@ export type CreateOrderDTO = Pick<
|
||||
'correlation_id' | 'exchange' | 'routing_key' | 'order_type' | 'payload' | 'webhook_host' | 'webhook_endpoint'
|
||||
>;
|
||||
|
||||
export type UpdateOrderDTO =
|
||||
type IdOrCorrelationID =
|
||||
(
|
||||
{ id: number, correlation_id?: never } |
|
||||
{ id?: never, correlation_id: string }
|
||||
)
|
||||
|
||||
export type UpdateOrderDTO =
|
||||
IdOrCorrelationID
|
||||
&
|
||||
{
|
||||
new_status: OrderStatus,
|
||||
@@ -74,12 +77,20 @@ export type UpdateOrderDTO =
|
||||
}
|
||||
|
||||
export type FinishOrderDTO =
|
||||
(
|
||||
{ id: number, correlation_id?: never } |
|
||||
{ id?: never, correlation_id: string }
|
||||
)
|
||||
IdOrCorrelationID
|
||||
&
|
||||
{
|
||||
reason?: string
|
||||
}
|
||||
|
||||
export type ErrorOrderDTO =
|
||||
IdOrCorrelationID
|
||||
&
|
||||
{
|
||||
status: "failed" | "dlx",
|
||||
reason: string,
|
||||
error?: string,
|
||||
stackTrace?: string
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user