import { ChannelName, Notifiable, NotificationChannels, RenderContext, SendOptions } from "../types.mjs"; //#region ../notifications/src/dispatch/define-notification.d.ts /** * Per-channel renderer return type. The `database` renderer may OMIT `type` * — it inherits from `NotificationDef.type` at dispatch time. */ type RendererReturn = C extends "database" ? Omit : NotificationChannels[C]; type Renderer = (data: Data, to: Notifiable, ctx: RenderContext) => RendererReturn; type NotificationDef = { type: string; via: ChannelName[] | ((data: Data, to: Notifiable) => ChannelName[]); } & { [C in ChannelName]?: Renderer }; interface DefinedNotification { send(to: Notifiable | Notifiable[], data: Data, options?: SendOptions): Promise; queue(to: Notifiable | Notifiable[], data: Data, options?: SendOptions): Promise; only(...channels: ChannelName[]): DefinedNotification; } declare function defineNotification(def: NotificationDef): DefinedNotification; //#endregion export { DefinedNotification, NotificationDef, defineNotification }; //# sourceMappingURL=define-notification.d.mts.map