export { e as AiChatApiRouter, b as AiChatBackendConfig, A as AiChatBackendHooks, a as AiChatMode, C as ChatApiContext, d as aiChatBackendPlugin, c as createAiChatQueryKeys } from '../../../shared/stack.CTDVxbrA.js';
import { Adapter } from '@btst/db';
import { C as Conversation, M as Message } from '../../../shared/stack.Be1QIHEn.js';
import '@tanstack/react-query';
import '@btst/stack/plugins/client';
import '@btst/stack/plugins/api';
import 'better-call';
import 'zod/v4/core';
import 'zod';
import 'ai';

/**
 * Retrieve all conversations, optionally filtered by userId.
 * Pure DB function - no hooks, no HTTP context. Safe for server-side use.
 *
 * @param adapter - The database adapter
 * @param userId - Optional user ID to filter conversations by owner
 */
declare function getAllConversations(adapter: Adapter, userId?: string): Promise<Conversation[]>;
/**
 * Retrieve a single conversation by its ID, including all messages.
 * Returns null if the conversation is not found.
 * Pure DB function - no hooks, no HTTP context. Safe for server-side use.
 *
 * @param adapter - The database adapter
 * @param id - The conversation ID
 */
declare function getConversationById(adapter: Adapter, id: string): Promise<(Conversation & {
    messages: Message[];
}) | null>;

export { getAllConversations, getConversationById };
