import { GraphQLSchema } from 'graphql'; import { InMemoryCache } from 'apollo-cache-inmemory'; import { SearchArguments } from '../state/query/index'; export declare enum OperationType { query = "query", muttation = "mutation" } export interface Field { isList: boolean; isRequired: boolean; isRelation: boolean; typeName: string; typeString: string; name: string; width: number; children?: Dictionary; } export interface Arguments { where?: string; orderBy?: string; skip?: number; after?: string; before?: string; first?: number; last?: number; data?: any; } export interface Dictionary { [Key: string]: T; } export default class Engine { token?: string; endpoint: string; schema: GraphQLSchema; modelNames: string[]; activeTypeName: string; activeQueryLimit: number; modelIdMap: Dictionary; cache: InMemoryCache; headers?: Dictionary; constructor(endpoint: string, token?: string, headers?: Dictionary); init(): IterableIterator; setSchema(schema: any): void; getTypeNameFromOperation(operationType: OperationType, queryType: string): any; getSelectionFields(typeName: string, selectionSet: string): any; validateQuery(query: string): any; setQuery(query: string, limit?: number): { fields: any; typeName: string; }; getModelTypeNames(): string[]; getEnumValues(typeName: any): string[]; getAllQueryName(typeName: string): string | undefined; allQuery(typeName: string): string; hiddenQuery(query: string, queryPage: number, search: SearchArguments | undefined): any; detailsQuery(typeName: string, id: string): string; countQuery(queries: Dictionary): string; getConnectionName(queryType: any): string; request(query: any, variables?: any): IterableIterator; parseOperation(operationString: string): { operationType: OperationType; operationName: string; queryArguments: Arguments; selection: string; }; fieldsQuery(typeName: string, fields: Dictionary): string; getPayloadFromFields(fields: Dictionary): string; getFields(typeName: string, selectionSet?: any, nested?: boolean, onlyInput?: boolean): any; private getWhereString; private getHeaders; private parseArguments; private generateIdMap; private dataIdFromObject; private getIdFromTypeName; private getPayload; private getField; private getType; }