import type { Diagnostic as DiagnosticType, CompletionItem as CompletionItemType } from 'vscode-languageserver-types'; export { InsertTextFormat } from 'vscode-languageserver-types'; import type { ASTNode, GraphQLSchema, DocumentNode, FragmentDefinitionNode, NamedTypeNode, TypeDefinitionNode, NameNode, GraphQLArgument, GraphQLEnumValue, GraphQLField, GraphQLInputFieldMap, GraphQLInputObjectType, GraphQLInterfaceType, GraphQLObjectType, GraphQLType, GraphQLDirective } from 'graphql'; export type Maybe = T | null | undefined; import type { GraphQLConfig, GraphQLProjectConfig, GraphQLExtensionDeclaration } from 'graphql-config'; export { GraphQLDocumentMode } from './parser'; export type { GraphQLConfig, GraphQLProjectConfig, GraphQLExtensionDeclaration, }; export interface GraphQLCache { getGraphQLConfig: () => GraphQLConfig; getProjectForFile: (uri: string) => GraphQLProjectConfig | void; getObjectTypeDependenciesForAST: (parsedQuery: ASTNode, fragmentDefinitions: Map) => Promise; getObjectTypeDefinitions: (graphQLConfig: GraphQLProjectConfig) => Promise>; updateObjectTypeDefinition: (rootDir: Uri, filePath: Uri, contents: CachedContent[]) => Promise; getFragmentDependencies: (query: string, fragmentDefinitions: Maybe>) => Promise; getFragmentDependenciesForAST: (parsedQuery: ASTNode, fragmentDefinitions: Map) => Promise; getFragmentDefinitions: (graphQLConfig: GraphQLProjectConfig) => Promise>; updateFragmentDefinition: (rootDir: Uri, filePath: Uri, contents: CachedContent[]) => Promise; getSchema: (appName: string, queryHasExtensions?: boolean) => Promise; } export interface IPosition { line: number; character: number; setLine(line: number): void; setCharacter(character: number): void; lessThanOrEqualTo(position: IPosition): boolean; } export interface IRange { start: IPosition; end: IPosition; setEnd(line: number, character: number): void; setStart(line: number, character: number): void; containsPosition(position: IPosition): boolean; } export type CachedContent = { query: string; range: IRange | null; }; export type Uri = string; export type GraphQLFileMetadata = { filePath: Uri; size: number; mtime: number; }; export type GraphQLFileInfo = { filePath: Uri; content: string; asts: DocumentNode[]; queries: CachedContent[]; size: number; mtime: number; }; export type GraphQLLanguageServiceOptions = { experimentalFragmentArguments?: boolean; }; export type ArgumentInfo = Pick; export type AllTypeInfo = { type: Maybe; parentType: Maybe; inputType: Maybe; directiveDef: Maybe; fieldDef: Maybe>; enumValue: Maybe; argDef: Maybe; argDefs: Maybe; objectFieldDefs: Maybe; inputObjectType: Maybe; interfaceDef: Maybe; objectTypeDef: Maybe; }; export type FragmentInfo = { filePath?: Uri; content: string; definition: FragmentDefinitionNode; }; export type NamedTypeInfo = { filePath?: Uri; content: string; definition: NamedTypeNode; }; export type ObjectTypeInfo = { filePath?: Uri; content: string; definition: TypeDefinitionNode; }; export type Diagnostic = DiagnosticType & { message: string; }; export type CompletionItemBase = { label: string; isDeprecated?: boolean; }; export type CompletionItem = CompletionItemType & { isDeprecated?: boolean; documentation?: string | null; deprecationReason?: string | null; type?: GraphQLType; command?: CompletionItemType['command']; rawInsert?: string; }; export type Definition = { path: Uri; position: IPosition; range?: IRange; id?: string; name?: string; language?: string; projectRoot?: Uri; locator?: string; }; export type TokenKind = 'keyword' | 'class-name' | 'constructor' | 'method' | 'param' | 'string' | 'whitespace' | 'plain' | 'type'; export type TextToken = { kind: TokenKind; value: string | NameNode; }; export type TokenizedText = TextToken[]; export type OutlineTree = { plainText?: string; tokenizedText?: TokenizedText; representativeName?: string; kind: string; startPosition: IPosition; endPosition?: IPosition; children: OutlineTree[]; }; export type Outline = { outlineTrees: OutlineTree[]; }; export interface FileEvent { uri: string; type: FileChangeType; } export declare const FileChangeTypeKind: { Created: number; Changed: number; Deleted: number; }; export type FileChangeTypeKind = { Created: 1; Changed: 2; Deleted: 3; }; export type FileChangeTypeKeys = keyof FileChangeTypeKind; export type FileChangeType = FileChangeTypeKind[FileChangeTypeKeys]; export declare namespace CompletionItemKind { const Text = 1; const Method = 2; const Function = 3; const Constructor = 4; const Field = 5; const Variable = 6; const Class = 7; const Interface = 8; const Module = 9; const Property = 10; const Unit = 11; const Value = 12; const Enum = 13; const Keyword = 14; const Snippet = 15; const Color = 16; const File = 17; const Reference = 18; const Folder = 19; const EnumMember = 20; const Constant = 21; const Struct = 22; const Event = 23; const Operator = 24; const TypeParameter = 25; } export type CompletionItemKind = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25; //# sourceMappingURL=types.d.ts.map