export interface ProductEvent { name: string; timestamp: string; payload: Record; } export function createEvent( name: string, payload: Record, now = new Date(), ): ProductEvent { return { name, payload, timestamp: now.toISOString(), }; }