import { ExternalConversation, SlackOlderPage, SlackThreadGroup, StartExistingChannelRequest, StartNewChannelRequest, StartResponse } from '../types/wire';
/**
 * Older-message pagination cursor. The backend accepts `before_ts` (fetch
 * messages older than this Slack ts) and `page_size` (window size, max 50)
 * as query params on the external-conversation and thread endpoints.
 * Omit `beforeTs` for page 0 (newest window, served from cache).
 */
export interface SlackPageParams {
    beforeTs?: string;
    pageSize?: number;
}
export declare const startExistingChannel: (payload: StartExistingChannelRequest) => Promise<StartResponse>;
export declare const startNewChannel: (payload: StartNewChannelRequest) => Promise<StartResponse>;
export declare const getExternalConversation: (hiverConvId: string, page?: SlackPageParams) => Promise<ExternalConversation>;
/**
 * Imperative older-page fetch for the message list. Bypasses the polled
 * page-0 query: pass the previous page's nextCursor as `beforeTs` to walk
 * backwards into older history. Returns older thread replies (thread mode)
 * or older thread roots (channel mode); the caller merges + dedupes.
 */
export declare const getExternalConversationPage: (hiverConvId: string, beforeTs: string, pageSize?: number) => Promise<SlackOlderPage>;
/**
 * Channel mode (B4): lazily fetch a single thread's full messages
 * (root + replies) when the user drills into it. The list view only
 * carries roots + reply counts, so this is the on-demand fetch. Pass
 * `page` to page into older replies (see getThreadPage).
 */
export declare const getThread: (hiverConvId: string, threadTs: string, page?: SlackPageParams) => Promise<SlackThreadGroup>;
/**
 * Imperative older-replies fetch for a thread drill-in. Pass the previous
 * page's nextCursor as `beforeTs`. Returns the older replies window (the
 * thread root is omitted from `messages` — it stays pinned in page 0).
 */
export declare const getThreadPage: (hiverConvId: string, threadTs: string, beforeTs: string, pageSize?: number) => Promise<SlackOlderPage>;
export declare const getExternalConversationsByTarget: (params: {
    channelId: string;
    externalThreadTs?: string;
}) => Promise<{
    hiverConvIds: string[];
}>;
//# sourceMappingURL=conversations.d.ts.map