import { GraphQLInputType } from 'graphql'; import { Field } from '../../model'; import { AnyValue, PlainObject } from '../../utils/utils'; import { FieldContext } from '../query-node-object-type'; import { TypedInputFieldBase, TypedInputObjectType } from '../typed-input-object-type'; import { CreateObjectInputType } from './input-types'; export interface FieldValidationContext extends FieldContext { readonly objectValue: PlainObject; } export interface CreateInputField extends TypedInputFieldBase { getProperties(value: AnyValue, context: FieldContext): PlainObject; collectAffectedFields(value: AnyValue, fields: Set, context: FieldContext): void; appliesToMissingFields(): boolean; validateInContext(value: AnyValue, context: FieldValidationContext): void; } export declare class DummyCreateInputField implements CreateInputField { readonly name: string; readonly inputType: GraphQLInputType | TypedInputObjectType; readonly deprecationReason: string | undefined; constructor(name: string, inputType: GraphQLInputType | TypedInputObjectType, opts?: { readonly deprecationReason?: string; }); appliesToMissingFields(): boolean; collectAffectedFields(value: AnyValue, fields: Set, context: FieldContext): void; getProperties(value: AnyValue, context: FieldContext): PlainObject; validateInContext(value: AnyValue, context: FieldValidationContext): void; } export declare class BasicCreateInputField implements CreateInputField { readonly field: Field; _description: string | undefined; readonly inputType: GraphQLInputType | CreateObjectInputType; readonly deprecationReason?: string | undefined; constructor(field: Field, _description: string | undefined, inputType: GraphQLInputType | CreateObjectInputType, deprecationReason?: string | undefined); get name(): string; get description(): string | undefined; getProperties(value: AnyValue, context: FieldContext): { [x: string]: unknown; }; protected coerceValue(value: AnyValue, context: FieldContext): AnyValue; collectAffectedFields(value: AnyValue, fields: Set, context: FieldContext): void; appliesToMissingFields(): boolean; validateInContext(value: AnyValue, context: FieldValidationContext): void; } export declare class BasicListCreateInputField extends BasicCreateInputField { protected coerceValue(value: AnyValue, context: FieldContext): AnyValue; } export declare class CreateObjectInputField extends BasicCreateInputField { readonly objectInputType: CreateObjectInputType; constructor(field: Field, objectInputType: CreateObjectInputType, inputType?: GraphQLInputType); protected coerceValue(value: AnyValue, context: FieldContext): AnyValue; collectAffectedFields(value: AnyValue, fields: Set, context: FieldContext): void; } export declare class CreateReferenceInputField extends BasicCreateInputField { private readonly _name; constructor(field: Field, _name: string, description: string | undefined, inputType: GraphQLInputType | CreateObjectInputType, deprecationReason?: string); get name(): string; validateInContext(value: AnyValue, context: FieldValidationContext): void; } export declare class ObjectListCreateInputField extends BasicCreateInputField { readonly objectInputType: CreateObjectInputType; constructor(field: Field, objectInputType: CreateObjectInputType); protected coerceValue(value: AnyValue, context: FieldContext): AnyValue; collectAffectedFields(value: AnyValue, fields: Set, context: FieldContext): void; } export declare class CreateEntityExtensionInputField extends CreateObjectInputField { protected coerceValue(value: AnyValue, context: FieldContext): AnyValue; appliesToMissingFields(): boolean; }