/** * Realtime Events - Shared Contracts * * Shared SSE payload shapes for portal + BFF. */ export interface RealtimeEventEnvelope { event: TEvent; data: TData; } export interface ServicesEligibilityChangedPayload { 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<"services.eligibility.changed", ServicesEligibilityChangedPayload>;