import { GraphQLInputObjectType } from './graphql'; import { TypeInPath } from './utils/typeByPath'; import type { ThunkWithSchemaComposer, ObjMap, Extensions, Directive, DirectiveArgs } from './utils/definitions'; import { SchemaComposer } from './SchemaComposer'; import { ListComposer } from './ListComposer'; import { NonNullComposer } from './NonNullComposer'; import type { ThunkComposer } from './ThunkComposer'; import type { TypeAsString, TypeDefinitionString } from './TypeMapper'; import type { GraphQLInputFieldConfig, GraphQLInputType, InputValueDefinitionNode } from './graphql'; import { NamedTypeComposer, ComposeInputType, ComposeNamedInputType, ComposeInputTypeDefinition } from './utils/typeHelpers'; import { SchemaPrinterOptions } from './utils/schemaPrinter'; export declare type InputTypeComposerDefinition = TypeAsString | TypeDefinitionString | InputTypeComposerAsObjectDefinition | Readonly; export declare type InputTypeComposerAsObjectDefinition = { name: string; fields: ThunkWithSchemaComposer>; description?: null | string; extensions?: Extensions; directives?: Directive[]; }; export declare type InputTypeComposerFieldConfigMap = ObjMap; export declare type InputTypeComposerFieldConfigMapDefinition = ObjMap; export declare type InputTypeComposerFieldConfigDefinition = ThunkWithSchemaComposer> | ThunkWithSchemaComposer>; export declare type InputTypeComposerFieldConfigAsObjectDefinition = { type: ThunkWithSchemaComposer>; defaultValue?: unknown; description?: string | null; extensions?: Extensions; directives?: Directive[]; [key: string]: unknown; }; export declare type InputTypeComposerFieldConfig = { type: ComposeInputType; defaultValue?: unknown; description?: string | null; astNode?: InputValueDefinitionNode | null; extensions?: Extensions; directives?: Directive[]; [key: string]: unknown; }; export declare type InputTypeComposerThunked = InputTypeComposer | ThunkComposer, GraphQLInputType>; export declare class InputTypeComposer { schemaComposer: SchemaComposer; _gqType: GraphQLInputObjectType; _gqcFields: InputTypeComposerFieldConfigMap; _gqcExtensions?: Extensions; _gqcDirectives?: Directive[]; _gqcIsModified?: boolean; static create(typeDef: InputTypeComposerDefinition, schemaComposer: SchemaComposer): InputTypeComposer; static createTemp(typeDef: InputTypeComposerDefinition, schemaComposer?: SchemaComposer): InputTypeComposer; constructor(graphqlType: GraphQLInputObjectType, schemaComposer: SchemaComposer); getFields(): InputTypeComposerFieldConfigMap; getFieldNames(): string[]; hasField(fieldName: string): boolean; setFields(fields: InputTypeComposerFieldConfigMapDefinition): this; setField(fieldName: string, fieldConfig: InputTypeComposerFieldConfigDefinition): this; addFields(newFields: InputTypeComposerFieldConfigMapDefinition): this; addNestedFields(newFields: InputTypeComposerFieldConfigMapDefinition): this; getField(fieldName: string): InputTypeComposerFieldConfig; removeField(fieldNameOrArray: string | string[]): this; removeOtherFields(fieldNameOrArray: string | string[]): this; extendField(fieldName: string, partialFieldConfig: Partial): this; reorderFields(names: string[]): this; getFieldConfig(fieldName: string): GraphQLInputFieldConfig; getFieldType(fieldName: string): GraphQLInputType; getFieldTypeName(fieldName: string): string; getFieldTC(fieldName: string): ComposeNamedInputType; getFieldITC(fieldName: string): InputTypeComposer; isRequired(fieldName: string): boolean; isFieldNonNull(fieldName: string): boolean; makeFieldNonNull(fieldNameOrArray: string | string[]): this; makeRequired(fieldNameOrArray: string | string[]): this; makeFieldNullable(fieldNameOrArray: string | string[]): this; makeOptional(fieldNameOrArray: string | string[]): this; isFieldPlural(fieldName: string): boolean; makeFieldPlural(fieldNameOrArray: string | string[]): this; makeFieldNonPlural(fieldNameOrArray: string | string[]): this; getType(): GraphQLInputObjectType; getTypePlural(): ListComposer>; getTypeNonNull(): NonNullComposer>; get List(): ListComposer>; get NonNull(): NonNullComposer>; getTypeName(): string; setTypeName(name: string): this; getDescription(): string; setDescription(description: string): this; clone(newTypeNameOrTC: string | InputTypeComposer): InputTypeComposer; cloneTo(anotherSchemaComposer: SchemaComposer, cloneMap?: Map): InputTypeComposer; merge(type: GraphQLInputObjectType | InputTypeComposer): this; getExtensions(): Extensions; setExtensions(extensions: Extensions | undefined): this; extendExtensions(extensions: Extensions): this; clearExtensions(): this; getExtension(extensionName: string): unknown; hasExtension(extensionName: string): boolean; setExtension(extensionName: string, value: unknown): this; removeExtension(extensionName: string): this; getFieldExtensions(fieldName: string): Extensions; setFieldExtensions(fieldName: string, extensions: Extensions): this; extendFieldExtensions(fieldName: string, extensions: Extensions): this; clearFieldExtensions(fieldName: string): this; getFieldExtension(fieldName: string, extensionName: string): unknown; hasFieldExtension(fieldName: string, extensionName: string): boolean; setFieldExtension(fieldName: string, extensionName: string, value: unknown): this; removeFieldExtension(fieldName: string, extensionName: string): this; getDirectives(): Array; setDirectives(directives: Array): this; getDirectiveNames(): string[]; getDirectiveByName(directiveName: string): DirectiveArgs | undefined; setDirectiveByName(directiveName: string, args?: DirectiveArgs): this; getDirectiveById(idx: number): DirectiveArgs | undefined; getFieldDirectives(fieldName: string): Array; setFieldDirectives(fieldName: string, directives: Array | undefined): this; getFieldDirectiveNames(fieldName: string): string[]; getFieldDirectiveByName(fieldName: string, directiveName: string): DirectiveArgs | undefined; setFieldDirectiveByName(fieldName: string, directiveName: string, args?: DirectiveArgs): this; getFieldDirectiveById(fieldName: string, idx: number): DirectiveArgs | undefined; get(path: string | string[]): TypeInPath | void; getNestedTCs(opts?: { exclude?: string[] | null; }, passedTypes?: Set>): Set>; toSDL(opts?: SchemaPrinterOptions & { deep?: boolean; exclude?: string[]; }): string; } //# sourceMappingURL=InputTypeComposer.d.ts.map