/** * Realtime Events - Shared Contracts * * Shared SSE payload shapes for portal + BFF. */ export interface RealtimeEventEnvelope { event: TEvent; data: TData; } export interface CatalogEligibilityChangedPayload { accountId: string; eligibility: string | null; timestamp: string; } export type AccountStreamEvent = | RealtimeEventEnvelope<"account.stream.ready", { topic: string; timestamp: string }> | RealtimeEventEnvelope<"account.stream.heartbeat", { topic: string; timestamp: string }> | RealtimeEventEnvelope<"catalog.eligibility.changed", CatalogEligibilityChangedPayload>;