import { type ConversationWindowBootstrap } from './conversation-window-bootstrap.js'; import type { ArkmeSourceItem } from '../types.js'; export interface ConversationWindowTarget { accountKey: string; sourceKey: string; source: ArkmeSourceItem; bootstrap?: ConversationWindowBootstrap; } export type ConversationWindowEvent = ({ kind: 'article'; key: string; value: unknown; restored?: boolean; } | { kind: 'call'; source: ArkmeSourceItem; mediaType: 'audio' | 'video'; } | { kind: 'draft'; key: string; value: unknown; } | { kind: 'changed'; } | { kind: 'activate'; source: ArkmeSourceItem; } | { kind: 'busy'; key: string; value: boolean; }) & { accountKey?: string; revision?: number; }; export interface ConversationWindowBridge { version: 1; bootstrapVersion?: 1; /** Native Profile/account files are available; older clients keep browser recovery. */ draftPersistence?: 1; open(target: ConversationWindowTarget, bootstrap?: ConversationWindowBootstrap): Promise; account(account: string | null): Promise; context(): Promise; active(): Promise; close(): Promise; focusMain(target?: ConversationWindowTarget): Promise; requestCall(mediaType: 'audio' | 'video'): Promise; snapshot(account: string): Promise; publish(event: ConversationWindowEvent, account: string): Promise; acquire(key: string, account: string, token: string): Promise; consumed(key: string, account: string, token: string): Promise; release(key: string, account: string, token: string): Promise; onEvent(listener: (event: ConversationWindowEvent) => void): () => void; /** Desktop shutdown/restart waits for coalesced edits and durable publish acknowledgements. */ onFlush?(listener: () => Promise): () => void; } export declare function conversationWindowBridge(): ConversationWindowBridge | undefined; export declare function conversationWindowRequested(): boolean; export declare function conversationAccountKey(): string | null; export declare function conversationWindowTarget(accountKey: string, source: ArkmeSourceItem): ConversationWindowTarget | undefined; export declare function openConversationWindow(source: ArkmeSourceItem): Promise; /** Navigation policy for the shared conversation surface in a fixed child window. */ export declare function navigateConversationWindow(source: ArkmeSourceItem): Promise<{ destination: 'window' | 'main'; reason?: string; }>; //# sourceMappingURL=conversation-window.d.ts.map