export declare enum ErrorType { CONFIG_NOT_FOUND = "CONFIG_NOT_FOUND", CONFIG_PARSE_ERROR = "CONFIG_PARSE_ERROR", CONFIG_VALIDATION_ERROR = "CONFIG_VALIDATION_ERROR", INVALID_PRESET = "INVALID_PRESET", INVALID_INPUT_TYPE = "INVALID_INPUT_TYPE", MISSING_REQUIRED_FIELD = "MISSING_REQUIRED_FIELD", INPUT_DOCUMENT_ERROR = "INPUT_DOCUMENT_ERROR", GENERATOR_ERROR = "GENERATOR_ERROR", UNKNOWN_ERROR = "UNKNOWN_ERROR", UNSUPPORTED_LANGUAGE = "UNSUPPORTED_LANGUAGE", MISSING_INPUT_DOCUMENT = "MISSING_INPUT_DOCUMENT", MISSING_PAYLOAD = "MISSING_PAYLOAD", MISSING_PARAMETER = "MISSING_PARAMETER", CIRCULAR_DEPENDENCY = "CIRCULAR_DEPENDENCY", DUPLICATE_GENERATOR_ID = "DUPLICATE_GENERATOR_ID", UNSUPPORTED_PRESET_FOR_INPUT = "UNSUPPORTED_PRESET_FOR_INPUT" } export interface CodegenErrorDetails { type: ErrorType; message: string; help?: string; details?: string; } export declare class CodegenError extends Error { readonly type: ErrorType; readonly help?: string; readonly details?: string; constructor({ type, message, help, details }: CodegenErrorDetails); /** * Format the error message for display to users * @param useColors Whether to use colored output */ format(useColors?: boolean): string; } /** * Helper functions to create specific error types */ export declare function createConfigNotFoundError(options?: { filePath?: string; searchLocations?: string[]; }): CodegenError; export declare function createConfigParseError(options: { filePath: string; originalError: Error; }): CodegenError; export declare function createInvalidPresetError(options: { preset: string; language: string; }): CodegenError; export declare function createInvalidInputTypeError(options: { inputType: string; }): CodegenError; export declare function createMissingRequiredFieldError(options: { field: string; location?: string; }): CodegenError; export declare function createConfigValidationError(options: { validationErrors: string[]; }): CodegenError; export declare function createInputDocumentError(options: { inputPath: string; inputType: string; errorMessage: string; }): CodegenError; export declare function createRemoteFetchError(options: { url: string; status?: number; statusText?: string; cause?: unknown; reason?: 'timeout' | 'network' | 'http'; }): CodegenError; export declare function createGeneratorError(options: { generatorId: string; originalError: Error; }): CodegenError; export declare function createUnsupportedLanguageError(options: { preset: string; language: string; }): CodegenError; export declare function createMissingInputDocumentError(options: { expectedType: 'asyncapi' | 'openapi' | 'jsonschema'; generatorPreset?: string; }): CodegenError; export declare function createMissingPayloadError(options: { channelOrOperation: string; protocol?: string; }): CodegenError; export declare function createMissingParameterError(options: { channelOrOperation: string; protocol?: string; }): CodegenError; export declare function createCircularDependencyError(options?: { generatorIds?: string[]; }): CodegenError; export declare function createDuplicateGeneratorIdError(options: { duplicateIds: string[]; }): CodegenError; export declare function createUnsupportedPresetForInputError(options: { preset: string; inputType: string; supportedPresets: string[]; }): CodegenError; export declare function createMissingDependencyOutputError(options: { generatorPreset: string; dependencyName: string; }): CodegenError; /** * Parse Zod validation errors and convert them to user-friendly messages */ export declare function parseZodErrors(zodError: any): string[];