Orders con endpoints para monitorizacion

This commit is contained in:
2026-02-25 12:20:52 +01:00
parent c416114c50
commit 02c80cd503
16 changed files with 373 additions and 63 deletions

View File

@@ -15,6 +15,16 @@ export type OrderType =
| 'reactivate'
| 'unknown';
export const OrderTypeOptions = new Set<OrderType>([
'activate',
'preactivate',
'cancel',
'pause',
'reactivate',
'unknown'
])
// Interfaz para la tabla order_tracking
export interface OrderTracking<T> {
id: number;
@@ -31,6 +41,9 @@ export interface OrderTracking<T> {
start_date: string | Date;
update_date: string | Date;
finish_date?: string | Date | null;
// desde la 1.1.0
webhook_host?: string | null;
webhook_endpoint?: string | null;
}
// Interfaz para la tabla order_history
@@ -46,5 +59,5 @@ export interface OrderHistory {
// Tipo útil para la creación (Omitiendo campos generados por la DB)
export type CreateOrderDTO = Pick<
OrderTracking<any>, // Aqui realmente no importan los campos
'correlation_id' | 'exchange' | 'routing_key' | 'order_type' | 'payload'
'correlation_id' | 'exchange' | 'routing_key' | 'order_type' | 'payload' | 'webhook_host' | 'webhook_endpoint'
>;