import { AutoBeInterfaceAuthorization } from "../histories"; import { AutoBeOpenApi } from "../openapi/AutoBeOpenApi"; import { AutoBeCompleteEventBase } from "./base/AutoBeCompleteEventBase"; /** * Event fired when the Interface agent completes the RESTful API design process * and generates the complete NestJS application. * * This event represents the successful completion of the sophisticated * multi-stage transformation pipeline that converts validated AST structures * into comprehensive API specifications and production-ready NestJS code. The * completion marks the transition from API design to implementation-ready * artifacts that maintain perfect alignment with business requirements and * database schemas. * * The Interface agent's completion ensures that API designs are syntactically * perfect and semantically aligned with business requirements, ready for * immediate deployment or further customization in the development workflow. * * @author Samchon */ export interface AutoBeInterfaceCompleteEvent extends AutoBeCompleteEventBase<"interfaceComplete"> { /** * The complete OpenAPI document containing the finalized API specification. * * Contains the validated {@link AutoBeOpenApi.IDocument} AST structure that * defines all API endpoints, operations, schemas, and business logic. This * document represents the culmination of the API design process, * incorporating comprehensive business logic integration, type safety bridges * with Prisma schemas, and security pattern validation. * * The document serves as the authoritative API specification that has been * converted from the internal AST format to formal OpenAPI standards, ready * for code generation and integration with the broader development * ecosystem. */ document: AutoBeOpenApi.IDocument; /** * JWT-based authentication and authorization operations generated for each * user role. * * Contains role-specific authentication API operations including essential * flows (join, login, validate, changePassword, refresh) plus additional * operations based on Prisma schema capabilities like email verification and * password reset. These operations are generated by analyzing the database * schema to determine which authentication features are supported for each * role. */ authorizations: AutoBeInterfaceAuthorization[]; /** * Array of schema type names that are referenced but not yet implemented in * components.schemas. * * When this array is not empty, it indicates critical missing type * definitions that will cause cascading failures throughout the entire * compilation pipeline: * * - Interface compilation will fail due to unresolved type references * - Test code generation will fail due to missing DTO types * - Realize agent cannot implement endpoints without proper type definitions * - TypeScript compilation will ultimately fail with "Cannot find name" errors * * This represents a fundamental incompleteness in the OpenAPI specification * that must be resolved before any subsequent development phases can proceed. * The Interface agent will attempt to automatically generate these missing * schemas through the complement process. */ missed: string[]; }