import type { SearchResult } from "@stigmer/protos/ai/stigmer/search/v1/io_pb";
/** Options for {@link useSessionSearch}. */
export interface UseSessionSearchOptions {
    /** Maximum sessions per page. @default 20 */
    readonly pageSize?: number;
}
/** Return value of {@link useSessionSearch}. */
export interface UseSessionSearchReturn {
    /** Current page of session entries (lightweight SearchResult projections). */
    readonly sessions: readonly SearchResult[];
    /** Total number of sessions matching the query. */
    readonly totalCount: number;
    /** Total pages available. */
    readonly totalPages: number;
    /** The current page number (1-indexed). */
    readonly currentPage: number;
    /** `true` while the initial fetch is in flight. */
    readonly isLoading: boolean;
    /** `true` while a background refetch is in flight. */
    readonly isRefetching: boolean;
    /** Error from the last failed request, or `null`. */
    readonly error: Error | null;
    /** Re-fetch the current page. */
    readonly refetch: () => void;
    /** Whether more pages are available. */
    readonly hasMore: boolean;
    /** Load the next page (appends to existing sessions). */
    readonly loadMore: () => void;
}
/**
 * Data hook that fetches sessions via the SearchService for lightweight,
 * org-scoped, paginated session listing.
 *
 * Unlike {@link useSessionList} which calls the dedicated SessionQueryController.list
 * RPC (loading full session documents with per-session FGA authorization),
 * this hook uses the SearchService which returns lightweight `SearchResult`
 * projections and benefits from the search index's optimized access patterns.
 *
 * Supports incremental "load more" pagination — each call to `loadMore()`
 * fetches the next page and appends results.
 *
 * @example
 * ```tsx
 * function SessionSidebar() {
 *   const { sessions, isLoading, hasMore, loadMore } = useSessionSearch();
 *
 *   return (
 *     <ul>
 *       {sessions.map((s) => <li key={s.id}>{s.description}</li>)}
 *       {hasMore && <button onClick={loadMore}>Load more</button>}
 *     </ul>
 *   );
 * }
 * ```
 */
export declare function useSessionSearch(options?: UseSessionSearchOptions): UseSessionSearchReturn;
//# sourceMappingURL=useSessionSearch.d.ts.map