import type { BasicCursorPaginationOptions, CollectionProp, CursorPaginatedCollectionProp, PaginationQueryOptions } from '../common-types'; export type OffsetBasedParams = { query?: PaginationQueryOptions; }; export type CursorBasedParams = { query?: BasicCursorPaginationOptions; }; type ExpectedParams = OffsetBasedParams | CursorBasedParams; /** * `sys.type` tends to cause type clashes downstream because it more commonly types less strict * as 'string'. Because we don't rely on it for this functionality, we are fine with omitting it. */ type IterableCollection = Omit | CursorPaginatedCollectionProp, 'sys'>; export type FetchFn

= (params: P) => Promise>; type ParamsType

> = T extends (params: infer P) => unknown ? P : never; /** * Parameters for endpoint methods that can be paginated are inconsistent, `fetchAll` will only * work with the more common version of supplying the limit, skip, and pageNext parameters via a distinct `query` property in the * parameters. */ export declare function fetchAll>(fetchFn: FetchFn, params: ParamsType): Promise; export {};