@autobe/agent 0.18.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AutoBeMockAgent.d.ts +2 -10
- package/lib/agent/src/AutoBeAgent.js +8 -2
- package/lib/agent/src/AutoBeAgent.js.map +1 -1
- package/lib/agent/src/AutoBeMockAgent.d.ts +2 -10
- package/lib/agent/src/AutoBeMockAgent.js +10 -5
- package/lib/agent/src/AutoBeMockAgent.js.map +1 -1
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +23 -29
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.js.map +1 -1
- package/lib/agent/src/context/AutoBeContext.d.ts +1 -0
- package/lib/agent/src/context/AutoBeTokenUsageComponent.d.ts +1 -0
- package/lib/agent/src/context/AutoBeTokenUsageComponent.js +14 -0
- package/lib/agent/src/context/AutoBeTokenUsageComponent.js.map +1 -1
- package/lib/agent/src/factory/consentFunctionCall.d.ts +10 -0
- package/lib/agent/src/factory/consentFunctionCall.js +213 -0
- package/lib/agent/src/factory/consentFunctionCall.js.map +1 -0
- package/lib/agent/src/factory/createAgenticaHistory.js +1 -0
- package/lib/agent/src/factory/createAgenticaHistory.js.map +1 -1
- package/lib/agent/src/factory/createAutoBeContext.js +79 -19
- package/lib/agent/src/factory/createAutoBeContext.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.d.ts +6 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js +41 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +12 -9
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +3 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +45 -31
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js +25 -6
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +8 -3
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js +15 -12
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js +33 -44
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -4
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js +10 -4
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +16 -16
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +5 -5
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js +45 -45
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +14 -14
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js +31 -30
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +24 -31
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js +4 -4
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js +27 -26
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +13 -12
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js +4 -4
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +11 -10
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +36 -29
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js +31 -9
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +2 -2
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js +1571 -1144
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js +24 -4
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js +6 -2
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.d.ts +2 -2
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js +12 -14
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js +103 -71
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +2 -3
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +147 -116
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js +401 -233
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +2 -5
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js +362 -178
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +38 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +16 -16
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +97 -14
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +75 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +46 -14
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +18 -24
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.d.ts +7 -0
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js +35 -0
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +60 -66
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +19 -30
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js +38 -35
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +39 -26
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js +15 -4
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -2
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js +7 -9
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js +38 -2
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js +61 -10
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js +68 -24
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js +24 -21
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +59 -57
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js +17 -13
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +287 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +5 -2
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js +46 -49
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.d.ts +7 -0
- package/lib/agent/src/orchestrate/realize/internal/{compile.js → compileRealizeFiles.js} +12 -29
- package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js +76 -45
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js +15 -9
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +9 -7
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.d.ts +9 -6
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +25 -20
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.d.ts +0 -66
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.d.ts +8 -6
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +36 -27
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +3 -3
- package/lib/agent/src/orchestrate/{internal/IProgress.js → realize/structures/IAutoBeRealizeCorrectApplication.js} +1 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +19 -16
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js +5 -1
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js +13 -10
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js +17 -16
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js +33 -32
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.d.ts +2 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +97 -49
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +3 -3
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTest.js +17 -4
- package/lib/agent/src/orchestrate/test/orchestrateTest.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js +18 -9
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js +138 -23
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js +17 -17
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +7 -6
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.d.ts +6 -0
- package/lib/agent/src/orchestrate/{realize/structures/IAutoBeRealizeCoderApplication.js → test/structures/IAutoBeTestScenarioAuthorizationRole.js} +1 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -2
- package/lib/agent/src/utils/executeCachedBatch.d.ts +1 -0
- package/lib/agent/src/utils/executeCachedBatch.js +23 -0
- package/lib/agent/src/utils/executeCachedBatch.js.map +1 -0
- package/lib/agent/src/utils/predicateStateMessage.d.ts +4 -0
- package/lib/agent/src/utils/predicateStateMessage.js +87 -0
- package/lib/agent/src/utils/predicateStateMessage.js.map +1 -0
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +23 -29
- package/lib/context/AutoBeContext.d.ts +1 -0
- package/lib/context/AutoBeTokenUsageComponent.d.ts +1 -0
- package/lib/factory/consentFunctionCall.d.ts +10 -0
- package/lib/index.mjs +4799 -2637
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.d.ts +6 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +3 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +8 -3
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -4
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +16 -16
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +5 -5
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +2 -2
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.d.ts +2 -2
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +2 -3
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +2 -5
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +38 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +16 -16
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +97 -14
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +75 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +46 -14
- package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +18 -24
- package/lib/orchestrate/interface/utils/validateAuthorizationSchema.d.ts +7 -0
- package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -2
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +1 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +3 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +5 -2
- package/lib/orchestrate/realize/internal/compileRealizeFiles.d.ts +7 -0
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +9 -6
- package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +0 -66
- package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +8 -6
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +3 -3
- package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +19 -16
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.d.ts +2 -1
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +7 -6
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +1 -1
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.d.ts +6 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -2
- package/lib/utils/executeCachedBatch.d.ts +1 -0
- package/lib/utils/predicateStateMessage.d.ts +4 -0
- package/package.json +6 -6
- package/src/AutoBeAgent.ts +18 -3
- package/src/AutoBeMockAgent.ts +13 -15
- package/src/constants/AutoBeSystemPromptConstant.ts +23 -29
- package/src/context/AutoBeContext.ts +1 -0
- package/src/context/AutoBeTokenUsageComponent.ts +20 -0
- package/src/factory/consentFunctionCall.ts +129 -0
- package/src/factory/createAgenticaHistory.ts +1 -0
- package/src/factory/createAutoBeContext.ts +108 -20
- package/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.ts +53 -0
- package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +13 -10
- package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +68 -47
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +33 -21
- package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +21 -10
- package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +18 -40
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +15 -8
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +16 -16
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +5 -5
- package/src/orchestrate/interface/histories/transformInterfaceAssetHistories.ts +47 -47
- package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +14 -14
- package/src/orchestrate/interface/histories/transformInterfaceComplementHistories.ts +31 -30
- package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +20 -29
- package/src/orchestrate/interface/histories/transformInterfaceGroupHistories.ts +3 -3
- package/src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts +23 -22
- package/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.ts +12 -11
- package/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.ts +5 -5
- package/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.ts +11 -10
- package/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts +37 -30
- package/src/orchestrate/interface/orchestrateInterface.ts +53 -12
- package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +142 -32
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +2 -0
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +13 -9
- package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +8 -19
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +82 -74
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +51 -32
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +174 -56
- package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +149 -63
- package/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.ts +39 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.ts +16 -16
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +101 -14
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +77 -1
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.ts +47 -14
- package/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.ts +18 -24
- package/src/orchestrate/interface/utils/validateAuthorizationSchema.ts +41 -0
- package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +61 -66
- package/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.ts +19 -30
- package/src/orchestrate/prisma/histories/transformPrismaReviewHistories.ts +38 -35
- package/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.ts +36 -23
- package/src/orchestrate/prisma/orchestratePrisma.ts +17 -6
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +8 -19
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +3 -0
- package/src/orchestrate/prisma/orchestratePrismaReview.ts +37 -18
- package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +25 -17
- package/src/orchestrate/realize/histories/transformRealizeAuthorization.ts +24 -21
- package/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.ts +57 -59
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +20 -14
- package/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.ts +294 -0
- package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +62 -57
- package/src/orchestrate/realize/internal/compileRealizeFiles.ts +71 -0
- package/src/orchestrate/realize/orchestrateRealize.ts +109 -86
- package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +22 -13
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +3 -0
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +28 -24
- package/src/orchestrate/realize/orchestrateRealizeScenario.ts +0 -74
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +37 -28
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +3 -3
- package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +19 -16
- package/src/orchestrate/realize/utils/replaceImportStatements.ts +7 -0
- package/src/orchestrate/test/compile/completeTestCode.ts +17 -13
- package/src/orchestrate/test/experimental/transformTestCorrectHistories.ast +4 -4
- package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +17 -16
- package/src/orchestrate/test/histories/transformTestHistories.ts +35 -34
- package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +116 -60
- package/src/orchestrate/test/histories/transformTestWriteHistories.ts +3 -3
- package/src/orchestrate/test/orchestrateTest.ts +18 -8
- package/src/orchestrate/test/orchestrateTestCorrect.ts +34 -24
- package/src/orchestrate/test/orchestrateTestScenario.ts +179 -36
- package/src/orchestrate/test/orchestrateTestWrite.ts +18 -19
- package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +7 -6
- package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +1 -1
- package/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.ts +7 -0
- package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +2 -2
- package/src/utils/executeCachedBatch.ts +15 -0
- package/src/utils/predicateStateMessage.ts +107 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +0 -4
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js +0 -46
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/internal/IProgress.d.ts +0 -4
- package/lib/agent/src/orchestrate/internal/IProgress.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.d.ts +0 -7
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.js +0 -213
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/internal/compile.d.ts +0 -7
- package/lib/agent/src/orchestrate/realize/internal/compile.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +0 -345
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +0 -56
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.js +0 -3
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.d.ts +0 -2
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js +0 -5
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.js +0 -3
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.js.map +0 -1
- package/lib/agent/src/utils/pipe.d.ts +0 -5
- package/lib/agent/src/utils/pipe.js +0 -14
- package/lib/agent/src/utils/pipe.js.map +0 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +0 -4
- package/lib/orchestrate/internal/IProgress.d.ts +0 -4
- package/lib/orchestrate/realize/histories/transformRealizeCoderHistories.d.ts +0 -7
- package/lib/orchestrate/realize/internal/compile.d.ts +0 -7
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +0 -345
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +0 -56
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.d.ts +0 -2
- package/lib/utils/pipe.d.ts +0 -5
- package/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.ts +0 -53
- package/src/orchestrate/internal/IProgress.ts +0 -4
- package/src/orchestrate/realize/histories/transformRealizeCoderHistories.ts +0 -248
- package/src/orchestrate/realize/internal/compile.ts +0 -84
- package/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.ts +0 -358
- package/src/orchestrate/realize/structures/IAutoBeRealizeCompile.ts +0 -70
- package/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.ts +0 -2
- package/src/utils/pipe.ts +0 -39
- /package/lib/agent/src/orchestrate/realize/structures/{IAutoBeRealizeReviewApplication.d.ts → IAutoBeRealizeCorrectApplication.d.ts} +0 -0
- /package/lib/orchestrate/realize/structures/{IAutoBeRealizeReviewApplication.d.ts → IAutoBeRealizeCorrectApplication.d.ts} +0 -0
- /package/src/orchestrate/realize/structures/{IAutoBeRealizeReviewApplication.ts → IAutoBeRealizeCorrectApplication.ts} +0 -0
|
@@ -48,14 +48,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
48
48
|
exports.orchestrateInterfaceSchemas = orchestrateInterfaceSchemas;
|
|
49
49
|
const __typia_transform__accessExpressionAsString = __importStar(require("typia/lib/internal/_accessExpressionAsString.js"));
|
|
50
50
|
const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
|
|
51
|
+
const __typia_transform__llmApplicationFinalize = __importStar(require("typia/lib/internal/_llmApplicationFinalize.js"));
|
|
52
|
+
const utils_1 = require("@autobe/utils");
|
|
51
53
|
const OpenApiV3_1Emender_1 = require("@samchon/openapi/lib/converters/OpenApiV3_1Emender");
|
|
52
54
|
const typia_1 = __importDefault(require("typia"));
|
|
55
|
+
const uuid_1 = require("uuid");
|
|
53
56
|
const assertSchemaModel_1 = require("../../context/assertSchemaModel");
|
|
54
57
|
const divideArray_1 = require("../../utils/divideArray");
|
|
58
|
+
const executeCachedBatch_1 = require("../../utils/executeCachedBatch");
|
|
55
59
|
const transformInterfaceSchemaHistories_1 = require("./histories/transformInterfaceSchemaHistories");
|
|
56
60
|
const orchestrateInterfaceSchemasReview_1 = require("./orchestrateInterfaceSchemasReview");
|
|
61
|
+
const validateAuthorizationSchema_1 = require("./utils/validateAuthorizationSchema");
|
|
57
62
|
function orchestrateInterfaceSchemas(ctx_1, operations_1) {
|
|
58
|
-
return __awaiter(this, arguments, void 0, function* (ctx, operations, capacity =
|
|
63
|
+
return __awaiter(this, arguments, void 0, function* (ctx, operations, capacity = 8) {
|
|
64
|
+
var _a, _b;
|
|
59
65
|
const typeNames = new Set();
|
|
60
66
|
for (const op of operations) {
|
|
61
67
|
if (op.requestBody !== null)
|
|
@@ -75,24 +81,32 @@ function orchestrateInterfaceSchemas(ctx_1, operations_1) {
|
|
|
75
81
|
total: matrix.length,
|
|
76
82
|
completed: 0,
|
|
77
83
|
};
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
84
|
+
const roles = (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.roles.map((role) => role.name)) !== null && _b !== void 0 ? _b : [];
|
|
85
|
+
const x = roles.length > 0
|
|
86
|
+
? {
|
|
87
|
+
IAuthorizationToken: authTokenSchema,
|
|
88
|
+
}
|
|
89
|
+
: {};
|
|
90
|
+
for (const y of yield (0, executeCachedBatch_1.executeCachedBatch)(matrix.map((it) => (promptCacheKey) => __awaiter(this, void 0, void 0, function* () {
|
|
91
|
+
const row = yield divideAndConquer(ctx, operations, it, 3, progress, promptCacheKey);
|
|
92
|
+
const newbie = yield (0, orchestrateInterfaceSchemasReview_1.orchestrateInterfaceSchemasReview)(ctx, operations, row, reviewProgress);
|
|
93
|
+
return Object.assign(Object.assign({}, row), newbie);
|
|
82
94
|
})))) {
|
|
83
95
|
Object.assign(x, y);
|
|
84
96
|
}
|
|
97
|
+
if (x.IAuthorizationToken)
|
|
98
|
+
x.IAuthorizationToken = authTokenSchema;
|
|
85
99
|
return x;
|
|
86
100
|
});
|
|
87
101
|
}
|
|
88
|
-
function divideAndConquer(ctx, operations, typeNames, retry, progress) {
|
|
102
|
+
function divideAndConquer(ctx, operations, typeNames, retry, progress, promptCacheKey) {
|
|
89
103
|
return __awaiter(this, void 0, void 0, function* () {
|
|
90
104
|
const remained = new Set(typeNames);
|
|
91
105
|
const schemas = {};
|
|
92
106
|
for (let i = 0; i < retry; ++i) {
|
|
93
107
|
if (remained.size === 0)
|
|
94
108
|
break;
|
|
95
|
-
const newbie = yield process(ctx, operations, schemas, remained, progress);
|
|
109
|
+
const newbie = yield process(ctx, operations, schemas, remained, progress, promptCacheKey);
|
|
96
110
|
for (const key of Object.keys(newbie)) {
|
|
97
111
|
schemas[key] = newbie[key];
|
|
98
112
|
remained.delete(key);
|
|
@@ -101,7 +115,7 @@ function divideAndConquer(ctx, operations, typeNames, retry, progress) {
|
|
|
101
115
|
return schemas;
|
|
102
116
|
});
|
|
103
117
|
}
|
|
104
|
-
function process(ctx, operations, oldbie, remained, progress) {
|
|
118
|
+
function process(ctx, operations, oldbie, remained, progress, promptCacheKey) {
|
|
105
119
|
return __awaiter(this, void 0, void 0, function* () {
|
|
106
120
|
var _a, _b, _c;
|
|
107
121
|
const already = Object.keys(oldbie);
|
|
@@ -121,25 +135,27 @@ function process(ctx, operations, oldbie, remained, progress) {
|
|
|
121
135
|
pointer,
|
|
122
136
|
}),
|
|
123
137
|
enforceFunctionCall: true,
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
138
|
+
promptCacheKey,
|
|
139
|
+
message: utils_1.StringUtil.trim `
|
|
140
|
+
Make type components please.
|
|
141
|
+
|
|
142
|
+
Here is the list of request/response bodies' type names from
|
|
143
|
+
OpenAPI operations. Make type components of them. If more object
|
|
144
|
+
types are required during making the components, please make them
|
|
145
|
+
too.
|
|
146
|
+
|
|
147
|
+
${Array.from(remained)
|
|
148
|
+
.map((k) => ` - \`${k}\``)
|
|
149
|
+
.join("\n")}${already.length !== 0
|
|
150
|
+
? utils_1.StringUtil.trim `
|
|
151
|
+
|
|
152
|
+
> By the way, here is the list of components schemas what you've
|
|
153
|
+
> already made. So, you don't need to make them again.
|
|
154
|
+
>
|
|
155
|
+
${already.map((k) => `> - \`${k}\``).join("\n")}
|
|
156
|
+
`
|
|
157
|
+
: ""}
|
|
158
|
+
`,
|
|
143
159
|
});
|
|
144
160
|
if (pointer.value === null)
|
|
145
161
|
throw new Error("Failed to create components.");
|
|
@@ -148,10 +164,11 @@ function process(ctx, operations, oldbie, remained, progress) {
|
|
|
148
164
|
}).schemas) !== null && _a !== void 0 ? _a : {};
|
|
149
165
|
ctx.dispatch({
|
|
150
166
|
type: "interfaceSchemas",
|
|
167
|
+
id: (0, uuid_1.v7)(),
|
|
151
168
|
schemas,
|
|
152
169
|
tokenUsage,
|
|
153
|
-
completed: (progress.completed += Object.keys(schemas).
|
|
154
|
-
total: progress.total,
|
|
170
|
+
completed: (progress.completed += Object.keys(schemas).length),
|
|
171
|
+
total: (progress.total += Object.keys(schemas).filter((k) => remained.has(k) === false).length),
|
|
155
172
|
step: (_c = (_b = ctx.state().prisma) === null || _b === void 0 ? void 0 : _b.step) !== null && _c !== void 0 ? _c : 0,
|
|
156
173
|
created_at: new Date().toISOString(),
|
|
157
174
|
});
|
|
@@ -160,7 +177,87 @@ function process(ctx, operations, oldbie, remained, progress) {
|
|
|
160
177
|
}
|
|
161
178
|
function createController(props) {
|
|
162
179
|
(0, assertSchemaModel_1.assertSchemaModel)(props.model);
|
|
163
|
-
const
|
|
180
|
+
const validate = (next) => {
|
|
181
|
+
const result = (() => { const _io0 = input => "string" === typeof input.draft && ("object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) && _io1(input.schemas)); const _io1 = input => Object.keys(input).every(key => {
|
|
182
|
+
const value = input[key];
|
|
183
|
+
if (undefined === value)
|
|
184
|
+
return true;
|
|
185
|
+
return "object" === typeof value && null !== value && _io2(value);
|
|
186
|
+
}); const _io2 = input => "string" === typeof input.description; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.draft || _report(_exceptionable, {
|
|
187
|
+
path: _path + ".draft",
|
|
188
|
+
expected: "string",
|
|
189
|
+
value: input.draft
|
|
190
|
+
}), ("object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) || _report(_exceptionable, {
|
|
191
|
+
path: _path + ".schemas",
|
|
192
|
+
expected: "Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>",
|
|
193
|
+
value: input.schemas
|
|
194
|
+
})) && _vo1(input.schemas, _path + ".schemas", true && _exceptionable) || _report(_exceptionable, {
|
|
195
|
+
path: _path + ".schemas",
|
|
196
|
+
expected: "Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>",
|
|
197
|
+
value: input.schemas
|
|
198
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
199
|
+
const value = input[key];
|
|
200
|
+
if (undefined === value)
|
|
201
|
+
return true;
|
|
202
|
+
return ("object" === typeof value && null !== value || _report(_exceptionable, {
|
|
203
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
204
|
+
expected: "AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>",
|
|
205
|
+
value: value
|
|
206
|
+
})) && _vo2(value, _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key), true && _exceptionable) || _report(_exceptionable, {
|
|
207
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
208
|
+
expected: "AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>",
|
|
209
|
+
value: value
|
|
210
|
+
});
|
|
211
|
+
}).every(flag => flag)].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
212
|
+
path: _path + ".description",
|
|
213
|
+
expected: "string",
|
|
214
|
+
value: input.description
|
|
215
|
+
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
216
|
+
if (false === __is(input)) {
|
|
217
|
+
errors = [];
|
|
218
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
219
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
220
|
+
path: _path + "",
|
|
221
|
+
expected: "IAutoBeInterfaceSchemaApplication.IProps",
|
|
222
|
+
value: input
|
|
223
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
224
|
+
path: _path + "",
|
|
225
|
+
expected: "IAutoBeInterfaceSchemaApplication.IProps",
|
|
226
|
+
value: input
|
|
227
|
+
}))(input, "$input", true);
|
|
228
|
+
const success = 0 === errors.length;
|
|
229
|
+
return success ? {
|
|
230
|
+
success,
|
|
231
|
+
data: input
|
|
232
|
+
} : {
|
|
233
|
+
success,
|
|
234
|
+
errors,
|
|
235
|
+
data: input
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
return {
|
|
239
|
+
success: true,
|
|
240
|
+
data: input
|
|
241
|
+
};
|
|
242
|
+
}; })()(next);
|
|
243
|
+
if (result.success === false)
|
|
244
|
+
return result;
|
|
245
|
+
// Check all IAuthorized types
|
|
246
|
+
const errors = [];
|
|
247
|
+
(0, validateAuthorizationSchema_1.validateAuthorizationSchema)({
|
|
248
|
+
errors,
|
|
249
|
+
schemas: result.data.schemas,
|
|
250
|
+
path: "$input.schemas",
|
|
251
|
+
});
|
|
252
|
+
if (errors.length !== 0)
|
|
253
|
+
return {
|
|
254
|
+
success: false,
|
|
255
|
+
errors,
|
|
256
|
+
data: next,
|
|
257
|
+
};
|
|
258
|
+
return result;
|
|
259
|
+
};
|
|
260
|
+
const application = collection[props.model === "chatgpt" ? "chatgpt" : "claude"](validate);
|
|
164
261
|
return {
|
|
165
262
|
protocol: "class",
|
|
166
263
|
name: "interface",
|
|
@@ -172,228 +269,299 @@ function createController(props) {
|
|
|
172
269
|
},
|
|
173
270
|
};
|
|
174
271
|
}
|
|
175
|
-
const
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
description: "Complete set of schema components for the OpenAPI specification.\n\nThis property contains comprehensive type definitions for all entities in\nthe system. It is the central repository of all named schema types that\nwill be used throughout the API specification.\n\nCRITICAL REQUIREMENT: All object types MUST be defined as named types in\nthe components.schemas section. Inline anonymous object definitions are\nstrictly prohibited.\n\nThis components object should include:\n\n- Main entity types (IEntityName)\n- Operation-specific variants (.ICreate, .IUpdate, .ISummary, etc.)\n- Container types (IPage<T> for pagination)\n- Enumeration types\n\nAll schema definitions must include detailed descriptions that reference\nthe original Prisma schema comments and thoroughly document each\nproperty. Every property that references an object must use a $ref to a\nnamed type in the components.schemas section. This applies to all objects\nin request bodies, response bodies, and properties that are objects or\narrays of objects.\n\nExample structure:\n\n```typescript\n{\n schemas: {\n IUser: {\n type: \"object\",\n properties: {\n id: { type: \"string\", format: \"uuid\" },\n email: { type: \"string\", format: \"email\" },\n profile: { \"$ref\": \"#/components/schemas/IUserProfile\" }\n },\n required: [\"id\", \"email\"],\n description: \"User entity representing system account holders...\"\n },\n \"IUser.ICreate\": { ... },\n // Additional schemas\n }\n}\n```",
|
|
190
|
-
$ref: "#/$defs/RecordstringAutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema"
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
required: [
|
|
194
|
-
"schemas"
|
|
195
|
-
],
|
|
196
|
-
additionalProperties: false,
|
|
197
|
-
$defs: {
|
|
198
|
-
"RecordstringAutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema": {
|
|
199
|
-
description: "Construct a type with a set of properties K of type T",
|
|
200
|
-
type: "object",
|
|
201
|
-
properties: {},
|
|
202
|
-
required: [],
|
|
203
|
-
additionalProperties: {
|
|
204
|
-
$ref: "#/$defs/AutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema"
|
|
205
|
-
}
|
|
206
|
-
},
|
|
207
|
-
"AutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema": {
|
|
208
|
-
description: "Descriptive type schema info.\n\n`AutoBeOpenApi.IJsonSchemaDescriptive` is a type schema info of the OpenAPI\nGenerative, but it has a `description` property which is required.\n\n`AutoBeOpenApi.IJsonSchemaDescriptive` basically follows the JSON schema\nspecification of OpenAPI v3.1, but a little bit shrunk to remove ambiguous\nand duplicated expressions of OpenAPI v3.1 for the convenience, clarity,\nand AI generation.\n\nCRITICAL INSTRUCTIONS FOR OPTIMAL AI GENERATION:\n\nWhen creating descriptions for components, types, and properties:\n\n1. ALWAYS refer to and incorporate the description comments from the\n corresponding Prisma DB schema tables and columns. The descriptions\n should match the style, level of detail, and terminology used in the\n Prisma schema.\n2. ALL descriptions MUST be organized into MULTIPLE PARAGRAPHS separated by\n line breaks. Single-paragraph descriptions should be avoided.\n3. Descriptions should comprehensively cover:\n\n - The purpose and business meaning of the type or property\n - Relationships to other entities\n - Validation rules, constraints, and edge cases\n - Usage context and examples when helpful\n4. For each property of an object type, ensure its description reflects the\n corresponding column description in the Prisma DB schema, maintaining\n the same level of detail and terminology\n5. Descriptions should be so detailed and clear that anyone reading them can\n fully understand the type or property without needing to reference any\n other documentation",
|
|
272
|
+
const collection = {
|
|
273
|
+
chatgpt: (validate) => (() => {
|
|
274
|
+
const application = {
|
|
275
|
+
model: "chatgpt",
|
|
276
|
+
options: {
|
|
277
|
+
reference: true,
|
|
278
|
+
strict: false,
|
|
279
|
+
separate: null
|
|
280
|
+
},
|
|
281
|
+
functions: [
|
|
282
|
+
{
|
|
283
|
+
name: "makeComponents",
|
|
284
|
+
parameters: {
|
|
285
|
+
description: " Properties containing components to generate.\n\n------------------------------\n\nCurrent Type: {@link IAutoBeInterfaceSchemaApplication.IProps}\n\n### Description of {@link schemas} property:\n\n> Complete set of schema components for the OpenAPI specification.\n> \n> This property contains comprehensive type definitions for all entities in\n> the system. It is the central repository of all named schema types that\n> will be used throughout the API specification.\n> \n> DO: Define all object types as named types in the components.schemas\n> section. DO NOT: Use inline anonymous object definitions.\n> \n> This components object includes:\n> \n> - Main entity types (IEntityName)\n> - Operation-specific variants (.ICreate, .IUpdate, .ISummary, etc.)\n> - Container types (IPage<T> for pagination)\n> - Enumeration types\n> \n> DO: Include detailed descriptions that reference the original Prisma\n> schema comments and thoroughly document each property. DO: Use a $ref to\n> a named type in the components.schemas section for every property that\n> references an object.\n> \n> This applies to all objects in request bodies, response bodies, and\n> properties that are objects or arrays of objects.\n> \n> Example structure:\n> \n> ```typescript\n> {\n> schemas: {\n> IUser: {\n> type: \"object\",\n> properties: {\n> id: { type: \"string\", format: \"uuid\" },\n> email: { type: \"string\", format: \"email\" },\n> profile: { \"$ref\": \"#/components/schemas/IUserProfile\" }\n> },\n> required: [\"id\", \"email\"],\n> description: \"User entity representing system account holders...\"\n> },\n> \"IUser.ICreate\": { ... },\n> // Additional schemas\n> }\n> }\n> ```",
|
|
209
286
|
type: "object",
|
|
210
287
|
properties: {
|
|
211
|
-
|
|
212
|
-
description: "
|
|
288
|
+
draft: {
|
|
289
|
+
description: "TypeScript draft code for schema definitions.\n\nThis property contains TypeScript interface definitions that serve as a\npreliminary draft before generating the final JSON schema components.\nThe draft allows for initial design and validation of the schema structure\nusing TypeScript's type system before converting to OpenAPI/JSON Schema format.\n\nThe draft typically includes:\n- Entity interfaces matching the Prisma models\n- Operation-specific variants (ICreate, IUpdate, etc.)\n- Utility types and enumerations\n- Type relationships and constraints\n\nThis TypeScript draft serves as the foundation for the subsequent schema\ngeneration, ensuring type safety and consistency. The final schemas in the\n`schemas` property should be derived from and validated against this draft.\n\nExample draft structure:\n```typescript\ninterface IUser {\n id: string;\n email: string;\n profile: IUserProfile;\n}\n\nnamespace IUser {\n interface ICreate extends Omit<IUser, \"id\"> {}\n interface IUpdate extends Partial<ICreate> {}\n}\n```",
|
|
213
290
|
type: "string"
|
|
291
|
+
},
|
|
292
|
+
schemas: {
|
|
293
|
+
$ref: "#/$defs/RecordstringAutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema"
|
|
214
294
|
}
|
|
215
295
|
},
|
|
216
296
|
required: [
|
|
217
|
-
"
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
})) && _vo2(value, _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key), true && _exceptionable) || _report(_exceptionable, {
|
|
245
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
246
|
-
expected: "AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>",
|
|
247
|
-
value: value
|
|
248
|
-
});
|
|
249
|
-
}).every(flag => flag)].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
250
|
-
path: _path + ".description",
|
|
251
|
-
expected: "string",
|
|
252
|
-
value: input.description
|
|
253
|
-
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
254
|
-
if (false === __is(input)) {
|
|
255
|
-
errors = [];
|
|
256
|
-
_report = __typia_transform__validateReport._validateReport(errors);
|
|
257
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
258
|
-
path: _path + "",
|
|
259
|
-
expected: "IAutoBeInterfaceSchemaApplication.IProps",
|
|
260
|
-
value: input
|
|
261
|
-
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
262
|
-
path: _path + "",
|
|
263
|
-
expected: "IAutoBeInterfaceSchemaApplication.IProps",
|
|
264
|
-
value: input
|
|
265
|
-
}))(input, "$input", true);
|
|
266
|
-
const success = 0 === errors.length;
|
|
267
|
-
return success ? {
|
|
268
|
-
success,
|
|
269
|
-
data: input
|
|
270
|
-
} : {
|
|
271
|
-
success,
|
|
272
|
-
errors,
|
|
273
|
-
data: input
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
|
-
return {
|
|
277
|
-
success: true,
|
|
278
|
-
data: input
|
|
279
|
-
};
|
|
280
|
-
}; })()
|
|
281
|
-
}
|
|
282
|
-
]
|
|
283
|
-
};
|
|
284
|
-
const collection = {
|
|
285
|
-
chatgpt: {
|
|
286
|
-
model: "chatgpt",
|
|
287
|
-
options: {
|
|
288
|
-
reference: true,
|
|
289
|
-
strict: false,
|
|
290
|
-
separate: null
|
|
291
|
-
},
|
|
292
|
-
functions: [
|
|
293
|
-
{
|
|
294
|
-
name: "makeComponents",
|
|
295
|
-
parameters: {
|
|
296
|
-
description: " Properties containing components to generate.\n\n------------------------------\n\nCurrent Type: {@link IAutoBeInterfaceSchemaApplication.IProps}\n\n### Description of {@link schemas} property:\n\n> Complete set of schema components for the OpenAPI specification.\n> \n> This property contains comprehensive type definitions for all entities in\n> the system. It is the central repository of all named schema types that\n> will be used throughout the API specification.\n> \n> CRITICAL REQUIREMENT: All object types MUST be defined as named types in\n> the components.schemas section. Inline anonymous object definitions are\n> strictly prohibited.\n> \n> This components object should include:\n> \n> - Main entity types (IEntityName)\n> - Operation-specific variants (.ICreate, .IUpdate, .ISummary, etc.)\n> - Container types (IPage<T> for pagination)\n> - Enumeration types\n> \n> All schema definitions must include detailed descriptions that reference\n> the original Prisma schema comments and thoroughly document each\n> property. Every property that references an object must use a $ref to a\n> named type in the components.schemas section. This applies to all objects\n> in request bodies, response bodies, and properties that are objects or\n> arrays of objects.\n> \n> Example structure:\n> \n> ```typescript\n> {\n> schemas: {\n> IUser: {\n> type: \"object\",\n> properties: {\n> id: { type: \"string\", format: \"uuid\" },\n> email: { type: \"string\", format: \"email\" },\n> profile: { \"$ref\": \"#/components/schemas/IUserProfile\" }\n> },\n> required: [\"id\", \"email\"],\n> description: \"User entity representing system account holders...\"\n> },\n> \"IUser.ICreate\": { ... },\n> // Additional schemas\n> }\n> }\n> ```",
|
|
297
|
-
type: "object",
|
|
298
|
-
properties: {
|
|
299
|
-
schemas: {
|
|
300
|
-
$ref: "#/$defs/RecordstringAutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema"
|
|
297
|
+
"draft",
|
|
298
|
+
"schemas"
|
|
299
|
+
],
|
|
300
|
+
additionalProperties: false,
|
|
301
|
+
$defs: {
|
|
302
|
+
"RecordstringAutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema": {
|
|
303
|
+
description: "Construct a type with a set of properties K of type T",
|
|
304
|
+
type: "object",
|
|
305
|
+
properties: {},
|
|
306
|
+
required: [],
|
|
307
|
+
additionalProperties: {
|
|
308
|
+
$ref: "#/$defs/AutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema"
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
"AutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema": {
|
|
312
|
+
description: "Descriptive type schema info.\n\n`AutoBeOpenApi.IJsonSchemaDescriptive` is a type schema info of the OpenAPI\nGenerative, but it has a `description` property which is required.\n\n`AutoBeOpenApi.IJsonSchemaDescriptive` basically follows the JSON schema\nspecification of OpenAPI v3.1, but a little bit shrunk to remove ambiguous\nand duplicated expressions of OpenAPI v3.1 for the convenience, clarity,\nand AI generation.\n\nCRITICAL INSTRUCTIONS FOR OPTIMAL AI GENERATION:\n\nWhen creating descriptions for components, types, and properties:\n\n1. ALWAYS refer to and incorporate the description comments from the\n corresponding Prisma DB schema tables and columns. The descriptions\n should match the style, level of detail, and terminology used in the\n Prisma schema.\n2. ALL descriptions MUST be organized into MULTIPLE PARAGRAPHS separated by\n line breaks. Single-paragraph descriptions should be avoided.\n3. Descriptions should comprehensively cover:\n\n - The purpose and business meaning of the type or property\n - Relationships to other entities\n - Validation rules, constraints, and edge cases\n - Usage context and examples when helpful\n4. For each property of an object type, ensure its description reflects the\n corresponding column description in the Prisma DB schema, maintaining\n the same level of detail and terminology\n5. Descriptions should be so detailed and clear that anyone reading them can\n fully understand the type or property without needing to reference any\n other documentation",
|
|
313
|
+
type: "object",
|
|
314
|
+
properties: {
|
|
315
|
+
description: {
|
|
316
|
+
description: "Description about the type.\n\nCRITICAL: This description MUST be extensively detailed and MUST\nreference and align with the description comments from the\ncorresponding Prisma DB schema tables and columns.\n\nThe description MUST be organized into MULTIPLE PARAGRAPHS (separated\nby line breaks) based on different aspects of the type:\n\n- The purpose and business meaning of the type\n- Relationships to other entities in the system\n- Validation rules, constraints, and edge cases\n- Usage context and examples when helpful\n\nThis structured approach improves readability and helps readers better\nunderstand the type's various characteristics and use cases. The\ndescription should be so comprehensive that anyone reading it can fully\nunderstand the type without needing to reference other documentation.\n\n> MUST be written in English. Never use other languages.",
|
|
317
|
+
type: "string"
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
required: [
|
|
321
|
+
"description"
|
|
322
|
+
]
|
|
323
|
+
}
|
|
301
324
|
}
|
|
302
325
|
},
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
"
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
326
|
+
description: "Generate OpenAPI components containing named schema types.\n\nThis method receives a complete set of schema components and integrates\nthem into the final OpenAPI specification. It processes all entity schemas,\ntheir variants, and related type definitions to ensure a comprehensive and\nconsistent API design.\n\nThe provided components should include schemas for all entities identified\nin the previous phases of API path/method definition and operation\ncreation. This ensures that the final OpenAPI document has complete type\ncoverage for all operations.\n\nDO: Follow established naming conventions (IEntityName,\nIEntityName.ICreate, etc.) DO: Document thoroughly with descriptions that\nreference the original Prisma schema comments.",
|
|
327
|
+
validate: (() => { const _io0 = input => "string" === typeof input.draft && ("object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) && _io1(input.schemas)); const _io1 = input => Object.keys(input).every(key => {
|
|
328
|
+
const value = input[key];
|
|
329
|
+
if (undefined === value)
|
|
330
|
+
return true;
|
|
331
|
+
return "object" === typeof value && null !== value && _io2(value);
|
|
332
|
+
}); const _io2 = input => "string" === typeof input.description; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.draft || _report(_exceptionable, {
|
|
333
|
+
path: _path + ".draft",
|
|
334
|
+
expected: "string",
|
|
335
|
+
value: input.draft
|
|
336
|
+
}), ("object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) || _report(_exceptionable, {
|
|
337
|
+
path: _path + ".schemas",
|
|
338
|
+
expected: "Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>",
|
|
339
|
+
value: input.schemas
|
|
340
|
+
})) && _vo1(input.schemas, _path + ".schemas", true && _exceptionable) || _report(_exceptionable, {
|
|
341
|
+
path: _path + ".schemas",
|
|
342
|
+
expected: "Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>",
|
|
343
|
+
value: input.schemas
|
|
344
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
345
|
+
const value = input[key];
|
|
346
|
+
if (undefined === value)
|
|
347
|
+
return true;
|
|
348
|
+
return ("object" === typeof value && null !== value || _report(_exceptionable, {
|
|
349
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
350
|
+
expected: "AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>",
|
|
351
|
+
value: value
|
|
352
|
+
})) && _vo2(value, _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key), true && _exceptionable) || _report(_exceptionable, {
|
|
353
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
354
|
+
expected: "AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>",
|
|
355
|
+
value: value
|
|
356
|
+
});
|
|
357
|
+
}).every(flag => flag)].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
358
|
+
path: _path + ".description",
|
|
359
|
+
expected: "string",
|
|
360
|
+
value: input.description
|
|
361
|
+
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
362
|
+
if (false === __is(input)) {
|
|
363
|
+
errors = [];
|
|
364
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
365
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
366
|
+
path: _path + "",
|
|
367
|
+
expected: "IAutoBeInterfaceSchemaApplication.IProps",
|
|
368
|
+
value: input
|
|
369
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
370
|
+
path: _path + "",
|
|
371
|
+
expected: "IAutoBeInterfaceSchemaApplication.IProps",
|
|
372
|
+
value: input
|
|
373
|
+
}))(input, "$input", true);
|
|
374
|
+
const success = 0 === errors.length;
|
|
375
|
+
return success ? {
|
|
376
|
+
success,
|
|
377
|
+
data: input
|
|
378
|
+
} : {
|
|
379
|
+
success,
|
|
380
|
+
errors,
|
|
381
|
+
data: input
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
return {
|
|
385
|
+
success: true,
|
|
386
|
+
data: input
|
|
387
|
+
};
|
|
388
|
+
}; })()
|
|
389
|
+
}
|
|
390
|
+
]
|
|
391
|
+
};
|
|
392
|
+
__typia_transform__llmApplicationFinalize._llmApplicationFinalize(application, Object.assign(Object.assign({}, {
|
|
393
|
+
validate: {
|
|
394
|
+
makeComponents: validate,
|
|
395
|
+
},
|
|
396
|
+
}), { equals: false }));
|
|
397
|
+
return application;
|
|
398
|
+
})(),
|
|
399
|
+
claude: (validate) => (() => {
|
|
400
|
+
const application = {
|
|
401
|
+
model: "claude",
|
|
402
|
+
options: {
|
|
403
|
+
reference: true,
|
|
404
|
+
separate: null
|
|
405
|
+
},
|
|
406
|
+
functions: [
|
|
407
|
+
{
|
|
408
|
+
name: "makeComponents",
|
|
409
|
+
parameters: {
|
|
410
|
+
description: " Properties containing components to generate.\n\n------------------------------\n\nCurrent Type: {@link IAutoBeInterfaceSchemaApplication.IProps}",
|
|
411
|
+
type: "object",
|
|
412
|
+
properties: {
|
|
413
|
+
draft: {
|
|
414
|
+
description: "TypeScript draft code for schema definitions.\n\nThis property contains TypeScript interface definitions that serve as a\npreliminary draft before generating the final JSON schema components.\nThe draft allows for initial design and validation of the schema structure\nusing TypeScript's type system before converting to OpenAPI/JSON Schema format.\n\nThe draft typically includes:\n- Entity interfaces matching the Prisma models\n- Operation-specific variants (ICreate, IUpdate, etc.)\n- Utility types and enumerations\n- Type relationships and constraints\n\nThis TypeScript draft serves as the foundation for the subsequent schema\ngeneration, ensuring type safety and consistency. The final schemas in the\n`schemas` property should be derived from and validated against this draft.\n\nExample draft structure:\n```typescript\ninterface IUser {\n id: string;\n email: string;\n profile: IUserProfile;\n}\n\nnamespace IUser {\n interface ICreate extends Omit<IUser, \"id\"> {}\n interface IUpdate extends Partial<ICreate> {}\n}\n```",
|
|
415
|
+
type: "string"
|
|
416
|
+
},
|
|
417
|
+
schemas: {
|
|
418
|
+
description: "Complete set of schema components for the OpenAPI specification.\n\nThis property contains comprehensive type definitions for all entities in\nthe system. It is the central repository of all named schema types that\nwill be used throughout the API specification.\n\nDO: Define all object types as named types in the components.schemas\nsection. DO NOT: Use inline anonymous object definitions.\n\nThis components object includes:\n\n- Main entity types (IEntityName)\n- Operation-specific variants (.ICreate, .IUpdate, .ISummary, etc.)\n- Container types (IPage<T> for pagination)\n- Enumeration types\n\nDO: Include detailed descriptions that reference the original Prisma\nschema comments and thoroughly document each property. DO: Use a $ref to\na named type in the components.schemas section for every property that\nreferences an object.\n\nThis applies to all objects in request bodies, response bodies, and\nproperties that are objects or arrays of objects.\n\nExample structure:\n\n```typescript\n{\n schemas: {\n IUser: {\n type: \"object\",\n properties: {\n id: { type: \"string\", format: \"uuid\" },\n email: { type: \"string\", format: \"email\" },\n profile: { \"$ref\": \"#/components/schemas/IUserProfile\" }\n },\n required: [\"id\", \"email\"],\n description: \"User entity representing system account holders...\"\n },\n \"IUser.ICreate\": { ... },\n // Additional schemas\n }\n}\n```",
|
|
419
|
+
$ref: "#/$defs/RecordstringAutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema"
|
|
315
420
|
}
|
|
316
421
|
},
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
422
|
+
required: [
|
|
423
|
+
"draft",
|
|
424
|
+
"schemas"
|
|
425
|
+
],
|
|
426
|
+
additionalProperties: false,
|
|
427
|
+
$defs: {
|
|
428
|
+
"RecordstringAutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema": {
|
|
429
|
+
description: "Construct a type with a set of properties K of type T",
|
|
430
|
+
type: "object",
|
|
431
|
+
properties: {},
|
|
432
|
+
required: [],
|
|
433
|
+
additionalProperties: {
|
|
434
|
+
$ref: "#/$defs/AutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema"
|
|
324
435
|
}
|
|
325
436
|
},
|
|
326
|
-
|
|
327
|
-
"description"
|
|
328
|
-
|
|
437
|
+
"AutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema": {
|
|
438
|
+
description: "Descriptive type schema info.\n\n`AutoBeOpenApi.IJsonSchemaDescriptive` is a type schema info of the OpenAPI\nGenerative, but it has a `description` property which is required.\n\n`AutoBeOpenApi.IJsonSchemaDescriptive` basically follows the JSON schema\nspecification of OpenAPI v3.1, but a little bit shrunk to remove ambiguous\nand duplicated expressions of OpenAPI v3.1 for the convenience, clarity,\nand AI generation.\n\nCRITICAL INSTRUCTIONS FOR OPTIMAL AI GENERATION:\n\nWhen creating descriptions for components, types, and properties:\n\n1. ALWAYS refer to and incorporate the description comments from the\n corresponding Prisma DB schema tables and columns. The descriptions\n should match the style, level of detail, and terminology used in the\n Prisma schema.\n2. ALL descriptions MUST be organized into MULTIPLE PARAGRAPHS separated by\n line breaks. Single-paragraph descriptions should be avoided.\n3. Descriptions should comprehensively cover:\n\n - The purpose and business meaning of the type or property\n - Relationships to other entities\n - Validation rules, constraints, and edge cases\n - Usage context and examples when helpful\n4. For each property of an object type, ensure its description reflects the\n corresponding column description in the Prisma DB schema, maintaining\n the same level of detail and terminology\n5. Descriptions should be so detailed and clear that anyone reading them can\n fully understand the type or property without needing to reference any\n other documentation",
|
|
439
|
+
type: "object",
|
|
440
|
+
properties: {
|
|
441
|
+
description: {
|
|
442
|
+
description: "Description about the type.\n\nCRITICAL: This description MUST be extensively detailed and MUST\nreference and align with the description comments from the\ncorresponding Prisma DB schema tables and columns.\n\nThe description MUST be organized into MULTIPLE PARAGRAPHS (separated\nby line breaks) based on different aspects of the type:\n\n- The purpose and business meaning of the type\n- Relationships to other entities in the system\n- Validation rules, constraints, and edge cases\n- Usage context and examples when helpful\n\nThis structured approach improves readability and helps readers better\nunderstand the type's various characteristics and use cases. The\ndescription should be so comprehensive that anyone reading it can fully\nunderstand the type without needing to reference other documentation.\n\n> MUST be written in English. Never use other languages.",
|
|
443
|
+
type: "string"
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
required: [
|
|
447
|
+
"description"
|
|
448
|
+
]
|
|
449
|
+
}
|
|
329
450
|
}
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
validate: (() => { const _io0 = input => "object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) && _io1(input.schemas); const _io1 = input => Object.keys(input).every(key => {
|
|
334
|
-
const value = input[key];
|
|
335
|
-
if (undefined === value)
|
|
336
|
-
return true;
|
|
337
|
-
return "object" === typeof value && null !== value && _io2(value);
|
|
338
|
-
}); const _io2 = input => "string" === typeof input.description; const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) || _report(_exceptionable, {
|
|
339
|
-
path: _path + ".schemas",
|
|
340
|
-
expected: "Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>",
|
|
341
|
-
value: input.schemas
|
|
342
|
-
})) && _vo1(input.schemas, _path + ".schemas", true && _exceptionable) || _report(_exceptionable, {
|
|
343
|
-
path: _path + ".schemas",
|
|
344
|
-
expected: "Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>",
|
|
345
|
-
value: input.schemas
|
|
346
|
-
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
451
|
+
},
|
|
452
|
+
description: "Generate OpenAPI components containing named schema types.\n\nThis method receives a complete set of schema components and integrates\nthem into the final OpenAPI specification. It processes all entity schemas,\ntheir variants, and related type definitions to ensure a comprehensive and\nconsistent API design.\n\nThe provided components should include schemas for all entities identified\nin the previous phases of API path/method definition and operation\ncreation. This ensures that the final OpenAPI document has complete type\ncoverage for all operations.\n\nDO: Follow established naming conventions (IEntityName,\nIEntityName.ICreate, etc.) DO: Document thoroughly with descriptions that\nreference the original Prisma schema comments.",
|
|
453
|
+
validate: (() => { const _io0 = input => "string" === typeof input.draft && ("object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) && _io1(input.schemas)); const _io1 = input => Object.keys(input).every(key => {
|
|
347
454
|
const value = input[key];
|
|
348
455
|
if (undefined === value)
|
|
349
456
|
return true;
|
|
350
|
-
return
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
const
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
errors
|
|
457
|
+
return "object" === typeof value && null !== value && _io2(value);
|
|
458
|
+
}); const _io2 = input => "string" === typeof input.description; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.draft || _report(_exceptionable, {
|
|
459
|
+
path: _path + ".draft",
|
|
460
|
+
expected: "string",
|
|
461
|
+
value: input.draft
|
|
462
|
+
}), ("object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) || _report(_exceptionable, {
|
|
463
|
+
path: _path + ".schemas",
|
|
464
|
+
expected: "Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>",
|
|
465
|
+
value: input.schemas
|
|
466
|
+
})) && _vo1(input.schemas, _path + ".schemas", true && _exceptionable) || _report(_exceptionable, {
|
|
467
|
+
path: _path + ".schemas",
|
|
468
|
+
expected: "Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>",
|
|
469
|
+
value: input.schemas
|
|
470
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
471
|
+
const value = input[key];
|
|
472
|
+
if (undefined === value)
|
|
473
|
+
return true;
|
|
474
|
+
return ("object" === typeof value && null !== value || _report(_exceptionable, {
|
|
475
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
476
|
+
expected: "AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>",
|
|
477
|
+
value: value
|
|
478
|
+
})) && _vo2(value, _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key), true && _exceptionable) || _report(_exceptionable, {
|
|
479
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
480
|
+
expected: "AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>",
|
|
481
|
+
value: value
|
|
482
|
+
});
|
|
483
|
+
}).every(flag => flag)].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
484
|
+
path: _path + ".description",
|
|
485
|
+
expected: "string",
|
|
486
|
+
value: input.description
|
|
487
|
+
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
488
|
+
if (false === __is(input)) {
|
|
489
|
+
errors = [];
|
|
490
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
491
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
492
|
+
path: _path + "",
|
|
493
|
+
expected: "IAutoBeInterfaceSchemaApplication.IProps",
|
|
494
|
+
value: input
|
|
495
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
496
|
+
path: _path + "",
|
|
497
|
+
expected: "IAutoBeInterfaceSchemaApplication.IProps",
|
|
498
|
+
value: input
|
|
499
|
+
}))(input, "$input", true);
|
|
500
|
+
const success = 0 === errors.length;
|
|
501
|
+
return success ? {
|
|
502
|
+
success,
|
|
503
|
+
data: input
|
|
504
|
+
} : {
|
|
505
|
+
success,
|
|
506
|
+
errors,
|
|
507
|
+
data: input
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
return {
|
|
511
|
+
success: true,
|
|
383
512
|
data: input
|
|
384
513
|
};
|
|
514
|
+
}; })()
|
|
515
|
+
}
|
|
516
|
+
]
|
|
517
|
+
};
|
|
518
|
+
__typia_transform__llmApplicationFinalize._llmApplicationFinalize(application, Object.assign(Object.assign({}, {
|
|
519
|
+
validate: {
|
|
520
|
+
makeComponents: validate,
|
|
521
|
+
},
|
|
522
|
+
}), { equals: false }));
|
|
523
|
+
return application;
|
|
524
|
+
})(),
|
|
525
|
+
};
|
|
526
|
+
const authTokenSchema = {
|
|
527
|
+
version: "3.1",
|
|
528
|
+
components: {
|
|
529
|
+
schemas: {
|
|
530
|
+
IAuthorizationToken: {
|
|
531
|
+
type: "object",
|
|
532
|
+
properties: {
|
|
533
|
+
access: {
|
|
534
|
+
type: "string",
|
|
535
|
+
description: "JWT access token for authenticated requests.\n\nThis token should be included in the Authorization header for subsequent\nauthenticated API requests as `Bearer {token}`."
|
|
536
|
+
},
|
|
537
|
+
refresh: {
|
|
538
|
+
type: "string",
|
|
539
|
+
description: "Refresh token for obtaining new access tokens.\n\nThis token can be used to request new access tokens when the current access\ntoken expires, extending the user's session."
|
|
540
|
+
},
|
|
541
|
+
expired_at: {
|
|
542
|
+
type: "string",
|
|
543
|
+
format: "date-time",
|
|
544
|
+
description: "Access token expiration timestamp.\n\nISO 8601 date-time string indicating when the access token will expire and\ncan no longer be used for authentication."
|
|
545
|
+
},
|
|
546
|
+
refreshable_until: {
|
|
547
|
+
type: "string",
|
|
548
|
+
format: "date-time",
|
|
549
|
+
description: "Refresh token expiration timestamp.\n\nISO 8601 date-time string indicating the latest time until which the\nrefresh token can be used to obtain new access tokens."
|
|
385
550
|
}
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
551
|
+
},
|
|
552
|
+
required: [
|
|
553
|
+
"access",
|
|
554
|
+
"refresh",
|
|
555
|
+
"expired_at",
|
|
556
|
+
"refreshable_until"
|
|
557
|
+
],
|
|
558
|
+
description: "Authorization token response structure.\n\nThis interface defines the structure of the authorization token response\nreturned after successful user authentication. It contains both access and\nrefresh tokens along with their expiration information.\n\nThis token structure is automatically included in API schemas when the system\ndetects authorization roles in the requirements analysis phase. It provides a\nstandard format for JWT-based authentication across the generated backend\napplications."
|
|
391
559
|
}
|
|
392
|
-
|
|
560
|
+
}
|
|
393
561
|
},
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
562
|
+
schema: {
|
|
563
|
+
$ref: "#/components/schemas/IAuthorizationToken"
|
|
564
|
+
}
|
|
565
|
+
}.components.schemas
|
|
566
|
+
.IAuthorizationToken;
|
|
399
567
|
//# sourceMappingURL=orchestrateInterfaceSchemas.js.map
|