import { Brackets, ObjectLiteral, OrderByCondition, SelectQueryBuilder } from "typeorm"; import { LoaderNamingStrategyEnum } from "./enums/LoaderNamingStrategy"; import { LoaderSearchMethod } from "./enums/LoaderSearchMethod"; export declare type WhereArgument = string | Brackets; export declare type WhereExpression = LoaderWhereExpression | Brackets; export interface LoaderWhereExpression { condition: string; params?: ObjectLiteral; } export interface LoaderOptions { namingStrategy?: LoaderNamingStrategyEnum; primaryKeyColumn?: string; defaultSearchMethod?: LoaderSearchMethod; maxQueryDepth?: number; } export interface SearchOptions { searchColumns: Array>; searchText: string; searchMethod?: LoaderSearchMethod; caseSensitive?: boolean; } export interface QueryPagination { limit: number; offset: number; } export declare type FieldConfigurationPredicate = (context: any, queriedFields: Array, selection: GraphQLEntityFields) => boolean; export interface LoaderFieldConfiguration { ignore?: boolean | FieldConfigurationPredicate; required?: boolean | FieldConfigurationPredicate; graphQLName?: string; sqlJoinAlias?: string; } export declare type RequireOrIgnoreSettings = Map; export declare type EjectQueryCallback = (qb: SelectQueryBuilder) => SelectQueryBuilder; export interface QueryPredicates { andWhere: Array; orWhere: Array; search: Array; order: OrderByCondition; selectFields: Array; } export interface QueueItem { many: boolean; key: string; fields: GraphQLEntityFields | null; predicates: QueryPredicates; resolve: (value?: any) => any; reject: (reason: any) => void; entity: Function | string; pagination?: QueryPagination; alias?: string; context?: any; ejectQueryCallback: EjectQueryCallback; } export interface QueryMeta { key: string; fields: GraphQLEntityFields | null; found: boolean; item?: Promise; } export interface GraphQLFieldArgs { [key: string]: any; } export declare type GraphQLEntityFields = { [field: string]: { children: GraphQLEntityFields; arguments?: GraphQLFieldArgs; }; };