/** * Parameters for executing graphql-codegen with preset plugins. * All file paths are workspace-relative and will be validated for path safety and containment * within workspaceRoot. * @example * ```typescript * const params: ICodegenBuilderParams = { * workspaceRoot: '/workspace', * schemaFile: 'dist/schema.graphql', * documentsGlob: 'src/**\/*.graphql', * outputFile: 'src/generated/graphql.ts', * target: 'typescript', * plugins: ['typescript', 'typescript-operations'], * config: { namingConvention: 'keep', immutableTypes: false } * }; * ``` */ export interface ICodegenBuilderParams { /** The workspace root directory (absolute path), used to validate path containment. */ workspaceRoot: string; /** Schema file path (relative to workspace root or glob pattern). */ schemaFile: string; /** Documents glob pattern for GraphQL operation files (relative to workspace root). */ documentsGlob: string; /** Output file path for generated code (relative to workspace root). */ outputFile: string; /** Target platform ('typescript' is currently the only supported target). */ target: 'typescript'; /** List of plugin names to use. */ plugins: string[]; /** Configuration object to merge with defaults. */ config: Record; /** Optional watch mode flag. */ watch?: boolean; } /** * Executes graphql-codegen with validated paths and preconfigured plugin stack. * Enforces path containment within workspace root via the same {@link validatePath} helper used * by the build-schema executor, so both executors share identical, symlink-aware guarantees. * @param params - Codegen parameters (schemaFile, documentsGlob, outputFile must be workspace-relative). * @throws {ExecutorError} If paths are invalid (absolute, traversal, or escape workspaceRoot) or the target is unsupported. * @example * ```typescript * await executeCodegen({ * workspaceRoot: '/workspace', * schemaFile: 'dist/schema.graphql', * documentsGlob: 'src/**\/*.graphql', * outputFile: 'src/generated/graphql.ts', * target: 'typescript', * plugins: ['typescript', 'typescript-operations'], * config: { namingConvention: 'keep', immutableTypes: false } * }); * ``` */ export declare function executeCodegen(params: ICodegenBuilderParams): Promise; /** * Returns the default plugin list for TypeScript code generation. * @returns Array of plugin names used in the preset TypeScript stack. * @example * ```typescript * const plugins = getDefaultPluginsForTarget(); * // ['typescript', 'typescript-operations', 'typed-document-node', 'typescript-apollo-client-helpers', '@pawells/graphql-codegen-ts'] * ``` */ export declare function getDefaultPluginsForTarget(): string[]; /** * Returns the default configuration object for graphql-codegen TypeScript generation. * @returns Default config: { namingConvention: 'keep', immutableTypes: false } * @example * ```typescript * const config = getDefaultConfig(); * // { namingConvention: 'keep', immutableTypes: false } * ``` */ export declare function getDefaultConfig(): Record; //# sourceMappingURL=codegen-builder.d.ts.map