import type { StreamID } from '@dustil/streamid'; import type { StreamState } from './stream.js'; export declare type ForwardPagination = { first: number; after?: string; }; export declare type BackwardPagination = { last: number; before?: string; }; export declare type Pagination = ForwardPagination | BackwardPagination; export declare type BaseQuery = { model: StreamID | string; account?: string; filter?: Record; }; export declare type PaginationQuery = BaseQuery & Pagination; export interface IndexApi { count(query: BaseQuery): Promise; query(query: PaginationQuery): Promise>; } export declare type Edge = { cursor: string; node: T; }; export interface Page { readonly edges: Array>; readonly pageInfo: PageInfo; } export declare type PageInfo = { readonly hasNextPage: boolean; readonly hasPreviousPage: boolean; readonly startCursor?: string; readonly endCursor?: string; }; //# sourceMappingURL=index-api.d.ts.map