import type { AgentAvailability, Bootstrap, Channel, InboxItem, InboxState, Message, Notification, SearchResult, Ticket, TicketState, User, } from "@lynkd/messaging-inbox-sdk"; /** * The contract every BFF handler talks to. This is the ONE seam between the UI * and a real backend. Two implementations: * - MockBackend (default) — the in-memory store * - IiosBackend — proxies the real IIOS service * Selected by BFF_BACKEND ("mock" | "iios"). All methods are async so a network * backend drops in without changing the routes. */ export interface Backend { bootstrap(): Promise; listChannels(): Promise; createChannel(input: { name: string; kind?: string; topic?: string; memberIds?: string[] }): Promise; addMember(channelId: string, userId: string): Promise; removeMember(channelId: string, userId: string): Promise; markRead(channelId: string): Promise; setStatus(text: string | undefined, emoji: string | undefined, clearAt?: number): Promise; updateMe(patch: { name?: string; title?: string; avatarColor?: string; avatarUrl?: string | null; presence?: string }): Promise; channelMessages(channelId: string): Promise; thread(channelId: string, parentId: string): Promise<{ parent: Message | null; replies: Message[] }>; send(channelId: string, body: string, opts?: { parentId?: string; scheduledFor?: number; attachments?: import("@lynkd/messaging-inbox-sdk").Attachment[]; threadRootId?: string | null }): Promise; editMessage(channelId: string, messageId: string, body: string): Promise; deleteMessage(channelId: string, messageId: string): Promise<{ ok: boolean }>; react(channelId: string, messageId: string, emoji: string): Promise; pin(channelId: string, messageId: string): Promise; save(channelId: string, messageId: string): Promise; savedMessages(): Promise; threadParents(): Promise; listInbox(state?: InboxState): Promise; patchInbox(id: string, state: InboxState): Promise; listTickets(scope?: string): Promise; getTicket(id: string): Promise; patchTicket(id: string, state: TicketState): Promise; replyTicket(id: string, body: string): Promise; availability(): Promise; search(q: string): Promise; notifications(): Promise; }