import { FailureContract, FailureOf, queryErrors } from "../modules/contracts/errors.mjs"; import "./failures.mjs"; import { ListPage } from "./pagination-state.mjs"; import { FunctionArgs, FunctionReference, FunctionReturnType, PaginationOptions } from "convex/server"; import { Value } from "convex/values"; //#region src/react/use-paginated-list.d.ts export type ListQueryReference = FunctionReference<'query', 'public', { paginationOpts: PaginationOptions; }, ListPage>; export type PaginatedList = { rows: FunctionReturnType['page']; isLoading: boolean; hasNextPage: boolean; isFetchingNextPage: boolean; fetchNextPage: () => void; resetKey: string; completeness: FunctionReturnType['completeness'] | undefined; failure: FailureOf | undefined; /** Original subscription error, without decoding or mutation. */ error: Error | undefined; }; export type PaginatedListOptions = { /** Integer 1..100. Initial target for native search; browse uses fixed adjacent pages. */ pageSize: number; onInvalidCursor?: 'restart' | 'throw'; /** Keep failures in state (default), or throw the original error to a React boundary. */ onFailure?: 'state' | 'throw'; /** Explicit server contract; generated references do not carry error metadata. Defaults to queryErrors. */ errors?: Contract; /** Convex value identifying the current auth/scope/reset generation. Never a credential. */ resetIdentity?: Value; }; /** Reactive engine-backed list: fixed browse ranges or SDK-journal search windows. Empty pages advance manually. */ export declare function usePaginatedList(query: Query, args: Omit, 'paginationOpts'> | 'skip', options: PaginatedListOptions): PaginatedList; //#endregion //# sourceMappingURL=use-paginated-list.d.mts.map