/** * Order Events - Shared Contracts * * Shared event payloads for Server-Sent Events used by both the BFF * and the frontend. Keeping these definitions in the domain package * guarantees both layers stay in sync when the payload evolves. */ export type OrderUpdateStage = "started" | "in_progress" | "completed" | "failed"; export interface OrderStreamEvent { event: T; data: P; } export interface OrderUpdateEventPayload { orderId: string; status?: string; activationStatus?: string | null; message?: string; reason?: string; stage?: OrderUpdateStage; source?: string; timestamp: string; payload?: Record | null; }