import { type DocumentNode, type GraphQLSchema } from 'graphql'; import type { Data, GraphQLConnector, Stats } from '../types.ts'; export type PaginationStrategy = { type: string; fromName: string; sizeName: string; hasNextPath?: string[]; cursorPath?: string[]; totalPath?: string[]; itemsPath: string[]; }; export type PaginatedField = { strategy: PaginationStrategy; fromVarName: string; sizeVarName: string; astPath: string[]; queryPath: string[]; }; export declare function findPaginatedFields(ast: DocumentNode, schema: GraphQLSchema): PaginatedField[]; export declare function removeNonPaginated(ast: DocumentNode, paginatedFields: PaginatedField[]): DocumentNode; export declare function addPaginationVariables(ast: DocumentNode, paginatedFields: PaginatedField[]): DocumentNode; export declare function hasField(ast: Record, queryPath: string[]): boolean; export declare function ensureField(ast: any, queryPath: string[]): DocumentNode; export declare function ensurePaginationFields(ast: DocumentNode, paginatedFields: PaginatedField[], source?: string): DocumentNode; export declare function isDone(queryArgs: Data, queryData: Data, paginatedField: PaginatedField): boolean; export type GetQueryIteratorOptions = { variables?: Data; pageSize?: number; source?: string; stats?: Stats; }; export type QueryIteratorResult = { iterator: () => AsyncGenerator; total?: number; }; export declare function getQueryIterator(schema: GraphQLSchema, query: string, connector: GraphQLConnector, { variables, pageSize, source, stats }?: GetQueryIteratorOptions): Promise;