/** * Turning a `StructuredNotice` into one channel's wire string. * * Split out of `inbound-notice.ts` so the producer and the escapers are * separate modules, which is the module family's own thesis made structural: * the producer never holds a channel-formatted string, and nothing here can * reach the fields the producer decided to include. The dependency runs one * way, this file imports the note's types and sanitizing primitives, and * `inbound-notice.ts` imports nothing from here. * * Escape, do not strip. The owner is meant to see `[Approved](https://evil.example)` * exactly as the mail wrote it, rendered inert, not a row of blanks that * leaves them unable to tell whether the mail said that or we did. */ import { type StructuredNotice } from './inbound-notice.js'; /** The conservative fallback renderer: full neutralization, never raw concatenation. */ export declare function renderNoticeAsPlainText(notice: StructuredNotice): string; /** * Every channel this module ships an escaper for. Not a claim that these are * the only channels `deliverSurfaceNotice` can reach, see * `renderNoticeForChannel` for what an unregistered channel gets. */ export type NoticeChannel = 'telegram' | 'discord' | 'slack' | 'html' | 'ntfy'; /** * Render a `StructuredNotice` for one channel. `channel` is a plain `string` * rather than `NoticeChannel` deliberately: a channel this module has no * escaper for, including one that does not exist yet, falls back to * `renderNoticeAsPlainText`, never to a raw, un-escaped concatenation of span * text. Wiring an actual channel's delivery path to call this (or to call its * own equivalent escaper directly) is the integration round's job; this * function and its escapers are what that round has to invoke rather than * invent. */ export declare function renderNoticeForChannel(notice: StructuredNotice, channel: string): string; /** * The channel key to render a notice for, given the surface it is bound for. * * Returns a string rather than `NoticeChannel` so an unmapped surface flows * straight into `renderNoticeForChannel`'s fallback instead of forcing a cast * or a throw at the call site, an unrecognised surface must produce a * neutralized notice, never an error and never a raw one. */ export declare function noticeChannelForSurface(surfaceKind: string): string; /** * Render a notice for the surface it will be delivered on. * * The one function a delivery path should call. It resolves the escaper from * the surface rather than taking a channel name from a caller, so a caller * cannot pick the wrong escaper, or skip escaping, by passing the wrong * string. */ export declare function renderNoticeForSurface(notice: StructuredNotice, surfaceKind: string): string; //# sourceMappingURL=inbound-notice-channels.d.ts.map