import type { RecentActivityEntry, RecentActivityType } from "./types";
/** Options for {@link useRecentActivity}. */
export interface UseRecentActivityOptions {
    /**
     * Maximum entries to return. The server merges sessions and workflow
     * executions into a single sorted list and returns at most `pageSize`.
     *
     * @default 30
     */
    readonly pageSize?: number;
}
/** Minimal fields required to synthesize an optimistic sidebar entry. */
export interface OptimisticEntryInput {
    readonly id: string;
    readonly type: RecentActivityType;
    readonly subject: string;
}
/** Return value of {@link useRecentActivity}. */
export interface UseRecentActivityReturn {
    /** Merged entries sorted by `updatedAt` descending. */
    readonly entries: readonly RecentActivityEntry[];
    /** `true` while the initial fetch is in flight. */
    readonly isLoading: boolean;
    /** First non-null error from the fetch. */
    readonly error: Error | null;
    /** Re-fetch from the server. */
    readonly refetch: () => void;
    /**
     * Prepend an optimistic entry to the top of the recents list.
     * The entry is automatically replaced by server data on the next
     * successful refetch that includes its ID.
     */
    readonly prependOptimistic: (entry: OptimisticEntryInput) => void;
}
/**
 * Fetches recent activity via the unified `listRecentActivity` RPC,
 * which returns a merged, time-sorted list of the caller's most
 * recent sessions and workflow executions in a single call.
 *
 * The server handles:
 * - FGA authorization filtering (or org-scoped fast path)
 * - Cross-collection merge-sort by `statusAudit.updatedAt`
 * - Fallback to `specAudit.createdAt` for documents without status updates
 * - Pagination / trimming to the requested page size
 */
export declare function useRecentActivity(options?: UseRecentActivityOptions): UseRecentActivityReturn;
//# sourceMappingURL=useRecentActivity.d.ts.map