import { type IPagedResource } from "@gooddata/sdk-backend-spi"; /** * This implementation of {@link @gooddata/sdk-backend-spi#IPagedResource} pages over a list of items * provided at construction time. The paging is done using pre-configured page limit and starts at particular offset. * * @internal */ export declare class InMemoryPaging implements IPagedResource { protected readonly allItems: T[]; readonly items: T[]; readonly limit: number; readonly offset: number; readonly totalCount: number; constructor(allItems: T[], limit?: number, offset?: number); next(): Promise>; goTo(pageIndex: number): Promise>; all(): Promise; allSorted(compareFn: (a: T, b: T) => number): Promise; } /** * @internal */ export interface IServerPagingResult { items: T[]; totalCount: number; cacheId?: string; } /** * @internal */ export type IServerPagingParams = { offset: number; limit: number; cacheId?: string; totalCount?: number; }; /** * Common implementation of the {@link @gooddata/sdk-backend-spi#IPagedResource} for the server-side paging. * * @internal */ export declare class ServerPaging implements IPagedResource { protected readonly getData: (pagingParams: IServerPagingParams) => Promise>; readonly limit: number; readonly offset: number; readonly totalCount: number; readonly items: T[]; readonly cacheId?: string | undefined; static for(getData: (pagingParams: IServerPagingParams) => Promise>, limit?: number, offset?: number, cacheId?: string): Promise>; constructor(getData: (pagingParams: IServerPagingParams) => Promise>, limit: number | undefined, offset: number | undefined, totalCount: number, items: T[], cacheId?: string | undefined); next: () => Promise>; goTo: (pageIndex: number) => Promise>; all: () => Promise; allSorted: (compareFn: (a: T, b: T) => number) => Promise; } //# sourceMappingURL=paging.d.ts.map