@autobe/compiler
Version:
AI backend server code generator
31 lines (30 loc) • 1.57 kB
TypeScript
import { AutoBeOpenApi, IAutoBeInterfaceCompiler } from "@autobe/interface";
import { OpenApi } from "@samchon/openapi";
/**
* Custom Interface compiler that handles API specification and NestJS
* application generation.
*
* This compiler transforms validated {@link AutoBeOpenApi.IDocument} AST
* structures into comprehensive NestJS projects through a sophisticated
* multi-stage transformation pipeline. The Interface compiler bridges the gap
* between database design and application implementation, ensuring perfect
* alignment with business requirements and database schemas.
*
* The compiler leverages NestiaMigrateApplication for robust NestJS project
* generation and HttpMigration for bidirectional conversion between AutoBE AST
* and standard OpenAPI formats. All generated TypeScript code is automatically
* formatted with Prettier and organized with proper import sorting for
* production-ready quality.
*
* Key capabilities include generating complete NestJS applications with
* controllers, DTOs, client SDKs, and E2E test scaffolds, all enhanced with
* keyworded parameter optimization for AI consumption and comprehensive
* documentation derived from AST descriptions.
*
* @author Samchon
*/
export declare class AutoBeInterfaceCompiler implements IAutoBeInterfaceCompiler {
write(document: AutoBeOpenApi.IDocument, exclude: string[]): Promise<Record<string, string>>;
transform(document: AutoBeOpenApi.IDocument): Promise<OpenApi.IDocument>;
invert(document: OpenApi.IDocument): Promise<AutoBeOpenApi.IDocument>;
}