import { TransformerFactory, SourceFile } from 'typescript'; import SchemaId from './schemaId'; import { JsonSchemaDraft04 } from './jsonSchemaDraft04'; import { JsonSchemaDraft07 } from './jsonSchemaDraft07'; export declare type JsonSchema = JsonSchemaDraft04.Schema | JsonSchemaDraft07.Schema; export declare type JsonSchemaObject = JsonSchemaDraft04.Schema | JsonSchemaDraft07.SchemaObject; export declare type SchemaType = 'Draft04' | 'Draft07'; export interface Schema { type: SchemaType; openApiVersion?: 2 | 3; id: SchemaId; content: JsonSchema; rootSchema?: Schema; } export declare function parseSchema(content: JsonSchema, url?: string): Schema; export declare function readSchemaFromStdin(): Promise; export declare function readSchemasFromFile(pattern: string): Promise; export declare function readSchemaFromUrl(url: string): Promise; export declare function parseFileContent(content: string, filename?: string): JsonSchema; export interface PluginContext { option: boolean | Record; inputSchemas: Iterator<[string, Schema]>; } export declare type PreProcessHandler = (contents: Schema[]) => Schema[]; export declare type Plugin = { meta: { name: string; version: string; description?: string; }; preProcess?: (context: PluginContext) => Promise; postProcess?: (context: PluginContext) => Promise | undefined>; }; export declare function loadPlugin(name: string, option: boolean | Record): Promise;