import { validateConfigPath, validateInputPath, validateOutputPath } from './config-core.js'; export { validateConfigPath, validateInputPath, validateOutputPath }; export interface Config { /** Path to the OpenAPI 3.1 spec file (JSON or YAML) */ input_openapi: string; /** Path to user-owned Zod schema file (.ts). Optional. Bootstrapped on first run if absent. */ input_schema?: string; /** Directory to write generated files */ output: string; /** Base URL prefix for generated fetch client (default: '') */ baseUrl?: string; /** When true, generates server.ts with a createServerClient() factory for Next.js RSC (default: false) */ server_client?: boolean; /** * When set, schema-less error bodies in the generated client are cast to this type. * Use 'laravel' to emit the built-in LaravelValidationError type alongside ApiError. * Any other non-empty string is used as a type name; pair with error_body_type_import * to emit an import, or omit it to treat the type as ambient/global. */ error_body_type?: string; /** * Module path for the custom error body type. Only used when error_body_type is set to a * value other than 'laravel'. When provided, the generator emits * `import type { TypeName } from 'importPath'` at the top of the generated client. * Ignored when error_body_type is absent or 'laravel'. */ error_body_type_import?: string; /** * Controls how schema drift is handled when input_schema is configured. * 'warn' (default): log warnings to stderr and continue (exit 0). * 'error': throw an error and exit non-zero when drift is detected. * Omit this field to keep the default warn-only behavior. */ drift?: 'error' | 'warn'; } /** * Typed identity helper for config files. Provides autocomplete in JS/TS config files. * * Example (openapi-zod-ts.config.mjs): * import { defineConfig } from 'openapi-zod-ts' * export default defineConfig({ input_openapi: './openapi.json', output: './src/api' }) */ export declare function defineConfig(config: Config): Config; /** * Typed helper for multi-spec config files. Use in JS/TS config files to get * autocomplete and type-checking for each project entry. * * Example (openapi-zod-ts.config.mjs): * import { defineProjects } from 'openapi-zod-ts' * export default defineProjects([ * { input_openapi: './services/users.json', output: './src/users' }, * { input_openapi: './services/orders.json', output: './src/orders' }, * ]) */ export declare function defineProjects(configs: Config[]): { projects: Config[]; }; export declare function loadConfig(cwd: string, configPath?: string): Promise; /** * Load a config file and return all configs as a normalized array. * * Single-spec config: returns a one-element array. * Multi-spec config with "projects" key: returns N-element array. * * This is the preferred API for generator call sites that need to handle * both single-spec and multi-spec configs uniformly. */ export declare function loadConfigs(cwd: string, configPath?: string): Promise; //# sourceMappingURL=config.d.ts.map