interface OutputOptions { /** Whether to output the `.ts` format when the CLI's standard output is piped to an output file. * @defaultValue `false` */ forceTSFormat?: boolean; /** Whether to disable the optimized output format for `.d.ts` files. * @defaultValue `false` */ disablePreprocessing?: boolean; /** The filename to write the cache file to. * @defaultValue The `tadaTurboLocation` configuration option */ output: string | undefined; /** The `tsconfig.json` to use for configurations and the TypeScript program. * @defaultValue A `tsconfig.json` in the current or any parent directory. */ tsconfig: string | undefined; /** Whether to disable terminal output when using the programmatic API. * @defaultValue `false` */ silent?: boolean; } /** Outputs the `gql.tada` output file manually. * * @remarks * Loads the schema from the specified `schema` configuration option and writes the output file * to the specified output location. * * @see {@link https://gql-tada.0no.co/reference/gql-tada-cli#generateoutput} */ declare function generateOutput(opts: OutputOptions): Promise; interface PersistedOptions { /** Whether to disable normalization of GraphQL documents in the output. * @defaultValue `false` * @remarks * Normalizing a GraphQL document means to parse then print them, which * removes comments and normalizes formatting. */ disableNormalization?: boolean; /** The `tsconfig.json` to use for configurations and the TypeScript program. * @defaultValue A `tsconfig.json` in the current or any parent directory. */ tsconfig: string | undefined; /** The filename to write the persisted JSON manifest to. * @defaultValue The `schema` configuration option */ output: string | undefined; /** Whether to fail instead of just logging a warning. */ failOnWarn: boolean; } /** Generates a JSON manifest file of all `graphql.persisted()` documents. * * @remarks * Scans your code for `graphql.persisted()` calls and generates a JSON * manifest file containing a mapping of document IDs to the GraphQL document strings. * * @see {@link https://gql-tada.0no.co/reference/gql-tada-cli#generatepersisted} */ declare function generatePersisted(opts: PersistedOptions): Promise; interface SchemaOptions { /** The filename to a `.graphql` SDL file, introspection JSON, or URL to a GraphQL API to introspect. */ input: string; /** Object of headers to send when introspection a GraphQL API. */ headers: Record | undefined; /** The filename to write the GraphQL SDL file to. * @defaultValue The `schema` configuration option */ output: string | undefined; /** The `tsconfig.json` to use for configurations and the TypeScript program. * @defaultValue A `tsconfig.json` in the current or any parent directory. */ tsconfig: string | undefined; /** Whether to disable terminal output when using the programmatic API. * @defaultValue `false` */ silent?: boolean; } /** Generates a GraphQL SDL file from a given GraphQL API URL or schema file. * * @remarks * Introspects a targeted GraphQL API by URL, a `.graphql` SDL or introspection * JSON file, and outputs a `.graphql` SDL file. * * @see {@link https://gql-tada.0no.co/reference/gql-tada-cli#generateschema} */ declare function generateSchema(opts: SchemaOptions): Promise; interface TurboOptions { /** Whether to fail instead of just logging a warning. */ failOnWarn: boolean; /** The `tsconfig.json` to use for configurations and the TypeScript program. * @defaultValue A `tsconfig.json` in the current or any parent directory. */ tsconfig: string | undefined; /** The filename to write the cache file to. * @defaultValue The `tadaTurboLocation` configuration option */ output: string | undefined; } /** Generates a cache typings file for all GraphQL document types ahead of time. * * @remarks * The `generateTurbo()` function generates a cache for all GraphQL document types ahead of time. * This cache speeds up type evaluation and is especially useful when it's checked into the * repository after making changes to GraphQL documents, which speeds up all further type * checks and evaluation. * * @see {@link https://gql-tada.0no.co/reference/gql-tada-cli#generateturbo} */ declare function generateTurbo(opts: TurboOptions): Promise; type ScanFormat = 'json'; interface ScanOptions { /** The `tsconfig.json` to use for configurations and the TypeScript program. */ tsconfig: string | undefined; /** When `json`, write the JSON report; otherwise show the terminal report. */ format: ScanFormat | undefined; /** When set, output the pure relationship graph (implies machine output). */ graph: boolean; /** Where to write machine output to. Defaults to standard output. */ output: string | undefined; /** Whether to fail with a non-zero exit code if any warnings are reported. */ failOnWarn: boolean; } /** Scans a project for all GraphQL documents and fragments, keys them to the * schema, and emits a JSON report (when piped or given `--output`) or a * human-readable terminal report. * * @see {@link https://gql-tada.0no.co/reference/gql-tada-cli#scan} */ declare function scan(opts: ScanOptions): Promise; declare const api_generateOutput: typeof generateOutput; declare const api_generatePersisted: typeof generatePersisted; declare const api_generateSchema: typeof generateSchema; declare const api_generateTurbo: typeof generateTurbo; declare const api_scan: typeof scan; declare namespace api { export { api_generateOutput as generateOutput, api_generatePersisted as generatePersisted, api_generateSchema as generateSchema, api_generateTurbo as generateTurbo, api_scan as scan, }; } declare function _main(): Promise; type MainFn = typeof _main & typeof api; declare const main: MainFn; export { main as default, generateOutput, generatePersisted, generateSchema, generateTurbo, scan };