/// import { EventEmitter } from 'events'; import type { GraphQLProjectConfig, GraphQLConfig } from 'graphql-config'; import type { Fragment, Operation } from 'graphql-tool-utilities'; import type { GraphQLFilesystem } from './filesystem'; import { AbstractGraphQLFilesystem } from './filesystem'; import type { PrintDocumentOptions, PrintSchemaOptions } from './print'; import { EnumFormat, EnumStyle, ExportFormat } from './types'; export type { GraphQLFilesystem }; export { AbstractGraphQLFilesystem, EnumFormat, EnumStyle, ExportFormat }; export interface Options extends PrintDocumentOptions, PrintSchemaOptions { addTypename: boolean; schemaTypesPath: string; config?: GraphQLConfig; getProjectFilePaths?: (projectConfig: GraphQLProjectConfig) => Promise; } export interface BuilderOptions extends Options { cwd?: string; } export interface RunOptions { watch?: boolean; graphQLFilesystem?: GraphQLFilesystem | undefined; } export interface SchemaBuild { schemaPath: string; schemaTypesPath: string; } export interface DocumentBuild { documentPath: string; definitionPath: string; operation?: Operation; fragments: Fragment[]; } export declare class Builder extends EventEmitter { private readonly options; private readonly config; private readonly documentMapByProject; private filesystem; private readonly schemaCache; private activeDocumentTypesJobId; constructor({ cwd, ...options }: BuilderOptions); once(event: 'error', handler: (error: Error) => void): this; once(event: 'build:docs', handler: (built: DocumentBuild) => void): this; once(event: 'build:schema', handler: (built: SchemaBuild) => void): this; once(event: 'start:docs' | 'end:docs' | 'start:schema' | 'end:schema', handler: () => void): this; on(event: 'error', handler: (error: Error) => void): this; on(event: 'build:docs', handler: (built: DocumentBuild) => void): this; on(event: 'build:schema', handler: (built: SchemaBuild) => void): this; on(event: 'start:docs' | 'end:docs' | 'start:schema' | 'end:schema', handler: () => void): this; emit(event: 'error', error: Error): boolean; emit(event: 'build:docs', built: DocumentBuild): boolean; emit(event: 'build:schema', built: SchemaBuild): boolean; emit(event: 'start:docs' | 'end:docs' | 'start:schema' | 'end:schema'): boolean; run({ watch: watchGlobs, graphQLFilesystem }?: RunOptions): Promise; stop(): void; private handleDocumentUpdate; private handleDocumentDelete; private handleSchemaUpdate; private generateSchemaTypes; private isDocumentTypesJobCancelled; private generateDocumentTypes; private _generateDocumentTypes; private checkForDuplicateOperations; private checkForDuplicateFragments; private generateDocumentTypesForProject; private writeDocumentFile; private getDocumentDefinition; private updateDocumentsForProject; private updateDocumentForFile; private setDocumentForFilePath; private getSchema; } //# sourceMappingURL=index.d.ts.map