import { AthenaChatAttachmentView, AthenaChatMember, AthenaChatMessage, AthenaChatReactionCount, AthenaChatRoom } from '@xylex-group/athena'; import { AthenaChatViewAttachment, AthenaChatViewMember, AthenaChatViewMessage, AthenaChatViewReaction, AthenaChatViewRoom } from './types.js'; /** * Projects a wire attachment onto the view model. * * `storage_key`, `bucket` and `visibility` are intentionally not copied: they * describe where the blob physically lives and must never reach the browser. * * `public_url_path` is also deliberately dropped. It is an unauthenticated URL, * so anything rendered from it stays readable after the viewer loses access to * the room. `proxy_url_path` already covers `` and stays subject to * authorization, so there is no case where the public path is the right choice * for a chat surface. */ export declare function mapAttachment(attachment: AthenaChatAttachmentView): AthenaChatViewAttachment; export declare function mapReaction(reaction: AthenaChatReactionCount): AthenaChatViewReaction; export declare function mapMessage(message: AthenaChatMessage): AthenaChatViewMessage; export declare function mapRoom(room: AthenaChatRoom, lastReadSeq?: number): AthenaChatViewRoom; export declare function mapMember(member: AthenaChatMember): AthenaChatViewMember; /** * Merges incoming messages into an existing list, keyed by id. * * Optimistic sends are keyed by `clientMessageId` until the gateway echoes a * real id back, so the placeholder is replaced rather than duplicated. */ export declare function mergeMessages(current: readonly AthenaChatViewMessage[], incoming: readonly AthenaChatViewMessage[]): AthenaChatViewMessage[]; /** * Inserts or replaces a room, keeping the most recently active room first. * * Distinct from the transport-agnostic `upsertRoom` helper, which preserves the * caller's ordering; this variant owns the recency sort the room rail needs. * Rooms with no messages yet fall back to their creation time so a freshly * created room does not sink to the bottom of the list. */ export declare function upsertViewRoom(rooms: readonly AthenaChatViewRoom[], room: AthenaChatViewRoom): AthenaChatViewRoom[];