import "reflect-metadata"; import { GraphQLScalarType } from "graphql"; interface ClassType { new (...args: any[]): T; } export interface CustomType { type: string; importPath: string; tsType?: string; tsImportPath?: string; } declare type Type = GraphQLScalarType | ClassType | string | CustomType; export declare type GraphQLConnection = { node: T; }; export interface gqlFieldOptions { name?: string; nullable?: boolean | NullableListOptions; description?: string; type?: Type | Array | GraphQLConnection; } export interface gqlObjectOptions { name?: string; description?: string; } declare type gqlTopLevelOptions = Exclude; export declare enum CustomFieldType { Accessor = "ACCESSOR", Field = "FIELD", Function = "FUNCTION", AsyncFunction = "ASYNC_FUNCTION" } interface CustomFieldImpl { nodeName: string; gqlName: string; functionName: string; importPath?: string; fieldType: CustomFieldType; description?: string; } export interface CustomField extends CustomFieldImpl { args: Field[]; results: Field[]; } export interface CustomMutation extends CustomField { } export interface CustomQuery extends CustomField { } export interface ProcessedCustomField extends CustomFieldImpl { args: ProcessedField[]; results: ProcessedField[]; } export declare type ProcessCustomFieldMap = { [key: string]: ProcessedCustomField; }; export interface CustomObject { nodeName: string; className: string; description?: string; } declare type NullableListOptions = "contents" | "contentsAndList"; interface FieldImpl { type: string; tsType?: string; importPath?: string; needsResolving?: boolean; list?: boolean; connection?: boolean; name: string; } export interface Field extends FieldImpl { nullable?: boolean | NullableListOptions; isContextArg?: boolean; } export interface ProcessedField extends FieldImpl { nullable?: NullableResult; isContextArg?: boolean; } declare enum NullableResult { CONTENTS = "contents", CONTENTS_AND_LIST = "contentsAndList", ITEM = "true" } export declare class GQLCapture { private static enabled; static enable(enabled: boolean): void; static isEnabled(): boolean; private static customFields; private static customQueries; private static customMutations; private static customArgs; private static customInputObjects; private static customObjects; private static customTypes; static clear(): void; static getCustomFields(): Map; static getCustomMutations(): CustomMutation[]; static getCustomQueries(): CustomQuery[]; static getCustomArgs(): Map; static getCustomInputObjects(): Map; static getCustomObjects(): Map; static getCustomTypes(): Map; private static getNullableArg; static getProcessedCustomFields(): ProcessCustomFieldMap; static getProcessedCustomMutations(): ProcessedCustomField[]; static getProcessedCustomQueries(): ProcessedCustomField[]; private static getProcessedCustomFieldsImpl; private static knownAllowedNames; private static knownDisAllowedNames; private static getResultFromMetadata; static gqlField(options?: gqlFieldOptions): any; private static getCustomField; private static argMap; private static argImpl; static gqlArg(name: string, options?: gqlFieldOptions): any; static gqlContextType(): any; static gqlArgType(options?: gqlObjectOptions): any; static gqlInputObjectType(options?: gqlObjectOptions): any; static gqlObjectType(options?: gqlObjectOptions): any; private static customGQLObject; static gqlQuery(options?: gqlTopLevelOptions): any; static gqlMutation(options?: gqlTopLevelOptions): any; static gqlConnection(type: Type): any; static resolve(objects: string[]): void; } export declare const gqlField: typeof GQLCapture.gqlField; export declare const gqlArg: typeof GQLCapture.gqlArg; export declare const gqlArgType: typeof GQLCapture.gqlArgType; export declare const gqlInputObjectType: typeof GQLCapture.gqlInputObjectType; export declare const gqlObjectType: typeof GQLCapture.gqlObjectType; export declare const gqlQuery: typeof GQLCapture.gqlQuery; export declare const gqlMutation: typeof GQLCapture.gqlMutation; export declare const gqlContextType: typeof GQLCapture.gqlContextType; export declare const gqlConnection: typeof GQLCapture.gqlConnection; declare const gqlFileUpload: CustomType; export { gqlFileUpload };