import { ExportedType } from '@anttiviljami/dtsgenerator/dist/core/dtsGenerator'; import { OpenAPIV3, OpenAPIV3_1 } from 'openapi-types'; declare enum HttpMethod { GET = "get", PUT = "put", POST = "post", PATCH = "patch", DELETE = "delete", OPTIONS = "options", HEAD = "head", TRACE = "trace" } interface Operation extends OpenAPIV3.OperationObject { path: string; method: HttpMethod; } type Document = OpenAPIV3.Document | OpenAPIV3_1.Document; type GeneratedTypes = { [K in `${T}PathParams` | `${T}QueryParams` | `${T}RequestBody` | `${T}ResponseType` | `${T}ErrorType`]: string; }; declare class OpenapiRequestGenerator { protected openapiDocument: Document; constructor(openapiDocument: any); generateFile({ fileName }: { fileName?: string; }): Promise; generateRequestsFromSchema: () => Promise<{ metadata: { id: string; pathParametersType: string | undefined; queryParametersType: string | undefined; requestBodyType: string | undefined; errorType: string; responseType: string; path: string; method: string; }[]; schemaTypes: string; generatedTypes: string[]; generatedRequests: string[]; }>; static generateHyperFetchRequest({ id, path, method }: { id: string; path: string; method: string; }, types: Record): string; static generateTypes({ id, pathParametersType, queryParametersType, requestBodyType, errorType, responseType, }: { id: string; pathParametersType: string | undefined; queryParametersType: string | undefined; requestBodyType: string | undefined; errorType: string; responseType: string; }): GeneratedTypes; static generateMethodMetadata(operation: { operationId: string; path: string; method: string; } & Partial, exportTypes: ExportedType[]): { id: string; pathParametersType: string | undefined; queryParametersType: string | undefined; requestBodyType: string | undefined; errorType: string; responseType: string; path: string; method: string; }; static validateSchema(openapiDocument: Document): void; static prepareSchema(openapiDocument: Document): Promise<{ schemaTypes: string; exportedTypes: ExportedType[]; }>; } declare function getAvailableOperations(openApiJson: OpenAPIV3.Document | OpenAPIV3_1.Document): ({ operationId: string; } & Operation)[]; export { type Document, type GeneratedTypes, OpenapiRequestGenerator, type Operation, getAvailableOperations };