import type { z } from "zod"; import type { RealtimeChannelDescriptor } from "./realtime-channel"; export type RealtimeContext = { userId: string | null; roles: string[]; }; export type IRealtimeHandler = (input: T, ctx: RealtimeContext) => Promise; export type IInboundDescriptor = { readonly descriptor: RealtimeChannelDescriptor; readonly handler: IRealtimeHandler>; };