import type { GqlOperationProjection } from './types.js'; import type { GqlOperation } from '../../../gql/operation/GqlOperation.js'; import type { ContentSettings } from '../../ContentSettings.js'; import type { GeneratedDefinition } from '../../GeneratedValue.js'; import type { GeneratedValue } from '../../GeneratedValue.js'; import type { GenerateContextType, InsertGqlOperationArgs } from '../../../context/generateTypes.js'; /** * The `insertOperation` call plus the context. The Driver defaults * `variant` to `'main'` and `noExport` to `false`, and reads the caller's * options once for the identity statics and the constructor. */ type CreateGqlOperationArgs = InsertGqlOperationArgs & { context: GenerateContextType; }; /** * Driver for the GraphQL operation insertion lifecycle. * * GraphQL counterpart to {@link OasOperationDriver}: resolves the * projection's identifier and export path, looks up an existing * `Definition` in the target file, instantiates the projection when no * cache hit exists, registers the new definition, and stitches an import * into `destinationPath` if it differs from the projection's `exportPath`. */ export declare class GqlOperationDriver { context: GenerateContextType; projection: GqlOperationProjection; operation: GqlOperation; settings: ContentSettings; destinationPath?: string; definition: GeneratedDefinition; noExport: boolean; variant: string; /** The caller's options, as passed to `insertOperation`. */ options: ProjectionOptions; constructor(args: CreateGqlOperationArgs); private apply; /** * Ensure the file at `path` exists, creating it on first write through * the projection's language — the static read off the projection class * at the use site, never persisted (works pre-construction on the * cache-hit path). Returns the normalized path. */ private ensureFile; private getDefinition; private affirmDefinition; } export {};