import type { EnumValues, FieldNullability, FieldRequiredness, InputFieldMap, InputType, InterfaceParam, ObjectParam, RootName, SchemaTypes, TypeParam, } from '@pothos/core'; import type { PothosDirectivesPlugin } from './index.js'; import type { DirectiveLocation, Directives } from './types.js'; declare global { export namespace PothosSchemaTypes { export interface Plugins { directives: PothosDirectivesPlugin; } export interface UserSchemaTypes { Directives: Record< string, { locations: DirectiveLocation; args?: Record; } >; } export interface ExtendDefaultTypes> { Directives: PartialTypes['Directives'] & {}; } export interface SchemaBuilderOptions { directives?: { useGraphQLToolsUnorderedDirectives?: boolean; }; } export interface V3SchemaBuilderOptions { directives: never; useGraphQLToolsUnorderedDirectives?: boolean; } export interface EnumTypeOptions< Types extends SchemaTypes = SchemaTypes, Values extends EnumValues = EnumValues, > extends BaseTypeOptions { directives?: Directives; } export interface ObjectTypeOptions extends BaseTypeOptions { directives?: Directives; } export interface RootTypeOptions extends BaseTypeOptions { directives?: Directives; } export interface InputObjectTypeOptions< Types extends SchemaTypes = SchemaTypes, Fields extends InputFieldMap = InputFieldMap, > extends BaseTypeOptions { directives?: Directives; } export interface InterfaceTypeOptions< Types extends SchemaTypes = SchemaTypes, Shape = unknown, Interfaces extends InterfaceParam[] = InterfaceParam[], > extends BaseTypeOptions { directives?: Directives; } export interface UnionTypeOptions< Types extends SchemaTypes = SchemaTypes, Member extends ObjectParam = ObjectParam, > extends BaseTypeOptions { directives?: Directives; } export interface ScalarTypeOptions< Types extends SchemaTypes = SchemaTypes, ScalarInputShape = unknown, ScalarOutputShape = unknown, > extends BaseTypeOptions { directives?: Directives; } export interface FieldOptions< Types extends SchemaTypes = SchemaTypes, ParentShape = unknown, Type extends TypeParam = TypeParam, Nullable extends FieldNullability = FieldNullability, Args extends InputFieldMap = InputFieldMap, ResolveShape = unknown, ResolveReturnShape = unknown, > { directives?: Directives; } export interface InputObjectFieldOptions< Types extends SchemaTypes = SchemaTypes, Type extends InputType | [InputType] = InputType | [InputType], Req extends FieldRequiredness = FieldRequiredness, > { directives?: Directives; } export interface ArgFieldOptions< Types extends SchemaTypes = SchemaTypes, Type extends InputType | [InputType] = InputType | [InputType], Req extends FieldRequiredness = FieldRequiredness, > { directives?: Directives; } export interface EnumValueConfig { directives?: Directives; } export interface BuildSchemaOptions { schemaDirectives?: Directives; } } }